camunda-bpmn-js 4.6.0 → 4.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).BpmnModeler=t()}(this,(function(){"use strict";function e(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}var t=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var t=e.exports=function(e,n){if(n||(n=16),void 0===e&&(e=128),e<=0)return"0";for(var r=Math.log(Math.pow(2,e))/Math.log(n),i=2;r===1/0;i*=2)r=Math.log(Math.pow(2,e/i))/Math.log(n)*i;var o=r-Math.floor(r),s="";for(i=0;i<Math.floor(r);i++){s=Math.floor(Math.random()*n).toString(n)+s}if(o){var a=Math.pow(n,o);s=Math.floor(Math.random()*a).toString(n)+s}var l=parseInt(s,n);return l!==1/0&&l>=Math.pow(2,e)?t(e,n):s};t.rack=function(e,n,r){var i=function(i){var s=0;do{if(s++>10){if(!r)throw new Error("too many ID collisions, use more bits");e+=r}var a=t(e,n)}while(Object.hasOwnProperty.call(o,a));return o[a]=i,a},o=i.hats={};return i.get=function(e){return i.hats[e]},i.set=function(e,t){return i.hats[e]=t,i},i.bits=e||128,i.base=n||16,i}}));function n(e){if(!(this instanceof n))return new n(e);e=e||[128,36,1],this._seed=e.length?t.rack(e[0],e[1],e[2]):e}function r(e){return Array.prototype.concat.apply([],e)}n.prototype.next=function(e){return this._seed(e||!0)},n.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},n.prototype.claim=function(e,t){this._seed.set(e,t||!0)},n.prototype.assigned=function(e){return this._seed.get(e)||!1},n.prototype.unclaim=function(e){delete this._seed.hats[e]},n.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};const i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;function s(e){return void 0===e}function a(e){return void 0!==e}function l(e){return null==e}function c(e){return"[object Array]"===i.call(e)}function p(e){return"[object Object]"===i.call(e)}function u(e){return"[object Number]"===i.call(e)}function d(e){const t=i.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function h(e){return"[object String]"===i.call(e)}function f(e,t){return o.call(e,t)}function m(e,t){const n=D(t);let r;return v(e,(function(e,t){if(n(e,t))return r=e,!1})),r}function g(e,t){const n=D(t);let r=c(e)?-1:void 0;return v(e,(function(e,t){if(n(e,t))return r=t,!1})),r}function y(e,t){const n=D(t);let r=[];return v(e,(function(e,t){n(e,t)&&r.push(e)})),r}function v(e,t){let n,r;if(s(e))return;const i=c(e)?R:N;for(let o in e)if(f(e,o)&&(n=e[o],r=t(n,i(o)),!1===r))return n}function b(e,t){if(s(e))return[];!function(e){if(!c(e))throw new Error("must supply array")}(e);const n=D(t);return e.filter((function(e,t){return!n(e,t)}))}function w(e,t,n){return v(e,(function(e,r){n=t(n,e,r)})),n}function x(e,t){return!!w(e,(function(e,n,r){return e&&t(n,r)}),!0)}function _(e,t){return!!m(e,t)}function k(e,t){let n=[];return v(e,(function(e,r){n.push(t(e,r))})),n}function E(e){return e&&Object.keys(e)||[]}function O(e){return k(e,(e=>e))}function P(e,t,n={}){return t=A(t),v(e,(function(e){let r=t(e)||"_",i=n[r];i||(i=n[r]=[]),i.push(e)})),n}function S(e,...t){e=A(e);let n={};return v(t,(t=>P(t,e,n))),k(n,(function(e,t){return e[0]}))}const C=S;function T(e,t){t=A(t);let n=[];return v(e,(function(e,r){let i=t(e,r),o={d:i,v:e};for(var s=0;s<n.length;s++){let{d:e}=n[s];if(i<e)return void n.splice(s,0,o)}n.push(o)})),k(n,(e=>e.v))}function M(e){return function(t){return x(e,(function(e,n){return t[n]===e}))}}function A(e){return d(e)?e:t=>t[e]}function D(e){return d(e)?e:t=>t===e}function N(e){return e}function R(e){return Number(e)}function j(e,t){let n,r,i,o;function s(n){let s=Date.now(),c=n?0:o+t-s;if(c>0)return a(c);e.apply(i,r),l()}function a(e){n=setTimeout(s,e)}function l(){n&&clearTimeout(n),n=o=r=i=void 0}function c(...e){o=Date.now(),r=e,i=this,n||a(t)}return c.flush=function(){n&&s(!0),l()},c.cancel=l,c}function I(e,t){return e.bind(t)}function L(e,...t){return Object.assign(e,...t)}function z(e,t,n){let r=e;return v(t,(function(e,i){if("number"!=typeof e&&"string"!=typeof e)throw new Error("illegal key type: "+typeof e+". Key should be of type number or string.");if("constructor"===e)throw new Error("illegal key: constructor");if("__proto__"===e)throw new Error("illegal key: __proto__");let o=t[i+1],c=r[e];a(o)&&l(c)&&(c=r[e]=isNaN(+o)?{}:[]),s(o)?s(n)?delete r[e]:r[e]=n:r=c})),e}function B(e,t,n){let r=e;return v(t,(function(e){if(l(r))return r=void 0,!1;r=r[e]})),s(r)?n:r}function $(e,t){let n={},r=Object(e);return v(t,(function(t){t in r&&(n[t]=e[t])})),n}function q(e,t){let n={};return v(Object(e),(function(e,r){-1===t.indexOf(r)&&(n[r]=e)})),n}function F(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const V=Object.prototype.toString,H=Object.prototype.hasOwnProperty;function U(e,t){return H.call(e,t)}function W(e,t){let n,r;if(void 0===e)return;const i=function(e){return"[object Array]"===V.call(e)}(e)?Q:G;for(let o in e)if(U(e,o)&&(n=e[o],r=t(n,i(o)),!1===r))return n}function G(e){return e}function Q(e){return Number(e)}function X(e,...t){const n=e.style;return W(t,(function(e){e&&W(e,(function(e,t){n[t]=e}))})),e}const Z=Object.prototype.toString;function Y(e){return new K(e)}function K(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function J(e,t){return e&&"function"==typeof e.matches&&e.matches(t)}K.prototype.add=function(e){return this.list.add(e),this},K.prototype.remove=function(e){return"[object RegExp]"==Z.call(e)?this.removeMatching(e):(this.list.remove(e),this)},K.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},K.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},K.prototype.array=function(){return Array.from(this.list)},K.prototype.has=K.prototype.contains=function(e){return this.list.contains(e)};var ee,te,ne,re={};function ie(){ee=window.addEventListener?"addEventListener":"attachEvent",te=window.removeEventListener?"removeEventListener":"detachEvent",ne="addEventListener"!==ee?"on":""}var oe=re.bind=function(e,t,n,r){return ee||ie(),e[ee](ne+t,n,r||!1),n},se=re.unbind=function(e,t,n,r){return te||ie(),e[te](ne+t,n,r||!1),n},ae=F({__proto__:null,bind:oe,unbind:se,default:re},[re]),le=["focus","blur"];var ce,pe={bind:function(e,t,n,r,i){return-1!==le.indexOf(n)&&(i=!0),ae.bind(e,n,(function(n){var i=n.target||n.srcElement;n.delegateTarget=function(e,t,n){for(var r=n?e:e.parentNode;r&&r.nodeType!==document.DOCUMENT_NODE&&r.nodeType!==document.DOCUMENT_FRAGMENT_NODE;){if(J(r,t))return r;r=r.parentNode}return J(r,t)?r:null}(i,t,!0),n.delegateTarget&&r.call(e,n)}),i)},unbind:function(e,t,n,r){return-1!==le.indexOf(t)&&(r=!0),ae.unbind(e,t,n,r)}},ue=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var r=n[1];if("body"==r){return(l=t.createElement("html")).innerHTML=e,l.removeChild(l.lastChild)}var i=Object.prototype.hasOwnProperty.call(he,r)?he[r]:he._default,o=i[0],s=i[1],a=i[2],l=t.createElement("div");l.innerHTML=s+e+a;for(;o--;)l=l.lastChild;if(l.firstChild==l.lastChild)return l.removeChild(l.firstChild);var c=t.createDocumentFragment();for(;l.firstChild;)c.appendChild(l.removeChild(l.firstChild));return c},de=!1;"undefined"!=typeof document&&((ce=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',de=!ce.getElementsByTagName("link").length,ce=void 0);var he={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:de?[1,"X<div>","</div>"]:[0,"",""]};he.td=he.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],he.option=he.optgroup=[1,'<select multiple="multiple">',"</select>"],he.thead=he.tbody=he.colgroup=he.caption=he.tfoot=[1,"<table>","</table>"],he.polyline=he.ellipse=he.polygon=he.circle=he.text=he.line=he.path=he.rect=he.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var fe=ue;function me(e,t){return(t=t||document).querySelector(e)}function ge(e,t){return t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}(e,t))}function ye(e,t){return ge(t,e),e}var ve=2,be={"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":ve,"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":ve,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function we(e,t,n){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=be[r];i?(i===ve&&"number"==typeof n&&(n=String(n)+"px"),e.style[r]=n):e.setAttributeNS(null,t,n)}function xe(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return be[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);we(e,t,n)}else!function(e,t){var n,r,i=Object.keys(t);for(n=0;r=i[n];n++)we(e,r,t[r])}(e,t);return e}const _e=Object.prototype.toString;function ke(e){return new Ee(e)}function Ee(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Oe(e){var t=e.parentNode;return t&&t.removeChild(e),e}function Pe(e){for(var t;t=e.firstChild;)Oe(t);return e}function Se(e){return e.cloneNode(!0)}Ee.prototype.add=function(e){return this.list.add(e),this},Ee.prototype.remove=function(e){return"[object RegExp]"==_e.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Ee.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Ee.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Ee.prototype.array=function(){return Array.from(this.list)},Ee.prototype.has=Ee.prototype.contains=function(e){return this.list.contains(e)};var Ce={svg:"http://www.w3.org/2000/svg"},Te='<svg xmlns="'+Ce.svg+'"';function Me(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(Ce.svg)&&(e=Te+e.substring(4)):(e=Te+">"+e+"</svg>",t=!0);var n=function(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var r=document.createDocumentFragment(),i=n.firstChild;i.firstChild;)r.appendChild(i.firstChild);return r}function Ae(e,t){var n;return"<"===e.charAt(0)?(n=Me(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(Ce.svg,e),t&&xe(n,t),n}var De=null;function Ne(){return null===De&&(De=Ae("svg")),De}function Re(e,t){var n,r,i=Object.keys(t);for(n=0;r=i[n];n++)e[r]=t[r];return e}function je(e){return e?Ne().createSVGTransformFromMatrix(e):Ne().createSVGTransform()}var Ie=/([&<>]{1})/g,Le=/([\n\r"]{1})/g,ze={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function Be(e,t){return e.replace(t,(function(e,t){return ze[t]||t}))}function $e(e,t){var n,r,i,o,s;switch(e.nodeType){case 3:t.push(Be(e.textContent,Ie));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,r=(i=e.attributes).length;n<r;++n)o=i.item(n),t.push(" ",o.name,'="',Be(o.value,Le),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,r=(s=e.childNodes).length;n<r;++n)$e(s.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",Be(e.nodeValue,Ie),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function qe(e,t){var n=Me(t);if(Pe(e),t){(function(e){return"#document-fragment"===e.nodeName})(n)||(n=n.documentElement);for(var r,i=(r=n.childNodes,Array.prototype.slice.call(r)),o=0;o<i.length;o++)ge(i[o],e)}}function Fe(e,t){if(void 0!==t){try{qe(e,t)}catch(e){throw new Error("error parsing SVG: "+e.message)}return e}return function(e){for(var t=e.firstChild,n=[];t;)$e(t,n),t=t.nextSibling;return n.join("")}(e)}function Ve(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function He(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,r;for(e.clear(),n=0;r=t[n];n++)e.appendItem(Ve(e,r))}(n,t)),n.consolidate()}const Ue=/^class[ {]/;function We(e){return Array.isArray(e)}function Ge(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Qe(...e){1===e.length&&We(e[0])&&(e=e[0]);const t=(e=[...e]).pop();return t.$inject=e,t}const Xe=/constructor\s*[^(]*\(\s*([^)]*)\)/m,Ze=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,Ye=/\/\*([^*]*)\*\//m;function Ke(e){if("function"!=typeof e)throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(function(e){return Ue.test(e.toString())}(e)?Xe:Ze);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map((e=>{const t=e.match(Ye);return(t&&t[1]||e).trim()}))||[]}function Je(e,t){const n=t||{get:function(e,t){if(r.push(e),!1===t)return null;throw a(`No provider for "${e}"!`)}},r=[],i=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),s=o.injector=this,a=function(e){const t=r.join(" -> ");return r.length=0,new Error(t?`${e} (Resolving: ${t})`:e)};function l(e,t){if(!i[e]&&e.includes(".")){const t=e.split(".");let n=l(t.shift());for(;t.length;)n=n[t.shift()];return n}if(Ge(o,e))return o[e];if(Ge(i,e)){if(-1!==r.indexOf(e))throw r.push(e),a("Cannot resolve circular dependency!");return r.push(e),o[e]=i[e][0](i[e][1]),r.pop(),o[e]}return n.get(e,t)}function c(e,t){if(void 0===t&&(t={}),"function"!=typeof e){if(!We(e))throw a(`Cannot invoke "${e}". Expected a function!`);e=Qe(e.slice())}return{fn:e,dependencies:(e.$inject||Ke(e)).map((e=>Ge(t,e)?t[e]:l(e)))}}function p(e){const{fn:t,dependencies:n}=c(e);return new(Function.prototype.bind.call(t,null,...n))}function u(e,t,n){const{fn:r,dependencies:i}=c(e,n);return r.apply(t,i)}function d(e){return Qe((t=>e.get(t)))}function h(e,t){if(t&&t.length){const n=Object.create(null),r=Object.create(null),o=[],s=[],a=[];let l,c,p,u;for(let e in i)l=i[e],-1!==t.indexOf(e)&&("private"===l[2]?(c=o.indexOf(l[3]),-1===c?(p=l[3].createChild([],t),u=d(p),o.push(l[3]),s.push(p),a.push(u),n[e]=[u,e,"private",p]):n[e]=[a[c],e,"private",s[c]]):n[e]=[l[2],l[1]],r[e]=!0),"factory"!==l[2]&&"type"!==l[2]||!l[1].$scope||t.forEach((t=>{-1!==l[1].$scope.indexOf(t)&&(n[e]=[l[2],l[1]],r[t]=!0)}));t.forEach((e=>{if(!r[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')})),e.unshift(n)}return new Je(e,s)}const f={factory:u,type:p,value:function(e){return e}};function m(e,t){const n=e.__init__||[];return function(){n.forEach((e=>{"string"==typeof e?t.get(e):t.invoke(e)}))}}function g(e){const t=e.__exports__;if(t){const n=e.__modules__,r=Object.keys(e).reduce(((t,n)=>("__exports__"!==n&&"__modules__"!==n&&"__init__"!==n&&"__depends__"!==n&&(t[n]=e[n]),t)),Object.create(null)),o=h((n||[]).concat(r)),s=Qe((function(e){return o.get(e)}));t.forEach((function(e){i[e]=[s,e,"private",o]}));const a=(e.__init__||[]).slice();return a.unshift((function(){o.init()})),m(e=Object.assign({},e,{__init__:a}),o)}return Object.keys(e).forEach((function(t){if("__init__"===t||"__depends__"===t)return;const n=e[t];if("private"===n[2])return void(i[t]=n);const r=n[0],o=n[1];i[t]=[f[r],et(r,o),r]})),m(e,s)}function y(e,t){return-1!==e.indexOf(t)||-1!==(e=(t.__depends__||[]).reduce(y,e)).indexOf(t)?e:e.concat(t)}this.get=l,this.invoke=u,this.instantiate=p,this.createChild=h,this.init=function(e){const t=e.reduce(y,[]).map(g);let n=!1;return function(){n||(n=!0,t.forEach((e=>e())))}}(e)}function et(e,t){return"value"!==e&&We(t)&&(t=Qe(t.slice())),t}var tt=1e3;function nt(e,t){var n=this;t=t||tt,e.on(["render.shape","render.connection"],t,(function(e,t){var r=e.type,i=t.element,o=t.gfx,s=t.attrs;if(n.canRender(i))return"render.shape"===r?n.drawShape(o,i,s):n.drawConnection(o,i,s)})),e.on(["render.getShapePath","render.getConnectionPath"],t,(function(e,t){if(n.canRender(t))return"render.getShapePath"===e.type?n.getShapePath(t):n.getConnectionPath(t)}))}function rt(e){return e.flat().join(",").replace(/,?([A-z]),?/g,"$1")}function it(e){return["L",e.x,e.y]}function ot(e,t){const n=e.length,r=[(i=e[0],["M",i.x,i.y])];var i,o,s,a;for(let i=1;i<n;i++){const n=e[i-1],l=e[i],c=e[i+1];if(!c||!t){r.push(it(l));continue}const p=Math.min(t,at(l.x-n.x,l.y-n.y),at(c.x-l.x,c.y-l.y));if(!p){r.push(it(l));continue}const u=st(l,n,p),d=st(l,n,.5*p),h=st(l,c,p),f=st(l,c,.5*p);r.push(it(u)),r.push((s=f,a=h,["C",(o=d).x,o.y,s.x,s.y,a.x,a.y]))}return r}function st(e,t,n){const r=t.x-e.x,i=t.y-e.y,o=n/at(r,i);return{x:e.x+r*o,y:e.y+i*o}}function at(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function lt(e,t,n){u(t)&&(n=t,t=null),t||(t={});const r=Ae("path",t);return u(n)&&(r.dataset.cornerRadius=String(n)),ct(r,e)}function ct(e,t){return xe(e,{d:rt(ot(t,parseInt(e.dataset.cornerRadius,10)||0))}),e}function pt(e){return y(e,(function(t){return!m(e,(function(e){return e!==t&&ut(t,e)}))}))}function ut(e,t){if(t){if(e===t)return t;if(e.parent)return ut(e.parent,t)}}function dt(e,t,n){var r=!n||-1===e.indexOf(t);return r&&e.push(t),r}function ht(e,t,n){n=n||0,c(e)||(e=[e]),v(e,(function(e,r){var i=t(e,r,n);c(i)&&i.length&&ht(i,t,n+1)}))}function ft(e,t){return function(e,t,n){var r=[],i=[];return ht(e,(function(e,o,s){dt(r,e,t);var a=e.children;if((-1===n||s<n)&&a&&dt(i,a,t))return a})),r}(e,!t,-1)}function mt(e,t){var n,r,i,o;return t=!!t,c(e)||(e=[e]),v(e,(function(e){var s=e;e.waypoints&&!t&&(s=mt(e.waypoints,!0));var a=s.x,l=s.y,c=s.height||0,p=s.width||0;(a<n||void 0===n)&&(n=a),(l<r||void 0===r)&&(r=l),(a+p>i||void 0===i)&&(i=a+p),(l+c>o||void 0===o)&&(o=l+c)})),{x:n,y:r,height:o-r,width:i-n}}function gt(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function yt(e){return!(!e||!e.isFrame)}function vt(e,t){return L({},e||{},t||{})}nt.prototype.canRender=function(e){},nt.prototype.drawShape=function(e,t){},nt.prototype.drawConnection=function(e,t){},nt.prototype.getShapePath=function(e){},nt.prototype.getConnectionPath=function(e){};function bt(e,t){nt.call(this,e,1),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})}e(bt,nt),bt.prototype.canRender=function(){return!0},bt.prototype.drawShape=function(e,t,n){var r=Ae("rect");return xe(r,{x:0,y:0,width:t.width||0,height:t.height||0}),yt(t)?xe(r,L({},this.FRAME_STYLE,n||{})):xe(r,L({},this.SHAPE_STYLE,n||{})),ye(e,r),r},bt.prototype.drawConnection=function(e,t,n){var r=lt(t.waypoints,L({},this.CONNECTION_STYLE,n||{}));return ye(e,r),r},bt.prototype.getShapePath=function(e){var t=e.x,n=e.y,r=e.width;return rt([["M",t,n],["l",r,0],["l",0,e.height],["l",-r,0],["z"]])},bt.prototype.getConnectionPath=function(e){var t,n,r=e.waypoints,i=[];for(t=0;n=r[t];t++)n=n.original||n,i.push([0===t?"M":"L",n.x,n.y]);return rt(i)},bt.$inject=["eventBus","styles"];var wt={__init__:["defaultRenderer"],defaultRenderer:["type",bt],styles:["type",function(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(e,t,n){return L(this.style(t,n),{class:e})},this.style=function(t,n){c(t)||n||(n=t,t=[]);var r=w(t,(function(t,n){return L(t,e[n]||{})}),{});return n?L(r,n):r},this.computeStyle=function(e,n,r){return c(n)||(r=n,n=[]),t.style(n||[],L({},r,e||{}))}}]};function xt(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const _t=Object.prototype.toString,kt=Object.prototype.hasOwnProperty;function Et(e,t){return kt.call(e,t)}function Ot(e,t){let n,r;if(void 0===e)return;const i=function(e){return"[object Array]"===_t.call(e)}(e)?St:Pt;for(let o in e)if(Et(e,o)&&(n=e[o],r=t(n,i(o)),!1===r))return n}function Pt(e){return e}function St(e){return Number(e)}function Ct(e,...t){const n=e.style;return Ot(t,(function(e){e&&Ot(e,(function(e,t){n[t]=e}))})),e}function Tt(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}const Mt=Object.prototype.toString;function At(e){return new Dt(e)}function Dt(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Nt(e){for(var t;e.childNodes.length;)t=e.childNodes[0],e.removeChild(t);return e}function Rt(e,t){return e&&"function"==typeof e.matches&&e.matches(t)}function jt(e,t,n){for(var r=n?e:e.parentNode;r&&r.nodeType!==document.DOCUMENT_NODE&&r.nodeType!==document.DOCUMENT_FRAGMENT_NODE;){if(Rt(r,t))return r;r=r.parentNode}return Rt(r,t)?r:null}Dt.prototype.add=function(e){return this.list.add(e),this},Dt.prototype.remove=function(e){return"[object RegExp]"==Mt.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Dt.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Dt.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Dt.prototype.array=function(){return Array.from(this.list)},Dt.prototype.has=Dt.prototype.contains=function(e){return this.list.contains(e)};var It,Lt,zt,Bt={};function $t(){It=window.addEventListener?"addEventListener":"attachEvent",Lt=window.removeEventListener?"removeEventListener":"detachEvent",zt="addEventListener"!==It?"on":""}var qt=Bt.bind=function(e,t,n,r){return It||$t(),e[It](zt+t,n,r||!1),n},Ft=Bt.unbind=function(e,t,n,r){return Lt||$t(),e[Lt](zt+t,n,r||!1),n},Vt=xt({__proto__:null,bind:qt,unbind:Ft,default:Bt},[Bt]),Ht=["focus","blur"];var Ut,Wt={bind:function(e,t,n,r,i){return-1!==Ht.indexOf(n)&&(i=!0),Vt.bind(e,n,(function(n){var i=n.target||n.srcElement;n.delegateTarget=jt(i,t,!0),n.delegateTarget&&r.call(e,n)}),i)},unbind:function(e,t,n,r){return-1!==Ht.indexOf(t)&&(r=!0),Vt.unbind(e,t,n,r)}},Gt=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var r=n[1];if("body"==r){return(l=t.createElement("html")).innerHTML=e,l.removeChild(l.lastChild)}var i=Object.prototype.hasOwnProperty.call(Xt,r)?Xt[r]:Xt._default,o=i[0],s=i[1],a=i[2],l=t.createElement("div");l.innerHTML=s+e+a;for(;o--;)l=l.lastChild;if(l.firstChild==l.lastChild)return l.removeChild(l.firstChild);var c=t.createDocumentFragment();for(;l.firstChild;)c.appendChild(l.removeChild(l.firstChild));return c},Qt=!1;"undefined"!=typeof document&&((Ut=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',Qt=!Ut.getElementsByTagName("link").length,Ut=void 0);var Xt={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:Qt?[1,"X<div>","</div>"]:[0,"",""]};Xt.td=Xt.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Xt.option=Xt.optgroup=[1,'<select multiple="multiple">',"</select>"],Xt.thead=Xt.tbody=Xt.colgroup=Xt.caption=Xt.tfoot=[1,"<table>","</table>"],Xt.polyline=Xt.ellipse=Xt.polygon=Xt.circle=Xt.text=Xt.line=Xt.path=Xt.rect=Xt.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var Zt=Gt;function Yt(e,t){return(t=t||document).querySelector(e)}function Kt(e,t){return(t=t||document).querySelectorAll(e)}function Jt(e){e.parentNode&&e.parentNode.removeChild(e)}function en(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return-1!==n&&e.splice(n,1),n}function tn(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var r=e.indexOf(t);if(-1!==r){if(r===n)return;if(-1===n)return;e.splice(r,1)}-1!==n?e.splice(n,0,t):e.push(t)}}function nn(e,t){return e&&t?e.indexOf(t):-1}function rn(e,t){return e&&t?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):-1}function on(e,t,n,r){if(void 0===r&&(r=5),!e||!t||!n)return!1;var i=(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),o=rn(e,t);return Math.abs(i/o)<=r}var sn=2;function an(e,t){var n=Array.from(arguments).flat();const r={x:"v",y:"h"};for(const[e,t]of Object.entries(r))if(ln(e,n))return t;return!1}function ln(e,t){const n=t[0];return x(t,(function(t){return Math.abs(n[e]-t[e])<=sn}))}function cn(e,t,n){return n=n||0,e.x>t.x-n&&e.y>t.y-n&&e.x<t.x+t.width+n&&e.y<t.y+t.height+n}function pn(e,t){return{x:Math.round(e.x+(t.x-e.x)/2),y:Math.round(e.y+(t.y-e.y)/2)}}var un=/,?([a-z]),?/gi,dn=parseFloat,hn=Math,fn=hn.PI,mn=hn.min,gn=hn.max,yn=hn.pow,vn=hn.abs,bn=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/gi,wn=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/gi,xn=Array.isArray||function(e){return e instanceof Array};function _n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function kn(e){if("function"==typeof e||Object(e)!==e)return e;var t=new e.constructor;for(var n in e)_n(e,n)&&(t[n]=kn(e[n]));return t}function En(e){var t=En.ps=En.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout((function(){for(var n in t)_n(t,n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])})),t[e]}function On(e,t,n,r){return 1===arguments.length&&(t=e.y,n=e.width,r=e.height,e=e.x),{x:e,y:t,width:n,height:r,x2:e+n,y2:t+r}}function Pn(){return this.join(",").replace(un,"$1")}function Sn(e){var t=kn(e);return t.toString=Pn,t}function Cn(e,t,n,r,i,o,s,a,l){var c=1-l,p=yn(c,3),u=yn(c,2),d=l*l*l,h=p*t+3*u*l*r+3*c*l*l*o+d*a;return{x:Rn(p*e+3*u*l*n+3*c*l*l*i+d*s),y:Rn(h)}}function Tn(e){var t=function(e,t,n,r,i,o,s,a){for(var l,c,p,u,d,h,f,m,g=[],y=[[],[]],v=0;v<2;++v)if(0==v?(c=6*e-12*n+6*i,l=-3*e+9*n-9*i+3*s,p=3*n-3*e):(c=6*t-12*r+6*o,l=-3*t+9*r-9*o+3*a,p=3*r-3*t),vn(l)<1e-12){if(vn(c)<1e-12)continue;0<(u=-p/c)&&u<1&&g.push(u)}else f=c*c-4*p*l,m=hn.sqrt(f),f<0||(0<(d=(-c+m)/(2*l))&&d<1&&g.push(d),0<(h=(-c-m)/(2*l))&&h<1&&g.push(h));var b,w=g.length,x=w;for(;w--;)b=1-(u=g[w]),y[0][w]=b*b*b*e+3*b*b*u*n+3*b*u*u*i+u*u*u*s,y[1][w]=b*b*b*t+3*b*b*u*r+3*b*u*u*o+u*u*u*a;return y[0][x]=e,y[1][x]=t,y[0][x+1]=s,y[1][x+1]=a,y[0].length=y[1].length=x+2,{x0:mn(...y[0]),y0:mn(...y[1]),x1:gn(...y[0]),y1:gn(...y[1])}}(...e);return On(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function Mn(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function An(e,t,n,r,i){return e*(e*(-3*t+9*n-9*r+3*i)+6*t-12*n+6*r)-3*t+3*n}function Dn(e,t,n,r,i,o,s,a,l){null==l&&(l=1);for(var c=(l=l>1?1:l<0?0:l)/2,p=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],u=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,h=0;h<12;h++){var f=c*p[h]+c,m=An(f,e,n,i,s),g=An(f,t,r,o,a),y=m*m+g*g;d+=u[h]*hn.sqrt(y)}return c*d}function Nn(e,t,n,r,i,o,s,a){if(!(gn(e,n)<mn(i,s)||mn(e,n)>gn(i,s)||gn(t,r)<mn(o,a)||mn(t,r)>gn(o,a))){var l=(e*r-t*n)*(o-a)-(t-r)*(i*a-o*s),c=(e-n)*(o-a)-(t-r)*(i-s);if(c){var p=Rn(((e*r-t*n)*(i-s)-(e-n)*(i*a-o*s))/c),u=Rn(l/c),d=+p.toFixed(2),h=+u.toFixed(2);if(!(d<+mn(e,n).toFixed(2)||d>+gn(e,n).toFixed(2)||d<+mn(i,s).toFixed(2)||d>+gn(i,s).toFixed(2)||h<+mn(t,r).toFixed(2)||h>+gn(t,r).toFixed(2)||h<+mn(o,a).toFixed(2)||h>+gn(o,a).toFixed(2)))return{x:p,y:u}}}}function Rn(e){return Math.round(1e11*e)/1e11}function jn(e,t,n){if(!function(e,t){return e=On(e),Mn(t=On(t),e.x,e.y)||Mn(t,e.x2,e.y)||Mn(t,e.x,e.y2)||Mn(t,e.x2,e.y2)||Mn(e,t.x,t.y)||Mn(e,t.x2,t.y)||Mn(e,t.x,t.y2)||Mn(e,t.x2,t.y2)||(e.x<t.x2&&e.x>t.x||t.x<e.x2&&t.x>e.x)&&(e.y<t.y2&&e.y>t.y||t.y<e.y2&&t.y>e.y)}(Tn(e),Tn(t)))return n?0:[];for(var r=Dn(...e),i=Dn(...t),o=zn(e)?1:~~(r/5)||1,s=zn(t)?1:~~(i/5)||1,a=[],l=[],c={},p=n?0:[],u=0;u<o+1;u++){var d=Cn(...e,u/o);a.push({x:d.x,y:d.y,t:u/o})}for(u=0;u<s+1;u++)d=Cn(...t,u/s),l.push({x:d.x,y:d.y,t:u/s});for(u=0;u<o;u++)for(var h=0;h<s;h++){var f,m=a[u],g=a[u+1],y=l[h],v=l[h+1],b=vn(g.x-m.x)<.01?"y":"x",w=vn(v.x-y.x)<.01?"y":"x",x=Nn(m.x,m.y,g.x,g.y,y.x,y.y,v.x,v.y);if(x){if(c[f=x.x.toFixed(9)+"#"+x.y.toFixed(9)])continue;c[f]=!0;var _=m.t+vn((x[b]-m[b])/(g[b]-m[b]))*(g.t-m.t),k=y.t+vn((x[w]-y[w])/(v[w]-y[w]))*(v.t-y.t);_>=0&&_<=1&&k>=0&&k<=1&&(n?p++:p.push({x:x.x,y:x.y,t1:_,t2:k}))}}return p}function In(e,t,n){e=Fn(e),t=Fn(t);for(var r,i,o,s,a,l,c,p,u,d,h=n?0:[],f=0,m=e.length;f<m;f++){var g=e[f];if("M"==g[0])r=a=g[1],i=l=g[2];else{"C"==g[0]?(r=(u=[r,i,...g.slice(1)])[6],i=u[7]):(u=[r,i,r,i,a,l,a,l],r=a,i=l);for(var y=0,v=t.length;y<v;y++){var b=t[y];if("M"==b[0])o=c=b[1],s=p=b[2];else{"C"==b[0]?(o=(d=[o,s,...b.slice(1)])[6],s=d[7]):(d=[o,s,o,s,c,p,c,p],o=c,s=p);var w=jn(u,d,n);if(n)h+=w;else{for(var x=0,_=w.length;x<_;x++)w[x].segment1=f,w[x].segment2=y,w[x].bez1=u,w[x].bez2=d;h=h.concat(w)}}}}}return h}function Ln(e){var t=En(e);if(t.abs)return Sn(t.abs);if(xn(e)&&xn(e&&e[0])||(e=function(e){if(!e)return null;var t=En(e);if(t.arr)return kn(t.arr);var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},r=[];return xn(e)&&xn(e[0])&&(r=kn(e)),r.length||String(e).replace(bn,(function(e,t,i){var o=[],s=t.toLowerCase();for(i.replace(wn,(function(e,t){t&&o.push(+t)})),"m"==s&&o.length>2&&(r.push([t,...o.splice(0,2)]),s="l",t="m"==t?"l":"L");o.length>=n[s]&&(r.push([t,...o.splice(0,n[s])]),n[s]););})),r.toString=En.toString,t.arr=kn(r),r}(e)),!e||!e.length)return[["M",0,0]];var n,r=[],i=0,o=0,s=0,a=0,l=0;"M"==e[0][0]&&(s=i=+e[0][1],a=o=+e[0][2],l++,r[0]=["M",i,o]);for(var c,p,u=l,d=e.length;u<d;u++){if(r.push(c=[]),(n=(p=e[u])[0])!=n.toUpperCase())switch(c[0]=n.toUpperCase(),c[0]){case"A":c[1]=p[1],c[2]=p[2],c[3]=p[3],c[4]=p[4],c[5]=p[5],c[6]=+p[6]+i,c[7]=+p[7]+o;break;case"V":c[1]=+p[1]+o;break;case"H":c[1]=+p[1]+i;break;case"M":s=+p[1]+i,a=+p[2]+o;default:for(var h=1,f=p.length;h<f;h++)c[h]=+p[h]+(h%2?i:o)}else for(var m=0,g=p.length;m<g;m++)c[m]=p[m];switch(n=n.toUpperCase(),c[0]){case"Z":i=+s,o=+a;break;case"H":i=c[1];break;case"V":o=c[1];break;case"M":s=c[c.length-2],a=c[c.length-1];default:i=c[c.length-2],o=c[c.length-1]}}return r.toString=Pn,t.abs=Sn(r),r}function zn(e){return e[0]===e[2]&&e[1]===e[3]&&e[4]===e[6]&&e[5]===e[7]}function Bn(e,t,n,r){return[e,t,n,r,n,r]}function $n(e,t,n,r,i,o){var s=1/3,a=2/3;return[s*e+a*n,s*t+a*r,s*i+a*n,s*o+a*r,i,o]}function qn(e,t,n,r,i,o,s,a,l,c){var p,u=120*fn/180,d=fn/180*(+i||0),h=[],f=function(e){return function t(){var n=Array.prototype.slice.call(arguments,0).join("␀"),r=t.cache=t.cache||{},i=t.count=t.count||[];return _n(r,n)?(function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}(i,n),r[n]):(i.length>=1e3&&delete r[i.shift()],i.push(n),r[n]=e(...arguments),r[n])}}((function(e,t,n){return{x:e*hn.cos(n)-t*hn.sin(n),y:e*hn.sin(n)+t*hn.cos(n)}}));if(c)k=c[0],E=c[1],x=c[2],_=c[3];else{e=(p=f(e,t,-d)).x,t=p.y;var m=(e-(a=(p=f(a,l,-d)).x))/2,g=(t-(l=p.y))/2,y=m*m/(n*n)+g*g/(r*r);y>1&&(n*=y=hn.sqrt(y),r*=y);var v=n*n,b=r*r,w=(o==s?-1:1)*hn.sqrt(vn((v*b-v*g*g-b*m*m)/(v*g*g+b*m*m))),x=w*n*g/r+(e+a)/2,_=w*-r*m/n+(t+l)/2,k=hn.asin(((t-_)/r).toFixed(9)),E=hn.asin(((l-_)/r).toFixed(9));(k=e<x?fn-k:k)<0&&(k=2*fn+k),(E=a<x?fn-E:E)<0&&(E=2*fn+E),s&&k>E&&(k-=2*fn),!s&&E>k&&(E-=2*fn)}var O=E-k;if(vn(O)>u){var P=E,S=a,C=l;E=k+u*(s&&E>k?1:-1),h=qn(a=x+n*hn.cos(E),l=_+r*hn.sin(E),n,r,i,0,s,S,C,[E,P,x,_])}O=E-k;var T=hn.cos(k),M=hn.sin(k),A=hn.cos(E),D=hn.sin(E),N=hn.tan(O/4),R=4/3*n*N,j=4/3*r*N,I=[e,t],L=[e+R*M,t-j*T],z=[a+R*D,l-j*A],B=[a,l];if(L[0]=2*I[0]-L[0],L[1]=2*I[1]-L[1],c)return[L,z,B].concat(h);for(var $=[],q=0,F=(h=[L,z,B].concat(h).join().split(",")).length;q<F;q++)$[q]=q%2?f(h[q-1],h[q],d).y:f(h[q],h[q+1],d).x;return $}function Fn(e){var t=En(e);if(t.curve)return Sn(t.curve);for(var n=Ln(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i=function(e,t,n){var r,i;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];switch(!(e[0]in{T:1,Q:1})&&(t.qx=t.qy=null),e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=["C",...qn(t.x,t.y,...e.slice(1))];break;case"S":"C"==n||"S"==n?(r=2*t.x-t.bx,i=2*t.y-t.by):(r=t.x,i=t.y),e=["C",r,i,...e.slice(1)];break;case"T":"Q"==n||"T"==n?(t.qx=2*t.x-t.qx,t.qy=2*t.y-t.qy):(t.qx=t.x,t.qy=t.y),e=["C",...$n(t.x,t.y,t.qx,t.qy,e[1],e[2])];break;case"Q":t.qx=e[1],t.qy=e[2],e=["C",...$n(t.x,t.y,e[1],e[2],e[3],e[4])];break;case"L":e=["C",...Bn(t.x,t.y,e[1],e[2])];break;case"H":e=["C",...Bn(t.x,t.y,e[1],t.y)];break;case"V":e=["C",...Bn(t.x,t.y,t.x,e[1])];break;case"Z":e=["C",...Bn(t.x,t.y,t.X,t.Y)]}return e},o=function(e,t){if(e[t].length>7){e[t].shift();for(var r=e[t];r.length;)s[t]="A",e.splice(t++,0,["C",...r.splice(0,6)]);e.splice(t,1),p=n.length}},s=[],a="",l="",c=0,p=n.length;c<p;c++){n[c]&&(a=n[c][0]),"C"!=a&&(s[c]=a,c&&(l=s[c-1])),n[c]=i(n[c],r,l),"A"!=s[c]&&"C"==a&&(s[c]="C"),o(n,c);var u=n[c],d=u.length;r.x=u[d-2],r.y=u[d-1],r.bx=dn(u[d-4])||r.x,r.by=dn(u[d-3])||r.y}return t.curve=Sn(n),n}function Vn(e){return p(e)&&f(e,"waypoints")}function Hn(e){return p(e)&&f(e,"labelTarget")}function Un(e){return{x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height)}}function Wn(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function Gn(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function Qn(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function Xn(e){for(var t=e.waypoints,n=t.reduce((function(e,n,r){var i=t[r-1];if(i){var o=e[e.length-1],s=o&&o.endLength||0,a=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}(i,n);e.push({start:i,end:n,startLength:s,endLength:s+a,length:a})}return e}),[]),r=n.reduce((function(e,t){return e+t.length}),0),i=r/2,o=0,s=n[o];s.endLength<i;)s=n[++o];var a=(i-s.startLength)/s.length;return{x:s.start.x+(s.end.x-s.start.x)*a,y:s.start.y+(s.end.y-s.start.y)*a}}function Zn(e){return Vn(e)?Xn(e):Wn({x:(t=e).x+(t.width||0)/2,y:t.y+(t.height||0)/2});var t}function Yn(e,t,n){p(n=n||0)||(n={x:n,y:n});var r=Gn(e),i=Gn(t),o=r.bottom+n.y<=i.top,s=r.left-n.x>=i.right,a=r.top-n.y>=i.bottom,l=o?"top":a?"bottom":null,c=r.right+n.x<=i.left?"left":s?"right":null;return c&&l?l+"-"+c:c||l||"intersect"}function Kn(e,t,n){var r=function(e,t){return In(e,t)}(e,t);return 1===r.length||2===r.length&&rn(r[0],r[1])<1?Wn(r[0]):r.length>1?(r=T(r,(function(e){var t=Math.floor(100*e.t2)||1;return t=((t=100-t)<10?"0":"")+t,e.segment2+"#"+t})),Wn(r[n?0:r.length-1])):null}function Jn(e,t){return Math.round(e*t)/t}function er(e){return u(e)?e+"px":e}function tr(e,t,n){const r=Ae("g");ke(r).add(t);const i=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(r,e.childNodes[i]||null),r}const nr={shape:["x","y","width","height"],connection:["waypoints"]};function rr(e,t,n,r){this._eventBus=t,this._elementRegistry=r,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._init(e||{})}function ir(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}rr.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],rr.prototype._init=function(e){const t=this._eventBus,n=this._container=function(e){const t=(e=L({},{width:"100%",height:"100%"},e)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),Ct(n,{position:"relative",overflow:"hidden",width:er(e.width),height:er(e.height)}),t.appendChild(n),n}(e),r=this._svg=Ae("svg");xe(r,{width:"100%",height:"100%"}),ye(n,r);const i=this._viewport=tr(r,"viewport");e.deferUpdate&&(this._viewboxChanged=j(I(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)},rr.prototype._destroy=function(){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});const 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},rr.prototype._clear=function(){this._elementRegistry.getAll().forEach((e=>{const t=gt(e);"root"===t?this.removeRootElement(e):this._removeElement(e,t)})),this._planes=[],this._rootElement=null,delete this._cachedViewbox},rr.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},rr.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)),void 0!==t&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group},rr.prototype._getChildIndex=function(e){return w(this._layers,(function(t,n){return n.visible&&e>=n.index&&t++,t}),0)},rr.prototype._createLayer=function(e,t){void 0===t&&(t=1);const n=this._getChildIndex(t);return{group:tr(this._viewport,"layer-"+e,n),index:t,visible:!0}},rr.prototype.showLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=this._viewport,r=t.group,i=t.index;if(t.visible)return r;const o=this._getChildIndex(i);return n.insertBefore(r,n.childNodes[o]||null),t.visible=!0,r},rr.prototype.hideLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=t.group;return t.visible?(Oe(n),t.visible=!1,n):n},rr.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],Oe(t.group))},rr.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},rr.prototype.findRoot=function(e){if("string"==typeof e&&(e=this._elementRegistry.get(e)),!e)return;const t=this._findPlaneForRoot(function(e){for(;e.parent;)e=e.parent;return e}(e))||{};return t.rootElement},rr.prototype.getRootElements=function(){return this._planes.map((function(e){return e.rootElement}))},rr.prototype._findPlaneForRoot=function(e){return m(this._planes,(function(t){return t.rootElement===e}))},rr.prototype.getContainer=function(){return this._container},rr.prototype._updateMarker=function(e,t,n){let r;e.id||(e=this._elementRegistry.get(e)),r=this._elementRegistry._elements[e.id],r&&(v([r.gfx,r.secondaryGfx],(function(e){e&&(n?ke(e).add(t):ke(e).remove(t))})),this._eventBus.fire("element.marker.update",{element:e,gfx:r.gfx,marker:t,add:!!n}))},rr.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},rr.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},rr.prototype.hasMarker=function(e,t){e.id||(e=this._elementRegistry.get(e));return ke(this.getGraphics(e)).has(t)},rr.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},rr.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},rr.prototype.addRootElement=function(e){const t=this._rootsIdx++;e||(e={id:"__implicitroot_"+t,children:[],isImplicit:!0});const n=e.layer="root-"+t;this._ensureValid("root",e);const r=this.getLayer(n,0);return this.hideLayer(n),this._addRoot(e,r),this._planes.push({rootElement:e,layer:r}),e},rr.prototype.removeRootElement=function(e){"string"==typeof e&&(e=this._elementRegistry.get(e));if(this._findPlaneForRoot(e))return this._removeRoot(e),this._removeLayer(e.layer),this._planes=this._planes.filter((function(t){return t.rootElement!==e})),this._rootElement===e&&(this._rootElement=null),e},rr.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},rr.prototype._removeRoot=function(e){const t=this._elementRegistry,n=this._eventBus;n.fire("root.remove",{element:e}),n.fire("root.removed",{element:e}),t.remove(e)},rr.prototype._addRoot=function(e,t){const n=this._elementRegistry,r=this._eventBus;r.fire("root.add",{element:e}),n.add(e,t),r.fire("root.added",{element:e,gfx:t})},rr.prototype._setRoot=function(e,t){const 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})},rr.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");const n=nr[e],r=x(n,(function(e){return void 0!==t[e]}));if(!r)throw new Error("must supply { "+n.join(", ")+" } with "+e)},rr.prototype._setParent=function(e,t,n){tn(t.children,e,n),e.parent=t},rr.prototype._addElement=function(e,t,n,r){n=n||this.getRootElement();const i=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),i.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,r);const s=o.create(e,t,r);return this._elementRegistry.add(t,s),o.update(e,t,s),i.fire(e+".added",{element:t,gfx:s}),t},rr.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},rr.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},rr.prototype._removeElement=function(e,t){const n=this._elementRegistry,r=this._graphicsFactory,i=this._eventBus;if(e=n.get(e.id||e))return i.fire(t+".remove",{element:e}),r.remove(e),en(e.parent&&e.parent.children,e),e.parent=null,i.fire(t+".removed",{element:e}),n.remove(e),e},rr.prototype.removeShape=function(e){return this._removeElement(e,"shape")},rr.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},rr.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},rr.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},rr.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},rr.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return this._cachedViewbox;const t=this._viewport,n=this.getSize();let r,i,o,s,a,l,c;return e?(this._changeViewbox((function(){a=Math.min(n.width/e.width,n.height/e.height);const r=this._svg.createSVGMatrix().scale(a).translate(-e.x,-e.y);He(t,r)})),e):(o=this._rootElement?this.getActiveLayer():null,r=o&&o.getBBox()||{},s=He(t),i=s?s.matrix:function(e,t,n,r,i,o){var s=Ne().createSVGMatrix();switch(arguments.length){case 0:return s;case 1:return Re(s,e);case 6:return Re(s,{a:e,b:t,c:n,d:r,e:i,f:o})}}(),a=Jn(i.a,1e3),l=Jn(-i.e||0,1e3),c=Jn(-i.f||0,1e3),e=this._cachedViewbox={x:l?l/a:0,y:c?c/a:0,width:n.width/a,height:n.height/a,scale:a,inner:{width:r.width||0,height:r.height||0,x:r.x||0,y:r.y||0},outer:n})},rr.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox((function(){e=L({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),ir(t,n)})),{x:n.e,y:n.f}},rr.prototype.scrollToElement=function(e,t){let n=100;"string"==typeof e&&(e=this._elementRegistry.get(e));const r=this.findRoot(e);if(r!==this.getRootElement()&&this.setRootElement(r),r===e)return;t||(t={}),"number"==typeof t&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};const i=mt(e),o=Gn(i),s=this.viewbox(),a=this.zoom();let l,c;s.y+=t.top/a,s.x+=t.left/a,s.width-=(t.right+t.left)/a,s.height-=(t.bottom+t.top)/a;const p=Gn(s);if(i.width<s.width&&i.height<s.height){const e=Math.max(0,o.right-p.right),t=Math.min(0,o.left-p.left),n=Math.max(0,o.bottom-p.bottom),r=Math.min(0,o.top-p.top);l=e||t,c=n||r}else l=i.x-s.x,c=i.y-s.y;this.scroll({dx:-l*a,dy:-c*a})},rr.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if("fit-viewport"===e)return this._fitViewport(t);let n,r;return this._changeViewbox((function(){"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),r=this._setZoom(e,t)})),Jn(r.a,1e3)},rr.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,r=t.inner;let 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},rr.prototype._setZoom=function(e,t){const n=this._svg,r=this._viewport,i=n.createSVGMatrix(),o=n.createSVGPoint();let s,a,l,c,p;l=r.getCTM();const u=l.a;return t?(s=L(o,t),a=s.matrixTransform(l.inverse()),c=i.translate(a.x,a.y).scale(1/u*e).translate(-a.x,-a.y),p=l.multiply(c)):p=i.scale(e),ir(this._viewport,p),p},rr.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},rr.prototype.getAbsoluteBBox=function(e){const t=this.viewbox();let n;if(e.waypoints){n=this.getGraphics(e).getBBox()}else n=e;return{x:n.x*t.scale-t.x*t.scale,y:n.y*t.scale-t.y*t.scale,width:n.width*t.scale,height:n.height*t.scale}},rr.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var or="data-element-id";function sr(e){this._elements={},this._eventBus=e}function ar(e,t,n){var r=function(e,t,n,r){var i=n.inverse;return Object.defineProperty(e,"remove",{value:function(e){var n=this.indexOf(e);return-1!==n&&(this.splice(n,1),t.unset(e,i,r)),e}}),Object.defineProperty(e,"contains",{value:function(e){return-1!==this.indexOf(e)}}),Object.defineProperty(e,"add",{value:function(e,n){var o=this.indexOf(e);if(void 0===n){if(-1!==o)return;n=this.length}-1!==o&&this.splice(o,1),this.splice(n,0,e),-1===o&&t.set(e,i,r)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:r}),r.length&&r.forEach((function(r){e.set(r,t.inverse,n)}))}function lr(e,t){if(!(this instanceof lr))return new lr(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}sr.$inject=["eventBus"],sr.prototype.add=function(e,t,n){var r=e.id;this._validateId(r),xe(t,or,r),n&&xe(n,or,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}},sr.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(xe(r.gfx,or,""),r.secondaryGfx&&xe(r.secondaryGfx,or,""),delete t[n])},sr.prototype.updateId=function(e,t){this._validateId(t),"string"==typeof e&&(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)},sr.prototype.updateGraphics=function(e,t,n){var r=e.id||e,i=this._elements[r];return n?i.secondaryGfx=t:i.gfx=t,t&&xe(t,or,r),t},sr.prototype.get=function(e){var t;t="string"==typeof e?e:e&&xe(e,or);var n=this._elements[t];return n&&n.element},sr.prototype.filter=function(e){var t=[];return this.forEach((function(n,r){e(n,r)&&t.push(n)})),t},sr.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),r=0;r<n.length;r++){var i=t[n[r]],o=i.element;if(e(o,i.gfx))return o}},sr.prototype.getAll=function(){return this.filter((function(e){return e}))},sr.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)}))},sr.prototype.getGraphics=function(e,t){var n=e.id||e,r=this._elements[n];return r&&(t?r.secondaryGfx:r.gfx)},sr.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")},lr.prototype.bind=function(e,t){if("string"==typeof t){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?ar(this,t,e):function(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(t){if(t!==i){var o=i;i=null,o&&e.unset(o,r,n),i=t,e.set(i,r,n)}}})}(this,t,e)},lr.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return function(e){return!0===e.__refs_collection}(n)||ar(this,t,e),n},lr.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},lr.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},lr.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var cr=new lr({name:"children",enumerable:!0,collection:!0},{name:"parent"}),pr=new lr({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),ur=new lr({name:"attachers",collection:!0},{name:"host"}),dr=new lr({name:"outgoing",collection:!0},{name:"source"}),hr=new lr({name:"incoming",collection:!0},{name:"target"});function fr(){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)}}),cr.bind(this,"parent"),pr.bind(this,"labels"),dr.bind(this,"outgoing"),hr.bind(this,"incoming")}function mr(){fr.call(this),cr.bind(this,"children"),ur.bind(this,"host"),ur.bind(this,"attachers")}function gr(){fr.call(this),cr.bind(this,"children")}function yr(){mr.call(this),pr.bind(this,"labelTarget")}function vr(){fr.call(this),dr.bind(this,"source"),hr.bind(this,"target")}e(mr,fr),e(gr,mr),e(yr,mr),e(vr,fr);var br={connection:vr,shape:mr,label:yr,root:gr};function wr(){this._uid=12}wr.prototype.createRoot=function(e){return this.create("root",e)},wr.prototype.createLabel=function(e){return this.create("label",e)},wr.prototype.createShape=function(e){return this.create("shape",e)},wr.prototype.createConnection=function(e){return this.create("connection",e)},wr.prototype.create=function(e,t){return(t=L({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=br[e];if(!n)throw new Error("unknown type: <"+e+">");return L(new n,t)}(e,t)};var xr="__fn",_r=Array.prototype.slice;function kr(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function Er(){}function Or(e){return e.childNodes[0]}function Pr(e,t,n,r,i){var o=je();o.setTranslate(t,n);var s=je();s.setRotate(r||0,0,0);var a=je();a.setScale(i||1,i||1),He(e,[o,s,a])}function Sr(e,t,n){var r=je();r.setTranslate(t,n),He(e,r)}function Cr(e,t){var n=je();n.setRotate(t,0,0),He(e,n)}function Tr(e,t){this._eventBus=e,this._elementRegistry=t}function Mr(e,t,n){var r=n||t.firstChild;e!==r&&t.insertBefore(e,r)}kr.prototype.on=function(e,t,n,r){if(e=c(e)?e:[e],d(t)&&(r=n,n=t,t=1e3),!u(t))throw new Error("priority must be a number");var i=n;r&&((i=I(n,r))[xr]=n[xr]||n);var o=this;e.forEach((function(e){o._addListener(e,{priority:t,callback:i,next:null})}))},kr.prototype.once=function(e,t,n,r){var i=this;if(d(t)&&(r=n,n=t,t=1e3),!u(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var t=n.apply(r,arguments);return i.off(e,o),t}o[xr]=n,this.on(e,t,o)},kr.prototype.off=function(e,t){e=c(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},kr.prototype.createEvent=function(e){var t=new Er;return t.init(e),t},kr.prototype.fire=function(e,t){var n,r,i,o;if(o=_r.call(arguments),"object"==typeof e&&(e=(t=e).type),!e)throw new Error("no event type specified");if(r=this._listeners[e]){n=t instanceof Er?t:this.createEvent(t),o[0]=n;var s=n.type;e!==s&&(n.type=e);try{i=this._invokeListeners(n,o,r)}finally{e!==s&&(n.type=s)}return void 0===i&&n.defaultPrevented&&(i=!1),i}},kr.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},kr.prototype._destroy=function(){this._listeners={}},kr.prototype._invokeListeners=function(e,t,n){for(var r;n&&!e.cancelBubble;)r=this._invokeListener(e,t,n),n=n.next;return r},kr.prototype._invokeListener=function(e,t,n){var r;if(n.callback.__isTomb)return r;try{r=function(e,t){return e.apply(null,t)}(n.callback,t),void 0!==r&&(e.returnValue=r,e.stopPropagation()),!1===r&&e.preventDefault()}catch(e){if(!this.handleError(e))throw console.error("unhandled error in event listener",e),e}return r},kr.prototype._addListener=function(e,t){var n,r=this._getListeners(e);if(r){for(;r;){if(r.priority<t.priority)return t.next=r,void(n?n.next=t:this._setListeners(e,t));n=r,r=r.next}n.next=t}else this._setListeners(e,t)},kr.prototype._getListeners=function(e){return this._listeners[e]},kr.prototype._setListeners=function(e,t){this._listeners[e]=t},kr.prototype._removeListener=function(e,t){var n,r,i,o=this._getListeners(e);if(t)for(;o;)n=o.next,(i=o.callback)!==t&&i[xr]!==t||(r?r.next=n:this._setListeners(e,n)),r=o,o=n;else this._setListeners(e,null)},Er.prototype.stopPropagation=function(){this.cancelBubble=!0},Er.prototype.preventDefault=function(){this.defaultPrevented=!0},Er.prototype.init=function(e){L(this,e||{})},Tr.$inject=["eventBus","elementRegistry"],Tr.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=function(e){return e.parentNode.childNodes[1]}(n),t||(ke(t=Ae("g")).add("djs-children"),ye(n.parentNode,t))):t=n,t},Tr.prototype._clear=function(e){var t=Or(e);return Nt(t),t},Tr.prototype._createContainer=function(e,t,n,r){var i=Ae("g");ke(i).add("djs-group"),void 0!==n?Mr(i,t,t.childNodes[n]):ye(t,i);var o=Ae("g");ke(o).add("djs-element"),ke(o).add("djs-"+e),r&&ke(o).add("djs-frame"),ye(i,o);var s=Ae("g");return ke(s).add("djs-visual"),ye(o,s),o},Tr.prototype.create=function(e,t,n){var r=this._getChildrenContainer(t.parent);return this._createContainer(e,r,n,yt(t))},Tr.prototype.updateContainments=function(e){var t,n=this,r=this._elementRegistry;t=w(e,(function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e}),{}),v(t,(function(e){var t=e.children;if(t){var i=n._getChildrenContainer(e);v(t.slice().reverse(),(function(e){Mr(r.getGraphics(e).parentNode,i)}))}}))},Tr.prototype.drawShape=function(e,t,n={}){return this._eventBus.fire("render.shape",{gfx:e,element:t,attrs:n})},Tr.prototype.getShapePath=function(e){return this._eventBus.fire("render.getShapePath",e)},Tr.prototype.drawConnection=function(e,t,n={}){return this._eventBus.fire("render.connection",{gfx:e,element:t,attrs:n})},Tr.prototype.getConnectionPath=function(e){return this._eventBus.fire("render.getConnectionPath",e)},Tr.prototype.update=function(e,t,n){if(t.parent){var r=this._clear(n);if("shape"===e)this.drawShape(r,t),Sr(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(r,t)}t.hidden?xe(n,"display","none"):xe(n,"display","block")}},Tr.prototype.remove=function(e){Oe(this._elementRegistry.getGraphics(e).parentNode)};var Ar={__depends__:[wt],__init__:["canvas"],canvas:["type",rr],elementRegistry:["type",sr],elementFactory:["type",wr],eventBus:["type",kr],graphicsFactory:["type",Tr]};function Dr(e){return function(e){var t=new Je(e);return t.init(),t}([{config:["value",e=e||{}]},Ar].concat(e.modules||[]))}function Nr(e,t){this._injector=t||Dr(e),this.get("eventBus").fire("diagram.init")}function Rr(){}function jr(e,t){this.model=e,this.properties=t}Nr.prototype.get=function(e,t){return this._injector.get(e,t)},Nr.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},Nr.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},Nr.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")},Rr.prototype.get=function(e){return this.$model.properties.get(this,e)},Rr.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},jr.prototype.createType=function(e){var t=this.model,n=this.properties,r=Object.create(Rr.prototype);v(e.properties,(function(e){e.isMany||void 0===e.default||(r[e.name]=e.default)})),n.defineModel(r,t),n.defineDescriptor(r,e);var i=e.ns.name;function o(e){n.define(this,"$type",{value:i,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),v(e,I((function(e,t){this.set(t,e)}),this))}return o.prototype=r,o.hasType=r.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var Ir={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},Lr={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function zr(e,t){var n=Lr[e];return n?n(t):t}function Br(e){return!!Ir[e]}function $r(e){return!!Lr[e]}function qr(e,t){var n,r,i=e.split(/:/);if(1===i.length)n=e,r=t;else{if(2!==i.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=i[1],r=i[0]}return{name:e=(r?r+":":"")+n,prefix:r,localName:n}}function Fr(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function Vr(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,v(e,I(this.registerPackage,this))}function Hr(e,t,n){var r=t[n];if(r in e)throw new Error("package with "+n+" <"+r+"> already defined")}function Ur(e){this.model=e}function Wr(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function Gr(e){return e.replace(/^:/,"")}function Qr(e,t={}){this.properties=new Ur(this),this.factory=new jr(this,this.properties),this.registry=new Vr(e,this.properties),this.typeCache={},this.config=t}Fr.prototype.build=function(){return $(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},Fr.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var r=this.properties;void 0!==t?r.splice(t,0,e):r.push(e)},Fr.prototype.replaceProperty=function(e,t,n){var r=e.ns,i=this.properties,o=this.propertiesByName,s=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 a=i.indexOf(e);if(-1===a)throw new Error("property <"+r.name+"> not found in property list");i.splice(a,1),this.addProperty(t,n?void 0:a,s),o[r.name]=o[r.localName]=t},Fr.prototype.redefineProperty=function(e,t,n){var r=e.ns.prefix,i=t.split("#"),o=qr(i[0],r),s=qr(i[1],o.prefix).name,a=this.propertiesByName[s];if(!a)throw new Error("refined property <"+s+"> not found");this.replaceProperty(a,e,n),delete e.redefines},Fr.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},Fr.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},Fr.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},Fr.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},Fr.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},Fr.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")},Fr.prototype.hasProperty=function(e){return this.propertiesByName[e]},Fr.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,r=this.allTypes,i=e.name;i in n||(v(e.properties,I((function(n){n=L({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var r=n.replaces,i=n.redefines;r||i?this.redefineProperty(n,r||i,r):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))}),this)),r.push(e),n[i]=e)},Vr.prototype.getPackage=function(e){return this.packageMap[e]},Vr.prototype.getPackages=function(){return this.packages},Vr.prototype.registerPackage=function(e){e=L({},e);var t=this.packageMap;Hr(t,e,"prefix"),Hr(t,e,"uri"),v(e.types,I((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},Vr.prototype.registerType=function(e,t){var n=qr((e=L({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:L(e.meta||{})})).name,t.prefix),r=n.name,i={};v(e.properties,I((function(e){var t=qr(e.name,n.prefix),r=t.name;Br(e.type)||(e.type=qr(e.type,t.prefix).name),L(e,{ns:t,name:r}),i[r]=e}),this)),L(e,{ns:n,name:r,propertiesByName:i}),v(e.extends,I((function(e){var t=qr(e,n.prefix),i=this.typeMap[t.name];i.traits=i.traits||[],i.traits.push(r)}),this)),this.definePackage(e,t),this.typeMap[r]=e},Vr.prototype.mapTypes=function(e,t,n){var r=Br(e.name)?{name:e.name}:this.typeMap[e.name],i=this;function o(n,r){var o=qr(n,Br(n)?"":e.prefix);i.mapTypes(o,t,r)}function s(e){return o(e,!0)}if(!r)throw new Error("unknown type <"+e.name+">");v(r.superClass,n?s:function(e){return o(e,!1)}),t(r,!n),v(r.traits,s)},Vr.prototype.getEffectiveDescriptor=function(e){var t=qr(e),n=new Fr(t);this.mapTypes(t,(function(e,t){n.addTrait(e,t)}));var r=n.build();return this.definePackage(r,r.allTypes[r.allTypes.length-1].$pkg),r},Vr.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},Ur.prototype.set=function(e,t,n){if(!h(t)||!t.length)throw new TypeError("property name must be a non-empty string");var r=this.getProperty(e,t),i=r&&r.name;void 0===n?r?delete e[i]:delete e.$attrs[Gr(t)]:r?i in e?e[i]=n:Wr(e,r,n):e.$attrs[Gr(t)]=n},Ur.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[Gr(t)];var r=n.name;return!e[r]&&n.isMany&&Wr(e,n,[]),e[r]},Ur.prototype.define=function(e,t,n){if(!n.writable){var r=n.value;delete(n=L({},n,{get:function(){return r}})).value}Object.defineProperty(e,t,n)},Ur.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},Ur.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},Ur.prototype.getProperty=function(e,t){var n=this.model,r=n.getPropertyDescriptor(e,t);if(r)return r;if(t.includes(":"))return null;const i=n.config.strict;if(void 0!==i){const n=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(i)throw n;"undefined"!=typeof console&&console.warn(n)}return null},Qr.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},Qr.prototype.getType=function(e){var t=this.typeCache,n=h(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r},Qr.prototype.createAny=function(e,t,n){var r=qr(e),i={$type:e,$instanceOf:function(e){return e===this.$type},get:function(e){return this[e]},set:function(e,t){z(this,[e],t)}},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}),v(n,(function(e,t){p(e)&&void 0!==e.value?i[e.name]=e.value:i[t]=e})),i},Qr.prototype.getPackage=function(e){return this.registry.getPackage(e)},Qr.prototype.getPackages=function(){return this.registry.getPackages()},Qr.prototype.getElementDescriptor=function(e){return e.$descriptor},Qr.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},Qr.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},Qr.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var Xr=String.fromCharCode,Zr=Object.prototype.hasOwnProperty,Yr=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,Kr={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function Jr(e,t,n,r){return r?Zr.call(Kr,r)?Kr[r]:"&"+r+";":Xr(t||parseInt(n,16))}function ei(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(Yr,Jr):e}Object.keys(Kr).forEach((function(e){Kr[e.toUpperCase()]=Kr[e]}));var ti="xsi:type",ni="non-whitespace outside of root node";function ri(e){return new Error(e)}function ii(e){return"missing namespace for prefix <"+e+">"}function oi(e){return{get:e,enumerable:!0}}function si(e){var t,n={};for(t in e)n[t]=e[t];return n}function ai(e){return e+"$uri"}function li(){return{line:0,column:0}}function ci(e){throw e}function pi(e){if(!this)return new pi(e);var t,n,r,i,o,s,a,l,c,p=e&&e.proxy,u=ci,d=li,h=!1,f=!1,m=null,g=!1;function y(e){e instanceof Error||(e=ri(e)),m=e,u(e,d)}function v(e){o&&(e instanceof Error||(e=ri(e)),o(e,d))}this.on=function(e,c){if("function"!=typeof c)throw ri("required args <name, cb>");switch(e){case"openTag":n=c;break;case"text":t=c;break;case"closeTag":r=c;break;case"error":u=c;break;case"warn":o=c;break;case"cdata":i=c;break;case"attention":l=c;break;case"question":a=c;break;case"comment":s=c;break;default:throw ri("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw ri("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return n["http://www.w3.org/2001/XMLSchema-instance"]="xsi",f=!0,c=n,this},this.parse=function(e){if("string"!=typeof e)throw ri("required args <xml=string>");return m=null,function(e){var o,u,m,b,w,x,_,k,E,O,P,S=f?[]:null,C=f?function(e){var t,n,r={};for(t in e)r[n=e[t]]=n,r[ai(n)]=t;return r}(c):null,T=[],M=0,A=!1,D=!1,N=0,R=0,j="",I=0;function L(){if(null!==P)return P;var e,t,n,r,i,o,s,a,l,p,u,d=f&&C.xmlns,m=f&&h?[]:null,g=I,y=j,b=y.length,w={},x={};e:for(;g<b;g++)if(l=!1,!(32===(p=y.charCodeAt(g))||p<14&&p>8)){for((p<65||p>122||p>90&&p<97)&&95!==p&&58!==p&&(v("illegal first char attribute name"),l=!0),u=g+1;u<b;u++)if(!((p=y.charCodeAt(u))>96&&p<123||p>64&&p<91||p>47&&p<59||46===p||45===p||95===p)){if(32===p||p<14&&p>8){v("missing attribute value"),g=u;continue e}if(61===p)break;v("illegal attribute name char"),l=!0}if("xmlns:xmlns"===(a=y.substring(g,u))&&(v("illegal declaration of xmlns"),l=!0),34===(p=y.charCodeAt(u+1)))-1===(u=y.indexOf('"',g=u+2))&&-1!==(u=y.indexOf("'",g))&&(v("attribute value quote missmatch"),l=!0);else if(39===p)-1===(u=y.indexOf("'",g=u+2))&&-1!==(u=y.indexOf('"',g))&&(v("attribute value quote missmatch"),l=!0);else for(v("missing attribute value quotes"),l=!0,u+=1;u<b&&!(32===(p=y.charCodeAt(u+1))||p<14&&p>8);u++);for(-1===u&&(v("missing closing quotes"),u=b,l=!0),l||(o=y.substring(g,u)),g=u;u+1<b&&!(32===(p=y.charCodeAt(u+1))||p<14&&p>8);u++)g===u&&(v("illegal character after attribute end"),l=!0);if(g=u+1,!l)if(a in x)v("attribute <"+a+"> already defined");else if(x[a]=!0,f)if(h){if(null!==(i="xmlns"===a?"xmlns":120===a.charCodeAt(0)&&"xmlns:"===a.substr(0,6)?a.substr(6):null)){if(e=ei(o),t=ai(i),!(s=c[e])){if("xmlns"===i||t in C&&C[t]!==e)do{s="ns"+M++}while(void 0!==C[s]);else s=i;c[e]=s}C[i]!==s&&(r||(C=si(C),r=!0),C[i]=s,"xmlns"===i&&(C[ai(s)]=e,d=s),C[t]=e),w[a]=o;continue}m.push(a,o)}else-1!==(p=a.indexOf(":"))?(n=C[a.substring(0,p)])?((a=d===n?a.substr(p+1):n+a.substr(p))===ti&&(-1!==(p=o.indexOf(":"))?(n=o.substring(0,p),o=(n=C[n]||n)+o.substring(p)):o=d+":"+o),w[a]=o):v(ii(a.substring(0,p))):w[a]=o;else w[a]=o}if(h)for(g=0,b=m.length;g<b;g++){if(a=m[g++],o=m[g],-1!==(p=a.indexOf(":"))){if(!(n=C[a.substring(0,p)])){v(ii(a.substring(0,p)));continue}(a=d===n?a.substr(p+1):n+a.substr(p))===ti&&(-1!==(p=o.indexOf(":"))?(n=o.substring(0,p),o=(n=C[n]||n)+o.substring(p)):o=d+":"+o)}w[a]=o}return P=w}function z(){for(var t,n,r=/(\r\n|\r|\n)/g,i=0,o=0,s=0,a=R;N>=s&&(t=r.exec(e))&&!((a=t[0].length+t.index)>N);)i+=1,s=a;return-1==N?(o=a,n=e.substring(R)):0===R?n=e.substring(R,N):(o=N-s,n=-1==R?e.substring(N):e.substring(N,R+1)),{data:n,line:i,column:o}}d=z,p&&(O=Object.create({},{name:oi((function(){return k})),originalName:oi((function(){return E})),attrs:oi(L),ns:oi((function(){return C}))}));for(;-1!==R;){if(-1===(N=60===e.charCodeAt(R)?R:e.indexOf("<",R)))return T.length?y("unexpected end of file"):0===R?y("missing start tag"):void(R<e.length&&e.substring(R).trim()&&v(ni));if(R!==N)if(T.length){if(t&&(t(e.substring(R,N),ei,d),g))return}else if(e.substring(R,N).trim()&&(v(ni),g))return;if(33===(w=e.charCodeAt(N+1))){if(91===(b=e.charCodeAt(N+2))&&"CDATA["===e.substr(N+3,6)){if(-1===(R=e.indexOf("]]>",N)))return y("unclosed cdata");if(i&&(i(e.substring(N+9,R),d),g))return;R+=3;continue}if(45===b&&45===e.charCodeAt(N+3)){if(-1===(R=e.indexOf("--\x3e",N)))return y("unclosed comment");if(s&&(s(e.substring(N+4,R),ei,d),g))return;R+=3;continue}}if(63!==w){for(u=N+1;;u++){if(x=e.charCodeAt(u),isNaN(x))return R=-1,y("unclosed tag");if(34===x)u=-1!==(b=e.indexOf('"',u+1))?b:u;else if(39===x)u=-1!==(b=e.indexOf("'",u+1))?b:u;else if(62===x){R=u;break}}if(33!==w){if(P={},47===w){if(A=!1,D=!0,!T.length)return y("missing open tag");if(u=k=T.pop(),b=N+2+u.length,e.substring(N+2,b)!==u)return y("closing tag mismatch");for(;b<R;b++)if(!(32===(w=e.charCodeAt(b))||w>8&&w<14))return y("close tag")}else{if(47===e.charCodeAt(R-1)?(u=k=e.substring(N+1,R-1),A=!0,D=!0):(u=k=e.substring(N+1,R),A=!0,D=!1),!(w>96&&w<123||w>64&&w<91||95===w||58===w))return y("illegal first char nodeName");for(b=1,m=u.length;b<m;b++)if(!((w=u.charCodeAt(b))>96&&w<123||w>64&&w<91||w>47&&w<59||45===w||95===w||46==w)){if(32===w||w<14&&w>8){k=u.substring(0,b),P=null;break}return y("invalid nodeName")}D||T.push(k)}if(f){if(o=C,A&&(D||S.push(o),null===P&&(h=-1!==u.indexOf("xmlns",b))&&(I=b,j=u,L(),h=!1)),E=k,-1!==(w=k.indexOf(":"))){if(!(_=C[k.substring(0,w)]))return y("missing namespace on <"+E+">");k=k.substr(w+1)}else _=C.xmlns;_&&(k=_+":"+k)}if(A&&(I=b,j=u,n&&(p?n(O,ei,D,d):n(k,L,ei,D,d),g)))return;if(D){if(r&&(r(p?O:k,ei,A,d),g))return;f&&(C=A?o:S.pop())}R+=1}else{if(l&&(l(e.substring(N,R+1),ei,d),g))return;R+=1}}else{if(-1===(R=e.indexOf("?>",N)))return y("unclosed question");if(a&&(a(e.substring(N,R+2),d),g))return;R+=2}}}(e),d=li,g=!1,m},this.stop=function(){g=!0}}function ui(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var di={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},hi="xsi:type";function fi(e){return e.xml&&e.xml.serialize}function mi(e){return fi(e)===hi}function gi(e,t){return ui(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function yi(e){return new Error(e)}function vi(e){return e.$descriptor}function bi(e){L(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw yi("expected element");var t,n=this.elementsById,r=vi(e).idProperty;if(r&&(t=e.get(r.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw yi("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function wi(){}function xi(){}function _i(){}function ki(e,t){this.property=e,this.context=t}function Ei(e,t){this.element=t,this.propertyDesc=e}function Oi(){}function Pi(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function Si(e,t,n){Pi.call(this,e,t,n)}function Ci(e,t,n){this.model=e,this.context=n}function Ti(e){e instanceof Qr&&(e={model:e}),L(this,{lax:!1},e)}wi.prototype.handleEnd=function(){},wi.prototype.handleText=function(){},wi.prototype.handleNode=function(){},xi.prototype=Object.create(wi.prototype),xi.prototype.handleNode=function(){return this},_i.prototype=Object.create(wi.prototype),_i.prototype.handleText=function(e){this.body=(this.body||"")+e},ki.prototype=Object.create(_i.prototype),ki.prototype.handleNode=function(e){if(this.element)throw yi("expected no sub nodes");return this.element=this.createReference(e),this},ki.prototype.handleEnd=function(){this.element.id=this.body},ki.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},Ei.prototype=Object.create(_i.prototype),Ei.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=zr(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},Oi.prototype=Object.create(_i.prototype),Oi.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},Pi.prototype=Object.create(Oi.prototype),Pi.prototype.addReference=function(e){this.context.addReference(e)},Pi.prototype.handleText=function(e){if(!vi(this.element).bodyProperty)throw yi("unexpected body text <"+e+">");_i.prototype.handleText.call(this,e)},Pi.prototype.handleEnd=function(){var e=this.body,t=this.element,n=vi(t).bodyProperty;n&&void 0!==e&&(e=zr(n.type,e),t.set(n.name,e))},Pi.prototype.createElement=function(e){var t,n=e.attributes,r=this.type,i=vi(r),o=this.context,s=new r({}),a=this.model;return v(n,(function(e,n){var r=i.propertiesByName[n];r&&r.isReference?r.isMany?v(e.split(" "),(function(e){o.addReference({element:s,property:r.ns.name,id:e})})):o.addReference({element:s,property:r.ns.name,id:e}):(r?e=zr(r.type,e):"xmlns"!==n&&(t=qr(n,i.ns.prefix),a.getPackage(t.prefix)&&o.addWarning({message:"unknown attribute <"+n+">",element:s,property:n,value:e})),s.set(n,e))})),s},Pi.prototype.getPropertyForNode=function(e){var t,n,r=qr(e.name),i=this.type,o=this.model,s=vi(i),a=r.name,l=s.propertiesByName[a];if(l&&!l.isAttr)return mi(l)&&(t=e.attributes[hi])?(t=function(e,t){var n=qr(e);return function(e,t){var n=e.name,r=e.localName,i=t.xml&&t.xml.typePrefix;return i&&0===r.indexOf(i)?e.prefix+":"+r.slice(i.length):n}(n,t.getPackage(n.prefix))}(t,o),L({},l,{effectiveType:vi(n=o.getType(t)).name})):l;var c=o.getPackage(r.prefix);if(c){if(t=gi(r,c),n=o.getType(t),l=m(s.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})),l)return L({},l,{effectiveType:vi(n).name})}else if(l=m(s.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})),l)return l;throw yi("unrecognized element <"+r.name+">")},Pi.prototype.toString=function(){return"ElementDescriptor["+vi(this.type).name+"]"},Pi.prototype.valueHandler=function(e,t){return new Ei(e,t)},Pi.prototype.referenceHandler=function(e){return new ki(e,this.context)},Pi.prototype.handler=function(e){return"Element"===e?new Ci(this.model,e,this.context):new Pi(this.model,e,this.context)},Pi.prototype.handleChild=function(e){var t,n,r,i;if(t=this.getPropertyForNode(e),r=this.element,$r(n=t.effectiveType||t.type))return this.valueHandler(t,r);var o=(i=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==o&&(t.isMany?r.get(t.name).push(o):r.set(t.name,o),t.isReference?(L(o,{element:r}),this.context.addReference(o)):o.$parent=r),i},Si.prototype=Object.create(Pi.prototype),Si.prototype.createElement=function(e){var t=e.name,n=qr(t),r=this.model,i=this.type,o=r.getPackage(n.prefix),s=o&&gi(n,o)||t;if(!i.hasType(s))throw yi("unexpected element <"+e.originalName+">");return Pi.prototype.createElement.call(this,e)},Ci.prototype=Object.create(Oi.prototype),Ci.prototype.createElement=function(e){var t=e.name,n=qr(t).prefix,r=e.ns[n+"$uri"],i=e.attributes;return this.model.createAny(t,r,i)},Ci.prototype.handleChild=function(e){var t=new Ci(this.model,"Element",this.context).handleNode(e),n=this.element,r=t.element;return void 0!==r&&((n.$children=n.$children||[]).push(r),r.$parent=n),t},Ci.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},Ti.prototype.fromXML=function(e,t,n){var r=t.rootHandler;t instanceof Pi?(r=t,t={}):"string"==typeof t?(r=this.handler(t),t={}):"string"==typeof r&&(r=this.handler(r));var i=this.model,o=this.lax,s=new bi(L({},t,{rootHandler:r})),a=new pi({proxy:!0}),l=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function c(e,t,n){var r=t(),i=r.line,o=r.column,a=r.data;"<"===a.charAt(0)&&-1!==a.indexOf(" ")&&(a=a.slice(0,a.indexOf(" "))+">");var l="unparsable content "+(a?a+" ":"")+"detected\n\tline: "+i+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return s.addWarning({message:l,error:e}),!0;throw yi(l)}function p(e,t){return c(e,t,!0)}r.context=s,l.push(r);var u=/^<\?xml /i,d=/ encoding="([^"]+)"/i,h=/^utf-8$/i;function f(e,t){try{l.peek().handleText(e)}catch(e){p(e,t)}}var m=i.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),{"http://www.w3.org/XML/1998/namespace":"xml"});return a.ns(m).on("openTag",(function(e,t,n,r){var i=e.attrs||{},s=Object.keys(i).reduce((function(e,n){var r=t(i[n]);return e[n]=r,e}),{});!function(e,t){var n=l.peek();try{l.push(n.handleNode(e))}catch(e){c(e,t,o)&&l.push(new xi)}}({name:e.name,originalName:e.originalName,attributes:s,ns:e.ns},r)})).on("question",(function(e){if(u.test(e)){var t=d.exec(e),n=t&&t[1];n&&!h.test(n)&&s.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}})).on("closeTag",(function(){l.pop().handleEnd()})).on("cdata",f).on("text",(function(e,t,n){!function(e,t){e.trim()&&f(e,t)}(t(e),n)})).on("error",c).on("warn",p),new Promise((function(t,n){var i;try{a.parse(e),function(){var e,t,n=s.elementsById,r=s.references;for(e=0;t=r[e];e++){var i=t.element,o=n[t.id],a=vi(i).propertiesByName[t.property];if(o||s.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),a.isMany){var l=i.get(a.name),c=l.indexOf(t);-1===c&&(c=l.length),o?l[c]=o:l.splice(c,1)}else i.set(a.name,o)}}()}catch(e){i=e}var o=r.element;i||o||(i=yi("failed to parse document as <"+r.type.$descriptor.name+">"));var l=s.warnings,c=s.references,p=s.elementsById;return i?(i.warnings=l,n(i)):t({rootElement:o,elementsById:p,references:c,warnings:l})}))},Ti.prototype.handler=function(e){return new Si(this.model,e)};var Mi=/<|>|'|"|&|\n\r|\n/g,Ai=/<|>|&/g;function Di(e){var t={},n={},r={},i=[],o=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?i.push(e):o.push(e),this.mapPrefix(e.prefix,e.uri)},this.uriByPrefix=function(e){return t[e||"xmlns"]},this.mapPrefix=function(e,n){t[e||"xmlns"]=n},this.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},this.logUsed=function(t){var n=t.uri,i=this.getNSKey(t);r[i]=this.byUri(n),e&&e.logUsed(t)},this.getUsed=function(e){var t=this;return[].concat(i,o).filter((function(e){var n=t.getNSKey(e);return r[n]}))}}function Ni(e,t){return ui(t)?function(e){return e.charAt(0).toLowerCase()+e.slice(1)}(e):e}function Ri(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function ji(e){return h(e)?e:(e.prefix?e.prefix+":":"")+e.localName}var Ii={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Li={"<":"lt",">":"gt","&":"amp"};function zi(e,t,n){return(e=h(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function Bi(e){this.tagName=e}function $i(){}function qi(e){this.tagName=e}function Fi(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function Vi(e,t){Fi.call(this,e,t)}function Hi(){this.value="",this.write=function(e){this.value+=e}}function Ui(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function Wi(e){return e=L({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var r=n||new Hi,i=new Ui(r,e.format);if(e.preamble&&i.append('<?xml version="1.0" encoding="UTF-8"?>\n'),(new Fi).build(t).serializeTo(i),!n)return r.value}}}function Gi(e,t){Qr.call(this,e,t)}Bi.prototype.build=function(e){return this.element=e,this},Bi.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},$i.prototype.serializeValue=$i.prototype.serializeTo=function(e){e.append(this.escape?zi(this.value,Ai,Li):this.value)},$i.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(Ai)&&(this.escape=!0),this},Ri(qi,$i),qi.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},Fi.prototype.build=function(e){this.element=e;var t,n,r=e.$descriptor,i=this.propertyDescriptor,o=r.isGeneric;return t=o?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=i?this.nsPropertyTagName(i):this.nsTagName(r),this.tagName=this.addTagName(this.ns),o||(n=function(e){return y(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!f(e,n))return!1;var r=e[n];return r!==t.default&&null!==r&&(!t.isMany||r.length)}))}(e),this.parseAttributes(y(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return y(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},Fi.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?L({localName:t.ns.localName},e):L({localName:Ni(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},Fi.prototype.nsPropertyTagName=function(e){return function(e,t){return L({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},Fi.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},Fi.prototype.nsAttributeName=function(e){var t;if(t=h(e)?qr(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:L({localName:t.localName},n)},Fi.prototype.parseGeneric=function(e){var t=this,n=this.body,r=[];return v(e,(function(i,o){"$body"===o?n.push((new $i).build({type:"String"},i)):"$children"===o?v(i,(function(e){n.push(new Fi(t).build(e))})):0!==o.indexOf("$")&&t.parseNsAttribute(e,o,i)&&r.push({name:o,value:i})})),r},Fi.prototype.parseNsAttribute=function(e,t,n){var r,i=e.$model,o=qr(t);if("xmlns"===o.prefix&&(r={prefix:o.localName,uri:n}),o.prefix||"xmlns"!==o.localName||(r={uri:n}),!r)return{name:t,value:n};if(i&&i.getPackage(n))this.logNamespace(r,!0,!0);else{var s=this.logNamespaceUsed(r,!0);this.getNamespaces().logUsed(s)}},Fi.prototype.parseNsAttributes=function(e,t){var n=this,r=e.$attrs,i=[];return v(r,(function(t,r){var o=n.parseNsAttribute(e,r,t);o&&i.push(o)})),i},Fi.prototype.parseGenericAttributes=function(e,t){var n=this;v(t,(function(t){if(t.name!==hi)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,n)}}))},Fi.prototype.parseContainments=function(e){var t=this,n=this.body,r=this.element;v(e,(function(e){var i=r.get(e.name),o=e.isReference;if(e.isMany||(i=[i]),e.isBody)n.push((new $i).build(e,i[0]));else if($r(e.type))v(i,(function(r){n.push(new qi(t.addTagName(t.nsPropertyTagName(e))).build(e,r))}));else if(o)v(i,(function(r){n.push(new Bi(t.addTagName(t.nsPropertyTagName(e))).build(r))}));else{var s=mi(e),a=function(e){return"property"===fi(e)}(e);v(i,(function(r){var i;i=s?new Vi(t,e):a?new Fi(t,e):new Fi(t),n.push(i.build(r))}))}}))},Fi.prototype.getNamespaces=function(e){var t,n=this.namespaces,r=this.parent;return n||(t=r&&r.getNamespaces(),e||!t?this.namespaces=n=new Di(t):n=t),n},Fi.prototype.logNamespace=function(e,t,n){var r=this.getNamespaces(n),i=e.uri,o=e.prefix;return r.byUri(i)&&!n||r.add(e,t),r.mapPrefix(o,i),e},Fi.prototype.logNamespaceUsed=function(e,t){var n,r,i,o=this.element.$model,s=this.getNamespaces(t),a=e.prefix,l=e.uri;if(!a&&!l)return{localName:e.localName};if(i=di[a]||o&&(o.getPackage(a)||{}).uri,!(l=l||i||s.uriByPrefix(a)))throw new Error("no namespace uri given for prefix <"+a+">");if(!(e=s.byUri(l))){for(n=a,r=1;s.uriByPrefix(n);)n=a+"_"+r++;e=this.logNamespace({prefix:n,uri:l},i===l)}return a&&s.mapPrefix(a,l),e},Fi.prototype.parseAttributes=function(e){var t=this,n=this.element;v(e,(function(e){var r=n.get(e.name);if(e.isReference)if(e.isMany){var i=[];v(r,(function(e){i.push(e.id)})),r=i.join(" ")}else r=r.id;t.addAttribute(t.nsAttributeName(e),r)}))},Fi.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),ji(e)},Fi.prototype.addAttribute=function(e,t){var n=this.attrs;h(t)&&(t=zi(t,Mi,Ii));var r=g(n,(function(t){return t.name.localName===e.localName&&t.name.uri===e.uri&&t.name.prefix===e.prefix})),i={name:e,value:t};-1!==r?n.splice(r,1,i):n.push(i)},Fi.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=function(e){return e.getUsed().filter((function(e){return"xml"!==e.prefix})).map((function(e){return{name:"xmlns"+(e.prefix?":"+e.prefix:""),value:e.uri}}))}(n).concat(t)),v(t,(function(t){e.append(" ").append(ji(t.name)).append('="').append(t.value).append('"')}))},Fi.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==$i;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),v(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},Ri(Vi,Fi),Vi.prototype.parseNsAttributes=function(e){var t=Fi.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var r=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var i=e.$model.getPackage(r.uri),o=i.xml&&i.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(hi),(r.prefix?r.prefix+":":"")+o+n.ns.localName),t},Vi.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},Gi.prototype=Object.create(Qr.prototype),Gi.prototype.fromXML=function(e,t,n){h(t)||(n=t,t="bpmn:Definitions");var r=new Ti(L({model:this,lax:!0},n)),i=r.handler(t);return r.fromXML(e,i)},Gi.prototype.toXML=function(e,t){var n=new Wi(t);return new Promise((function(t,r){try{return t({xml:n.toXML(e)})}catch(e){return r(e)}}))};var Qi={bpmn:{name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",prefix:"bpmn",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],enumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],xml:{tagAlias:"lowerCase",typePrefix:"t"}},bpmndi:{name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",prefix:"bpmndi",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],enumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[]},dc:{name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",prefix:"dc",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],associations:[]},di:{name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",prefix:"di",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],associations:[],xml:{tagAlias:"lowerCase"}},bioc:{name:"bpmn.io colors for BPMN",uri:"http://bpmn.io/schema/bpmn/biocolor/1.0",prefix:"bioc",types:[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]},color:{name:"BPMN in Color",uri:"http://www.omg.org/spec/BPMN/non-normative/color/1.0",prefix:"color",types:[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]}};function Xi(e,t){return new Gi(L({},Qi,e),t)}function Zi(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}var Yi="Tried to access di from the businessObject. The di is available through the diagram element only. For more information, see https://github.com/bpmn-io/bpmn-js/issues/1472";function Ki(e){f(e,"di")||Object.defineProperty(e,"di",{enumerable:!1,get:function(){throw new Error(Yi)}})}function Ji(e,t){return e.$instanceOf(t)}function eo(e){var t={},n=[],r={};function i(e,t){return function(n){e(n,t)}}function o(e){t[e.id]=e}function s(t,n){try{var i=r[t.id]&&function(t,n){if(t.gfx)throw new Error(`already rendered ${Zi(t)}`);return e.element(t,r[t.id],n)}(t,n);return o(t),i}catch(e){a(e.message,{element:t,error:e}),console.error(`failed to import ${Zi(t)}`,e)}}function a(t,n){e.error(t,n)}var l=this.registerDi=function(e){var t=e.bpmnElement;t?r[t.id]?a(`multiple DI elements defined for ${Zi(t)}`,{element:t}):(r[t.id]=e,Ki(t)):a(`no bpmnElement referenced in ${Zi(e)}`,{element:e})};function c(e){var t;t=e.plane,l(t),v(t.planeElement,p)}function p(e){l(e)}this.handleDefinitions=function(o,s){var p=o.diagrams;if(s&&-1===p.indexOf(s))throw new Error("diagram not part of <bpmn:Definitions />");if(!s&&p&&p.length&&(s=p[0]),!s)throw new Error("no diagram to display");r={},c(s);var f=s.plane;if(!f)throw new Error(`no plane for ${Zi(s)}`);var g=f.bpmnElement;if(!g){if(g=function(e){return m(e.rootElements,(function(e){return Ji(e,"bpmn:Process")||Ji(e,"bpmn:Collaboration")}))}(o),!g)throw new Error("no process or collaboration to display");a(`correcting missing bpmnElement on ${Zi(f)} to ${Zi(g)}`),f.bpmnElement=g,l(f)}var b,w,_=function(t,n){return e.root(t,r[t.id],n)}(g,f);if(Ji(g,"bpmn:Process")||Ji(g,"bpmn:SubProcess"))d(g,_);else{if(!Ji(g,"bpmn:Collaboration"))throw new Error(`unsupported bpmnElement for ${Zi(f)}: ${Zi(g)}`);w=_,v((b=g).participants,i(T,w)),x(b.artifacts,w),n.push((function(){!function(e,t){v(e,i(h,t))}(b.messageFlows,w)})),function(e,n){var r=y(e,(function(e){return!t[e.id]&&Ji(e,"bpmn:Process")&&e.laneSets}));r.forEach(i(d,n))}(o.rootElements,_)}u(n)};var u=this.handleDeferred=function(){for(;n.length;)n.shift()()};function d(e,t){C(e,t),_(e.ioSpecification,t),x(e.artifacts,t),o(e)}function h(e,t){s(e,t)}function f(e,t){s(e,t)}function g(e,t){s(e,t)}function b(e,t){s(e,t)}function w(e,t){s(e,t)}function x(e,t){v(e,(function(e){Ji(e,"bpmn:Association")?n.push((function(){w(e,t)})):w(e,t)}))}function _(e,t){e&&(v(e.dataInputs,i(g,t)),v(e.dataOutputs,i(b,t)))}var k=this.handleSubProcess=function(e,t){C(e,t),x(e.artifacts,t)};function E(e,t){var r=s(e,t);Ji(e,"bpmn:SubProcess")&&k(e,r||t),Ji(e,"bpmn:Activity")&&_(e.ioSpecification,t),n.push((function(){v(e.dataInputAssociations,i(f,t)),v(e.dataOutputAssociations,i(f,t))}))}function O(e,t){s(e,t)}function P(e,t){n.push((function(){var n=s(e,t);e.childLaneSet&&S(e.childLaneSet,n||t),function(e){v(e.flowNodeRef,(function(t){var n=t.get("lanes");n&&n.push(e)}))}(e)}))}function S(e,t){v(e.lanes,i(P,t))}function C(e,t){!function(e,t){v(e,(function(e){Ji(e,"bpmn:SequenceFlow")?n.push((function(){!function(e,t){s(e,t)}(e,t)})):Ji(e,"bpmn:BoundaryEvent")?n.unshift((function(){E(e,t)})):Ji(e,"bpmn:FlowNode")?E(e,t):Ji(e,"bpmn:DataObject")||(Ji(e,"bpmn:DataStoreReference")||Ji(e,"bpmn:DataObjectReference")?O(e,t):a(`unrecognized flowElement ${Zi(e)} in context ${Zi(t&&t.businessObject)}`,{element:e,context:t}))}))}(e.flowElements,t),e.laneSets&&function(e,t){v(e,i(S,t))}(e.laneSets,t)}function T(e,t){var n=s(e,t),r=e.processRef;r&&d(r,n||t)}}function to(e,t){var n=ro(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function no(e,t){return _(t,(function(t){return to(e,t)}))}function ro(e){return e&&e.businessObject||e}function io(e){return e&&e.di}function oo(e,t,n){var r,i,o,s=[];function a(e,t){var n=new eo({root:function(e,t){return r.add(e,t)},element:function(e,t,n){return r.add(e,t,n)},error:function(e,t){s.push({message:e,context:t})}});t=t||e.diagrams&&e.diagrams[0];var i=function(e,t){if(!t)return;var n,r=t.plane.bpmnElement,i=r;to(r,"bpmn:Process")||to(r,"bpmn:Collaboration")||(i=function(e){var t=e;for(;t;){if(to(t,"bpmn:Process"))return t;t=t.$parent}}(r));n=to(i,"bpmn:Collaboration")?i:m(e.rootElements,(function(e){if(to(e,"bpmn:Collaboration"))return m(e.participants,(function(e){return e.processRef===i}))}));var o=[i];n&&(o=k(n.participants,(function(e){return e.processRef}))).push(n);var s=so(o),a=[t],l=[r];return v(e.diagrams,(function(e){var t=e.plane.bpmnElement;-1!==s.indexOf(t)&&-1===l.indexOf(t)&&(a.push(e),l.push(t))})),a}(e,t);if(!i)throw new Error("no diagram to display");v(i,(function(t){n.handleDefinitions(e,t)}));var a=t.plane.bpmnElement.id;o.setRootElement(o.findRoot(a+"_plane")||o.findRoot(a))}return new Promise((function(l,c){try{return r=e.get("bpmnImporter"),i=e.get("eventBus"),o=e.get("canvas"),i.fire("import.render.start",{definitions:t}),a(t,n),i.fire("import.render.complete",{error:undefined,warnings:s}),l({warnings:s})}catch(e){return e.warnings=s,c(e)}}))}function so(e){var t=[];return v(e,(function(e){e&&(t.push(e),t=t.concat(so(e.flowElements)))})),t}var ao,lo='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>',co={verticalAlign:"middle"},po={color:"#404040"},uo={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},ho={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},fo={position:"absolute",left:"50%",top:"40%",transform:"translate(-50%)",width:"260px",padding:"10px",background:"white",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"14px",display:"flex",lineHeight:"1.3"},mo='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+lo+'</a><span>Web-based tooling for BPMN, DMN and forms powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>';function go(){ao||(X(ao=fe(mo),uo),X(me("svg",ao),co),X(me(".backdrop",ao),ho),X(me(".notice",ao),fo),X(me(".link",ao),po,{margin:"15px 20px 15px 10px",alignSelf:"center"}),pe.bind(ao,".backdrop","click",(function(e){document.body.removeChild(ao)}))),document.body.appendChild(ao)}function yo(e){e=L({},bo,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),function(e){const t=fe('<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+lo+"</a>");X(me("svg",t),co),X(t,po,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(t),ae.bind(t,"click",(function(e){go(),e.preventDefault()}))}(this._container),this._init(this._container,this._moddle,e)}function vo(e,t){return e.warnings=t,e}e(yo,Nr),yo.prototype.importXML=async function(e,t){const n=this;let r=[];try{let o;e=this._emit("import.parse.start",{xml:e})||e;try{o=await this._moddle.fromXML(e,"bpmn:Definitions")}catch(e){throw this._emit("import.parse.complete",{error:e}),e}let s=o.rootElement;const a=o.references,l=o.warnings,c=o.elementsById;r=r.concat(l),s=this._emit("import.parse.complete",(i={error:null,definitions:s,elementsById:c,references:a,warnings:r},n.get("eventBus").createEvent(i)))||s;const p=await this.importDefinitions(s,t);return r=r.concat(p.warnings),this._emit("import.done",{error:null,warnings:r}),{warnings:r}}catch(e){let t=e;throw r=r.concat(t.warnings||[]),vo(t,r),t=function(e){const t=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);t&&(e.message="unparsable content <"+t[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+t[2]);return e}(t),this._emit("import.done",{error:t,warnings:t.warnings}),t}var i},yo.prototype.importDefinitions=async function(e,t){this._setDefinitions(e);return{warnings:(await this.open(t)).warnings}},yo.prototype.open=async function(e){const t=this._definitions;let n=e;if(!t){const e=new Error("no XML imported");throw vo(e,[]),e}if("string"==typeof e&&(n=function(e,t){if(!t)return null;return m(e.diagrams,(function(e){return e.id===t}))||null}(t,e),!n)){const t=new Error("BPMNDiagram <"+e+"> not found");throw vo(t,[]),t}try{this.clear()}catch(e){throw vo(e,[]),e}const{warnings:r}=await oo(this,t,n);return{warnings:r}},yo.prototype.saveXML=async function(e){e=e||{};let t,n,r=this._definitions;try{if(!r)throw new Error("no definitions loaded");r=this._emit("saveXML.start",{definitions:r})||r;n=(await this._moddle.toXML(r,e)).xml,n=this._emit("saveXML.serialized",{xml:n})||n}catch(e){t=e}const i=t?{error:t}:{xml:n};if(this._emit("saveXML.done",i),t)throw t;return i},yo.prototype.saveSVG=async function(){let e,t;this._emit("saveSVG.start");try{const t=this.get("canvas"),n=t.getActiveLayer(),r=me("defs",t._svg),i=Fe(n),o=r?"<defs>"+Fe(r)+"</defs>":"",s=n.getBBox();e='<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- created with bpmn-js / http://bpmn.io --\x3e\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+s.width+'" height="'+s.height+'" viewBox="'+s.x+" "+s.y+" "+s.width+" "+s.height+'" version="1.1">'+o+i+"</svg>"}catch(e){t=e}if(this._emit("saveSVG.done",{error:t,svg:e}),t)throw t;return{svg:e}},yo.prototype._setDefinitions=function(e){this._definitions=e},yo.prototype.getModules=function(){return this._modules},yo.prototype.clear=function(){this.getDefinitions()&&Nr.prototype.clear.call(this)},yo.prototype.destroy=function(){var e;Nr.prototype.destroy.call(this),(e=this._container).parentNode&&e.parentNode.removeChild(e)},yo.prototype.on=function(e,t,n,r){return this.get("eventBus").on(e,t,n,r)},yo.prototype.off=function(e,t){this.get("eventBus").off(e,t)},yo.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),"string"==typeof e&&(e=me(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},yo.prototype.getDefinitions=function(){return this._definitions},yo.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},yo.prototype._init=function(e,t,n){const r=n.modules||this.getModules(n),i=n.additionalModules||[],o=[].concat([{bpmnjs:["value",this],moddle:["value",t]}],r,i),s=L(q(n,["additionalModules"]),{canvas:L({},n.canvas,{container:e}),modules:o});Nr.call(this,s),n&&n.container&&this.attachTo(n.container)},yo.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},yo.prototype._createContainer=function(e){const t=fe('<div class="bjs-container"></div>');return X(t,{width:wo(e.width),height:wo(e.height),position:e.position}),t},yo.prototype._createModdle=function(e){return new Xi(L({},this._moddleExtensions,e.moddleExtensions))},yo.prototype._modules=[];const bo={width:"100%",height:"100%",position:"relative"};function wo(e){return e+(u(e)?"px":"")}function xo(e){yo.call(this,e),this.on("import.parse.complete",(function(e){e.error||this._collectIds(e.definitions,e.elementsById)}),this),this.on("diagram.destroy",(function(){this.get("moddle").ids.clear()}),this)}function _o(e,t){return!to(e,"bpmn:CallActivity")&&(to(e,"bpmn:SubProcess")?!(!(t=t||io(e))||!to(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded:!to(e,"bpmn:Participant")||!!ro(e).processRef)}function ko(e){if(to(e,"bpmn:Participant")||to(e,"bpmn:Lane")){var t=io(e).isHorizontal;return void 0===t||t}}function Eo(e){return e&&!1!==ro(e).isInterrupting}function Oo(e){return e&&!!ro(e).triggeredByEvent}function Po(e,t){return _(ro(e).eventDefinitions,(function(e){return to(e,t)}))}e(xo,yo),xo.prototype._createModdle=function(e){var t=yo.prototype._createModdle.call(this,e);return t.ids=new n([32,36,1]),t},xo.prototype._collectIds=function(e,t){var n,r=e.$model.ids;for(n in r.clear(),t)r.claim(n,t[n])};var So={width:90,height:20},Co=15;function To(e){return to(e,"bpmn:Event")||to(e,"bpmn:Gateway")||to(e,"bpmn:DataStoreReference")||to(e,"bpmn:DataObjectReference")||to(e,"bpmn:DataInput")||to(e,"bpmn:DataOutput")||to(e,"bpmn:SequenceFlow")||to(e,"bpmn:MessageFlow")||to(e,"bpmn:Group")}function Mo(e){return Hn(e.label)}function Ao(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=function(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}}(e),o=Math.atan((r.y-n.y)/(r.x-n.x)),s=i.x,a=i.y;return Math.abs(o)<Math.PI/2?a-=Co:s+=Co,{x:s,y:a}}function Do(e){return e.waypoints?Ao(e.waypoints):to(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+So.height/2}:{x:e.x+e.width/2,y:e.y+e.height+So.height/2}}function No(e){return to(e,"bpmn:FlowElement")||to(e,"bpmn:Participant")||to(e,"bpmn:Lane")||to(e,"bpmn:SequenceFlow")||to(e,"bpmn:MessageFlow")||to(e,"bpmn:DataInput")||to(e,"bpmn:DataOutput")?"name":to(e,"bpmn:TextAnnotation")?"text":to(e,"bpmn:Group")?"categoryValueRef":void 0}function Ro(e){var t=e.businessObject,n=No(t);if(n)return"categoryValueRef"===n?function(e){var t=e.categoryValueRef;return t&&t.value||""}(t):t[n]||""}function jo(e,t){var n=e.businessObject,r=No(n);return r&&("categoryValueRef"===r?n.categoryValueRef.value=t:n[r]=t),e}var Io="hsl(225, 10%, 15%)",Lo="white";function zo(e,t){return _(e.eventDefinitions,(function(e){return e.$type===t}))}function Bo(e,t,n){var r=io(e);return n||r.get("color:background-color")||r.get("bioc:fill")||t||Lo}function $o(e,t,n){var r=io(e);return n||r.get("color:border-color")||r.get("bioc:stroke")||t||Io}function qo(e,t,n,r){var i=io(e).get("label");return r||i&&i.get("color:color")||t||$o(e,n)}function Fo(e,t={}){return{width:Vo(e,t),height:Ho(e,t)}}function Vo(e,t={}){return f(t,"width")?t.width:e.width}function Ho(e,t={}){return f(t,"height")?t.height:e.height}var Uo=new n,Wo=.95;function Go(e,t,n,r,i,o,s){nt.call(this,t,s);var a=e&&e.defaultFillColor,l=e&&e.defaultStrokeColor,c=e&&e.defaultLabelColor,u=Uo.next(),d={};function h(e){return n.computeStyle(e,{strokeLinecap:"round",strokeLinejoin:"round",stroke:Io,strokeWidth:2,fill:"white"})}function f(e){return n.computeStyle(e,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:Io,strokeWidth:2})}function m(e,t){var{ref:n={x:0,y:0},scale:r=1,element:o}=t,s=Ae("marker",{id:e,viewBox:"0 0 20 20",refX:n.x,refY:n.y,markerWidth:20*r,markerHeight:20*r,orient:"auto"});ye(s,o);var a=me("defs",i._svg);a||(a=Ae("defs"),ye(i._svg,a)),ye(a,s),d[e]=s}function g(e){return e.replace(/[^0-9a-zA-Z]+/g,"_")}function y(e,t,n){var r=e+"-"+g(t)+"-"+g(n)+"-"+u;return d[r]||function(e,t,n,r){if("sequenceflow-end"===t){m(e,{element:Ae("path",{d:"M 1 5 L 11 10 L 1 15 Z",...h({fill:r,stroke:r,strokeWidth:1})}),ref:{x:11,y:10},scale:.5})}if("messageflow-start"===t){m(e,{element:Ae("circle",{cx:6,cy:6,r:3.5,...h({fill:n,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:6,y:6}})}if("messageflow-end"===t){m(e,{element:Ae("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...h({fill:n,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:8.5,y:5}})}if("association-start"===t){m(e,{element:Ae("path",{d:"M 11 5 L 1 10 L 11 15",...f({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:1,y:10},scale:.5})}if("association-end"===t){m(e,{element:Ae("path",{d:"M 1 5 L 11 10 L 1 15",...f({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:11,y:10},scale:.5})}if("conditional-flow-marker"===t){m(e,{element:Ae("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...h({fill:n,stroke:r})}),ref:{x:-1,y:10},scale:.5})}if("conditional-default-flow-marker"===t){m(e,{element:Ae("path",{d:"M 6 4 L 10 16",...h({stroke:r})}),ref:{x:0,y:10},scale:.5})}}(r,e,t,n),"url(#"+r+")"}function b(e,t,n,r,i={}){p(r)&&(i=r,r=0),r=r||0,i=h(i);var o=Ae("circle",{cx:t/2,cy:n/2,r:Math.round((t+n)/4-r),...i});return ye(e,o),o}function w(e,t,n,r,i,o){p(i)&&(o=i,i=0),i=i||0,o=h(o);var s=Ae("rect",{x:i,y:i,width:t-2*i,height:n-2*i,rx:r,ry:r,...o});return ye(e,s),s}function x(e,t,n,r){var i=lt(t,n=f(n),r);return ye(e,i),i}function _(e,t,n){return x(e,t,n,5)}function k(e,t,n){n=f(n);var r=Ae("path",{...n,d:t});return ye(e,r),r}function E(e,t,n,r){return k(t,n,L({"data-marker":e},r))}function O(e){return te[e]}function P(e){return function(t,n,r){return O(e)(t,n,r)}}var S=function(e,t,n={},i){return k(e,r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),{fill:i?$o(t,l,n.stroke):Bo(t,a,n.fill),stroke:i?Bo(t,a,n.fill):$o(t,l,n.stroke),strokeWidth:1})},C=function(e,t,n={}){var i=b(e,t.width,t.height,.2*t.height,{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:2});k(e,r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),{stroke:$o(t,l,n.stroke),strokeWidth:2});for(var o=0;o<12;o++){var s=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),c=t.width/2,p=t.height/2;k(e,s,{strokeWidth:1,stroke:$o(t,l,n.stroke),transform:"rotate("+30*o+","+p+","+c+")"})}return i},T=function(e,t,n={},i){return k(e,r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{fill:i?$o(t,l,n.stroke):Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1})},M=function(e,t,n={}){return k(e,r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1})},A=function(e,t,n={},i){return k(e,r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{fill:i?$o(t,l,n.stroke):Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1})},D=function(e,t,n={},i){return k(e,r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),{fill:i?$o(t,l,n.stroke):Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1})},N=function(e,t,n={},i){var o=k(e,r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{fill:i?$o(t,l,n.stroke):"none",stroke:$o(t,l,n.stroke),strokeWidth:1});return Cr(o,45),o},R=function(e,t,n={},i){return k(e,r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.22,my:.5}}),{fill:i?$o(t,l,n.stroke):Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1})},j=function(e,t,n={},i){return k(e,r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:i?$o(t,l,n.stroke):Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)})},I=function(e,t,n={},i){return k(e,r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),{fill:i?$o(t,l,n.stroke):Bo(t,a,n.fill),strokeWidth:1})},z=function(e,t,n={}){return k(e,r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1})},B=function(e,t,n={}){return b(e,t.width,t.height,8,{fill:$o(t,l,n.stroke),stroke:$o(t,l,n.stroke),strokeWidth:4})};function $(e,t,n={}){var r=ro(e),i=function(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}(r);return r.get("eventDefinitions")&&r.get("eventDefinitions").length>1?r.get("parallelMultiple")?z(t,e,n,i):I(t,e,n,i):zo(r,"bpmn:MessageEventDefinition")?S(t,e,n,i):zo(r,"bpmn:TimerEventDefinition")?C(t,e,n,i):zo(r,"bpmn:ConditionalEventDefinition")?M(t,e,n,i):zo(r,"bpmn:SignalEventDefinition")?j(t,e,n,i):zo(r,"bpmn:EscalationEventDefinition")?T(t,e,n,i):zo(r,"bpmn:LinkEventDefinition")?A(t,e,n,i):zo(r,"bpmn:ErrorEventDefinition")?D(t,e,n,i):zo(r,"bpmn:CancelEventDefinition")?N(t,e,n,i):zo(r,"bpmn:CompensateEventDefinition")?R(t,e,n,i):zo(r,"bpmn:TerminateEventDefinition")?B(t,e,n,i):null}var q={ParticipantMultiplicityMarker:function(e,t,n={}){var i=Vo(t,n),o=Ho(t,n);E("participant-multiplicity",e,r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:i,containerHeight:o,position:{mx:(i/2-6)/i,my:(o-15)/o}}),{strokeWidth:2,fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)})},SubProcessMarker:function(e,t,n={}){Sr(w(e,14,14,0,{strokeWidth:1,fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)}),t.width/2-7.5,t.height-20),E("sub-process",e,r.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2-7.5)/t.width,my:(t.height-20)/t.height}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)})},ParallelMarker:function(e,t,n){var i=Vo(t,n),o=Ho(t,n);E("parallel",e,r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:i,containerHeight:o,position:{mx:(i/2+n.parallel)/i,my:(o-20)/o}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)})},SequentialMarker:function(e,t,n){E("sequential",e,r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.seq)/t.width,my:(t.height-19)/t.height}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)})},CompensationMarker:function(e,t,n){E("compensation",e,r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.compensation)/t.width,my:(t.height-13)/t.height}}),{strokeWidth:1,fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)})},LoopMarker:function(e,t,n){var i=Vo(t,n),o=Ho(t,n);E("loop",e,r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:i,containerHeight:o,position:{mx:(i/2+n.loop)/i,my:(o-7)/o}}),{strokeWidth:1.5,fill:"none",stroke:$o(t,l,n.stroke),strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){var i=Vo(t,n),o=Ho(t,n);E("adhoc",e,r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:i,containerHeight:o,position:{mx:(i/2+n.adhoc)/i,my:(o-15)/o}}),{strokeWidth:1,fill:$o(t,l,n.stroke),stroke:$o(t,l,n.stroke)})}};function F(e,t,n,r){q[e](t,n,r)}function V(e,t,n,r={}){r={fill:r.fill,stroke:r.stroke,width:Vo(t,r),height:Ho(t,r)};var i=ro(t),o=n&&n.includes("SubProcessMarker");r=o?{...r,seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{...r,seq:-5,parallel:-6,compensation:-27,loop:0,adhoc:10},v(n,(function(n){F(n,e,t,r)})),i.get("isForCompensation")&&F("CompensationMarker",e,t,r),to(i,"bpmn:AdHocSubProcess")&&F("AdhocMarker",e,t,r);var s=i.get("loopCharacteristics"),a=s&&s.get("isSequential");s&&(void 0===a&&F("LoopMarker",e,t,r),!1===a&&F("ParallelMarker",e,t,r),!0===a&&F("SequentialMarker",e,t,r))}function H(e,t,n={}){n=L({size:{width:100}},n);var r=o.createText(t||"",n);return ke(r).add("djs-label"),ye(e,r),r}function U(e,t,n,r={}){var i=ro(t),o=Fo({x:t.x,y:t.y,width:t.width,height:t.height},r);return H(e,i.name,{align:n,box:o,padding:7,style:{fill:qo(t,c,l,r.stroke)}})}function W(e,t,n,r={}){var i=ko(n),o=H(e,t,{box:{height:30,width:i?Ho(n,r):Vo(n,r)},align:"center-middle",style:{fill:qo(n,c,l,r.stroke)}});i&&Pr(o,0,-(-1*Ho(n,r)),270)}function G(e,t,n={}){var{width:r,height:i}=Fo(t,n);return w(e,r,i,10,{...n,fill:Bo(t,a,n.fill),fillOpacity:Wo,stroke:$o(t,l,n.stroke)})}function Q(e,t,n={}){var r=ro(t),i=Bo(t,a,n.fill),o=$o(t,l,n.stroke);return"One"!==r.get("associationDirection")&&"Both"!==r.get("associationDirection")||(n.markerEnd=y("association-end",i,o)),"Both"===r.get("associationDirection")&&(n.markerStart=y("association-start",i,o)),n=Qo(n,["markerStart","markerEnd"]),_(e,t.waypoints,{...n,stroke:o,strokeDasharray:"0, 5"})}function X(e,t,n={}){var i=Bo(t,a,n.fill),o=$o(t,l,n.stroke),s=k(e,r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:i,fillOpacity:Wo,stroke:o});(function(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection})(ro(t))&&k(e,r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.33,my:(t.height-18)/t.height}}),{strokeWidth:2,fill:i,stroke:o});return s}function Z(e,t,n={}){return b(e,t.width,t.height,{fillOpacity:Wo,...n,fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)})}function Y(e,t,n={}){return function(e,t,n,r){var i=t/2,o=n/2,s=[{x:i,y:0},{x:t,y:o},{x:i,y:n},{x:0,y:o}].map((function(e){return e.x+","+e.y})).join(" ");r=h(r);var a=Ae("polygon",{...r,points:s});return ye(e,a),a}(e,t.width,t.height,{fill:Bo(t,a,n.fill),fillOpacity:Wo,stroke:$o(t,l,n.stroke)})}function K(e,t,n={}){var r=w(e,Vo(t,n),Ho(t,n),0,{fill:Bo(t,a,n.fill),fillOpacity:n.fillOpacity||Wo,stroke:$o(t,l,n.stroke),strokeWidth:1.5}),i=ro(t);to(i,"bpmn:Lane")&&W(e,i.get("name"),t,n);return r}function J(e,t,n={}){var r=G(e,t,n);Oo(t)&&xe(r,{strokeDasharray:"0, 5.5",strokeWidth:2.5});var i=_o(t);return U(e,t,i?"center-top":"center-middle",n),V(e,t,i?void 0:["SubProcessMarker"],n),r}function ee(e,t,n={}){var r=G(e,t,n);return U(e,t,"center-middle",n),V(e,t,void 0,n),r}var te=this.handlers={"bpmn:AdHocSubProcess":function(e,t,n={}){return J(e,t,n=_o(t)?Qo(n,["fill","stroke","width","height"]):Qo(n,["fill","stroke"]))},"bpmn:Association":function(e,t,n={}){return Q(e,t,n=Qo(n,["fill","stroke"]))},"bpmn:BoundaryEvent":function(e,t,n={}){var{renderIcon:r=!0}=n;n=Qo(n,["fill","stroke"]);var i=ro(t).get("cancelActivity");n={strokeWidth:1.5,fill:Bo(t,a,n.fill),fillOpacity:1,stroke:$o(t,l,n.stroke)},i||(n.strokeDasharray="6");var o=Z(e,t,n);return b(e,t.width,t.height,3,{...n,fill:"none"}),r&&$(t,e,n),o},"bpmn:BusinessRuleTask":function(e,t,n={}){var i=ee(e,t,n=Qo(n,["fill","stroke"]));return xe(k(e,r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}})),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1}),xe(k(e,r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}})),{fill:$o(t,l,n.stroke),stroke:$o(t,l,n.stroke),strokeWidth:1}),i},"bpmn:CallActivity":function(e,t,n={}){return n=Qo(n,["fill","stroke"]),J(e,t,{strokeWidth:5,...n})},"bpmn:ComplexGateway":function(e,t,n={}){var i=Y(e,t,n=Qo(n,["fill","stroke"]));return k(e,r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{fill:$o(t,l,n.stroke),stroke:$o(t,l,n.stroke),strokeWidth:1}),i},"bpmn:DataInput":function(e,t,n={}){n=Qo(n,["fill","stroke"]);var i=r.getRawPath("DATA_ARROW"),o=X(e,t,n);return k(e,i,{fill:"none",stroke:$o(t,l,n.stroke),strokeWidth:1}),o},"bpmn:DataInputAssociation":function(e,t,n={}){return n=Qo(n,["fill","stroke"]),Q(e,t,{...n,markerEnd:y("association-end",Bo(t,a,n.fill),$o(t,l,n.stroke))})},"bpmn:DataObject":function(e,t,n={}){return X(e,t,n=Qo(n,["fill","stroke"]))},"bpmn:DataObjectReference":P("bpmn:DataObject"),"bpmn:DataOutput":function(e,t,n={}){n=Qo(n,["fill","stroke"]);var i=r.getRawPath("DATA_ARROW"),o=X(e,t,n);return k(e,i,{strokeWidth:1,fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)}),o},"bpmn:DataOutputAssociation":function(e,t,n={}){return n=Qo(n,["fill","stroke"]),Q(e,t,{...n,markerEnd:y("association-end",Bo(t,a,n.fill),$o(t,l,n.stroke))})},"bpmn:DataStoreReference":function(e,t,n={}){return n=Qo(n,["fill","stroke"]),k(e,r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{fill:Bo(t,a,n.fill),fillOpacity:Wo,stroke:$o(t,l,n.stroke),strokeWidth:2})},"bpmn:EndEvent":function(e,t,n={}){var{renderIcon:r=!0}=n;n=Qo(n,["fill","stroke"]);var i=Z(e,t,{...n,strokeWidth:4});return r&&$(t,e,n),i},"bpmn:EventBasedGateway":function(e,t,n={}){n=Qo(n,["fill","stroke"]);var i=ro(t),o=Y(e,t,n);b(e,t.width,t.height,.2*t.height,{fill:Bo(t,"none",n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1});var s=i.get("eventGatewayType"),a=!!i.get("instantiate");if("Parallel"===s){var c=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}});k(e,c,{fill:"none",stroke:$o(t,l,n.stroke),strokeWidth:1})}else"Exclusive"===s&&(a||b(e,t.width,t.height,.26*t.height,{fill:"none",stroke:$o(t,l,n.stroke),strokeWidth:1}),function(){var i=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}});k(e,i,{fill:"none",stroke:$o(t,l,n.stroke),strokeWidth:2})}());return o},"bpmn:ExclusiveGateway":function(e,t,n={}){var i=Y(e,t,n=Qo(n,["fill","stroke"])),o=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return io(t).get("isMarkerVisible")&&k(e,o,{fill:$o(t,l,n.stroke),stroke:$o(t,l,n.stroke),strokeWidth:1}),i},"bpmn:Gateway":function(e,t,n={}){return Y(e,t,n=Qo(n,["fill","stroke"]))},"bpmn:Group":function(e,t,n={}){return n=Qo(n,["fill","stroke","width","height"]),w(e,t.width,t.height,10,{stroke:$o(t,l,n.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:Vo(t,n),height:Ho(t,n)})},"bpmn:InclusiveGateway":function(e,t,n={}){var r=Y(e,t,n=Qo(n,["fill","stroke"]));return b(e,t.width,t.height,.24*t.height,{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:2.5}),r},"bpmn:IntermediateEvent":function(e,t,n={}){var{renderIcon:r=!0}=n;n=Qo(n,["fill","stroke"]);var i=Z(e,t,{...n,strokeWidth:1.5});return b(e,t.width,t.height,3,{fill:"none",stroke:$o(t,l,n.stroke),strokeWidth:1.5}),r&&$(t,e,n),i},"bpmn:IntermediateCatchEvent":P("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":P("bpmn:IntermediateEvent"),"bpmn:Lane":function(e,t,n={}){return n=Qo(n,["fill","stroke","width","height"]),K(e,t,{...n,fillOpacity:.25})},"bpmn:ManualTask":function(e,t,n={}){var i=ee(e,t,n=Qo(n,["fill","stroke"]));return k(e,r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:.5}),i},"bpmn:MessageFlow":function(e,t,n={}){n=Qo(n,["fill","stroke"]);var i=ro(t),o=io(t),s=Bo(t,a,n.fill),c=$o(t,l,n.stroke),p=_(e,t.waypoints,{markerEnd:y("messageflow-end",s,c),markerStart:y("messageflow-start",s,c),stroke:c,strokeDasharray:"10, 11",strokeWidth:1.5});if(i.get("messageRef")){var u=p.getPointAtLength(p.getTotalLength()/2),d=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:u.x,y:u.y}}),h={strokeWidth:1};"initiating"===o.get("messageVisibleKind")?(h.fill=s,h.stroke=c):(h.fill=c,h.stroke=s);var f=k(e,d,h),m=H(e,i.get("messageRef").get("name"),{align:"center-top",fitBox:!0,style:{fill:c}}),g=f.getBBox(),v=m.getBBox();Pr(m,u.x-v.width/2,u.y+g.height/2+10,0)}return p},"bpmn:ParallelGateway":function(e,t,n={}){var i=Y(e,t,n=Qo(n,["fill","stroke"]));return k(e,r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{fill:$o(t,l,n.stroke),stroke:$o(t,l,n.stroke),strokeWidth:1}),i},"bpmn:Participant":function(e,t,n={}){var r=K(e,t,n=Qo(n,["fill","stroke","width","height"])),i=_o(t),o=ko(t),s=ro(t),a=s.get("name");if(i){x(e,o?[{x:30,y:0},{x:30,y:Ho(t,n)}]:[{x:0,y:30},{x:Vo(t,n),y:30}],{stroke:$o(t,l,n.stroke),strokeWidth:1.5}),W(e,a,t,n)}else{var p=Fo(t,n);o||(p.height=Vo(t,n),p.width=Ho(t,n));var u=H(e,a,{box:p,align:"center-middle",style:{fill:qo(t,c,l,n.stroke)}});if(!o)Pr(u,0,-(-1*Ho(t,n)),270)}return s.get("participantMultiplicity")&&F("ParticipantMultiplicityMarker",e,t,n),r},"bpmn:ReceiveTask":function(e,t,n={}){n=Qo(n,["fill","stroke"]);var i,o=ro(t),s=ee(e,t,n);return o.get("instantiate")?(b(e,28,28,4.4,{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1}),i=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):i=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),k(e,i,{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1}),s},"bpmn:ScriptTask":function(e,t,n={}){var i=ee(e,t,n=Qo(n,["fill","stroke"]));return k(e,r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1}),i},"bpmn:SendTask":function(e,t,n={}){var i=ee(e,t,n=Qo(n,["fill","stroke"]));return k(e,r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{fill:$o(t,l,n.stroke),stroke:Bo(t,a,n.fill),strokeWidth:1}),i},"bpmn:SequenceFlow":function(e,t,n={}){n=Qo(n,["fill","stroke"]);var r=Bo(t,a,n.fill),i=$o(t,l,n.stroke),o=_(e,t.waypoints,{markerEnd:y("sequenceflow-end",r,i),stroke:i}),s=ro(t),{source:c}=t;if(c){var p=ro(c);s.get("conditionExpression")&&to(p,"bpmn:Activity")&&xe(o,{markerStart:y("conditional-flow-marker",r,i)}),p.get("default")&&(to(p,"bpmn:Gateway")||to(p,"bpmn:Activity"))&&p.get("default")===s&&xe(o,{markerStart:y("conditional-default-flow-marker",r,i)})}return o},"bpmn:ServiceTask":function(e,t,n={}){var i=ee(e,t,n=Qo(n,["fill","stroke"]));return b(e,10,10,{fill:Bo(t,a,n.fill),stroke:"none",transform:"translate(6, 6)"}),k(e,r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1}),b(e,10,10,{fill:Bo(t,a,n.fill),stroke:"none",transform:"translate(11, 10)"}),k(e,r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1}),i},"bpmn:StartEvent":function(e,t,n={}){var{renderIcon:r=!0}=n;n=Qo(n,["fill","stroke"]),ro(t).get("isInterrupting")||(n={...n,strokeDasharray:"6"});var i=Z(e,t,n);return r&&$(t,e,n),i},"bpmn:SubProcess":function(e,t,n={}){return J(e,t,n=_o(t)?Qo(n,["fill","stroke","width","height"]):Qo(n,["fill","stroke"]))},"bpmn:Task":function(e,t,n={}){return ee(e,t,n=Qo(n,["fill","stroke"]))},"bpmn:TextAnnotation":function(e,t,n={}){n=Qo(n,["fill","stroke","width","height"]);var{width:i,height:o}=Fo(t,n),s=w(e,i,o,0,0,{fill:"none",stroke:"none"});return k(e,r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:i,containerHeight:o,position:{mx:0,my:0}}),{stroke:$o(t,l,n.stroke)}),H(e,ro(t).get("text")||"",{align:"left-top",box:Fo(t,n),padding:7,style:{fill:qo(t,c,l,n.stroke)}}),s},"bpmn:Transaction":function(e,t,r={}){r=_o(t)?Qo(r,["fill","stroke","width","height"]):Qo(r,["fill","stroke"]);var i=J(e,t,{strokeWidth:1.5,...r}),o=n.style(["no-fill","no-events"],{stroke:$o(t,l,r.stroke),strokeWidth:1.5});return _o(t)||(r={}),w(e,Vo(t,r),Ho(t,r),7,3,o),i},"bpmn:UserTask":function(e,t,n={}){var i=ee(e,t,n=Qo(n,["fill","stroke"]));return k(e,r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:.5}),k(e,r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:.5}),k(e,r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{fill:$o(t,l,n.stroke),stroke:$o(t,l,n.stroke),strokeWidth:.5}),i},label:function(e,t,n={}){return function(e,t,n={}){var r={width:90,height:30,x:t.width/2+t.x,y:t.height/2+t.y};return H(e,Ro(t),{box:r,fitBox:!0,style:L({},o.getExternalStyle(),{fill:qo(t,c,l,n.stroke)})})}(e,t,n)}};this._drawPath=k,this._renderer=O}function Qo(e,t=[]){return t.reduce(((t,n)=>(e[n]&&(t[n]=e[n]),t)),{})}e(Go,nt),Go.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Go.prototype.canRender=function(e){return to(e,"bpmn:BaseElement")},Go.prototype.drawShape=function(e,t,n={}){var{type:r}=t;return this._renderer(r)(e,t,n)},Go.prototype.drawConnection=function(e,t,n={}){var{type:r}=t;return this._renderer(r)(e,t,n)},Go.prototype.getShapePath=function(e){return to(e,"bpmn:Event")?(n=(t=e).x+t.width/2,r=t.y+t.height/2,i=t.width/2,rt([["M",n,r],["m",0,-i],["a",i,i,0,1,1,0,2*i],["a",i,i,0,1,1,0,-2*i],["z"]])):to(e,"bpmn:Activity")?function(e,t){var n=e.x,r=e.y,i=e.width,o=e.height;return rt([["M",n+t,r],["l",i-2*t,0],["a",t,t,0,0,1,t,t],["l",0,o-2*t],["a",t,t,0,0,1,-t,t],["l",2*t-i,0],["a",t,t,0,0,1,-t,-t],["l",0,2*t-o],["a",t,t,0,0,1,t,-t],["z"]])}(e,10):to(e,"bpmn:Gateway")?function(e){var t=e.width/2,n=e.height/2;return rt([["M",e.x+t,e.y],["l",t,n],["l",-t,n],["l",-t,-n],["z"]])}(e):function(e){var t=e.x,n=e.y,r=e.width;return rt([["M",t,n],["l",r,0],["l",0,e.height],["l",-r,0],["z"]])}(e);var t,n,r,i};var Xo=0,Zo={width:150,height:50};function Yo(e,t){var n;t.textContent=e;try{var r,i=""===e;return t.textContent=i?"dummy":e,r={width:(n=t.getBBox()).width+2*n.x,height:n.height},i&&(r.width=0),r}catch(e){return{width:0,height:0}}}function Ko(e,t,n){for(var r,i=e.shift(),o=i;;){if((r=Yo(o,n)).width=o?r.width:0," "===o||""===o||r.width<Math.round(t)||o.length<2)return Jo(e,o,i,r);o=ts(o,r.width,t)}}function Jo(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 es="­";function ts(e,t,n){var r=Math.max(e.length*(n/t),1),i=function(e,t){var n,r=e.split(/(\s|-|\u00AD)/g),i=[],o=0;if(r.length>1)for(;n=r.shift();){if(!(n.length+o<t)){"-"!==n&&n!==es||i.pop();break}i.push(n),o+=n.length}var s=i[i.length-1];return s&&s===es&&(i[i.length-1]="-"),i.join("")}(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function ns(e){this._config=L({},{size:Zo,padding:Xo,style:{},align:"center-top"},e||{})}ns.prototype.createText=function(e,t){return this.layoutText(e,t).element},ns.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},ns.prototype.layoutText=function(e,t){var n=L({},this._config.size,t.box),r=L({},this._config.style,t.style),i=function(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}(t.align||this._config.align),o=function(e){return p(e)?L({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}(void 0!==t.padding?t.padding:this._config.padding),s=t.fitBox||!1,a=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(r),l=e.split(/\u00AD?\r?\n/),c=[],u=n.width-o.left-o.right,d=Ae("text");for(xe(d,{x:0,y:0}),xe(d,r),ye(function(){var e=document.getElementById("helper-svg");return e||(xe(e=Ae("svg"),{id:"helper-svg"}),Ct(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}(),d);l.length;)c.push(Ko(l,u,d));"middle"===i.vertical&&(o.top=o.bottom=0);var h=w(c,(function(e,t,n){return e+(a||t.height)}),0)+o.top+o.bottom,f=w(c,(function(e,t,n){return t.width>e?t.width:e}),0),m=o.top;"middle"===i.vertical&&(m+=(n.height-h)/2),m-=(a||c[0].height)/4;var g=Ae("text");return xe(g,r),v(c,(function(e){var t;switch(m+=a||e.height,i.horizontal){case"left":t=o.left;break;case"right":t=(s?f:u)-o.right-e.width;break;default:t=Math.max(((s?f:u)-e.width)/2+o.left,0)}var n=Ae("tspan");xe(n,{x:t,y:m}),n.textContent=e.text,ye(g,n)})),Oe(d),{dimensions:{width:f,height:h},element:g}};function rs(e){var t=L({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=L({},t,{fontSize:n},e&&e.externalStyle||{}),i=new ns({style:t});this.getExternalLabelBounds=function(e,t){var n=i.getDimensions(t,{box:{width:90,height:30},style:r});return{x:Math.round(e.x+e.width/2-n.width/2),y:Math.round(e.y),width:Math.ceil(n.width),height:Math.ceil(n.height)}},this.getTextAnnotationBounds=function(e,n){var r=i.getDimensions(n,{box:e,style:t,align:"left-top",padding:5});return{x:e.x,y:e.y,width:e.width,height:Math.max(30,Math.round(r.height))}},this.createText=function(e,t){return i.createText(e,t||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}rs.$inject=["config.textRenderer"];var is=/\{([^{}]+)\}/g,os=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var ss={__init__:["bpmnRenderer"],bpmnRenderer:["type",Go],textRenderer:["type",rs],pathMap:["type",function(){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(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var n,r,i=this.pathMap[e];t.abspos?(n=t.abspos.x,r=t.abspos.y):(n=t.containerWidth*t.position.mx,r=t.containerHeight*t.position.my);var o={};if(t.position){for(var s=t.containerHeight/i.height*t.yScaleFactor,a=t.containerWidth/i.width*t.xScaleFactor,l=0;l<i.heightElements.length;l++)o["y"+l]=i.heightElements[l]*s;for(var c=0;c<i.widthElements.length;c++)o["x"+c]=i.widthElements[c]*a}var p,u,d=(p=i.d,u={mx:n,my:r,e:o},String(p).replace(is,(function(e,t){return function(e,t,n){var r=n;return t.replace(os,(function(e,t,n,i,o){t=t||i,r&&(t in r&&(r=r[t]),"function"==typeof r&&o&&(r=r()))})),r=(null==r||r==n?e:r)+""}(e,t,u)})));return d}}]};var as={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]};function ls(e,t,n){return L({id:e.id,type:e.$type,businessObject:e,di:t},n)}function cs(e,t,n){var r=e.waypoint;return!r||r.length<2?[Zn(t),Zn(n)]:r.map((function(e){return{x:e.x,y:e.y}}))}function ps(e,t,n){return new Error(`element ${Zi(t)} referenced by ${Zi(e)}#${n} not yet drawn`)}function us(e,t,n,r,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._textRenderer=i}us.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],us.prototype.add=function(e,t,n){var r,i,o;if(to(t,"bpmndi:BPMNPlane")){var s=to(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};r=this._elementFactory.createRoot(ls(e,t,s)),this._canvas.addRootElement(r)}else if(to(t,"bpmndi:BPMNShape")){var a=!_o(e,t),l=function(e){return to(e,"bpmn:Group")}(e);i=n&&(n.hidden||n.collapsed);var c=t.bounds;r=this._elementFactory.createShape(ls(e,t,{collapsed:a,hidden:i,x:Math.round(c.x),y:Math.round(c.y),width:Math.round(c.width),height:Math.round(c.height),isFrame:l})),to(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,r),to(e,"bpmn:Lane")&&(o=0),to(e,"bpmn:DataStoreReference")&&(function(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}(n,Zn(c))||(n=this._canvas.findRoot(n))),this._canvas.addShape(r,n,o)}else{if(!to(t,"bpmndi:BPMNEdge"))throw new Error(`unknown di ${Zi(t)} for element ${Zi(e)}`);var p=this._getSource(e),u=this._getTarget(e);i=n&&(n.hidden||n.collapsed),r=this._elementFactory.createConnection(ls(e,t,{hidden:i,source:p,target:u,waypoints:cs(t,p,u)})),to(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(r,n,o)}return To(e)&&Ro(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r},us.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${Zi(e)}#attachedToRef`);var r=this._elementRegistry.get(n.id),i=r&&r.attachers;if(!r)throw ps(e,n,"attachedToRef");t.host=r,i||(r.attachers=i=[]),-1===i.indexOf(t)&&i.push(t)},us.prototype.addLabel=function(e,t,n){var r,i,o;return r=function(e,t){var n,r,i,o=e.label;return o&&o.bounds?(i=o.bounds,r={width:Math.max(So.width,i.width),height:i.height},n={x:i.x+i.width/2,y:i.y+i.height/2}):(n=Do(t),r=So),L({x:n.x-r.width/2,y:n.y-r.height/2},r)}(t,n),(i=Ro(n))&&(r=this._textRenderer.getExternalLabelBounds(r,i)),o=this._elementFactory.createLabel(ls(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!Ro(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)},us.prototype._getConnectedElement=function(e,t){var n,r,i=e.$type;if(r=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===i&&(r=r&&r[0]),("source"===t&&"bpmn:DataOutputAssociation"===i||"target"===t&&"bpmn:DataInputAssociation"===i)&&(r=e.$parent),n=r&&this._getElement(r))return n;throw r?ps(e,r,t+"Ref"):new Error(`${Zi(e)}#${t} Ref not specified`)},us.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},us.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},us.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};var ds={__depends__:[ss,{__depends__:[as],bpmnImporter:["type",us]}]};function hs(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}hs.prototype.next=function(){return this._prefix+ ++this._counter};var fs=new hs("ov");function ms(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=fs,this._overlayDefaults=L({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=function(e){var t=Zt('<div class="djs-overlay-container" />');return Ct(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}(n.getContainer()),this._init()}function gs(e,t,n){Ct(e,{left:t+"px",top:n+"px"})}function ys(e,t){e.style.display=!1===t?"none":""}function vs(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}ms.$inject=["config.overlays","eventBus","canvas","elementRegistry"],ms.prototype.get=function(e){if(h(e)&&(e={id:e}),h(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?y(t.overlays,M({type:e.type})):t.overlays.slice():[]}return e.type?y(this._overlays,M({type:e.type})):e.id?this._overlays[e.id]:null},ms.prototype.add=function(e,t,n){if(p(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=L({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r},ms.prototype.remove=function(e){var t=this.get(e)||[];c(t)||(t=[t]);var n=this;v(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(Jt(e.html),Jt(e.htmlContainer),delete e.htmlContainer,delete e.element,delete n._overlays[e.id]),t){var r=t.overlays.indexOf(e);-1!==r&&t.overlays.splice(r,1)}}))},ms.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},ms.prototype.show=function(){ys(this._overlayRoot)},ms.prototype.hide=function(){ys(this._overlayRoot,!1)},ms.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Nt(this._overlayRoot)},ms.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}gs(n,r,i),Tt(e.html,"data-container-id",t.id)},ms.prototype._updateOverlay=function(e){var t,n,r=e.position,i=e.htmlContainer,o=e.element,s=r.left,a=r.top;void 0!==r.right&&(t=o.waypoints?mt(o).width:o.width,s=-1*r.right+t);void 0!==r.bottom&&(n=o.waypoints?mt(o).height:o.height,a=-1*r.bottom+n);gs(i,s||0,a||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},ms.prototype._createOverlayContainer=function(e){var t=Zt('<div class="djs-overlays" />');Ct(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},ms.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";vs(this._overlayRoot,n)},ms.prototype._getOverlayContainer=function(e,t){var n=m(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},ms.prototype._addOverlay=function(e){var t,n,r=e.id,i=e.element,o=e.html;o.get&&o.constructor.prototype.jquery&&(o=o.get(0)),h(o)&&(o=Zt(o)),n=this._getOverlayContainer(i),Ct(t=Zt('<div class="djs-overlay" data-overlay-id="'+r+'">'),{position:"absolute"}),t.appendChild(o),e.type&&At(t).add("djs-overlay-"+e.type),ys(t,this._canvas.findRoot(i)===this._canvas.getRootElement()),e.htmlContainer=t,n.overlays.push(e),n.html.appendChild(t),this._overlays[r]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},ms.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,r=this._canvas.findRoot(e.element),i=n&&n.minZoom,o=n&&n.maxZoom,s=e.htmlContainer,l=!0;(r!==this._canvas.getRootElement()||n&&(a(i)&&i>t.scale||a(o)&&o<t.scale))&&(l=!1),ys(s,l),this._updateOverlayScale(e,t)},ms.prototype._updateOverlayScale=function(e,t){var n,r,i,o=e.scale,s=e.htmlContainer,l="";!0!==o&&(!1===o?(n=1,r=1):(n=o.min,r=o.max),a(n)&&t.scale<n&&(i=(1/t.scale||1)*n),a(r)&&t.scale>r&&(i=(1/t.scale||1)*r)),a(i)&&(l="scale("+i+","+i+")"),vs(s,l)},ms.prototype._updateOverlaysVisibilty=function(e){var t=this;v(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},ms.prototype._init=function(){var e=this._eventBus,t=this;e.on("canvas.viewbox.changing",(function(e){t.hide()})),e.on("canvas.viewbox.changed",(function(e){var n;n=e.viewbox,t._updateRoot(n),t._updateOverlaysVisibilty(n),t.show()})),e.on(["shape.remove","connection.remove"],(function(e){var n=e.element;v(t.get({element:n}),(function(e){t.remove(e.id)}));var r=t._getOverlayContainer(n);if(r){Jt(r.html);var i=t._overlayContainers.indexOf(r);-1!==i&&t._overlayContainers.splice(i,1)}})),e.on("element.changed",500,(function(e){var n=e.element,r=t._getOverlayContainer(n,!0);r&&(v(r.overlays,(function(e){t._updateOverlay(e)})),t._updateOverlayContainer(r))})),e.on("element.marker.update",(function(e){var n=t._getOverlayContainer(e.element,!0);n&&At(n.html)[e.add?"add":"remove"](e.marker)})),e.on("root.set",(function(){t._updateOverlaysVisibilty(t._canvas.viewbox())})),e.on("diagram.clear",this.clear,this)};var bs={__init__:["overlays"],overlays:["type",ms]};function ws(e,t,n,r){e.on("element.changed",(function(r){var i=r.element;(i.parent||i===t.getRootElement())&&(r.gfx=n.getGraphics(i)),r.gfx&&e.fire(gt(i)+".changed",r)})),e.on("elements.changed",(function(t){var n=t.elements;n.forEach((function(t){e.fire("element.changed",{element:t})})),r.updateContainments(n)})),e.on("shape.changed",(function(e){r.update("shape",e.element,e.gfx)})),e.on("connection.changed",(function(e){r.update("connection",e.element,e.gfx)}))}ws.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var xs={__init__:["changeSupport"],changeSupport:["type",ws]};function _s(e){this._eventBus=e}function ks(e){return function(t,n,r,i,o){(d(t)||u(t))&&(o=i,i=r,r=n,n=t,t=null),this.on(t,e,n,r,i,o)}}function Es(e,t){t.invoke(_s,this),this.executed((function(t){var n=t.context;n.rootElement?e.setRootElement(n.rootElement):n.rootElement=e.getRootElement()})),this.revert((function(t){var n=t.context;n.rootElement&&e.setRootElement(n.rootElement)}))}_s.$inject=["eventBus"],_s.prototype.on=function(e,t,n,r,i,o){if((d(t)||u(t))&&(o=i,i=r,r=n,n=t,t=null),d(n)&&(o=i,i=r,r=n,n=1e3),p(i)&&(o=i,i=!1),!d(r))throw new Error("handlerFn must be a function");c(e)||(e=[e]);var s=this._eventBus;v(e,(function(e){var a=["commandStack",e,t].filter((function(e){return e})).join(".");s.on(a,n,i?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(r,o):r,o)}))},_s.prototype.canExecute=ks("canExecute"),_s.prototype.preExecute=ks("preExecute"),_s.prototype.preExecuted=ks("preExecuted"),_s.prototype.execute=ks("execute"),_s.prototype.executed=ks("executed"),_s.prototype.postExecute=ks("postExecute"),_s.prototype.postExecuted=ks("postExecuted"),_s.prototype.revert=ks("revert"),_s.prototype.reverted=ks("reverted"),e(Es,_s),Es.$inject=["canvas","injector"];var Os={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",Es]};function Ps(e){return CSS.escape(e)}var Ss={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Cs(e){return(e=""+e)&&e.replace(/[&<>"']/g,(function(e){return Ss[e]}))}var Ts="_plane";function Ms(e){return function(e){return e.replace(new RegExp(Ts+"$"),"")}(e.id)}function As(e){var t=e.id;return to(e,"bpmn:SubProcess")?Rs(t):t}function Ds(e){return Rs(e)}function Ns(e){return to(io(e),"bpmndi:BPMNPlane")}function Rs(e){return e+Ts}function js(e,t,n){var r=fe('<ul class="bjs-breadcrumbs"></ul>'),i=n.getContainer(),o=Y(i);i.appendChild(r);var s=[];function a(e){e&&(s=function(e){for(var t=ro(e),n=[],r=t;r;r=r.$parent)(to(r,"bpmn:SubProcess")||to(r,"bpmn:Process"))&&n.push(r);return n.reverse()}(e));var i=s.map((function(e){var r=Cs(e.name||e.id),i=fe('<li><span class="bjs-crumb"><a title="'+r+'">'+r+"</a></span></li>"),o=n.findRoot(As(e))||n.findRoot(e.id);if(!o&&to(e,"bpmn:Process")){var s=t.find((function(t){var n=ro(t);return n&&n.get("processRef")&&n.get("processRef")===e}));o=n.findRoot(s.id)}return i.addEventListener("click",(function(){n.setRootElement(o)})),i}));r.innerHTML="";var a=i.length>1;o.toggle("bjs-breadcrumbs-shown",a),i.forEach((function(e){r.appendChild(e)}))}e.on("element.changed",(function(e){var t=ro(e.element);m(s,(function(e){return e===t}))&&a()})),e.on("root.set",(function(e){a(e.element)}))}function Is(e,t){var n=null,r=new Ls;e.on("root.set",(function(e){var i=e.element,o=t.viewbox(),s=r.get(i);if(r.set(n,{x:o.x,y:o.y,zoom:o.scale}),n=i,!to(i,"bpmn:Collaboration")||s){s=s||{x:0,y:0,zoom:1};var a=(o.x-s.x)*o.scale,l=(o.y-s.y)*o.scale;0===a&&0===l||t.scroll({dx:a,dy:l}),s.zoom!==o.scale&&t.zoom(s.zoom,{x:0,y:0})}})),e.on("diagram.clear",(function(){r.clear(),n=null}))}function Ls(){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}-1!==t&&this._entries.splice(t,1)}}js.$inject=["eventBus","elementRegistry","canvas"],Is.$inject=["eventBus","canvas"];var zs=180,Bs=160;function $s(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,(function(e,t){n._handleImport(t.definitions)}))}function qs(e){return to(e,"bpmndi:BPMNDiagram")?e:qs(e.$parent)}$s.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach((function(e){e.plane&&e.plane.bpmnElement&&(t._processToDiagramMap[e.plane.bpmnElement.id]=e)}));var n=[];e.diagrams.forEach((function(e){var r=t._createNewDiagrams(e.plane);Array.prototype.push.apply(n,r)})),n.forEach((function(e){t._movePlaneElementsToOrigin(e.plane)}))}},$s.prototype._createNewDiagrams=function(e){var t=this,n=[],r=[];e.get("planeElement").forEach((function(t){var i=t.bpmnElement;if(i){var o=i.$parent;to(i,"bpmn:SubProcess")&&!t.isExpanded&&n.push(i),function(e,t){var n=e.$parent;if(!to(n,"bpmn:SubProcess")||n===t.bpmnElement)return!1;if(no(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))return!1;return!0}(i,e)&&r.push({diElement:t,parent:o})}}));var i=[];return n.forEach((function(e){if(!t._processToDiagramMap[e.id]){var n=t._createDiagram(e);t._processToDiagramMap[e.id]=n,i.push(n)}})),r.forEach((function(e){for(var r=e.diElement,i=e.parent;i&&-1===n.indexOf(i);)i=i.$parent;if(i){var o=t._processToDiagramMap[i.id];t._moveToDiPlane(r,o.plane)}})),i},$s.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=function(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach((function(e){if(e.bounds){var n=Gn(e.bounds);t.top=Math.min(n.top,t.top),t.left=Math.min(n.left,t.left)}})),Qn(t)}(e),r=n.x-zs,i=n.y-Bs;t.forEach((function(e){e.waypoint?e.waypoint.forEach((function(e){e.x=e.x-r,e.y=e.y-i})):e.bounds&&(e.bounds.x=e.bounds.x-r,e.bounds.y=e.bounds.y-i)}))},$s.prototype._moveToDiPlane=function(e,t){var n=qs(e).plane.get("planeElement");n.splice(n.indexOf(e),1),t.get("planeElement").push(e)},$s.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},$s.$inject=["eventBus","moddle"];var Fs=250;function Vs(e,t,n,r){_s.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=r;var i=this;this.executed("shape.toggleCollapse",Fs,(function(e){var t=e.shape;i._canDrillDown(t)?i._addOverlay(t):i._removeOverlay(t)}),!0),this.reverted("shape.toggleCollapse",Fs,(function(e){var t=e.shape;i._canDrillDown(t)?i._addOverlay(t):i._removeOverlay(t)}),!0),this.executed(["shape.create","shape.move","shape.delete"],Fs,(function(e){var t=e.oldParent,n=e.newParent||e.parent,r=e.shape;i._canDrillDown(r)&&i._addOverlay(r),i._updateDrilldownOverlay(t),i._updateDrilldownOverlay(n),i._updateDrilldownOverlay(r)}),!0),this.reverted(["shape.create","shape.move","shape.delete"],Fs,(function(e){var t=e.oldParent,n=e.newParent||e.parent,r=e.shape;i._canDrillDown(r)&&i._addOverlay(r),i._updateDrilldownOverlay(t),i._updateDrilldownOverlay(n),i._updateDrilldownOverlay(r)}),!0),t.on("import.render.complete",(function(){n.filter((function(e){return i._canDrillDown(e)})).map((function(e){i._addOverlay(e)}))}))}e(Vs,_s),Vs.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},Vs.prototype._canDrillDown=function(e){var t=this._canvas;return to(e,"bpmn:SubProcess")&&t.findRoot(As(e))},Vs.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=ro(e),r=t.get({element:n.id,type:"drilldown"})[0];if(r){var i=n&&n.get("flowElements")&&n.get("flowElements").length;Y(r.html).toggle("bjs-drilldown-empty",!i)}},Vs.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays;n.get({element:e,type:"drilldown"}).length&&this._removeOverlay(e);var r=fe('<button class="bjs-drilldown"><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></button>');r.addEventListener("click",(function(){t.setRootElement(t.findRoot(As(e)))})),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:r}),this._updateOverlayVisibility(e)},Vs.prototype._removeOverlay=function(e){this._overlays.remove({element:e,type:"drilldown"})},Vs.$inject=["canvas","eventBus","elementRegistry","overlays"];var Hs={__depends__:[bs,xs,Os],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",js],drilldownCentering:["type",Is],drilldownOverlayBehavior:["type",Vs],subprocessCompatibility:["type",$s]};function Us(e,t){this._eventBus=e,this.offset=5;var n=t.cls("djs-outline",["no-fill"]),r=this;function i(e){var t=Ae("rect");return xe(t,L({x:0,y:0,rx:4,width:100,height:100},n)),t}e.on(["shape.added","shape.changed"],500,(function(e){var t=e.element,n=e.gfx,o=Yt(".djs-outline",n);o||ye(n,o=r.getOutline(t)||i()),r.updateShapeOutline(o,t)})),e.on(["connection.added","connection.changed"],(function(e){var t=e.element,n=e.gfx,o=Yt(".djs-outline",n);o||ye(n,o=i()),r.updateConnectionOutline(o,t)}))}Us.prototype.updateShapeOutline=function(e,t){var n=!1,r=this._getProviders();r.length&&v(r,(function(r){n=n||r.updateOutline(t,e)})),n||xe(e,{x:-this.offset,y:-this.offset,width:t.width+2*this.offset,height:t.height+2*this.offset})},Us.prototype.updateConnectionOutline=function(e,t){var n=mt(t);xe(e,{x:n.x-this.offset,y:n.y-this.offset,width:n.width+2*this.offset,height:n.height+2*this.offset})},Us.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("outline.getProviders",e,(function(e){e.providers.push(t)}))},Us.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"outline.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},Us.prototype.getOutline=function(e){var t;return v(this._getProviders(),(function(n){d(n.getOutline)&&(t=t||n.getOutline(e))})),t},Us.$inject=["eventBus","styles","elementRegistry"];var Ws={__init__:["outline"],outline:["type",Us]};const Gs={width:36,height:50},Qs={width:50,height:50};function Xs(e,t,n){return Ae("path",{d:e,strokeWidth:2,transform:`translate(${t.x}, ${t.y})`,...n})}function Zs(e,t){this._styles=t,e.registerProvider(this)}function Ys(e,t){var n;return"bpmn:DataObjectReference"===t?n=Gs:"bpmn:DataStoreReference"===t&&(n=Qs),e.width===n.width&&e.height===n.height}Zs.$inject=["outline","styles"],Zs.prototype.getOutline=function(e){const t=this._styles.cls("djs-outline",["no-fill"]);var n;if(!Hn(e))return to(e,"bpmn:Gateway")?(L((n=Ae("rect")).style,{"transform-box":"fill-box",transform:"rotate(45deg)","transform-origin":"center"}),xe(n,L({x:2,y:2,rx:4,width:e.width-4,height:e.height-4},t))):no(e,["bpmn:Task","bpmn:SubProcess","bpmn:Group"])?xe(n=Ae("rect"),L({x:-5,y:-5,rx:14,width:e.width+10,height:e.height+10},t)):to(e,"bpmn:EndEvent")?xe(n=Ae("circle"),L({cx:e.width/2,cy:e.height/2,r:e.width/2+5+1},t)):to(e,"bpmn:Event")?xe(n=Ae("circle"),L({cx:e.width/2,cy:e.height/2,r:e.width/2+5},t)):to(e,"bpmn:DataObjectReference")&&Ys(e,"bpmn:DataObjectReference")?n=Xs("M44.7648 11.3263L36.9892 2.64074C36.0451 1.58628 34.5651 0.988708 33.1904 0.988708H5.98667C3.22688 0.988708 0.989624 3.34892 0.989624 6.26039V55.0235C0.989624 57.9349 3.22688 60.2952 5.98667 60.2952H40.966C43.7257 60.2952 45.963 57.9349 45.963 55.0235V14.9459C45.963 13.5998 45.6407 12.3048 44.7648 11.3263Z",{x:-6,y:-6},t):to(e,"bpmn:DataStoreReference")&&Ys(e,"bpmn:DataStoreReference")&&(n=Xs("M1.03845 48.1347C1.03845 49.3511 1.07295 50.758 1.38342 52.064C1.69949 53.3938 2.32428 54.7154 3.56383 55.6428C6.02533 57.4841 10.1161 58.7685 14.8212 59.6067C19.5772 60.4538 25.1388 60.8738 30.6831 60.8738C36.2276 60.8738 41.7891 60.4538 46.545 59.6067C51.2504 58.7687 55.3412 57.4842 57.8028 55.6429C59.0424 54.7156 59.6673 53.3938 59.9834 52.064C60.2938 50.7579 60.3285 49.351 60.3285 48.1344V13.8415C60.3285 12.6249 60.2938 11.218 59.9834 9.91171C59.6673 8.58194 59.0423 7.2602 57.8027 6.33294C55.341 4.49168 51.2503 3.20723 46.545 2.36914C41.7891 1.522 36.2276 1.10204 30.6831 1.10205C25.1388 1.10206 19.5772 1.52206 14.8213 2.36923C10.1162 3.20734 6.02543 4.49183 3.5639 6.33314C2.32433 7.26038 1.69951 8.58206 1.38343 9.91181C1.07295 11.2179 1.03845 12.6247 1.03845 13.8411V48.1347Z",{x:-6,y:-6},t)),n},Zs.prototype.updateOutline=function(e,t){if(!Hn(e))return no(e,["bpmn:SubProcess","bpmn:Group"])?(xe(t,{width:e.width+10,height:e.height+10}),!0):!!no(e,["bpmn:Event","bpmn:Gateway","bpmn:DataStoreReference","bpmn:DataObjectReference"])};var Ks={__depends__:[Ws],__init__:["outlineProvider"],outlineProvider:["type",Zs]};function Js(e){e&&"function"==typeof e.stopPropagation&&e.stopPropagation()}function ea(e){return e.originalEvent||e.srcEvent}function ta(e){Js(e),Js(ea(e))}function na(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function ra(){return/mac/i.test(navigator.platform)}function ia(e,t){return(ea(e)||e).button===t}function oa(e){return ia(e,0)}function sa(e){var t=ea(e)||e;return!!oa(e)&&(ra()?t.metaKey:t.ctrlKey)}function aa(e){var t=ea(e)||e;return oa(e)&&t.shiftKey}function la(e){return!0}function ca(e){return oa(e)||function(e){return ia(e,1)}(e)}function pa(e,t,n){var r=this;function i(n,r,i){var o,s;(function(e,t){var n=l[e]||oa;return!n(t)})(n,r)||(i?s=t.getGraphics(i):(o=r.delegateTarget||r.target)&&(s=o,i=t.get(s)),s&&i&&!1===e.fire(n,{element:i,gfx:s,originalEvent:r})&&(r.stopPropagation(),r.preventDefault()))}var o={};function s(e){return o[e]}var a={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},l={"element.contextmenu":la,"element.mousedown":ca,"element.mouseup":ca,"element.click":ca,"element.dblclick":ca};var c="svg, .djs-element";function p(e,t,n,r){var s=o[n]=function(e){i(n,e)};r&&(l[n]=r),s.$delegate=Wt.bind(e,c,t,s)}function u(e,t,n){var r=s(n);r&&Wt.unbind(e,t,r.$delegate)}e.on("canvas.destroy",(function(e){!function(e){v(a,(function(t,n){u(e,n,t)}))}(e.svg)})),e.on("canvas.init",(function(e){!function(e){v(a,(function(t,n){p(e,n,t)}))}(e.svg)})),e.on(["shape.added","connection.added"],(function(t){var n=t.element,r=t.gfx;e.fire("interactionEvents.createHit",{element:n,gfx:r})})),e.on(["shape.changed","connection.changed"],500,(function(t){var n=t.element,r=t.gfx;e.fire("interactionEvents.updateHit",{element:n,gfx:r})})),e.on("interactionEvents.createHit",500,(function(e){var t=e.element,n=e.gfx;r.createDefaultHit(t,n)})),e.on("interactionEvents.updateHit",(function(e){var t=e.element,n=e.gfx;r.updateDefaultHit(t,n)}));var d=m("djs-hit djs-hit-stroke"),h=m("djs-hit djs-hit-click-stroke"),f={all:m("djs-hit djs-hit-all"),"click-stroke":h,stroke:d,"no-move":m("djs-hit djs-hit-no-move")};function m(e,t){return t=L({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function g(e,t){var n=f[t];if(!n)throw new Error("invalid hit type <"+t+">");return xe(e,n),e}function y(e,t){ye(e,t)}this.removeHits=function(e){v(Kt(".djs-hit",e),Oe)},this.createDefaultHit=function(e,t){var n,r=e.waypoints,i=e.isFrame;return r?this.createWaypointsHit(t,r):(n=i?"stroke":"all",this.createBoxHit(t,n,{width:e.width,height:e.height}))},this.createWaypointsHit=function(e,t){var n=lt(t);return g(n,"stroke"),y(e,n),n},this.createBoxHit=function(e,t,n){n=L({x:0,y:0},n);var r=Ae("rect");return g(r,t),xe(r,n),y(e,r),r},this.updateDefaultHit=function(e,t){var n=Yt(".djs-hit",t);if(n)return e.waypoints?ct(n,e.waypoints):xe(n,{width:e.width,height:e.height}),n},this.fire=i,this.triggerMouseEvent=function(e,t,n){var r=a[e];if(!r)throw new Error("unmapped DOM event name <"+e+">");return i(r,t,n)},this.mouseHandler=s,this.registerEvent=p,this.unregisterEvent=u}pa.$inject=["eventBus","elementRegistry","styles"];var ua={__init__:["interactionEvents"],interactionEvents:["type",pa]};function da(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=[];var n=this;e.on(["shape.remove","connection.remove"],(function(e){var t=e.element;n.deselect(t)})),e.on(["diagram.clear","root.set"],(function(e){n.select(null)}))}da.$inject=["eventBus","canvas"],da.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(-1!==n){var r=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:t})}},da.prototype.get=function(){return this._selectedElements},da.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},da.prototype.select=function(e,t){var n=this._selectedElements,r=n.slice();c(e)||(e=e?[e]:[]);var i=this._canvas,o=i.getRootElement();e=e.filter((function(e){var t=i.findRoot(e);return o===t})),t?v(e,(function(e){-1===n.indexOf(e)&&n.push(e)})):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:n})};var ha="hover",fa="selected";function ma(e,t,n){this._canvas=e;var r=this;function i(t,n){e.addMarker(t,n)}function o(t,n){e.removeMarker(t,n)}this._multiSelectionBox=null,t.on("element.hover",(function(e){i(e.element,ha)})),t.on("element.out",(function(e){o(e.element,ha)})),t.on("selection.changed",(function(e){var t=e.oldSelection,n=e.newSelection;v(t,(function(e){-1===n.indexOf(e)&&function(e){o(e,fa)}(e)})),v(n,(function(e){-1===t.indexOf(e)&&function(e){i(e,fa)}(e)})),r._updateSelectionOutline(n)})),t.on("element.changed",(function(e){n.isSelected(e.element)&&r._updateSelectionOutline(n.get())}))}function ga(e,t,n,r){e.on("create.end",500,(function(e){var n=e.context,r=n.canExecute,i=n.elements,o=(n.hints||{}).autoSelect;if(r){if(!1===o)return;c(o)?t.select(o):t.select(i.filter(ya))}})),e.on("connect.end",500,(function(e){var n=e.context.connection;n&&t.select(n)})),e.on("shape.move.end",500,(function(e){var n=e.previousSelection||[],i=r.get(e.context.shape.id);m(n,(function(e){return i.id===e.id}))||t.select(i)})),e.on("element.click",(function(e){if(oa(e)){var r=e.element;r===n.getRootElement()&&(r=null);var i=t.isSelected(r),o=t.get().length>1,s=aa(e);if(i&&o)return s?t.deselect(r):t.select(r);i?t.deselect(r):t.select(r,s)}}))}function ya(e){return!e.hidden}ma.$inject=["canvas","eventBus","selection"],ma.prototype._updateSelectionOutline=function(e){var t=this._canvas.getLayer("selectionOutline");Pe(t);var n=e.length>1;if(ke(this._canvas.getContainer())[n?"add":"remove"]("djs-multi-select"),n){var r=function(e){return{x:e.x-6,y:e.y-6,width:e.width+12,height:e.height+12}}(mt(e)),i=Ae("rect");xe(i,L({rx:3},r)),ke(i).add("djs-selection-outline"),ye(t,i)}},ga.$inject=["eventBus","selection","canvas","elementRegistry"];var va={__init__:["selectionVisuals","selectionBehavior"],__depends__:[ua,Ws],selection:["type",da],selectionVisuals:["type",ma],selectionBehavior:["type",ga]};function ba(e){yo.call(this,e)}e(ba,yo),ba.prototype._modules=[ds,Hs,Ks,bs,va,as],ba.prototype._moddleExtensions={};var wa=["c","C"],xa=["v","V"],_a=["y","Y"],ka=["z","Z"];function Ea(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function Oa(e,t){return-1!==(e=c(e)?e:[e]).indexOf(t.key)||-1!==e.indexOf(t.code)}function Pa(e){return e.shiftKey}function Sa(e){return Ea(e)&&!Pa(e)&&Oa(ka,e)}function Ca(e){return Ea(e)&&(Oa(_a,e)||Oa(ka,e)&&Pa(e))}var Ta="keyboard.keydown",Ma="input-handle-modified-keys";function Aa(e,t){var n=this;this._config=e||{},this._eventBus=t,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),t.on("diagram.destroy",(function(){n._fire("destroy"),n.unbind()})),t.on("diagram.init",(function(){n._fire("init")})),t.on("attach",(function(){e&&e.bindTo&&n.bind(e.bindTo)})),t.on("detach",(function(){n.unbind()}))}Aa.$inject=["config.keyboard","eventBus"],Aa.prototype._keydownHandler=function(e){this._keyHandler(e,Ta)},Aa.prototype._keyupHandler=function(e){this._keyHandler(e,"keyboard.keyup")},Aa.prototype._keyHandler=function(e,t){if(!this._isEventIgnored(e)){var n={keyEvent:e};this._eventBus.fire(t||Ta,n)&&e.preventDefault()}},Aa.prototype._isEventIgnored=function(e){return!!e.defaultPrevented||((t=e.target)&&(Rt(t,"input, textarea")||"true"===t.contentEditable)||function(e){return e&&Rt(e,"button, input[type=submit], input[type=button], a[href], [aria-role=button]")}(e.target)&&Oa([" ","Enter"],e))&&this._isModifiedKeyIgnored(e);var t},Aa.prototype._isModifiedKeyIgnored=function(e){return!Ea(e)||-1===this._getAllowedModifiers(e.target).indexOf(e.key)},Aa.prototype._getAllowedModifiers=function(e){var t=jt(e,"["+Ma+"]",!0);return!t||this._node&&!this._node.contains(t)?[]:t.getAttribute(Ma).split(",")},Aa.prototype.bind=function(e){this.unbind(),this._node=e,Vt.bind(e,"keydown",this._keydownHandler),Vt.bind(e,"keyup",this._keyupHandler),this._fire("bind")},Aa.prototype.getBinding=function(){return this._node},Aa.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),Vt.unbind(e,"keydown",this._keydownHandler),Vt.unbind(e,"keyup",this._keyupHandler)),this._node=null},Aa.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})},Aa.prototype.addListener=function(e,t,n){d(e)&&(n=t,t=e,e=1e3),this._eventBus.on(n||Ta,e,t)},Aa.prototype.removeListener=function(e,t){this._eventBus.off(t||Ta,e)},Aa.prototype.hasModifier=function(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey},Aa.prototype.isCmd=Ea,Aa.prototype.isShift=Pa,Aa.prototype.isKey=Oa;var Da=500;function Na(e,t){var n=this;e.on("editorActions.init",Da,(function(e){var r=e.editorActions;n.registerBindings(t,r)}))}Na.$inject=["eventBus","keyboard"],Na.prototype.registerBindings=function(e,t){function n(n,r){t.isRegistered(n)&&e.addListener(r)}n("undo",(function(e){if(Sa(e.keyEvent))return t.trigger("undo"),!0})),n("redo",(function(e){if(Ca(e.keyEvent))return t.trigger("redo"),!0})),n("copy",(function(e){if(function(e){return Ea(e)&&Oa(wa,e)}(e.keyEvent))return t.trigger("copy"),!0})),n("paste",(function(e){if(function(e){return Ea(e)&&Oa(xa,e)}(e.keyEvent))return t.trigger("paste"),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(Oa(["+","Add","="],n)&&Ea(n))return t.trigger("stepZoom",{value:1}),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(Oa(["-","Subtract"],n)&&Ea(n))return t.trigger("stepZoom",{value:-1}),!0})),n("zoom",(function(e){var n=e.keyEvent;if(Oa("0",n)&&Ea(n))return t.trigger("zoom",{value:1}),!0})),n("removeSelection",(function(e){if(Oa(["Backspace","Delete","Del"],e.keyEvent))return t.trigger("removeSelection"),!0}))};var Ra={__init__:["keyboard","keyboardBindings"],keyboard:["type",Aa],keyboardBindings:["type",Na]},ja={moveSpeed:50,moveSpeedAccelerated:200};function Ia(e,t,n){var r=this;this._config=L({},ja,e||{}),t.addListener((function(e){var n=e.keyEvent,i=r._config;if(!t.isCmd(n))return;if(t.isKey(["ArrowLeft","Left","ArrowUp","Up","ArrowDown","Down","ArrowRight","Right"],n)){var o,s=t.isShift(n)?i.moveSpeedAccelerated:i.moveSpeed;switch(n.key){case"ArrowLeft":case"Left":o="left";break;case"ArrowUp":case"Up":o="up";break;case"ArrowRight":case"Right":o="right";break;case"ArrowDown":case"Down":o="down"}return r.moveCanvas({speed:s,direction:o}),!0}})),this.moveCanvas=function(e){var t=0,r=0,i=e.speed/Math.min(Math.sqrt(n.viewbox().scale),1);switch(e.direction){case"left":t=i;break;case"up":r=i;break;case"right":t=-i;break;case"down":r=-i}n.scroll({dx:t,dy:r})}}Ia.$inject=["config.keyboardMove","keyboard","canvas"];var La={__depends__:[Ra],__init__:["keyboardMove"],keyboardMove:["type",Ia]},za=/^djs-cursor-.*$/;function Ba(e){var t=At(document.body);t.removeMatching(za),e&&t.add("djs-cursor-"+e)}function $a(){Ba(null)}var qa=5e3;function Fa(e,t){function n(){return!1}return t=t||"element.click",e.once(t,qa,n),function(){e.off(t,n)}}function Va(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Ha(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ua(e,t){var n;function r(r){var i,o=n.start,s=n.button,a=na(r),l=Ha(a,o);(!n.dragging&&(i=l,Math.sqrt(Math.pow(i.x,2)+Math.pow(i.y,2))>15)&&(n.dragging=!0,0===s&&Fa(e),Ba("grab")),n.dragging)&&(l=Ha(a,n.last||n.start),t.scroll({dx:l.x,dy:l.y}),n.last=a);r.preventDefault()}function i(e){Vt.unbind(document,"mousemove",r),Vt.unbind(document,"mouseup",i),n=null,$a()}e.on("element.mousedown",500,(function(e){return function(e){if(jt(e.target,".djs-draggable"))return;var t=e.button;if(t>=2||e.ctrlKey||e.shiftKey||e.altKey)return;return n={button:t,start:na(e)},Vt.bind(document,"mousemove",r),Vt.bind(document,"mouseup",i),!0}(e.originalEvent)})),this.isActive=function(){return!!n}}Ua.$inject=["eventBus","canvas"];var Wa={__init__:["moveCanvas"],moveCanvas:["type",Ua]};function Ga(e){return Math.log(e)/Math.log(10)}function Qa(e,t){var n=Ga(e.min),r=Ga(e.max);return(Math.abs(n)+Math.abs(r))/t}var Xa=Math.sign||function(e){return e>=0?1:-1},Za={min:.2,max:4};function Ya(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=I(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||.75;var r=this;t.on("canvas.init",(function(t){r._init(!1!==e.enabled)}))}Ya.$inject=["config.zoomScroll","eventBus","canvas"],Ya.prototype.scroll=function(e){this._canvas.scroll(e)},Ya.prototype.reset=function(){this._canvas.zoom("fit-viewport")},Ya.prototype.zoom=function(e,t){var n=Qa(Za,20);this._totalDelta+=e,Math.abs(this._totalDelta)>.1&&(this._zoom(e,t,n),this._totalDelta=0)},Ya.prototype._handleWheel=function(e){if(!jt(e.target,".djs-scrollable",!0)){var t=this._container;e.preventDefault();var n,r=e.ctrlKey||ra()&&e.metaKey,i=e.shiftKey,o=-1*this._scale;if(o*=r?0===e.deltaMode?.02:.32:0===e.deltaMode?1:16,r){var s=t.getBoundingClientRect(),a={x:e.clientX-s.left,y:e.clientY-s.top};n=Math.sqrt(Math.pow(e.deltaY,2)+Math.pow(e.deltaX,2))*Xa(e.deltaY)*o,this.zoom(n,a)}else n=i?{dx:o*e.deltaY,dy:0}:{dx:o*e.deltaX,dy:o*e.deltaY},this.scroll(n)}},Ya.prototype.stepZoom=function(e,t){var n=Qa(Za,10);this._zoom(e,t,n)},Ya.prototype._zoom=function(e,t,n){var r=this._canvas,i=e>0?1:-1,o=Ga(r.zoom()),s=Math.round(o/n)*n;s+=n*i;var a,l,c=Math.pow(10,s);r.zoom((a=Za,l=c,Math.max(a.min,Math.min(a.max,l))),t)},Ya.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,r=this._enabled;return void 0===e&&(e=!r),r!==e&&Vt[e?"bind":"unbind"](t,"wheel",n,!1),this._enabled=e,e},Ya.prototype._init=function(e){this.toggle(e)};var Ka={__init__:["zoomScroll"],zoomScroll:["type",Ya]};function Ja(e){ba.call(this,e)}function el(e){return e&&e[e.length-1]}function tl(e){return e.y}function nl(e){return e.x}e(Ja,ba),Ja.prototype._navigationModules=[La,Wa,Ka],Ja.prototype._modules=[].concat(ba.prototype._modules,Ja.prototype._navigationModules);var rl={left:nl,center:nl,right:function(e){return e.x+e.width},top:tl,middle:tl,bottom:function(e){return e.y+e.height}};function il(e,t){this._modeling=e,this._rules=t}il.$inject=["modeling","rules"],il.prototype._getOrientationDetails=function(e){var t="x",n="width";return-1!==["top","bottom","middle"].indexOf(e)&&(t="y",n="height"),{axis:t,dimension:n}},il.prototype._isType=function(e,t){return-1!==t.indexOf(e)},il.prototype._alignmentPosition=function(e,t){var n,r,i,o=this._getOrientationDetails(e),s=o.axis,a=o.dimension,l={},c={},p=!1;if(this._isType(e,["left","top"]))l[e]=t[0][s];else if(this._isType(e,["right","bottom"]))i=el(t),l[e]=i[s]+i[a];else if(this._isType(e,["center","middle"])){if(v(t,(function(e){var t=e[s]+Math.round(e[a]/2);c[t]?c[t].elements.push(e):c[t]={elements:[e],center:t}})),n=T(c,(function(e){return e.elements.length>1&&(p=!0),e.elements.length})),p)return l[e]=el(n).center,l;r=t[0],i=el(t=T(t,(function(e){return e[s]+e[a]}))),l[e]=function(e,t){return Math.round((e[s]+t[s]+t[a])/2)}(r,i)}return l},il.prototype.trigger=function(e,t){var n,r=this._modeling,i=y(e,(function(e){return!(e.waypoints||e.host||e.labelTarget)}));if(c(n=this._rules.allowed("elements.align",{elements:i}))&&(i=n),!(i.length<2)&&n){var o=T(i,rl[t]),s=this._alignmentPosition(t,o);r.alignElements(o,s)}};var ol={__init__:["alignElements"],alignElements:["type",il]},sl=".entry";function al(e,t,n){this._canvas=e,this._elementRegistry=t,this._eventBus=n,this._current=null,this._init()}function ll(e,t){return-1!==e.indexOf(t)}al.$inject=["canvas","elementRegistry","eventBus"],al.prototype._init=function(){var e=this;this._eventBus.on("selection.changed",(function(t){var n=t.newSelection,r=n.length?1===n.length?n[0]:n:null;r?e.open(r,!0):e.close()})),this._eventBus.on("elements.changed",(function(t){var n=t.elements,r=e._current;if(r){var{target:i}=r,o=c(i)?i:[i];if(o.filter((function(e){return ll(n,e)})).length){e.close();var s=o.filter((function(t){return e._elementRegistry.get(t.id)}));s.length&&e._updateAndOpen(s.length>1?s:s[0])}}})),this._eventBus.on("canvas.viewbox.changed",(()=>{this.isOpen()&&this._updatePosition()})),this._container=this._createContainer()},al.prototype._createContainer=function(){const e=Zt('<div class="djs-context-pad-parent"></div>');return this._canvas.getContainer().appendChild(e),e},al.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("contextPad.getProviders",e,(function(e){e.providers.push(t)}))},al.prototype.getEntries=function(e){var t=this._getProviders(),n=c(e)?"getMultiElementContextPadEntries":"getContextPadEntries",r={};return v(t,(function(t){if(d(t[n])){var i=t[n](e);d(i)?r=i(r):v(i,(function(e,t){r[t]=e}))}})),r},al.prototype.trigger=function(e,t,n){var r,i,o=t.delegateTarget||t.target;return o?(r=Tt(o,"data-action"),i=t.originalEvent||t,"mouseover"!==e?"mouseout"===e?(clearTimeout(this._timeout),void(this._mouseout&&(this._mouseout(),this._mouseout=null))):this.triggerEntry(r,e,i,n):void(this._timeout=setTimeout((()=>{this._mouseout=this.triggerEntry(r,"hover",i,n)}),300))):t.preventDefault()},al.prototype.triggerEntry=function(e,t,n,r){if(this.isShown()){var i=this._current.target,o=this._current.entries[e];if(o){var s=o.action;if(!1!==this._eventBus.fire("contextPad.trigger",{entry:o,event:n})){if(d(s)){if("click"===t)return s(n,i,r)}else if(s[t])return s[t](n,i,r);n.preventDefault()}}}},al.prototype.open=function(e,t){!t&&this.isOpen(e)||(this.close(),this._updateAndOpen(e))},al.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},al.prototype._updateAndOpen=function(e){var t,n=this.getEntries(e),r=this._createHtml(e);v(n,(function(e,n){var i,o=e.group||"default",s=Zt(e.html||'<div class="entry" draggable="true"></div>');Tt(s,"data-action",n),(i=Yt("[data-group="+Ps(o)+"]",r))||(Tt(i=Zt('<div class="group"></div>'),"data-group",o),r.appendChild(i)),i.appendChild(s),e.className&&function(e,t){var n=At(e);t=c(t)?t:t.split(/\s+/g),t.forEach((function(e){n.add(e)}))}(s,e.className),e.title&&Tt(s,"title",e.title),e.imageUrl&&(Tt(t=Zt("<img>"),"src",e.imageUrl),t.style.width="100%",t.style.height="100%",s.appendChild(t))})),At(r).add("open"),this._current={entries:n,html:r,target:e},this._updatePosition(),this._eventBus.fire("contextPad.open",{current:this._current})},al.prototype._createHtml=function(e){var t=this,n=Zt('<div class="djs-context-pad"></div>');return Wt.bind(n,sl,"click",(function(e){t.trigger("click",e)})),Wt.bind(n,sl,"dragstart",(function(e){t.trigger("dragstart",e)})),Wt.bind(n,sl,"mouseover",(function(e){t.trigger("mouseover",e)})),Wt.bind(n,sl,"mouseout",(function(e){t.trigger("mouseout",e)})),Vt.bind(n,"mousedown",(function(e){e.stopPropagation()})),this._container.appendChild(n),this._eventBus.fire("contextPad.create",{target:e,pad:n}),n},al.prototype.getPad=function(e){let t;return console.warn(new Error("ContextPad#getPad is deprecated and will be removed in future library versions, cf. https://github.com/bpmn-io/diagram-js/pull/888")),t=this.isOpen()&&function(e,t){return e=c(e)?e:[e],t=c(t)?t:[t],e.length===t.length&&x(e,(function(e){return t.includes(e)}))}(this._current.target,e)?this._current.html:this._createHtml(e),{html:t}},al.prototype.close=function(){this.isOpen()&&(clearTimeout(this._timeout),this._container.innerHTML="",this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)},al.prototype.isOpen=function(e){var t=this._current;if(!t)return!1;if(!e)return!0;var n=t.target;return c(e)===c(n)&&(c(e)?e.length===n.length&&x(e,(function(e){return ll(n,e)})):n===e)},al.prototype.isShown=function(){return this.isOpen()&&At(this._current.html).has("open")},al.prototype.show=function(){this.isOpen()&&(At(this._current.html).add("open"),this._eventBus.fire("contextPad.show",{current:this._current}))},al.prototype.hide=function(){this.isOpen()&&(At(this._current.html).remove("open"),this._eventBus.fire("contextPad.hide",{current:this._current}))},al.prototype._getPosition=function(e){if(!c(e)&&Vn(e)){const n=this._canvas.viewbox(),r=(t=e).waypoints[t.waypoints.length-1],i=r.x*n.scale-n.x*n.scale,o=r.y*n.scale-n.y*n.scale;return{left:i+8*this._canvas.zoom(),top:o}}var t,n=this._canvas.getContainer().getBoundingClientRect(),r=this._getTargetBounds(e);return{left:r.right-n.left+8*this._canvas.zoom(),top:r.top-n.top}},al.prototype._updatePosition=function(){if(this.isOpen()){var e=this._current.html,t=this._getPosition(this._current.target);"x"in t&&"y"in t?(e.style.left=t.x+"px",e.style.top=t.y+"px"):["top","right","bottom","left"].forEach((function(n){n in t&&(e.style[n]=t[n]+"px")}))}},al.prototype._getTargetBounds=function(e){return(c(e)?e:[e]).map((e=>this._canvas.getGraphics(e))).reduce(((e,t)=>{const n=t.getBoundingClientRect();return e.top=Math.min(e.top,n.top),e.right=Math.max(e.right,n.right),e.bottom=Math.max(e.bottom,n.bottom),e.left=Math.min(e.left,n.left),e.x=e.left,e.y=e.top,e.width=e.right-e.left,e.height=e.bottom-e.top,e}),{top:1/0,right:-1/0,bottom:-1/0,left:1/0})};var cl,pl,ul,dl,hl,fl,ml={__depends__:[ua,bs],contextPad:["type",al]},gl={},yl=[],vl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function bl(e,t){for(var n in t)e[n]=t[n];return e}function wl(e){var t=e.parentNode;t&&t.removeChild(e)}function xl(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?cl.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return _l(e,s,r,i,null)}function _l(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++ul:i};return null==i&&null!=pl.vnode&&pl.vnode(o),o}function kl(e){return e.children}function El(e,t){this.props=e,this.context=t}function Ol(e,t){if(null==t)return e.__?Ol(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Ol(e):null}function Pl(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Pl(e)}}function Sl(e){(!e.__d&&(e.__d=!0)&&dl.push(e)&&!Cl.__r++||hl!==pl.debounceRendering)&&((hl=pl.debounceRendering)||setTimeout)(Cl)}function Cl(){for(var e;Cl.__r=dl.length;)e=dl.sort((function(e,t){return e.__v.__b-t.__v.__b})),dl=[],e.some((function(e){var t,n,r,i,o,s;e.__d&&(o=(i=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=bl({},i)).__v=i.__v+1,Ll(s,i,r,t.__n,void 0!==s.ownerSVGElement,null!=i.__h?[o]:null,n,null==o?Ol(i):o,i.__h),zl(n,i),i.__e!=o&&Pl(i)))}))}function Tl(e,t,n,r,i,o,s,a,l,c){var p,u,d,h,f,m,g,y=r&&r.__k||yl,v=y.length;for(n.__k=[],p=0;p<t.length;p++)if(null!=(h=n.__k[p]=null==(h=t[p])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?_l(null,h,null,null,h):Array.isArray(h)?_l(kl,{children:h},null,null,null):h.__b>0?_l(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(d=y[p])||d&&h.key==d.key&&h.type===d.type)y[p]=void 0;else for(u=0;u<v;u++){if((d=y[u])&&h.key==d.key&&h.type===d.type){y[u]=void 0;break}d=null}Ll(e,h,d=d||gl,i,o,s,a,l,c),f=h.__e,(u=h.ref)&&d.ref!=u&&(g||(g=[]),d.ref&&g.push(d.ref,null,h),g.push(u,h.__c||f,h)),null!=f?(null==m&&(m=f),"function"==typeof h.type&&h.__k===d.__k?h.__d=l=Ml(h,l,e):l=Dl(e,h,d,y,f,l),"function"==typeof n.type&&(n.__d=l)):l&&d.__e==l&&l.parentNode!=e&&(l=Ol(d))}for(n.__e=m,p=v;p--;)null!=y[p]&&$l(y[p],y[p]);if(g)for(p=0;p<g.length;p++)Bl(g[p],g[++p],g[++p])}function Ml(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?Ml(r,t,n):Dl(n,r,r,i,r.__e,t));return t}function Al(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){Al(e,t)})):t.push(e)),t}function Dl(e,t,n,r,i,o){var s,a,l;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<r.length;l+=1)if(a==i)break e;e.insertBefore(i,o),s=o}return void 0!==s?s:i.nextSibling}function Nl(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||vl.test(t)?n:n+"px"}function Rl(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Nl(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Nl(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?Il:jl,o):e.removeEventListener(t,o?Il:jl,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function jl(e){this.l[e.type+!1](pl.event?pl.event(e):e)}function Il(e){this.l[e.type+!0](pl.event?pl.event(e):e)}function Ll(e,t,n,r,i,o,s,a,l){var c,p,u,d,h,f,m,g,y,v,b,w,x,_,k,E=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(c=pl.__b)&&c(t);try{e:if("function"==typeof E){if(g=t.props,y=(c=E.contextType)&&r[c.__c],v=c?y?y.props.value:c.__:r,n.__c?m=(p=t.__c=n.__c).__=p.__E:("prototype"in E&&E.prototype.render?t.__c=p=new E(g,v):(t.__c=p=new El(g,v),p.constructor=E,p.render=ql),y&&y.sub(p),p.props=g,p.state||(p.state={}),p.context=v,p.__n=r,u=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=E.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=bl({},p.__s)),bl(p.__s,E.getDerivedStateFromProps(g,p.__s))),d=p.props,h=p.state,u)null==E.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==E.getDerivedStateFromProps&&g!==d&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(g,v),!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(g,p.__s,v)||t.__v===n.__v){for(p.props=g,p.state=p.__s,t.__v!==n.__v&&(p.__d=!1),p.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),b=0;b<p._sb.length;b++)p.__h.push(p._sb[b]);p._sb=[],p.__h.length&&s.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(g,p.__s,v),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(d,h,f)}))}if(p.context=v,p.props=g,p.__v=t,p.__P=e,w=pl.__r,x=0,"prototype"in E&&E.prototype.render){for(p.state=p.__s,p.__d=!1,w&&w(t),c=p.render(p.props,p.state,p.context),_=0;_<p._sb.length;_++)p.__h.push(p._sb[_]);p._sb=[]}else do{p.__d=!1,w&&w(t),c=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++x<25);p.state=p.__s,null!=p.getChildContext&&(r=bl(bl({},r),p.getChildContext())),u||null==p.getSnapshotBeforeUpdate||(f=p.getSnapshotBeforeUpdate(d,h)),k=null!=c&&c.type===kl&&null==c.key?c.props.children:c,Tl(e,Array.isArray(k)?k:[k],t,n,r,i,o,s,a,l),p.base=t.__e,t.__h=null,p.__h.length&&s.push(p),m&&(p.__E=p.__=null),p.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,s,a){var l,c,p,u=n.props,d=t.props,h=t.type,f=0;if("svg"===h&&(i=!0),null!=o)for(;f<o.length;f++)if((l=o[f])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,o[f]=null;break}if(null==e){if(null===h)return document.createTextNode(d);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,d.is&&d),o=null,a=!1}if(null===h)u===d||a&&e.data===d||(e.data=d);else{if(o=o&&cl.call(e.childNodes),c=(u=n.props||gl).dangerouslySetInnerHTML,p=d.dangerouslySetInnerHTML,!a){if(null!=o)for(u={},f=0;f<e.attributes.length;f++)u[e.attributes[f].name]=e.attributes[f].value;(p||c)&&(p&&(c&&p.__html==c.__html||p.__html===e.innerHTML)||(e.innerHTML=p&&p.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||Rl(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||Rl(e,o,t[o],n[o],r)}(e,d,u,i,a),p)t.__k=[];else if(f=t.props.children,Tl(e,Array.isArray(f)?f:[f],t,n,r,i&&"foreignObject"!==h,o,s,o?o[0]:n.__k&&Ol(n,0),a),null!=o)for(f=o.length;f--;)null!=o[f]&&wl(o[f]);a||("value"in d&&void 0!==(f=d.value)&&(f!==e.value||"progress"===h&&!f||"option"===h&&f!==u.value)&&Rl(e,"value",f,u.value,!1),"checked"in d&&void 0!==(f=d.checked)&&f!==e.checked&&Rl(e,"checked",f,u.checked,!1))}return e}(n.__e,t,n,r,i,o,s,l);(c=pl.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),pl.__e(e,t,n)}}function zl(e,t){pl.__c&&pl.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){pl.__e(e,t.__v)}}))}function Bl(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){pl.__e(e,n)}}function $l(e,t,n){var r,i;if(pl.unmount&&pl.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Bl(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){pl.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&$l(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||wl(e.__e),e.__=e.__e=e.__d=void 0}function ql(e,t,n){return this.constructor(e,n)}function Fl(e,t,n){var r,i,o;pl.__&&pl.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],Ll(t,e=(!r&&n||t).__k=xl(kl,null,[e]),i||gl,gl,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?cl.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),zl(o,e)}function Vl(e,t){var n={__c:t="__cC"+fl++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(Sl)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}cl=yl.slice,pl={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},ul=0,El.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=bl({},this.state),"function"==typeof e&&(e=e(bl({},n),this.props)),e&&bl(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Sl(this))},El.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Sl(this))},El.prototype.render=kl,dl=[],Cl.__r=0,fl=0;var Hl=function(e,t,n,r){var i;t[0]=0;for(var o=1;o<t.length;o++){var s=t[o++],a=t[o]?(t[0]|=s?1:2,n[t[o++]]):t[++o];3===s?r[0]=a:4===s?r[1]=Object.assign(r[1]||{},a):5===s?(r[1]=r[1]||{})[t[++o]]=a:6===s?r[1][t[++o]]+=a+"":s?(i=e.apply(a,Hl(e,a,n,["",null])),r.push(i),a[0]?t[0]|=2:(t[o-2]=0,t[o]=i)):r.push(a)}return r},Ul=new Map;var Wl,Gl,Ql,Xl,Zl=function(e){var t=Ul.get(this);return t||(t=new Map,Ul.set(this,t)),(t=Hl(this,t.get(e)||(t.set(e,t=function(e){for(var t,n,r=1,i="",o="",s=[0],a=function(e){1===r&&(e||(i=i.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(0,e,i):3===r&&(e||i)?(s.push(3,e,i),r=2):2===r&&"..."===i&&e?s.push(4,e,0):2===r&&i&&!e?s.push(5,0,!0,i):r>=5&&((i||!e&&5===r)&&(s.push(r,0,i,n),r=6),e&&(s.push(r,e,0,n),r=6)),i=""},l=0;l<e.length;l++){l&&(1===r&&a(),a(l));for(var c=0;c<e[l].length;c++)t=e[l][c],1===r?"<"===t?(a(),s=[s],r=3):i+=t:4===r?"--"===i&&">"===t?(r=1,i=""):i=t+i[0]:o?t===o?o="":i+=t:'"'===t||"'"===t?o=t:">"===t?(a(),r=1):r&&("="===t?(r=5,n=i,i=""):"/"===t&&(r<5||">"===e[l][c+1])?(a(),3===r&&(s=s[0]),r=s,(s=s[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(a(),r=2):i+=t),3===r&&"!--"===i&&(r=4,s=s[0])}return a(),s}(e)),t),arguments,[])).length>1?t:t[0]}.bind(xl),Yl=0,Kl=[],Jl=[],ec=pl.__b,tc=pl.__r,nc=pl.diffed,rc=pl.__c,ic=pl.unmount;function oc(e,t){pl.__h&&pl.__h(Gl,e,Yl||t),Yl=0;var n=Gl.__H||(Gl.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Jl}),n.__[e]}function sc(e){return Yl=1,function(e,t,n){var r=oc(Wl++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):bc(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Gl,!Gl.u)){Gl.u=!0;var i=Gl.shouldComponentUpdate;Gl.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var s=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&r.__c.props===e)&&(!i||i.call(this,e,t,n))}}return r.__N||r.__}(bc,e)}function ac(e,t){var n=oc(Wl++,3);!pl.__s&&vc(n.__H,t)&&(n.__=e,n.i=t,Gl.__H.__h.push(n))}function lc(e,t){var n=oc(Wl++,4);!pl.__s&&vc(n.__H,t)&&(n.__=e,n.i=t,Gl.__h.push(n))}function cc(e){return Yl=5,pc((function(){return{current:e}}),[])}function pc(e,t){var n=oc(Wl++,7);return vc(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function uc(e,t){return Yl=8,pc((function(){return e}),t)}function dc(e){var t=Gl.context[e.__c],n=oc(Wl++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Gl)),t.props.value):e.__}function hc(){for(var e;e=Kl.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(gc),e.__H.__h.forEach(yc),e.__H.__h=[]}catch(t){e.__H.__h=[],pl.__e(t,e.__v)}}pl.__b=function(e){Gl=null,ec&&ec(e)},pl.__r=function(e){tc&&tc(e),Wl=0;var t=(Gl=e.__c).__H;t&&(Ql===Gl?(t.__h=[],Gl.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Jl,e.__N=e.i=void 0}))):(t.__h.forEach(gc),t.__h.forEach(yc),t.__h=[])),Ql=Gl},pl.diffed=function(e){nc&&nc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Kl.push(t)&&Xl===pl.requestAnimationFrame||((Xl=pl.requestAnimationFrame)||mc)(hc)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Jl&&(e.__=e.__V),e.i=void 0,e.__V=Jl}))),Ql=Gl=null},pl.__c=function(e,t){t.some((function(e){try{e.__h.forEach(gc),e.__h=e.__h.filter((function(e){return!e.__||yc(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],pl.__e(n,e.__v)}})),rc&&rc(e,t)},pl.unmount=function(e){ic&&ic(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{gc(e)}catch(e){t=e}})),n.__H=void 0,t&&pl.__e(t,n.__v))};var fc="function"==typeof requestAnimationFrame;function mc(e){var t,n=function(){clearTimeout(r),fc&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);fc&&(t=requestAnimationFrame(n))}function gc(e){var t=Gl,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Gl=t}function yc(e){var t=Gl;e.__c=e.__(),Gl=t}function vc(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function bc(e,t){return"function"==typeof t?t(e):t}function wc(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=wc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function xc(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=wc(e))&&(r&&(r+=" "),r+=t);return r}function _c(e){const{entry:t,selected:n,onMouseEnter:r,onMouseLeave:i,onAction:o}=e;return Zl`
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).BpmnModeler=t()}(this,(function(){"use strict";function e(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}var t=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var t=e.exports=function(e,n){if(n||(n=16),void 0===e&&(e=128),e<=0)return"0";for(var r=Math.log(Math.pow(2,e))/Math.log(n),i=2;r===1/0;i*=2)r=Math.log(Math.pow(2,e/i))/Math.log(n)*i;var o=r-Math.floor(r),s="";for(i=0;i<Math.floor(r);i++){s=Math.floor(Math.random()*n).toString(n)+s}if(o){var a=Math.pow(n,o);s=Math.floor(Math.random()*a).toString(n)+s}var l=parseInt(s,n);return l!==1/0&&l>=Math.pow(2,e)?t(e,n):s};t.rack=function(e,n,r){var i=function(i){var s=0;do{if(s++>10){if(!r)throw new Error("too many ID collisions, use more bits");e+=r}var a=t(e,n)}while(Object.hasOwnProperty.call(o,a));return o[a]=i,a},o=i.hats={};return i.get=function(e){return i.hats[e]},i.set=function(e,t){return i.hats[e]=t,i},i.bits=e||128,i.base=n||16,i}}));function n(e){if(!(this instanceof n))return new n(e);e=e||[128,36,1],this._seed=e.length?t.rack(e[0],e[1],e[2]):e}function r(e){return Array.prototype.concat.apply([],e)}n.prototype.next=function(e){return this._seed(e||!0)},n.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},n.prototype.claim=function(e,t){this._seed.set(e,t||!0)},n.prototype.assigned=function(e){return this._seed.get(e)||!1},n.prototype.unclaim=function(e){delete this._seed.hats[e]},n.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};const i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;function s(e){return void 0===e}function a(e){return void 0!==e}function l(e){return null==e}function c(e){return"[object Array]"===i.call(e)}function p(e){return"[object Object]"===i.call(e)}function u(e){return"[object Number]"===i.call(e)}function d(e){const t=i.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function h(e){return"[object String]"===i.call(e)}function f(e,t){return o.call(e,t)}function m(e,t){const n=D(t);let r;return v(e,(function(e,t){if(n(e,t))return r=e,!1})),r}function g(e,t){const n=D(t);let r=c(e)?-1:void 0;return v(e,(function(e,t){if(n(e,t))return r=t,!1})),r}function y(e,t){const n=D(t);let r=[];return v(e,(function(e,t){n(e,t)&&r.push(e)})),r}function v(e,t){let n,r;if(s(e))return;const i=c(e)?R:N;for(let o in e)if(f(e,o)&&(n=e[o],r=t(n,i(o)),!1===r))return n}function b(e,t){if(s(e))return[];!function(e){if(!c(e))throw new Error("must supply array")}(e);const n=D(t);return e.filter((function(e,t){return!n(e,t)}))}function w(e,t,n){return v(e,(function(e,r){n=t(n,e,r)})),n}function x(e,t){return!!w(e,(function(e,n,r){return e&&t(n,r)}),!0)}function _(e,t){return!!m(e,t)}function k(e,t){let n=[];return v(e,(function(e,r){n.push(t(e,r))})),n}function E(e){return e&&Object.keys(e)||[]}function O(e){return k(e,(e=>e))}function P(e,t,n={}){return t=A(t),v(e,(function(e){let r=t(e)||"_",i=n[r];i||(i=n[r]=[]),i.push(e)})),n}function S(e,...t){e=A(e);let n={};return v(t,(t=>P(t,e,n))),k(n,(function(e,t){return e[0]}))}const C=S;function T(e,t){t=A(t);let n=[];return v(e,(function(e,r){let i=t(e,r),o={d:i,v:e};for(var s=0;s<n.length;s++){let{d:e}=n[s];if(i<e)return void n.splice(s,0,o)}n.push(o)})),k(n,(e=>e.v))}function M(e){return function(t){return x(e,(function(e,n){return t[n]===e}))}}function A(e){return d(e)?e:t=>t[e]}function D(e){return d(e)?e:t=>t===e}function N(e){return e}function R(e){return Number(e)}function j(e,t){let n,r,i,o;function s(n){let s=Date.now(),c=n?0:o+t-s;if(c>0)return a(c);e.apply(i,r),l()}function a(e){n=setTimeout(s,e)}function l(){n&&clearTimeout(n),n=o=r=i=void 0}function c(...e){o=Date.now(),r=e,i=this,n||a(t)}return c.flush=function(){n&&s(!0),l()},c.cancel=l,c}function I(e,t){return e.bind(t)}function L(e,...t){return Object.assign(e,...t)}function z(e,t,n){let r=e;return v(t,(function(e,i){if("number"!=typeof e&&"string"!=typeof e)throw new Error("illegal key type: "+typeof e+". Key should be of type number or string.");if("constructor"===e)throw new Error("illegal key: constructor");if("__proto__"===e)throw new Error("illegal key: __proto__");let o=t[i+1],c=r[e];a(o)&&l(c)&&(c=r[e]=isNaN(+o)?{}:[]),s(o)?s(n)?delete r[e]:r[e]=n:r=c})),e}function B(e,t,n){let r=e;return v(t,(function(e){if(l(r))return r=void 0,!1;r=r[e]})),s(r)?n:r}function $(e,t){let n={},r=Object(e);return v(t,(function(t){t in r&&(n[t]=e[t])})),n}function q(e,t){let n={};return v(Object(e),(function(e,r){-1===t.indexOf(r)&&(n[r]=e)})),n}function F(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const V=Object.prototype.toString,H=Object.prototype.hasOwnProperty;function U(e,t){return H.call(e,t)}function W(e,t){let n,r;if(void 0===e)return;const i=function(e){return"[object Array]"===V.call(e)}(e)?Q:G;for(let o in e)if(U(e,o)&&(n=e[o],r=t(n,i(o)),!1===r))return n}function G(e){return e}function Q(e){return Number(e)}function X(e,...t){const n=e.style;return W(t,(function(e){e&&W(e,(function(e,t){n[t]=e}))})),e}const Z=Object.prototype.toString;function Y(e){return new K(e)}function K(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function J(e,t){return e&&"function"==typeof e.matches&&e.matches(t)}K.prototype.add=function(e){return this.list.add(e),this},K.prototype.remove=function(e){return"[object RegExp]"==Z.call(e)?this.removeMatching(e):(this.list.remove(e),this)},K.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},K.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},K.prototype.array=function(){return Array.from(this.list)},K.prototype.has=K.prototype.contains=function(e){return this.list.contains(e)};var ee,te,ne,re={};function ie(){ee=window.addEventListener?"addEventListener":"attachEvent",te=window.removeEventListener?"removeEventListener":"detachEvent",ne="addEventListener"!==ee?"on":""}var oe=re.bind=function(e,t,n,r){return ee||ie(),e[ee](ne+t,n,r||!1),n},se=re.unbind=function(e,t,n,r){return te||ie(),e[te](ne+t,n,r||!1),n},ae=F({__proto__:null,bind:oe,unbind:se,default:re},[re]),le=["focus","blur"];var ce,pe={bind:function(e,t,n,r,i){return-1!==le.indexOf(n)&&(i=!0),ae.bind(e,n,(function(n){var i=n.target||n.srcElement;n.delegateTarget=function(e,t,n){for(var r=n?e:e.parentNode;r&&r.nodeType!==document.DOCUMENT_NODE&&r.nodeType!==document.DOCUMENT_FRAGMENT_NODE;){if(J(r,t))return r;r=r.parentNode}return J(r,t)?r:null}(i,t,!0),n.delegateTarget&&r.call(e,n)}),i)},unbind:function(e,t,n,r){return-1!==le.indexOf(t)&&(r=!0),ae.unbind(e,t,n,r)}},ue=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var r=n[1];if("body"==r){return(l=t.createElement("html")).innerHTML=e,l.removeChild(l.lastChild)}var i=Object.prototype.hasOwnProperty.call(he,r)?he[r]:he._default,o=i[0],s=i[1],a=i[2],l=t.createElement("div");l.innerHTML=s+e+a;for(;o--;)l=l.lastChild;if(l.firstChild==l.lastChild)return l.removeChild(l.firstChild);var c=t.createDocumentFragment();for(;l.firstChild;)c.appendChild(l.removeChild(l.firstChild));return c},de=!1;"undefined"!=typeof document&&((ce=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',de=!ce.getElementsByTagName("link").length,ce=void 0);var he={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:de?[1,"X<div>","</div>"]:[0,"",""]};he.td=he.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],he.option=he.optgroup=[1,'<select multiple="multiple">',"</select>"],he.thead=he.tbody=he.colgroup=he.caption=he.tfoot=[1,"<table>","</table>"],he.polyline=he.ellipse=he.polygon=he.circle=he.text=he.line=he.path=he.rect=he.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var fe=ue;function me(e,t){return(t=t||document).querySelector(e)}function ge(e,t){return t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}(e,t))}function ye(e,t){return ge(t,e),e}var ve=2,be={"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":ve,"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":ve,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function we(e,t,n){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=be[r];i?(i===ve&&"number"==typeof n&&(n=String(n)+"px"),e.style[r]=n):e.setAttributeNS(null,t,n)}function xe(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return be[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);we(e,t,n)}else!function(e,t){var n,r,i=Object.keys(t);for(n=0;r=i[n];n++)we(e,r,t[r])}(e,t);return e}const _e=Object.prototype.toString;function ke(e){return new Ee(e)}function Ee(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Oe(e){var t=e.parentNode;return t&&t.removeChild(e),e}function Pe(e){for(var t;t=e.firstChild;)Oe(t);return e}function Se(e){return e.cloneNode(!0)}Ee.prototype.add=function(e){return this.list.add(e),this},Ee.prototype.remove=function(e){return"[object RegExp]"==_e.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Ee.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Ee.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Ee.prototype.array=function(){return Array.from(this.list)},Ee.prototype.has=Ee.prototype.contains=function(e){return this.list.contains(e)};var Ce={svg:"http://www.w3.org/2000/svg"},Te='<svg xmlns="'+Ce.svg+'"';function Me(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(Ce.svg)&&(e=Te+e.substring(4)):(e=Te+">"+e+"</svg>",t=!0);var n=function(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var r=document.createDocumentFragment(),i=n.firstChild;i.firstChild;)r.appendChild(i.firstChild);return r}function Ae(e,t){var n;return"<"===e.charAt(0)?(n=Me(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(Ce.svg,e),t&&xe(n,t),n}var De=null;function Ne(){return null===De&&(De=Ae("svg")),De}function Re(e,t){var n,r,i=Object.keys(t);for(n=0;r=i[n];n++)e[r]=t[r];return e}function je(e){return e?Ne().createSVGTransformFromMatrix(e):Ne().createSVGTransform()}var Ie=/([&<>]{1})/g,Le=/([\n\r"]{1})/g,ze={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function Be(e,t){return e.replace(t,(function(e,t){return ze[t]||t}))}function $e(e,t){var n,r,i,o,s;switch(e.nodeType){case 3:t.push(Be(e.textContent,Ie));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,r=(i=e.attributes).length;n<r;++n)o=i.item(n),t.push(" ",o.name,'="',Be(o.value,Le),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,r=(s=e.childNodes).length;n<r;++n)$e(s.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",Be(e.nodeValue,Ie),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function qe(e,t){var n=Me(t);if(Pe(e),t){(function(e){return"#document-fragment"===e.nodeName})(n)||(n=n.documentElement);for(var r,i=(r=n.childNodes,Array.prototype.slice.call(r)),o=0;o<i.length;o++)ge(i[o],e)}}function Fe(e,t){if(void 0!==t){try{qe(e,t)}catch(e){throw new Error("error parsing SVG: "+e.message)}return e}return function(e){for(var t=e.firstChild,n=[];t;)$e(t,n),t=t.nextSibling;return n.join("")}(e)}function Ve(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function He(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,r;for(e.clear(),n=0;r=t[n];n++)e.appendItem(Ve(e,r))}(n,t)),n.consolidate()}const Ue=/^class[ {]/;function We(e){return Array.isArray(e)}function Ge(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Qe(...e){1===e.length&&We(e[0])&&(e=e[0]);const t=(e=[...e]).pop();return t.$inject=e,t}const Xe=/constructor\s*[^(]*\(\s*([^)]*)\)/m,Ze=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,Ye=/\/\*([^*]*)\*\//m;function Ke(e){if("function"!=typeof e)throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(function(e){return Ue.test(e.toString())}(e)?Xe:Ze);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map((e=>{const t=e.match(Ye);return(t&&t[1]||e).trim()}))||[]}function Je(e,t){const n=t||{get:function(e,t){if(r.push(e),!1===t)return null;throw a(`No provider for "${e}"!`)}},r=[],i=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),s=o.injector=this,a=function(e){const t=r.join(" -> ");return r.length=0,new Error(t?`${e} (Resolving: ${t})`:e)};function l(e,t){if(!i[e]&&e.includes(".")){const t=e.split(".");let n=l(t.shift());for(;t.length;)n=n[t.shift()];return n}if(Ge(o,e))return o[e];if(Ge(i,e)){if(-1!==r.indexOf(e))throw r.push(e),a("Cannot resolve circular dependency!");return r.push(e),o[e]=i[e][0](i[e][1]),r.pop(),o[e]}return n.get(e,t)}function c(e,t){if(void 0===t&&(t={}),"function"!=typeof e){if(!We(e))throw a(`Cannot invoke "${e}". Expected a function!`);e=Qe(e.slice())}return{fn:e,dependencies:(e.$inject||Ke(e)).map((e=>Ge(t,e)?t[e]:l(e)))}}function p(e){const{fn:t,dependencies:n}=c(e);return new(Function.prototype.bind.call(t,null,...n))}function u(e,t,n){const{fn:r,dependencies:i}=c(e,n);return r.apply(t,i)}function d(e){return Qe((t=>e.get(t)))}function h(e,t){if(t&&t.length){const n=Object.create(null),r=Object.create(null),o=[],s=[],a=[];let l,c,p,u;for(let e in i)l=i[e],-1!==t.indexOf(e)&&("private"===l[2]?(c=o.indexOf(l[3]),-1===c?(p=l[3].createChild([],t),u=d(p),o.push(l[3]),s.push(p),a.push(u),n[e]=[u,e,"private",p]):n[e]=[a[c],e,"private",s[c]]):n[e]=[l[2],l[1]],r[e]=!0),"factory"!==l[2]&&"type"!==l[2]||!l[1].$scope||t.forEach((t=>{-1!==l[1].$scope.indexOf(t)&&(n[e]=[l[2],l[1]],r[t]=!0)}));t.forEach((e=>{if(!r[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')})),e.unshift(n)}return new Je(e,s)}const f={factory:u,type:p,value:function(e){return e}};function m(e,t){const n=e.__init__||[];return function(){n.forEach((e=>{"string"==typeof e?t.get(e):t.invoke(e)}))}}function g(e){const t=e.__exports__;if(t){const n=e.__modules__,r=Object.keys(e).reduce(((t,n)=>("__exports__"!==n&&"__modules__"!==n&&"__init__"!==n&&"__depends__"!==n&&(t[n]=e[n]),t)),Object.create(null)),o=h((n||[]).concat(r)),s=Qe((function(e){return o.get(e)}));t.forEach((function(e){i[e]=[s,e,"private",o]}));const a=(e.__init__||[]).slice();return a.unshift((function(){o.init()})),m(e=Object.assign({},e,{__init__:a}),o)}return Object.keys(e).forEach((function(t){if("__init__"===t||"__depends__"===t)return;const n=e[t];if("private"===n[2])return void(i[t]=n);const r=n[0],o=n[1];i[t]=[f[r],et(r,o),r]})),m(e,s)}function y(e,t){return-1!==e.indexOf(t)||-1!==(e=(t.__depends__||[]).reduce(y,e)).indexOf(t)?e:e.concat(t)}this.get=l,this.invoke=u,this.instantiate=p,this.createChild=h,this.init=function(e){const t=e.reduce(y,[]).map(g);let n=!1;return function(){n||(n=!0,t.forEach((e=>e())))}}(e)}function et(e,t){return"value"!==e&&We(t)&&(t=Qe(t.slice())),t}var tt=1e3;function nt(e,t){var n=this;t=t||tt,e.on(["render.shape","render.connection"],t,(function(e,t){var r=e.type,i=t.element,o=t.gfx,s=t.attrs;if(n.canRender(i))return"render.shape"===r?n.drawShape(o,i,s):n.drawConnection(o,i,s)})),e.on(["render.getShapePath","render.getConnectionPath"],t,(function(e,t){if(n.canRender(t))return"render.getShapePath"===e.type?n.getShapePath(t):n.getConnectionPath(t)}))}function rt(e){return e.flat().join(",").replace(/,?([A-z]),?/g,"$1")}function it(e){return["L",e.x,e.y]}function ot(e,t){const n=e.length,r=[(i=e[0],["M",i.x,i.y])];var i,o,s,a;for(let i=1;i<n;i++){const n=e[i-1],l=e[i],c=e[i+1];if(!c||!t){r.push(it(l));continue}const p=Math.min(t,at(l.x-n.x,l.y-n.y),at(c.x-l.x,c.y-l.y));if(!p){r.push(it(l));continue}const u=st(l,n,p),d=st(l,n,.5*p),h=st(l,c,p),f=st(l,c,.5*p);r.push(it(u)),r.push((s=f,a=h,["C",(o=d).x,o.y,s.x,s.y,a.x,a.y]))}return r}function st(e,t,n){const r=t.x-e.x,i=t.y-e.y,o=n/at(r,i);return{x:e.x+r*o,y:e.y+i*o}}function at(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function lt(e,t,n){u(t)&&(n=t,t=null),t||(t={});const r=Ae("path",t);return u(n)&&(r.dataset.cornerRadius=String(n)),ct(r,e)}function ct(e,t){return xe(e,{d:rt(ot(t,parseInt(e.dataset.cornerRadius,10)||0))}),e}function pt(e){return y(e,(function(t){return!m(e,(function(e){return e!==t&&ut(t,e)}))}))}function ut(e,t){if(t){if(e===t)return t;if(e.parent)return ut(e.parent,t)}}function dt(e,t,n){var r=!n||-1===e.indexOf(t);return r&&e.push(t),r}function ht(e,t,n){n=n||0,c(e)||(e=[e]),v(e,(function(e,r){var i=t(e,r,n);c(i)&&i.length&&ht(i,t,n+1)}))}function ft(e,t){return function(e,t,n){var r=[],i=[];return ht(e,(function(e,o,s){dt(r,e,t);var a=e.children;if((-1===n||s<n)&&a&&dt(i,a,t))return a})),r}(e,!t,-1)}function mt(e,t){var n,r,i,o;return t=!!t,c(e)||(e=[e]),v(e,(function(e){var s=e;e.waypoints&&!t&&(s=mt(e.waypoints,!0));var a=s.x,l=s.y,c=s.height||0,p=s.width||0;(a<n||void 0===n)&&(n=a),(l<r||void 0===r)&&(r=l),(a+p>i||void 0===i)&&(i=a+p),(l+c>o||void 0===o)&&(o=l+c)})),{x:n,y:r,height:o-r,width:i-n}}function gt(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function yt(e){return!(!e||!e.isFrame)}function vt(e,t){return L({},e||{},t||{})}nt.prototype.canRender=function(e){},nt.prototype.drawShape=function(e,t){},nt.prototype.drawConnection=function(e,t){},nt.prototype.getShapePath=function(e){},nt.prototype.getConnectionPath=function(e){};function bt(e,t){nt.call(this,e,1),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})}e(bt,nt),bt.prototype.canRender=function(){return!0},bt.prototype.drawShape=function(e,t,n){var r=Ae("rect");return xe(r,{x:0,y:0,width:t.width||0,height:t.height||0}),yt(t)?xe(r,L({},this.FRAME_STYLE,n||{})):xe(r,L({},this.SHAPE_STYLE,n||{})),ye(e,r),r},bt.prototype.drawConnection=function(e,t,n){var r=lt(t.waypoints,L({},this.CONNECTION_STYLE,n||{}));return ye(e,r),r},bt.prototype.getShapePath=function(e){var t=e.x,n=e.y,r=e.width;return rt([["M",t,n],["l",r,0],["l",0,e.height],["l",-r,0],["z"]])},bt.prototype.getConnectionPath=function(e){var t,n,r=e.waypoints,i=[];for(t=0;n=r[t];t++)n=n.original||n,i.push([0===t?"M":"L",n.x,n.y]);return rt(i)},bt.$inject=["eventBus","styles"];var wt={__init__:["defaultRenderer"],defaultRenderer:["type",bt],styles:["type",function(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(e,t,n){return L(this.style(t,n),{class:e})},this.style=function(t,n){c(t)||n||(n=t,t=[]);var r=w(t,(function(t,n){return L(t,e[n]||{})}),{});return n?L(r,n):r},this.computeStyle=function(e,n,r){return c(n)||(r=n,n=[]),t.style(n||[],L({},r,e||{}))}}]};function xt(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const _t=Object.prototype.toString,kt=Object.prototype.hasOwnProperty;function Et(e,t){return kt.call(e,t)}function Ot(e,t){let n,r;if(void 0===e)return;const i=function(e){return"[object Array]"===_t.call(e)}(e)?St:Pt;for(let o in e)if(Et(e,o)&&(n=e[o],r=t(n,i(o)),!1===r))return n}function Pt(e){return e}function St(e){return Number(e)}function Ct(e,...t){const n=e.style;return Ot(t,(function(e){e&&Ot(e,(function(e,t){n[t]=e}))})),e}function Tt(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}const Mt=Object.prototype.toString;function At(e){return new Dt(e)}function Dt(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Nt(e){for(var t;e.childNodes.length;)t=e.childNodes[0],e.removeChild(t);return e}function Rt(e,t){return e&&"function"==typeof e.matches&&e.matches(t)}function jt(e,t,n){for(var r=n?e:e.parentNode;r&&r.nodeType!==document.DOCUMENT_NODE&&r.nodeType!==document.DOCUMENT_FRAGMENT_NODE;){if(Rt(r,t))return r;r=r.parentNode}return Rt(r,t)?r:null}Dt.prototype.add=function(e){return this.list.add(e),this},Dt.prototype.remove=function(e){return"[object RegExp]"==Mt.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Dt.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Dt.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Dt.prototype.array=function(){return Array.from(this.list)},Dt.prototype.has=Dt.prototype.contains=function(e){return this.list.contains(e)};var It,Lt,zt,Bt={};function $t(){It=window.addEventListener?"addEventListener":"attachEvent",Lt=window.removeEventListener?"removeEventListener":"detachEvent",zt="addEventListener"!==It?"on":""}var qt=Bt.bind=function(e,t,n,r){return It||$t(),e[It](zt+t,n,r||!1),n},Ft=Bt.unbind=function(e,t,n,r){return Lt||$t(),e[Lt](zt+t,n,r||!1),n},Vt=xt({__proto__:null,bind:qt,unbind:Ft,default:Bt},[Bt]),Ht=["focus","blur"];var Ut,Wt={bind:function(e,t,n,r,i){return-1!==Ht.indexOf(n)&&(i=!0),Vt.bind(e,n,(function(n){var i=n.target||n.srcElement;n.delegateTarget=jt(i,t,!0),n.delegateTarget&&r.call(e,n)}),i)},unbind:function(e,t,n,r){return-1!==Ht.indexOf(t)&&(r=!0),Vt.unbind(e,t,n,r)}},Gt=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var r=n[1];if("body"==r){return(l=t.createElement("html")).innerHTML=e,l.removeChild(l.lastChild)}var i=Object.prototype.hasOwnProperty.call(Xt,r)?Xt[r]:Xt._default,o=i[0],s=i[1],a=i[2],l=t.createElement("div");l.innerHTML=s+e+a;for(;o--;)l=l.lastChild;if(l.firstChild==l.lastChild)return l.removeChild(l.firstChild);var c=t.createDocumentFragment();for(;l.firstChild;)c.appendChild(l.removeChild(l.firstChild));return c},Qt=!1;"undefined"!=typeof document&&((Ut=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',Qt=!Ut.getElementsByTagName("link").length,Ut=void 0);var Xt={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:Qt?[1,"X<div>","</div>"]:[0,"",""]};Xt.td=Xt.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Xt.option=Xt.optgroup=[1,'<select multiple="multiple">',"</select>"],Xt.thead=Xt.tbody=Xt.colgroup=Xt.caption=Xt.tfoot=[1,"<table>","</table>"],Xt.polyline=Xt.ellipse=Xt.polygon=Xt.circle=Xt.text=Xt.line=Xt.path=Xt.rect=Xt.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var Zt=Gt;function Yt(e,t){return(t=t||document).querySelector(e)}function Kt(e,t){return(t=t||document).querySelectorAll(e)}function Jt(e){e.parentNode&&e.parentNode.removeChild(e)}function en(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return-1!==n&&e.splice(n,1),n}function tn(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var r=e.indexOf(t);if(-1!==r){if(r===n)return;if(-1===n)return;e.splice(r,1)}-1!==n?e.splice(n,0,t):e.push(t)}}function nn(e,t){return e&&t?e.indexOf(t):-1}function rn(e,t){return e&&t?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):-1}function on(e,t,n,r){if(void 0===r&&(r=5),!e||!t||!n)return!1;var i=(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),o=rn(e,t);return Math.abs(i/o)<=r}var sn=2;function an(e,t){var n=Array.from(arguments).flat();const r={x:"v",y:"h"};for(const[e,t]of Object.entries(r))if(ln(e,n))return t;return!1}function ln(e,t){const n=t[0];return x(t,(function(t){return Math.abs(n[e]-t[e])<=sn}))}function cn(e,t,n){return n=n||0,e.x>t.x-n&&e.y>t.y-n&&e.x<t.x+t.width+n&&e.y<t.y+t.height+n}function pn(e,t){return{x:Math.round(e.x+(t.x-e.x)/2),y:Math.round(e.y+(t.y-e.y)/2)}}var un=/,?([a-z]),?/gi,dn=parseFloat,hn=Math,fn=hn.PI,mn=hn.min,gn=hn.max,yn=hn.pow,vn=hn.abs,bn=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/gi,wn=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/gi,xn=Array.isArray||function(e){return e instanceof Array};function _n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function kn(e){if("function"==typeof e||Object(e)!==e)return e;var t=new e.constructor;for(var n in e)_n(e,n)&&(t[n]=kn(e[n]));return t}function En(e){var t=En.ps=En.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout((function(){for(var n in t)_n(t,n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])})),t[e]}function On(e,t,n,r){return 1===arguments.length&&(t=e.y,n=e.width,r=e.height,e=e.x),{x:e,y:t,width:n,height:r,x2:e+n,y2:t+r}}function Pn(){return this.join(",").replace(un,"$1")}function Sn(e){var t=kn(e);return t.toString=Pn,t}function Cn(e,t,n,r,i,o,s,a,l){var c=1-l,p=yn(c,3),u=yn(c,2),d=l*l*l,h=p*t+3*u*l*r+3*c*l*l*o+d*a;return{x:Rn(p*e+3*u*l*n+3*c*l*l*i+d*s),y:Rn(h)}}function Tn(e){var t=function(e,t,n,r,i,o,s,a){for(var l,c,p,u,d,h,f,m,g=[],y=[[],[]],v=0;v<2;++v)if(0==v?(c=6*e-12*n+6*i,l=-3*e+9*n-9*i+3*s,p=3*n-3*e):(c=6*t-12*r+6*o,l=-3*t+9*r-9*o+3*a,p=3*r-3*t),vn(l)<1e-12){if(vn(c)<1e-12)continue;0<(u=-p/c)&&u<1&&g.push(u)}else f=c*c-4*p*l,m=hn.sqrt(f),f<0||(0<(d=(-c+m)/(2*l))&&d<1&&g.push(d),0<(h=(-c-m)/(2*l))&&h<1&&g.push(h));var b,w=g.length,x=w;for(;w--;)b=1-(u=g[w]),y[0][w]=b*b*b*e+3*b*b*u*n+3*b*u*u*i+u*u*u*s,y[1][w]=b*b*b*t+3*b*b*u*r+3*b*u*u*o+u*u*u*a;return y[0][x]=e,y[1][x]=t,y[0][x+1]=s,y[1][x+1]=a,y[0].length=y[1].length=x+2,{x0:mn(...y[0]),y0:mn(...y[1]),x1:gn(...y[0]),y1:gn(...y[1])}}(...e);return On(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function Mn(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function An(e,t,n,r,i){return e*(e*(-3*t+9*n-9*r+3*i)+6*t-12*n+6*r)-3*t+3*n}function Dn(e,t,n,r,i,o,s,a,l){null==l&&(l=1);for(var c=(l=l>1?1:l<0?0:l)/2,p=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],u=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,h=0;h<12;h++){var f=c*p[h]+c,m=An(f,e,n,i,s),g=An(f,t,r,o,a),y=m*m+g*g;d+=u[h]*hn.sqrt(y)}return c*d}function Nn(e,t,n,r,i,o,s,a){if(!(gn(e,n)<mn(i,s)||mn(e,n)>gn(i,s)||gn(t,r)<mn(o,a)||mn(t,r)>gn(o,a))){var l=(e*r-t*n)*(o-a)-(t-r)*(i*a-o*s),c=(e-n)*(o-a)-(t-r)*(i-s);if(c){var p=Rn(((e*r-t*n)*(i-s)-(e-n)*(i*a-o*s))/c),u=Rn(l/c),d=+p.toFixed(2),h=+u.toFixed(2);if(!(d<+mn(e,n).toFixed(2)||d>+gn(e,n).toFixed(2)||d<+mn(i,s).toFixed(2)||d>+gn(i,s).toFixed(2)||h<+mn(t,r).toFixed(2)||h>+gn(t,r).toFixed(2)||h<+mn(o,a).toFixed(2)||h>+gn(o,a).toFixed(2)))return{x:p,y:u}}}}function Rn(e){return Math.round(1e11*e)/1e11}function jn(e,t,n){if(!function(e,t){return e=On(e),Mn(t=On(t),e.x,e.y)||Mn(t,e.x2,e.y)||Mn(t,e.x,e.y2)||Mn(t,e.x2,e.y2)||Mn(e,t.x,t.y)||Mn(e,t.x2,t.y)||Mn(e,t.x,t.y2)||Mn(e,t.x2,t.y2)||(e.x<t.x2&&e.x>t.x||t.x<e.x2&&t.x>e.x)&&(e.y<t.y2&&e.y>t.y||t.y<e.y2&&t.y>e.y)}(Tn(e),Tn(t)))return n?0:[];for(var r=Dn(...e),i=Dn(...t),o=zn(e)?1:~~(r/5)||1,s=zn(t)?1:~~(i/5)||1,a=[],l=[],c={},p=n?0:[],u=0;u<o+1;u++){var d=Cn(...e,u/o);a.push({x:d.x,y:d.y,t:u/o})}for(u=0;u<s+1;u++)d=Cn(...t,u/s),l.push({x:d.x,y:d.y,t:u/s});for(u=0;u<o;u++)for(var h=0;h<s;h++){var f,m=a[u],g=a[u+1],y=l[h],v=l[h+1],b=vn(g.x-m.x)<.01?"y":"x",w=vn(v.x-y.x)<.01?"y":"x",x=Nn(m.x,m.y,g.x,g.y,y.x,y.y,v.x,v.y);if(x){if(c[f=x.x.toFixed(9)+"#"+x.y.toFixed(9)])continue;c[f]=!0;var _=m.t+vn((x[b]-m[b])/(g[b]-m[b]))*(g.t-m.t),k=y.t+vn((x[w]-y[w])/(v[w]-y[w]))*(v.t-y.t);_>=0&&_<=1&&k>=0&&k<=1&&(n?p++:p.push({x:x.x,y:x.y,t1:_,t2:k}))}}return p}function In(e,t,n){e=Fn(e),t=Fn(t);for(var r,i,o,s,a,l,c,p,u,d,h=n?0:[],f=0,m=e.length;f<m;f++){var g=e[f];if("M"==g[0])r=a=g[1],i=l=g[2];else{"C"==g[0]?(r=(u=[r,i,...g.slice(1)])[6],i=u[7]):(u=[r,i,r,i,a,l,a,l],r=a,i=l);for(var y=0,v=t.length;y<v;y++){var b=t[y];if("M"==b[0])o=c=b[1],s=p=b[2];else{"C"==b[0]?(o=(d=[o,s,...b.slice(1)])[6],s=d[7]):(d=[o,s,o,s,c,p,c,p],o=c,s=p);var w=jn(u,d,n);if(n)h+=w;else{for(var x=0,_=w.length;x<_;x++)w[x].segment1=f,w[x].segment2=y,w[x].bez1=u,w[x].bez2=d;h=h.concat(w)}}}}}return h}function Ln(e){var t=En(e);if(t.abs)return Sn(t.abs);if(xn(e)&&xn(e&&e[0])||(e=function(e){if(!e)return null;var t=En(e);if(t.arr)return kn(t.arr);var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},r=[];return xn(e)&&xn(e[0])&&(r=kn(e)),r.length||String(e).replace(bn,(function(e,t,i){var o=[],s=t.toLowerCase();for(i.replace(wn,(function(e,t){t&&o.push(+t)})),"m"==s&&o.length>2&&(r.push([t,...o.splice(0,2)]),s="l",t="m"==t?"l":"L");o.length>=n[s]&&(r.push([t,...o.splice(0,n[s])]),n[s]););})),r.toString=En.toString,t.arr=kn(r),r}(e)),!e||!e.length)return[["M",0,0]];var n,r=[],i=0,o=0,s=0,a=0,l=0;"M"==e[0][0]&&(s=i=+e[0][1],a=o=+e[0][2],l++,r[0]=["M",i,o]);for(var c,p,u=l,d=e.length;u<d;u++){if(r.push(c=[]),(n=(p=e[u])[0])!=n.toUpperCase())switch(c[0]=n.toUpperCase(),c[0]){case"A":c[1]=p[1],c[2]=p[2],c[3]=p[3],c[4]=p[4],c[5]=p[5],c[6]=+p[6]+i,c[7]=+p[7]+o;break;case"V":c[1]=+p[1]+o;break;case"H":c[1]=+p[1]+i;break;case"M":s=+p[1]+i,a=+p[2]+o;default:for(var h=1,f=p.length;h<f;h++)c[h]=+p[h]+(h%2?i:o)}else for(var m=0,g=p.length;m<g;m++)c[m]=p[m];switch(n=n.toUpperCase(),c[0]){case"Z":i=+s,o=+a;break;case"H":i=c[1];break;case"V":o=c[1];break;case"M":s=c[c.length-2],a=c[c.length-1];default:i=c[c.length-2],o=c[c.length-1]}}return r.toString=Pn,t.abs=Sn(r),r}function zn(e){return e[0]===e[2]&&e[1]===e[3]&&e[4]===e[6]&&e[5]===e[7]}function Bn(e,t,n,r){return[e,t,n,r,n,r]}function $n(e,t,n,r,i,o){var s=1/3,a=2/3;return[s*e+a*n,s*t+a*r,s*i+a*n,s*o+a*r,i,o]}function qn(e,t,n,r,i,o,s,a,l,c){var p,u=120*fn/180,d=fn/180*(+i||0),h=[],f=function(e){return function t(){var n=Array.prototype.slice.call(arguments,0).join("␀"),r=t.cache=t.cache||{},i=t.count=t.count||[];return _n(r,n)?(function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}(i,n),r[n]):(i.length>=1e3&&delete r[i.shift()],i.push(n),r[n]=e(...arguments),r[n])}}((function(e,t,n){return{x:e*hn.cos(n)-t*hn.sin(n),y:e*hn.sin(n)+t*hn.cos(n)}}));if(c)k=c[0],E=c[1],x=c[2],_=c[3];else{e=(p=f(e,t,-d)).x,t=p.y;var m=(e-(a=(p=f(a,l,-d)).x))/2,g=(t-(l=p.y))/2,y=m*m/(n*n)+g*g/(r*r);y>1&&(n*=y=hn.sqrt(y),r*=y);var v=n*n,b=r*r,w=(o==s?-1:1)*hn.sqrt(vn((v*b-v*g*g-b*m*m)/(v*g*g+b*m*m))),x=w*n*g/r+(e+a)/2,_=w*-r*m/n+(t+l)/2,k=hn.asin(((t-_)/r).toFixed(9)),E=hn.asin(((l-_)/r).toFixed(9));(k=e<x?fn-k:k)<0&&(k=2*fn+k),(E=a<x?fn-E:E)<0&&(E=2*fn+E),s&&k>E&&(k-=2*fn),!s&&E>k&&(E-=2*fn)}var O=E-k;if(vn(O)>u){var P=E,S=a,C=l;E=k+u*(s&&E>k?1:-1),h=qn(a=x+n*hn.cos(E),l=_+r*hn.sin(E),n,r,i,0,s,S,C,[E,P,x,_])}O=E-k;var T=hn.cos(k),M=hn.sin(k),A=hn.cos(E),D=hn.sin(E),N=hn.tan(O/4),R=4/3*n*N,j=4/3*r*N,I=[e,t],L=[e+R*M,t-j*T],z=[a+R*D,l-j*A],B=[a,l];if(L[0]=2*I[0]-L[0],L[1]=2*I[1]-L[1],c)return[L,z,B].concat(h);for(var $=[],q=0,F=(h=[L,z,B].concat(h).join().split(",")).length;q<F;q++)$[q]=q%2?f(h[q-1],h[q],d).y:f(h[q],h[q+1],d).x;return $}function Fn(e){var t=En(e);if(t.curve)return Sn(t.curve);for(var n=Ln(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i=function(e,t,n){var r,i;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];switch(!(e[0]in{T:1,Q:1})&&(t.qx=t.qy=null),e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=["C",...qn(t.x,t.y,...e.slice(1))];break;case"S":"C"==n||"S"==n?(r=2*t.x-t.bx,i=2*t.y-t.by):(r=t.x,i=t.y),e=["C",r,i,...e.slice(1)];break;case"T":"Q"==n||"T"==n?(t.qx=2*t.x-t.qx,t.qy=2*t.y-t.qy):(t.qx=t.x,t.qy=t.y),e=["C",...$n(t.x,t.y,t.qx,t.qy,e[1],e[2])];break;case"Q":t.qx=e[1],t.qy=e[2],e=["C",...$n(t.x,t.y,e[1],e[2],e[3],e[4])];break;case"L":e=["C",...Bn(t.x,t.y,e[1],e[2])];break;case"H":e=["C",...Bn(t.x,t.y,e[1],t.y)];break;case"V":e=["C",...Bn(t.x,t.y,t.x,e[1])];break;case"Z":e=["C",...Bn(t.x,t.y,t.X,t.Y)]}return e},o=function(e,t){if(e[t].length>7){e[t].shift();for(var r=e[t];r.length;)s[t]="A",e.splice(t++,0,["C",...r.splice(0,6)]);e.splice(t,1),p=n.length}},s=[],a="",l="",c=0,p=n.length;c<p;c++){n[c]&&(a=n[c][0]),"C"!=a&&(s[c]=a,c&&(l=s[c-1])),n[c]=i(n[c],r,l),"A"!=s[c]&&"C"==a&&(s[c]="C"),o(n,c);var u=n[c],d=u.length;r.x=u[d-2],r.y=u[d-1],r.bx=dn(u[d-4])||r.x,r.by=dn(u[d-3])||r.y}return t.curve=Sn(n),n}function Vn(e){return p(e)&&f(e,"waypoints")}function Hn(e){return p(e)&&f(e,"labelTarget")}function Un(e){return{x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height)}}function Wn(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function Gn(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function Qn(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function Xn(e){for(var t=e.waypoints,n=t.reduce((function(e,n,r){var i=t[r-1];if(i){var o=e[e.length-1],s=o&&o.endLength||0,a=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}(i,n);e.push({start:i,end:n,startLength:s,endLength:s+a,length:a})}return e}),[]),r=n.reduce((function(e,t){return e+t.length}),0),i=r/2,o=0,s=n[o];s.endLength<i;)s=n[++o];var a=(i-s.startLength)/s.length;return{x:s.start.x+(s.end.x-s.start.x)*a,y:s.start.y+(s.end.y-s.start.y)*a}}function Zn(e){return Vn(e)?Xn(e):Wn({x:(t=e).x+(t.width||0)/2,y:t.y+(t.height||0)/2});var t}function Yn(e,t,n){p(n=n||0)||(n={x:n,y:n});var r=Gn(e),i=Gn(t),o=r.bottom+n.y<=i.top,s=r.left-n.x>=i.right,a=r.top-n.y>=i.bottom,l=o?"top":a?"bottom":null,c=r.right+n.x<=i.left?"left":s?"right":null;return c&&l?l+"-"+c:c||l||"intersect"}function Kn(e,t,n){var r=function(e,t){return In(e,t)}(e,t);return 1===r.length||2===r.length&&rn(r[0],r[1])<1?Wn(r[0]):r.length>1?(r=T(r,(function(e){var t=Math.floor(100*e.t2)||1;return t=((t=100-t)<10?"0":"")+t,e.segment2+"#"+t})),Wn(r[n?0:r.length-1])):null}function Jn(e,t){return Math.round(e*t)/t}function er(e){return u(e)?e+"px":e}function tr(e,t,n){const r=Ae("g");ke(r).add(t);const i=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(r,e.childNodes[i]||null),r}const nr={shape:["x","y","width","height"],connection:["waypoints"]};function rr(e,t,n,r){this._eventBus=t,this._elementRegistry=r,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._init(e||{})}function ir(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}rr.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],rr.prototype._init=function(e){const t=this._eventBus,n=this._container=function(e){const t=(e=L({},{width:"100%",height:"100%"},e)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),Ct(n,{position:"relative",overflow:"hidden",width:er(e.width),height:er(e.height)}),t.appendChild(n),n}(e),r=this._svg=Ae("svg");xe(r,{width:"100%",height:"100%"}),ye(n,r);const i=this._viewport=tr(r,"viewport");e.deferUpdate&&(this._viewboxChanged=j(I(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)},rr.prototype._destroy=function(){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});const 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},rr.prototype._clear=function(){this._elementRegistry.getAll().forEach((e=>{const t=gt(e);"root"===t?this.removeRootElement(e):this._removeElement(e,t)})),this._planes=[],this._rootElement=null,delete this._cachedViewbox},rr.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},rr.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)),void 0!==t&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group},rr.prototype._getChildIndex=function(e){return w(this._layers,(function(t,n){return n.visible&&e>=n.index&&t++,t}),0)},rr.prototype._createLayer=function(e,t){void 0===t&&(t=1);const n=this._getChildIndex(t);return{group:tr(this._viewport,"layer-"+e,n),index:t,visible:!0}},rr.prototype.showLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=this._viewport,r=t.group,i=t.index;if(t.visible)return r;const o=this._getChildIndex(i);return n.insertBefore(r,n.childNodes[o]||null),t.visible=!0,r},rr.prototype.hideLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=t.group;return t.visible?(Oe(n),t.visible=!1,n):n},rr.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],Oe(t.group))},rr.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},rr.prototype.findRoot=function(e){if("string"==typeof e&&(e=this._elementRegistry.get(e)),!e)return;const t=this._findPlaneForRoot(function(e){for(;e.parent;)e=e.parent;return e}(e))||{};return t.rootElement},rr.prototype.getRootElements=function(){return this._planes.map((function(e){return e.rootElement}))},rr.prototype._findPlaneForRoot=function(e){return m(this._planes,(function(t){return t.rootElement===e}))},rr.prototype.getContainer=function(){return this._container},rr.prototype._updateMarker=function(e,t,n){let r;e.id||(e=this._elementRegistry.get(e)),r=this._elementRegistry._elements[e.id],r&&(v([r.gfx,r.secondaryGfx],(function(e){e&&(n?ke(e).add(t):ke(e).remove(t))})),this._eventBus.fire("element.marker.update",{element:e,gfx:r.gfx,marker:t,add:!!n}))},rr.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},rr.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},rr.prototype.hasMarker=function(e,t){e.id||(e=this._elementRegistry.get(e));return ke(this.getGraphics(e)).has(t)},rr.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},rr.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},rr.prototype.addRootElement=function(e){const t=this._rootsIdx++;e||(e={id:"__implicitroot_"+t,children:[],isImplicit:!0});const n=e.layer="root-"+t;this._ensureValid("root",e);const r=this.getLayer(n,0);return this.hideLayer(n),this._addRoot(e,r),this._planes.push({rootElement:e,layer:r}),e},rr.prototype.removeRootElement=function(e){"string"==typeof e&&(e=this._elementRegistry.get(e));if(this._findPlaneForRoot(e))return this._removeRoot(e),this._removeLayer(e.layer),this._planes=this._planes.filter((function(t){return t.rootElement!==e})),this._rootElement===e&&(this._rootElement=null),e},rr.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},rr.prototype._removeRoot=function(e){const t=this._elementRegistry,n=this._eventBus;n.fire("root.remove",{element:e}),n.fire("root.removed",{element:e}),t.remove(e)},rr.prototype._addRoot=function(e,t){const n=this._elementRegistry,r=this._eventBus;r.fire("root.add",{element:e}),n.add(e,t),r.fire("root.added",{element:e,gfx:t})},rr.prototype._setRoot=function(e,t){const 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})},rr.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");const n=nr[e],r=x(n,(function(e){return void 0!==t[e]}));if(!r)throw new Error("must supply { "+n.join(", ")+" } with "+e)},rr.prototype._setParent=function(e,t,n){tn(t.children,e,n),e.parent=t},rr.prototype._addElement=function(e,t,n,r){n=n||this.getRootElement();const i=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),i.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,r);const s=o.create(e,t,r);return this._elementRegistry.add(t,s),o.update(e,t,s),i.fire(e+".added",{element:t,gfx:s}),t},rr.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},rr.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},rr.prototype._removeElement=function(e,t){const n=this._elementRegistry,r=this._graphicsFactory,i=this._eventBus;if(e=n.get(e.id||e))return i.fire(t+".remove",{element:e}),r.remove(e),en(e.parent&&e.parent.children,e),e.parent=null,i.fire(t+".removed",{element:e}),n.remove(e),e},rr.prototype.removeShape=function(e){return this._removeElement(e,"shape")},rr.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},rr.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},rr.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},rr.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},rr.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return this._cachedViewbox;const t=this._viewport,n=this.getSize();let r,i,o,s,a,l,c;return e?(this._changeViewbox((function(){a=Math.min(n.width/e.width,n.height/e.height);const r=this._svg.createSVGMatrix().scale(a).translate(-e.x,-e.y);He(t,r)})),e):(o=this._rootElement?this.getActiveLayer():null,r=o&&o.getBBox()||{},s=He(t),i=s?s.matrix:function(e,t,n,r,i,o){var s=Ne().createSVGMatrix();switch(arguments.length){case 0:return s;case 1:return Re(s,e);case 6:return Re(s,{a:e,b:t,c:n,d:r,e:i,f:o})}}(),a=Jn(i.a,1e3),l=Jn(-i.e||0,1e3),c=Jn(-i.f||0,1e3),e=this._cachedViewbox={x:l?l/a:0,y:c?c/a:0,width:n.width/a,height:n.height/a,scale:a,inner:{width:r.width||0,height:r.height||0,x:r.x||0,y:r.y||0},outer:n})},rr.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox((function(){e=L({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),ir(t,n)})),{x:n.e,y:n.f}},rr.prototype.scrollToElement=function(e,t){let n=100;"string"==typeof e&&(e=this._elementRegistry.get(e));const r=this.findRoot(e);if(r!==this.getRootElement()&&this.setRootElement(r),r===e)return;t||(t={}),"number"==typeof t&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};const i=mt(e),o=Gn(i),s=this.viewbox(),a=this.zoom();let l,c;s.y+=t.top/a,s.x+=t.left/a,s.width-=(t.right+t.left)/a,s.height-=(t.bottom+t.top)/a;const p=Gn(s);if(i.width<s.width&&i.height<s.height){const e=Math.max(0,o.right-p.right),t=Math.min(0,o.left-p.left),n=Math.max(0,o.bottom-p.bottom),r=Math.min(0,o.top-p.top);l=e||t,c=n||r}else l=i.x-s.x,c=i.y-s.y;this.scroll({dx:-l*a,dy:-c*a})},rr.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if("fit-viewport"===e)return this._fitViewport(t);let n,r;return this._changeViewbox((function(){"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),r=this._setZoom(e,t)})),Jn(r.a,1e3)},rr.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,r=t.inner;let 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},rr.prototype._setZoom=function(e,t){const n=this._svg,r=this._viewport,i=n.createSVGMatrix(),o=n.createSVGPoint();let s,a,l,c,p;l=r.getCTM();const u=l.a;return t?(s=L(o,t),a=s.matrixTransform(l.inverse()),c=i.translate(a.x,a.y).scale(1/u*e).translate(-a.x,-a.y),p=l.multiply(c)):p=i.scale(e),ir(this._viewport,p),p},rr.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},rr.prototype.getAbsoluteBBox=function(e){const t=this.viewbox();let n;if(e.waypoints){n=this.getGraphics(e).getBBox()}else n=e;return{x:n.x*t.scale-t.x*t.scale,y:n.y*t.scale-t.y*t.scale,width:n.width*t.scale,height:n.height*t.scale}},rr.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var or="data-element-id";function sr(e){this._elements={},this._eventBus=e}function ar(e,t,n){var r=function(e,t,n,r){var i=n.inverse;return Object.defineProperty(e,"remove",{value:function(e){var n=this.indexOf(e);return-1!==n&&(this.splice(n,1),t.unset(e,i,r)),e}}),Object.defineProperty(e,"contains",{value:function(e){return-1!==this.indexOf(e)}}),Object.defineProperty(e,"add",{value:function(e,n){var o=this.indexOf(e);if(void 0===n){if(-1!==o)return;n=this.length}-1!==o&&this.splice(o,1),this.splice(n,0,e),-1===o&&t.set(e,i,r)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:r}),r.length&&r.forEach((function(r){e.set(r,t.inverse,n)}))}function lr(e,t){if(!(this instanceof lr))return new lr(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}sr.$inject=["eventBus"],sr.prototype.add=function(e,t,n){var r=e.id;this._validateId(r),xe(t,or,r),n&&xe(n,or,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}},sr.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(xe(r.gfx,or,""),r.secondaryGfx&&xe(r.secondaryGfx,or,""),delete t[n])},sr.prototype.updateId=function(e,t){this._validateId(t),"string"==typeof e&&(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)},sr.prototype.updateGraphics=function(e,t,n){var r=e.id||e,i=this._elements[r];return n?i.secondaryGfx=t:i.gfx=t,t&&xe(t,or,r),t},sr.prototype.get=function(e){var t;t="string"==typeof e?e:e&&xe(e,or);var n=this._elements[t];return n&&n.element},sr.prototype.filter=function(e){var t=[];return this.forEach((function(n,r){e(n,r)&&t.push(n)})),t},sr.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),r=0;r<n.length;r++){var i=t[n[r]],o=i.element;if(e(o,i.gfx))return o}},sr.prototype.getAll=function(){return this.filter((function(e){return e}))},sr.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)}))},sr.prototype.getGraphics=function(e,t){var n=e.id||e,r=this._elements[n];return r&&(t?r.secondaryGfx:r.gfx)},sr.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")},lr.prototype.bind=function(e,t){if("string"==typeof t){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?ar(this,t,e):function(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(t){if(t!==i){var o=i;i=null,o&&e.unset(o,r,n),i=t,e.set(i,r,n)}}})}(this,t,e)},lr.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return function(e){return!0===e.__refs_collection}(n)||ar(this,t,e),n},lr.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},lr.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},lr.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var cr=new lr({name:"children",enumerable:!0,collection:!0},{name:"parent"}),pr=new lr({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),ur=new lr({name:"attachers",collection:!0},{name:"host"}),dr=new lr({name:"outgoing",collection:!0},{name:"source"}),hr=new lr({name:"incoming",collection:!0},{name:"target"});function fr(){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)}}),cr.bind(this,"parent"),pr.bind(this,"labels"),dr.bind(this,"outgoing"),hr.bind(this,"incoming")}function mr(){fr.call(this),cr.bind(this,"children"),ur.bind(this,"host"),ur.bind(this,"attachers")}function gr(){fr.call(this),cr.bind(this,"children")}function yr(){mr.call(this),pr.bind(this,"labelTarget")}function vr(){fr.call(this),dr.bind(this,"source"),hr.bind(this,"target")}e(mr,fr),e(gr,mr),e(yr,mr),e(vr,fr);var br={connection:vr,shape:mr,label:yr,root:gr};function wr(){this._uid=12}wr.prototype.createRoot=function(e){return this.create("root",e)},wr.prototype.createLabel=function(e){return this.create("label",e)},wr.prototype.createShape=function(e){return this.create("shape",e)},wr.prototype.createConnection=function(e){return this.create("connection",e)},wr.prototype.create=function(e,t){return(t=L({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=br[e];if(!n)throw new Error("unknown type: <"+e+">");return L(new n,t)}(e,t)};var xr="__fn",_r=Array.prototype.slice;function kr(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function Er(){}function Or(e){return e.childNodes[0]}function Pr(e,t,n,r,i){var o=je();o.setTranslate(t,n);var s=je();s.setRotate(r||0,0,0);var a=je();a.setScale(i||1,i||1),He(e,[o,s,a])}function Sr(e,t,n){var r=je();r.setTranslate(t,n),He(e,r)}function Cr(e,t){var n=je();n.setRotate(t,0,0),He(e,n)}function Tr(e,t){this._eventBus=e,this._elementRegistry=t}function Mr(e,t,n){var r=n||t.firstChild;e!==r&&t.insertBefore(e,r)}kr.prototype.on=function(e,t,n,r){if(e=c(e)?e:[e],d(t)&&(r=n,n=t,t=1e3),!u(t))throw new Error("priority must be a number");var i=n;r&&((i=I(n,r))[xr]=n[xr]||n);var o=this;e.forEach((function(e){o._addListener(e,{priority:t,callback:i,next:null})}))},kr.prototype.once=function(e,t,n,r){var i=this;if(d(t)&&(r=n,n=t,t=1e3),!u(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var t=n.apply(r,arguments);return i.off(e,o),t}o[xr]=n,this.on(e,t,o)},kr.prototype.off=function(e,t){e=c(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},kr.prototype.createEvent=function(e){var t=new Er;return t.init(e),t},kr.prototype.fire=function(e,t){var n,r,i,o;if(o=_r.call(arguments),"object"==typeof e&&(e=(t=e).type),!e)throw new Error("no event type specified");if(r=this._listeners[e]){n=t instanceof Er?t:this.createEvent(t),o[0]=n;var s=n.type;e!==s&&(n.type=e);try{i=this._invokeListeners(n,o,r)}finally{e!==s&&(n.type=s)}return void 0===i&&n.defaultPrevented&&(i=!1),i}},kr.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},kr.prototype._destroy=function(){this._listeners={}},kr.prototype._invokeListeners=function(e,t,n){for(var r;n&&!e.cancelBubble;)r=this._invokeListener(e,t,n),n=n.next;return r},kr.prototype._invokeListener=function(e,t,n){var r;if(n.callback.__isTomb)return r;try{r=function(e,t){return e.apply(null,t)}(n.callback,t),void 0!==r&&(e.returnValue=r,e.stopPropagation()),!1===r&&e.preventDefault()}catch(e){if(!this.handleError(e))throw console.error("unhandled error in event listener",e),e}return r},kr.prototype._addListener=function(e,t){var n,r=this._getListeners(e);if(r){for(;r;){if(r.priority<t.priority)return t.next=r,void(n?n.next=t:this._setListeners(e,t));n=r,r=r.next}n.next=t}else this._setListeners(e,t)},kr.prototype._getListeners=function(e){return this._listeners[e]},kr.prototype._setListeners=function(e,t){this._listeners[e]=t},kr.prototype._removeListener=function(e,t){var n,r,i,o=this._getListeners(e);if(t)for(;o;)n=o.next,(i=o.callback)!==t&&i[xr]!==t||(r?r.next=n:this._setListeners(e,n)),r=o,o=n;else this._setListeners(e,null)},Er.prototype.stopPropagation=function(){this.cancelBubble=!0},Er.prototype.preventDefault=function(){this.defaultPrevented=!0},Er.prototype.init=function(e){L(this,e||{})},Tr.$inject=["eventBus","elementRegistry"],Tr.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=function(e){return e.parentNode.childNodes[1]}(n),t||(ke(t=Ae("g")).add("djs-children"),ye(n.parentNode,t))):t=n,t},Tr.prototype._clear=function(e){var t=Or(e);return Nt(t),t},Tr.prototype._createContainer=function(e,t,n,r){var i=Ae("g");ke(i).add("djs-group"),void 0!==n?Mr(i,t,t.childNodes[n]):ye(t,i);var o=Ae("g");ke(o).add("djs-element"),ke(o).add("djs-"+e),r&&ke(o).add("djs-frame"),ye(i,o);var s=Ae("g");return ke(s).add("djs-visual"),ye(o,s),o},Tr.prototype.create=function(e,t,n){var r=this._getChildrenContainer(t.parent);return this._createContainer(e,r,n,yt(t))},Tr.prototype.updateContainments=function(e){var t,n=this,r=this._elementRegistry;t=w(e,(function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e}),{}),v(t,(function(e){var t=e.children;if(t){var i=n._getChildrenContainer(e);v(t.slice().reverse(),(function(e){Mr(r.getGraphics(e).parentNode,i)}))}}))},Tr.prototype.drawShape=function(e,t,n={}){return this._eventBus.fire("render.shape",{gfx:e,element:t,attrs:n})},Tr.prototype.getShapePath=function(e){return this._eventBus.fire("render.getShapePath",e)},Tr.prototype.drawConnection=function(e,t,n={}){return this._eventBus.fire("render.connection",{gfx:e,element:t,attrs:n})},Tr.prototype.getConnectionPath=function(e){return this._eventBus.fire("render.getConnectionPath",e)},Tr.prototype.update=function(e,t,n){if(t.parent){var r=this._clear(n);if("shape"===e)this.drawShape(r,t),Sr(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(r,t)}t.hidden?xe(n,"display","none"):xe(n,"display","block")}},Tr.prototype.remove=function(e){Oe(this._elementRegistry.getGraphics(e).parentNode)};var Ar={__depends__:[wt],__init__:["canvas"],canvas:["type",rr],elementRegistry:["type",sr],elementFactory:["type",wr],eventBus:["type",kr],graphicsFactory:["type",Tr]};function Dr(e){return function(e){var t=new Je(e);return t.init(),t}([{config:["value",e=e||{}]},Ar].concat(e.modules||[]))}function Nr(e,t){this._injector=t||Dr(e),this.get("eventBus").fire("diagram.init")}function Rr(){}function jr(e,t){this.model=e,this.properties=t}Nr.prototype.get=function(e,t){return this._injector.get(e,t)},Nr.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},Nr.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},Nr.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")},Rr.prototype.get=function(e){return this.$model.properties.get(this,e)},Rr.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},jr.prototype.createType=function(e){var t=this.model,n=this.properties,r=Object.create(Rr.prototype);v(e.properties,(function(e){e.isMany||void 0===e.default||(r[e.name]=e.default)})),n.defineModel(r,t),n.defineDescriptor(r,e);var i=e.ns.name;function o(e){n.define(this,"$type",{value:i,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),v(e,I((function(e,t){this.set(t,e)}),this))}return o.prototype=r,o.hasType=r.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var Ir={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},Lr={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function zr(e,t){var n=Lr[e];return n?n(t):t}function Br(e){return!!Ir[e]}function $r(e){return!!Lr[e]}function qr(e,t){var n,r,i=e.split(/:/);if(1===i.length)n=e,r=t;else{if(2!==i.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=i[1],r=i[0]}return{name:e=(r?r+":":"")+n,prefix:r,localName:n}}function Fr(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function Vr(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,v(e,I(this.registerPackage,this))}function Hr(e,t,n){var r=t[n];if(r in e)throw new Error("package with "+n+" <"+r+"> already defined")}function Ur(e){this.model=e}function Wr(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function Gr(e){return e.replace(/^:/,"")}function Qr(e,t={}){this.properties=new Ur(this),this.factory=new jr(this,this.properties),this.registry=new Vr(e,this.properties),this.typeCache={},this.config=t}Fr.prototype.build=function(){return $(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},Fr.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var r=this.properties;void 0!==t?r.splice(t,0,e):r.push(e)},Fr.prototype.replaceProperty=function(e,t,n){var r=e.ns,i=this.properties,o=this.propertiesByName,s=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 a=i.indexOf(e);if(-1===a)throw new Error("property <"+r.name+"> not found in property list");i.splice(a,1),this.addProperty(t,n?void 0:a,s),o[r.name]=o[r.localName]=t},Fr.prototype.redefineProperty=function(e,t,n){var r=e.ns.prefix,i=t.split("#"),o=qr(i[0],r),s=qr(i[1],o.prefix).name,a=this.propertiesByName[s];if(!a)throw new Error("refined property <"+s+"> not found");this.replaceProperty(a,e,n),delete e.redefines},Fr.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},Fr.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},Fr.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},Fr.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},Fr.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},Fr.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")},Fr.prototype.hasProperty=function(e){return this.propertiesByName[e]},Fr.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,r=this.allTypes,i=e.name;i in n||(v(e.properties,I((function(n){n=L({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var r=n.replaces,i=n.redefines;r||i?this.redefineProperty(n,r||i,r):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))}),this)),r.push(e),n[i]=e)},Vr.prototype.getPackage=function(e){return this.packageMap[e]},Vr.prototype.getPackages=function(){return this.packages},Vr.prototype.registerPackage=function(e){e=L({},e);var t=this.packageMap;Hr(t,e,"prefix"),Hr(t,e,"uri"),v(e.types,I((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},Vr.prototype.registerType=function(e,t){var n=qr((e=L({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:L(e.meta||{})})).name,t.prefix),r=n.name,i={};v(e.properties,I((function(e){var t=qr(e.name,n.prefix),r=t.name;Br(e.type)||(e.type=qr(e.type,t.prefix).name),L(e,{ns:t,name:r}),i[r]=e}),this)),L(e,{ns:n,name:r,propertiesByName:i}),v(e.extends,I((function(e){var t=qr(e,n.prefix),i=this.typeMap[t.name];i.traits=i.traits||[],i.traits.push(r)}),this)),this.definePackage(e,t),this.typeMap[r]=e},Vr.prototype.mapTypes=function(e,t,n){var r=Br(e.name)?{name:e.name}:this.typeMap[e.name],i=this;function o(n,r){var o=qr(n,Br(n)?"":e.prefix);i.mapTypes(o,t,r)}function s(e){return o(e,!0)}if(!r)throw new Error("unknown type <"+e.name+">");v(r.superClass,n?s:function(e){return o(e,!1)}),t(r,!n),v(r.traits,s)},Vr.prototype.getEffectiveDescriptor=function(e){var t=qr(e),n=new Fr(t);this.mapTypes(t,(function(e,t){n.addTrait(e,t)}));var r=n.build();return this.definePackage(r,r.allTypes[r.allTypes.length-1].$pkg),r},Vr.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},Ur.prototype.set=function(e,t,n){if(!h(t)||!t.length)throw new TypeError("property name must be a non-empty string");var r=this.getProperty(e,t),i=r&&r.name;void 0===n?r?delete e[i]:delete e.$attrs[Gr(t)]:r?i in e?e[i]=n:Wr(e,r,n):e.$attrs[Gr(t)]=n},Ur.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[Gr(t)];var r=n.name;return!e[r]&&n.isMany&&Wr(e,n,[]),e[r]},Ur.prototype.define=function(e,t,n){if(!n.writable){var r=n.value;delete(n=L({},n,{get:function(){return r}})).value}Object.defineProperty(e,t,n)},Ur.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},Ur.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},Ur.prototype.getProperty=function(e,t){var n=this.model,r=n.getPropertyDescriptor(e,t);if(r)return r;if(t.includes(":"))return null;const i=n.config.strict;if(void 0!==i){const n=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(i)throw n;"undefined"!=typeof console&&console.warn(n)}return null},Qr.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},Qr.prototype.getType=function(e){var t=this.typeCache,n=h(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r},Qr.prototype.createAny=function(e,t,n){var r=qr(e),i={$type:e,$instanceOf:function(e){return e===this.$type},get:function(e){return this[e]},set:function(e,t){z(this,[e],t)}},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}),v(n,(function(e,t){p(e)&&void 0!==e.value?i[e.name]=e.value:i[t]=e})),i},Qr.prototype.getPackage=function(e){return this.registry.getPackage(e)},Qr.prototype.getPackages=function(){return this.registry.getPackages()},Qr.prototype.getElementDescriptor=function(e){return e.$descriptor},Qr.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},Qr.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},Qr.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var Xr=String.fromCharCode,Zr=Object.prototype.hasOwnProperty,Yr=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,Kr={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function Jr(e,t,n,r){return r?Zr.call(Kr,r)?Kr[r]:"&"+r+";":Xr(t||parseInt(n,16))}function ei(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(Yr,Jr):e}Object.keys(Kr).forEach((function(e){Kr[e.toUpperCase()]=Kr[e]}));var ti="xsi:type",ni="non-whitespace outside of root node";function ri(e){return new Error(e)}function ii(e){return"missing namespace for prefix <"+e+">"}function oi(e){return{get:e,enumerable:!0}}function si(e){var t,n={};for(t in e)n[t]=e[t];return n}function ai(e){return e+"$uri"}function li(){return{line:0,column:0}}function ci(e){throw e}function pi(e){if(!this)return new pi(e);var t,n,r,i,o,s,a,l,c,p=e&&e.proxy,u=ci,d=li,h=!1,f=!1,m=null,g=!1;function y(e){e instanceof Error||(e=ri(e)),m=e,u(e,d)}function v(e){o&&(e instanceof Error||(e=ri(e)),o(e,d))}this.on=function(e,c){if("function"!=typeof c)throw ri("required args <name, cb>");switch(e){case"openTag":n=c;break;case"text":t=c;break;case"closeTag":r=c;break;case"error":u=c;break;case"warn":o=c;break;case"cdata":i=c;break;case"attention":l=c;break;case"question":a=c;break;case"comment":s=c;break;default:throw ri("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw ri("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return n["http://www.w3.org/2001/XMLSchema-instance"]="xsi",f=!0,c=n,this},this.parse=function(e){if("string"!=typeof e)throw ri("required args <xml=string>");return m=null,function(e){var o,u,m,b,w,x,_,k,E,O,P,S=f?[]:null,C=f?function(e){var t,n,r={};for(t in e)r[n=e[t]]=n,r[ai(n)]=t;return r}(c):null,T=[],M=0,A=!1,D=!1,N=0,R=0,j="",I=0;function L(){if(null!==P)return P;var e,t,n,r,i,o,s,a,l,p,u,d=f&&C.xmlns,m=f&&h?[]:null,g=I,y=j,b=y.length,w={},x={};e:for(;g<b;g++)if(l=!1,!(32===(p=y.charCodeAt(g))||p<14&&p>8)){for((p<65||p>122||p>90&&p<97)&&95!==p&&58!==p&&(v("illegal first char attribute name"),l=!0),u=g+1;u<b;u++)if(!((p=y.charCodeAt(u))>96&&p<123||p>64&&p<91||p>47&&p<59||46===p||45===p||95===p)){if(32===p||p<14&&p>8){v("missing attribute value"),g=u;continue e}if(61===p)break;v("illegal attribute name char"),l=!0}if("xmlns:xmlns"===(a=y.substring(g,u))&&(v("illegal declaration of xmlns"),l=!0),34===(p=y.charCodeAt(u+1)))-1===(u=y.indexOf('"',g=u+2))&&-1!==(u=y.indexOf("'",g))&&(v("attribute value quote missmatch"),l=!0);else if(39===p)-1===(u=y.indexOf("'",g=u+2))&&-1!==(u=y.indexOf('"',g))&&(v("attribute value quote missmatch"),l=!0);else for(v("missing attribute value quotes"),l=!0,u+=1;u<b&&!(32===(p=y.charCodeAt(u+1))||p<14&&p>8);u++);for(-1===u&&(v("missing closing quotes"),u=b,l=!0),l||(o=y.substring(g,u)),g=u;u+1<b&&!(32===(p=y.charCodeAt(u+1))||p<14&&p>8);u++)g===u&&(v("illegal character after attribute end"),l=!0);if(g=u+1,!l)if(a in x)v("attribute <"+a+"> already defined");else if(x[a]=!0,f)if(h){if(null!==(i="xmlns"===a?"xmlns":120===a.charCodeAt(0)&&"xmlns:"===a.substr(0,6)?a.substr(6):null)){if(e=ei(o),t=ai(i),!(s=c[e])){if("xmlns"===i||t in C&&C[t]!==e)do{s="ns"+M++}while(void 0!==C[s]);else s=i;c[e]=s}C[i]!==s&&(r||(C=si(C),r=!0),C[i]=s,"xmlns"===i&&(C[ai(s)]=e,d=s),C[t]=e),w[a]=o;continue}m.push(a,o)}else-1!==(p=a.indexOf(":"))?(n=C[a.substring(0,p)])?((a=d===n?a.substr(p+1):n+a.substr(p))===ti&&(-1!==(p=o.indexOf(":"))?(n=o.substring(0,p),o=(n=C[n]||n)+o.substring(p)):o=d+":"+o),w[a]=o):v(ii(a.substring(0,p))):w[a]=o;else w[a]=o}if(h)for(g=0,b=m.length;g<b;g++){if(a=m[g++],o=m[g],-1!==(p=a.indexOf(":"))){if(!(n=C[a.substring(0,p)])){v(ii(a.substring(0,p)));continue}(a=d===n?a.substr(p+1):n+a.substr(p))===ti&&(-1!==(p=o.indexOf(":"))?(n=o.substring(0,p),o=(n=C[n]||n)+o.substring(p)):o=d+":"+o)}w[a]=o}return P=w}function z(){for(var t,n,r=/(\r\n|\r|\n)/g,i=0,o=0,s=0,a=R;N>=s&&(t=r.exec(e))&&!((a=t[0].length+t.index)>N);)i+=1,s=a;return-1==N?(o=a,n=e.substring(R)):0===R?n=e.substring(R,N):(o=N-s,n=-1==R?e.substring(N):e.substring(N,R+1)),{data:n,line:i,column:o}}d=z,p&&(O=Object.create({},{name:oi((function(){return k})),originalName:oi((function(){return E})),attrs:oi(L),ns:oi((function(){return C}))}));for(;-1!==R;){if(-1===(N=60===e.charCodeAt(R)?R:e.indexOf("<",R)))return T.length?y("unexpected end of file"):0===R?y("missing start tag"):void(R<e.length&&e.substring(R).trim()&&v(ni));if(R!==N)if(T.length){if(t&&(t(e.substring(R,N),ei,d),g))return}else if(e.substring(R,N).trim()&&(v(ni),g))return;if(33===(w=e.charCodeAt(N+1))){if(91===(b=e.charCodeAt(N+2))&&"CDATA["===e.substr(N+3,6)){if(-1===(R=e.indexOf("]]>",N)))return y("unclosed cdata");if(i&&(i(e.substring(N+9,R),d),g))return;R+=3;continue}if(45===b&&45===e.charCodeAt(N+3)){if(-1===(R=e.indexOf("--\x3e",N)))return y("unclosed comment");if(s&&(s(e.substring(N+4,R),ei,d),g))return;R+=3;continue}}if(63!==w){for(u=N+1;;u++){if(x=e.charCodeAt(u),isNaN(x))return R=-1,y("unclosed tag");if(34===x)u=-1!==(b=e.indexOf('"',u+1))?b:u;else if(39===x)u=-1!==(b=e.indexOf("'",u+1))?b:u;else if(62===x){R=u;break}}if(33!==w){if(P={},47===w){if(A=!1,D=!0,!T.length)return y("missing open tag");if(u=k=T.pop(),b=N+2+u.length,e.substring(N+2,b)!==u)return y("closing tag mismatch");for(;b<R;b++)if(!(32===(w=e.charCodeAt(b))||w>8&&w<14))return y("close tag")}else{if(47===e.charCodeAt(R-1)?(u=k=e.substring(N+1,R-1),A=!0,D=!0):(u=k=e.substring(N+1,R),A=!0,D=!1),!(w>96&&w<123||w>64&&w<91||95===w||58===w))return y("illegal first char nodeName");for(b=1,m=u.length;b<m;b++)if(!((w=u.charCodeAt(b))>96&&w<123||w>64&&w<91||w>47&&w<59||45===w||95===w||46==w)){if(32===w||w<14&&w>8){k=u.substring(0,b),P=null;break}return y("invalid nodeName")}D||T.push(k)}if(f){if(o=C,A&&(D||S.push(o),null===P&&(h=-1!==u.indexOf("xmlns",b))&&(I=b,j=u,L(),h=!1)),E=k,-1!==(w=k.indexOf(":"))){if(!(_=C[k.substring(0,w)]))return y("missing namespace on <"+E+">");k=k.substr(w+1)}else _=C.xmlns;_&&(k=_+":"+k)}if(A&&(I=b,j=u,n&&(p?n(O,ei,D,d):n(k,L,ei,D,d),g)))return;if(D){if(r&&(r(p?O:k,ei,A,d),g))return;f&&(C=A?o:S.pop())}R+=1}else{if(l&&(l(e.substring(N,R+1),ei,d),g))return;R+=1}}else{if(-1===(R=e.indexOf("?>",N)))return y("unclosed question");if(a&&(a(e.substring(N,R+2),d),g))return;R+=2}}}(e),d=li,g=!1,m},this.stop=function(){g=!0}}function ui(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var di={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},hi="xsi:type";function fi(e){return e.xml&&e.xml.serialize}function mi(e){return fi(e)===hi}function gi(e,t){return ui(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function yi(e){return new Error(e)}function vi(e){return e.$descriptor}function bi(e){L(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw yi("expected element");var t,n=this.elementsById,r=vi(e).idProperty;if(r&&(t=e.get(r.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw yi("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function wi(){}function xi(){}function _i(){}function ki(e,t){this.property=e,this.context=t}function Ei(e,t){this.element=t,this.propertyDesc=e}function Oi(){}function Pi(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function Si(e,t,n){Pi.call(this,e,t,n)}function Ci(e,t,n){this.model=e,this.context=n}function Ti(e){e instanceof Qr&&(e={model:e}),L(this,{lax:!1},e)}wi.prototype.handleEnd=function(){},wi.prototype.handleText=function(){},wi.prototype.handleNode=function(){},xi.prototype=Object.create(wi.prototype),xi.prototype.handleNode=function(){return this},_i.prototype=Object.create(wi.prototype),_i.prototype.handleText=function(e){this.body=(this.body||"")+e},ki.prototype=Object.create(_i.prototype),ki.prototype.handleNode=function(e){if(this.element)throw yi("expected no sub nodes");return this.element=this.createReference(e),this},ki.prototype.handleEnd=function(){this.element.id=this.body},ki.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},Ei.prototype=Object.create(_i.prototype),Ei.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=zr(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},Oi.prototype=Object.create(_i.prototype),Oi.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},Pi.prototype=Object.create(Oi.prototype),Pi.prototype.addReference=function(e){this.context.addReference(e)},Pi.prototype.handleText=function(e){if(!vi(this.element).bodyProperty)throw yi("unexpected body text <"+e+">");_i.prototype.handleText.call(this,e)},Pi.prototype.handleEnd=function(){var e=this.body,t=this.element,n=vi(t).bodyProperty;n&&void 0!==e&&(e=zr(n.type,e),t.set(n.name,e))},Pi.prototype.createElement=function(e){var t,n=e.attributes,r=this.type,i=vi(r),o=this.context,s=new r({}),a=this.model;return v(n,(function(e,n){var r=i.propertiesByName[n];r&&r.isReference?r.isMany?v(e.split(" "),(function(e){o.addReference({element:s,property:r.ns.name,id:e})})):o.addReference({element:s,property:r.ns.name,id:e}):(r?e=zr(r.type,e):"xmlns"!==n&&(t=qr(n,i.ns.prefix),a.getPackage(t.prefix)&&o.addWarning({message:"unknown attribute <"+n+">",element:s,property:n,value:e})),s.set(n,e))})),s},Pi.prototype.getPropertyForNode=function(e){var t,n,r=qr(e.name),i=this.type,o=this.model,s=vi(i),a=r.name,l=s.propertiesByName[a];if(l&&!l.isAttr)return mi(l)&&(t=e.attributes[hi])?(t=function(e,t){var n=qr(e);return function(e,t){var n=e.name,r=e.localName,i=t.xml&&t.xml.typePrefix;return i&&0===r.indexOf(i)?e.prefix+":"+r.slice(i.length):n}(n,t.getPackage(n.prefix))}(t,o),L({},l,{effectiveType:vi(n=o.getType(t)).name})):l;var c=o.getPackage(r.prefix);if(c){if(t=gi(r,c),n=o.getType(t),l=m(s.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})),l)return L({},l,{effectiveType:vi(n).name})}else if(l=m(s.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})),l)return l;throw yi("unrecognized element <"+r.name+">")},Pi.prototype.toString=function(){return"ElementDescriptor["+vi(this.type).name+"]"},Pi.prototype.valueHandler=function(e,t){return new Ei(e,t)},Pi.prototype.referenceHandler=function(e){return new ki(e,this.context)},Pi.prototype.handler=function(e){return"Element"===e?new Ci(this.model,e,this.context):new Pi(this.model,e,this.context)},Pi.prototype.handleChild=function(e){var t,n,r,i;if(t=this.getPropertyForNode(e),r=this.element,$r(n=t.effectiveType||t.type))return this.valueHandler(t,r);var o=(i=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==o&&(t.isMany?r.get(t.name).push(o):r.set(t.name,o),t.isReference?(L(o,{element:r}),this.context.addReference(o)):o.$parent=r),i},Si.prototype=Object.create(Pi.prototype),Si.prototype.createElement=function(e){var t=e.name,n=qr(t),r=this.model,i=this.type,o=r.getPackage(n.prefix),s=o&&gi(n,o)||t;if(!i.hasType(s))throw yi("unexpected element <"+e.originalName+">");return Pi.prototype.createElement.call(this,e)},Ci.prototype=Object.create(Oi.prototype),Ci.prototype.createElement=function(e){var t=e.name,n=qr(t).prefix,r=e.ns[n+"$uri"],i=e.attributes;return this.model.createAny(t,r,i)},Ci.prototype.handleChild=function(e){var t=new Ci(this.model,"Element",this.context).handleNode(e),n=this.element,r=t.element;return void 0!==r&&((n.$children=n.$children||[]).push(r),r.$parent=n),t},Ci.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},Ti.prototype.fromXML=function(e,t,n){var r=t.rootHandler;t instanceof Pi?(r=t,t={}):"string"==typeof t?(r=this.handler(t),t={}):"string"==typeof r&&(r=this.handler(r));var i=this.model,o=this.lax,s=new bi(L({},t,{rootHandler:r})),a=new pi({proxy:!0}),l=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function c(e,t,n){var r=t(),i=r.line,o=r.column,a=r.data;"<"===a.charAt(0)&&-1!==a.indexOf(" ")&&(a=a.slice(0,a.indexOf(" "))+">");var l="unparsable content "+(a?a+" ":"")+"detected\n\tline: "+i+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return s.addWarning({message:l,error:e}),!0;throw yi(l)}function p(e,t){return c(e,t,!0)}r.context=s,l.push(r);var u=/^<\?xml /i,d=/ encoding="([^"]+)"/i,h=/^utf-8$/i;function f(e,t){try{l.peek().handleText(e)}catch(e){p(e,t)}}var m=i.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),{"http://www.w3.org/XML/1998/namespace":"xml"});return a.ns(m).on("openTag",(function(e,t,n,r){var i=e.attrs||{},s=Object.keys(i).reduce((function(e,n){var r=t(i[n]);return e[n]=r,e}),{});!function(e,t){var n=l.peek();try{l.push(n.handleNode(e))}catch(e){c(e,t,o)&&l.push(new xi)}}({name:e.name,originalName:e.originalName,attributes:s,ns:e.ns},r)})).on("question",(function(e){if(u.test(e)){var t=d.exec(e),n=t&&t[1];n&&!h.test(n)&&s.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}})).on("closeTag",(function(){l.pop().handleEnd()})).on("cdata",f).on("text",(function(e,t,n){!function(e,t){e.trim()&&f(e,t)}(t(e),n)})).on("error",c).on("warn",p),new Promise((function(t,n){var i;try{a.parse(e),function(){var e,t,n=s.elementsById,r=s.references;for(e=0;t=r[e];e++){var i=t.element,o=n[t.id],a=vi(i).propertiesByName[t.property];if(o||s.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),a.isMany){var l=i.get(a.name),c=l.indexOf(t);-1===c&&(c=l.length),o?l[c]=o:l.splice(c,1)}else i.set(a.name,o)}}()}catch(e){i=e}var o=r.element;i||o||(i=yi("failed to parse document as <"+r.type.$descriptor.name+">"));var l=s.warnings,c=s.references,p=s.elementsById;return i?(i.warnings=l,n(i)):t({rootElement:o,elementsById:p,references:c,warnings:l})}))},Ti.prototype.handler=function(e){return new Si(this.model,e)};var Mi=/<|>|'|"|&|\n\r|\n/g,Ai=/<|>|&/g;function Di(e){var t={},n={},r={},i=[],o=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?i.push(e):o.push(e),this.mapPrefix(e.prefix,e.uri)},this.uriByPrefix=function(e){return t[e||"xmlns"]},this.mapPrefix=function(e,n){t[e||"xmlns"]=n},this.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},this.logUsed=function(t){var n=t.uri,i=this.getNSKey(t);r[i]=this.byUri(n),e&&e.logUsed(t)},this.getUsed=function(e){var t=this;return[].concat(i,o).filter((function(e){var n=t.getNSKey(e);return r[n]}))}}function Ni(e,t){return ui(t)?function(e){return e.charAt(0).toLowerCase()+e.slice(1)}(e):e}function Ri(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function ji(e){return h(e)?e:(e.prefix?e.prefix+":":"")+e.localName}var Ii={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Li={"<":"lt",">":"gt","&":"amp"};function zi(e,t,n){return(e=h(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function Bi(e){this.tagName=e}function $i(){}function qi(e){this.tagName=e}function Fi(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function Vi(e,t){Fi.call(this,e,t)}function Hi(){this.value="",this.write=function(e){this.value+=e}}function Ui(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function Wi(e){return e=L({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var r=n||new Hi,i=new Ui(r,e.format);if(e.preamble&&i.append('<?xml version="1.0" encoding="UTF-8"?>\n'),(new Fi).build(t).serializeTo(i),!n)return r.value}}}function Gi(e,t){Qr.call(this,e,t)}Bi.prototype.build=function(e){return this.element=e,this},Bi.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},$i.prototype.serializeValue=$i.prototype.serializeTo=function(e){e.append(this.escape?zi(this.value,Ai,Li):this.value)},$i.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(Ai)&&(this.escape=!0),this},Ri(qi,$i),qi.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},Fi.prototype.build=function(e){this.element=e;var t,n,r=e.$descriptor,i=this.propertyDescriptor,o=r.isGeneric;return t=o?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=i?this.nsPropertyTagName(i):this.nsTagName(r),this.tagName=this.addTagName(this.ns),o||(n=function(e){return y(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!f(e,n))return!1;var r=e[n];return r!==t.default&&null!==r&&(!t.isMany||r.length)}))}(e),this.parseAttributes(y(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return y(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},Fi.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?L({localName:t.ns.localName},e):L({localName:Ni(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},Fi.prototype.nsPropertyTagName=function(e){return function(e,t){return L({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},Fi.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},Fi.prototype.nsAttributeName=function(e){var t;if(t=h(e)?qr(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:L({localName:t.localName},n)},Fi.prototype.parseGeneric=function(e){var t=this,n=this.body,r=[];return v(e,(function(i,o){"$body"===o?n.push((new $i).build({type:"String"},i)):"$children"===o?v(i,(function(e){n.push(new Fi(t).build(e))})):0!==o.indexOf("$")&&t.parseNsAttribute(e,o,i)&&r.push({name:o,value:i})})),r},Fi.prototype.parseNsAttribute=function(e,t,n){var r,i=e.$model,o=qr(t);if("xmlns"===o.prefix&&(r={prefix:o.localName,uri:n}),o.prefix||"xmlns"!==o.localName||(r={uri:n}),!r)return{name:t,value:n};if(i&&i.getPackage(n))this.logNamespace(r,!0,!0);else{var s=this.logNamespaceUsed(r,!0);this.getNamespaces().logUsed(s)}},Fi.prototype.parseNsAttributes=function(e,t){var n=this,r=e.$attrs,i=[];return v(r,(function(t,r){var o=n.parseNsAttribute(e,r,t);o&&i.push(o)})),i},Fi.prototype.parseGenericAttributes=function(e,t){var n=this;v(t,(function(t){if(t.name!==hi)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,n)}}))},Fi.prototype.parseContainments=function(e){var t=this,n=this.body,r=this.element;v(e,(function(e){var i=r.get(e.name),o=e.isReference;if(e.isMany||(i=[i]),e.isBody)n.push((new $i).build(e,i[0]));else if($r(e.type))v(i,(function(r){n.push(new qi(t.addTagName(t.nsPropertyTagName(e))).build(e,r))}));else if(o)v(i,(function(r){n.push(new Bi(t.addTagName(t.nsPropertyTagName(e))).build(r))}));else{var s=mi(e),a=function(e){return"property"===fi(e)}(e);v(i,(function(r){var i;i=s?new Vi(t,e):a?new Fi(t,e):new Fi(t),n.push(i.build(r))}))}}))},Fi.prototype.getNamespaces=function(e){var t,n=this.namespaces,r=this.parent;return n||(t=r&&r.getNamespaces(),e||!t?this.namespaces=n=new Di(t):n=t),n},Fi.prototype.logNamespace=function(e,t,n){var r=this.getNamespaces(n),i=e.uri,o=e.prefix;return r.byUri(i)&&!n||r.add(e,t),r.mapPrefix(o,i),e},Fi.prototype.logNamespaceUsed=function(e,t){var n,r,i,o=this.element.$model,s=this.getNamespaces(t),a=e.prefix,l=e.uri;if(!a&&!l)return{localName:e.localName};if(i=di[a]||o&&(o.getPackage(a)||{}).uri,!(l=l||i||s.uriByPrefix(a)))throw new Error("no namespace uri given for prefix <"+a+">");if(!(e=s.byUri(l))){for(n=a,r=1;s.uriByPrefix(n);)n=a+"_"+r++;e=this.logNamespace({prefix:n,uri:l},i===l)}return a&&s.mapPrefix(a,l),e},Fi.prototype.parseAttributes=function(e){var t=this,n=this.element;v(e,(function(e){var r=n.get(e.name);if(e.isReference)if(e.isMany){var i=[];v(r,(function(e){i.push(e.id)})),r=i.join(" ")}else r=r.id;t.addAttribute(t.nsAttributeName(e),r)}))},Fi.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),ji(e)},Fi.prototype.addAttribute=function(e,t){var n=this.attrs;h(t)&&(t=zi(t,Mi,Ii));var r=g(n,(function(t){return t.name.localName===e.localName&&t.name.uri===e.uri&&t.name.prefix===e.prefix})),i={name:e,value:t};-1!==r?n.splice(r,1,i):n.push(i)},Fi.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=function(e){return e.getUsed().filter((function(e){return"xml"!==e.prefix})).map((function(e){return{name:"xmlns"+(e.prefix?":"+e.prefix:""),value:e.uri}}))}(n).concat(t)),v(t,(function(t){e.append(" ").append(ji(t.name)).append('="').append(t.value).append('"')}))},Fi.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==$i;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),v(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},Ri(Vi,Fi),Vi.prototype.parseNsAttributes=function(e){var t=Fi.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var r=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var i=e.$model.getPackage(r.uri),o=i.xml&&i.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(hi),(r.prefix?r.prefix+":":"")+o+n.ns.localName),t},Vi.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},Gi.prototype=Object.create(Qr.prototype),Gi.prototype.fromXML=function(e,t,n){h(t)||(n=t,t="bpmn:Definitions");var r=new Ti(L({model:this,lax:!0},n)),i=r.handler(t);return r.fromXML(e,i)},Gi.prototype.toXML=function(e,t){var n=new Wi(t);return new Promise((function(t,r){try{return t({xml:n.toXML(e)})}catch(e){return r(e)}}))};var Qi={bpmn:{name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",prefix:"bpmn",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],enumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],xml:{tagAlias:"lowerCase",typePrefix:"t"}},bpmndi:{name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",prefix:"bpmndi",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],enumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[]},dc:{name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",prefix:"dc",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],associations:[]},di:{name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",prefix:"di",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],associations:[],xml:{tagAlias:"lowerCase"}},bioc:{name:"bpmn.io colors for BPMN",uri:"http://bpmn.io/schema/bpmn/biocolor/1.0",prefix:"bioc",types:[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]},color:{name:"BPMN in Color",uri:"http://www.omg.org/spec/BPMN/non-normative/color/1.0",prefix:"color",types:[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]}};function Xi(e,t){return new Gi(L({},Qi,e),t)}function Zi(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}var Yi="Tried to access di from the businessObject. The di is available through the diagram element only. For more information, see https://github.com/bpmn-io/bpmn-js/issues/1472";function Ki(e){f(e,"di")||Object.defineProperty(e,"di",{enumerable:!1,get:function(){throw new Error(Yi)}})}function Ji(e,t){return e.$instanceOf(t)}function eo(e){var t={},n=[],r={};function i(e,t){return function(n){e(n,t)}}function o(e){t[e.id]=e}function s(t,n){try{var i=r[t.id]&&function(t,n){if(t.gfx)throw new Error(`already rendered ${Zi(t)}`);return e.element(t,r[t.id],n)}(t,n);return o(t),i}catch(e){a(e.message,{element:t,error:e}),console.error(`failed to import ${Zi(t)}`,e)}}function a(t,n){e.error(t,n)}var l=this.registerDi=function(e){var t=e.bpmnElement;t?r[t.id]?a(`multiple DI elements defined for ${Zi(t)}`,{element:t}):(r[t.id]=e,Ki(t)):a(`no bpmnElement referenced in ${Zi(e)}`,{element:e})};function c(e){var t;t=e.plane,l(t),v(t.planeElement,p)}function p(e){l(e)}this.handleDefinitions=function(o,s){var p=o.diagrams;if(s&&-1===p.indexOf(s))throw new Error("diagram not part of <bpmn:Definitions />");if(!s&&p&&p.length&&(s=p[0]),!s)throw new Error("no diagram to display");r={},c(s);var f=s.plane;if(!f)throw new Error(`no plane for ${Zi(s)}`);var g=f.bpmnElement;if(!g){if(g=function(e){return m(e.rootElements,(function(e){return Ji(e,"bpmn:Process")||Ji(e,"bpmn:Collaboration")}))}(o),!g)throw new Error("no process or collaboration to display");a(`correcting missing bpmnElement on ${Zi(f)} to ${Zi(g)}`),f.bpmnElement=g,l(f)}var b,w,_=function(t,n){return e.root(t,r[t.id],n)}(g,f);if(Ji(g,"bpmn:Process")||Ji(g,"bpmn:SubProcess"))d(g,_);else{if(!Ji(g,"bpmn:Collaboration"))throw new Error(`unsupported bpmnElement for ${Zi(f)}: ${Zi(g)}`);w=_,v((b=g).participants,i(T,w)),x(b.artifacts,w),n.push((function(){!function(e,t){v(e,i(h,t))}(b.messageFlows,w)})),function(e,n){var r=y(e,(function(e){return!t[e.id]&&Ji(e,"bpmn:Process")&&e.laneSets}));r.forEach(i(d,n))}(o.rootElements,_)}u(n)};var u=this.handleDeferred=function(){for(;n.length;)n.shift()()};function d(e,t){C(e,t),_(e.ioSpecification,t),x(e.artifacts,t),o(e)}function h(e,t){s(e,t)}function f(e,t){s(e,t)}function g(e,t){s(e,t)}function b(e,t){s(e,t)}function w(e,t){s(e,t)}function x(e,t){v(e,(function(e){Ji(e,"bpmn:Association")?n.push((function(){w(e,t)})):w(e,t)}))}function _(e,t){e&&(v(e.dataInputs,i(g,t)),v(e.dataOutputs,i(b,t)))}var k=this.handleSubProcess=function(e,t){C(e,t),x(e.artifacts,t)};function E(e,t){var r=s(e,t);Ji(e,"bpmn:SubProcess")&&k(e,r||t),Ji(e,"bpmn:Activity")&&_(e.ioSpecification,t),n.push((function(){v(e.dataInputAssociations,i(f,t)),v(e.dataOutputAssociations,i(f,t))}))}function O(e,t){s(e,t)}function P(e,t){n.push((function(){var n=s(e,t);e.childLaneSet&&S(e.childLaneSet,n||t),function(e){v(e.flowNodeRef,(function(t){var n=t.get("lanes");n&&n.push(e)}))}(e)}))}function S(e,t){v(e.lanes,i(P,t))}function C(e,t){!function(e,t){v(e,(function(e){Ji(e,"bpmn:SequenceFlow")?n.push((function(){!function(e,t){s(e,t)}(e,t)})):Ji(e,"bpmn:BoundaryEvent")?n.unshift((function(){E(e,t)})):Ji(e,"bpmn:FlowNode")?E(e,t):Ji(e,"bpmn:DataObject")||(Ji(e,"bpmn:DataStoreReference")||Ji(e,"bpmn:DataObjectReference")?O(e,t):a(`unrecognized flowElement ${Zi(e)} in context ${Zi(t&&t.businessObject)}`,{element:e,context:t}))}))}(e.flowElements,t),e.laneSets&&function(e,t){v(e,i(S,t))}(e.laneSets,t)}function T(e,t){var n=s(e,t),r=e.processRef;r&&d(r,n||t)}}function to(e,t){var n=ro(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function no(e,t){return _(t,(function(t){return to(e,t)}))}function ro(e){return e&&e.businessObject||e}function io(e){return e&&e.di}function oo(e,t,n){var r,i,o,s=[];function a(e,t){var n=new eo({root:function(e,t){return r.add(e,t)},element:function(e,t,n){return r.add(e,t,n)},error:function(e,t){s.push({message:e,context:t})}});t=t||e.diagrams&&e.diagrams[0];var i=function(e,t){if(!t)return;var n,r=t.plane.bpmnElement,i=r;to(r,"bpmn:Process")||to(r,"bpmn:Collaboration")||(i=function(e){var t=e;for(;t;){if(to(t,"bpmn:Process"))return t;t=t.$parent}}(r));n=to(i,"bpmn:Collaboration")?i:m(e.rootElements,(function(e){if(to(e,"bpmn:Collaboration"))return m(e.participants,(function(e){return e.processRef===i}))}));var o=[i];n&&(o=k(n.participants,(function(e){return e.processRef}))).push(n);var s=so(o),a=[t],l=[r];return v(e.diagrams,(function(e){var t=e.plane.bpmnElement;-1!==s.indexOf(t)&&-1===l.indexOf(t)&&(a.push(e),l.push(t))})),a}(e,t);if(!i)throw new Error("no diagram to display");v(i,(function(t){n.handleDefinitions(e,t)}));var a=t.plane.bpmnElement.id;o.setRootElement(o.findRoot(a+"_plane")||o.findRoot(a))}return new Promise((function(l,c){try{return r=e.get("bpmnImporter"),i=e.get("eventBus"),o=e.get("canvas"),i.fire("import.render.start",{definitions:t}),a(t,n),i.fire("import.render.complete",{error:undefined,warnings:s}),l({warnings:s})}catch(e){return e.warnings=s,c(e)}}))}function so(e){var t=[];return v(e,(function(e){e&&(t.push(e),t=t.concat(so(e.flowElements)))})),t}var ao,lo='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>',co={verticalAlign:"middle"},po={color:"#404040"},uo={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},ho={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},fo={position:"absolute",left:"50%",top:"40%",transform:"translate(-50%)",width:"260px",padding:"10px",background:"white",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"14px",display:"flex",lineHeight:"1.3"},mo='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+lo+'</a><span>Web-based tooling for BPMN, DMN and forms powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>';function go(){ao||(X(ao=fe(mo),uo),X(me("svg",ao),co),X(me(".backdrop",ao),ho),X(me(".notice",ao),fo),X(me(".link",ao),po,{margin:"15px 20px 15px 10px",alignSelf:"center"}),pe.bind(ao,".backdrop","click",(function(e){document.body.removeChild(ao)}))),document.body.appendChild(ao)}function yo(e){e=L({},bo,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),function(e){const t=fe('<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+lo+"</a>");X(me("svg",t),co),X(t,po,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(t),ae.bind(t,"click",(function(e){go(),e.preventDefault()}))}(this._container),this._init(this._container,this._moddle,e)}function vo(e,t){return e.warnings=t,e}e(yo,Nr),yo.prototype.importXML=async function(e,t){const n=this;let r=[];try{let o;e=this._emit("import.parse.start",{xml:e})||e;try{o=await this._moddle.fromXML(e,"bpmn:Definitions")}catch(e){throw this._emit("import.parse.complete",{error:e}),e}let s=o.rootElement;const a=o.references,l=o.warnings,c=o.elementsById;r=r.concat(l),s=this._emit("import.parse.complete",(i={error:null,definitions:s,elementsById:c,references:a,warnings:r},n.get("eventBus").createEvent(i)))||s;const p=await this.importDefinitions(s,t);return r=r.concat(p.warnings),this._emit("import.done",{error:null,warnings:r}),{warnings:r}}catch(e){let t=e;throw r=r.concat(t.warnings||[]),vo(t,r),t=function(e){const t=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);t&&(e.message="unparsable content <"+t[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+t[2]);return e}(t),this._emit("import.done",{error:t,warnings:t.warnings}),t}var i},yo.prototype.importDefinitions=async function(e,t){this._setDefinitions(e);return{warnings:(await this.open(t)).warnings}},yo.prototype.open=async function(e){const t=this._definitions;let n=e;if(!t){const e=new Error("no XML imported");throw vo(e,[]),e}if("string"==typeof e&&(n=function(e,t){if(!t)return null;return m(e.diagrams,(function(e){return e.id===t}))||null}(t,e),!n)){const t=new Error("BPMNDiagram <"+e+"> not found");throw vo(t,[]),t}try{this.clear()}catch(e){throw vo(e,[]),e}const{warnings:r}=await oo(this,t,n);return{warnings:r}},yo.prototype.saveXML=async function(e){e=e||{};let t,n,r=this._definitions;try{if(!r)throw new Error("no definitions loaded");r=this._emit("saveXML.start",{definitions:r})||r;n=(await this._moddle.toXML(r,e)).xml,n=this._emit("saveXML.serialized",{xml:n})||n}catch(e){t=e}const i=t?{error:t}:{xml:n};if(this._emit("saveXML.done",i),t)throw t;return i},yo.prototype.saveSVG=async function(){let e,t;this._emit("saveSVG.start");try{const t=this.get("canvas"),n=t.getActiveLayer(),r=me("defs",t._svg),i=Fe(n),o=r?"<defs>"+Fe(r)+"</defs>":"",s=n.getBBox();e='<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- created with bpmn-js / http://bpmn.io --\x3e\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+s.width+'" height="'+s.height+'" viewBox="'+s.x+" "+s.y+" "+s.width+" "+s.height+'" version="1.1">'+o+i+"</svg>"}catch(e){t=e}if(this._emit("saveSVG.done",{error:t,svg:e}),t)throw t;return{svg:e}},yo.prototype._setDefinitions=function(e){this._definitions=e},yo.prototype.getModules=function(){return this._modules},yo.prototype.clear=function(){this.getDefinitions()&&Nr.prototype.clear.call(this)},yo.prototype.destroy=function(){var e;Nr.prototype.destroy.call(this),(e=this._container).parentNode&&e.parentNode.removeChild(e)},yo.prototype.on=function(e,t,n,r){return this.get("eventBus").on(e,t,n,r)},yo.prototype.off=function(e,t){this.get("eventBus").off(e,t)},yo.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),"string"==typeof e&&(e=me(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},yo.prototype.getDefinitions=function(){return this._definitions},yo.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},yo.prototype._init=function(e,t,n){const r=n.modules||this.getModules(n),i=n.additionalModules||[],o=[].concat([{bpmnjs:["value",this],moddle:["value",t]}],r,i),s=L(q(n,["additionalModules"]),{canvas:L({},n.canvas,{container:e}),modules:o});Nr.call(this,s),n&&n.container&&this.attachTo(n.container)},yo.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},yo.prototype._createContainer=function(e){const t=fe('<div class="bjs-container"></div>');return X(t,{width:wo(e.width),height:wo(e.height),position:e.position}),t},yo.prototype._createModdle=function(e){return new Xi(L({},this._moddleExtensions,e.moddleExtensions))},yo.prototype._modules=[];const bo={width:"100%",height:"100%",position:"relative"};function wo(e){return e+(u(e)?"px":"")}function xo(e){yo.call(this,e),this.on("import.parse.complete",(function(e){e.error||this._collectIds(e.definitions,e.elementsById)}),this),this.on("diagram.destroy",(function(){this.get("moddle").ids.clear()}),this)}function _o(e,t){return!to(e,"bpmn:CallActivity")&&(to(e,"bpmn:SubProcess")?!(!(t=t||io(e))||!to(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded:!to(e,"bpmn:Participant")||!!ro(e).processRef)}function ko(e){if(to(e,"bpmn:Participant")||to(e,"bpmn:Lane")){var t=io(e).isHorizontal;return void 0===t||t}}function Eo(e){return e&&!1!==ro(e).isInterrupting}function Oo(e){return e&&!!ro(e).triggeredByEvent}function Po(e,t){return _(ro(e).eventDefinitions,(function(e){return to(e,t)}))}e(xo,yo),xo.prototype._createModdle=function(e){var t=yo.prototype._createModdle.call(this,e);return t.ids=new n([32,36,1]),t},xo.prototype._collectIds=function(e,t){var n,r=e.$model.ids;for(n in r.clear(),t)r.claim(n,t[n])};var So={width:90,height:20},Co=15;function To(e){return to(e,"bpmn:Event")||to(e,"bpmn:Gateway")||to(e,"bpmn:DataStoreReference")||to(e,"bpmn:DataObjectReference")||to(e,"bpmn:DataInput")||to(e,"bpmn:DataOutput")||to(e,"bpmn:SequenceFlow")||to(e,"bpmn:MessageFlow")||to(e,"bpmn:Group")}function Mo(e){return Hn(e.label)}function Ao(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=function(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}}(e),o=Math.atan((r.y-n.y)/(r.x-n.x)),s=i.x,a=i.y;return Math.abs(o)<Math.PI/2?a-=Co:s+=Co,{x:s,y:a}}function Do(e){return e.waypoints?Ao(e.waypoints):to(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+So.height/2}:{x:e.x+e.width/2,y:e.y+e.height+So.height/2}}function No(e){return to(e,"bpmn:FlowElement")||to(e,"bpmn:Participant")||to(e,"bpmn:Lane")||to(e,"bpmn:SequenceFlow")||to(e,"bpmn:MessageFlow")||to(e,"bpmn:DataInput")||to(e,"bpmn:DataOutput")?"name":to(e,"bpmn:TextAnnotation")?"text":to(e,"bpmn:Group")?"categoryValueRef":void 0}function Ro(e){var t=e.businessObject,n=No(t);if(n)return"categoryValueRef"===n?function(e){var t=e.categoryValueRef;return t&&t.value||""}(t):t[n]||""}function jo(e,t){var n=e.businessObject,r=No(n);return r&&("categoryValueRef"===r?n.categoryValueRef.value=t:n[r]=t),e}var Io="hsl(225, 10%, 15%)",Lo="white";function zo(e,t){return _(e.eventDefinitions,(function(e){return e.$type===t}))}function Bo(e,t,n){var r=io(e);return n||r.get("color:background-color")||r.get("bioc:fill")||t||Lo}function $o(e,t,n){var r=io(e);return n||r.get("color:border-color")||r.get("bioc:stroke")||t||Io}function qo(e,t,n,r){var i=io(e).get("label");return r||i&&i.get("color:color")||t||$o(e,n)}function Fo(e,t={}){return{width:Vo(e,t),height:Ho(e,t)}}function Vo(e,t={}){return f(t,"width")?t.width:e.width}function Ho(e,t={}){return f(t,"height")?t.height:e.height}var Uo=new n,Wo=.95;function Go(e,t,n,r,i,o,s){nt.call(this,t,s);var a=e&&e.defaultFillColor,l=e&&e.defaultStrokeColor,c=e&&e.defaultLabelColor,u=Uo.next(),d={};function h(e){return n.computeStyle(e,{strokeLinecap:"round",strokeLinejoin:"round",stroke:Io,strokeWidth:2,fill:"white"})}function f(e){return n.computeStyle(e,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:Io,strokeWidth:2})}function m(e,t){var{ref:n={x:0,y:0},scale:r=1,element:o}=t,s=Ae("marker",{id:e,viewBox:"0 0 20 20",refX:n.x,refY:n.y,markerWidth:20*r,markerHeight:20*r,orient:"auto"});ye(s,o);var a=me("defs",i._svg);a||(a=Ae("defs"),ye(i._svg,a)),ye(a,s),d[e]=s}function g(e){return e.replace(/[^0-9a-zA-Z]+/g,"_")}function y(e,t,n){var r=e+"-"+g(t)+"-"+g(n)+"-"+u;return d[r]||function(e,t,n,r){if("sequenceflow-end"===t){m(e,{element:Ae("path",{d:"M 1 5 L 11 10 L 1 15 Z",...h({fill:r,stroke:r,strokeWidth:1})}),ref:{x:11,y:10},scale:.5})}if("messageflow-start"===t){m(e,{element:Ae("circle",{cx:6,cy:6,r:3.5,...h({fill:n,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:6,y:6}})}if("messageflow-end"===t){m(e,{element:Ae("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...h({fill:n,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:8.5,y:5}})}if("association-start"===t){m(e,{element:Ae("path",{d:"M 11 5 L 1 10 L 11 15",...f({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:1,y:10},scale:.5})}if("association-end"===t){m(e,{element:Ae("path",{d:"M 1 5 L 11 10 L 1 15",...f({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:11,y:10},scale:.5})}if("conditional-flow-marker"===t){m(e,{element:Ae("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...h({fill:n,stroke:r})}),ref:{x:-1,y:10},scale:.5})}if("conditional-default-flow-marker"===t){m(e,{element:Ae("path",{d:"M 6 4 L 10 16",...h({stroke:r})}),ref:{x:0,y:10},scale:.5})}}(r,e,t,n),"url(#"+r+")"}function b(e,t,n,r,i={}){p(r)&&(i=r,r=0),r=r||0,i=h(i);var o=Ae("circle",{cx:t/2,cy:n/2,r:Math.round((t+n)/4-r),...i});return ye(e,o),o}function w(e,t,n,r,i,o){p(i)&&(o=i,i=0),i=i||0,o=h(o);var s=Ae("rect",{x:i,y:i,width:t-2*i,height:n-2*i,rx:r,ry:r,...o});return ye(e,s),s}function x(e,t,n,r){var i=lt(t,n=f(n),r);return ye(e,i),i}function _(e,t,n){return x(e,t,n,5)}function k(e,t,n){n=f(n);var r=Ae("path",{...n,d:t});return ye(e,r),r}function E(e,t,n,r){return k(t,n,L({"data-marker":e},r))}function O(e){return te[e]}function P(e){return function(t,n,r){return O(e)(t,n,r)}}var S=function(e,t,n={},i){return k(e,r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),{fill:i?$o(t,l,n.stroke):Bo(t,a,n.fill),stroke:i?Bo(t,a,n.fill):$o(t,l,n.stroke),strokeWidth:1})},C=function(e,t,n={}){var i=b(e,t.width,t.height,.2*t.height,{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:2});k(e,r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),{stroke:$o(t,l,n.stroke),strokeWidth:2});for(var o=0;o<12;o++){var s=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),c=t.width/2,p=t.height/2;k(e,s,{strokeWidth:1,stroke:$o(t,l,n.stroke),transform:"rotate("+30*o+","+p+","+c+")"})}return i},T=function(e,t,n={},i){return k(e,r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{fill:i?$o(t,l,n.stroke):Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1})},M=function(e,t,n={}){return k(e,r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1})},A=function(e,t,n={},i){return k(e,r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{fill:i?$o(t,l,n.stroke):Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1})},D=function(e,t,n={},i){return k(e,r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),{fill:i?$o(t,l,n.stroke):Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1})},N=function(e,t,n={},i){var o=k(e,r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{fill:i?$o(t,l,n.stroke):"none",stroke:$o(t,l,n.stroke),strokeWidth:1});return Cr(o,45),o},R=function(e,t,n={},i){return k(e,r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.22,my:.5}}),{fill:i?$o(t,l,n.stroke):Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1})},j=function(e,t,n={},i){return k(e,r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:i?$o(t,l,n.stroke):Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)})},I=function(e,t,n={},i){return k(e,r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),{fill:i?$o(t,l,n.stroke):Bo(t,a,n.fill),strokeWidth:1})},z=function(e,t,n={}){return k(e,r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1})},B=function(e,t,n={}){return b(e,t.width,t.height,8,{fill:$o(t,l,n.stroke),stroke:$o(t,l,n.stroke),strokeWidth:4})};function $(e,t,n={}){var r=ro(e),i=function(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}(r);return r.get("eventDefinitions")&&r.get("eventDefinitions").length>1?r.get("parallelMultiple")?z(t,e,n,i):I(t,e,n,i):zo(r,"bpmn:MessageEventDefinition")?S(t,e,n,i):zo(r,"bpmn:TimerEventDefinition")?C(t,e,n,i):zo(r,"bpmn:ConditionalEventDefinition")?M(t,e,n,i):zo(r,"bpmn:SignalEventDefinition")?j(t,e,n,i):zo(r,"bpmn:EscalationEventDefinition")?T(t,e,n,i):zo(r,"bpmn:LinkEventDefinition")?A(t,e,n,i):zo(r,"bpmn:ErrorEventDefinition")?D(t,e,n,i):zo(r,"bpmn:CancelEventDefinition")?N(t,e,n,i):zo(r,"bpmn:CompensateEventDefinition")?R(t,e,n,i):zo(r,"bpmn:TerminateEventDefinition")?B(t,e,n,i):null}var q={ParticipantMultiplicityMarker:function(e,t,n={}){var i=Vo(t,n),o=Ho(t,n);E("participant-multiplicity",e,r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:i,containerHeight:o,position:{mx:(i/2-6)/i,my:(o-15)/o}}),{strokeWidth:2,fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)})},SubProcessMarker:function(e,t,n={}){Sr(w(e,14,14,0,{strokeWidth:1,fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)}),t.width/2-7.5,t.height-20),E("sub-process",e,r.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2-7.5)/t.width,my:(t.height-20)/t.height}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)})},ParallelMarker:function(e,t,n){var i=Vo(t,n),o=Ho(t,n);E("parallel",e,r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:i,containerHeight:o,position:{mx:(i/2+n.parallel)/i,my:(o-20)/o}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)})},SequentialMarker:function(e,t,n){E("sequential",e,r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.seq)/t.width,my:(t.height-19)/t.height}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)})},CompensationMarker:function(e,t,n){E("compensation",e,r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.compensation)/t.width,my:(t.height-13)/t.height}}),{strokeWidth:1,fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)})},LoopMarker:function(e,t,n){var i=Vo(t,n),o=Ho(t,n);E("loop",e,r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:i,containerHeight:o,position:{mx:(i/2+n.loop)/i,my:(o-7)/o}}),{strokeWidth:1.5,fill:"none",stroke:$o(t,l,n.stroke),strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){var i=Vo(t,n),o=Ho(t,n);E("adhoc",e,r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:i,containerHeight:o,position:{mx:(i/2+n.adhoc)/i,my:(o-15)/o}}),{strokeWidth:1,fill:$o(t,l,n.stroke),stroke:$o(t,l,n.stroke)})}};function F(e,t,n,r){q[e](t,n,r)}function V(e,t,n,r={}){r={fill:r.fill,stroke:r.stroke,width:Vo(t,r),height:Ho(t,r)};var i=ro(t),o=n&&n.includes("SubProcessMarker");r=o?{...r,seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{...r,seq:-5,parallel:-6,compensation:-27,loop:0,adhoc:10},v(n,(function(n){F(n,e,t,r)})),i.get("isForCompensation")&&F("CompensationMarker",e,t,r),to(i,"bpmn:AdHocSubProcess")&&F("AdhocMarker",e,t,r);var s=i.get("loopCharacteristics"),a=s&&s.get("isSequential");s&&(void 0===a&&F("LoopMarker",e,t,r),!1===a&&F("ParallelMarker",e,t,r),!0===a&&F("SequentialMarker",e,t,r))}function H(e,t,n={}){n=L({size:{width:100}},n);var r=o.createText(t||"",n);return ke(r).add("djs-label"),ye(e,r),r}function U(e,t,n,r={}){var i=ro(t),o=Fo({x:t.x,y:t.y,width:t.width,height:t.height},r);return H(e,i.name,{align:n,box:o,padding:7,style:{fill:qo(t,c,l,r.stroke)}})}function W(e,t,n,r={}){var i=ko(n),o=H(e,t,{box:{height:30,width:i?Ho(n,r):Vo(n,r)},align:"center-middle",style:{fill:qo(n,c,l,r.stroke)}});i&&Pr(o,0,-(-1*Ho(n,r)),270)}function G(e,t,n={}){var{width:r,height:i}=Fo(t,n);return w(e,r,i,10,{...n,fill:Bo(t,a,n.fill),fillOpacity:Wo,stroke:$o(t,l,n.stroke)})}function Q(e,t,n={}){var r=ro(t),i=Bo(t,a,n.fill),o=$o(t,l,n.stroke);return"One"!==r.get("associationDirection")&&"Both"!==r.get("associationDirection")||(n.markerEnd=y("association-end",i,o)),"Both"===r.get("associationDirection")&&(n.markerStart=y("association-start",i,o)),n=Qo(n,["markerStart","markerEnd"]),_(e,t.waypoints,{...n,stroke:o,strokeDasharray:"0, 5"})}function X(e,t,n={}){var i=Bo(t,a,n.fill),o=$o(t,l,n.stroke),s=k(e,r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:i,fillOpacity:Wo,stroke:o});(function(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection})(ro(t))&&k(e,r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.33,my:(t.height-18)/t.height}}),{strokeWidth:2,fill:i,stroke:o});return s}function Z(e,t,n={}){return b(e,t.width,t.height,{fillOpacity:Wo,...n,fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)})}function Y(e,t,n={}){return function(e,t,n,r){var i=t/2,o=n/2,s=[{x:i,y:0},{x:t,y:o},{x:i,y:n},{x:0,y:o}].map((function(e){return e.x+","+e.y})).join(" ");r=h(r);var a=Ae("polygon",{...r,points:s});return ye(e,a),a}(e,t.width,t.height,{fill:Bo(t,a,n.fill),fillOpacity:Wo,stroke:$o(t,l,n.stroke)})}function K(e,t,n={}){var r=w(e,Vo(t,n),Ho(t,n),0,{fill:Bo(t,a,n.fill),fillOpacity:n.fillOpacity||Wo,stroke:$o(t,l,n.stroke),strokeWidth:1.5}),i=ro(t);to(i,"bpmn:Lane")&&W(e,i.get("name"),t,n);return r}function J(e,t,n={}){var r=G(e,t,n);Oo(t)&&xe(r,{strokeDasharray:"0, 5.5",strokeWidth:2.5});var i=_o(t);return U(e,t,i?"center-top":"center-middle",n),V(e,t,i?void 0:["SubProcessMarker"],n),r}function ee(e,t,n={}){var r=G(e,t,n);return U(e,t,"center-middle",n),V(e,t,void 0,n),r}var te=this.handlers={"bpmn:AdHocSubProcess":function(e,t,n={}){return J(e,t,n=_o(t)?Qo(n,["fill","stroke","width","height"]):Qo(n,["fill","stroke"]))},"bpmn:Association":function(e,t,n={}){return Q(e,t,n=Qo(n,["fill","stroke"]))},"bpmn:BoundaryEvent":function(e,t,n={}){var{renderIcon:r=!0}=n;n=Qo(n,["fill","stroke"]);var i=ro(t).get("cancelActivity");n={strokeWidth:1.5,fill:Bo(t,a,n.fill),fillOpacity:1,stroke:$o(t,l,n.stroke)},i||(n.strokeDasharray="6");var o=Z(e,t,n);return b(e,t.width,t.height,3,{...n,fill:"none"}),r&&$(t,e,n),o},"bpmn:BusinessRuleTask":function(e,t,n={}){var i=ee(e,t,n=Qo(n,["fill","stroke"]));return xe(k(e,r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}})),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1}),xe(k(e,r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}})),{fill:$o(t,l,n.stroke),stroke:$o(t,l,n.stroke),strokeWidth:1}),i},"bpmn:CallActivity":function(e,t,n={}){return n=Qo(n,["fill","stroke"]),J(e,t,{strokeWidth:5,...n})},"bpmn:ComplexGateway":function(e,t,n={}){var i=Y(e,t,n=Qo(n,["fill","stroke"]));return k(e,r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{fill:$o(t,l,n.stroke),stroke:$o(t,l,n.stroke),strokeWidth:1}),i},"bpmn:DataInput":function(e,t,n={}){n=Qo(n,["fill","stroke"]);var i=r.getRawPath("DATA_ARROW"),o=X(e,t,n);return k(e,i,{fill:"none",stroke:$o(t,l,n.stroke),strokeWidth:1}),o},"bpmn:DataInputAssociation":function(e,t,n={}){return n=Qo(n,["fill","stroke"]),Q(e,t,{...n,markerEnd:y("association-end",Bo(t,a,n.fill),$o(t,l,n.stroke))})},"bpmn:DataObject":function(e,t,n={}){return X(e,t,n=Qo(n,["fill","stroke"]))},"bpmn:DataObjectReference":P("bpmn:DataObject"),"bpmn:DataOutput":function(e,t,n={}){n=Qo(n,["fill","stroke"]);var i=r.getRawPath("DATA_ARROW"),o=X(e,t,n);return k(e,i,{strokeWidth:1,fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke)}),o},"bpmn:DataOutputAssociation":function(e,t,n={}){return n=Qo(n,["fill","stroke"]),Q(e,t,{...n,markerEnd:y("association-end",Bo(t,a,n.fill),$o(t,l,n.stroke))})},"bpmn:DataStoreReference":function(e,t,n={}){return n=Qo(n,["fill","stroke"]),k(e,r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{fill:Bo(t,a,n.fill),fillOpacity:Wo,stroke:$o(t,l,n.stroke),strokeWidth:2})},"bpmn:EndEvent":function(e,t,n={}){var{renderIcon:r=!0}=n;n=Qo(n,["fill","stroke"]);var i=Z(e,t,{...n,strokeWidth:4});return r&&$(t,e,n),i},"bpmn:EventBasedGateway":function(e,t,n={}){n=Qo(n,["fill","stroke"]);var i=ro(t),o=Y(e,t,n);b(e,t.width,t.height,.2*t.height,{fill:Bo(t,"none",n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1});var s=i.get("eventGatewayType"),a=!!i.get("instantiate");if("Parallel"===s){var c=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}});k(e,c,{fill:"none",stroke:$o(t,l,n.stroke),strokeWidth:1})}else"Exclusive"===s&&(a||b(e,t.width,t.height,.26*t.height,{fill:"none",stroke:$o(t,l,n.stroke),strokeWidth:1}),function(){var i=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}});k(e,i,{fill:"none",stroke:$o(t,l,n.stroke),strokeWidth:2})}());return o},"bpmn:ExclusiveGateway":function(e,t,n={}){var i=Y(e,t,n=Qo(n,["fill","stroke"])),o=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return io(t).get("isMarkerVisible")&&k(e,o,{fill:$o(t,l,n.stroke),stroke:$o(t,l,n.stroke),strokeWidth:1}),i},"bpmn:Gateway":function(e,t,n={}){return Y(e,t,n=Qo(n,["fill","stroke"]))},"bpmn:Group":function(e,t,n={}){return n=Qo(n,["fill","stroke","width","height"]),w(e,t.width,t.height,10,{stroke:$o(t,l,n.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:Vo(t,n),height:Ho(t,n)})},"bpmn:InclusiveGateway":function(e,t,n={}){var r=Y(e,t,n=Qo(n,["fill","stroke"]));return b(e,t.width,t.height,.24*t.height,{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:2.5}),r},"bpmn:IntermediateEvent":function(e,t,n={}){var{renderIcon:r=!0}=n;n=Qo(n,["fill","stroke"]);var i=Z(e,t,{...n,strokeWidth:1.5});return b(e,t.width,t.height,3,{fill:"none",stroke:$o(t,l,n.stroke),strokeWidth:1.5}),r&&$(t,e,n),i},"bpmn:IntermediateCatchEvent":P("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":P("bpmn:IntermediateEvent"),"bpmn:Lane":function(e,t,n={}){return n=Qo(n,["fill","stroke","width","height"]),K(e,t,{...n,fillOpacity:.25})},"bpmn:ManualTask":function(e,t,n={}){var i=ee(e,t,n=Qo(n,["fill","stroke"]));return k(e,r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:.5}),i},"bpmn:MessageFlow":function(e,t,n={}){n=Qo(n,["fill","stroke"]);var i=ro(t),o=io(t),s=Bo(t,a,n.fill),c=$o(t,l,n.stroke),p=_(e,t.waypoints,{markerEnd:y("messageflow-end",s,c),markerStart:y("messageflow-start",s,c),stroke:c,strokeDasharray:"10, 11",strokeWidth:1.5});if(i.get("messageRef")){var u=p.getPointAtLength(p.getTotalLength()/2),d=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:u.x,y:u.y}}),h={strokeWidth:1};"initiating"===o.get("messageVisibleKind")?(h.fill=s,h.stroke=c):(h.fill=c,h.stroke=s);var f=k(e,d,h),m=H(e,i.get("messageRef").get("name"),{align:"center-top",fitBox:!0,style:{fill:c}}),g=f.getBBox(),v=m.getBBox();Pr(m,u.x-v.width/2,u.y+g.height/2+10,0)}return p},"bpmn:ParallelGateway":function(e,t,n={}){var i=Y(e,t,n=Qo(n,["fill","stroke"]));return k(e,r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{fill:$o(t,l,n.stroke),stroke:$o(t,l,n.stroke),strokeWidth:1}),i},"bpmn:Participant":function(e,t,n={}){var r=K(e,t,n=Qo(n,["fill","stroke","width","height"])),i=_o(t),o=ko(t),s=ro(t),a=s.get("name");if(i){x(e,o?[{x:30,y:0},{x:30,y:Ho(t,n)}]:[{x:0,y:30},{x:Vo(t,n),y:30}],{stroke:$o(t,l,n.stroke),strokeWidth:1.5}),W(e,a,t,n)}else{var p=Fo(t,n);o||(p.height=Vo(t,n),p.width=Ho(t,n));var u=H(e,a,{box:p,align:"center-middle",style:{fill:qo(t,c,l,n.stroke)}});if(!o)Pr(u,0,-(-1*Ho(t,n)),270)}return s.get("participantMultiplicity")&&F("ParticipantMultiplicityMarker",e,t,n),r},"bpmn:ReceiveTask":function(e,t,n={}){n=Qo(n,["fill","stroke"]);var i,o=ro(t),s=ee(e,t,n);return o.get("instantiate")?(b(e,28,28,4.4,{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1}),i=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):i=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),k(e,i,{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1}),s},"bpmn:ScriptTask":function(e,t,n={}){var i=ee(e,t,n=Qo(n,["fill","stroke"]));return k(e,r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1}),i},"bpmn:SendTask":function(e,t,n={}){var i=ee(e,t,n=Qo(n,["fill","stroke"]));return k(e,r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{fill:$o(t,l,n.stroke),stroke:Bo(t,a,n.fill),strokeWidth:1}),i},"bpmn:SequenceFlow":function(e,t,n={}){n=Qo(n,["fill","stroke"]);var r=Bo(t,a,n.fill),i=$o(t,l,n.stroke),o=_(e,t.waypoints,{markerEnd:y("sequenceflow-end",r,i),stroke:i}),s=ro(t),{source:c}=t;if(c){var p=ro(c);s.get("conditionExpression")&&to(p,"bpmn:Activity")&&xe(o,{markerStart:y("conditional-flow-marker",r,i)}),p.get("default")&&(to(p,"bpmn:Gateway")||to(p,"bpmn:Activity"))&&p.get("default")===s&&xe(o,{markerStart:y("conditional-default-flow-marker",r,i)})}return o},"bpmn:ServiceTask":function(e,t,n={}){var i=ee(e,t,n=Qo(n,["fill","stroke"]));return b(e,10,10,{fill:Bo(t,a,n.fill),stroke:"none",transform:"translate(6, 6)"}),k(e,r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1}),b(e,10,10,{fill:Bo(t,a,n.fill),stroke:"none",transform:"translate(11, 10)"}),k(e,r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:1}),i},"bpmn:StartEvent":function(e,t,n={}){var{renderIcon:r=!0}=n;n=Qo(n,["fill","stroke"]),ro(t).get("isInterrupting")||(n={...n,strokeDasharray:"6"});var i=Z(e,t,n);return r&&$(t,e,n),i},"bpmn:SubProcess":function(e,t,n={}){return J(e,t,n=_o(t)?Qo(n,["fill","stroke","width","height"]):Qo(n,["fill","stroke"]))},"bpmn:Task":function(e,t,n={}){return ee(e,t,n=Qo(n,["fill","stroke"]))},"bpmn:TextAnnotation":function(e,t,n={}){n=Qo(n,["fill","stroke","width","height"]);var{width:i,height:o}=Fo(t,n),s=w(e,i,o,0,0,{fill:"none",stroke:"none"});return k(e,r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:i,containerHeight:o,position:{mx:0,my:0}}),{stroke:$o(t,l,n.stroke)}),H(e,ro(t).get("text")||"",{align:"left-top",box:Fo(t,n),padding:7,style:{fill:qo(t,c,l,n.stroke)}}),s},"bpmn:Transaction":function(e,t,r={}){r=_o(t)?Qo(r,["fill","stroke","width","height"]):Qo(r,["fill","stroke"]);var i=J(e,t,{strokeWidth:1.5,...r}),o=n.style(["no-fill","no-events"],{stroke:$o(t,l,r.stroke),strokeWidth:1.5});return _o(t)||(r={}),w(e,Vo(t,r),Ho(t,r),7,3,o),i},"bpmn:UserTask":function(e,t,n={}){var i=ee(e,t,n=Qo(n,["fill","stroke"]));return k(e,r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:.5}),k(e,r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{fill:Bo(t,a,n.fill),stroke:$o(t,l,n.stroke),strokeWidth:.5}),k(e,r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{fill:$o(t,l,n.stroke),stroke:$o(t,l,n.stroke),strokeWidth:.5}),i},label:function(e,t,n={}){return function(e,t,n={}){var r={width:90,height:30,x:t.width/2+t.x,y:t.height/2+t.y};return H(e,Ro(t),{box:r,fitBox:!0,style:L({},o.getExternalStyle(),{fill:qo(t,c,l,n.stroke)})})}(e,t,n)}};this._drawPath=k,this._renderer=O}function Qo(e,t=[]){return t.reduce(((t,n)=>(e[n]&&(t[n]=e[n]),t)),{})}e(Go,nt),Go.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Go.prototype.canRender=function(e){return to(e,"bpmn:BaseElement")},Go.prototype.drawShape=function(e,t,n={}){var{type:r}=t;return this._renderer(r)(e,t,n)},Go.prototype.drawConnection=function(e,t,n={}){var{type:r}=t;return this._renderer(r)(e,t,n)},Go.prototype.getShapePath=function(e){return to(e,"bpmn:Event")?(n=(t=e).x+t.width/2,r=t.y+t.height/2,i=t.width/2,rt([["M",n,r],["m",0,-i],["a",i,i,0,1,1,0,2*i],["a",i,i,0,1,1,0,-2*i],["z"]])):to(e,"bpmn:Activity")?function(e,t){var n=e.x,r=e.y,i=e.width,o=e.height;return rt([["M",n+t,r],["l",i-2*t,0],["a",t,t,0,0,1,t,t],["l",0,o-2*t],["a",t,t,0,0,1,-t,t],["l",2*t-i,0],["a",t,t,0,0,1,-t,-t],["l",0,2*t-o],["a",t,t,0,0,1,t,-t],["z"]])}(e,10):to(e,"bpmn:Gateway")?function(e){var t=e.width/2,n=e.height/2;return rt([["M",e.x+t,e.y],["l",t,n],["l",-t,n],["l",-t,-n],["z"]])}(e):function(e){var t=e.x,n=e.y,r=e.width;return rt([["M",t,n],["l",r,0],["l",0,e.height],["l",-r,0],["z"]])}(e);var t,n,r,i};var Xo=0,Zo={width:150,height:50};function Yo(e,t){var n;t.textContent=e;try{var r,i=""===e;return t.textContent=i?"dummy":e,r={width:(n=t.getBBox()).width+2*n.x,height:n.height},i&&(r.width=0),r}catch(e){return{width:0,height:0}}}function Ko(e,t,n){for(var r,i=e.shift(),o=i;;){if((r=Yo(o,n)).width=o?r.width:0," "===o||""===o||r.width<Math.round(t)||o.length<2)return Jo(e,o,i,r);o=ts(o,r.width,t)}}function Jo(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 es="­";function ts(e,t,n){var r=Math.max(e.length*(n/t),1),i=function(e,t){var n,r=e.split(/(\s|-|\u00AD)/g),i=[],o=0;if(r.length>1)for(;n=r.shift();){if(!(n.length+o<t)){"-"!==n&&n!==es||i.pop();break}i.push(n),o+=n.length}var s=i[i.length-1];return s&&s===es&&(i[i.length-1]="-"),i.join("")}(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function ns(e){this._config=L({},{size:Zo,padding:Xo,style:{},align:"center-top"},e||{})}ns.prototype.createText=function(e,t){return this.layoutText(e,t).element},ns.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},ns.prototype.layoutText=function(e,t){var n=L({},this._config.size,t.box),r=L({},this._config.style,t.style),i=function(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}(t.align||this._config.align),o=function(e){return p(e)?L({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}(void 0!==t.padding?t.padding:this._config.padding),s=t.fitBox||!1,a=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(r),l=e.split(/\u00AD?\r?\n/),c=[],u=n.width-o.left-o.right,d=Ae("text");for(xe(d,{x:0,y:0}),xe(d,r),ye(function(){var e=document.getElementById("helper-svg");return e||(xe(e=Ae("svg"),{id:"helper-svg"}),Ct(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}(),d);l.length;)c.push(Ko(l,u,d));"middle"===i.vertical&&(o.top=o.bottom=0);var h=w(c,(function(e,t,n){return e+(a||t.height)}),0)+o.top+o.bottom,f=w(c,(function(e,t,n){return t.width>e?t.width:e}),0),m=o.top;"middle"===i.vertical&&(m+=(n.height-h)/2),m-=(a||c[0].height)/4;var g=Ae("text");return xe(g,r),v(c,(function(e){var t;switch(m+=a||e.height,i.horizontal){case"left":t=o.left;break;case"right":t=(s?f:u)-o.right-e.width;break;default:t=Math.max(((s?f:u)-e.width)/2+o.left,0)}var n=Ae("tspan");xe(n,{x:t,y:m}),n.textContent=e.text,ye(g,n)})),Oe(d),{dimensions:{width:f,height:h},element:g}};function rs(e){var t=L({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=L({},t,{fontSize:n},e&&e.externalStyle||{}),i=new ns({style:t});this.getExternalLabelBounds=function(e,t){var n=i.getDimensions(t,{box:{width:90,height:30},style:r});return{x:Math.round(e.x+e.width/2-n.width/2),y:Math.round(e.y),width:Math.ceil(n.width),height:Math.ceil(n.height)}},this.getTextAnnotationBounds=function(e,n){var r=i.getDimensions(n,{box:e,style:t,align:"left-top",padding:5});return{x:e.x,y:e.y,width:e.width,height:Math.max(30,Math.round(r.height))}},this.createText=function(e,t){return i.createText(e,t||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}rs.$inject=["config.textRenderer"];var is=/\{([^{}]+)\}/g,os=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var ss={__init__:["bpmnRenderer"],bpmnRenderer:["type",Go],textRenderer:["type",rs],pathMap:["type",function(){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(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var n,r,i=this.pathMap[e];t.abspos?(n=t.abspos.x,r=t.abspos.y):(n=t.containerWidth*t.position.mx,r=t.containerHeight*t.position.my);var o={};if(t.position){for(var s=t.containerHeight/i.height*t.yScaleFactor,a=t.containerWidth/i.width*t.xScaleFactor,l=0;l<i.heightElements.length;l++)o["y"+l]=i.heightElements[l]*s;for(var c=0;c<i.widthElements.length;c++)o["x"+c]=i.widthElements[c]*a}var p,u,d=(p=i.d,u={mx:n,my:r,e:o},String(p).replace(is,(function(e,t){return function(e,t,n){var r=n;return t.replace(os,(function(e,t,n,i,o){t=t||i,r&&(t in r&&(r=r[t]),"function"==typeof r&&o&&(r=r()))})),r=(null==r||r==n?e:r)+""}(e,t,u)})));return d}}]};var as={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]};function ls(e,t,n){return L({id:e.id,type:e.$type,businessObject:e,di:t},n)}function cs(e,t,n){var r=e.waypoint;return!r||r.length<2?[Zn(t),Zn(n)]:r.map((function(e){return{x:e.x,y:e.y}}))}function ps(e,t,n){return new Error(`element ${Zi(t)} referenced by ${Zi(e)}#${n} not yet drawn`)}function us(e,t,n,r,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._textRenderer=i}us.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],us.prototype.add=function(e,t,n){var r,i,o;if(to(t,"bpmndi:BPMNPlane")){var s=to(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};r=this._elementFactory.createRoot(ls(e,t,s)),this._canvas.addRootElement(r)}else if(to(t,"bpmndi:BPMNShape")){var a=!_o(e,t),l=function(e){return to(e,"bpmn:Group")}(e);i=n&&(n.hidden||n.collapsed);var c=t.bounds;r=this._elementFactory.createShape(ls(e,t,{collapsed:a,hidden:i,x:Math.round(c.x),y:Math.round(c.y),width:Math.round(c.width),height:Math.round(c.height),isFrame:l})),to(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,r),to(e,"bpmn:Lane")&&(o=0),to(e,"bpmn:DataStoreReference")&&(function(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}(n,Zn(c))||(n=this._canvas.findRoot(n))),this._canvas.addShape(r,n,o)}else{if(!to(t,"bpmndi:BPMNEdge"))throw new Error(`unknown di ${Zi(t)} for element ${Zi(e)}`);var p=this._getSource(e),u=this._getTarget(e);i=n&&(n.hidden||n.collapsed),r=this._elementFactory.createConnection(ls(e,t,{hidden:i,source:p,target:u,waypoints:cs(t,p,u)})),to(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(r,n,o)}return To(e)&&Ro(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r},us.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${Zi(e)}#attachedToRef`);var r=this._elementRegistry.get(n.id),i=r&&r.attachers;if(!r)throw ps(e,n,"attachedToRef");t.host=r,i||(r.attachers=i=[]),-1===i.indexOf(t)&&i.push(t)},us.prototype.addLabel=function(e,t,n){var r,i,o;return r=function(e,t){var n,r,i,o=e.label;return o&&o.bounds?(i=o.bounds,r={width:Math.max(So.width,i.width),height:i.height},n={x:i.x+i.width/2,y:i.y+i.height/2}):(n=Do(t),r=So),L({x:n.x-r.width/2,y:n.y-r.height/2},r)}(t,n),(i=Ro(n))&&(r=this._textRenderer.getExternalLabelBounds(r,i)),o=this._elementFactory.createLabel(ls(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!Ro(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)},us.prototype._getConnectedElement=function(e,t){var n,r,i=e.$type;if(r=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===i&&(r=r&&r[0]),("source"===t&&"bpmn:DataOutputAssociation"===i||"target"===t&&"bpmn:DataInputAssociation"===i)&&(r=e.$parent),n=r&&this._getElement(r))return n;throw r?ps(e,r,t+"Ref"):new Error(`${Zi(e)}#${t} Ref not specified`)},us.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},us.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},us.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};var ds={__depends__:[ss,{__depends__:[as],bpmnImporter:["type",us]}]};function hs(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}hs.prototype.next=function(){return this._prefix+ ++this._counter};var fs=new hs("ov");function ms(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=fs,this._overlayDefaults=L({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=function(e){var t=Zt('<div class="djs-overlay-container" />');return Ct(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}(n.getContainer()),this._init()}function gs(e,t,n){Ct(e,{left:t+"px",top:n+"px"})}function ys(e,t){e.style.display=!1===t?"none":""}function vs(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}ms.$inject=["config.overlays","eventBus","canvas","elementRegistry"],ms.prototype.get=function(e){if(h(e)&&(e={id:e}),h(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?y(t.overlays,M({type:e.type})):t.overlays.slice():[]}return e.type?y(this._overlays,M({type:e.type})):e.id?this._overlays[e.id]:null},ms.prototype.add=function(e,t,n){if(p(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=L({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r},ms.prototype.remove=function(e){var t=this.get(e)||[];c(t)||(t=[t]);var n=this;v(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(Jt(e.html),Jt(e.htmlContainer),delete e.htmlContainer,delete e.element,delete n._overlays[e.id]),t){var r=t.overlays.indexOf(e);-1!==r&&t.overlays.splice(r,1)}}))},ms.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},ms.prototype.show=function(){ys(this._overlayRoot)},ms.prototype.hide=function(){ys(this._overlayRoot,!1)},ms.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Nt(this._overlayRoot)},ms.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}gs(n,r,i),Tt(e.html,"data-container-id",t.id)},ms.prototype._updateOverlay=function(e){var t,n,r=e.position,i=e.htmlContainer,o=e.element,s=r.left,a=r.top;void 0!==r.right&&(t=o.waypoints?mt(o).width:o.width,s=-1*r.right+t);void 0!==r.bottom&&(n=o.waypoints?mt(o).height:o.height,a=-1*r.bottom+n);gs(i,s||0,a||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},ms.prototype._createOverlayContainer=function(e){var t=Zt('<div class="djs-overlays" />');Ct(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},ms.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";vs(this._overlayRoot,n)},ms.prototype._getOverlayContainer=function(e,t){var n=m(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},ms.prototype._addOverlay=function(e){var t,n,r=e.id,i=e.element,o=e.html;o.get&&o.constructor.prototype.jquery&&(o=o.get(0)),h(o)&&(o=Zt(o)),n=this._getOverlayContainer(i),Ct(t=Zt('<div class="djs-overlay" data-overlay-id="'+r+'">'),{position:"absolute"}),t.appendChild(o),e.type&&At(t).add("djs-overlay-"+e.type),ys(t,this._canvas.findRoot(i)===this._canvas.getRootElement()),e.htmlContainer=t,n.overlays.push(e),n.html.appendChild(t),this._overlays[r]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},ms.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,r=this._canvas.findRoot(e.element),i=n&&n.minZoom,o=n&&n.maxZoom,s=e.htmlContainer,l=!0;(r!==this._canvas.getRootElement()||n&&(a(i)&&i>t.scale||a(o)&&o<t.scale))&&(l=!1),ys(s,l),this._updateOverlayScale(e,t)},ms.prototype._updateOverlayScale=function(e,t){var n,r,i,o=e.scale,s=e.htmlContainer,l="";!0!==o&&(!1===o?(n=1,r=1):(n=o.min,r=o.max),a(n)&&t.scale<n&&(i=(1/t.scale||1)*n),a(r)&&t.scale>r&&(i=(1/t.scale||1)*r)),a(i)&&(l="scale("+i+","+i+")"),vs(s,l)},ms.prototype._updateOverlaysVisibilty=function(e){var t=this;v(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},ms.prototype._init=function(){var e=this._eventBus,t=this;e.on("canvas.viewbox.changing",(function(e){t.hide()})),e.on("canvas.viewbox.changed",(function(e){var n;n=e.viewbox,t._updateRoot(n),t._updateOverlaysVisibilty(n),t.show()})),e.on(["shape.remove","connection.remove"],(function(e){var n=e.element;v(t.get({element:n}),(function(e){t.remove(e.id)}));var r=t._getOverlayContainer(n);if(r){Jt(r.html);var i=t._overlayContainers.indexOf(r);-1!==i&&t._overlayContainers.splice(i,1)}})),e.on("element.changed",500,(function(e){var n=e.element,r=t._getOverlayContainer(n,!0);r&&(v(r.overlays,(function(e){t._updateOverlay(e)})),t._updateOverlayContainer(r))})),e.on("element.marker.update",(function(e){var n=t._getOverlayContainer(e.element,!0);n&&At(n.html)[e.add?"add":"remove"](e.marker)})),e.on("root.set",(function(){t._updateOverlaysVisibilty(t._canvas.viewbox())})),e.on("diagram.clear",this.clear,this)};var bs={__init__:["overlays"],overlays:["type",ms]};function ws(e,t,n,r){e.on("element.changed",(function(r){var i=r.element;(i.parent||i===t.getRootElement())&&(r.gfx=n.getGraphics(i)),r.gfx&&e.fire(gt(i)+".changed",r)})),e.on("elements.changed",(function(t){var n=t.elements;n.forEach((function(t){e.fire("element.changed",{element:t})})),r.updateContainments(n)})),e.on("shape.changed",(function(e){r.update("shape",e.element,e.gfx)})),e.on("connection.changed",(function(e){r.update("connection",e.element,e.gfx)}))}ws.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var xs={__init__:["changeSupport"],changeSupport:["type",ws]};function _s(e){this._eventBus=e}function ks(e){return function(t,n,r,i,o){(d(t)||u(t))&&(o=i,i=r,r=n,n=t,t=null),this.on(t,e,n,r,i,o)}}function Es(e,t){t.invoke(_s,this),this.executed((function(t){var n=t.context;n.rootElement?e.setRootElement(n.rootElement):n.rootElement=e.getRootElement()})),this.revert((function(t){var n=t.context;n.rootElement&&e.setRootElement(n.rootElement)}))}_s.$inject=["eventBus"],_s.prototype.on=function(e,t,n,r,i,o){if((d(t)||u(t))&&(o=i,i=r,r=n,n=t,t=null),d(n)&&(o=i,i=r,r=n,n=1e3),p(i)&&(o=i,i=!1),!d(r))throw new Error("handlerFn must be a function");c(e)||(e=[e]);var s=this._eventBus;v(e,(function(e){var a=["commandStack",e,t].filter((function(e){return e})).join(".");s.on(a,n,i?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(r,o):r,o)}))},_s.prototype.canExecute=ks("canExecute"),_s.prototype.preExecute=ks("preExecute"),_s.prototype.preExecuted=ks("preExecuted"),_s.prototype.execute=ks("execute"),_s.prototype.executed=ks("executed"),_s.prototype.postExecute=ks("postExecute"),_s.prototype.postExecuted=ks("postExecuted"),_s.prototype.revert=ks("revert"),_s.prototype.reverted=ks("reverted"),e(Es,_s),Es.$inject=["canvas","injector"];var Os={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",Es]};function Ps(e){return CSS.escape(e)}var Ss={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Cs(e){return(e=""+e)&&e.replace(/[&<>"']/g,(function(e){return Ss[e]}))}var Ts="_plane";function Ms(e){return function(e){return e.replace(new RegExp(Ts+"$"),"")}(e.id)}function As(e){var t=e.id;return to(e,"bpmn:SubProcess")?Rs(t):t}function Ds(e){return Rs(e)}function Ns(e){return to(io(e),"bpmndi:BPMNPlane")}function Rs(e){return e+Ts}function js(e,t,n){var r=fe('<ul class="bjs-breadcrumbs"></ul>'),i=n.getContainer(),o=Y(i);i.appendChild(r);var s=[];function a(e){e&&(s=function(e){for(var t=ro(e),n=[],r=t;r;r=r.$parent)(to(r,"bpmn:SubProcess")||to(r,"bpmn:Process"))&&n.push(r);return n.reverse()}(e));var i=s.map((function(e){var r=Cs(e.name||e.id),i=fe('<li><span class="bjs-crumb"><a title="'+r+'">'+r+"</a></span></li>"),o=n.findRoot(As(e))||n.findRoot(e.id);if(!o&&to(e,"bpmn:Process")){var s=t.find((function(t){var n=ro(t);return n&&n.get("processRef")&&n.get("processRef")===e}));o=n.findRoot(s.id)}return i.addEventListener("click",(function(){n.setRootElement(o)})),i}));r.innerHTML="";var a=i.length>1;o.toggle("bjs-breadcrumbs-shown",a),i.forEach((function(e){r.appendChild(e)}))}e.on("element.changed",(function(e){var t=ro(e.element);m(s,(function(e){return e===t}))&&a()})),e.on("root.set",(function(e){a(e.element)}))}function Is(e,t){var n=null,r=new Ls;e.on("root.set",(function(e){var i=e.element,o=t.viewbox(),s=r.get(i);if(r.set(n,{x:o.x,y:o.y,zoom:o.scale}),n=i,!to(i,"bpmn:Collaboration")||s){s=s||{x:0,y:0,zoom:1};var a=(o.x-s.x)*o.scale,l=(o.y-s.y)*o.scale;0===a&&0===l||t.scroll({dx:a,dy:l}),s.zoom!==o.scale&&t.zoom(s.zoom,{x:0,y:0})}})),e.on("diagram.clear",(function(){r.clear(),n=null}))}function Ls(){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}-1!==t&&this._entries.splice(t,1)}}js.$inject=["eventBus","elementRegistry","canvas"],Is.$inject=["eventBus","canvas"];var zs=180,Bs=160;function $s(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,(function(e,t){n._handleImport(t.definitions)}))}function qs(e){return to(e,"bpmndi:BPMNDiagram")?e:qs(e.$parent)}$s.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach((function(e){e.plane&&e.plane.bpmnElement&&(t._processToDiagramMap[e.plane.bpmnElement.id]=e)}));var n=[];e.diagrams.forEach((function(e){var r=t._createNewDiagrams(e.plane);Array.prototype.push.apply(n,r)})),n.forEach((function(e){t._movePlaneElementsToOrigin(e.plane)}))}},$s.prototype._createNewDiagrams=function(e){var t=this,n=[],r=[];e.get("planeElement").forEach((function(t){var i=t.bpmnElement;if(i){var o=i.$parent;to(i,"bpmn:SubProcess")&&!t.isExpanded&&n.push(i),function(e,t){var n=e.$parent;if(!to(n,"bpmn:SubProcess")||n===t.bpmnElement)return!1;if(no(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))return!1;return!0}(i,e)&&r.push({diElement:t,parent:o})}}));var i=[];return n.forEach((function(e){if(!t._processToDiagramMap[e.id]){var n=t._createDiagram(e);t._processToDiagramMap[e.id]=n,i.push(n)}})),r.forEach((function(e){for(var r=e.diElement,i=e.parent;i&&-1===n.indexOf(i);)i=i.$parent;if(i){var o=t._processToDiagramMap[i.id];t._moveToDiPlane(r,o.plane)}})),i},$s.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=function(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach((function(e){if(e.bounds){var n=Gn(e.bounds);t.top=Math.min(n.top,t.top),t.left=Math.min(n.left,t.left)}})),Qn(t)}(e),r=n.x-zs,i=n.y-Bs;t.forEach((function(e){e.waypoint?e.waypoint.forEach((function(e){e.x=e.x-r,e.y=e.y-i})):e.bounds&&(e.bounds.x=e.bounds.x-r,e.bounds.y=e.bounds.y-i)}))},$s.prototype._moveToDiPlane=function(e,t){var n=qs(e).plane.get("planeElement");n.splice(n.indexOf(e),1),t.get("planeElement").push(e)},$s.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},$s.$inject=["eventBus","moddle"];var Fs=250;function Vs(e,t,n,r){_s.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=r;var i=this;this.executed("shape.toggleCollapse",Fs,(function(e){var t=e.shape;i._canDrillDown(t)?i._addOverlay(t):i._removeOverlay(t)}),!0),this.reverted("shape.toggleCollapse",Fs,(function(e){var t=e.shape;i._canDrillDown(t)?i._addOverlay(t):i._removeOverlay(t)}),!0),this.executed(["shape.create","shape.move","shape.delete"],Fs,(function(e){var t=e.oldParent,n=e.newParent||e.parent,r=e.shape;i._canDrillDown(r)&&i._addOverlay(r),i._updateDrilldownOverlay(t),i._updateDrilldownOverlay(n),i._updateDrilldownOverlay(r)}),!0),this.reverted(["shape.create","shape.move","shape.delete"],Fs,(function(e){var t=e.oldParent,n=e.newParent||e.parent,r=e.shape;i._canDrillDown(r)&&i._addOverlay(r),i._updateDrilldownOverlay(t),i._updateDrilldownOverlay(n),i._updateDrilldownOverlay(r)}),!0),t.on("import.render.complete",(function(){n.filter((function(e){return i._canDrillDown(e)})).map((function(e){i._addOverlay(e)}))}))}e(Vs,_s),Vs.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},Vs.prototype._canDrillDown=function(e){var t=this._canvas;return to(e,"bpmn:SubProcess")&&t.findRoot(As(e))},Vs.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=ro(e),r=t.get({element:n.id,type:"drilldown"})[0];if(r){var i=n&&n.get("flowElements")&&n.get("flowElements").length;Y(r.html).toggle("bjs-drilldown-empty",!i)}},Vs.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays;n.get({element:e,type:"drilldown"}).length&&this._removeOverlay(e);var r=fe('<button class="bjs-drilldown"><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></button>');r.addEventListener("click",(function(){t.setRootElement(t.findRoot(As(e)))})),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:r}),this._updateOverlayVisibility(e)},Vs.prototype._removeOverlay=function(e){this._overlays.remove({element:e,type:"drilldown"})},Vs.$inject=["canvas","eventBus","elementRegistry","overlays"];var Hs={__depends__:[bs,xs,Os],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",js],drilldownCentering:["type",Is],drilldownOverlayBehavior:["type",Vs],subprocessCompatibility:["type",$s]};function Us(e,t){this._eventBus=e,this.offset=5;var n=t.cls("djs-outline",["no-fill"]),r=this;function i(e){var t=Ae("rect");return xe(t,L({x:0,y:0,rx:4,width:100,height:100},n)),t}e.on(["shape.added","shape.changed"],500,(function(e){var t=e.element,n=e.gfx,o=Yt(".djs-outline",n);o||ye(n,o=r.getOutline(t)||i()),r.updateShapeOutline(o,t)})),e.on(["connection.added","connection.changed"],(function(e){var t=e.element,n=e.gfx,o=Yt(".djs-outline",n);o||ye(n,o=i()),r.updateConnectionOutline(o,t)}))}Us.prototype.updateShapeOutline=function(e,t){var n=!1,r=this._getProviders();r.length&&v(r,(function(r){n=n||r.updateOutline(t,e)})),n||xe(e,{x:-this.offset,y:-this.offset,width:t.width+2*this.offset,height:t.height+2*this.offset})},Us.prototype.updateConnectionOutline=function(e,t){var n=mt(t);xe(e,{x:n.x-this.offset,y:n.y-this.offset,width:n.width+2*this.offset,height:n.height+2*this.offset})},Us.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("outline.getProviders",e,(function(e){e.providers.push(t)}))},Us.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"outline.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},Us.prototype.getOutline=function(e){var t;return v(this._getProviders(),(function(n){d(n.getOutline)&&(t=t||n.getOutline(e))})),t},Us.$inject=["eventBus","styles","elementRegistry"];var Ws={__init__:["outline"],outline:["type",Us]};const Gs={width:36,height:50},Qs={width:50,height:50};function Xs(e,t,n){return Ae("path",{d:e,strokeWidth:2,transform:`translate(${t.x}, ${t.y})`,...n})}function Zs(e,t){this._styles=t,e.registerProvider(this)}function Ys(e,t){var n;return"bpmn:DataObjectReference"===t?n=Gs:"bpmn:DataStoreReference"===t&&(n=Qs),e.width===n.width&&e.height===n.height}Zs.$inject=["outline","styles"],Zs.prototype.getOutline=function(e){const t=this._styles.cls("djs-outline",["no-fill"]);var n;if(!Hn(e))return to(e,"bpmn:Gateway")?(L((n=Ae("rect")).style,{"transform-box":"fill-box",transform:"rotate(45deg)","transform-origin":"center"}),xe(n,L({x:2,y:2,rx:4,width:e.width-4,height:e.height-4},t))):no(e,["bpmn:Task","bpmn:SubProcess","bpmn:Group"])?xe(n=Ae("rect"),L({x:-5,y:-5,rx:14,width:e.width+10,height:e.height+10},t)):to(e,"bpmn:EndEvent")?xe(n=Ae("circle"),L({cx:e.width/2,cy:e.height/2,r:e.width/2+5+1},t)):to(e,"bpmn:Event")?xe(n=Ae("circle"),L({cx:e.width/2,cy:e.height/2,r:e.width/2+5},t)):to(e,"bpmn:DataObjectReference")&&Ys(e,"bpmn:DataObjectReference")?n=Xs("M44.7648 11.3263L36.9892 2.64074C36.0451 1.58628 34.5651 0.988708 33.1904 0.988708H5.98667C3.22688 0.988708 0.989624 3.34892 0.989624 6.26039V55.0235C0.989624 57.9349 3.22688 60.2952 5.98667 60.2952H40.966C43.7257 60.2952 45.963 57.9349 45.963 55.0235V14.9459C45.963 13.5998 45.6407 12.3048 44.7648 11.3263Z",{x:-6,y:-6},t):to(e,"bpmn:DataStoreReference")&&Ys(e,"bpmn:DataStoreReference")&&(n=Xs("M1.03845 48.1347C1.03845 49.3511 1.07295 50.758 1.38342 52.064C1.69949 53.3938 2.32428 54.7154 3.56383 55.6428C6.02533 57.4841 10.1161 58.7685 14.8212 59.6067C19.5772 60.4538 25.1388 60.8738 30.6831 60.8738C36.2276 60.8738 41.7891 60.4538 46.545 59.6067C51.2504 58.7687 55.3412 57.4842 57.8028 55.6429C59.0424 54.7156 59.6673 53.3938 59.9834 52.064C60.2938 50.7579 60.3285 49.351 60.3285 48.1344V13.8415C60.3285 12.6249 60.2938 11.218 59.9834 9.91171C59.6673 8.58194 59.0423 7.2602 57.8027 6.33294C55.341 4.49168 51.2503 3.20723 46.545 2.36914C41.7891 1.522 36.2276 1.10204 30.6831 1.10205C25.1388 1.10206 19.5772 1.52206 14.8213 2.36923C10.1162 3.20734 6.02543 4.49183 3.5639 6.33314C2.32433 7.26038 1.69951 8.58206 1.38343 9.91181C1.07295 11.2179 1.03845 12.6247 1.03845 13.8411V48.1347Z",{x:-6,y:-6},t)),n},Zs.prototype.updateOutline=function(e,t){if(!Hn(e))return no(e,["bpmn:SubProcess","bpmn:Group"])?(xe(t,{width:e.width+10,height:e.height+10}),!0):!!no(e,["bpmn:Event","bpmn:Gateway","bpmn:DataStoreReference","bpmn:DataObjectReference"])};var Ks={__depends__:[Ws],__init__:["outlineProvider"],outlineProvider:["type",Zs]};function Js(e){e&&"function"==typeof e.stopPropagation&&e.stopPropagation()}function ea(e){return e.originalEvent||e.srcEvent}function ta(e){Js(e),Js(ea(e))}function na(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function ra(){return/mac/i.test(navigator.platform)}function ia(e,t){return(ea(e)||e).button===t}function oa(e){return ia(e,0)}function sa(e){var t=ea(e)||e;return!!oa(e)&&(ra()?t.metaKey:t.ctrlKey)}function aa(e){var t=ea(e)||e;return oa(e)&&t.shiftKey}function la(e){return!0}function ca(e){return oa(e)||function(e){return ia(e,1)}(e)}function pa(e,t,n){var r=this;function i(n,r,i){var o,s;(function(e,t){var n=l[e]||oa;return!n(t)})(n,r)||(i?s=t.getGraphics(i):(o=r.delegateTarget||r.target)&&(s=o,i=t.get(s)),s&&i&&!1===e.fire(n,{element:i,gfx:s,originalEvent:r})&&(r.stopPropagation(),r.preventDefault()))}var o={};function s(e){return o[e]}var a={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},l={"element.contextmenu":la,"element.mousedown":ca,"element.mouseup":ca,"element.click":ca,"element.dblclick":ca};var c="svg, .djs-element";function p(e,t,n,r){var s=o[n]=function(e){i(n,e)};r&&(l[n]=r),s.$delegate=Wt.bind(e,c,t,s)}function u(e,t,n){var r=s(n);r&&Wt.unbind(e,t,r.$delegate)}e.on("canvas.destroy",(function(e){!function(e){v(a,(function(t,n){u(e,n,t)}))}(e.svg)})),e.on("canvas.init",(function(e){!function(e){v(a,(function(t,n){p(e,n,t)}))}(e.svg)})),e.on(["shape.added","connection.added"],(function(t){var n=t.element,r=t.gfx;e.fire("interactionEvents.createHit",{element:n,gfx:r})})),e.on(["shape.changed","connection.changed"],500,(function(t){var n=t.element,r=t.gfx;e.fire("interactionEvents.updateHit",{element:n,gfx:r})})),e.on("interactionEvents.createHit",500,(function(e){var t=e.element,n=e.gfx;r.createDefaultHit(t,n)})),e.on("interactionEvents.updateHit",(function(e){var t=e.element,n=e.gfx;r.updateDefaultHit(t,n)}));var d=m("djs-hit djs-hit-stroke"),h=m("djs-hit djs-hit-click-stroke"),f={all:m("djs-hit djs-hit-all"),"click-stroke":h,stroke:d,"no-move":m("djs-hit djs-hit-no-move")};function m(e,t){return t=L({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function g(e,t){var n=f[t];if(!n)throw new Error("invalid hit type <"+t+">");return xe(e,n),e}function y(e,t){ye(e,t)}this.removeHits=function(e){v(Kt(".djs-hit",e),Oe)},this.createDefaultHit=function(e,t){var n,r=e.waypoints,i=e.isFrame;return r?this.createWaypointsHit(t,r):(n=i?"stroke":"all",this.createBoxHit(t,n,{width:e.width,height:e.height}))},this.createWaypointsHit=function(e,t){var n=lt(t);return g(n,"stroke"),y(e,n),n},this.createBoxHit=function(e,t,n){n=L({x:0,y:0},n);var r=Ae("rect");return g(r,t),xe(r,n),y(e,r),r},this.updateDefaultHit=function(e,t){var n=Yt(".djs-hit",t);if(n)return e.waypoints?ct(n,e.waypoints):xe(n,{width:e.width,height:e.height}),n},this.fire=i,this.triggerMouseEvent=function(e,t,n){var r=a[e];if(!r)throw new Error("unmapped DOM event name <"+e+">");return i(r,t,n)},this.mouseHandler=s,this.registerEvent=p,this.unregisterEvent=u}pa.$inject=["eventBus","elementRegistry","styles"];var ua={__init__:["interactionEvents"],interactionEvents:["type",pa]};function da(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=[];var n=this;e.on(["shape.remove","connection.remove"],(function(e){var t=e.element;n.deselect(t)})),e.on(["diagram.clear","root.set"],(function(e){n.select(null)}))}da.$inject=["eventBus","canvas"],da.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(-1!==n){var r=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:t})}},da.prototype.get=function(){return this._selectedElements},da.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},da.prototype.select=function(e,t){var n=this._selectedElements,r=n.slice();c(e)||(e=e?[e]:[]);var i=this._canvas,o=i.getRootElement();e=e.filter((function(e){var t=i.findRoot(e);return o===t})),t?v(e,(function(e){-1===n.indexOf(e)&&n.push(e)})):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:n})};var ha="hover",fa="selected";function ma(e,t,n){this._canvas=e;var r=this;function i(t,n){e.addMarker(t,n)}function o(t,n){e.removeMarker(t,n)}this._multiSelectionBox=null,t.on("element.hover",(function(e){i(e.element,ha)})),t.on("element.out",(function(e){o(e.element,ha)})),t.on("selection.changed",(function(e){var t=e.oldSelection,n=e.newSelection;v(t,(function(e){-1===n.indexOf(e)&&function(e){o(e,fa)}(e)})),v(n,(function(e){-1===t.indexOf(e)&&function(e){i(e,fa)}(e)})),r._updateSelectionOutline(n)})),t.on("element.changed",(function(e){n.isSelected(e.element)&&r._updateSelectionOutline(n.get())}))}function ga(e,t,n,r){e.on("create.end",500,(function(e){var n=e.context,r=n.canExecute,i=n.elements,o=(n.hints||{}).autoSelect;if(r){if(!1===o)return;c(o)?t.select(o):t.select(i.filter(ya))}})),e.on("connect.end",500,(function(e){var n=e.context.connection;n&&t.select(n)})),e.on("shape.move.end",500,(function(e){var n=e.previousSelection||[],i=r.get(e.context.shape.id);m(n,(function(e){return i.id===e.id}))||t.select(i)})),e.on("element.click",(function(e){if(oa(e)){var r=e.element;r===n.getRootElement()&&(r=null);var i=t.isSelected(r),o=t.get().length>1,s=aa(e);if(i&&o)return s?t.deselect(r):t.select(r);i?t.deselect(r):t.select(r,s)}}))}function ya(e){return!e.hidden}ma.$inject=["canvas","eventBus","selection"],ma.prototype._updateSelectionOutline=function(e){var t=this._canvas.getLayer("selectionOutline");Pe(t);var n=e.length>1;if(ke(this._canvas.getContainer())[n?"add":"remove"]("djs-multi-select"),n){var r=function(e){return{x:e.x-6,y:e.y-6,width:e.width+12,height:e.height+12}}(mt(e)),i=Ae("rect");xe(i,L({rx:3},r)),ke(i).add("djs-selection-outline"),ye(t,i)}},ga.$inject=["eventBus","selection","canvas","elementRegistry"];var va={__init__:["selectionVisuals","selectionBehavior"],__depends__:[ua,Ws],selection:["type",da],selectionVisuals:["type",ma],selectionBehavior:["type",ga]};function ba(e){yo.call(this,e)}e(ba,yo),ba.prototype._modules=[ds,Hs,Ks,bs,va,as],ba.prototype._moddleExtensions={};var wa=["c","C"],xa=["v","V"],_a=["y","Y"],ka=["z","Z"];function Ea(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function Oa(e,t){return-1!==(e=c(e)?e:[e]).indexOf(t.key)||-1!==e.indexOf(t.code)}function Pa(e){return e.shiftKey}function Sa(e){return Ea(e)&&!Pa(e)&&Oa(ka,e)}function Ca(e){return Ea(e)&&(Oa(_a,e)||Oa(ka,e)&&Pa(e))}var Ta="keyboard.keydown",Ma="input-handle-modified-keys";function Aa(e,t){var n=this;this._config=e||{},this._eventBus=t,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),t.on("diagram.destroy",(function(){n._fire("destroy"),n.unbind()})),t.on("diagram.init",(function(){n._fire("init")})),t.on("attach",(function(){e&&e.bindTo&&n.bind(e.bindTo)})),t.on("detach",(function(){n.unbind()}))}Aa.$inject=["config.keyboard","eventBus"],Aa.prototype._keydownHandler=function(e){this._keyHandler(e,Ta)},Aa.prototype._keyupHandler=function(e){this._keyHandler(e,"keyboard.keyup")},Aa.prototype._keyHandler=function(e,t){if(!this._isEventIgnored(e)){var n={keyEvent:e};this._eventBus.fire(t||Ta,n)&&e.preventDefault()}},Aa.prototype._isEventIgnored=function(e){return!!e.defaultPrevented||((t=e.target)&&(Rt(t,"input, textarea")||"true"===t.contentEditable)||function(e){return e&&Rt(e,"button, input[type=submit], input[type=button], a[href], [aria-role=button]")}(e.target)&&Oa([" ","Enter"],e))&&this._isModifiedKeyIgnored(e);var t},Aa.prototype._isModifiedKeyIgnored=function(e){return!Ea(e)||-1===this._getAllowedModifiers(e.target).indexOf(e.key)},Aa.prototype._getAllowedModifiers=function(e){var t=jt(e,"["+Ma+"]",!0);return!t||this._node&&!this._node.contains(t)?[]:t.getAttribute(Ma).split(",")},Aa.prototype.bind=function(e){this.unbind(),this._node=e,Vt.bind(e,"keydown",this._keydownHandler),Vt.bind(e,"keyup",this._keyupHandler),this._fire("bind")},Aa.prototype.getBinding=function(){return this._node},Aa.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),Vt.unbind(e,"keydown",this._keydownHandler),Vt.unbind(e,"keyup",this._keyupHandler)),this._node=null},Aa.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})},Aa.prototype.addListener=function(e,t,n){d(e)&&(n=t,t=e,e=1e3),this._eventBus.on(n||Ta,e,t)},Aa.prototype.removeListener=function(e,t){this._eventBus.off(t||Ta,e)},Aa.prototype.hasModifier=function(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey},Aa.prototype.isCmd=Ea,Aa.prototype.isShift=Pa,Aa.prototype.isKey=Oa;var Da=500;function Na(e,t){var n=this;e.on("editorActions.init",Da,(function(e){var r=e.editorActions;n.registerBindings(t,r)}))}Na.$inject=["eventBus","keyboard"],Na.prototype.registerBindings=function(e,t){function n(n,r){t.isRegistered(n)&&e.addListener(r)}n("undo",(function(e){if(Sa(e.keyEvent))return t.trigger("undo"),!0})),n("redo",(function(e){if(Ca(e.keyEvent))return t.trigger("redo"),!0})),n("copy",(function(e){if(function(e){return Ea(e)&&Oa(wa,e)}(e.keyEvent))return t.trigger("copy"),!0})),n("paste",(function(e){if(function(e){return Ea(e)&&Oa(xa,e)}(e.keyEvent))return t.trigger("paste"),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(Oa(["+","Add","="],n)&&Ea(n))return t.trigger("stepZoom",{value:1}),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(Oa(["-","Subtract"],n)&&Ea(n))return t.trigger("stepZoom",{value:-1}),!0})),n("zoom",(function(e){var n=e.keyEvent;if(Oa("0",n)&&Ea(n))return t.trigger("zoom",{value:1}),!0})),n("removeSelection",(function(e){if(Oa(["Backspace","Delete","Del"],e.keyEvent))return t.trigger("removeSelection"),!0}))};var Ra={__init__:["keyboard","keyboardBindings"],keyboard:["type",Aa],keyboardBindings:["type",Na]},ja={moveSpeed:50,moveSpeedAccelerated:200};function Ia(e,t,n){var r=this;this._config=L({},ja,e||{}),t.addListener((function(e){var n=e.keyEvent,i=r._config;if(!t.isCmd(n))return;if(t.isKey(["ArrowLeft","Left","ArrowUp","Up","ArrowDown","Down","ArrowRight","Right"],n)){var o,s=t.isShift(n)?i.moveSpeedAccelerated:i.moveSpeed;switch(n.key){case"ArrowLeft":case"Left":o="left";break;case"ArrowUp":case"Up":o="up";break;case"ArrowRight":case"Right":o="right";break;case"ArrowDown":case"Down":o="down"}return r.moveCanvas({speed:s,direction:o}),!0}})),this.moveCanvas=function(e){var t=0,r=0,i=e.speed/Math.min(Math.sqrt(n.viewbox().scale),1);switch(e.direction){case"left":t=i;break;case"up":r=i;break;case"right":t=-i;break;case"down":r=-i}n.scroll({dx:t,dy:r})}}Ia.$inject=["config.keyboardMove","keyboard","canvas"];var La={__depends__:[Ra],__init__:["keyboardMove"],keyboardMove:["type",Ia]},za=/^djs-cursor-.*$/;function Ba(e){var t=At(document.body);t.removeMatching(za),e&&t.add("djs-cursor-"+e)}function $a(){Ba(null)}var qa=5e3;function Fa(e,t){function n(){return!1}return t=t||"element.click",e.once(t,qa,n),function(){e.off(t,n)}}function Va(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Ha(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ua(e,t){var n;function r(r){var i,o=n.start,s=n.button,a=na(r),l=Ha(a,o);(!n.dragging&&(i=l,Math.sqrt(Math.pow(i.x,2)+Math.pow(i.y,2))>15)&&(n.dragging=!0,0===s&&Fa(e),Ba("grab")),n.dragging)&&(l=Ha(a,n.last||n.start),t.scroll({dx:l.x,dy:l.y}),n.last=a);r.preventDefault()}function i(e){Vt.unbind(document,"mousemove",r),Vt.unbind(document,"mouseup",i),n=null,$a()}e.on("element.mousedown",500,(function(e){return function(e){if(jt(e.target,".djs-draggable"))return;var t=e.button;if(t>=2||e.ctrlKey||e.shiftKey||e.altKey)return;return n={button:t,start:na(e)},Vt.bind(document,"mousemove",r),Vt.bind(document,"mouseup",i),!0}(e.originalEvent)})),this.isActive=function(){return!!n}}Ua.$inject=["eventBus","canvas"];var Wa={__init__:["moveCanvas"],moveCanvas:["type",Ua]};function Ga(e){return Math.log(e)/Math.log(10)}function Qa(e,t){var n=Ga(e.min),r=Ga(e.max);return(Math.abs(n)+Math.abs(r))/t}var Xa=Math.sign||function(e){return e>=0?1:-1},Za={min:.2,max:4};function Ya(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=I(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||.75;var r=this;t.on("canvas.init",(function(t){r._init(!1!==e.enabled)}))}Ya.$inject=["config.zoomScroll","eventBus","canvas"],Ya.prototype.scroll=function(e){this._canvas.scroll(e)},Ya.prototype.reset=function(){this._canvas.zoom("fit-viewport")},Ya.prototype.zoom=function(e,t){var n=Qa(Za,20);this._totalDelta+=e,Math.abs(this._totalDelta)>.1&&(this._zoom(e,t,n),this._totalDelta=0)},Ya.prototype._handleWheel=function(e){if(!jt(e.target,".djs-scrollable",!0)){var t=this._container;e.preventDefault();var n,r=e.ctrlKey||ra()&&e.metaKey,i=e.shiftKey,o=-1*this._scale;if(o*=r?0===e.deltaMode?.02:.32:0===e.deltaMode?1:16,r){var s=t.getBoundingClientRect(),a={x:e.clientX-s.left,y:e.clientY-s.top};n=Math.sqrt(Math.pow(e.deltaY,2)+Math.pow(e.deltaX,2))*Xa(e.deltaY)*o,this.zoom(n,a)}else n=i?{dx:o*e.deltaY,dy:0}:{dx:o*e.deltaX,dy:o*e.deltaY},this.scroll(n)}},Ya.prototype.stepZoom=function(e,t){var n=Qa(Za,10);this._zoom(e,t,n)},Ya.prototype._zoom=function(e,t,n){var r=this._canvas,i=e>0?1:-1,o=Ga(r.zoom()),s=Math.round(o/n)*n;s+=n*i;var a,l,c=Math.pow(10,s);r.zoom((a=Za,l=c,Math.max(a.min,Math.min(a.max,l))),t)},Ya.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,r=this._enabled;return void 0===e&&(e=!r),r!==e&&Vt[e?"bind":"unbind"](t,"wheel",n,!1),this._enabled=e,e},Ya.prototype._init=function(e){this.toggle(e)};var Ka={__init__:["zoomScroll"],zoomScroll:["type",Ya]};function Ja(e){ba.call(this,e)}function el(e){return e&&e[e.length-1]}function tl(e){return e.y}function nl(e){return e.x}e(Ja,ba),Ja.prototype._navigationModules=[La,Wa,Ka],Ja.prototype._modules=[].concat(ba.prototype._modules,Ja.prototype._navigationModules);var rl={left:nl,center:nl,right:function(e){return e.x+e.width},top:tl,middle:tl,bottom:function(e){return e.y+e.height}};function il(e,t){this._modeling=e,this._rules=t}il.$inject=["modeling","rules"],il.prototype._getOrientationDetails=function(e){var t="x",n="width";return-1!==["top","bottom","middle"].indexOf(e)&&(t="y",n="height"),{axis:t,dimension:n}},il.prototype._isType=function(e,t){return-1!==t.indexOf(e)},il.prototype._alignmentPosition=function(e,t){var n,r,i,o=this._getOrientationDetails(e),s=o.axis,a=o.dimension,l={},c={},p=!1;if(this._isType(e,["left","top"]))l[e]=t[0][s];else if(this._isType(e,["right","bottom"]))i=el(t),l[e]=i[s]+i[a];else if(this._isType(e,["center","middle"])){if(v(t,(function(e){var t=e[s]+Math.round(e[a]/2);c[t]?c[t].elements.push(e):c[t]={elements:[e],center:t}})),n=T(c,(function(e){return e.elements.length>1&&(p=!0),e.elements.length})),p)return l[e]=el(n).center,l;r=t[0],i=el(t=T(t,(function(e){return e[s]+e[a]}))),l[e]=function(e,t){return Math.round((e[s]+t[s]+t[a])/2)}(r,i)}return l},il.prototype.trigger=function(e,t){var n,r=this._modeling,i=y(e,(function(e){return!(e.waypoints||e.host||e.labelTarget)}));if(c(n=this._rules.allowed("elements.align",{elements:i}))&&(i=n),!(i.length<2)&&n){var o=T(i,rl[t]),s=this._alignmentPosition(t,o);r.alignElements(o,s)}};var ol={__init__:["alignElements"],alignElements:["type",il]},sl=".entry";function al(e,t,n){this._canvas=e,this._elementRegistry=t,this._eventBus=n,this._current=null,this._init()}function ll(e,t){return-1!==e.indexOf(t)}al.$inject=["canvas","elementRegistry","eventBus"],al.prototype._init=function(){var e=this;this._eventBus.on("selection.changed",(function(t){var n=t.newSelection,r=n.length?1===n.length?n[0]:n:null;r?e.open(r,!0):e.close()})),this._eventBus.on("elements.changed",(function(t){var n=t.elements,r=e._current;if(r){var{target:i}=r,o=c(i)?i:[i];if(o.filter((function(e){return ll(n,e)})).length){e.close();var s=o.filter((function(t){return e._elementRegistry.get(t.id)}));s.length&&e._updateAndOpen(s.length>1?s:s[0])}}})),this._eventBus.on("canvas.viewbox.changed",(()=>{this._updatePosition()})),this._eventBus.on("element.marker.update",(function(t){e._updateVisibility()})),this._container=this._createContainer()},al.prototype._createContainer=function(){const e=Zt('<div class="djs-context-pad-parent"></div>');return this._canvas.getContainer().appendChild(e),e},al.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("contextPad.getProviders",e,(function(e){e.providers.push(t)}))},al.prototype.getEntries=function(e){var t=this._getProviders(),n=c(e)?"getMultiElementContextPadEntries":"getContextPadEntries",r={};return v(t,(function(t){if(d(t[n])){var i=t[n](e);d(i)?r=i(r):v(i,(function(e,t){r[t]=e}))}})),r},al.prototype.trigger=function(e,t,n){var r,i,o=t.delegateTarget||t.target;return o?(r=Tt(o,"data-action"),i=t.originalEvent||t,"mouseover"!==e?"mouseout"===e?(clearTimeout(this._timeout),void(this._mouseout&&(this._mouseout(),this._mouseout=null))):this.triggerEntry(r,e,i,n):void(this._timeout=setTimeout((()=>{this._mouseout=this.triggerEntry(r,"hover",i,n)}),300))):t.preventDefault()},al.prototype.triggerEntry=function(e,t,n,r){if(this.isShown()){var i=this._current.target,o=this._current.entries[e];if(o){var s=o.action;if(!1!==this._eventBus.fire("contextPad.trigger",{entry:o,event:n})){if(d(s)){if("click"===t)return s(n,i,r)}else if(s[t])return s[t](n,i,r);n.preventDefault()}}}},al.prototype.open=function(e,t){!t&&this.isOpen(e)||(this.close(),this._updateAndOpen(e))},al.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},al.prototype._updateAndOpen=function(e){var t,n=this.getEntries(e),r=this._createHtml(e);v(n,(function(e,n){var i,o=e.group||"default",s=Zt(e.html||'<div class="entry" draggable="true"></div>');Tt(s,"data-action",n),(i=Yt("[data-group="+Ps(o)+"]",r))||(Tt(i=Zt('<div class="group"></div>'),"data-group",o),r.appendChild(i)),i.appendChild(s),e.className&&function(e,t){var n=At(e);t=c(t)?t:t.split(/\s+/g),t.forEach((function(e){n.add(e)}))}(s,e.className),e.title&&Tt(s,"title",e.title),e.imageUrl&&(Tt(t=Zt("<img>"),"src",e.imageUrl),t.style.width="100%",t.style.height="100%",s.appendChild(t))})),At(r).add("open"),this._current={entries:n,html:r,target:e},this._updatePosition(),this._updateVisibility(),this._eventBus.fire("contextPad.open",{current:this._current})},al.prototype._createHtml=function(e){var t=this,n=Zt('<div class="djs-context-pad"></div>');return Wt.bind(n,sl,"click",(function(e){t.trigger("click",e)})),Wt.bind(n,sl,"dragstart",(function(e){t.trigger("dragstart",e)})),Wt.bind(n,sl,"mouseover",(function(e){t.trigger("mouseover",e)})),Wt.bind(n,sl,"mouseout",(function(e){t.trigger("mouseout",e)})),Vt.bind(n,"mousedown",(function(e){e.stopPropagation()})),this._container.appendChild(n),this._eventBus.fire("contextPad.create",{target:e,pad:n}),n},al.prototype.getPad=function(e){let t;return console.warn(new Error("ContextPad#getPad is deprecated and will be removed in future library versions, cf. https://github.com/bpmn-io/diagram-js/pull/888")),t=this.isOpen()&&function(e,t){return e=c(e)?e:[e],t=c(t)?t:[t],e.length===t.length&&x(e,(function(e){return t.includes(e)}))}(this._current.target,e)?this._current.html:this._createHtml(e),{html:t}},al.prototype.close=function(){this.isOpen()&&(clearTimeout(this._timeout),this._container.innerHTML="",this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)},al.prototype.isOpen=function(e){var t=this._current;if(!t)return!1;if(!e)return!0;var n=t.target;return c(e)===c(n)&&(c(e)?e.length===n.length&&x(e,(function(e){return ll(n,e)})):n===e)},al.prototype.isShown=function(){return this.isOpen()&&At(this._current.html).has("open")},al.prototype.show=function(){this.isOpen()&&(At(this._current.html).add("open"),this._updatePosition(),this._eventBus.fire("contextPad.show",{current:this._current}))},al.prototype.hide=function(){this.isOpen()&&(At(this._current.html).remove("open"),this._eventBus.fire("contextPad.hide",{current:this._current}))},al.prototype._getPosition=function(e){if(!c(e)&&Vn(e)){const n=this._canvas.viewbox(),r=(t=e).waypoints[t.waypoints.length-1],i=r.x*n.scale-n.x*n.scale,o=r.y*n.scale-n.y*n.scale;return{left:i+8*this._canvas.zoom(),top:o}}var t,n=this._canvas.getContainer().getBoundingClientRect(),r=this._getTargetBounds(e);return{left:r.right-n.left+8*this._canvas.zoom(),top:r.top-n.top}},al.prototype._updatePosition=function(){if(this.isOpen()){var e=this._current.html,t=this._getPosition(this._current.target);"x"in t&&"y"in t?(e.style.left=t.x+"px",e.style.top=t.y+"px"):["top","right","bottom","left"].forEach((function(n){n in t&&(e.style[n]=t[n]+"px")}))}},al.prototype._updateVisibility=function(){if(this.isOpen()){var e=this,t=this._current.target;(c(t)?t:[t]).some((function(t){return e._canvas.hasMarker(t,"djs-element-hidden")}))?e.hide():e.show()}},al.prototype._getTargetBounds=function(e){return(c(e)?e:[e]).map((e=>this._canvas.getGraphics(e))).reduce(((e,t)=>{const n=t.getBoundingClientRect();return e.top=Math.min(e.top,n.top),e.right=Math.max(e.right,n.right),e.bottom=Math.max(e.bottom,n.bottom),e.left=Math.min(e.left,n.left),e.x=e.left,e.y=e.top,e.width=e.right-e.left,e.height=e.bottom-e.top,e}),{top:1/0,right:-1/0,bottom:-1/0,left:1/0})};var cl,pl,ul,dl,hl,fl,ml={__depends__:[ua,bs],contextPad:["type",al]},gl={},yl=[],vl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function bl(e,t){for(var n in t)e[n]=t[n];return e}function wl(e){var t=e.parentNode;t&&t.removeChild(e)}function xl(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?cl.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return _l(e,s,r,i,null)}function _l(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++ul:i};return null==i&&null!=pl.vnode&&pl.vnode(o),o}function kl(e){return e.children}function El(e,t){this.props=e,this.context=t}function Ol(e,t){if(null==t)return e.__?Ol(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Ol(e):null}function Pl(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Pl(e)}}function Sl(e){(!e.__d&&(e.__d=!0)&&dl.push(e)&&!Cl.__r++||hl!==pl.debounceRendering)&&((hl=pl.debounceRendering)||setTimeout)(Cl)}function Cl(){for(var e;Cl.__r=dl.length;)e=dl.sort((function(e,t){return e.__v.__b-t.__v.__b})),dl=[],e.some((function(e){var t,n,r,i,o,s;e.__d&&(o=(i=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=bl({},i)).__v=i.__v+1,Ll(s,i,r,t.__n,void 0!==s.ownerSVGElement,null!=i.__h?[o]:null,n,null==o?Ol(i):o,i.__h),zl(n,i),i.__e!=o&&Pl(i)))}))}function Tl(e,t,n,r,i,o,s,a,l,c){var p,u,d,h,f,m,g,y=r&&r.__k||yl,v=y.length;for(n.__k=[],p=0;p<t.length;p++)if(null!=(h=n.__k[p]=null==(h=t[p])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?_l(null,h,null,null,h):Array.isArray(h)?_l(kl,{children:h},null,null,null):h.__b>0?_l(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(d=y[p])||d&&h.key==d.key&&h.type===d.type)y[p]=void 0;else for(u=0;u<v;u++){if((d=y[u])&&h.key==d.key&&h.type===d.type){y[u]=void 0;break}d=null}Ll(e,h,d=d||gl,i,o,s,a,l,c),f=h.__e,(u=h.ref)&&d.ref!=u&&(g||(g=[]),d.ref&&g.push(d.ref,null,h),g.push(u,h.__c||f,h)),null!=f?(null==m&&(m=f),"function"==typeof h.type&&h.__k===d.__k?h.__d=l=Ml(h,l,e):l=Dl(e,h,d,y,f,l),"function"==typeof n.type&&(n.__d=l)):l&&d.__e==l&&l.parentNode!=e&&(l=Ol(d))}for(n.__e=m,p=v;p--;)null!=y[p]&&$l(y[p],y[p]);if(g)for(p=0;p<g.length;p++)Bl(g[p],g[++p],g[++p])}function Ml(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?Ml(r,t,n):Dl(n,r,r,i,r.__e,t));return t}function Al(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){Al(e,t)})):t.push(e)),t}function Dl(e,t,n,r,i,o){var s,a,l;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<r.length;l+=1)if(a==i)break e;e.insertBefore(i,o),s=o}return void 0!==s?s:i.nextSibling}function Nl(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||vl.test(t)?n:n+"px"}function Rl(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Nl(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Nl(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?Il:jl,o):e.removeEventListener(t,o?Il:jl,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function jl(e){this.l[e.type+!1](pl.event?pl.event(e):e)}function Il(e){this.l[e.type+!0](pl.event?pl.event(e):e)}function Ll(e,t,n,r,i,o,s,a,l){var c,p,u,d,h,f,m,g,y,v,b,w,x,_,k,E=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(c=pl.__b)&&c(t);try{e:if("function"==typeof E){if(g=t.props,y=(c=E.contextType)&&r[c.__c],v=c?y?y.props.value:c.__:r,n.__c?m=(p=t.__c=n.__c).__=p.__E:("prototype"in E&&E.prototype.render?t.__c=p=new E(g,v):(t.__c=p=new El(g,v),p.constructor=E,p.render=ql),y&&y.sub(p),p.props=g,p.state||(p.state={}),p.context=v,p.__n=r,u=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=E.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=bl({},p.__s)),bl(p.__s,E.getDerivedStateFromProps(g,p.__s))),d=p.props,h=p.state,u)null==E.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==E.getDerivedStateFromProps&&g!==d&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(g,v),!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(g,p.__s,v)||t.__v===n.__v){for(p.props=g,p.state=p.__s,t.__v!==n.__v&&(p.__d=!1),p.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),b=0;b<p._sb.length;b++)p.__h.push(p._sb[b]);p._sb=[],p.__h.length&&s.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(g,p.__s,v),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(d,h,f)}))}if(p.context=v,p.props=g,p.__v=t,p.__P=e,w=pl.__r,x=0,"prototype"in E&&E.prototype.render){for(p.state=p.__s,p.__d=!1,w&&w(t),c=p.render(p.props,p.state,p.context),_=0;_<p._sb.length;_++)p.__h.push(p._sb[_]);p._sb=[]}else do{p.__d=!1,w&&w(t),c=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++x<25);p.state=p.__s,null!=p.getChildContext&&(r=bl(bl({},r),p.getChildContext())),u||null==p.getSnapshotBeforeUpdate||(f=p.getSnapshotBeforeUpdate(d,h)),k=null!=c&&c.type===kl&&null==c.key?c.props.children:c,Tl(e,Array.isArray(k)?k:[k],t,n,r,i,o,s,a,l),p.base=t.__e,t.__h=null,p.__h.length&&s.push(p),m&&(p.__E=p.__=null),p.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,s,a){var l,c,p,u=n.props,d=t.props,h=t.type,f=0;if("svg"===h&&(i=!0),null!=o)for(;f<o.length;f++)if((l=o[f])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,o[f]=null;break}if(null==e){if(null===h)return document.createTextNode(d);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,d.is&&d),o=null,a=!1}if(null===h)u===d||a&&e.data===d||(e.data=d);else{if(o=o&&cl.call(e.childNodes),c=(u=n.props||gl).dangerouslySetInnerHTML,p=d.dangerouslySetInnerHTML,!a){if(null!=o)for(u={},f=0;f<e.attributes.length;f++)u[e.attributes[f].name]=e.attributes[f].value;(p||c)&&(p&&(c&&p.__html==c.__html||p.__html===e.innerHTML)||(e.innerHTML=p&&p.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||Rl(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||Rl(e,o,t[o],n[o],r)}(e,d,u,i,a),p)t.__k=[];else if(f=t.props.children,Tl(e,Array.isArray(f)?f:[f],t,n,r,i&&"foreignObject"!==h,o,s,o?o[0]:n.__k&&Ol(n,0),a),null!=o)for(f=o.length;f--;)null!=o[f]&&wl(o[f]);a||("value"in d&&void 0!==(f=d.value)&&(f!==e.value||"progress"===h&&!f||"option"===h&&f!==u.value)&&Rl(e,"value",f,u.value,!1),"checked"in d&&void 0!==(f=d.checked)&&f!==e.checked&&Rl(e,"checked",f,u.checked,!1))}return e}(n.__e,t,n,r,i,o,s,l);(c=pl.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),pl.__e(e,t,n)}}function zl(e,t){pl.__c&&pl.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){pl.__e(e,t.__v)}}))}function Bl(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){pl.__e(e,n)}}function $l(e,t,n){var r,i;if(pl.unmount&&pl.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Bl(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){pl.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&$l(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||wl(e.__e),e.__=e.__e=e.__d=void 0}function ql(e,t,n){return this.constructor(e,n)}function Fl(e,t,n){var r,i,o;pl.__&&pl.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],Ll(t,e=(!r&&n||t).__k=xl(kl,null,[e]),i||gl,gl,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?cl.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),zl(o,e)}function Vl(e,t){var n={__c:t="__cC"+fl++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(Sl)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}cl=yl.slice,pl={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},ul=0,El.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=bl({},this.state),"function"==typeof e&&(e=e(bl({},n),this.props)),e&&bl(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Sl(this))},El.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Sl(this))},El.prototype.render=kl,dl=[],Cl.__r=0,fl=0;var Hl=function(e,t,n,r){var i;t[0]=0;for(var o=1;o<t.length;o++){var s=t[o++],a=t[o]?(t[0]|=s?1:2,n[t[o++]]):t[++o];3===s?r[0]=a:4===s?r[1]=Object.assign(r[1]||{},a):5===s?(r[1]=r[1]||{})[t[++o]]=a:6===s?r[1][t[++o]]+=a+"":s?(i=e.apply(a,Hl(e,a,n,["",null])),r.push(i),a[0]?t[0]|=2:(t[o-2]=0,t[o]=i)):r.push(a)}return r},Ul=new Map;var Wl,Gl,Ql,Xl,Zl=function(e){var t=Ul.get(this);return t||(t=new Map,Ul.set(this,t)),(t=Hl(this,t.get(e)||(t.set(e,t=function(e){for(var t,n,r=1,i="",o="",s=[0],a=function(e){1===r&&(e||(i=i.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(0,e,i):3===r&&(e||i)?(s.push(3,e,i),r=2):2===r&&"..."===i&&e?s.push(4,e,0):2===r&&i&&!e?s.push(5,0,!0,i):r>=5&&((i||!e&&5===r)&&(s.push(r,0,i,n),r=6),e&&(s.push(r,e,0,n),r=6)),i=""},l=0;l<e.length;l++){l&&(1===r&&a(),a(l));for(var c=0;c<e[l].length;c++)t=e[l][c],1===r?"<"===t?(a(),s=[s],r=3):i+=t:4===r?"--"===i&&">"===t?(r=1,i=""):i=t+i[0]:o?t===o?o="":i+=t:'"'===t||"'"===t?o=t:">"===t?(a(),r=1):r&&("="===t?(r=5,n=i,i=""):"/"===t&&(r<5||">"===e[l][c+1])?(a(),3===r&&(s=s[0]),r=s,(s=s[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(a(),r=2):i+=t),3===r&&"!--"===i&&(r=4,s=s[0])}return a(),s}(e)),t),arguments,[])).length>1?t:t[0]}.bind(xl),Yl=0,Kl=[],Jl=[],ec=pl.__b,tc=pl.__r,nc=pl.diffed,rc=pl.__c,ic=pl.unmount;function oc(e,t){pl.__h&&pl.__h(Gl,e,Yl||t),Yl=0;var n=Gl.__H||(Gl.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Jl}),n.__[e]}function sc(e){return Yl=1,function(e,t,n){var r=oc(Wl++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):bc(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Gl,!Gl.u)){Gl.u=!0;var i=Gl.shouldComponentUpdate;Gl.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var s=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&r.__c.props===e)&&(!i||i.call(this,e,t,n))}}return r.__N||r.__}(bc,e)}function ac(e,t){var n=oc(Wl++,3);!pl.__s&&vc(n.__H,t)&&(n.__=e,n.i=t,Gl.__H.__h.push(n))}function lc(e,t){var n=oc(Wl++,4);!pl.__s&&vc(n.__H,t)&&(n.__=e,n.i=t,Gl.__h.push(n))}function cc(e){return Yl=5,pc((function(){return{current:e}}),[])}function pc(e,t){var n=oc(Wl++,7);return vc(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function uc(e,t){return Yl=8,pc((function(){return e}),t)}function dc(e){var t=Gl.context[e.__c],n=oc(Wl++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Gl)),t.props.value):e.__}function hc(){for(var e;e=Kl.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(gc),e.__H.__h.forEach(yc),e.__H.__h=[]}catch(t){e.__H.__h=[],pl.__e(t,e.__v)}}pl.__b=function(e){Gl=null,ec&&ec(e)},pl.__r=function(e){tc&&tc(e),Wl=0;var t=(Gl=e.__c).__H;t&&(Ql===Gl?(t.__h=[],Gl.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Jl,e.__N=e.i=void 0}))):(t.__h.forEach(gc),t.__h.forEach(yc),t.__h=[])),Ql=Gl},pl.diffed=function(e){nc&&nc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Kl.push(t)&&Xl===pl.requestAnimationFrame||((Xl=pl.requestAnimationFrame)||mc)(hc)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Jl&&(e.__=e.__V),e.i=void 0,e.__V=Jl}))),Ql=Gl=null},pl.__c=function(e,t){t.some((function(e){try{e.__h.forEach(gc),e.__h=e.__h.filter((function(e){return!e.__||yc(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],pl.__e(n,e.__v)}})),rc&&rc(e,t)},pl.unmount=function(e){ic&&ic(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{gc(e)}catch(e){t=e}})),n.__H=void 0,t&&pl.__e(t,n.__v))};var fc="function"==typeof requestAnimationFrame;function mc(e){var t,n=function(){clearTimeout(r),fc&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);fc&&(t=requestAnimationFrame(n))}function gc(e){var t=Gl,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Gl=t}function yc(e){var t=Gl;e.__c=e.__(),Gl=t}function vc(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function bc(e,t){return"function"==typeof t?t(e):t}function wc(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=wc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function xc(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=wc(e))&&(r&&(r+=" "),r+=t);return r}function _c(e){const{entry:t,selected:n,onMouseEnter:r,onMouseLeave:i,onAction:o}=e;return Zl`
2
2
  <li
3
3
  class=${xc("entry",{selected:n})}
4
4
  data-id=${t.id}