| /plugin/wysiwyg/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/ |
| D | spellchecker.pl | 107 sub handleError { subroutine
|
| /plugin/fckg/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/ |
| D | spellchecker.pl | 109 sub handleError { subroutine
|
| /plugin/grensladawritezor/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/ |
| D | spellchecker.pl | 107 sub handleError { subroutine
|
| /plugin/findologicxmlexport/vendor/phpunit/phpunit/src/Util/ |
| D | ErrorHandler.php | 44 public static function handleError($errno, $errstr, $errfile, $errline) function in PHPUnit_Util_ErrorHandler
|
| /plugin/jplayer/vendor/symfony/process/Pipes/ |
| D | AbstractPipes.php | 178 public function handleError($type, $msg) function in Symfony\\Component\\Process\\Pipes\\AbstractPipes
|
| /plugin/combo/vendor/symfony/process/Pipes/ |
| H A D | AbstractPipes.php | 176 public function handleError(int $type, string $msg) function in Symfony\\Component\\Process\\Pipes\\AbstractPipes
|
| /plugin/asciidocjs/node_modules/async/internal/ |
| D | asyncEachOfLimit.js | 66 function handleError(err) { function
|
| /plugin/combo/ComboStrap/ |
| H A D | PermalinkTag.php | 126 …public static function handleError(string $errorMessage, bool $strict, CallStack $callStack): array function in ComboStrap\\PermalinkTag
|
| /plugin/authgooglesheets/vendor/monolog/monolog/src/Monolog/ |
| D | ErrorHandler.php | 213 …public function handleError(int $code, string $message, string $file = '', int $line = 0, ?array $… function in Monolog\\ErrorHandler
|
| /plugin/asciidocjs/node_modules/nunjucks/src/ |
| D | runtime.js | 223 function handleError(error, lineno, colno) { function 323 handleError: handleError, property
|
| D | environment.js | 20 var handleError = globalRuntime.handleError, variable
|
| /plugin/bugzillaint/ |
| D | script.js | 37 function handleError( a ) { function
|
| /plugin/asciidocjs/node_modules/unxhr/lib/ |
| D | XMLHttpRequest.js | 543 this.handleError = function (error, url) { method in exports.XMLHttpRequest
|
| /plugin/findologicxmlexport/vendor/twig/twig/test/Twig/Tests/ |
| D | EnvironmentTest.php | 448 public function handleError($type, $msg) function in Twig_Tests_EnvironmentTest
|
| /plugin/asciidocjs/node_modules/nunjucks/browser/ |
| D | nunjucks-slim.js | 741 handleError: handleError, property
|
| D | nunjucks.js | 841 handleError: handleError, property
|
| /plugin/asciidocjs/node_modules/async/dist/ |
| D | async.js | 383 function handleError(err) { function
|
| D | async.mjs | 377 function handleError(err) { function
|
| /plugin/diagramsnet/lib/js/grapheditor/ |
| D | EditorUi.js | 4283 EditorUi.prototype.handleError = function(resp, title, fn, invokeFnOnClose, notFoundMessage) method in EditorUi
|
| /plugin/eventline/timeline_ajax/ |
| D | simile-ajax-bundle.js | 860 },handleError:function(s,xhr,status,e){if(s.error){s.error(xhr,status,e); method
|
| /plugin/tline/timeline_ajax/ |
| D | simile-ajax-bundle.js | 860 },handleError:function(s,xhr,status,e){if(s.error){s.error(xhr,status,e); method
|
| /plugin/diagramsnet/lib/js/diagramly/ |
| D | EditorUi.js | 3878 …EditorUi.prototype.handleError = function(resp, title, fn, invokeFnOnClose, notFoundMessage, fileH… method in EditorUi
|
| /plugin/jmol2/jmol/ |
| D | JmolApplet0.jar | META-INF/
META-INF/MANIFEST.MF
com/
com/obrador/
javax/
... |
| D | JmolAppletSigned0.jar | META-INF/MANIFEST.MF
META-INF/SELFSIGN.SF
META-INF/SELFSIGN ... |
| /plugin/bpmnio/vendor/bpmn-js/dist/ |
| H A D | bpmn-viewer.production.min.js | 2 (()=>{var Ps=Object.create;var vn=Object.defineProperty;var ks=Object.getOwnPropertyDescriptor;var Ts=Object.getOwnPropertyNames;var Ms=Object.getPrototypeOf,Ds=Object.prototype.hasOwnProperty;var Ns=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var En=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Bs=(e,t)=>{for(var n in t)vn(e,n,{get:t[n],enumerable:!0})},Ni=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ts(t))!Ds.call(e,i)&&i!==n&&vn(e,i,{get:()=>t[i],enumerable:!(r=ks(t,i))||r.enumerable});return e};var Os=(e,t,n)=>(n=e!=null?Ps(Ms(e)):{},Ni(t||!e||!e.__esModule?vn(n,"default",{value:e,enumerable:!0}):n,e)),Ls=e=>Ni(vn({},"__esModule",{value:!0}),e);var Fi={};Bs(Fi,{assign:()=>M,bind:()=>Ye,debounce:()=>dr,ensureArray:()=>Bi,every:()=>bn,filter:()=>nt,find:()=>ve,findIndex:()=>hr,flatten:()=>Is,forEach:()=>P,get:()=>Gs,groupBy:()=>Ft,has:()=>at,isArray:()=>xe,isDefined:()=>wt,isFunction:()=>tt,isNil:()=>nn,isNumber:()=>Me,isObject:()=>_e,isString:()=>De,isUndefined:()=>Tt,keys:()=>Oi,map:()=>_t,matchPattern:()=>xn,merge:()=>Ii,omit:()=>vr,pick:()=>gr,reduce:()=>Ve,set:()=>yr,size:()=>$s,some:()=>rn,sortBy:()=>Ws,throttle:()=>Us,unionBy:()=>qs,uniqueBy:()=>Li,values:()=>Vs,without:()=>js});function Is(e){return Array.prototype.concat.apply([],e)}function Tt(e){return e===void 0}function wt(e){return e!==void 0}function nn(e){return e==null}function xe(e){return tn.call(e)==="[object Array]"}function _e(e){return tn.call(e)==="[object Object]"}function Me(e){return tn.call(e)==="[object Number]"}function tt(e){let t=tn.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function De(e){return tn.call(e)==="[object String]"}function Bi(e){if(!xe(e))throw new Error("must supply array")}function at(e,t){return!nn(e)&&Fs.call(e,t)}function ve(e,t){let n=wn(t),r;return P(e,function(i,o){if(n(i,o))return r=i,!1}),r}function hr(e,t){let n=wn(t),r=xe(e)?-1:void 0;return P(e,function(i,o){if(n(i,o))return r=o,!1}),r}function nt(e,t){let n=wn(t),r=[];return P(e,function(i,o){n(i,o)&&r.push(i)}),r}function P(e,t){let n,r;if(Tt(e))return;let i=xe(e)?zs:Hs;for(let o in e)if(at(e,o)&&(n=e[o],r=t(n,i(o)),r===!1))return n}function js(e,t){if(Tt(e))return[];Bi(e);let n=wn(t);return e.filter(function(r,i){return!n(r,i)})}function Ve(e,t,n){return P(e,function(r,i){n=t(n,r,i)}),n}function bn(e,t){return!!Ve(e,function(n,r,i){return n&&t(r,i)},!0)}function rn(e,t){return!!ve(e,t)}function _t(e,t){let n=[];return P(e,function(r,i){n.push(t(r,i))}),n}function Oi(e){return e&&Object.keys(e)||[]}function $s(e){return Oi(e).length}function Vs(e){return _t(e,t=>t)}function Ft(e,t,n={}){return t=mr(t),P(e,function(r){let i=t(r)||"_",o=n[i];o||(o=n[i]=[]),o.push(r)}),n}function Li(e,...t){e=mr(e);let n={};return P(t,i=>Ft(i,e,n)),_t(n,function(i,o){return i[0]})}function Ws(e,t){t=mr(t);let n=[];return P(e,function(r,i){let o=t(r,i),a={d:o,v:r};for(var s=0;s<n.length;s++){let{d:c}=n[s];if(o<c){n.splice(s,0,a);return}}n.push(a)}),_t(n,r=>r.v)}function xn(e){return function(t){return bn(e,function(n,r){return t[r]===n})}}function mr(e){return tt(e)?e:t=>t[e]}function wn(e){return tt(e)?e:t=>t===e}function Hs(e){return e}function zs(e){return Number(e)}function dr(e,t){let n,r,i,o;function a(y){let v=Date.now(),A=y?0:o+t-v;if(A>0)return s(A);e.apply(i,r),c()}function s(y){n=setTimeout(a,y)}function c(){n&&clearTimeout(n),n=o=r=i=void 0}function f(){n&&a(!0),c()}function h(...y){o=Date.now(),r=y,i=this,n||s(t)}return h.flush=f,h.cancel=c,h}function Us(e,t){let n=!1;return function(...r){n||(e(...r),n=!0,setTimeout(()=>{n=!1},t))}}function Ye(e,t){return e.bind(t)}function M(e,...t){return Object.assign(e,...t)}function yr(e,t,n){let r=e;return P(t,function(i,o){if(typeof i!="number"&&typeof i!="string")throw new Error("illegal key type: "+typeof i+". Key should be of type number or string.");if(i==="constructor")throw new Error("illegal key: constructor");if(i==="__proto__")throw new Error("illegal key: __proto__");let a=t[o+1],s=r[i];wt(a)&&nn(s)&&(s=r[i]=isNaN(+a)?{}:[]),Tt(a)?Tt(n)?delete r[i]:r[i]=n:r=s}),e}function Gs(e,t,n){let r=e;return P(t,function(i){if(nn(r))return r=void 0,!1;r=r[i]}),Tt(r)?n:r}function gr(e,t){let n={},r=Object(e);return P(t,function(i){i in r&&(n[i]=e[i])}),n}function vr(e,t){let n={},r=Object(e);return P(r,function(i,o){t.indexOf(o)===-1&&(n[o]=i)}),n}function Ii(e,...t){return t.length&&P(t,function(n){!n||!_e(n)||P(n,function(r,i){if(i==="__proto__")return;let o=e[i];_e(r)?(_e(o)||(o={}),e[i]=Ii(o,r)):e[i]=r})}),e}var tn,Fs,qs,Q=Ns(()=>{tn=Object.prototype.toString,Fs=Object.prototype.hasOwnProperty;qs=Li});var Sa=En((fv,_a)=>{function Cf(e){return["String","Boolean","Integer","Real"].includes(e)}_a.exports=function e(t,n){let r=n.enter,i=n.leave,o=r&&r(t),a=t.$descriptor;o!==!1&&!a.isGeneric&&a.properties.filter(c=>!c.isAttr&&!c.isReference&&!Cf(c.type)).forEach(c=>{if(c.name in t){let f=t[c.name];c.isMany?f.forEach(h=>{e(h,n)}):e(f,n)}}),i&&i(t)}});var Ra=En((pv,Aa)=>{var Pf=Sa(),{isArray:kf,isObject:Tf,isFunction:Mf}=(Q(),Ls(Fi)),ri=class{constructor({moddleRoot:t,rule:n}){this.rule=n,this.moddleRoot=t,this.messages=[],this.report=this.report.bind(this)}report(t,n,r){let i={id:t,message:n};r&&kf(r)&&(i={...i,path:r}),r&&Tf(r)&&(i={...i,...r}),this.messages.push(i)}};Aa.exports=function({moddleRoot:t,rule:n}){let r=new ri({rule:n,moddleRoot:t}),i=n.check||{},o="leave"in i?i.leave:void 0,a="enter"in i?i.enter:Mf(i)?i:void 0;if(!a&&!o)throw new Error("no check implemented");return Pf(t,{enter:a?s=>a(s,r):void 0,leave:o?s=>o(s,r):void 0}),r.messages}});var ka=En((hv,Pa)=>{var Df=Ra(),Nf=(e,t)=>e,Bf={0:"off",1:"warn",2:"error",3:"info"},Of="rule-error";function Qe(e){let{config:t={},resolver:n,transformRule:r=Nf}=e||{};if(typeof n=="undefined")throw new Error("must provide <options.resolver>");this.config=t,this.resolver=n,this.transformRule=r,this.cachedRules={},this.cachedConfigs={}}Pa.exports=Qe;Qe.prototype.applyRule=function(t,n){let{config:r,rule:i,category:o,name:a}=n;try{return Df({moddleRoot:t,rule:i,config:r}).map(function(c){return{...c,meta:i.meta,category:o}})}catch(s){return console.error("rule <"+a+"> failed with error: ",s),[{message:s.message,category:Of}]}};Qe.prototype.resolveRule=function(e,t){let{pkg:n,ruleName:r}=this.parseRuleName(e),i=`${n}-${r}`,o=this.cachedRules[i];return o?Promise.resolve(o):Promise.resolve(this.resolver.resolveRule(n,r)).then(a=>{if(!a)throw new Error(`unknown rule <${e}>`);return this.cachedRules[i]=this.transformRule(a(t),{pkg:n,ruleName:r})})};Qe.prototype.resolveConfig=function(e){let{pkg:t,configName:n}=this.parseConfigName(e),r=`${t}-${n}`,i=this.cachedConfigs[r];return i?Promise.resolve(i):Promise.resolve(this.resolver.resolveConfig(t,n)).then(o=>{if(!o)throw new Error(`unknown config <${e}>`);return this.cachedConfigs[r]=this.normalizeConfig(o,t)})};Qe.prototype.resolveRules=function(e){return this.resolveConfiguredRules(e).then(t=>{let i=Object.entries(t).map(([o,a])=>{let{category:s,config:c}=this.parseRuleValue(a);return{name:o,category:s,config:c}}).filter(o=>o.category!=="off").map(o=>{let{name:a,config:s}=o;return this.resolveRule(a,s).then(function(c){return{...o,rule:c}})});return Promise.all(i)})};Qe.prototype.resolveConfiguredRules=function(e){let t=e.extends;return typeof t=="string"&&(t=[t]),typeof t=="undefined"&&(t=[]),Promise.all(t.map(n=>this.resolveConfig(n).then(r=>this.resolveConfiguredRules(r)))).then(n=>{let r=this.normalizeConfig(e,"bpmnlint").rules;return[...n,r].reduce((o,a)=>({...o,...a}),{})})};Qe.prototype.lint=function(e,t){return t=t||this.config,this.resolveRules(t).then(n=>{let r={};return n.forEach(i=>{let{name:o}=i,a=this.applyRule(e,i);a.length&&(r[o]=a)}),r})};Qe.prototype.parseRuleValue=function(e){let t,n;return Array.isArray(e)?(t=e[0],n=e[1]):(t=e,n={}),typeof t=="string"&&(t=t.toLowerCase()),t=Bf[t]||t,{config:n,category:t}};Qe.prototype.parseRuleName=function(e,t="bpmnlint"){let n=/^(?:(?:(@[^/]+)\/)?([^@]{1}[^/]*)\/)?([^/]+)$/.exec(e);if(!n)throw new Error(`unparseable rule name <${e}>`);let[r,i,o,a]=n;return o?{pkg:`${i?i+"/":""}${Ca(o)}`,ruleName:a}:{pkg:t,ruleName:a}};Qe.prototype.parseConfigName=function(e){let t=/^(?:(?:plugin:(?:(@[^/]+)\/)?([^@]{1}[^/]*)\/)|bpmnlint:)([^/]+)$/.exec(e);if(!t)throw new Error(`unparseable config name <${e}>`);let[n,r,i,o]=t;return i?{pkg:`${r?r+"/":""}${Ca(i)}`,configName:o}:{pkg:"bpmnlint",configName:o}};Qe.prototype.getSimplePackageName=function(e){let t=/^(?:(@[^/]+)\/)?([^/]+)$/.exec(e);if(!t)throw new Error(`unparseable package name <${e}>`);let[n,r,i]=t;return`${r?r+"/":""}${Lf(i)}`};Qe.prototype.normalizeConfig=function(e,t){let n=e.rules||{},r=Object.keys(n).reduce((i,o)=>{let a=n[o],{pkg:s,ruleName:c}=this.parseRuleName(o,t),f=s==="bpmnlint"?c:`${this.getSimplePackageName(s)}/${c}`;return i[f]=a,i},{});return{...e,rules:r}};function Ca(e){return e==="bpmnlint"?"bpmnlint":e.startsWith("bpmnlint-plugin-")?e:`bpmnlint-plugin-${e}`}function Lf(e){return e.startsWith("bpmnlint-plugin-")?e.substring(16):e}});var Ma=En((mv,Ta)=>{var If=ka();Ta.exports={Linter:If}});function Ce(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}Q();var Ks=1e3;function Xe(e,t){var n=this;t=t||Ks,e.on(["render.shape","render.connection"],t,function(r,i){var o=r.type,a=i.element,s=i.gfx,c=i.attrs;if(n.canRender(a))return o==="render.shape"?n.drawShape(s,a,c):n.drawConnection(s,a,c)}),e.on(["render.getShapePath","render.getConnectionPath"],t,function(r,i){if(n.canRender(i))return r.type==="render.getShapePath"?n.getShapePath(i):n.getConnectionPath(i)})}Xe.prototype.canRender=function(e){};Xe.prototype.drawShape=function(e,t){};Xe.prototype.drawConnection=function(e,t){};Xe.prototype.getShapePath=function(e){};Xe.prototype.getConnectionPath=function(e){};Q();function N(e,t){var n=oe(e);return n&&typeof n.$instanceOf=="function"&&n.$instanceOf(t)}function ji(e,t){return rn(t,function(n){return N(e,n)})}function oe(e){return e&&e.businessObject||e}function Ze(e){return e&&e.di}function dt(e,t){return N(e,"bpmn:CallActivity")?!1:N(e,"bpmn:SubProcess")?(t=t||Ze(e),t&&N(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):N(e,"bpmn:Participant")?!!oe(e).processRef:!0}function Er(e){if(!(!N(e,"bpmn:Participant")&&!N(e,"bpmn:Lane"))){var t=Ze(e).isHorizontal;return t===void 0?!0:t}}function $i(e){return e&&!!oe(e).triggeredByEvent}Q();Q();function Vi(e){return _e(e)&&at(e,"waypoints")}function br(e){return _e(e)&&at(e,"labelTarget")}var jt={width:90,height:20},qi=15;function Wi(e){return N(e,"bpmn:Event")||N(e,"bpmn:Gateway")||N(e,"bpmn:DataStoreReference")||N(e,"bpmn:DataObjectReference")||N(e,"bpmn:DataInput")||N(e,"bpmn:DataOutput")||N(e,"bpmn:SequenceFlow")||N(e,"bpmn:MessageFlow")||N(e,"bpmn:Group")}function Ys(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=Xs(e),o=Math.atan((r.y-n.y)/(r.x-n.x)),a=i.x,s=i.y;return Math.abs(o)<Math.PI/2?s-=qi:a+=qi,{x:a,y:s}}function Xs(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)];return{x:n.x+(r.x-n.x)/2,y:n.y+(r.y-n.y)/2}}function Zs(e){return e.waypoints?Ys(e.waypoints):N(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+jt.height/2}:{x:e.x+e.width/2,y:e.y+e.height+jt.height/2}}function Hi(e,t){var n,r,i,o=e.label;return o&&o.bounds?(i=o.bounds,r={width:Math.max(jt.width,i.width),height:i.height},n={x:i.x+i.width/2,y:i.y+i.height/2}):(n=Zs(t),r=jt),M({x:n.x-r.width/2,y:n.y-r.height/2},r)}function Qs(e){if(N(e,"bpmn:FlowElement")||N(e,"bpmn:Participant")||N(e,"bpmn:Lane")||N(e,"bpmn:SequenceFlow")||N(e,"bpmn:MessageFlow")||N(e,"bpmn:DataInput")||N(e,"bpmn:DataOutput"))return"name";if(N(e,"bpmn:TextAnnotation"))return"text";if(N(e,"bpmn:Group"))return"categoryValueRef"}function Js(e){var t=e.categoryValueRef;return t&&t.value||""}function $t(e){var t=e.businessObject,n=Qs(t);if(n)return n==="categoryValueRef"?Js(t):t[n]||""}Q();function Mt(e,t){t=!!t,xe(e)||(e=[e]);var n,r,i,o;return P(e,function(a){var s=a;a.waypoints&&!t&&(s=Mt(a.waypoints,!0));var c=s.x,f=s.y,h=s.height||0,y=s.width||0;(c<n||n===void 0)&&(n=c),(f<r||r===void 0)&&(r=f),(c+y>i||i===void 0)&&(i=c+y),(f+h>o||o===void 0)&&(o=f+h)}),{x:n,y:r,height:o-r,width:i-n}}function _n(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function Sn(e){return!!(e&&e.isFrame)}var An=7;Q();function eu(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function Ki(e,t){return t.appendChild(eu(e,t))}function fe(e,t){return Ki(t,e),e}var _r=2,Yi={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":_r,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":_r,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function tu(e,t){return Yi[t]?e.style[t]:e.getAttributeNS(null,t)}function Xi(e,t,n){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=Yi[r];i?(i===_r&&typeof n=="number"&&(n=String(n)+"px"),e.style[r]=n):e.setAttributeNS(null,t,n)}function nu(e,t){var n=Object.keys(t),r,i;for(r=0,i;i=n[r];r++)Xi(e,i,t[i])}function te(e,t,n){if(typeof t=="string")if(n!==void 0)Xi(e,t,n);else return tu(e,t);else nu(e,t);return e}var ru=Object.prototype.toString;function qe(e){return new St(e)}function St(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}St.prototype.add=function(e){return this.list.add(e),this};St.prototype.remove=function(e){return ru.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)};St.prototype.removeMatching=function(e){let t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this};St.prototype.toggle=function(e,t){return typeof t!="undefined"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this};St.prototype.array=function(){return Array.from(this.list)};St.prototype.has=St.prototype.contains=function(e){return this.list.contains(e)};function iu(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}var Ar={svg:"http://www.w3.org/2000/svg"},zi='<svg xmlns="'+Ar.svg+'"';function Zi(e){var t=!1;e.substring(0,4)==="<svg"?e.indexOf(Ar.svg)===-1&&(e=zi+e.substring(4)):(e=zi+">"+e+"</svg>",t=!0);var n=ou(e);if(!t)return n;for(var r=document.createDocumentFragment(),i=n.firstChild;i.firstChild;)r.appendChild(i.firstChild);return r}function ou(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function ne(e,t){var n;return e=e.trim(),e.charAt(0)==="<"?(n=Zi(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(Ar.svg,e),t&&te(n,t),n}var xr=null;function Sr(){return xr===null&&(xr=ne("svg")),xr}function Ui(e,t){var n,r,i=Object.keys(t);for(n=0;r=i[n];n++)e[r]=t[r];return e}function Qi(e,t,n,r,i,o){var a=Sr().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return Ui(a,e);case 6:return Ui(a,{a:e,b:t,c:n,d:r,e:i,f:o})}}function Vt(e){return e?Sr().createSVGTransformFromMatrix(e):Sr().createSVGTransform()}var Gi=/([&<>]{1})/g,au=/([&<>\n\r"]{1})/g,su={"&":"&","<":"<",">":">",'"':"'"};function wr(e,t){function n(r,i){return su[i]||i}return e.replace(t,n)}function Ji(e,t){var n,r,i,o,a;switch(e.nodeType){case 3:t.push(wr(e.textContent,Gi));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(i=e.attributes,n=0,r=i.length;n<r;++n)o=i.item(n),t.push(" ",o.name,'="',wr(o.value,au),'"');if(e.hasChildNodes()){for(t.push(">"),a=e.childNodes,n=0,r=a.length;n<r;++n)Ji(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("<!--",wr(e.nodeValue,Gi),"-->");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function uu(e,t){var n=Zi(t);if(iu(e),!!t){cu(n)||(n=n.documentElement);for(var r=fu(n.childNodes),i=0;i<r.length;i++)Ki(r[i],e)}}function lu(e){for(var t=e.firstChild,n=[];t;)Ji(t,n),t=t.nextSibling;return n.join("")}function cu(e){return e.nodeName==="#document-fragment"}function Rr(e,t){if(t!==void 0){try{uu(e,t)}catch(n){throw new Error("error parsing SVG: "+n.message)}return e}else return lu(e)}function fu(e){return Array.prototype.slice.call(e)}function Dt(e){var t=e.parentNode;return t&&t.removeChild(e),e}function pu(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function hu(e,t){var n,r;for(e.clear(),n=0;r=t[n];n++)e.appendItem(pu(e,r))}function Nt(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),hu(n,t)),n.consolidate()}function yt(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function mu(e){return["M",e.x,e.y]}function Cr(e){return["L",e.x,e.y]}function du(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function yu(e,t){let n=e.length,r=[mu(e[0])];for(let i=1;i<n;i++){let o=e[i-1],a=e[i],s=e[i+1];if(!s||!t){r.push(Cr(a));continue}let c=Math.min(t,Pr(a.x-o.x,a.y-o.y),Pr(s.x-a.x,s.y-a.y));if(!c){r.push(Cr(a));continue}let f=Rn(a,o,c),h=Rn(a,o,c*.5),y=Rn(a,s,c),v=Rn(a,s,c*.5);r.push(Cr(f)),r.push(du(h,v,y))}return r}function Rn(e,t,n){let r=t.x-e.x,i=t.y-e.y,o=Pr(r,i),a=n/o;return{x:e.x+r*a,y:e.y+i*a}}function Pr(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function qt(e,t,n){Me(t)&&(n=t,t=null),t||(t={});let r=ne("path",t);return Me(n)&&(r.dataset.cornerRadius=String(n)),kr(r,e)}function kr(e,t){let n=parseInt(e.dataset.cornerRadius,10)||0;return te(e,{d:yt(yu(t,n))}),e}Q();var Cn="hsl(225, 10%, 15%)",gu="white";function rt(e,t){return rn(e.eventDefinitions,function(n){return n.$type===t})}function eo(e){return e.$type==="bpmn:IntermediateThrowEvent"||e.$type==="bpmn:EndEvent"}function to(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function U(e,t,n){var r=Ze(e);return n||r.get("color:background-color")||r.get("bioc:fill")||t||gu}function k(e,t,n){var r=Ze(e);return n||r.get("color:border-color")||r.get("bioc:stroke")||t||Cn}function Wt(e,t,n,r){var i=Ze(e),o=i.get("label");return r||o&&o.get("color:color")||t||k(e,n)}function no(e){var t=e.x+e.width/2,n=e.y+e.height/2,r=e.width/2,i=[["M",t,n],["m",0,-r],["a",r,r,0,1,1,0,2*r],["a",r,r,0,1,1,0,-2*r],["z"]];return yt(i)}function Tr(e,t){var n=e.x,r=e.y,i=e.width,o=e.height,a=[["M",n+t,r],["l",i-t*2,0],["a",t,t,0,0,1,t,t],["l",0,o-t*2],["a",t,t,0,0,1,-t,t],["l",t*2-i,0],["a",t,t,0,0,1,-t,-t],["l",0,t*2-o],["a",t,t,0,0,1,t,-t],["z"]];return yt(a)}function ro(e){var t=e.width,n=e.height,r=e.x,i=e.y,o=t/2,a=n/2,s=[["M",r+o,i],["l",o,a],["l",-o,a],["l",-o,-a],["z"]];return yt(s)}function io(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=[["M",t,n],["l",r,0],["l",0,i],["l",-r,0],["z"]];return yt(o)}function Ht(e,t={}){return{width:We(e,t),height:Ne(e,t)}}function We(e,t={}){return at(t,"width")?t.width:e.width}function Ne(e,t={}){return at(t,"height")?t.height:e.height}Q();var Ee={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]};Ee.td=Ee.th=[3,"<table><tbody><tr>","</tr></tbody></table>"];Ee.option=Ee.optgroup=[1,'<select multiple="multiple">',"</select>"];Ee.thead=Ee.tbody=Ee.colgroup=Ee.caption=Ee.tfoot=[1,"<table>","</table>"];Ee.polyline=Ee.ellipse=Ee.polygon=Ee.circle=Ee.text=Ee.line=Ee.path=Ee.rect=Ee.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function ee(e,t=globalThis.document){var f;if(typeof e!="string")throw new TypeError("String expected");let n=/^<!--(.*?)-->$/s.exec(e);if(n)return t.createComment(n[1]);let r=(f=/<([\w:]+)/.exec(e))==null?void 0:f[1];if(!r)return t.createTextNode(e);if(e=e.trim(),r==="body"){let h=t.createElement("html");h.innerHTML=e;let{lastChild:y}=h;return y.remove(),y}let[i,o,a]=Object.hasOwn(Ee,r)?Ee[r]:Ee._default,s=t.createElement("div");for(s.innerHTML=o+e+a;i--;)s=s.lastChild;if(s.firstChild===s.lastChild){let{firstChild:h}=s;return h.remove(),h}let c=t.createDocumentFragment();return c.append(...s.childNodes),c}function vu(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}function Pe(e,...t){let n=e.style;return P(t,function(r){r&&P(r,function(i,o){n[o]=i})}),e}function kn(e,t,n){return arguments.length==2?e.getAttribute(t):n===null?e.removeAttribute(t):(e.setAttribute(t,n),e)}var Eu=Object.prototype.toString;function Bt(e){return new At(e)}function At(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}At.prototype.add=function(e){return this.list.add(e),this};At.prototype.remove=function(e){return Eu.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)};At.prototype.removeMatching=function(e){let t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this};At.prototype.toggle=function(e,t){return typeof t!="undefined"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this};At.prototype.array=function(){return Array.from(this.list)};At.prototype.has=At.prototype.contains=function(e){return this.list.contains(e)};function Tn(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function bu(e,t,n){var r=n?e:e.parentNode;return r&&typeof r.closest=="function"&&r.closest(t)||null}function xu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pn={},oo;function wu(){if(oo)return Pn;oo=1;var e,t,n;function r(){e=window.addEventListener?"addEventListener":"attachEvent",t=window.removeEventListener?"removeEventListener":"detachEvent",n=e!=="addEventListener"?"on":""}return Pn.bind=function(i,o,a,s){return e||r(),i[e](n+o,a,s||!1),a},Pn.unbind=function(i,o,a,s){return t||r(),i[t](n+o,a,s||!1),a},Pn}var ao=wu(),_u=xu(ao),Mn=vu({__proto__:null,default:_u},[ao]),so=["focus","blur"];function Su(e,t,n,r,i){return so.indexOf(n)!==-1&&(i=!0),Mn.bind(e,n,function(o){var a=o.target||o.srcElement;o.delegateTarget=bu(a,t,!0),o.delegateTarget&&r.call(e,o)},i)}function Au(e,t,n,r){return so.indexOf(t)!==-1&&(r=!0),Mn.unbind(e,t,n,r)}var on={bind:Su,unbind:Au};function He(e,t){return t=t||document,t.querySelector(e)}function uo(e,t){return t=t||document,t.querySelectorAll(e)}function zt(e){e.parentNode&&e.parentNode.removeChild(e)}function Dn(e,t,n,r,i){var o=Vt();o.setTranslate(t,n);var a=Vt();a.setRotate(r||0,0,0);var s=Vt();s.setScale(i||1,i||1),Nt(e,[o,a,s])}function Nn(e,t,n){var r=Vt();r.setTranslate(t,n),Nt(e,r)}function lo(e,t){var n=Vt();n.setRotate(t,0,0),Nt(e,n)}function Ru(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mr={exports:{}},co;function Cu(){if(co)return Mr.exports;co=1;var e=Mr.exports=function(t,n){if(n||(n=16),t===void 0&&(t=128),t<=0)return"0";for(var r=Math.log(Math.pow(2,t))/Math.log(n),i=2;r===1/0;i*=2)r=Math.log(Math.pow(2,t/i))/Math.log(n)*i;for(var o=r-Math.floor(r),a="",i=0;i<Math.floor(r);i++){var s=Math.floor(Math.random()*n).toString(n);a=s+a}if(o){var c=Math.pow(n,o),s=Math.floor(Math.random()*c).toString(n);a=s+a}var f=parseInt(a,n);return f!==1/0&&f>=Math.pow(2,t)?e(t,n):a};return e.rack=function(t,n,r){var i=function(a){var s=0;do{if(s++>10)if(r)t+=r;else throw new Error("too many ID collisions, use more bits");var c=e(t,n)}while(Object.hasOwnProperty.call(o,c));return o[c]=a,c},o=i.hats={};return i.get=function(a){return i.hats[a]},i.set=function(a,s){return i.hats[a]=s,i},i.bits=t||128,i.base=n||16,i},Mr.exports}var Pu=Cu(),ku=Ru(Pu);function st(e){if(!(this instanceof st))return new st(e);e=e||[128,36,1],this._seed=e.length?ku.rack(e[0],e[1],e[2]):e}st.prototype.next=function(e){return this._seed(e||!0)};st.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n};st.prototype.claim=function(e,t){this._seed.set(e,t||!0)};st.prototype.assigned=function(e){return this._seed.get(e)||!1};st.prototype.unclaim=function(e){delete this._seed.hats[e]};st.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};var Tu=new st,Mu=10,Bn=3,Du=1.5,On=10,Nu=4,Ut=.95,Bu=1,Ou=.25;function gt(e,t,n,r,i,o,a){Xe.call(this,t,a);var s=e&&e.defaultFillColor,c=e&&e.defaultStrokeColor,f=e&&e.defaultLabelColor;function h(p){return n.computeStyle(p,{strokeLinecap:"round",strokeLinejoin:"round",stroke:Cn,strokeWidth:2,fill:"white"})}function y(p){return n.computeStyle(p,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:Cn,strokeWidth:2})}function v(p,l){var{ref:u={x:0,y:0},scale:m=1,element:d,parentGfx:E=i._svg}=l,S=ne("marker",{id:p,viewBox:"0 0 20 20",refX:u.x,refY:u.y,markerWidth:20*m,markerHeight:20*m,orient:"auto"});fe(S,d);var j=He(":scope > defs",E);j||(j=ne("defs"),fe(E,j)),fe(j,S)}function A(p,l,u,m){var d=Tu.nextPrefixed("marker-");return W(p,d,l,u,m),"url(#"+d+")"}function W(p,l,u,m,d){if(u==="sequenceflow-end"){var E=ne("path",{d:"M 1 5 L 11 10 L 1 15 Z",...h({fill:d,stroke:d,strokeWidth:1})});v(l,{element:E,ref:{x:11,y:10},scale:.5,parentGfx:p})}if(u==="messageflow-start"){var S=ne("circle",{cx:6,cy:6,r:3.5,...h({fill:m,stroke:d,strokeWidth:1,strokeDasharray:[1e4,1]})});v(l,{element:S,ref:{x:6,y:6},parentGfx:p})}if(u==="messageflow-end"){var j=ne("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...h({fill:m,stroke:d,strokeWidth:1,strokeDasharray:[1e4,1]})});v(l,{element:j,ref:{x:8.5,y:5},parentGfx:p})}if(u==="association-start"){var Y=ne("path",{d:"M 11 5 L 1 10 L 11 15",...y({fill:"none",stroke:d,strokeWidth:1.5,strokeDasharray:[1e4,1]})});v(l,{element:Y,ref:{x:1,y:10},scale:.5,parentGfx:p})}if(u==="association-end"){var ge=ne("path",{d:"M 1 5 L 11 10 L 1 15",...y({fill:"none",stroke:d,strokeWidth:1.5,strokeDasharray:[1e4,1]})});v(l,{element:ge,ref:{x:11,y:10},scale:.5,parentGfx:p})}if(u==="conditional-flow-marker"){var he=ne("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...h({fill:m,stroke:d})});v(l,{element:he,ref:{x:-1,y:10},scale:.5,parentGfx:p})}if(u==="conditional-default-flow-marker"){var we=ne("path",{d:"M 6 4 L 10 16",...h({stroke:d,fill:"none"})});v(l,{element:we,ref:{x:0,y:10},scale:.5,parentGfx:p})}}function L(p,l,u,m,d={}){_e(m)&&(d=m,m=0),m=m||0,d=h(d);var E=l/2,S=u/2,j=ne("circle",{cx:E,cy:S,r:Math.round((l+u)/4-m),...d});return fe(p,j),j}function O(p,l,u,m,d,E){_e(d)&&(E=d,d=0),d=d||0,E=h(E);var S=ne("rect",{x:d,y:d,width:l-d*2,height:u-d*2,rx:m,ry:m,...E});return fe(p,S),S}function H(p,l,u,m){var d=l/2,E=u/2,S=[{x:d,y:0},{x:l,y:E},{x:d,y:u},{x:0,y:E}],j=S.map(function(ge){return ge.x+","+ge.y}).join(" ");m=h(m);var Y=ne("polygon",{...m,points:j});return fe(p,Y),Y}function G(p,l,u,m){u=y(u);var d=qt(l,u,m);return fe(p,d),d}function T(p,l,u){return G(p,l,u,5)}function g(p,l,u){u=y(u);var m=ne("path",{...u,d:l});return fe(p,m),m}function w(p,l,u,m){return g(l,u,M({"data-marker":p},m))}function C(p){return je[p]}function V(p){return function(l,u,m){return C(p)(l,u,m)}}var b={"bpmn:MessageEventDefinition":function(p,l,u={},m){var d=r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:u.width||l.width,containerHeight:u.height||l.height,position:{mx:.235,my:.315}}),E=m?k(l,c,u.stroke):U(l,s,u.fill),S=m?U(l,s,u.fill):k(l,c,u.stroke),j=g(p,d,{fill:E,stroke:S,strokeWidth:1});return j},"bpmn:TimerEventDefinition":function(p,l,u={}){var m=u.width||l.width,d=u.height||l.height,E=u.width?1:2,S=L(p,m,d,.2*d,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:E}),j=r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:m,containerHeight:d,position:{mx:.5,my:.5}});g(p,j,{stroke:k(l,c,u.stroke),strokeWidth:E});for(var Y=0;Y<12;Y++){var ge=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:m,containerHeight:d,position:{mx:.5,my:.5}}),he=m/2,we=d/2;g(p,ge,{strokeWidth:1,stroke:k(l,c,u.stroke),transform:"rotate("+Y*30+","+we+","+he+")"})}return S},"bpmn:EscalationEventDefinition":function(p,l,u={},m){var d=r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width||l.width,containerHeight:u.height||l.height,position:{mx:.5,my:.2}}),E=m?k(l,c,u.stroke):U(l,s,u.fill);return g(p,d,{fill:E,stroke:k(l,c,u.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(p,l,u={}){var m=r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width||l.width,containerHeight:u.height||l.height,position:{mx:.5,my:.222}});return g(p,m,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(p,l,u={},m){var d=r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:.57,my:.263}}),E=m?k(l,c,u.stroke):U(l,s,u.fill);return g(p,d,{fill:E,stroke:k(l,c,u.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(p,l,u={},m){var d=r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:u.width||l.width,containerHeight:u.height||l.height,position:{mx:.2,my:.722}}),E=m?k(l,c,u.stroke):U(l,s,u.fill);return g(p,d,{fill:E,stroke:k(l,c,u.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(p,l,u={},m){var d=r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:.638,my:-.055}}),E=m?k(l,c,u.stroke):"none",S=g(p,d,{fill:E,stroke:k(l,c,u.stroke),strokeWidth:1});return lo(S,45),S},"bpmn:CompensateEventDefinition":function(p,l,u={},m){var d=r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width||l.width,containerHeight:u.height||l.height,position:{mx:.22,my:.5}}),E=m?k(l,c,u.stroke):U(l,s,u.fill);return g(p,d,{fill:E,stroke:k(l,c,u.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(p,l,u={},m){var d=r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:u.width||l.width,containerHeight:u.height||l.height,position:{mx:.5,my:.2}}),E=m?k(l,c,u.stroke):U(l,s,u.fill);return g(p,d,{strokeWidth:1,fill:E,stroke:k(l,c,u.stroke)})},"bpmn:MultipleEventDefinition":function(p,l,u={},m){var d=r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:u.width||l.width,containerHeight:u.height||l.height,position:{mx:.211,my:.36}}),E=m?k(l,c,u.stroke):U(l,s,u.fill);return g(p,d,{fill:E,stroke:k(l,c,u.stroke),strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(p,l,u={}){var m=r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:u.width||l.width,containerHeight:u.height||l.height,position:{mx:.458,my:.194}});return g(p,m,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(p,l,u={}){var m=L(p,l.width,l.height,8,{fill:k(l,c,u.stroke),stroke:k(l,c,u.stroke),strokeWidth:4});return m}};function D(p,l,u={},m){var d=oe(p),E=eo(d),S=m||p;return d.get("eventDefinitions")&&d.get("eventDefinitions").length>1?d.get("parallelMultiple")?b["bpmn:ParallelMultipleEventDefinition"](l,S,u,E):b["bpmn:MultipleEventDefinition"](l,S,u,E):rt(d,"bpmn:MessageEventDefinition")?b["bpmn:MessageEventDefinition"](l,S,u,E):rt(d,"bpmn:TimerEventDefinition")?b["bpmn:TimerEventDefinition"](l,S,u,E):rt(d,"bpmn:ConditionalEventDefinition")?b["bpmn:ConditionalEventDefinition"](l,S,u,E):rt(d,"bpmn:SignalEventDefinition")?b["bpmn:SignalEventDefinition"](l,S,u,E):rt(d,"bpmn:EscalationEventDefinition")?b["bpmn:EscalationEventDefinition"](l,S,u,E):rt(d,"bpmn:LinkEventDefinition")?b["bpmn:LinkEventDefinition"](l,S,u,E):rt(d,"bpmn:ErrorEventDefinition")?b["bpmn:ErrorEventDefinition"](l,S,u,E):rt(d,"bpmn:CancelEventDefinition")?b["bpmn:CancelEventDefinition"](l,S,u,E):rt(d,"bpmn:CompensateEventDefinition")?b["bpmn:CompensateEventDefinition"](l,S,u,E):rt(d,"bpmn:TerminateEventDefinition")?b["bpmn:TerminateEventDefinition"](l,S,u,E):null}var R={ParticipantMultiplicityMarker:function(p,l,u={}){var m=We(l,u),d=Ne(l,u),E=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:m,containerHeight:d,position:{mx:(m/2-6)/m,my:(d-15)/d}});w("participant-multiplicity",p,E,{strokeWidth:2,fill:U(l,s,u.fill),stroke:k(l,c,u.stroke)})},SubProcessMarker:function(p,l,u={}){var m=O(p,14,14,0,{strokeWidth:1,fill:U(l,s,u.fill),stroke:k(l,c,u.stroke)});Nn(m,l.width/2-7.5,l.height-20);var d=r.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:l.width,containerHeight:l.height,position:{mx:(l.width/2-7.5)/l.width,my:(l.height-20)/l.height}});w("sub-process",p,d,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke)})},ParallelMarker:function(p,l,u){var m=We(l,u),d=Ne(l,u),E=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:m,containerHeight:d,position:{mx:(m/2+u.parallel)/m,my:(d-20)/d}});w("parallel",p,E,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke)})},SequentialMarker:function(p,l,u){var m=r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:(l.width/2+u.seq)/l.width,my:(l.height-19)/l.height}});w("sequential",p,m,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke)})},CompensationMarker:function(p,l,u){var m=r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:(l.width/2+u.compensation)/l.width,my:(l.height-13)/l.height}});w("compensation",p,m,{strokeWidth:1,fill:U(l,s,u.fill),stroke:k(l,c,u.stroke)})},LoopMarker:function(p,l,u){var m=We(l,u),d=Ne(l,u),E=r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:m,containerHeight:d,position:{mx:(m/2+u.loop)/m,my:(d-7)/d}});w("loop",p,E,{strokeWidth:1.5,fill:"none",stroke:k(l,c,u.stroke),strokeMiterlimit:.5})},AdhocMarker:function(p,l,u){var m=We(l,u),d=Ne(l,u),E=r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:m,containerHeight:d,position:{mx:(m/2+u.adhoc)/m,my:(d-15)/d}});w("adhoc",p,E,{strokeWidth:1,fill:k(l,c,u.stroke),stroke:k(l,c,u.stroke)})}};function F(p,l,u,m){R[p](l,u,m)}function B(p,l,u=[],m={}){m={fill:m.fill,stroke:m.stroke,width:We(l,m),height:Ne(l,m)};var d=oe(l),E=u.includes("SubProcessMarker");E?m={...m,seq:-21,parallel:-22,compensation:-25,loop:-18,adhoc:10}:m={...m,seq:-5,parallel:-6,compensation:-7,loop:0,adhoc:-8},d.get("isForCompensation")&&u.push("CompensationMarker"),N(d,"bpmn:AdHocSubProcess")&&(u.push("AdhocMarker"),E||M(m,{compensation:m.compensation-18}));var S=d.get("loopCharacteristics"),j=S&&S.get("isSequential");S&&(M(m,{compensation:m.compensation-18}),u.includes("AdhocMarker")&&M(m,{seq:-23,loop:-18,parallel:-24}),j===void 0&&u.push("LoopMarker"),j===!1&&u.push("ParallelMarker"),j===!0&&u.push("SequentialMarker")),u.includes("CompensationMarker")&&u.length===1&&M(m,{compensation:-8}),P(u,function(Y){F(Y,p,l,m)})}function I(p,l,u={}){u=M({size:{width:100}},u);var m=o.createText(l||"",u);return qe(m).add("djs-label"),fe(p,m),m}function K(p,l,u,m={}){var d=oe(l),E=Ht({x:l.x,y:l.y,width:l.width,height:l.height},m);return I(p,d.name,{align:u,box:E,padding:7,style:{fill:Wt(l,f,c,m.stroke)}})}function ot(p,l,u={}){var m={width:l.width,height:l.height,x:l.width/2+l.x,y:l.height/2+l.y};return I(p,$t(l),{box:m,style:M({},o.getExternalStyle(),{fill:Wt(l,f,c,u.stroke)})})}function ae(p,l,u,m={}){var d=Er(u),E=I(p,l,{box:{height:30,width:d?Ne(u,m):We(u,m)},align:"center-middle",style:{fill:Wt(u,f,c,m.stroke)}});if(d){var S=-1*Ne(u,m);Dn(E,0,-S,270)}}function Z(p,l,u={}){var{width:m,height:d}=Ht(l,u);return O(p,m,d,On,{...u,fill:U(l,s,u.fill),fillOpacity:Ut,stroke:k(l,c,u.stroke)})}function Je(p,l,u={}){var m=oe(l),d=U(l,s,u.fill),E=k(l,c,u.stroke);return(m.get("associationDirection")==="One"||m.get("associationDirection")==="Both")&&(u.markerEnd=A(p,"association-end",d,E)),m.get("associationDirection")==="Both"&&(u.markerStart=A(p,"association-start",d,E)),u=X(u,["markerStart","markerEnd"]),T(p,l.waypoints,{...u,stroke:E,strokeDasharray:"0, 5"})}function et(p,l,u={}){var m=U(l,s,u.fill),d=k(l,c,u.stroke),E=r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:.474,my:.296}}),S=g(p,E,{fill:m,fillOpacity:Ut,stroke:d}),j=oe(l);if(to(j)){var Y=r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:.33,my:(l.height-18)/l.height}});g(p,Y,{strokeWidth:2,fill:m,stroke:d})}return S}function ye(p,l,u={}){return L(p,l.width,l.height,{fillOpacity:Ut,...u,fill:U(l,s,u.fill),stroke:k(l,c,u.stroke)})}function Ge(p,l,u={}){return H(p,l.width,l.height,{fill:U(l,s,u.fill),fillOpacity:Ut,stroke:k(l,c,u.stroke)})}function x(p,l,u={}){var m=O(p,We(l,u),Ne(l,u),0,{fill:U(l,s,u.fill),fillOpacity:u.fillOpacity||Ut,stroke:k(l,c,u.stroke),strokeWidth:1.5}),d=oe(l);if(N(d,"bpmn:Lane")){var E=d.get("name");ae(p,E,l,u)}return m}function _(p,l,u={}){var m=Z(p,l,u),d=dt(l);if($i(l)&&(te(m,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!d)){var E=oe(l).flowElements||[],S=E.filter(j=>N(j,"bpmn:StartEvent"));S.length===1&&$(S[0],p,u,l)}return K(p,l,d?"center-top":"center-middle",u),d?B(p,l,void 0,u):B(p,l,["SubProcessMarker"],u),m}function $(p,l,u,m){var d=22,E={fill:U(m,s,u.fill),stroke:k(m,c,u.stroke),width:d,height:d},S=oe(p).isInterrupting,j=S?0:3,Y=S?1:1.2,ge=20,he=(d-ge)/2,we="translate("+he+","+he+")";L(l,ge,ge,{fill:E.fill,stroke:E.stroke,strokeWidth:Y,strokeDasharray:j,transform:we}),D(p,l,E,m)}function re(p,l,u={}){var m=Z(p,l,u);return K(p,l,"center-middle",u),B(p,l,void 0,u),m}var je=this.handlers={"bpmn:AdHocSubProcess":function(p,l,u={}){return dt(l)?u=X(u,["fill","stroke","width","height"]):u=X(u,["fill","stroke"]),_(p,l,u)},"bpmn:Association":function(p,l,u={}){return u=X(u,["fill","stroke"]),Je(p,l,u)},"bpmn:BoundaryEvent":function(p,l,u={}){var{renderIcon:m=!0}=u;u=X(u,["fill","stroke"]);var d=oe(l),E=d.get("cancelActivity");u={strokeWidth:1.5,fill:U(l,s,u.fill),fillOpacity:Bu,stroke:k(l,c,u.stroke)},E||(u.strokeDasharray="6");var S=ye(p,l,u);return L(p,l.width,l.height,Bn,{...u,fill:"none"}),m&&D(l,p,u),S},"bpmn:BusinessRuleTask":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=re(p,l,u),d=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),E=g(p,d);te(E,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:1});var S=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),j=g(p,S);return te(j,{fill:k(l,c,u.stroke),stroke:k(l,c,u.stroke),strokeWidth:1}),m},"bpmn:CallActivity":function(p,l,u={}){return u=X(u,["fill","stroke"]),_(p,l,{strokeWidth:5,...u})},"bpmn:ComplexGateway":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=Ge(p,l,u),d=r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:l.width,containerHeight:l.height,position:{mx:.46,my:.26}});return g(p,d,{fill:k(l,c,u.stroke),stroke:k(l,c,u.stroke),strokeWidth:1}),m},"bpmn:DataInput":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=r.getRawPath("DATA_ARROW"),d=et(p,l,u);return g(p,m,{fill:"none",stroke:k(l,c,u.stroke),strokeWidth:1}),d},"bpmn:DataInputAssociation":function(p,l,u={}){return u=X(u,["fill","stroke"]),Je(p,l,{...u,markerEnd:A(p,"association-end",U(l,s,u.fill),k(l,c,u.stroke))})},"bpmn:DataObject":function(p,l,u={}){return u=X(u,["fill","stroke"]),et(p,l,u)},"bpmn:DataObjectReference":V("bpmn:DataObject"),"bpmn:DataOutput":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=r.getRawPath("DATA_ARROW"),d=et(p,l,u);return g(p,m,{strokeWidth:1,fill:k(l,c,u.stroke),stroke:k(l,c,u.stroke)}),d},"bpmn:DataOutputAssociation":function(p,l,u={}){return u=X(u,["fill","stroke"]),Je(p,l,{...u,markerEnd:A(p,"association-end",U(l,s,u.fill),k(l,c,u.stroke))})},"bpmn:DataStoreReference":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:0,my:.133}});return g(p,m,{fill:U(l,s,u.fill),fillOpacity:Ut,stroke:k(l,c,u.stroke),strokeWidth:2})},"bpmn:EndEvent":function(p,l,u={}){var{renderIcon:m=!0}=u;u=X(u,["fill","stroke"]);var d=ye(p,l,{...u,strokeWidth:4});return m&&D(l,p,u),d},"bpmn:EventBasedGateway":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=oe(l),d=Ge(p,l,u);L(p,l.width,l.height,l.height*.2,{fill:U(l,"none",u.fill),stroke:k(l,c,u.stroke),strokeWidth:1});var E=m.get("eventGatewayType"),S=!!m.get("instantiate");function j(){var ge=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:l.width,containerHeight:l.height,position:{mx:.36,my:.44}});g(p,ge,{fill:"none",stroke:k(l,c,u.stroke),strokeWidth:2})}if(E==="Parallel"){var Y=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:l.width,containerHeight:l.height,position:{mx:.474,my:.296}});g(p,Y,{fill:"none",stroke:k(l,c,u.stroke),strokeWidth:1})}else E==="Exclusive"&&(S||L(p,l.width,l.height,l.height*.26,{fill:"none",stroke:k(l,c,u.stroke),strokeWidth:1}),j());return d},"bpmn:ExclusiveGateway":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=Ge(p,l,u),d=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:l.width,containerHeight:l.height,position:{mx:.32,my:.3}}),E=Ze(l);return E.get("isMarkerVisible")&&g(p,d,{fill:k(l,c,u.stroke),stroke:k(l,c,u.stroke),strokeWidth:1}),m},"bpmn:Gateway":function(p,l,u={}){return u=X(u,["fill","stroke"]),Ge(p,l,u)},"bpmn:Group":function(p,l,u={}){return u=X(u,["fill","stroke","width","height"]),O(p,l.width,l.height,On,{stroke:k(l,c,u.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:We(l,u),height:Ne(l,u)})},"bpmn:InclusiveGateway":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=Ge(p,l,u);return L(p,l.width,l.height,l.height*.24,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:2.5}),m},"bpmn:IntermediateEvent":function(p,l,u={}){var{renderIcon:m=!0}=u;u=X(u,["fill","stroke"]);var d=ye(p,l,{...u,strokeWidth:1.5});return L(p,l.width,l.height,Bn,{fill:"none",stroke:k(l,c,u.stroke),strokeWidth:1.5}),m&&D(l,p,u),d},"bpmn:IntermediateCatchEvent":V("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":V("bpmn:IntermediateEvent"),"bpmn:Lane":function(p,l,u={}){return u=X(u,["fill","stroke","width","height"]),x(p,l,{...u,fillOpacity:Ou})},"bpmn:ManualTask":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=re(p,l,u),d=r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return g(p,d,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:.5}),m},"bpmn:MessageFlow":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=oe(l),d=Ze(l),E=U(l,s,u.fill),S=k(l,c,u.stroke),j=T(p,l.waypoints,{markerEnd:A(p,"messageflow-end",E,S),markerStart:A(p,"messageflow-start",E,S),stroke:S,strokeDasharray:"10, 11",strokeWidth:1.5});if(m.get("messageRef")){var Y=j.getPointAtLength(j.getTotalLength()/2),ge=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:Y.x,y:Y.y}}),he={strokeWidth:1};d.get("messageVisibleKind")==="initiating"?(he.fill=E,he.stroke=S):(he.fill=S,he.stroke=E);var we=g(p,ge,he),Ke=m.get("messageRef"),ie=Ke.get("name"),mt=I(p,ie,{align:"center-top",fitBox:!0,style:{fill:S}}),gn=we.getBBox(),$e=mt.getBBox(),z=Y.x-$e.width/2,J=Y.y+gn.height/2+Mu;Dn(mt,z,J,0)}return j},"bpmn:ParallelGateway":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=Ge(p,l,u),d=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:l.width,containerHeight:l.height,position:{mx:.46,my:.2}});return g(p,d,{fill:k(l,c,u.stroke),stroke:k(l,c,u.stroke),strokeWidth:1}),m},"bpmn:Participant":function(p,l,u={}){u=X(u,["fill","stroke","width","height"]);var m=x(p,l,u),d=dt(l),E=Er(l),S=oe(l),j=S.get("name");if(d){var Y=E?[{x:30,y:0},{x:30,y:Ne(l,u)}]:[{x:0,y:30},{x:We(l,u),y:30}];G(p,Y,{stroke:k(l,c,u.stroke),strokeWidth:Du}),ae(p,j,l,u)}else{var ge=Ht(l,u);E||(ge.height=We(l,u),ge.width=Ne(l,u));var he=I(p,j,{box:ge,align:"center-middle",style:{fill:Wt(l,f,c,u.stroke)}});if(!E){var we=-1*Ne(l,u);Dn(he,0,-we,270)}}return S.get("participantMultiplicity")&&F("ParticipantMultiplicityMarker",p,l,u),m},"bpmn:ReceiveTask":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=oe(l),d=re(p,l,u),E;return m.get("instantiate")?(L(p,28,28,20*.22,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:1}),E=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):E=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),g(p,E,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:1}),d},"bpmn:ScriptTask":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=re(p,l,u),d=r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return g(p,d,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:1}),m},"bpmn:SendTask":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=re(p,l,u),d=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return g(p,d,{fill:k(l,c,u.stroke),stroke:U(l,s,u.fill),strokeWidth:1}),m},"bpmn:SequenceFlow":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=U(l,s,u.fill),d=k(l,c,u.stroke),E=T(p,l.waypoints,{markerEnd:A(p,"sequenceflow-end",m,d),stroke:d}),S=oe(l),{source:j}=l;if(j){var Y=oe(j);S.get("conditionExpression")&&N(Y,"bpmn:Activity")&&te(E,{markerStart:A(p,"conditional-flow-marker",m,d)}),Y.get("default")&&(N(Y,"bpmn:Gateway")||N(Y,"bpmn:Activity"))&&Y.get("default")===S&&te(E,{markerStart:A(p,"conditional-default-flow-marker",m,d)})}return E},"bpmn:ServiceTask":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=re(p,l,u);L(p,10,10,{fill:U(l,s,u.fill),stroke:"none",transform:"translate(6, 6)"});var d=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});g(p,d,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:1}),L(p,10,10,{fill:U(l,s,u.fill),stroke:"none",transform:"translate(11, 10)"});var E=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return g(p,E,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:1}),m},"bpmn:StartEvent":function(p,l,u={}){var{renderIcon:m=!0}=u;u=X(u,["fill","stroke"]);var d=oe(l);d.get("isInterrupting")||(u={...u,strokeDasharray:"6"});var E=ye(p,l,u);return m&&D(l,p,u),E},"bpmn:SubProcess":function(p,l,u={}){return dt(l)?u=X(u,["fill","stroke","width","height"]):u=X(u,["fill","stroke"]),_(p,l,u)},"bpmn:Task":function(p,l,u={}){return u=X(u,["fill","stroke"]),re(p,l,u)},"bpmn:TextAnnotation":function(p,l,u={}){u=X(u,["fill","stroke"]);var{width:m,height:d}=Ht(l,u),E=O(p,m,d,0,0,{fill:"none",stroke:"none"}),S=r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:m,containerHeight:d,position:{mx:0,my:0}});g(p,S,{stroke:k(l,c,u.stroke)});var j=oe(l),Y=j.get("text")||"";return I(p,Y,{align:"left-top",box:Ht(l,u),padding:An,style:{fill:Wt(l,f,c,u.stroke)}}),E},"bpmn:Transaction":function(p,l,u={}){dt(l)?u=X(u,["fill","stroke","width","height"]):u=X(u,["fill","stroke"]);var m=_(p,l,{strokeWidth:1.5,...u}),d=n.style(["no-fill","no-events"],{stroke:k(l,c,u.stroke),strokeWidth:1.5}),E=dt(l);return E||(u={}),O(p,We(l,u),Ne(l,u),On-Bn,Bn,d),m},"bpmn:UserTask":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=re(p,l,u),d=15,E=12,S=r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:d,y:E}});g(p,S,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:.5});var j=r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:d,y:E}});g(p,j,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:.5});var Y=r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:d,y:E}});return g(p,Y,{fill:k(l,c,u.stroke),stroke:k(l,c,u.stroke),strokeWidth:.5}),m},label:function(p,l,u={}){return ot(p,l,u)}};this._drawPath=g,this._renderer=C}Ce(gt,Xe);gt.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"];gt.prototype.canRender=function(e){return N(e,"bpmn:BaseElement")};gt.prototype.drawShape=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)};gt.prototype.drawConnection=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)};gt.prototype.getShapePath=function(e){return br(e)?Tr(e,Nu):N(e,"bpmn:Event")?no(e):N(e,"bpmn:Activity")?Tr(e,On):N(e,"bpmn:Gateway")?ro(e):io(e)};function X(e,t=[]){return t.reduce((n,r)=>(e[r]&&(n[r]=e[r]),n),{})}Q();Q();var Lu=0,Iu={width:150,height:50};function Fu(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function ju(e){return _e(e)?M({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}var Dr=null;function $u(){return Dr||(Dr=document.createElement("canvas").getContext("2d")),Dr}function Vu(e){var t=[];return e.fontStyle&&t.push(e.fontStyle),e.fontVariant&&t.push(e.fontVariant),e.fontWeight&&t.push(e.fontWeight),e.fontStretch&&t.push(e.fontStretch),t.push(po(e.fontSize)||"12px"),t.push(e.fontFamily||"sans-serif"),t.join(" ")}function po(e){if(e!=null)return typeof e=="number"||/^-?\d+(\.\d+)?$/.test(e)?e+"px":e}function qu(e,t){var n=$u();if(!n)return{width:0,height:0};n.font=Vu(t),"letterSpacing"in n&&(n.letterSpacing=po(t.letterSpacing)||"0px");var r=e==="",i=r?"dummy":e.replace(/\s+$/,""),o=n.measureText(i);return{width:r?0:o.width,height:"fontBoundingBoxAscent"in o?o.fontBoundingBoxAscent+o.fontBoundingBoxDescent:o.actualBoundingBoxAscent+o.actualBoundingBoxDescent}}function Wu(e,t,n){for(var r=e.shift(),i=r,o;;){if(o=qu(i,n),o.width=i?o.width:0,i===" "||i===""||o.width<Math.round(t)||i.length<2)return Hu(e,i,r,o);i=Uu(i,o.width,t)}}function Hu(e,t,n,r){if(t.length<n.length){var i=n.slice(t.length).trim();e.unshift(i)}return{width:r.width,height:r.height,text:t}}var fo="\xAD";function zu(e,t){var n=e.split(/(\s|-|\u00AD)/g),r,i=[],o=0;if(n.length>1)for(;r=n.shift();)if(r.length+o<t)i.push(r),o+=r.length;else{(r==="-"||r===fo)&&i.pop();break}var a=i[i.length-1];return a&&a===fo&&(i[i.length-1]="-"),i.join("")}function Uu(e,t,n){var r=Math.max(e.length*(n/t),1),i=zu(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function Gt(e){this._config=M({},{size:Iu,padding:Lu,style:{},align:"center-top"},e||{})}Gt.prototype.createText=function(e,t){return this.layoutText(e,t).element};Gt.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions};Gt.prototype.layoutText=function(e,t){for(var n=M({},this._config.size,t.box),r=M({},this._config.style,t.style),i=Fu(t.align||this._config.align),o=ju(t.padding!==void 0?t.padding:this._config.padding),a=t.fitBox||!1,s=Gu(r),c=e.split(/\u00AD?\r?\n/),f=[],h=n.width-o.left-o.right;c.length;)f.push(Wu(c,h,r));i.vertical==="middle"&&(o.top=o.bottom=0);var y=Ve(f,function(O,H,G){return O+(s||H.height)},0)+o.top+o.bottom,v=Ve(f,function(O,H,G){return H.width>O?H.width:O},0),A=o.top;i.vertical==="middle"&&(A+=(n.height-y)/2),A-=(s||f[0].height)/4;var W=ne("text");te(W,r),P(f,function(O){var H;switch(A+=s||O.height,i.horizontal){case"left":H=o.left;break;case"right":H=(a?v:h)-o.right-O.width;break;default:H=Math.max(((a?v:h)-O.width)/2+o.left,0)}var G=ne("tspan");te(G,{x:H,y:A}),G.textContent=O.text,fe(W,G)});var L={width:v,height:y};return{dimensions:L,element:W}};function Gu(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var Ku=12,Yu=1.2,Xu=40;function Ln(e){var t=M({fontFamily:"Arial, sans-serif",fontSize:Ku,fontWeight:"normal",lineHeight:Yu},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=M({},t,{fontSize:n},e&&e.externalStyle||{}),i=new Gt({style:t});this.getExternalLabelBounds=function(a,s){var c={width:Math.max(a.width,jt.width),height:30},f=o(s,c,{style:r});return{x:Math.round(a.x+a.width/2-f.width/2),y:a.y,width:Math.ceil(f.width),height:Math.ceil(f.height)}},this.getTextAnnotationBounds=function(a,s){var c=o(s,a,{style:t,align:"left-top",padding:An});return{x:a.x,y:a.y,width:a.width,height:Math.max(Xu,Math.round(c.height))}},this.getDimensions=function(a,s){return i.getDimensions(a,s||{})};function o(a,s,c){return i.getDimensions(a,M({box:s},c))}this.createText=function(a,s){return i.createText(a,s||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}Ln.$inject=["config.textRenderer"];function Nr(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(t){return this.pathMap[t].d},this.getScaledPath=function(t,n){var r=this.pathMap[t],i,o;n.abspos?(i=n.abspos.x,o=n.abspos.y):(i=n.containerWidth*n.position.mx,o=n.containerHeight*n.position.my);var a={};if(n.position){for(var s=n.containerHeight/r.height*n.yScaleFactor,c=n.containerWidth/r.width*n.xScaleFactor,f=0;f<r.heightElements.length;f++)a["y"+f]=r.heightElements[f]*s;for(var h=0;h<r.widthElements.length;h++)a["x"+h]=r.widthElements[h]*c}var y=el(r.d,{mx:i,my:o,e:a});return y}}var Zu=/\{([^{}]+)\}/g,Qu=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function Ju(e,t,n){var r=n;return t.replace(Qu,function(i,o,a,s,c){o=o||s,r&&(o in r&&(r=r[o]),typeof r=="function"&&c&&(r=r()))}),r=(r==null||r==n?e:r)+"",r}function el(e,t){return String(e).replace(Zu,function(n,r){return Ju(n,r,t)})}var ho={__init__:["bpmnRenderer"],bpmnRenderer:["type",gt],textRenderer:["type",Ln],pathMap:["type",Nr]};function Br(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(n,r){return t[r]||"{"+r+"}"})}var In={translate:["value",Br]};Q();var an=Math,Hm=an.PI,zm=an.min,Um=an.max,Gm=an.pow,Km=an.abs;function tl(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function sn(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function mo(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function nl(e){return tl({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function rl(e){for(var t=e.waypoints,n=t.reduce(function(f,h,y){var v=t[y-1];if(v){var A=f[f.length-1],W=A&&A.endLength||0,L=il(v,h);f.push({start:v,end:h,startLength:W,endLength:W+L,length:L})}return f},[]),r=n.reduce(function(f,h){return f+h.length},0),i=r/2,o=0,a=n[o];a.endLength<i;)a=n[++o];var s=(i-a.startLength)/a.length,c={x:a.start.x+(a.end.x-a.start.x)*s,y:a.start.y+(a.end.y-a.start.y)*s};return c}function Fn(e){return Vi(e)?rl(e):nl(e)}function il(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Se(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function jn(e,t,n){return M({id:e.id,type:e.$type,businessObject:e,di:t},n)}function ol(e,t,n){var r=e.waypoint;return!r||r.length<2?[Fn(t),Fn(n)]:r.map(function(i){return{x:i.x,y:i.y}})}function yo(e,t,n){return new Error(`element ${Se(t)} referenced by ${Se(e)}#${n} not yet drawn`)}function it(e,t,n,r,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._textRenderer=i}it.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"];it.prototype.add=function(e,t,n){var r,i,o;if(N(t,"bpmndi:BPMNPlane")){var a=N(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};r=this._elementFactory.createRoot(jn(e,t,a)),this._canvas.addRootElement(r)}else if(N(t,"bpmndi:BPMNShape")){var s=!dt(e,t),c=sl(e);i=n&&(n.hidden||n.collapsed);var f=t.bounds;r=this._elementFactory.createShape(jn(e,t,{collapsed:s,hidden:i,x:Math.round(f.x),y:Math.round(f.y),width:Math.round(f.width),height:Math.round(f.height),isFrame:c})),N(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,r),N(e,"bpmn:Lane")&&(o=0),N(e,"bpmn:DataStoreReference")&&(al(n,Fn(f))||(n=this._canvas.findRoot(n))),this._canvas.addShape(r,n,o)}else if(N(t,"bpmndi:BPMNEdge")){var h=this._getSource(e),y=this._getTarget(e);i=n&&(n.hidden||n.collapsed),r=this._elementFactory.createConnection(jn(e,t,{hidden:i,source:h,target:y,waypoints:ol(t,h,y)})),N(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(r,n,o)}else throw new Error(`unknown di ${Se(t)} for element ${Se(e)}`);return Wi(e)&&$t(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r};it.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${Se(e)}#attachedToRef`);var r=this._elementRegistry.get(n.id),i=r&&r.attachers;if(!r)throw yo(e,n,"attachedToRef");t.host=r,i||(r.attachers=i=[]),i.indexOf(t)===-1&&i.push(t)};it.prototype.addLabel=function(e,t,n){var r,i,o;return r=Hi(t,n),i=$t(n),i&&(r=this._textRenderer.getExternalLabelBounds(r,i)),o=this._elementFactory.createLabel(jn(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!$t(n),x:Math.round(r.x),y:Math.round(r.y),width:Math.round(r.width),height:Math.round(r.height)})),this._canvas.addShape(o,n.parent)};it.prototype._getConnectedElement=function(e,t){var n,r,i=e.$type;if(r=e[t+"Ref"],t==="source"&&i==="bpmn:DataInputAssociation"&&(r=r&&r[0]),(t==="source"&&i==="bpmn:DataOutputAssociation"||t==="target"&&i==="bpmn:DataInputAssociation")&&(r=e.$parent),n=r&&this._getElement(r),n)return n;throw r?yo(e,r,t+"Ref"):new Error(`${Se(e)}#${t} Ref not specified`)};it.prototype._getSource=function(e){return this._getConnectedElement(e,"source")};it.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")};it.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};function al(e,t){var n=t.x,r=t.y;return n>=e.x&&n<=e.x+e.width&&r>=e.y&&r<=e.y+e.height}function sl(e){return N(e,"bpmn:Group")}var go={__depends__:[In],bpmnImporter:["type",it]};var vo={__depends__:[ho,go]};Q();function $n(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(Math.random()*1e9)+"-"}$n.prototype.next=function(){return this._prefix+ ++this._counter};var ul=new $n("ov"),ll=500;function be(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=ul,this._overlayDefaults=M({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=cl(n.getContainer()),this._init()}be.$inject=["config.overlays","eventBus","canvas","elementRegistry"];be.prototype.get=function(e){if(De(e)&&(e={id:e}),De(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?nt(t.overlays,xn({type:e.type})):t.overlays.slice():[]}else return e.type?nt(this._overlays,xn({type:e.type})):e.id?this._overlays[e.id]:null};be.prototype.add=function(e,t,n){if(_e(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var r=this._ids.next();return n=M({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r};be.prototype.remove=function(e){var t=this.get(e)||[];xe(t)||(t=[t]);var n=this;P(t,function(r){var i=n._getOverlayContainer(r.element,!0);if(r&&(zt(r.html),zt(r.htmlContainer),delete r.htmlContainer,delete r.element,delete n._overlays[r.id]),i){var o=i.overlays.indexOf(r);o!==-1&&i.overlays.splice(o,1)}})};be.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"};be.prototype.show=function(){Vn(this._overlayRoot)};be.prototype.hide=function(){Vn(this._overlayRoot,!1)};be.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Tn(this._overlayRoot)};be.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,r=t.x,i=t.y;if(t.waypoints){var o=Mt(t);r=o.x,i=o.y}Eo(n,r,i),kn(e.html,"data-container-id",t.id)};be.prototype._updateOverlay=function(e){var t=e.position,n=e.htmlContainer,r=e.element,i=t.left,o=t.top;if(t.right!==void 0){var a;r.waypoints?a=Mt(r).width:a=r.width,i=t.right*-1+a}if(t.bottom!==void 0){var s;r.waypoints?s=Mt(r).height:s=r.height,o=t.bottom*-1+s}Eo(n,i||0,o||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())};be.prototype._createOverlayContainer=function(e){var t=ee('<div class="djs-overlays" />');Pe(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n};be.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";bo(this._overlayRoot,n)};be.prototype._getOverlayContainer=function(e,t){var n=ve(this._overlayContainers,function(r){return r.element===e});return!n&&!t?this._createOverlayContainer(e):n};be.prototype._addOverlay=function(e){var t=e.id,n=e.element,r=e.html,i,o;r.get&&r.constructor.prototype.jquery&&(r=r.get(0)),De(r)&&(r=ee(r)),o=this._getOverlayContainer(n),i=ee('<div class="djs-overlay" data-overlay-id="'+t+'">'),Pe(i,{position:"absolute"}),i.appendChild(r),e.type&&Bt(i).add("djs-overlay-"+e.type);var a=this._canvas.findRoot(n),s=this._canvas.getRootElement();Vn(i,a===s),e.htmlContainer=i,o.overlays.push(e),o.html.appendChild(i),this._overlays[t]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())};be.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,r=this._canvas.findRoot(e.element),i=n&&n.minZoom,o=n&&n.maxZoom,a=e.htmlContainer,s=this._canvas.getRootElement(),c=!0;(r!==s||n&&(wt(i)&&i>t.scale||wt(o)&&o<t.scale))&&(c=!1),Vn(a,c),this._updateOverlayScale(e,t)};be.prototype._updateOverlayScale=function(e,t){var n=e.scale,r,i,o=e.htmlContainer,a,s="";n!==!0&&(n===!1?(r=1,i=1):(r=n.min,i=n.max),wt(r)&&t.scale<r&&(a=(1/t.scale||1)*r),wt(i)&&t.scale>i&&(a=(1/t.scale||1)*i)),wt(a)&&(s="scale("+a+","+a+")"),bo(o,s)};be.prototype._updateOverlaysVisibilty=function(e){var t=this;P(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})};be.prototype._init=function(){var e=this._eventBus,t=this;function n(r){t._updateRoot(r),t._updateOverlaysVisibilty(r),t.show()}e.on("canvas.viewbox.changing",function(r){t.hide()}),e.on("canvas.viewbox.changed",function(r){n(r.viewbox)}),e.on(["shape.remove","connection.remove"],function(r){var i=r.element,o=t.get({element:i});P(o,function(c){t.remove(c.id)});var a=t._getOverlayContainer(i);if(a){zt(a.html);var s=t._overlayContainers.indexOf(a);s!==-1&&t._overlayContainers.splice(s,1)}}),e.on("element.changed",ll,function(r){var i=r.element,o=t._getOverlayContainer(i,!0);o&&(P(o.overlays,function(a){t._updateOverlay(a)}),t._updateOverlayContainer(o))}),e.on("element.marker.update",function(r){var i=t._getOverlayContainer(r.element,!0);i&&Bt(i.html)[r.add?"add":"remove"](r.marker)}),e.on("root.set",function(){t._updateOverlaysVisibilty(t._canvas.viewbox())}),e.on("diagram.clear",this.clear,this)};function cl(e){var t=ee('<div class="djs-overlay-container" />');return Pe(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}function Eo(e,t,n){Pe(e,{left:t+"px",top:n+"px"})}function Vn(e,t){e.style.display=t===!1?"none":""}function bo(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}var qn={__init__:["overlays"],overlays:["type",be]};function Wn(e,t,n,r){e.on("element.changed",function(i){var o=i.element;(o.parent||o===t.getRootElement())&&(i.gfx=n.getGraphics(o)),i.gfx&&e.fire(_n(o)+".changed",i)}),e.on("elements.changed",function(i){var o=i.elements;o.forEach(function(a){e.fire("element.changed",{element:a})}),r.updateContainments(o)}),e.on("shape.changed",function(i){r.update("shape",i.element,i.gfx)}),e.on("connection.changed",function(i){r.update("connection",i.element,i.gfx)})}Wn.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var xo={__init__:["changeSupport"],changeSupport:["type",Wn]};Q();var fl=1e3;function Ae(e){this._eventBus=e}Ae.$inject=["eventBus"];function pl(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}Ae.prototype.on=function(e,t,n,r,i,o){if((tt(t)||Me(t))&&(o=i,i=r,r=n,n=t,t=null),tt(n)&&(o=i,i=r,r=n,n=fl),_e(i)&&(o=i,i=!1),!tt(r))throw new Error("handlerFn must be a function");xe(e)||(e=[e]);var a=this._eventBus;P(e,function(s){var c=["commandStack",s,t].filter(function(f){return f}).join(".");a.on(c,n,i?pl(r,o):r,o)})};Ae.prototype.canExecute=vt("canExecute");Ae.prototype.preExecute=vt("preExecute");Ae.prototype.preExecuted=vt("preExecuted");Ae.prototype.execute=vt("execute");Ae.prototype.executed=vt("executed");Ae.prototype.postExecute=vt("postExecute");Ae.prototype.postExecuted=vt("postExecuted");Ae.prototype.revert=vt("revert");Ae.prototype.reverted=vt("reverted");function vt(e){return function(n,r,i,o,a){(tt(n)||Me(n))&&(a=o,o=i,i=r,r=n,n=null),this.on(n,e,r,i,o,a)}}function un(e,t){t.invoke(Ae,this),this.executed(function(n){var r=n.context;r.rootElement?e.setRootElement(r.rootElement):r.rootElement=e.getRootElement()}),this.revert(function(n){var r=n.context;r.rootElement&&e.setRootElement(r.rootElement)})}Ce(un,Ae);un.$inject=["canvas","injector"];var wo={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",un]};Q();var hl={"&":"&","<":"<",">":">",'"':""","'":"'"};function Et(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return hl[t]})}var ml="_plane";function ln(e){var t=e.id;return N(e,"bpmn:SubProcess")?dl(t):t}function dl(e){return e+ml}var yl="bjs-breadcrumbs-shown";function Hn(e,t,n){var r=ee('<ul class="bjs-breadcrumbs"></ul>'),i=n.getContainer(),o=Bt(i);i.appendChild(r);var a=[];e.on("element.changed",function(c){var f=c.element,h=oe(f),y=ve(a,function(v){return v===h});y&&s()});function s(c){c&&(a=gl(c));var f=a.flatMap(function(y){var v=n.findRoot(ln(y))||n.findRoot(y.id);if(!v&&N(y,"bpmn:Process")){var A=t.find(function(O){var H=oe(O);return H&&H.get("processRef")===y});v=A&&n.findRoot(A.id)}if(!v)return[];var W=Et(y.name||y.id),L=ee('<li><span class="bjs-crumb"><a title="'+W+'">'+W+"</a></span></li>");return L.addEventListener("click",function(){n.setRootElement(v)}),L});r.innerHTML="";var h=f.length>1;o.toggle(yl,h),f.forEach(function(y){r.appendChild(y)})}e.on("root.set",function(c){s(c.element)})}Hn.$inject=["eventBus","elementRegistry","canvas"];function gl(e){for(var t=oe(e),n=[],r=t;r;r=r.$parent)(N(r,"bpmn:SubProcess")||N(r,"bpmn:Process"))&&n.push(r);return n.reverse()}function zn(e,t){var n=null,r=new vl;e.on("root.set",function(i){var o=i.element,a=t.viewbox(),s=r.get(o);if(r.set(n,{x:a.x,y:a.y,zoom:a.scale}),n=o,!(!N(o,"bpmn:SubProcess")&&!s)){s=s||{x:0,y:0,zoom:1};var c=(a.x-s.x)*a.scale,f=(a.y-s.y)*a.scale;(c!==0||f!==0)&&t.scroll({dx:c,dy:f}),s.zoom!==a.scale&&t.zoom(s.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){r.clear(),n=null})}zn.$inject=["eventBus","canvas"];function vl(){this._entries=[],this.set=function(e,t){var n=!1;for(var r in this._entries)if(this._entries[r][0]===e){this._entries[r][1]=t,n=!0;break}n||this._entries.push([e,t])},this.get=function(e){for(var t in this._entries)if(this._entries[t][0]===e)return this._entries[t][1];return null},this.clear=function(){this._entries.length=0},this.remove=function(e){var t=-1;for(var n in this._entries)if(this._entries[n][0]===e){t=n;break}t!==-1&&this._entries.splice(t,1)}}var _o={x:180,y:160};function bt(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,function(r,i){n._handleImport(i.definitions)})}bt.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach(function(r){!r.plane||!r.plane.bpmnElement||(t._processToDiagramMap[r.plane.bpmnElement.id]=r)});var n=e.diagrams.filter(r=>r.plane).flatMap(r=>t._createNewDiagrams(r.plane));n.forEach(function(r){t._movePlaneElementsToOrigin(r.plane)})}};bt.prototype._createNewDiagrams=function(e){var t=this,n=[],r=[];e.get("planeElement").forEach(function(o){var a=o.bpmnElement;if(a){var s=a.$parent;N(a,"bpmn:SubProcess")&&!o.isExpanded&&n.push(a),bl(a,e)&&r.push({diElement:o,parent:s})}});var i=[];return n.forEach(function(o){if(!t._processToDiagramMap[o.id]){var a=t._createDiagram(o);t._processToDiagramMap[o.id]=a,i.push(a)}}),r.forEach(function(o){for(var a=o.diElement,s=o.parent;s&&n.indexOf(s)===-1;)s=s.$parent;if(s){var c=t._processToDiagramMap[s.id];t._moveToDiPlane(a,c.plane)}}),i};bt.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=El(e),r={x:n.x-_o.x,y:n.y-_o.y};t.forEach(function(i){i.waypoint?i.waypoint.forEach(function(o){o.x=o.x-r.x,o.y=o.y-r.y}):i.bounds&&(i.bounds.x=i.bounds.x-r.x,i.bounds.y=i.bounds.y-r.y)})};bt.prototype._moveToDiPlane=function(e,t){var n=So(e),r=n.plane.get("planeElement");r.splice(r.indexOf(e),1),t.get("planeElement").push(e)};bt.prototype._createDiagram=function(e){var t=this._moddle.create("bpmndi:BPMNPlane",{bpmnElement:e}),n=this._moddle.create("bpmndi:BPMNDiagram",{plane:t});return t.$parent=n,t.bpmnElement=e,n.$parent=this._definitions,this._definitions.diagrams.push(n),n};bt.$inject=["eventBus","moddle"];function So(e){return N(e,"bpmndi:BPMNDiagram")?e:So(e.$parent)}function El(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach(function(n){if(n.bounds){var r=sn(n.bounds);t.top=Math.min(r.top,t.top),t.left=Math.min(r.left,t.left)}}),mo(t)}function bl(e,t){var n=e.$parent;return!(!N(n,"bpmn:SubProcess")||n===t.bpmnElement||ji(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var Un=250,xl='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg>',wl="bjs-drilldown-empty";function ut(e,t,n,r,i){Ae.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=r,this._translate=i;var o=this;this.executed("shape.toggleCollapse",Un,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.reverted("shape.toggleCollapse",Un,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.executed(["shape.create","shape.move","shape.delete"],Un,function(a){var s=a.oldParent,c=a.newParent||a.parent,f=a.shape;o._canDrillDown(f)&&o._addOverlay(f),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(c),o._updateDrilldownOverlay(f)},!0),this.reverted(["shape.create","shape.move","shape.delete"],Un,function(a){var s=a.oldParent,c=a.newParent||a.parent,f=a.shape;o._canDrillDown(f)&&o._addOverlay(f),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(c),o._updateDrilldownOverlay(f)},!0),t.on("import.render.complete",function(){n.filter(function(a){return o._canDrillDown(a)}).map(function(a){o._addOverlay(a)})})}Ce(ut,Ae);ut.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}};ut.prototype._canDrillDown=function(e){var t=this._canvas;return N(e,"bpmn:SubProcess")&&t.findRoot(ln(e))};ut.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=oe(e),r=t.get({element:n.id,type:"drilldown"})[0];if(r){var i=n&&n.get("flowElements")&&n.get("flowElements").length;Bt(r.html).toggle(wl,!i)}};ut.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,r=oe(e),i=n.get({element:e,type:"drilldown"});i.length&&this._removeOverlay(e);var o=ee('<button type="button" class="bjs-drilldown">'+xl+"</button>"),a=r.get("name")||r.get("id"),s=this._translate("Open {element}",{element:a});o.setAttribute("title",s),o.addEventListener("click",function(){t.setRootElement(t.findRoot(ln(e)))}),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:o}),this._updateOverlayVisibility(e)};ut.prototype._removeOverlay=function(e){var t=this._overlays;t.remove({element:e,type:"drilldown"})};ut.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];var Ao={__depends__:[qn,xo,wo],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",Hn],drilldownCentering:["type",zn],drilldownOverlayBehavior:["type",ut],subprocessCompatibility:["type",bt]};Q();function Or(e){return e.originalEvent||e.srcEvent}function Ro(e,t){return(Or(e)||e).button===t}function Kt(e){return Ro(e,0)}function Co(e){return Ro(e,1)}function Po(e){var t=Or(e)||e;return Kt(e)&&t.shiftKey}function _l(e){return!0}function Gn(e){return Kt(e)||Co(e)}var ko=500;function Kn(e,t,n){var r=this;function i(b,D,R){if(!s(b,D)){var F,B,I;R?B=t.getGraphics(R):(F=D.delegateTarget||D.target,F&&(B=F,R=t.get(B))),!(!B||!R)&&(I=e.fire(b,{element:R,gfx:B,originalEvent:D}),I===!1&&(D.stopPropagation(),D.preventDefault()))}}var o={};function a(b){return o[b]}function s(b,D){var R=f[b]||Kt;return!R(D)}var c={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},f={"element.contextmenu":_l,"element.mousedown":Gn,"element.mouseup":Gn,"element.click":Gn,"element.dblclick":Gn};function h(b,D,R){var F=c[b];if(!F)throw new Error("unmapped DOM event name <"+b+">");return i(F,D,R)}var y="svg, .djs-element";function v(b,D,R,F){var B=o[R]=function(I){i(R,I)};F&&(f[R]=F),B.$delegate=on.bind(b,y,D,B)}function A(b,D,R){var F=a(R);F&&on.unbind(b,D,F.$delegate)}function W(b){P(c,function(D,R){v(b,R,D)})}function L(b){P(c,function(D,R){A(b,R,D)})}e.on("canvas.destroy",function(b){L(b.svg)}),e.on("canvas.init",function(b){W(b.svg)}),e.on(["shape.added","connection.added"],function(b){var D=b.element,R=b.gfx;e.fire("interactionEvents.createHit",{element:D,gfx:R})}),e.on(["shape.changed","connection.changed"],ko,function(b){var D=b.element,R=b.gfx;e.fire("interactionEvents.updateHit",{element:D,gfx:R})}),e.on("interactionEvents.createHit",ko,function(b){var D=b.element,R=b.gfx;r.createDefaultHit(D,R)}),e.on("interactionEvents.updateHit",function(b){var D=b.element,R=b.gfx;r.updateDefaultHit(D,R)});var O=w("djs-hit djs-hit-stroke"),H=w("djs-hit djs-hit-click-stroke"),G=w("djs-hit djs-hit-all"),T=w("djs-hit djs-hit-no-move"),g={all:G,"click-stroke":H,stroke:O,"no-move":T};function w(b,D){return D=M({stroke:"white",strokeWidth:15},D||{}),n.cls(b,["no-fill","no-border"],D)}function C(b,D){var R=g[D];if(!R)throw new Error("invalid hit type <"+D+">");return te(b,R),b}function V(b,D){fe(b,D)}this.removeHits=function(b){var D=uo(".djs-hit",b);P(D,Dt)},this.createDefaultHit=function(b,D){var R=b.waypoints,F=b.isFrame,B;return R?this.createWaypointsHit(D,R):(B=F?"stroke":"all",this.createBoxHit(D,B,{width:b.width,height:b.height}))},this.createWaypointsHit=function(b,D){var R=qt(D);return C(R,"stroke"),V(b,R),R},this.createBoxHit=function(b,D,R){R=M({x:0,y:0},R);var F=ne("rect");return C(F,D),te(F,R),V(b,F),F},this.updateDefaultHit=function(b,D){var R=He(".djs-hit",D);if(R)return b.waypoints?kr(R,b.waypoints):te(R,{width:b.width,height:b.height}),R},this.fire=i,this.triggerMouseEvent=h,this.mouseHandler=a,this.registerEvent=v,this.unregisterEvent=A}Kn.$inject=["eventBus","elementRegistry","styles"];var To={__init__:["interactionEvents"],interactionEvents:["type",Kn]};Q();function Rt(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=[];var n=this;e.on(["shape.remove","connection.remove"],function(r){var i=r.element;n.deselect(i)}),e.on(["diagram.clear","root.set"],function(r){n.select(null)})}Rt.$inject=["eventBus","canvas"];Rt.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(n!==-1){var r=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:t})}};Rt.prototype.get=function(){return this._selectedElements};Rt.prototype.isSelected=function(e){return this._selectedElements.indexOf(e)!==-1};Rt.prototype.select=function(e,t){var n=this._selectedElements,r=n.slice();xe(e)||(e=e?[e]:[]);var i=this._canvas,o=i.getRootElement();e=e.filter(function(a){var s=i.findRoot(a);return o===s}),t?P(e,function(a){n.indexOf(a)===-1&&n.push(a)}):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:n})};Q();var Mo="hover",Do="selected";function Yn(e,t){this._canvas=e;function n(i,o){e.addMarker(i,o)}function r(i,o){e.removeMarker(i,o)}t.on("element.hover",function(i){n(i.element,Mo)}),t.on("element.out",function(i){r(i.element,Mo)}),t.on("selection.changed",function(i){function o(f){r(f,Do)}function a(f){n(f,Do)}var s=i.oldSelection,c=i.newSelection;P(s,function(f){c.indexOf(f)===-1&&o(f)}),P(c,function(f){s.indexOf(f)===-1&&a(f)})})}Yn.$inject=["canvas","eventBus"];Q();function Xn(e,t,n,r){e.on("create.end",500,function(i){var o=i.context,a=o.canExecute,s=o.elements,c=o.hints||{},f=c.autoSelect;if(a){if(f===!1)return;xe(f)?t.select(f):t.select(s.filter(Sl))}}),e.on("connect.end",500,function(i){var o=i.context,a=o.connection;a&&t.select(a)}),e.on("shape.move.end",500,function(i){var o=i.previousSelection||[],a=r.get(i.context.shape.id),s=ve(o,function(c){return a.id===c.id});s||t.select(a)}),e.on("element.click",function(i){if(Kt(i)){var o=i.element;o===n.getRootElement()&&(o=null);var a=t.isSelected(o),s=t.get().length>1,c=Po(i);if(a&&s)return c?t.deselect(o):t.select(o);a?t.deselect(o):t.select(o,c)}})}Xn.$inject=["eventBus","selection","canvas","elementRegistry"];function Sl(e){return!e.hidden}var No={__init__:["selectionVisuals","selectionBehavior"],__depends__:[To],selection:["type",Rt],selectionVisuals:["type",Yn],selectionBehavior:["type",Xn]};Q();var Al=/^class[ {]/;function Rl(e){return Al.test(e.toString())}function Ir(e){return Array.isArray(e)}function Lr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Zn(...e){e.length===1&&Ir(e[0])&&(e=e[0]),e=[...e];let t=e.pop();return t.$inject=e,t}var Cl=/constructor\s*[^(]*\(\s*([^)]*)\)/m,Pl=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,kl=/\/\*([^*]*)\*\//m;function Tl(e){if(typeof e!="function")throw new Error(`Cannot annotate "${e}". Expected a function!`);let t=e.toString().match(Rl(e)?Cl:Pl);if(!t)return[];let n=t[1]||t[2];return n&&n.split(",").map(r=>{let i=r.match(kl);return(i&&i[1]||r).trim()})||[]}function Fr(e,t){let n=t||{get:function(T,g){if(r.push(T),g===!1)return null;throw s(`No provider for "${T}"!`)}},r=[],i=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(T){let g=r.join(" -> ");return r.length=0,new Error(g?`${T} (Resolving: ${g})`:T)};function c(T,g){if(!i[T]&&T.includes(".")){let w=T.split("."),C=c(w.shift());for(;w.length;)C=C[w.shift()];return C}if(Lr(o,T))return o[T];if(Lr(i,T)){if(r.indexOf(T)!==-1)throw r.push(T),s("Cannot resolve circular dependency!");return r.push(T),o[T]=i[T][0](i[T][1]),r.pop(),o[T]}return n.get(T,g)}function f(T,g){if(typeof g=="undefined"&&(g={}),typeof T!="function")if(Ir(T))T=Zn(T.slice());else throw s(`Cannot invoke "${T}". Expected a function!`);let C=(T.$inject||Tl(T)).map(V=>Lr(g,V)?g[V]:c(V));return{fn:T,dependencies:C}}function h(T){let{fn:g,dependencies:w}=f(T),C=Function.prototype.bind.call(g,null,...w);return new C}function y(T,g,w){let{fn:C,dependencies:V}=f(T,w);return C.apply(g,V)}function v(T){return Zn(g=>T.get(g))}function A(T,g){if(g&&g.length){let w=Object.create(null),C=Object.create(null),V=[],b=[],D=[],R,F,B,I;for(let K in i)R=i[K],g.indexOf(K)!==-1&&(R[2]==="private"?(F=V.indexOf(R[3]),F===-1?(B=R[3].createChild([],g),I=v(B),V.push(R[3]),b.push(B),D.push(I),w[K]=[I,K,"private",B]):w[K]=[D[F],K,"private",b[F]]):w[K]=[R[2],R[1]],C[K]=!0),(R[2]==="factory"||R[2]==="type")&&R[1].$scope&&g.forEach(ot=>{R[1].$scope.indexOf(ot)!==-1&&(w[K]=[R[2],R[1]],C[ot]=!0)});g.forEach(K=>{if(!C[K])throw new Error('No provider for "'+K+'". Cannot use provider from the parent!')}),T.unshift(w)}return new Fr(T,a)}let W={factory:y,type:h,value:function(T){return T}};function L(T,g){let w=T.__init__||[];return function(){w.forEach(C=>{typeof C=="string"?g.get(C):g.invoke(C)})}}function O(T){let g=T.__exports__;if(g){let w=T.__modules__,C=Object.keys(T).reduce((F,B)=>(B!=="__exports__"&&B!=="__modules__"&&B!=="__init__"&&B!=="__depends__"&&(F[B]=T[B]),F),Object.create(null)),V=(w||[]).concat(C),b=A(V),D=Zn(function(F){return b.get(F)});g.forEach(function(F){i[F]=[D,F,"private",b]});let R=(T.__init__||[]).slice();return R.unshift(function(){b.init()}),T=Object.assign({},T,{__init__:R}),L(T,b)}return Object.keys(T).forEach(function(w){if(w==="__init__"||w==="__depends__")return;let C=T[w];if(C[2]==="private"){i[w]=C;return}let V=C[0],b=C[1];i[w]=[W[V],Ml(V,b),V]}),L(T,a)}function H(T,g){return T.indexOf(g)!==-1||(T=(g.__depends__||[]).reduce(H,T),T.indexOf(g)!==-1)?T:T.concat(g)}function G(T){let g=T.reduce(H,[]).map(O),w=!1;return function(){w||(w=!0,g.forEach(C=>C()))}}this.get=c,this.invoke=y,this.instantiate=h,this.createChild=A,this.init=G(e)}function Ml(e,t){return e!=="value"&&Ir(t)&&(t=Zn(t.slice())),t}Q();var Dl=1;function lt(e,t){Xe.call(this,e,Dl),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=t.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}Ce(lt,Xe);lt.prototype.canRender=function(){return!0};lt.prototype.drawShape=function(t,n,r){var i=ne("rect");return te(i,{x:0,y:0,width:n.width||0,height:n.height||0}),Sn(n)?te(i,M({},this.FRAME_STYLE,r||{})):te(i,M({},this.SHAPE_STYLE,r||{})),fe(t,i),i};lt.prototype.drawConnection=function(t,n,r){var i=qt(n.waypoints,M({},this.CONNECTION_STYLE,r||{}));return fe(t,i),i};lt.prototype.getShapePath=function(t){var n=t.x,r=t.y,i=t.width,o=t.height,a=[["M",n,r],["l",i,0],["l",0,o],["l",-i,0],["z"]];return yt(a)};lt.prototype.getConnectionPath=function(t){var n=t.waypoints,r,i,o=[];for(r=0;i=n[r];r++)i=i.original||i,o.push([r===0?"M":"L",i.x,i.y]);return yt(o)};lt.$inject=["eventBus","styles"];Q();function jr(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(n,r,i){var o=this.style(r,i);return M(o,{class:n})},this.style=function(n,r){!xe(n)&&!r&&(r=n,n=[]);var i=Ve(n,function(o,a){return M(o,e[a]||{})},{});return r?M(i,r):i},this.computeStyle=function(n,r,i){return xe(r)||(i=r,r=[]),t.style(r||[],M({},i,n||{}))}}var Bo={__init__:["defaultRenderer"],defaultRenderer:["type",lt],styles:["type",jr]};Q();function Oo(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return n!==-1&&e.splice(n,1),n}function Lo(e,t,n){if(!(!e||!t)){typeof n!="number"&&(n=-1);var r=e.indexOf(t);if(r!==-1){if(r===n)return;if(n!==-1)e.splice(r,1);else return}n!==-1?e.splice(n,0,t):e.push(t)}}function Qn(e,t){return Math.round(e*t)/t}function Io(e){return Me(e)?e+"px":e}function Nl(e){for(;e.parent;)e=e.parent;return e}function Bl(e){e=M({},{width:"100%",height:"100%"},e);let t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),Pe(n,{position:"relative",overflow:"hidden",width:Io(e.width),height:Io(e.height)}),t.appendChild(n),n}function Fo(e,t,n){let r=ne("g");qe(r).add(t);let i=n!==void 0?n:e.childNodes.length-1;return e.insertBefore(r,e.childNodes[i]||null),r}var Ol="base",jo=0,Ll=1,Il={shape:["x","y","width","height"],connection:["waypoints"]};function q(e,t,n,r){this._eventBus=t,this._elementRegistry=r,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}q.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"];q.prototype._init=function(e){let t=this._eventBus,n=this._container=Bl(e),r=this._svg=ne("svg");te(r,{width:"100%",height:"100%"}),kn(r,"tabindex",0),e.autoFocus&&t.on("element.hover",()=>{this.restoreFocus()}),t.on("element.mousedown",500,o=>{this.focus()}),r.addEventListener("focusin",()=>{this._setFocused(!0)}),r.addEventListener("focusout",()=>{this._setFocused(!1)}),r.addEventListener("mouseover",()=>{this._eventBus.fire("canvas.mouseover")}),r.addEventListener("mouseout",()=>{this._eventBus.fire("canvas.mouseout")}),fe(n,r);let i=this._viewport=Fo(r,"viewport");e.deferUpdate&&(this._viewboxChanged=dr(Ye(this._viewboxChanged,this),300)),t.on("diagram.init",()=>{t.fire("canvas.init",{svg:r,viewport:i})}),t.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","root.set"],()=>{delete this._cachedViewbox}),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)};q.prototype._destroy=function(){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});let e=this._container.parentNode;e&&e.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._rootElement,delete this._viewport};q.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))};q.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{let n=_n(t);n==="root"?this.removeRootElement(t):this._removeElement(t,n)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox};q.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)};q.prototype.restoreFocus=function(){document.activeElement===document.body&&this.focus()};q.prototype.isFocused=function(){return this._focused};q.prototype.getDefaultLayer=function(){return this.getLayer(Ol,jo)};q.prototype.getLayer=function(e,t){if(!e)throw new Error("must specify a name");let n=this._layers[e];if(n||(n=this._layers[e]=this._createLayer(e,t)),typeof t!="undefined"&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group};q.prototype._getChildIndex=function(e){return Ve(this._layers,function(t,n){return n.visible&&e>=n.index&&t++,t},0)};q.prototype._createLayer=function(e,t){typeof t=="undefined"&&(t=Ll);let n=this._getChildIndex(t);return{group:Fo(this._viewport,"layer-"+e,n),index:t,visible:!0}};q.prototype.showLayer=function(e){if(!e)throw new Error("must specify a name");let t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");let n=this._viewport,r=t.group,i=t.index;if(t.visible)return r;let o=this._getChildIndex(i);return n.insertBefore(r,n.childNodes[o]||null),t.visible=!0,r};q.prototype.hideLayer=function(e){if(!e)throw new Error("must specify a name");let t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");let n=t.group;return t.visible&&(Dt(n),t.visible=!1),n};q.prototype._removeLayer=function(e){let t=this._layers[e];t&&(delete this._layers[e],Dt(t.group))};q.prototype.getActiveLayer=function(){let e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null};q.prototype.findRoot=function(e){return typeof e=="string"&&(e=this._elementRegistry.get(e)),e?(this._findPlaneForRoot(Nl(e))||{}).rootElement:void 0};q.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})};q.prototype._findPlaneForRoot=function(e){return ve(this._planes,function(t){return t.rootElement===e})};q.prototype.getContainer=function(){return this._container};q.prototype._updateMarker=function(e,t,n){let r;e.id||(e=this._elementRegistry.get(e)),e.markers=e.markers||new Set,r=this._elementRegistry._elements[e.id],r&&(P([r.gfx,r.secondaryGfx],function(i){i&&(n?(e.markers.add(t),qe(i).add(t)):(e.markers.delete(t),qe(i).remove(t)))}),this._eventBus.fire("element.marker.update",{element:e,gfx:r.gfx,marker:t,add:!!n}))};q.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)};q.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)};q.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),e.markers?e.markers.has(t):!1};q.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)};q.prototype.getRootElement=function(){let e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))};q.prototype.addRootElement=function(e){let t=this._rootsIdx++;e||(e={id:"__implicitroot_"+t,children:[],isImplicit:!0});let n=e.layer="root-"+t;this._ensureValid("root",e);let r=this.getLayer(n,jo);return this.hideLayer(n),this._addRoot(e,r),this._planes.push({rootElement:e,layer:r}),e};q.prototype.removeRootElement=function(e){if(typeof e=="string"&&(e=this._elementRegistry.get(e)),!!this._findPlaneForRoot(e))return this._removeRoot(e),this._removeLayer(e.layer),this._planes=this._planes.filter(function(n){return n.rootElement!==e}),this._rootElement===e&&(this._rootElement=null),e};q.prototype.setRootElement=function(e){if(e===this._rootElement)return e;let t;if(!e)throw new Error("rootElement required");return t=this._findPlaneForRoot(e),t||(e=this.addRootElement(e)),this._setRoot(e),e};q.prototype._removeRoot=function(e){let t=this._elementRegistry,n=this._eventBus;n.fire("root.remove",{element:e}),n.fire("root.removed",{element:e}),t.remove(e)};q.prototype._addRoot=function(e,t){let n=this._elementRegistry,r=this._eventBus;r.fire("root.add",{element:e}),n.add(e,t),r.fire("root.added",{element:e,gfx:t})};q.prototype._setRoot=function(e,t){let n=this._rootElement;n&&(this._elementRegistry.updateGraphics(n,null,!0),this.hideLayer(n.layer)),e&&(t||(t=this._findPlaneForRoot(e).layer),this._elementRegistry.updateGraphics(e,this._svg,!0),this.showLayer(e.layer)),this._rootElement=e,this._eventBus.fire("root.set",{element:e})};q.prototype._ensureValid=function(e,t){if(!t.id)throw new Error("element must have an id");if(this._elementRegistry.get(t.id))throw new Error("element <"+t.id+"> already exists");let n=Il[e];if(!bn(n,function(i){return typeof t[i]!="undefined"}))throw new Error("must supply { "+n.join(", ")+" } with "+e)};q.prototype._setParent=function(e,t,n){Lo(t.children,e,n),e.parent=t};q.prototype._addElement=function(e,t,n,r){n=n||this.getRootElement();let i=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),i.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,r);let a=o.create(e,t,r);return this._elementRegistry.add(t,a),o.update(e,t,a),i.fire(e+".added",{element:t,gfx:a}),t};q.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)};q.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)};q.prototype._removeElement=function(e,t){let n=this._elementRegistry,r=this._graphicsFactory,i=this._eventBus;if(e=n.get(e.id||e),!!e)return i.fire(t+".remove",{element:e}),r.remove(e),Oo(e.parent&&e.parent.children,e),e.parent=null,i.fire(t+".removed",{element:e}),n.remove(e),e};q.prototype.removeShape=function(e){return this._removeElement(e,"shape")};q.prototype.removeConnection=function(e){return this._removeElement(e,"connection")};q.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)};q.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()};q.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})};q.prototype.viewbox=function(e){if(e===void 0&&this._cachedViewbox)return structuredClone(this._cachedViewbox);let t=this._viewport,n=this.getSize(),r,i,o,a,s,c,f;if(e)this._changeViewbox(function(){s=Math.min(n.width/e.width,n.height/e.height);let h=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);Nt(t,h)});else return o=this._rootElement?this.getActiveLayer():null,r=o&&o.getBBox()||{},a=Nt(t),i=a?a.matrix:Qi(),s=Qn(i.a,1e3),c=Qn(-i.e||0,1e3),f=Qn(-i.f||0,1e3),e=this._cachedViewbox={x:c?c/s:0,y:f?f/s:0,width:n.width/s,height:n.height/s,scale:s,inner:{width:r.width||0,height:r.height||0,x:r.x||0,y:r.y||0},outer:n},e;return e};q.prototype.scroll=function(e){let t=this._viewport,n=t.getCTM();return e&&this._changeViewbox(function(){e=M({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),$o(t,n)}),{x:n.e,y:n.f}};q.prototype.scrollToElement=function(e,t){let n=100;typeof e=="string"&&(e=this._elementRegistry.get(e));let r=this.findRoot(e);if(r!==this.getRootElement()&&this.setRootElement(r),r===e)return;t||(t={}),typeof t=="number"&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};let i=Mt(e),o=sn(i),a=this.viewbox(),s=this.zoom(),c,f;a.y+=t.top/s,a.x+=t.left/s,a.width-=(t.right+t.left)/s,a.height-=(t.bottom+t.top)/s;let h=sn(a);if(!(i.width<a.width&&i.height<a.height))c=i.x-a.x,f=i.y-a.y;else{let v=Math.max(0,o.right-h.right),A=Math.min(0,o.left-h.left),W=Math.max(0,o.bottom-h.bottom),L=Math.min(0,o.top-h.top);c=v||A,f=W||L}this.scroll({dx:-c*s,dy:-f*s})};q.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if(e==="fit-viewport")return this._fitViewport(t);let n,r;return this._changeViewbox(function(){typeof t!="object"&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),r=this._setZoom(e,t)}),Qn(r.a,1e3)};function $o(e,t){let n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}q.prototype._fitViewport=function(e){let t=this.viewbox(),n=t.outer,r=t.inner,i,o;return r.x>=0&&r.y>=0&&r.x+r.width<=n.width&&r.y+r.height<=n.height&&!e?o={x:0,y:0,width:Math.max(r.width+r.x,n.width),height:Math.max(r.height+r.y,n.height)}:(i=Math.min(1,n.width/r.width,n.height/r.height),o={x:r.x+(e?r.width/2-n.width/i/2:0),y:r.y+(e?r.height/2-n.height/i/2:0),width:n.width/i,height:n.height/i}),this.viewbox(o),this.viewbox(!1).scale};q.prototype._setZoom=function(e,t){let n=this._svg,r=this._viewport,i=n.createSVGMatrix(),o=n.createSVGPoint(),a,s,c,f,h;c=r.getCTM();let y=c.a;return t?(a=M(o,t),s=a.matrixTransform(c.inverse()),f=i.translate(s.x,s.y).scale(1/y*e).translate(-s.x,-s.y),h=c.multiply(f)):h=i.scale(e),$o(this._viewport,h),h};q.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}};q.prototype.getAbsoluteBBox=function(e){let t=this.viewbox(),n;e.waypoints?n=this.getGraphics(e).getBBox():n=e;let r=n.x*t.scale-t.x*t.scale,i=n.y*t.scale-t.y*t.scale,o=n.width*t.scale,a=n.height*t.scale;return{x:r,y:i,width:o,height:a}};q.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Yt="data-element-id";function Be(e){this._elements={},this._eventBus=e}Be.$inject=["eventBus"];Be.prototype.add=function(e,t,n){var r=e.id;this._validateId(r),te(t,Yt,r),n&&te(n,Yt,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}};Be.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(te(r.gfx,Yt,""),r.secondaryGfx&&te(r.secondaryGfx,Yt,""),delete t[n])};Be.prototype.updateId=function(e,t){this._validateId(t),typeof e=="string"&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t});var n=this.getGraphics(e),r=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,r)};Be.prototype.updateGraphics=function(e,t,n){var r=e.id||e,i=this._elements[r];return n?i.secondaryGfx=t:i.gfx=t,t&&te(t,Yt,r),t};Be.prototype.get=function(e){var t;typeof e=="string"?t=e:t=e&&te(e,Yt);var n=this._elements[t];return n&&n.element};Be.prototype.filter=function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(n)}),t};Be.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),r=0;r<n.length;r++){var i=n[r],o=t[i],a=o.element,s=o.gfx;if(e(a,s))return a}};Be.prototype.getAll=function(){return this.filter(function(e){return e})};Be.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach(function(n){var r=t[n],i=r.element,o=r.gfx;return e(i,o)})};Be.prototype.getGraphics=function(e,t){var n=e.id||e,r=this._elements[n];return r&&(t?r.secondaryGfx:r.gfx)};Be.prototype._validateId=function(e){if(!e)throw new Error("element must have an id");if(this._elements[e])throw new Error("element with id "+e+" already added")};Q();function Fl(e,t,n,r){var i=n.inverse;return Object.defineProperty(e,"remove",{value:function(o){var a=this.indexOf(o);return a!==-1&&(this.splice(a,1),t.unset(o,i,r)),o}}),Object.defineProperty(e,"contains",{value:function(o){return this.indexOf(o)!==-1}}),Object.defineProperty(e,"add",{value:function(o,a){var s=this.indexOf(o);if(typeof a=="undefined"){if(s!==-1)return;a=this.length}s!==-1&&this.splice(s,1),this.splice(a,0,o),s===-1&&t.set(o,i,r)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}function jl(e){return e.__refs_collection===!0}function $l(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function Vo(e,t,n){var r=Fl(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:r}),r.length&&r.forEach(function(i){e.set(i,t.inverse,n)})}function Vl(e,t,n){var r=t.inverse,i=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return i},set:function(o){if(o!==i){var a=i;i=null,a&&e.unset(a,r,n),i=o,e.set(i,r,n)}}})}function ze(e,t){if(!(this instanceof ze))return new ze(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}ze.prototype.bind=function(e,t){if(typeof t=="string"){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?Vo(this,t,e):Vl(this,t,e)};ze.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return jl(n)||Vo(this,t,e),n};ze.prototype.ensureBound=function(e,t){$l(e,t)||this.bind(e,t)};ze.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)};ze.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var $r=new ze({name:"children",enumerable:!0,collection:!0},{name:"parent"}),Wo=new ze({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),qo=new ze({name:"attachers",collection:!0},{name:"host"}),Ho=new ze({name:"outgoing",collection:!0},{name:"source"}),zo=new ze({name:"incoming",collection:!0},{name:"target"});function cn(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(e){var t=this.label,n=this.labels;!e&&t?n.remove(t):n.add(e,0)}}),$r.bind(this,"parent"),Wo.bind(this,"labels"),Ho.bind(this,"outgoing"),zo.bind(this,"incoming")}function fn(){cn.call(this),$r.bind(this,"children"),qo.bind(this,"host"),qo.bind(this,"attachers")}Ce(fn,cn);function Uo(){cn.call(this),$r.bind(this,"children")}Ce(Uo,fn);function Go(){fn.call(this),Wo.bind(this,"labelTarget")}Ce(Go,fn);function Ko(){cn.call(this),Ho.bind(this,"source"),zo.bind(this,"target")}Ce(Ko,cn);var ql={connection:Ko,shape:fn,label:Go,root:Uo};function Yo(e,t){var n=ql[e];if(!n)throw new Error("unknown type: <"+e+">");return M(new n,t)}Q();function Ct(){this._uid=12}Ct.prototype.createRoot=function(e){return this.create("root",e)};Ct.prototype.createLabel=function(e){return this.create("label",e)};Ct.prototype.createShape=function(e){return this.create("shape",e)};Ct.prototype.createConnection=function(e){return this.create("connection",e)};Ct.prototype.create=function(e,t){return t=M({},t||{}),t.id||(t.id=e+"_"+this._uid++),Yo(e,t)};Q();var Jn="__fn",Xo=1e3,Wl=Array.prototype.slice;function ke(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}ke.prototype.on=function(e,t,n,r){if(e=xe(e)?e:[e],tt(t)&&(r=n,n=t,t=Xo),!Me(t))throw new Error("priority must be a number");var i=n;r&&(i=Ye(n,r),i[Jn]=n[Jn]||n);var o=this;e.forEach(function(a){o._addListener(a,{priority:t,callback:i,next:null})})};ke.prototype.once=function(e,t,n,r){var i=this;if(tt(t)&&(r=n,n=t,t=Xo),!Me(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var a=n.apply(r,arguments);return i.off(e,o),a}o[Jn]=n,this.on(e,t,o)};ke.prototype.off=function(e,t){e=xe(e)?e:[e];var n=this;e.forEach(function(r){n._removeListener(r,t)})};ke.prototype.createEvent=function(e){var t=new pn;return t.init(e),t};ke.prototype.fire=function(e,t){var n,r,i,o;if(o=Wl.call(arguments),typeof e=="object"&&(t=e,e=t.type),!e)throw new Error("no event type specified");if(r=this._listeners[e],!!r){t instanceof pn?n=t:n=this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{i=this._invokeListeners(n,o,r)}finally{e!==a&&(n.type=a)}return i===void 0&&n.defaultPrevented&&(i=!1),i}};ke.prototype.handleError=function(e){return this.fire("error",{error:e})===!1};ke.prototype._destroy=function(){this._listeners={}};ke.prototype._invokeListeners=function(e,t,n){for(var r;n&&!e.cancelBubble;)r=this._invokeListener(e,t,n),n=n.next;return r};ke.prototype._invokeListener=function(e,t,n){var r;if(n.callback.__isTomb)return r;try{r=Hl(n.callback,t),r!==void 0&&(e.returnValue=r,e.stopPropagation()),r===!1&&e.preventDefault()}catch(i){if(!this.handleError(i))throw console.error("unhandled error in event listener",i),i}return r};ke.prototype._addListener=function(e,t){var n=this._getListeners(e),r;if(!n){this._setListeners(e,t);return}for(;n;){if(n.priority<t.priority){t.next=n,r?r.next=t:this._setListeners(e,t);return}r=n,n=n.next}r.next=t};ke.prototype._getListeners=function(e){return this._listeners[e]};ke.prototype._setListeners=function(e,t){this._listeners[e]=t};ke.prototype._removeListener=function(e,t){var n=this._getListeners(e),r,i,o;if(!t){this._setListeners(e,null);return}for(;n;)r=n.next,o=n.callback,(o===t||o[Jn]===t)&&(i?i.next=r:this._setListeners(e,r)),i=n,n=r};function pn(){}pn.prototype.stopPropagation=function(){this.cancelBubble=!0};pn.prototype.preventDefault=function(){this.defaultPrevented=!0};pn.prototype.init=function(e){M(this,e||{})};function Hl(e,t){return e.apply(null,t)}Q();function Zo(e){return e.childNodes[0]}function Qo(e){return e.parentNode.childNodes[1]}function Oe(e,t){this._eventBus=e,this._elementRegistry=t}Oe.$inject=["eventBus","elementRegistry"];Oe.prototype._getChildrenContainer=function(e){var t=this._elementRegistry.getGraphics(e),n;return e.parent?(n=Qo(t),n||(n=ne("g"),qe(n).add("djs-children"),fe(t.parentNode,n))):n=t,n};Oe.prototype._clear=function(e){var t=Zo(e);return Tn(t),t};Oe.prototype._createContainer=function(e,t,n,r){var i=ne("g");qe(i).add("djs-group"),typeof n!="undefined"?Jo(i,t,t.childNodes[n]):fe(t,i);var o=ne("g");qe(o).add("djs-element"),qe(o).add("djs-"+e),r&&qe(o).add("djs-frame"),fe(i,o);var a=ne("g");return qe(a).add("djs-visual"),fe(o,a),o};Oe.prototype.create=function(e,t,n){var r=this._getChildrenContainer(t.parent);return this._createContainer(e,r,n,Sn(t))};Oe.prototype.updateContainments=function(e){var t=this,n=this._elementRegistry,r;r=Ve(e,function(i,o){return o.parent&&(i[o.parent.id]=o.parent),i},{}),P(r,function(i){var o=i.children;if(o){var a=t._getChildrenContainer(i);P(o.slice().reverse(),function(s){var c=n.getGraphics(s);Jo(c.parentNode,a)})}})};Oe.prototype.drawShape=function(e,t,n={}){var r=this._eventBus;return r.fire("render.shape",{gfx:e,element:t,attrs:n})};Oe.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)};Oe.prototype.drawConnection=function(e,t,n={}){var r=this._eventBus;return r.fire("render.connection",{gfx:e,element:t,attrs:n})};Oe.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)};Oe.prototype.update=function(e,t,n){if(t.parent){var r=this._clear(n);if(e==="shape")this.drawShape(r,t),Nn(n,t.x,t.y);else if(e==="connection")this.drawConnection(r,t);else throw new Error("unknown type: "+e);t.hidden?te(n,"display","none"):te(n,"display","block")}};Oe.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);Dt(t.parentNode)};function Jo(e,t,n){var r=n||t.firstChild;e!==r&&t.insertBefore(e,r)}var ea={__depends__:[Bo],__init__:["canvas"],canvas:["type",q],elementRegistry:["type",Be],elementFactory:["type",Ct],eventBus:["type",ke],graphicsFactory:["type",Oe]};function zl(e){var t=new Fr(e);return t.init(),t}function Ul(e){e=e||{};var t={config:["value",e]},n=[t,ea].concat(e.modules||[]);return zl(n)}function ct(e,t){this._injector=t||Ul(e),this.get("eventBus").fire("diagram.init")}ct.prototype.get=function(e,t){return this._injector.get(e,t)};ct.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)};ct.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")};ct.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};Q();Q();function Wr(){}Wr.prototype.get=function(e){return this.$model.properties.get(this,e)};Wr.prototype.set=function(e,t){this.$model.properties.set(this,e,t)};function na(e,t){this.model=e,this.properties=t}na.prototype.createType=function(e){var t=this.model,n=this.properties,r=Object.create(Wr.prototype);P(e.properties,function(a){!a.isMany&&a.default!==void 0&&(r[a.name]=a.default)}),n.defineModel(r,t),n.defineDescriptor(r,e);var i=e.ns.name;function o(a){n.define(this,"$type",{value:i,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),P(a,Ye(function(s,c){this.set(c,s)},this))}return o.prototype=r,o.hasType=r.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var Gl={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},ra={String:function(e){return e},Boolean:function(e){return e==="true"},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function er(e,t){var n=ra[e];return n?n(t):t}function Vr(e){return!!Gl[e]}function Hr(e){return!!ra[e]}function Re(e,t){var n=e.split(/:/),r,i;if(n.length===1)r=e,i=t;else if(n.length===2)r=n[1],i=n[0];else throw new Error("expected <prefix:localName> or <localName>, got "+e);return e=(i?i+":":"")+r,{name:e,prefix:i,localName:r}}function Ue(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}Ue.prototype.build=function(){return gr(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])};Ue.prototype.addProperty=function(e,t,n){typeof t=="boolean"&&(n=t,t=void 0),this.addNamedProperty(e,n!==!1);var r=this.properties;t!==void 0?r.splice(t,0,e):r.push(e)};Ue.prototype.replaceProperty=function(e,t,n){var r=e.ns,i=this.properties,o=this.propertiesByName,a=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=i.indexOf(e);if(s===-1)throw new Error("property <"+r.name+"> not found in property list");i.splice(s,1),this.addProperty(t,n?void 0:s,a),o[r.name]=o[r.localName]=t};Ue.prototype.redefineProperty=function(e,t,n){var r=e.ns.prefix,i=t.split("#"),o=Re(i[0],r),a=Re(i[1],o.prefix).name,s=this.propertiesByName[a];if(s)this.replaceProperty(s,e,n);else throw new Error("refined property <"+a+"> not found");delete e.redefines};Ue.prototype.addNamedProperty=function(e,t){var n=e.ns,r=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),r[n.name]=r[n.localName]=e};Ue.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]};Ue.prototype.setBodyProperty=function(e,t){if(t&&this.bodyProperty)throw new Error("body property defined multiple times (<"+this.bodyProperty.ns.name+">, <"+e.ns.name+">)");this.bodyProperty=e};Ue.prototype.setIdProperty=function(e,t){if(t&&this.idProperty)throw new Error("id property defined multiple times (<"+this.idProperty.ns.name+">, <"+e.ns.name+">)");this.idProperty=e};Ue.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)};Ue.prototype.assertNotDefined=function(e,t){var n=e.name,r=this.propertiesByName[n];if(r)throw new Error("property <"+n+"> already defined; override of <"+r.definedBy.ns.name+"#"+r.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")};Ue.prototype.hasProperty=function(e){return this.propertiesByName[e]};Ue.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,r=this.allTypes,i=e.name;i in n||(P(e.properties,Ye(function(o){o=M({},o,{name:o.ns.localName,inherited:t}),Object.defineProperty(o,"definedBy",{value:e});var a=o.replaces,s=o.redefines;a||s?this.redefineProperty(o,a||s,a):(o.isBody&&this.setBodyProperty(o),o.isId&&this.setIdProperty(o),this.addProperty(o))},this)),r.push(e),n[i]=e)};function Pt(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,P(e,Ye(this.registerPackage,this))}Pt.prototype.getPackage=function(e){return this.packageMap[e]};Pt.prototype.getPackages=function(){return this.packages};Pt.prototype.registerPackage=function(e){e=M({},e);var t=this.packageMap;ta(t,e,"prefix"),ta(t,e,"uri"),P(e.types,Ye(function(n){this.registerType(n,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)};Pt.prototype.registerType=function(e,t){e=M({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:M(e.meta||{})});var n=Re(e.name,t.prefix),r=n.name,i={};P(e.properties,Ye(function(o){var a=Re(o.name,n.prefix),s=a.name;Vr(o.type)||(o.type=Re(o.type,a.prefix).name),M(o,{ns:a,name:s}),i[s]=o},this)),M(e,{ns:n,name:r,propertiesByName:i}),P(e.extends,Ye(function(o){var a=Re(o,n.prefix),s=this.typeMap[a.name];s.traits=s.traits||[],s.traits.push(r)},this)),this.definePackage(e,t),this.typeMap[r]=e};Pt.prototype.mapTypes=function(e,t,n){var r=Vr(e.name)?{name:e.name}:this.typeMap[e.name],i=this;function o(c,f){var h=Re(c,Vr(c)?"":e.prefix);i.mapTypes(h,t,f)}function a(c){return o(c,!0)}function s(c){return o(c,!1)}if(!r)throw new Error("unknown type <"+e.name+">");P(r.superClass,n?a:s),t(r,!n),P(r.traits,a)};Pt.prototype.getEffectiveDescriptor=function(e){var t=Re(e),n=new Ue(t);this.mapTypes(t,function(i,o){n.addTrait(i,o)});var r=n.build();return this.definePackage(r,r.allTypes[r.allTypes.length-1].$pkg),r};Pt.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};function ta(e,t,n){var r=t[n];if(r in e)throw new Error("package with "+n+" <"+r+"> already defined")}function Ot(e){this.model=e}Ot.prototype.set=function(e,t,n){if(!De(t)||!t.length)throw new TypeError("property name must be a non-empty string");var r=this.getProperty(e,t),i=r&&r.name;Kl(n)?r?delete e[i]:delete e.$attrs[qr(t)]:r?i in e?e[i]=n:ia(e,r,n):e.$attrs[qr(t)]=n};Ot.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[qr(t)];var r=n.name;return!e[r]&&n.isMany&&ia(e,n,[]),e[r]};Ot.prototype.define=function(e,t,n){if(!n.writable){var r=n.value;n=M({},n,{get:function(){return r}}),delete n.value}Object.defineProperty(e,t,n)};Ot.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})};Ot.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})};Ot.prototype.getProperty=function(e,t){var n=this.model,r=n.getPropertyDescriptor(e,t);if(r)return r;if(t.includes(":"))return null;let i=n.config.strict;if(typeof i!="undefined"){let o=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(i)throw o;typeof console!="undefined"&&console.warn(o)}return null};function Kl(e){return typeof e=="undefined"}function ia(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function qr(e){return e.replace(/^:/,"")}function Fe(e,t={}){this.properties=new Ot(this),this.factory=new na(this,this.properties),this.registry=new Pt(e,this.properties),this.typeCache={},this.config=t}Fe.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)};Fe.prototype.getType=function(e){var t=this.typeCache,n=De(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r};Fe.prototype.createAny=function(e,t,n){var r=Re(e),i={$type:e,$instanceOf:function(a){return a===this.$type},get:function(a){return this[a]},set:function(a,s){yr(this,[a],s)}},o={name:e,isGeneric:!0,ns:{prefix:r.prefix,localName:r.localName,uri:t}};return this.properties.defineDescriptor(i,o),this.properties.defineModel(i,this),this.properties.define(i,"get",{enumerable:!1,writable:!0}),this.properties.define(i,"set",{enumerable:!1,writable:!0}),this.properties.define(i,"$parent",{enumerable:!1,writable:!0}),this.properties.define(i,"$instanceOf",{enumerable:!1,writable:!0}),P(n,function(a,s){_e(a)&&a.value!==void 0?i[a.name]=a.value:i[s]=a}),i};Fe.prototype.getPackage=function(e){return this.registry.getPackage(e)};Fe.prototype.getPackages=function(){return this.registry.getPackages()};Fe.prototype.getElementDescriptor=function(e){return e.$descriptor};Fe.prototype.hasType=function(e,t){t===void 0&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return t in n.allTypesByName};Fe.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]};Fe.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};Q();var oa=String.fromCharCode,Yl=Object.prototype.hasOwnProperty,Xl=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,hn={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(hn).forEach(function(e){hn[e.toUpperCase()]=hn[e]});function Zl(e,t,n,r){return r?Yl.call(hn,r)?hn[r]:"&"+r+";":oa(t||parseInt(n,16))}function Lt(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(Xl,Zl):e}var aa="non-whitespace outside of root node";function Xt(e){return new Error(e)}function sa(e){return"missing namespace for prefix <"+e+">"}function tr(e){return{get:e,enumerable:!0}}function Ql(e){var t={},n;for(n in e)t[n]=e[n];return t}function zr(e){return e+"$uri"}function Jl(e){var t={},n,r;for(n in e)r=e[n],t[r]=r,t[zr(r)]=n;return t}function ua(){return{line:0,column:0}}function ec(e){throw e}function Ur(e){if(!this)return new Ur(e);var t=e&&e.proxy,n,r,i,o,a=ec,s,c,f,h,y=ua,v=!1,A=!1,W=null,L=!1,O;function H(g){g instanceof Error||(g=Xt(g)),W=g,a(g,y)}function G(g){s&&(g instanceof Error||(g=Xt(g)),s(g,y))}this.on=function(g,w){if(typeof w!="function")throw Xt("required args <name, cb>");switch(g){case"openTag":r=w;break;case"text":n=w;break;case"closeTag":i=w;break;case"error":a=w;break;case"warn":s=w;break;case"cdata":o=w;break;case"attention":h=w;break;case"question":f=w;break;case"comment":c=w;break;default:throw Xt("unsupported event: "+g)}return this},this.ns=function(g){if(typeof g=="undefined"&&(g={}),typeof g!="object")throw Xt("required args <nsMap={}>");var w={},C;for(C in g)w[C]=g[C];return A=!0,O=w,this},this.parse=function(g){if(typeof g!="string")throw Xt("required args <xml=string>");return W=null,T(g),y=ua,L=!1,W},this.stop=function(){L=!0};function T(g){var w=A?[]:null,C=A?Jl(O):null,V,b=[],D=0,R=!1,F=!1,B=0,I=0,K,ot,ae,Z,Je,et,ye,Ge,x,_="",$=0,re;function je(){if(re!==null)return re;var l,u,m,d=A&&C.xmlns,E=A&&v?[]:null,S=$,j=_,Y=j.length,ge,he,we,Ke,ie,mt={},gn={},$e,z,J;e:for(;S<Y;S++)if($e=!1,z=j.charCodeAt(S),!(z===32||z<14&&z>8)){for((z<65||z>122||z>90&&z<97)&&z!==95&&z!==58&&(G("illegal first char attribute name"),$e=!0),J=S+1;J<Y;J++)if(z=j.charCodeAt(J),!(z>96&&z<123||z>64&&z<91||z>47&&z<59||z===46||z===45||z===95)){if(z===32||z<14&&z>8){G("missing attribute value"),S=J;continue e}if(z===61)break;G("illegal attribute name char"),$e=!0}if(ie=j.substring(S,J),ie==="xmlns:xmlns"&&(G("illegal declaration of xmlns"),$e=!0),z=j.charCodeAt(J+1),z===34)J=j.indexOf('"',S=J+2),J===-1&&(J=j.indexOf("'",S),J!==-1&&(G("attribute value quote missmatch"),$e=!0));else if(z===39)J=j.indexOf("'",S=J+2),J===-1&&(J=j.indexOf('"',S),J!==-1&&(G("attribute value quote missmatch"),$e=!0));else for(G("missing attribute value quotes"),$e=!0,J=J+1;J<Y&&(z=j.charCodeAt(J+1),!(z===32||z<14&&z>8));J++);for(J===-1&&(G("missing closing quotes"),J=Y,$e=!0),$e||(we=j.substring(S,J)),S=J;J+1<Y&&(z=j.charCodeAt(J+1),!(z===32||z<14&&z>8));J++)S===J&&(G("illegal character after attribute end"),$e=!0);if(S=J+1,$e)continue e;if(ie in gn){G("attribute <"+ie+"> already defined");continue}if(gn[ie]=!0,!A){mt[ie]=we;continue}if(v){if(he=ie==="xmlns"?"xmlns":ie.charCodeAt(0)===120&&ie.substr(0,6)==="xmlns:"?ie.substr(6):null,he!==null){if(l=Lt(we),u=zr(he),Ke=O[l],!Ke){if(he==="xmlns"||u in C&&C[u]!==l)do Ke="ns"+D++;while(typeof C[Ke]!="undefined");else Ke=he;O[l]=Ke}C[he]!==Ke&&(ge||(C=Ql(C),ge=!0),C[he]=Ke,he==="xmlns"&&(C[zr(Ke)]=l,d=Ke),C[u]=l),mt[ie]=we;continue}E.push(ie,we);continue}if(z=ie.indexOf(":"),z===-1){mt[ie]=we;continue}if(!(m=C[ie.substring(0,z)])){G(sa(ie.substring(0,z)));continue}ie=d===m?ie.substr(z+1):m+ie.substr(z),mt[ie]=we}if(v)for(S=0,Y=E.length;S<Y;S++){if(ie=E[S++],we=E[S],z=ie.indexOf(":"),z!==-1){if(!(m=C[ie.substring(0,z)])){G(sa(ie.substring(0,z)));continue}ie=d===m?ie.substr(z+1):m+ie.substr(z)}mt[ie]=we}return re=mt}function p(){for(var l=/(\r\n|\r|\n)/g,u=0,m=0,d=0,E=I,S,j;B>=d&&(S=l.exec(g),!(!S||(E=S[0].length+S.index,E>B)));)u+=1,d=E;return B==-1?(m=E,j=g.substring(I)):I===0?j=g.substring(I,B):(m=B-d,j=I==-1?g.substring(B):g.substring(B,I+1)),{data:j,line:u,column:m}}for(y=p,t&&(x=Object.create({},{name:tr(function(){return ye}),originalName:tr(function(){return Ge}),attrs:tr(je),ns:tr(function(){return C})}));I!==-1;){if(g.charCodeAt(I)===60?B=I:B=g.indexOf("<",I),B===-1){if(b.length)return H("unexpected end of file");if(I===0)return H("missing start tag");I<g.length&&g.substring(I).trim()&&G(aa);return}if(I!==B){if(b.length){if(n&&(n(g.substring(I,B),Lt,y),L))return}else if(g.substring(I,B).trim()&&(G(aa),L))return}if(Z=g.charCodeAt(B+1),Z===33){if(ae=g.charCodeAt(B+2),ae===91&&g.substr(B+3,6)==="CDATA["){if(I=g.indexOf("]]>",B),I===-1)return H("unclosed cdata");if(o&&(o(g.substring(B+9,I),y),L))return;I+=3;continue}if(ae===45&&g.charCodeAt(B+3)===45){if(I=g.indexOf("-->",B),I===-1)return H("unclosed comment");if(c&&(c(g.substring(B+4,I),Lt,y),L))return;I+=3;continue}}if(Z===63){if(I=g.indexOf("?>",B),I===-1)return H("unclosed question");if(f&&(f(g.substring(B,I+2),y),L))return;I+=2;continue}for(K=B+1;;K++){if(Je=g.charCodeAt(K),isNaN(Je))return I=-1,H("unclosed tag");if(Je===34)ae=g.indexOf('"',K+1),K=ae!==-1?ae:K;else if(Je===39)ae=g.indexOf("'",K+1),K=ae!==-1?ae:K;else if(Je===62){I=K;break}}if(Z===33){if(h&&(h(g.substring(B,I+1),Lt,y),L))return;I+=1;continue}if(re={},Z===47){if(R=!1,F=!0,!b.length)return H("missing open tag");if(K=ye=b.pop(),ae=B+2+K.length,g.substring(B+2,ae)!==K)return H("closing tag mismatch");for(;ae<I;ae++)if(Z=g.charCodeAt(ae),!(Z===32||Z>8&&Z<14))return H("close tag")}else{if(g.charCodeAt(I-1)===47?(K=ye=g.substring(B+1,I-1),R=!0,F=!0):(K=ye=g.substring(B+1,I),R=!0,F=!1),!(Z>96&&Z<123||Z>64&&Z<91||Z===95||Z===58))return H("illegal first char nodeName");for(ae=1,ot=K.length;ae<ot;ae++)if(Z=K.charCodeAt(ae),!(Z>96&&Z<123||Z>64&&Z<91||Z>47&&Z<59||Z===45||Z===95||Z==46)){if(Z===32||Z<14&&Z>8){ye=K.substring(0,ae),re=null;break}return H("invalid nodeName")}F||b.push(ye)}if(A){if(V=C,R&&(F||w.push(V),re===null&&(v=K.indexOf("xmlns",ae)!==-1)&&($=ae,_=K,je(),v=!1)),Ge=ye,Z=ye.indexOf(":"),Z!==-1){if(et=C[ye.substring(0,Z)],!et)return H("missing namespace on <"+Ge+">");ye=ye.substr(Z+1)}else et=C.xmlns;et&&(ye=et+":"+ye)}if(R&&($=ae,_=K,r&&(t?r(x,Lt,F,y):r(ye,je,Lt,F,y),L)))return;if(F){if(i&&(i(t?x:ye,Lt,R,y),L))return;A&&(R?C=V:C=w.pop())}I+=1}}}function la(e){return e.xml&&e.xml.tagAlias==="lowerCase"}var Gr={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},ca="property";function fa(e){return e.xml&&e.xml.serialize}function tc(e){let t=fa(e);return t!==ca&&(t||null)}function nc(e){return e.charAt(0).toUpperCase()+e.slice(1)}function pa(e,t){return la(t)?e.prefix+":"+nc(e.localName):e.name}function rc(e,t){var n=e.name,r=e.localName,i=t&&t.xml&&t.xml.typePrefix;return i&&r.indexOf(i)===0?e.prefix+":"+r.slice(i.length):n}function ic(e,t,n){let r=Re(e,t.xmlns),i=`${t[r.prefix]||r.prefix}:${r.localName}`,o=Re(i);var a=n.getPackage(o.prefix);return rc(o,a)}function kt(e){return new Error(e)}function xt(e){return e.$descriptor}function oc(e){M(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t)},this.addElement=function(t){if(!t)throw kt("expected element");var n=this.elementsById,r=xt(t),i=r.idProperty,o;if(i&&(o=t.get(i.name),o)){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(o))throw new Error("illegal ID <"+o+">");if(n[o])throw kt("duplicate ID <"+o+">");n[o]=t}},this.addWarning=function(t){this.warnings.push(t)}}function mn(){}mn.prototype.handleEnd=function(){};mn.prototype.handleText=function(){};mn.prototype.handleNode=function(){};function Kr(){}Kr.prototype=Object.create(mn.prototype);Kr.prototype.handleNode=function(){return this};function Qt(){}Qt.prototype=Object.create(mn.prototype);Qt.prototype.handleText=function(e){this.body=(this.body||"")+e};function dn(e,t){this.property=e,this.context=t}dn.prototype=Object.create(Qt.prototype);dn.prototype.handleNode=function(e){if(this.element)throw kt("expected no sub nodes");return this.element=this.createReference(e),this};dn.prototype.handleEnd=function(){this.element.id=this.body};dn.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}};function Yr(e,t){this.element=t,this.propertyDesc=e}Yr.prototype=Object.create(Qt.prototype);Yr.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=er(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)};function nr(){}nr.prototype=Object.create(Qt.prototype);nr.prototype.handleNode=function(e){var t=this,n=this.element;return n?t=this.handleChild(e):(n=this.element=this.createElement(e),this.context.addElement(n)),t};function Te(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}Te.prototype=Object.create(nr.prototype);Te.prototype.addReference=function(e){this.context.addReference(e)};Te.prototype.handleText=function(e){var t=this.element,n=xt(t),r=n.bodyProperty;if(!r)throw kt("unexpected body text <"+e+">");Qt.prototype.handleText.call(this,e)};Te.prototype.handleEnd=function(){var e=this.body,t=this.element,n=xt(t),r=n.bodyProperty;r&&e!==void 0&&(e=er(r.type,e),t.set(r.name,e))};Te.prototype.createElement=function(e){var t=e.attributes,n=this.type,r=xt(n),i=this.context,o=new n({}),a=this.model,s;return P(t,function(c,f){var h=r.propertiesByName[f],y;h&&h.isReference?h.isMany?(y=c.split(" "),P(y,function(v){i.addReference({element:o,property:h.ns.name,id:v})})):i.addReference({element:o,property:h.ns.name,id:c}):(h?c=er(h.type,c):f==="xmlns"?f=":"+f:(s=Re(f,r.ns.prefix),a.getPackage(s.prefix)&&i.addWarning({message:"unknown attribute <"+f+">",element:o,property:f,value:c})),o.set(f,c))}),o};Te.prototype.getPropertyForNode=function(e){var t=e.name,n=Re(t),r=this.type,i=this.model,o=xt(r),a=n.name,s=o.propertiesByName[a];if(s&&!s.isAttr){let f=tc(s);if(f){let h=e.attributes[f];if(h){let y=ic(h,e.ns,i),v=i.getType(y);return M({},s,{effectiveType:xt(v).name})}}return s}var c=i.getPackage(n.prefix);if(c){let f=pa(n,c),h=i.getType(f);if(s=ve(o.properties,function(y){return!y.isVirtual&&!y.isReference&&!y.isAttribute&&h.hasType(y.type)}),s)return M({},s,{effectiveType:xt(h).name})}else if(s=ve(o.properties,function(f){return!f.isReference&&!f.isAttribute&&f.type==="Element"}),s)return s;throw kt("unrecognized element <"+n.name+">")};Te.prototype.toString=function(){return"ElementDescriptor["+xt(this.type).name+"]"};Te.prototype.valueHandler=function(e,t){return new Yr(e,t)};Te.prototype.referenceHandler=function(e){return new dn(e,this.context)};Te.prototype.handler=function(e){return e==="Element"?new Zt(this.model,e,this.context):new Te(this.model,e,this.context)};Te.prototype.handleChild=function(e){var t,n,r,i;if(t=this.getPropertyForNode(e),r=this.element,n=t.effectiveType||t.type,Hr(n))return this.valueHandler(t,r);t.isReference?i=this.referenceHandler(t).handleNode(e):i=this.handler(n).handleNode(e);var o=i.element;return o!==void 0&&(t.isMany?r.get(t.name).push(o):r.set(t.name,o),t.isReference?(M(o,{element:r}),this.context.addReference(o)):o.$parent=r),i};function Xr(e,t,n){Te.call(this,e,t,n)}Xr.prototype=Object.create(Te.prototype);Xr.prototype.createElement=function(e){var t=e.name,n=Re(t),r=this.model,i=this.type,o=r.getPackage(n.prefix),a=o&&pa(n,o)||t;if(!i.hasType(a))throw kt("unexpected element <"+e.originalName+">");return Te.prototype.createElement.call(this,e)};function Zt(e,t,n){this.model=e,this.context=n}Zt.prototype=Object.create(nr.prototype);Zt.prototype.createElement=function(e){var t=e.name,n=Re(t),r=n.prefix,i=e.ns[r+"$uri"],o=e.attributes;return this.model.createAny(t,i,o)};Zt.prototype.handleChild=function(e){var t=new Zt(this.model,"Element",this.context).handleNode(e),n=this.element,r=t.element,i;return r!==void 0&&(i=n.$children=n.$children||[],i.push(r),r.$parent=n),t};Zt.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)};function rr(e){e instanceof Fe&&(e={model:e}),M(this,{lax:!1},e)}rr.prototype.fromXML=function(e,t,n){var r=t.rootHandler;t instanceof Te?(r=t,t={}):typeof t=="string"?(r=this.handler(t),t={}):typeof r=="string"&&(r=this.handler(r));var i=this.model,o=this.lax,a=new oc(M({},t,{rootHandler:r})),s=new Ur({proxy:!0}),c=ac();r.context=a,c.push(r);function f(w,C,V){var b=C(),D=b.line,R=b.column,F=b.data;F.charAt(0)==="<"&&F.indexOf(" ")!==-1&&(F=F.slice(0,F.indexOf(" "))+">");var B="unparsable content "+(F?F+" ":"")+`detected method in _e
|