Home
last modified time | relevance | path

Searched refs:unindent (Results 1 – 14 of 14) sorted by relevance

/plugin/refnotes/
H A Dadmin.php728 public function unindent() { global() function in refnotes_html_sink
/plugin/syntaxhighlighter3/sxh3/src/js/
H A DshCore.js933 function unindent(str) function
1587 code = unindent(code);
/plugin/syntaxhighlighter3/sxh3/pkg/scripts/
H A DshCore.js2214 function unindent(str) function
2868 code = unindent(code);
H A DshCore.min.js17 …tter:!0,toolbar:!0,"quick-code":!0,collapse:!1,"auto-links":!0,light:!1,unindent:!0,"html-script":… property in B.defaults
/plugin/syntaxhighlighter4/dist/
H A Dsyntaxhighlighter.js2969 code = unindenter.unindent(code, opts);
3033 unindent: function unindent(code) {
H A Dsyntaxhighlighter.js.map1unindent","tabSize","smart","regular","br","isEmpty","min","insertSpaces","tab","tags","hasClass",…
/plugin/bpmnio/vendor/bpmn-js/dist/
H A Dbpmn-viewer.production.min.js2 !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).BpmnJS=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}}))}const t=Object.prototype.toString,n=Object.prototype.hasOwnProperty;function i(e){return void 0===e}function r(e){return void 0!==e}function o(e){return"[object Array]"===t.call(e)}function a(e){return"[object Object]"===t.call(e)}function s(e){return"[object Number]"===t.call(e)}function l(e){const n=t.call(e);return"[object Function]"===n||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n}function p(e){return"[object String]"===t.call(e)}function c(e,t){return n.call(e,t)}function u(e,t){const n=v(t);let i;return f(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function h(e,t){const n=v(t);let i=[];return f(e,(function(e,t){n(e,t)&&i.push(e)})),i}function f(e,t){let n,r;if(i(e))return;const a=o(e)?w:x;for(let i in e)if(c(e,i)&&(n=e[i],r=t(n,a(i)),!1===r))return n}function m(e,t,n){return f(e,(function(e,i){n=t(n,e,i)})),n}function d(e,t){return!!m(e,(function(e,n,i){return e&&t(n,i)}),!0)}function y(e,t){return!!u(e,t)}function g(e){return function(t){return d(e,(function(e,n){return t[n]===e}))}}function v(e){return l(e)?e:t=>t===e}function x(e){return e}function w(e){return Number(e)}function b(e,t){return e.bind(t)}function E(e,...t){return Object.assign(e,...t)}function _(e,t){var n=this;t=t||1e3,e.on(["render.shape","render.connection"],t,(function(e,t){var i=e.type,r=t.element,o=t.gfx,a=t.attrs;if(n.canRender(r))return"render.shape"===i?n.drawShape(o,r,a):n.drawConnection(o,r,a)})),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 A(e,t){var n=R(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function R(e){return e&&e.businessObject||e}function k(e){return e&&e.di}function S(e,t){return!A(e,"bpmn:CallActivity")&&(A(e,"bpmn:SubProcess")?!(!(t=t||k(e))||!A(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded:!A(e,"bpmn:Participant")||!!R(e).processRef)}function C(e){if(A(e,"bpmn:Participant")||A(e,"bpmn:Lane")){var t=k(e).isHorizontal;return void 0===t||t}}_.prototype.canRender=function(e){},_.prototype.drawShape=function(e,t){},_.prototype.drawConnection=function(e,t){},_.prototype.getShapePath=function(e){},_.prototype.getConnectionPath=function(e){};var M={width:90,height:20};function P(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)],r=function(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)];return{x:n.x+(i.x-n.x)/2,y:n.y+(i.y-n.y)/2}}(e),o=Math.atan((i.y-n.y)/(i.x-n.x)),a=r.x,s=r.y;return Math.abs(o)<Math.PI/2?s-=15:a+=15,{x:a,y:s}}function N(e,t){var n,i,r,o=e.label;return o&&o.bounds?(r=o.bounds,i={width:Math.max(M.width,r.width),height:r.height},n={x:r.x+r.width/2,y:r.y+r.height/2}):(n=function(e){return e.waypoints?P(e.waypoints):A(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+M.height/2}:{x:e.x+e.width/2,y:e.y+e.height+M.height/2}}(t),i=M),E({x:n.x-i.width/2,y:n.y-i.height/2},i)}function T(e){var t=e.businessObject,n=function(e){return A(e,"bpmn:FlowElement")||A(e,"bpmn:Participant")||A(e,"bpmn:Lane")||A(e,"bpmn:SequenceFlow")||A(e,"bpmn:MessageFlow")||A(e,"bpmn:DataInput")||A(e,"bpmn:DataOutput")?"name":A(e,"bpmn:TextAnnotation")?"text":A(e,"bpmn:Group")?"categoryValueRef":void 0}(t);if(n)return"categoryValueRef"===n?function(e){var t=e.categoryValueRef;return t&&t.value||""}(t):t[n]||""}function D(e,t){return function(e,t){t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}(e,t))}(t,e),e}var B={"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":2,"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":2,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function O(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=B[i];r?(2===r&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function L(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return B[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);O(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)O(e,i,t[i])}(e,t);return e}const I=Object.prototype.toString;function F(e){return new j(e)}function j(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}j.prototype.add=function(e){return this.list.add(e),this},j.prototype.remove=function(e){return"[object RegExp]"==I.call(e)?this.removeMatching(e):(this.list.remove(e),this)},j.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},j.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},j.prototype.array=function(){return Array.from(this.list)},j.prototype.has=j.prototype.contains=function(e){return this.list.contains(e)};var V="http://www.w3.org/2000/svg",W='<svg xmlns="'+V+'"';function $(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(V)&&(e=W+e.substring(4)):(e=W+">"+e+"</svg>",t=!0);var n=function(e){var t;return(t=new DOMParser).async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function z(e,t){var n;return"<"===(e=e.trim()).charAt(0)?(n=$(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(V,e),t&&L(n,t),n}var G=null;function H(){return null===G&&(G=z("svg")),G}function K(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}function U(e){return H().createSVGTransform()}var q=/([&<>]{1})/g,Y=/([\n\r"]{1})/g,X={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function Z(e,t){return e.replace(t,(function(e,t){return X[t]||t}))}function J(e,t){var n,i,r,o,a;switch(e.nodeType){case 3:t.push(Z(e.textContent,q));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n<i;++n)o=r.item(n),t.push(" ",o.name,'="',Z(o.value,Y),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,i=(a=e.childNodes).length;n<i;++n)J(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",Z(e.nodeValue,q),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function Q(e,t){return function(e){for(var t=e.firstChild,n=[];t;)J(t,n),t=t.nextSibling;return n.join("")}(e)}function ee(e){var t=e.parentNode;return t&&t.removeChild(e),e}function te(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function ne(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(te(e,i))}(n,t)),n.consolidate()}function ie(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function re(e){return["L",e.x,e.y]}function oe(e,t){const n=e.length,i=[(r=e[0],["M",r.x,r.y])];var r,o,a,s;for(let r=1;r<n;r++){const n=e[r-1],l=e[r],p=e[r+1];if(!p||!t){i.push(re(l));continue}const c=Math.min(t,se(l.x-n.x,l.y-n.y),se(p.x-l.x,p.y-l.y));if(!c){i.push(re(l));continue}const u=ae(l,n,c),h=ae(l,n,.5*c),f=ae(l,p,c),m=ae(l,p,.5*c);i.push(re(u)),i.push((a=m,s=f,["C",(o=h).x,o.y,a.x,a.y,s.x,s.y]))}return i}function ae(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=n/se(i,r);return{x:e.x+i*o,y:e.y+r*o}}function se(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function le(e,t,n){s(t)&&(n=t,t=null),t||(t={});const i=z("path",t);return s(n)&&(i.dataset.cornerRadius=String(n)),pe(i,e)}function pe(e,t){return L(e,{d:ie(oe(t,parseInt(e.dataset.cornerRadius,10)||0))}),e}var ce="hsl(225, 10%, 15%)";function ue(e,t){return y(e.eventDefinitions,(function(e){return e.$type===t}))}function he(e,t,n){var i=k(e);return n||i.get("color:background-color")||i.get("bioc:fill")||t||"white"}function fe(e,t,n){var i=k(e);return n||i.get("color:border-color")||i.get("bioc:stroke")||t||ce}function me(e,t,n,i){var r=k(e).get("label");return i||r&&r.get("color:color")||t||fe(e,n)}function de(e,t={}){return{width:ye(e,t),height:ge(e,t)}}function ye(e,t={}){return c(t,"width")?t.width:e.width}function ge(e,t={}){return c(t,"height")?t.height:e.height}function ve(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 i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const xe=Object.prototype.toString,we=Object.prototype.hasOwnProperty;function be(e,t){return we.call(e,t)}function Ee(e,t){let n,i;if(void 0===e)return;const r=function(e){return"[object Array]"===xe.call(e)}(e)?Ae:_e;for(let o in e)if(be(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function _e(e){return e}function Ae(e){return Number(e)}function Re(e,...t){const n=e.style;return Ee(t,(function(e){e&&Ee(e,(function(e,t){n[t]=e}))})),e}function ke(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}const Se=Object.prototype.toString;function Ce(e){return new Me(e)}function Me(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Pe(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}Me.prototype.add=function(e){return this.list.add(e),this},Me.prototype.remove=function(e){return"[object RegExp]"==Se.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Me.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},Me.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Me.prototype.array=function(){return Array.from(this.list)},Me.prototype.has=Me.prototype.contains=function(e){return this.list.contains(e)};var Ne,Te,De,Be={};function Oe(){Ne=window.addEventListener?"addEventListener":"attachEvent",Te=window.removeEventListener?"removeEventListener":"detachEvent",De="addEventListener"!==Ne?"on":""}var Le=ve({__proto__:null,bind:Be.bind=function(e,t,n,i){return Ne||Oe(),e[Ne](De+t,n,i||!1),n},unbind:Be.unbind=function(e,t,n,i){return Te||Oe(),e[Te](De+t,n,i||!1),n},default:Be},[Be]),Ie=["focus","blur"];var Fe,je={bind:function(e,t,n,i,r){return-1!==Ie.indexOf(n)&&(r=!0),Le.bind(e,n,(function(n){var r=n.target||n.srcElement;n.delegateTarget=function(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}(r,t,!0),n.delegateTarget&&i.call(e,n)}),r)},unbind:function(e,t,n,i){return-1!==Ie.indexOf(t)&&(i=!0),Le.unbind(e,t,n,i)}},Ve=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 i=n[1];if("body"==i){return(r=t.createElement("html")).innerHTML=e,r.removeChild(r.lastChild)}var r,o=Object.prototype.hasOwnProperty.call($e,i)?$e[i]:$e._default,a=o[0],s=o[1],l=o[2];(r=t.createElement("div")).innerHTML=s+e+l;for(;a--;)r=r.lastChild;if(r.firstChild==r.lastChild)return r.removeChild(r.firstChild);var p=t.createDocumentFragment();for(;r.firstChild;)p.appendChild(r.removeChild(r.firstChild));return p},We=!1;"undefined"!=typeof document&&((Fe=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',We=!Fe.getElementsByTagName("link").length,Fe=void 0);var $e={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:We?[1,"X<div>","</div>"]:[0,"",""]};$e.td=$e.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],$e.option=$e.optgroup=[1,'<select multiple="multiple">',"</select>"],$e.thead=$e.tbody=$e.colgroup=$e.caption=$e.tfoot=[1,"<table>","</table>"],$e.polyline=$e.ellipse=$e.polygon=$e.circle=$e.text=$e.line=$e.path=$e.rect=$e.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var ze=Ve;function Ge(e,t){return(t=t||document).querySelector(e)}function He(e){e.parentNode&&e.parentNode.removeChild(e)}function Ke(e,t,n,i,r){var o=U();o.setTranslate(t,n);var a=U();a.setRotate(i||0,0,0);var s=U();s.setScale(1,1),ne(e,[o,a,s])}function Ue(e,t,n){var i=U();i.setTranslate(t,n),ne(e,i)}var qe=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 i=Math.log(Math.pow(2,e))/Math.log(n),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,e/r))/Math.log(n)*r;var o=i-Math.floor(i),a="";for(r=0;r<Math.floor(i);r++){a=Math.floor(Math.random()*n).toString(n)+a}if(o){var s=Math.pow(n,o);a=Math.floor(Math.random()*s).toString(n)+a}var l=parseInt(a,n);return l!==1/0&&l>=Math.pow(2,e)?t(e,n):a};t.rack=function(e,n,i){var r=function(r){var a=0;do{if(a++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var s=t(e,n)}while(Object.hasOwnProperty.call(o,s));return o[s]=r,s},o=r.hats={};return r.get=function(e){return r.hats[e]},r.set=function(e,t){return r.hats[e]=t,r},r.bits=e||128,r.base=n||16,r}}));function Ye(e){if(!(this instanceof Ye))return new Ye(e);e=e||[128,36,1],this._seed=e.length?qe.rack(e[0],e[1],e[2]):e}Ye.prototype.next=function(e){return this._seed(e||!0)},Ye.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},Ye.prototype.claim=function(e,t){this._seed.set(e,t||!0)},Ye.prototype.assigned=function(e){return this._seed.get(e)||!1},Ye.prototype.unclaim=function(e){delete this._seed.hats[e]},Ye.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};var Xe=new Ye,Ze=.95;function Je(e,t,n,i,r,o,s){_.call(this,t,s);var l=e&&e.defaultFillColor,p=e&&e.defaultStrokeColor,c=e&&e.defaultLabelColor;function u(e){return n.computeStyle(e,{strokeLinecap:"round",strokeLinejoin:"round",stroke:ce,strokeWidth:2,fill:"white"})}function h(e){return n.computeStyle(e,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:ce,strokeWidth:2})}function m(e,t){var{ref:n={x:0,y:0},scale:i=1,element:o,parentGfx:a=r._svg}=t,s=z("marker",{id:e,viewBox:"0 0 20 20",refX:n.x,refY:n.y,markerWidth:20*i,markerHeight:20*i,orient:"auto"});D(s,o);var l=Ge(":scope > defs",a);l||D(a,l=z("defs")),D(l,s)}function d(e,t,n,i){var r=Xe.nextPrefixed("marker-");return function(e,t,n,i,r){if("sequenceflow-end"===n){m(t,{element:z("path",{d:"M 1 5 L 11 10 L 1 15 Z",...u({fill:r,stroke:r,strokeWidth:1})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("messageflow-start"===n){m(t,{element:z("circle",{cx:6,cy:6,r:3.5,...u({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:6,y:6},parentGfx:e})}if("messageflow-end"===n){m(t,{element:z("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...u({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:8.5,y:5},parentGfx:e})}if("association-start"===n){m(t,{element:z("path",{d:"M 11 5 L 1 10 L 11 15",...h({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:1,y:10},scale:.5,parentGfx:e})}if("association-end"===n){m(t,{element:z("path",{d:"M 1 5 L 11 10 L 1 15",...h({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("conditional-flow-marker"===n){m(t,{element:z("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...u({fill:i,stroke:r})}),ref:{x:-1,y:10},scale:.5,parentGfx:e})}if("conditional-default-flow-marker"===n){m(t,{element:z("path",{d:"M 6 4 L 10 16",...u({stroke:r,fill:"none"})}),ref:{x:0,y:10},scale:.5,parentGfx:e})}}(e,r,t,n,i),"url(#"+r+")"}function y(e,t,n,i,r={}){a(i)&&(r=i,i=0),i=i||0,r=u(r);var o=z("circle",{cx:t/2,cy:n/2,r:Math.round((t+n)/4-i),...r});return D(e,o),o}function g(e,t,n,i,r,o){a(r)&&(o=r,r=0),r=r||0,o=u(o);var s=z("rect",{x:r,y:r,width:t-2*r,height:n-2*r,rx:i,ry:i,...o});return D(e,s),s}function v(e,t,n,i){var r=le(t,n=h(n),i);return D(e,r),r}function x(e,t,n){return v(e,t,n,5)}function w(e,t,n){n=h(n);var i=z("path",{...n,d:t});return D(e,i),i}function b(e,t,n,i){return w(t,n,E({"data-marker":e},i))}function M(e){return we[e]}function P(e){return function(t,n,i){return M(e)(t,n,i)}}var N=function(e,t,n={},r){return w(e,i.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:r?he(t,l,n.fill):fe(t,p,n.stroke),strokeWidth:1})},B=function(e,t,n={}){var r=y(e,t.width,t.height,.2*t.height,{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:2});w(e,i.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),{stroke:fe(t,p,n.stroke),strokeWidth:2});for(var o=0;o<12;o++){var a=i.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),s=t.width/2,c=t.height/2;w(e,a,{strokeWidth:1,stroke:fe(t,p,n.stroke),transform:"rotate("+30*o+","+c+","+s+")"})}return r},O=function(e,t,n={},r){return w(e,i.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},I=function(e,t,n={}){return w(e,i.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},j=function(e,t,n={},r){return w(e,i.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},V=function(e,t,n={},r){return w(e,i.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},W=function(e,t,n={},r){var o=w(e,i.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{fill:r?fe(t,p,n.stroke):"none",stroke:fe(t,p,n.stroke),strokeWidth:1});return function(e,t){var n=U();n.setRotate(t,0,0),ne(e,n)}(o,45),o},$=function(e,t,n={},r){return w(e,i.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.22,my:.5}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},G=function(e,t,n={},r){return w(e,i.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},H=function(e,t,n={},r){return w(e,i.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),strokeWidth:1})},K=function(e,t,n={}){return w(e,i.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},q=function(e,t,n={}){return y(e,t.width,t.height,8,{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:4})};function Y(e,t,n={}){var i=R(e),r=function(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}(i);return i.get("eventDefinitions")&&i.get("eventDefinitions").length>1?i.get("parallelMultiple")?K(t,e,n,r):H(t,e,n,r):ue(i,"bpmn:MessageEventDefinition")?N(t,e,n,r):ue(i,"bpmn:TimerEventDefinition")?B(t,e,n,r):ue(i,"bpmn:ConditionalEventDefinition")?I(t,e,n,r):ue(i,"bpmn:SignalEventDefinition")?G(t,e,n,r):ue(i,"bpmn:EscalationEventDefinition")?O(t,e,n,r):ue(i,"bpmn:LinkEventDefinition")?j(t,e,n,r):ue(i,"bpmn:ErrorEventDefinition")?V(t,e,n,r):ue(i,"bpmn:CancelEventDefinition")?W(t,e,n,r):ue(i,"bpmn:CompensateEventDefinition")?$(t,e,n,r):ue(i,"bpmn:TerminateEventDefinition")?q(t,e,n,r):null}var X={ParticipantMultiplicityMarker:function(e,t,n={}){var r=ye(t,n),o=ge(t,n);b("participant-multiplicity",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2-6)/r,my:(o-15)/o}}),{strokeWidth:2,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},SubProcessMarker:function(e,t,n={}){Ue(g(e,14,14,0,{strokeWidth:1,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)}),t.width/2-7.5,t.height-20),b("sub-process",e,i.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:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},ParallelMarker:function(e,t,n){var r=ye(t,n),o=ge(t,n);b("parallel",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.parallel)/r,my:(o-20)/o}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},SequentialMarker:function(e,t,n){b("sequential",e,i.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:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},CompensationMarker:function(e,t,n){b("compensation",e,i.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:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},LoopMarker:function(e,t,n){var r=ye(t,n),o=ge(t,n);b("loop",e,i.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.loop)/r,my:(o-7)/o}}),{strokeWidth:1.5,fill:"none",stroke:fe(t,p,n.stroke),strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){var r=ye(t,n),o=ge(t,n);b("adhoc",e,i.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.adhoc)/r,my:(o-15)/o}}),{strokeWidth:1,fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke)})}};function Z(e,t,n,i){X[e](t,n,i)}function J(e,t,n,i={}){i={fill:i.fill,stroke:i.stroke,width:ye(t,i),height:ge(t,i)};var r=R(t),o=n&&n.includes("SubProcessMarker");i=o?{...i,seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{...i,seq:-5,parallel:-6,compensation:-27,loop:0,adhoc:10},f(n,(function(n){Z(n,e,t,i)})),r.get("isForCompensation")&&Z("CompensationMarker",e,t,i),A(r,"bpmn:AdHocSubProcess")&&Z("AdhocMarker",e,t,i);var a=r.get("loopCharacteristics"),s=a&&a.get("isSequential");a&&(void 0===s&&Z("LoopMarker",e,t,i),!1===s&&Z("ParallelMarker",e,t,i),!0===s&&Z("SequentialMarker",e,t,i))}function Q(e,t,n={}){n=E({size:{width:100}},n);var i=o.createText(t||"",n);return F(i).add("djs-label"),D(e,i),i}function ee(e,t,n,i={}){var r=R(t),o=de({x:t.x,y:t.y,width:t.width,height:t.height},i);return Q(e,r.name,{align:n,box:o,padding:7,style:{fill:me(t,c,p,i.stroke)}})}function te(e,t,n,i={}){var r=C(n),o=Q(e,t,{box:{height:30,width:r?ge(n,i):ye(n,i)},align:"center-middle",style:{fill:me(n,c,p,i.stroke)}});r&&Ke(o,0,-(-1*ge(n,i)),270)}function ie(e,t,n={}){var{width:i,height:r}=de(t,n);return g(e,i,r,10,{...n,fill:he(t,l,n.fill),fillOpacity:Ze,stroke:fe(t,p,n.stroke)})}function re(e,t,n={}){var i=R(t),r=he(t,l,n.fill),o=fe(t,p,n.stroke);return"One"!==i.get("associationDirection")&&"Both"!==i.get("associationDirection")||(n.markerEnd=d(e,"association-end",r,o)),"Both"===i.get("associationDirection")&&(n.markerStart=d(e,"association-start",r,o)),n=Qe(n,["markerStart","markerEnd"]),x(e,t.waypoints,{...n,stroke:o,strokeDasharray:"0, 5"})}function oe(e,t,n={}){var r=he(t,l,n.fill),o=fe(t,p,n.stroke),a=w(e,i.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:r,fillOpacity:Ze,stroke:o});(function(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection})(R(t))&&w(e,i.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:r,stroke:o});return a}function ae(e,t,n={}){return y(e,t.width,t.height,{fillOpacity:Ze,...n,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})}function se(e,t,n={}){return function(e,t,n,i){var r=t/2,o=n/2,a=[{x:r,y:0},{x:t,y:o},{x:r,y:n},{x:0,y:o}].map((function(e){return e.x+","+e.y})).join(" ");i=u(i);var s=z("polygon",{...i,points:a});return D(e,s),s}(e,t.width,t.height,{fill:he(t,l,n.fill),fillOpacity:Ze,stroke:fe(t,p,n.stroke)})}function pe(e,t,n={}){var i=g(e,ye(t,n),ge(t,n),0,{fill:he(t,l,n.fill),fillOpacity:n.fillOpacity||Ze,stroke:fe(t,p,n.stroke),strokeWidth:1.5}),r=R(t);A(r,"bpmn:Lane")&&te(e,r.get("name"),t,n);return i}function ve(e,t,n={}){var i=ie(e,t,n);(function(e){return e&&!!R(e).triggeredByEvent})(t)&&L(i,{strokeDasharray:"0, 5.5",strokeWidth:2.5});var r=S(t);return ee(e,t,r?"center-top":"center-middle",n),J(e,t,r?void 0:["SubProcessMarker"],n),i}function xe(e,t,n={}){var i=ie(e,t,n);return ee(e,t,"center-middle",n),J(e,t,void 0,n),i}var we=this.handlers={"bpmn:AdHocSubProcess":function(e,t,n={}){return ve(e,t,n=S(t)?Qe(n,["fill","stroke","width","height"]):Qe(n,["fill","stroke"]))},"bpmn:Association":function(e,t,n={}){return re(e,t,n=Qe(n,["fill","stroke"]))},"bpmn:BoundaryEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=Qe(n,["fill","stroke"]);var r=R(t).get("cancelActivity");n={strokeWidth:1.5,fill:he(t,l,n.fill),fillOpacity:1,stroke:fe(t,p,n.stroke)},r||(n.strokeDasharray="6");var o=ae(e,t,n);return y(e,t.width,t.height,3,{...n,fill:"none"}),i&&Y(t,e,n),o},"bpmn:BusinessRuleTask":function(e,t,n={}){var r=xe(e,t,n=Qe(n,["fill","stroke"]));return L(w(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}})),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),L(w(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}})),{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:CallActivity":function(e,t,n={}){return n=Qe(n,["fill","stroke"]),ve(e,t,{strokeWidth:5,...n})},"bpmn:ComplexGateway":function(e,t,n={}){var r=se(e,t,n=Qe(n,["fill","stroke"]));return w(e,i.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:DataInput":function(e,t,n={}){n=Qe(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=oe(e,t,n);return w(e,r,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:1}),o},"bpmn:DataInputAssociation":function(e,t,n={}){return n=Qe(n,["fill","stroke"]),re(e,t,{...n,markerEnd:d(e,"association-end",he(t,l,n.fill),fe(t,p,n.stroke))})},"bpmn:DataObject":function(e,t,n={}){return oe(e,t,n=Qe(n,["fill","stroke"]))},"bpmn:DataObjectReference":P("bpmn:DataObject"),"bpmn:DataOutput":function(e,t,n={}){n=Qe(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=oe(e,t,n);return w(e,r,{strokeWidth:1,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)}),o},"bpmn:DataOutputAssociation":function(e,t,n={}){return n=Qe(n,["fill","stroke"]),re(e,t,{...n,markerEnd:d(e,"association-end",he(t,l,n.fill),fe(t,p,n.stroke))})},"bpmn:DataStoreReference":function(e,t,n={}){return n=Qe(n,["fill","stroke"]),w(e,i.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{fill:he(t,l,n.fill),fillOpacity:Ze,stroke:fe(t,p,n.stroke),strokeWidth:2})},"bpmn:EndEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=Qe(n,["fill","stroke"]);var r=ae(e,t,{...n,strokeWidth:4});return i&&Y(t,e,n),r},"bpmn:EventBasedGateway":function(e,t,n={}){n=Qe(n,["fill","stroke"]);var r=R(t),o=se(e,t,n);y(e,t.width,t.height,.2*t.height,{fill:he(t,"none",n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1});var a=r.get("eventGatewayType"),s=!!r.get("instantiate");if("Parallel"===a){var l=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}});w(e,l,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:1})}else"Exclusive"===a&&(s||y(e,t.width,t.height,.26*t.height,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:1}),function(){var r=i.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}});w(e,r,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:2})}());return o},"bpmn:ExclusiveGateway":function(e,t,n={}){var r=se(e,t,n=Qe(n,["fill","stroke"])),o=i.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return k(t).get("isMarkerVisible")&&w(e,o,{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:Gateway":function(e,t,n={}){return se(e,t,n=Qe(n,["fill","stroke"]))},"bpmn:Group":function(e,t,n={}){return n=Qe(n,["fill","stroke","width","height"]),g(e,t.width,t.height,10,{stroke:fe(t,p,n.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:ye(t,n),height:ge(t,n)})},"bpmn:InclusiveGateway":function(e,t,n={}){var i=se(e,t,n=Qe(n,["fill","stroke"]));return y(e,t.width,t.height,.24*t.height,{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:2.5}),i},"bpmn:IntermediateEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=Qe(n,["fill","stroke"]);var r=ae(e,t,{...n,strokeWidth:1.5});return y(e,t.width,t.height,3,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:1.5}),i&&Y(t,e,n),r},"bpmn:IntermediateCatchEvent":P("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":P("bpmn:IntermediateEvent"),"bpmn:Lane":function(e,t,n={}){return n=Qe(n,["fill","stroke","width","height"]),pe(e,t,{...n,fillOpacity:.25})},"bpmn:ManualTask":function(e,t,n={}){var r=xe(e,t,n=Qe(n,["fill","stroke"]));return w(e,i.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:.5}),r},"bpmn:MessageFlow":function(e,t,n={}){n=Qe(n,["fill","stroke"]);var r=R(t),o=k(t),a=he(t,l,n.fill),s=fe(t,p,n.stroke),c=x(e,t.waypoints,{markerEnd:d(e,"messageflow-end",a,s),markerStart:d(e,"messageflow-start",a,s),stroke:s,strokeDasharray:"10, 11",strokeWidth:1.5});if(r.get("messageRef")){var u=c.getPointAtLength(c.getTotalLength()/2),h=i.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:u.x,y:u.y}}),f={strokeWidth:1};"initiating"===o.get("messageVisibleKind")?(f.fill=a,f.stroke=s):(f.fill=s,f.stroke=a);var m=w(e,h,f),y=Q(e,r.get("messageRef").get("name"),{align:"center-top",fitBox:!0,style:{fill:s}}),g=m.getBBox(),v=y.getBBox();Ke(y,u.x-v.width/2,u.y+g.height/2+10,0)}return c},"bpmn:ParallelGateway":function(e,t,n={}){var r=se(e,t,n=Qe(n,["fill","stroke"]));return w(e,i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:Participant":function(e,t,n={}){var i=pe(e,t,n=Qe(n,["fill","stroke","width","height"])),r=S(t),o=C(t),a=R(t),s=a.get("name");if(r){v(e,o?[{x:30,y:0},{x:30,y:ge(t,n)}]:[{x:0,y:30},{x:ye(t,n),y:30}],{stroke:fe(t,p,n.stroke),strokeWidth:1.5}),te(e,s,t,n)}else{var l=de(t,n);o||(l.height=ye(t,n),l.width=ge(t,n));var u=Q(e,s,{box:l,align:"center-middle",style:{fill:me(t,c,p,n.stroke)}});if(!o)Ke(u,0,-(-1*ge(t,n)),270)}return a.get("participantMultiplicity")&&Z("ParticipantMultiplicityMarker",e,t,n),i},"bpmn:ReceiveTask":function(e,t,n={}){n=Qe(n,["fill","stroke"]);var r,o=R(t),a=xe(e,t,n);return o.get("instantiate")?(y(e,28,28,4.4,{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),r=i.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):r=i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),w(e,r,{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),a},"bpmn:ScriptTask":function(e,t,n={}){var r=xe(e,t,n=Qe(n,["fill","stroke"]));return w(e,i.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:SendTask":function(e,t,n={}){var r=xe(e,t,n=Qe(n,["fill","stroke"]));return w(e,i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{fill:fe(t,p,n.stroke),stroke:he(t,l,n.fill),strokeWidth:1}),r},"bpmn:SequenceFlow":function(e,t,n={}){n=Qe(n,["fill","stroke"]);var i=he(t,l,n.fill),r=fe(t,p,n.stroke),o=x(e,t.waypoints,{markerEnd:d(e,"sequenceflow-end",i,r),stroke:r}),a=R(t),{source:s}=t;if(s){var c=R(s);a.get("conditionExpression")&&A(c,"bpmn:Activity")&&L(o,{markerStart:d(e,"conditional-flow-marker",i,r)}),c.get("default")&&(A(c,"bpmn:Gateway")||A(c,"bpmn:Activity"))&&c.get("default")===a&&L(o,{markerStart:d(e,"conditional-default-flow-marker",i,r)})}return o},"bpmn:ServiceTask":function(e,t,n={}){var r=xe(e,t,n=Qe(n,["fill","stroke"]));return y(e,10,10,{fill:he(t,l,n.fill),stroke:"none",transform:"translate(6, 6)"}),w(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),y(e,10,10,{fill:he(t,l,n.fill),stroke:"none",transform:"translate(11, 10)"}),w(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:StartEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=Qe(n,["fill","stroke"]),R(t).get("isInterrupting")||(n={...n,strokeDasharray:"6"});var r=ae(e,t,n);return i&&Y(t,e,n),r},"bpmn:SubProcess":function(e,t,n={}){return ve(e,t,n=S(t)?Qe(n,["fill","stroke","width","height"]):Qe(n,["fill","stroke"]))},"bpmn:Task":function(e,t,n={}){return xe(e,t,n=Qe(n,["fill","stroke"]))},"bpmn:TextAnnotation":function(e,t,n={}){n=Qe(n,["fill","stroke","width","height"]);var{width:r,height:o}=de(t,n),a=g(e,r,o,0,0,{fill:"none",stroke:"none"});return w(e,i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:0,my:0}}),{stroke:fe(t,p,n.stroke)}),Q(e,R(t).get("text")||"",{align:"left-top",box:de(t,n),padding:7,style:{fill:me(t,c,p,n.stroke)}}),a},"bpmn:Transaction":function(e,t,i={}){i=S(t)?Qe(i,["fill","stroke","width","height"]):Qe(i,["fill","stroke"]);var r=ve(e,t,{strokeWidth:1.5,...i}),o=n.style(["no-fill","no-events"],{stroke:fe(t,p,i.stroke),strokeWidth:1.5});return S(t)||(i={}),g(e,ye(t,i),ge(t,i),7,3,o),r},"bpmn:UserTask":function(e,t,n={}){var r=xe(e,t,n=Qe(n,["fill","stroke"]));return w(e,i.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:.5}),w(e,i.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:.5}),w(e,i.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:.5}),r},label:function(e,t,n={}){return function(e,t,n={}){var i={width:90,height:30,x:t.width/2+t.x,y:t.height/2+t.y};return Q(e,T(t),{box:i,fitBox:!0,style:E({},o.getExternalStyle(),{fill:me(t,c,p,n.stroke)})})}(e,t,n)}};this._drawPath=w,this._renderer=M}function Qe(e,t=[]){return t.reduce(((t,n)=>(e[n]&&(t[n]=e[n]),t)),{})}e(Je,_),Je.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Je.prototype.canRender=function(e){return A(e,"bpmn:BaseElement")},Je.prototype.drawShape=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},Je.prototype.drawConnection=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},Je.prototype.getShapePath=function(e){return A(e,"bpmn:Event")?function(e){var t=e.x+e.width/2,n=e.y+e.height/2,i=e.width/2;return ie([["M",t,n],["m",0,-i],["a",i,i,0,1,1,0,2*i],["a",i,i,0,1,1,0,-2*i],["z"]])}(e):A(e,"bpmn:Activity")?function(e,t){var n=e.x,i=e.y,r=e.width,o=e.height;return ie([["M",n+t,i],["l",r-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-r,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):A(e,"bpmn:Gateway")?function(e){var t=e.width/2,n=e.height/2;return ie([["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,i=e.width;return ie([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])}(e)};var et={width:150,height:50};function tt(e,t){var n;t.textContent=e;try{var i,r=""===e;return t.textContent=r?"dummy":e,i={width:(n=t.getBBox()).width+2*n.x,height:n.height},r&&(i.width=0),i}catch(e){return console.log(e),{width:0,height:0}}}function nt(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=tt(o,n)).width=o?i.width:0," "===o||""===o||i.width<Math.round(t)||o.length<2)return it(e,o,r,i);o=ot(o,i.width,t)}}function it(e,t,n,i){if(t.length<n.length){var r=n.slice(t.length).trim();e.unshift(r)}return{width:i.width,height:i.height,text:t}}var rt="­";function ot(e,t,n){var i=Math.max(e.length*(n/t),1),r=function(e,t){var n,i=e.split(/(\s|-|\u00AD)/g),r=[],o=0;if(i.length>1)for(;n=i.shift();){if(!(n.length+o<t)){"-"!==n&&n!==rt||r.pop();break}r.push(n),o+=n.length}var a=r[r.length-1];return a&&a===rt&&(r[r.length-1]="-"),r.join("")}(e,i);return r||(r=e.slice(0,Math.max(Math.round(i-1),1))),r}function at(e){this._config=E({},{size:et,padding:0,style:{},align:"center-top"},e||{})}at.prototype.createText=function(e,t){return this.layoutText(e,t).element},at.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},at.prototype.layoutText=function(e,t){var n=E({},this._config.size,t.box),i=E({},this._config.style,t.style),r=function(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}(t.align||this._config.align),o=function(e){return a(e)?E({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,l=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(i),p=e.split(/\u00AD?\r?\n/),c=[],u=n.width-o.left-o.right,h=z("text");for(L(h,{x:0,y:0}),L(h,i),D(function(){var e=document.getElementById("helper-svg");return e||(L(e=z("svg"),{id:"helper-svg"}),Re(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}(),h);p.length;)c.push(nt(p,u,h));"middle"===r.vertical&&(o.top=o.bottom=0);var d=m(c,(function(e,t,n){return e+(l||t.height)}),0)+o.top+o.bottom,y=m(c,(function(e,t,n){return t.width>e?t.width:e}),0),g=o.top;"middle"===r.vertical&&(g+=(n.height-d)/2),g-=(l||c[0].height)/4;var v=z("text");return L(v,i),f(c,(function(e){var t;switch(g+=l||e.height,r.horizontal){case"left":t=o.left;break;case"right":t=(s?y:u)-o.right-e.width;break;default:t=Math.max(((s?y:u)-e.width)/2+o.left,0)}var n=z("tspan");L(n,{x:t,y:g}),n.textContent=e.text,D(v,n)})),ee(h),{dimensions:{width:y,height:d},element:v}};function st(e){var t=E({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=E({},t,{fontSize:n},e&&e.externalStyle||{}),r=new at({style:t});this.getExternalLabelBounds=function(e,t){var n=r.getDimensions(t,{box:{width:90,height:30},style:i});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 i=r.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(i.height))}},this.createText=function(e,t){return r.createText(e,t||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return i}}st.$inject=["config.textRenderer"];var lt=/\{([^{}]+)\}/g,pt=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var ct={__init__:["bpmnRenderer"],bpmnRenderer:["type",Je],textRenderer:["type",st],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,i,r=this.pathMap[e];t.abspos?(n=t.abspos.x,i=t.abspos.y):(n=t.containerWidth*t.position.mx,i=t.containerHeight*t.position.my);var o={};if(t.position){for(var a=t.containerHeight/r.height*t.yScaleFactor,s=t.containerWidth/r.width*t.xScaleFactor,l=0;l<r.heightElements.length;l++)o["y"+l]=r.heightElements[l]*a;for(var p=0;p<r.widthElements.length;p++)o["x"+p]=r.widthElements[p]*s}var c,u,h=(c=r.d,u={mx:n,my:i,e:o},String(c).replace(lt,(function(e,t){return function(e,t,n){var i=n;return t.replace(pt,(function(e,t,n,r,o){t=t||r,i&&(t in i&&(i=i[t]),"function"==typeof i&&o&&(i=i()))})),i=(null==i||i==n?e:i)+""}(e,t,u)})));return h}}]};var ut={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]};function ht(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function ft(e){return t={x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2},{x:Math.round(t.x),y:Math.round(t.y)};var t}function mt(e){for(var t=e.waypoints,n=t.reduce((function(e,n,i){var r,o,a=t[i-1];if(a){var s=e[e.length-1],l=s&&s.endLength||0,p=(r=a,o=n,Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)));e.push({start:a,end:n,startLength:l,endLength:l+p,length:p})}return e}),[]),i=n.reduce((function(e,t){return e+t.length}),0)/2,r=0,o=n[r];o.endLength<i;)o=n[++r];var a=(i-o.startLength)/o.length;return{x:o.start.x+(o.end.x-o.start.x)*a,y:o.start.y+(o.end.y-o.start.y)*a}}function dt(e){return a(t=e)&&c(t,"waypoints")?mt(e):ft(e);var t}function yt(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function gt(e,t,n){return E({id:e.id,type:e.$type,businessObject:e,di:t},n)}function vt(e,t,n){var i=e.waypoint;return!i||i.length<2?[dt(t),dt(n)]:i.map((function(e){return{x:e.x,y:e.y}}))}function xt(e,t,n){return new Error(`element ${yt(t)} referenced by ${yt(e)}#${n} not yet drawn`)}function wt(e,t,n,i,r){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._textRenderer=r}wt.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],wt.prototype.add=function(e,t,n){var i,r,o,a,s,l,p;if(A(t,"bpmndi:BPMNPlane")){var c=A(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};i=this._elementFactory.createRoot(gt(e,t,c)),this._canvas.addRootElement(i)}else if(A(t,"bpmndi:BPMNShape")){var u=!S(e,t),h=function(e){return A(e,"bpmn:Group")}(e);r=n&&(n.hidden||n.collapsed);var f=t.bounds;i=this._elementFactory.createShape(gt(e,t,{collapsed:u,hidden:r,x:Math.round(f.x),y:Math.round(f.y),width:Math.round(f.width),height:Math.round(f.height),isFrame:h})),A(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,i),A(e,"bpmn:Lane")&&(o=0),A(e,"bpmn:DataStoreReference")&&(a=n,s=dt(f),l=s.x,p=s.y,l>=a.x&&l<=a.x+a.width&&p>=a.y&&p<=a.y+a.height||(n=this._canvas.findRoot(n))),this._canvas.addShape(i,n,o)}else{if(!A(t,"bpmndi:BPMNEdge"))throw new Error(`unknown di ${yt(t)} for element ${yt(e)}`);var m=this._getSource(e),d=this._getTarget(e);r=n&&(n.hidden||n.collapsed),i=this._elementFactory.createConnection(gt(e,t,{hidden:r,source:m,target:d,waypoints:vt(t,m,d)})),A(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(i,n,o)}return function(e){return A(e,"bpmn:Event")||A(e,"bpmn:Gateway")||A(e,"bpmn:DataStoreReference")||A(e,"bpmn:DataObjectReference")||A(e,"bpmn:DataInput")||A(e,"bpmn:DataOutput")||A(e,"bpmn:SequenceFlow")||A(e,"bpmn:MessageFlow")||A(e,"bpmn:Group")}(e)&&T(i)&&this.addLabel(e,t,i),this._eventBus.fire("bpmnElement.added",{element:i}),i},wt.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${yt(e)}#attachedToRef`);var i=this._elementRegistry.get(n.id),r=i&&i.attachers;if(!i)throw xt(e,n,"attachedToRef");t.host=i,r||(i.attachers=r=[]),-1===r.indexOf(t)&&r.push(t)},wt.prototype.addLabel=function(e,t,n){var i,r,o;return i=N(t,n),(r=T(n))&&(i=this._textRenderer.getExternalLabelBounds(i,r)),o=this._elementFactory.createLabel(gt(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!T(n),x:Math.round(i.x),y:Math.round(i.y),width:Math.round(i.width),height:Math.round(i.height)})),this._canvas.addShape(o,n.parent)},wt.prototype._getConnectedElement=function(e,t){var n,i,r=e.$type;if(i=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===r&&(i=i&&i[0]),("source"===t&&"bpmn:DataOutputAssociation"===r||"target"===t&&"bpmn:DataInputAssociation"===r)&&(i=e.$parent),n=i&&this._getElement(i))return n;throw i?xt(e,i,t+"Ref"):new Error(`${yt(e)}#${t} Ref not specified`)},wt.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},wt.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},wt.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};var bt={__depends__:[ct,{__depends__:[ut],bpmnImporter:["type",wt]}]};function Et(e,t){var n,i,r,a;return t=!!t,o(e)||(e=[e]),f(e,(function(e){var o=e;e.waypoints&&!t&&(o=Et(e.waypoints,!0));var s=o.x,l=o.y,p=o.height||0,c=o.width||0;(s<n||void 0===n)&&(n=s),(l<i||void 0===i)&&(i=l),(s+c>r||void 0===r)&&(r=s+c),(l+p>a||void 0===a)&&(a=l+p)})),{x:n,y:i,height:a-i,width:r-n}}function _t(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function At(e){return!(!e||!e.isFrame)}function Rt(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}Rt.prototype.next=function(){return this._prefix+ ++this._counter};var kt=new Rt("ov");function St(e,t,n,i){var r,o;this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=kt,this._overlayDefaults=E({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(r=n.getContainer(),Re(o=ze('<div class="djs-overlay-container" />'),{position:"absolute",width:0,height:0}),r.insertBefore(o,r.firstChild),o),this._init()}function Ct(e,t,n){Re(e,{left:t+"px",top:n+"px"})}function Mt(e,t){e.style.display=!1===t?"none":""}function Pt(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}St.$inject=["config.overlays","eventBus","canvas","elementRegistry"],St.prototype.get=function(e){if(p(e)&&(e={id:e}),p(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?h(t.overlays,g({type:e.type})):t.overlays.slice():[]}return e.type?h(this._overlays,g({type:e.type})):e.id?this._overlays[e.id]:null},St.prototype.add=function(e,t,n){if(a(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 i=this._ids.next();return n=E({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},St.prototype.remove=function(e){var t=this.get(e)||[];o(t)||(t=[t]);var n=this;f(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(He(e.html),He(e.htmlContainer),delete e.htmlContainer,delete e.element,delete n._overlays[e.id]),t){var i=t.overlays.indexOf(e);-1!==i&&t.overlays.splice(i,1)}}))},St.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},St.prototype.show=function(){Mt(this._overlayRoot)},St.prototype.hide=function(){Mt(this._overlayRoot,!1)},St.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Pe(this._overlayRoot)},St.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var o=Et(t);i=o.x,r=o.y}Ct(n,i,r),ke(e.html,"data-container-id",t.id)},St.prototype._updateOverlay=function(e){var t,n,i=e.position,r=e.htmlContainer,o=e.element,a=i.left,s=i.top;void 0!==i.right&&(t=o.waypoints?Et(o).width:o.width,a=-1*i.right+t);void 0!==i.bottom&&(n=o.waypoints?Et(o).height:o.height,s=-1*i.bottom+n);Ct(r,a||0,s||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},St.prototype._createOverlayContainer=function(e){var t=ze('<div class="djs-overlays" />');Re(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},St.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Pt(this._overlayRoot,n)},St.prototype._getOverlayContainer=function(e,t){var n=u(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},St.prototype._addOverlay=function(e){var t,n,i=e.id,r=e.element,o=e.html;o.get&&o.constructor.prototype.jquery&&(o=o.get(0)),p(o)&&(o=ze(o)),n=this._getOverlayContainer(r),Re(t=ze('<div class="djs-overlay" data-overlay-id="'+i+'">'),{position:"absolute"}),t.appendChild(o),e.type&&Ce(t).add("djs-overlay-"+e.type),Mt(t,this._canvas.findRoot(r)===this._canvas.getRootElement()),e.htmlContainer=t,n.overlays.push(e),n.html.appendChild(t),this._overlays[i]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},St.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,i=this._canvas.findRoot(e.element),o=n&&n.minZoom,a=n&&n.maxZoom,s=e.htmlContainer,l=!0;(i!==this._canvas.getRootElement()||n&&(r(o)&&o>t.scale||r(a)&&a<t.scale))&&(l=!1),Mt(s,l),this._updateOverlayScale(e,t)},St.prototype._updateOverlayScale=function(e,t){var n,i,o,a=e.scale,s=e.htmlContainer,l="";!0!==a&&(!1===a?(n=1,i=1):(n=a.min,i=a.max),r(n)&&t.scale<n&&(o=(1/t.scale||1)*n),r(i)&&t.scale>i&&(o=(1/t.scale||1)*i)),r(o)&&(l="scale("+o+","+o+")"),Pt(s,l)},St.prototype._updateOverlaysVisibilty=function(e){var t=this;f(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},St.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;f(t.get({element:n}),(function(e){t.remove(e.id)}));var i=t._getOverlayContainer(n);if(i){He(i.html);var r=t._overlayContainers.indexOf(i);-1!==r&&t._overlayContainers.splice(r,1)}})),e.on("element.changed",500,(function(e){var n=e.element,i=t._getOverlayContainer(n,!0);i&&(f(i.overlays,(function(e){t._updateOverlay(e)})),t._updateOverlayContainer(i))})),e.on("element.marker.update",(function(e){var n=t._getOverlayContainer(e.element,!0);n&&Ce(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 Nt={__init__:["overlays"],overlays:["type",St]};function Tt(e,t,n,i){e.on("element.changed",(function(i){var r=i.element;(r.parent||r===t.getRootElement())&&(i.gfx=n.getGraphics(r)),i.gfx&&e.fire(_t(r)+".changed",i)})),e.on("elements.changed",(function(t){var n=t.elements;n.forEach((function(t){e.fire("element.changed",{element:t})})),i.updateContainments(n)})),e.on("shape.changed",(function(e){i.update("shape",e.element,e.gfx)})),e.on("connection.changed",(function(e){i.update("connection",e.element,e.gfx)}))}Tt.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var Dt={__init__:["changeSupport"],changeSupport:["type",Tt]};function Bt(e){this._eventBus=e}function Ot(e){return function(t,n,i,r,o){(l(t)||s(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}}function Lt(e,t){t.invoke(Bt,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)}))}Bt.$inject=["eventBus"],Bt.prototype.on=function(e,t,n,i,r,p){if((l(t)||s(t))&&(p=r,r=i,i=n,n=t,t=null),l(n)&&(p=r,r=i,i=n,n=1e3),a(r)&&(p=r,r=!1),!l(i))throw new Error("handlerFn must be a function");o(e)||(e=[e]);var c=this._eventBus;f(e,(function(e){var o=["commandStack",e,t].filter((function(e){return e})).join(".");c.on(o,n,r?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(i,p):i,p)}))},Bt.prototype.canExecute=Ot("canExecute"),Bt.prototype.preExecute=Ot("preExecute"),Bt.prototype.preExecuted=Ot("preExecuted"),Bt.prototype.execute=Ot("execute"),Bt.prototype.executed=Ot("executed"),Bt.prototype.postExecute=Ot("postExecute"),Bt.prototype.postExecuted=Ot("postExecuted"),Bt.prototype.revert=Ot("revert"),Bt.prototype.reverted=Ot("reverted"),e(Lt,Bt),Lt.$inject=["canvas","injector"];var It={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",Lt]},Ft={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};var jt="_plane";function Vt(e){var t=e.id;return A(e,"bpmn:SubProcess")?function(e){return e+jt}(t):t}function Wt(e,t,n){var i=ze('<ul class="bjs-breadcrumbs"></ul>'),r=n.getContainer(),o=Ce(r);r.appendChild(i);var a=[];function s(e){e&&(a=function(e){for(var t=R(e),n=[],i=t;i;i=i.$parent)(A(i,"bpmn:SubProcess")||A(i,"bpmn:Process"))&&n.push(i);return n.reverse()}(e));var r=a.flatMap((function(e){var i=n.findRoot(Vt(e))||n.findRoot(e.id);if(!i&&A(e,"bpmn:Process")){var r=t.find((function(t){var n=R(t);return n&&n.get("processRef")===e}));i=r&&n.findRoot(r.id)}if(!i)return[];var o,a=(o=""+(o=e.name||e.id))&&o.replace(/[&<>"']/g,(function(e){return Ft[e]})),s=ze('<li><span class="bjs-crumb"><a title="'+a+'">'+a+"</a></span></li>");return s.addEventListener("click",(function(){n.setRootElement(i)})),s}));i.innerHTML="";var s=r.length>1;o.toggle("bjs-breadcrumbs-shown",s),r.forEach((function(e){i.appendChild(e)}))}e.on("element.changed",(function(e){var t=R(e.element);u(a,(function(e){return e===t}))&&s()})),e.on("root.set",(function(e){s(e.element)}))}function $t(e,t){var n=null,i=new zt;e.on("root.set",(function(e){var r=e.element,o=t.viewbox(),a=i.get(r);if(i.set(n,{x:o.x,y:o.y,zoom:o.scale}),n=r,A(r,"bpmn:SubProcess")||a){a=a||{x:0,y:0,zoom:1};var s=(o.x-a.x)*o.scale,l=(o.y-a.y)*o.scale;0===s&&0===l||t.scroll({dx:s,dy:l}),a.zoom!==o.scale&&t.zoom(a.zoom,{x:0,y:0})}})),e.on("diagram.clear",(function(){i.clear(),n=null}))}function zt(){this._entries=[],this.set=function(e,t){var n=!1;for(var i in this._entries)if(this._entries[i][0]===e){this._entries[i][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)}}Wt.$inject=["eventBus","elementRegistry","canvas"],$t.$inject=["eventBus","canvas"];var Gt=180,Ht=160;function Kt(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 Ut(e){return A(e,"bpmndi:BPMNDiagram")?e:Ut(e.$parent)}Kt.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)})),e.diagrams.filter((e=>e.plane)).flatMap((e=>t._createNewDiagrams(e.plane))).forEach((function(e){t._movePlaneElementsToOrigin(e.plane)}))}},Kt.prototype._createNewDiagrams=function(e){var t=this,n=[],i=[];e.get("planeElement").forEach((function(t){var r=t.bpmnElement;if(r){var o=r.$parent;A(r,"bpmn:SubProcess")&&!t.isExpanded&&n.push(r),function(e,t){var n=e.$parent;if(!A(n,"bpmn:SubProcess")||n===t.bpmnElement)return!1;if(function(e,t){return y(t,(function(t){return A(e,t)}))}(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))return!1;return!0}(r,e)&&i.push({diElement:t,parent:o})}}));var r=[];return n.forEach((function(e){if(!t._processToDiagramMap[e.id]){var n=t._createDiagram(e);t._processToDiagramMap[e.id]=n,r.push(n)}})),i.forEach((function(e){for(var i=e.diElement,r=e.parent;r&&-1===n.indexOf(r);)r=r.$parent;if(r){var o=t._processToDiagramMap[r.id];t._moveToDiPlane(i,o.plane)}})),r},Kt.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=ht(e.bounds);t.top=Math.min(n.top,t.top),t.left=Math.min(n.left,t.left)}})),function(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}(t)}(e),i=n.x-Gt,r=n.y-Ht;t.forEach((function(e){e.waypoint?e.waypoint.forEach((function(e){e.x=e.x-i,e.y=e.y-r})):e.bounds&&(e.bounds.x=e.bounds.x-i,e.bounds.y=e.bounds.y-r)}))},Kt.prototype._moveToDiPlane=function(e,t){var n=Ut(e).plane.get("planeElement");n.splice(n.indexOf(e),1),t.get("planeElement").push(e)},Kt.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},Kt.$inject=["eventBus","moddle"];var qt=250;function Yt(e,t,n,i,r){Bt.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=i,this._translate=r;var o=this;this.executed("shape.toggleCollapse",qt,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.reverted("shape.toggleCollapse",qt,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.executed(["shape.create","shape.move","shape.delete"],qt,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;o._canDrillDown(i)&&o._addOverlay(i),o._updateDrilldownOverlay(t),o._updateDrilldownOverlay(n),o._updateDrilldownOverlay(i)}),!0),this.reverted(["shape.create","shape.move","shape.delete"],qt,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;o._canDrillDown(i)&&o._addOverlay(i),o._updateDrilldownOverlay(t),o._updateDrilldownOverlay(n),o._updateDrilldownOverlay(i)}),!0),t.on("import.render.complete",(function(){n.filter((function(e){return o._canDrillDown(e)})).map((function(e){o._addOverlay(e)}))}))}e(Yt,Bt),Yt.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},Yt.prototype._canDrillDown=function(e){var t=this._canvas;return A(e,"bpmn:SubProcess")&&t.findRoot(Vt(e))},Yt.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=R(e),i=t.get({element:n.id,type:"drilldown"})[0];if(i){var r=n&&n.get("flowElements")&&n.get("flowElements").length;Ce(i.html).toggle("bjs-drilldown-empty",!r)}},Yt.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,i=R(e);n.get({element:e,type:"drilldown"}).length&&this._removeOverlay(e);var r=ze('<button type="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>'),o=i.get("name")||i.get("id"),a=this._translate("Open {element}",{element:o});r.setAttribute("title",a),r.addEventListener("click",(function(){t.setRootElement(t.findRoot(Vt(e)))})),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:r}),this._updateOverlayVisibility(e)},Yt.prototype._removeOverlay=function(e){this._overlays.remove({element:e,type:"drilldown"})},Yt.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];var Xt={__depends__:[Nt,Dt,It],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",Wt],drilldownCentering:["type",$t],drilldownOverlayBehavior:["type",Yt],subprocessCompatibility:["type",Kt]};function Zt(e){return e.originalEvent||e.srcEvent}function Jt(e,t){return(Zt(e)||e).button===t}function Qt(e){return Jt(e,0)}function en(e){return!0}function tn(e){return Qt(e)||function(e){return Jt(e,1)}(e)}function nn(e,t,n){var i=this;function r(n,i,r){var o,a;(function(e,t){var n=l[e]||Qt;return!n(t)})(n,i)||(r?a=t.getGraphics(r):(o=i.delegateTarget||i.target)&&(a=o,r=t.get(a)),a&&r&&!1===e.fire(n,{element:r,gfx:a,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var o={};function a(e){return o[e]}var s={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":en,"element.mousedown":tn,"element.mouseup":tn,"element.click":tn,"element.dblclick":tn};function p(e,t,n,i){var a=o[n]=function(e){r(n,e)};i&&(l[n]=i),a.$delegate=je.bind(e,"svg, .djs-element",t,a)}function c(e,t,n){var i=a(n);i&&je.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){var t;t=e.svg,f(s,(function(e,n){c(t,n,e)}))})),e.on("canvas.init",(function(e){var t;t=e.svg,f(s,(function(e,n){p(t,n,e)}))})),e.on(["shape.added","connection.added"],(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.createHit",{element:n,gfx:i})})),e.on(["shape.changed","connection.changed"],500,(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.updateHit",{element:n,gfx:i})})),e.on("interactionEvents.createHit",500,(function(e){var t=e.element,n=e.gfx;i.createDefaultHit(t,n)})),e.on("interactionEvents.updateHit",(function(e){var t=e.element,n=e.gfx;i.updateDefaultHit(t,n)}));var u=d("djs-hit djs-hit-stroke"),h=d("djs-hit djs-hit-click-stroke"),m={all:d("djs-hit djs-hit-all"),"click-stroke":h,stroke:u,"no-move":d("djs-hit djs-hit-no-move")};function d(e,t){return t=E({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function y(e,t){var n=m[t];if(!n)throw new Error("invalid hit type <"+t+">");return L(e,n),e}function g(e,t){D(e,t)}this.removeHits=function(e){var t;f((t=".djs-hit",(e||document).querySelectorAll(t)),ee)},this.createDefaultHit=function(e,t){var n,i=e.waypoints,r=e.isFrame;return i?this.createWaypointsHit(t,i):(n=r?"stroke":"all",this.createBoxHit(t,n,{width:e.width,height:e.height}))},this.createWaypointsHit=function(e,t){var n=le(t);return y(n,"stroke"),g(e,n),n},this.createBoxHit=function(e,t,n){n=E({x:0,y:0},n);var i=z("rect");return y(i,t),L(i,n),g(e,i),i},this.updateDefaultHit=function(e,t){var n=Ge(".djs-hit",t);if(n)return e.waypoints?pe(n,e.waypoints):L(n,{width:e.width,height:e.height}),n},this.fire=r,this.triggerMouseEvent=function(e,t,n){var i=s[e];if(!i)throw new Error("unmapped DOM event name <"+e+">");return r(i,t,n)},this.mouseHandler=a,this.registerEvent=p,this.unregisterEvent=c}nn.$inject=["eventBus","elementRegistry","styles"];var rn={__init__:["interactionEvents"],interactionEvents:["type",nn]};function on(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)}))}on.$inject=["eventBus","canvas"],on.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(-1!==n){var i=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:t})}},on.prototype.get=function(){return this._selectedElements},on.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},on.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();o(e)||(e=e?[e]:[]);var r=this._canvas,a=r.getRootElement();e=e.filter((function(e){var t=r.findRoot(e);return a===t})),t?f(e,(function(e){-1===n.indexOf(e)&&n.push(e)})):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:n})};var an="hover",sn="selected";function ln(e,t){function n(t,n){e.addMarker(t,n)}function i(t,n){e.removeMarker(t,n)}this._canvas=e,t.on("element.hover",(function(e){n(e.element,an)})),t.on("element.out",(function(e){i(e.element,an)})),t.on("selection.changed",(function(e){var t=e.oldSelection,r=e.newSelection;f(t,(function(e){-1===r.indexOf(e)&&i(e,sn)})),f(r,(function(e){-1===t.indexOf(e)&&n(e,sn)}))}))}function pn(e,t,n,i){e.on("create.end",500,(function(e){var n=e.context,i=n.canExecute,r=n.elements,a=(n.hints||{}).autoSelect;if(i){if(!1===a)return;o(a)?t.select(a):t.select(r.filter(cn))}})),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||[],r=i.get(e.context.shape.id);u(n,(function(e){return r.id===e.id}))||t.select(r)})),e.on("element.click",(function(e){if(Qt(e)){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,a=function(e){var t=Zt(e)||e;return Qt(e)&&t.shiftKey}(e);if(r&&o)return a?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,a)}}))}function cn(e){return!e.hidden}ln.$inject=["canvas","eventBus"],pn.$inject=["eventBus","selection","canvas","elementRegistry"];var un={__init__:["selectionVisuals","selectionBehavior"],__depends__:[rn],selection:["type",on],selectionVisuals:["type",ln],selectionBehavior:["type",pn]};const hn=/^class[ {]/;function fn(e){return Array.isArray(e)}function mn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function dn(...e){1===e.length&&fn(e[0])&&(e=e[0]);const t=(e=[...e]).pop();return t.$inject=e,t}const yn=/constructor\s*[^(]*\(\s*([^)]*)\)/m,gn=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,vn=/\/\*([^*]*)\*\//m;function xn(e){if("function"!=typeof e)throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(function(e){return hn.test(e.toString())}(e)?yn:gn);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map((e=>{const t=e.match(vn);return(t&&t[1]||e).trim()}))||[]}function wn(e,t){const n=t||{get:function(e,t){if(i.push(e),!1===t)return null;throw s(`No provider for "${e}"!`)}},i=[],r=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(e){const t=i.join(" -> ");return i.length=0,new Error(t?`${e} (Resolving: ${t})`:e)};function l(e,t){if(!r[e]&&e.includes(".")){const t=e.split(".");let n=l(t.shift());for(;t.length;)n=n[t.shift()];return n}if(mn(o,e))return o[e];if(mn(r,e)){if(-1!==i.indexOf(e))throw i.push(e),s("Cannot resolve circular dependency!");return i.push(e),o[e]=r[e][0](r[e][1]),i.pop(),o[e]}return n.get(e,t)}function p(e,t){if(void 0===t&&(t={}),"function"!=typeof e){if(!fn(e))throw s(`Cannot invoke "${e}". Expected a function!`);e=dn(e.slice())}return{fn:e,dependencies:(e.$inject||xn(e)).map((e=>mn(t,e)?t[e]:l(e)))}}function c(e){const{fn:t,dependencies:n}=p(e);return new(Function.prototype.bind.call(t,null,...n))}function u(e,t,n){const{fn:i,dependencies:r}=p(e,n);return i.apply(t,r)}function h(e){return dn((t=>e.get(t)))}function f(e,t){if(t&&t.length){const n=Object.create(null),i=Object.create(null),o=[],a=[],s=[];let l,p,c,u;for(let e in r)l=r[e],-1!==t.indexOf(e)&&("private"===l[2]?(p=o.indexOf(l[3]),-1===p?(c=l[3].createChild([],t),u=h(c),o.push(l[3]),a.push(c),s.push(u),n[e]=[u,e,"private",c]):n[e]=[s[p],e,"private",a[p]]):n[e]=[l[2],l[1]],i[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]],i[t]=!0)}));t.forEach((e=>{if(!i[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')})),e.unshift(n)}return new wn(e,a)}const m={factory:u,type:c,value:function(e){return e}};function d(e,t){const n=e.__init__||[];return function(){n.forEach((e=>{"string"==typeof e?t.get(e):t.invoke(e)}))}}function y(e){const t=e.__exports__;if(t){const n=e.__modules__,i=Object.keys(e).reduce(((t,n)=>("__exports__"!==n&&"__modules__"!==n&&"__init__"!==n&&"__depends__"!==n&&(t[n]=e[n]),t)),Object.create(null)),o=f((n||[]).concat(i)),a=dn((function(e){return o.get(e)}));t.forEach((function(e){r[e]=[a,e,"private",o]}));const s=(e.__init__||[]).slice();return s.unshift((function(){o.init()})),d(e=Object.assign({},e,{__init__:s}),o)}return Object.keys(e).forEach((function(t){if("__init__"===t||"__depends__"===t)return;const n=e[t];if("private"===n[2])return void(r[t]=n);const i=n[0],o=n[1];r[t]=[m[i],bn(i,o),i]})),d(e,a)}function g(e,t){return-1!==e.indexOf(t)||-1!==(e=(t.__depends__||[]).reduce(g,e)).indexOf(t)?e:e.concat(t)}this.get=l,this.invoke=u,this.instantiate=c,this.createChild=f,this.init=function(e){const t=e.reduce(g,[]).map(y);let n=!1;return function(){n||(n=!0,t.forEach((e=>e())))}}(e)}function bn(e,t){return"value"!==e&&fn(t)&&(t=dn(t.slice())),t}function En(e,t){_.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(En,_),En.prototype.canRender=function(){return!0},En.prototype.drawShape=function(e,t,n){var i=z("rect");return L(i,{x:0,y:0,width:t.width||0,height:t.height||0}),At(t)?L(i,E({},this.FRAME_STYLE,n||{})):L(i,E({},this.SHAPE_STYLE,n||{})),D(e,i),i},En.prototype.drawConnection=function(e,t,n){var i=le(t.waypoints,E({},this.CONNECTION_STYLE,n||{}));return D(e,i),i},En.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width;return ie([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])},En.prototype.getConnectionPath=function(e){var t,n,i=e.waypoints,r=[];for(t=0;n=i[t];t++)n=n.original||n,r.push([0===t?"M":"L",n.x,n.y]);return ie(r)},En.$inject=["eventBus","styles"];var _n={__init__:["defaultRenderer"],defaultRenderer:["type",En],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 E(this.style(t,n),{class:e})},this.style=function(t,n){o(t)||n||(n=t,t=[]);var i=m(t,(function(t,n){return E(t,e[n]||{})}),{});return n?E(i,n):i},this.computeStyle=function(e,n,i){return o(n)||(i=n,n=[]),t.style(n||[],E({},i,e||{}))}}]};function An(e,t){return Math.round(e*t)/t}function Rn(e){return s(e)?e+"px":e}function kn(e,t,n){const i=z("g");F(i).add(t);const r=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]||null),i}const Sn={shape:["x","y","width","height"],connection:["waypoints"]};function Cn(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}function Mn(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}Cn.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],Cn.prototype._init=function(e){const t=this._eventBus,n=this._container=function(e){const t=(e=E({},{width:"100%",height:"100%"},e)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),Re(n,{position:"relative",overflow:"hidden",width:Rn(e.width),height:Rn(e.height)}),t.appendChild(n),n}(e),i=this._svg=z("svg");L(i,{width:"100%",height:"100%"}),ke(i,"tabindex",0),e.autoFocus&&t.on("element.hover",(()=>{this.restoreFocus()})),t.on("element.mousedown",500,(e=>{this.focus()})),i.addEventListener("focusin",(()=>{this._setFocused(!0)})),i.addEventListener("focusout",(()=>{this._setFocused(!1)})),D(n,i);const r=this._viewport=kn(i,"viewport");e.deferUpdate&&(this._viewboxChanged=function(e,t){let n,i,r,o;function a(n){let a=Date.now(),p=n?0:o+t-a;if(p>0)return s(p);e.apply(r,i),l()}function s(e){n=setTimeout(a,e)}function l(){n&&clearTimeout(n),n=o=i=r=void 0}function p(...e){o=Date.now(),i=e,r=this,n||s(t)}return p.flush=function(){n&&a(!0),l()},p.cancel=l,p}(b(this._viewboxChanged,this),300)),t.on("diagram.init",(()=>{t.fire("canvas.init",{svg:i,viewport:r})})),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)},Cn.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},Cn.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},Cn.prototype._clear=function(){this._elementRegistry.getAll().forEach((e=>{const t=_t(e);"root"===t?this.removeRootElement(e):this._removeElement(e,t)})),this._planes=[],this._rootElement=null,delete this._cachedViewbox},Cn.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},Cn.prototype.restoreFocus=function(){document.activeElement===document.body&&this.focus()},Cn.prototype.isFocused=function(){return this._focused},Cn.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},Cn.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},Cn.prototype._getChildIndex=function(e){return m(this._layers,(function(t,n){return n.visible&&e>=n.index&&t++,t}),0)},Cn.prototype._createLayer=function(e,t){void 0===t&&(t=1);const n=this._getChildIndex(t);return{group:kn(this._viewport,"layer-"+e,n),index:t,visible:!0}},Cn.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,i=t.group,r=t.index;if(t.visible)return i;const o=this._getChildIndex(r);return n.insertBefore(i,n.childNodes[o]||null),t.visible=!0,i},Cn.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?(ee(n),t.visible=!1,n):n},Cn.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],ee(t.group))},Cn.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},Cn.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},Cn.prototype.getRootElements=function(){return this._planes.map((function(e){return e.rootElement}))},Cn.prototype._findPlaneForRoot=function(e){return u(this._planes,(function(t){return t.rootElement===e}))},Cn.prototype.getContainer=function(){return this._container},Cn.prototype._updateMarker=function(e,t,n){let i;e.id||(e=this._elementRegistry.get(e)),e.markers=e.markers||new Set,i=this._elementRegistry._elements[e.id],i&&(f([i.gfx,i.secondaryGfx],(function(i){i&&(n?(e.markers.add(t),F(i).add(t)):(e.markers.delete(t),F(i).remove(t)))})),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},Cn.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},Cn.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},Cn.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),!!e.markers&&e.markers.has(t)},Cn.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},Cn.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},Cn.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 i=this.getLayer(n,0);return this.hideLayer(n),this._addRoot(e,i),this._planes.push({rootElement:e,layer:i}),e},Cn.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},Cn.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},Cn.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)},Cn.prototype._addRoot=function(e,t){const n=this._elementRegistry,i=this._eventBus;i.fire("root.add",{element:e}),n.add(e,t),i.fire("root.added",{element:e,gfx:t})},Cn.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})},Cn.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=Sn[e],i=d(n,(function(e){return void 0!==t[e]}));if(!i)throw new Error("must supply { "+n.join(", ")+" } with "+e)},Cn.prototype._setParent=function(e,t,n){!function(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}(t.children,e,n),e.parent=t},Cn.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();const r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),r.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);const a=o.create(e,t,i);return this._elementRegistry.add(t,a),o.update(e,t,a),r.fire(e+".added",{element:t,gfx:a}),t},Cn.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},Cn.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},Cn.prototype._removeElement=function(e,t){const n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(e=n.get(e.id||e))return r.fire(t+".remove",{element:e}),i.remove(e),function(e,t){if(!e||!t)return-1;var n=e.indexOf(t);-1!==n&&e.splice(n,1)}(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},Cn.prototype.removeShape=function(e){return this._removeElement(e,"shape")},Cn.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},Cn.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},Cn.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},Cn.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},Cn.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let i,r,o,a,s,l,p;return e?(this._changeViewbox((function(){s=Math.min(n.width/e.width,n.height/e.height);const i=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);ne(t,i)})),e):(o=this._rootElement?this.getActiveLayer():null,i=o&&o.getBBox()||{},a=ne(t),r=a?a.matrix:function(e,t,n,i,r,o){var a=H().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return K(a,e);case 6:return K(a,{a:e,b:t,c:n,d:i,e:r,f:o})}}(),s=An(r.a,1e3),l=An(-r.e||0,1e3),p=An(-r.f||0,1e3),e=this._cachedViewbox={x:l?l/s:0,y:p?p/s:0,width:n.width/s,height:n.height/s,scale:s,inner:{width:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:n})},Cn.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox((function(){e=E({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),Mn(t,n)})),{x:n.e,y:n.f}},Cn.prototype.scrollToElement=function(e,t){let n=100;"string"==typeof e&&(e=this._elementRegistry.get(e));const i=this.findRoot(e);if(i!==this.getRootElement()&&this.setRootElement(i),i===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 r=Et(e),o=ht(r),a=this.viewbox(),s=this.zoom();let l,p;a.y+=t.top/s,a.x+=t.left/s,a.width-=(t.right+t.left)/s,a.height-=(t.bottom+t.top)/s;const c=ht(a);if(r.width<a.width&&r.height<a.height){const e=Math.max(0,o.right-c.right),t=Math.min(0,o.left-c.left),n=Math.max(0,o.bottom-c.bottom),i=Math.min(0,o.top-c.top);l=e||t,p=n||i}else l=r.x-a.x,p=r.y-a.y;this.scroll({dx:-l*s,dy:-p*s})},Cn.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if("fit-viewport"===e)return this._fitViewport(t);let n,i;return this._changeViewbox((function(){"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)})),An(i.a,1e3)},Cn.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,i=t.inner;let r,o;return i.x>=0&&i.y>=0&&i.x+i.width<=n.width&&i.y+i.height<=n.height&&!e?o={x:0,y:0,width:Math.max(i.width+i.x,n.width),height:Math.max(i.height+i.y,n.height)}:(r=Math.min(1,n.width/i.width,n.height/i.height),o={x:i.x+(e?i.width/2-n.width/r/2:0),y:i.y+(e?i.height/2-n.height/r/2:0),width:n.width/r,height:n.height/r}),this.viewbox(o),this.viewbox(!1).scale},Cn.prototype._setZoom=function(e,t){const n=this._svg,i=this._viewport,r=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,l,p,c;l=i.getCTM();const u=l.a;return t?(a=E(o,t),s=a.matrixTransform(l.inverse()),p=r.translate(s.x,s.y).scale(1/u*e).translate(-s.x,-s.y),c=l.multiply(p)):c=r.scale(e),Mn(this._viewport,c),c},Cn.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},Cn.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}},Cn.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Pn="data-element-id";function Nn(e){this._elements={},this._eventBus=e}function Tn(e,t,n){var i=function(e,t,n,i){var r=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,r,i)),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,r,i)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:i}),i.length&&i.forEach((function(i){e.set(i,t.inverse,n)}))}function Dn(e,t){if(!(this instanceof Dn))return new Dn(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Nn.$inject=["eventBus"],Nn.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),L(t,Pn,i),n&&L(n,Pn,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},Nn.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(L(i.gfx,Pn,""),i.secondaryGfx&&L(i.secondaryGfx,Pn,""),delete t[n])},Nn.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),i=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,i)},Nn.prototype.updateGraphics=function(e,t,n){var i=e.id||e,r=this._elements[i];return n?r.secondaryGfx=t:r.gfx=t,t&&L(t,Pn,i),t},Nn.prototype.get=function(e){var t;t="string"==typeof e?e:e&&L(e,Pn);var n=this._elements[t];return n&&n.element},Nn.prototype.filter=function(e){var t=[];return this.forEach((function(n,i){e(n,i)&&t.push(n)})),t},Nn.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),i=0;i<n.length;i++){var r=t[n[i]],o=r.element;if(e(o,r.gfx))return o}},Nn.prototype.getAll=function(){return this.filter((function(e){return e}))},Nn.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach((function(n){var i=t[n],r=i.element,o=i.gfx;return e(r,o)}))},Nn.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},Nn.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")},Dn.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?Tn(this,t,e):function(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var o=r;r=null,o&&e.unset(o,i,n),r=t,e.set(r,i,n)}}})}(this,t,e)},Dn.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return function(e){return!0===e.__refs_collection}(n)||Tn(this,t,e),n},Dn.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},Dn.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},Dn.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Bn=new Dn({name:"children",enumerable:!0,collection:!0},{name:"parent"}),On=new Dn({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Ln=new Dn({name:"attachers",collection:!0},{name:"host"}),In=new Dn({name:"outgoing",collection:!0},{name:"source"}),Fn=new Dn({name:"incoming",collection:!0},{name:"target"});function jn(){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)}}),Bn.bind(this,"parent"),On.bind(this,"labels"),In.bind(this,"outgoing"),Fn.bind(this,"incoming")}function Vn(){jn.call(this),Bn.bind(this,"children"),Ln.bind(this,"host"),Ln.bind(this,"attachers")}function Wn(){jn.call(this),Bn.bind(this,"children")}function $n(){Vn.call(this),On.bind(this,"labelTarget")}function zn(){jn.call(this),In.bind(this,"source"),Fn.bind(this,"target")}e(Vn,jn),e(Wn,Vn),e($n,Vn),e(zn,jn);var Gn={connection:zn,shape:Vn,label:$n,root:Wn};function Hn(){this._uid=12}Hn.prototype.createRoot=function(e){return this.create("root",e)},Hn.prototype.createLabel=function(e){return this.create("label",e)},Hn.prototype.createShape=function(e){return this.create("shape",e)},Hn.prototype.createConnection=function(e){return this.create("connection",e)},Hn.prototype.create=function(e,t){return(t=E({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=Gn[e];if(!n)throw new Error("unknown type: <"+e+">");return E(new n,t)}(e,t)};var Kn="__fn",Un=Array.prototype.slice;function qn(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function Yn(){}function Xn(e,t){this._eventBus=e,this._elementRegistry=t}function Zn(e,t,n){var i=n||t.firstChild;e!==i&&t.insertBefore(e,i)}qn.prototype.on=function(e,t,n,i){if(e=o(e)?e:[e],l(t)&&(i=n,n=t,t=1e3),!s(t))throw new Error("priority must be a number");var r=n;i&&((r=b(n,i))[Kn]=n[Kn]||n);var a=this;e.forEach((function(e){a._addListener(e,{priority:t,callback:r,next:null})}))},qn.prototype.once=function(e,t,n,i){var r=this;if(l(t)&&(i=n,n=t,t=1e3),!s(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var t=n.apply(i,arguments);return r.off(e,o),t}o[Kn]=n,this.on(e,t,o)},qn.prototype.off=function(e,t){e=o(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},qn.prototype.createEvent=function(e){var t=new Yn;return t.init(e),t},qn.prototype.fire=function(e,t){var n,i,r,o;if(o=Un.call(arguments),"object"==typeof e&&(e=(t=e).type),!e)throw new Error("no event type specified");if(i=this._listeners[e]){n=t instanceof Yn?t:this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{r=this._invokeListeners(n,o,i)}finally{e!==a&&(n.type=a)}return void 0===r&&n.defaultPrevented&&(r=!1),r}},qn.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},qn.prototype._destroy=function(){this._listeners={}},qn.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},qn.prototype._invokeListener=function(e,t,n){var i;if(n.callback.__isTomb)return i;try{i=function(e,t){return e.apply(null,t)}(n.callback,t),void 0!==i&&(e.returnValue=i,e.stopPropagation()),!1===i&&e.preventDefault()}catch(e){if(!this.handleError(e))throw console.error("unhandled error in event listener",e),e}return i},qn.prototype._addListener=function(e,t){var n,i=this._getListeners(e);if(i){for(;i;){if(i.priority<t.priority)return t.next=i,void(n?n.next=t:this._setListeners(e,t));n=i,i=i.next}n.next=t}else this._setListeners(e,t)},qn.prototype._getListeners=function(e){return this._listeners[e]},qn.prototype._setListeners=function(e,t){this._listeners[e]=t},qn.prototype._removeListener=function(e,t){var n,i,r,o=this._getListeners(e);if(t)for(;o;)n=o.next,(r=o.callback)!==t&&r[Kn]!==t||(i?i.next=n:this._setListeners(e,n)),i=o,o=n;else this._setListeners(e,null)},Yn.prototype.stopPropagation=function(){this.cancelBubble=!0},Yn.prototype.preventDefault=function(){this.defaultPrevented=!0},Yn.prototype.init=function(e){E(this,e||{})},Xn.$inject=["eventBus","elementRegistry"],Xn.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=function(e){return e.parentNode.childNodes[1]}(n),t||(F(t=z("g")).add("djs-children"),D(n.parentNode,t))):t=n,t},Xn.prototype._clear=function(e){var t=function(e){return e.childNodes[0]}(e);return Pe(t),t},Xn.prototype._createContainer=function(e,t,n,i){var r=z("g");F(r).add("djs-group"),void 0!==n?Zn(r,t,t.childNodes[n]):D(t,r);var o=z("g");F(o).add("djs-element"),F(o).add("djs-"+e),i&&F(o).add("djs-frame"),D(r,o);var a=z("g");return F(a).add("djs-visual"),D(o,a),o},Xn.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,At(t))},Xn.prototype.updateContainments=function(e){var t,n=this,i=this._elementRegistry;t=m(e,(function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e}),{}),f(t,(function(e){var t=e.children;if(t){var r=n._getChildrenContainer(e);f(t.slice().reverse(),(function(e){Zn(i.getGraphics(e).parentNode,r)}))}}))},Xn.prototype.drawShape=function(e,t,n={}){return this._eventBus.fire("render.shape",{gfx:e,element:t,attrs:n})},Xn.prototype.getShapePath=function(e){return this._eventBus.fire("render.getShapePath",e)},Xn.prototype.drawConnection=function(e,t,n={}){return this._eventBus.fire("render.connection",{gfx:e,element:t,attrs:n})},Xn.prototype.getConnectionPath=function(e){return this._eventBus.fire("render.getConnectionPath",e)},Xn.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if("shape"===e)this.drawShape(i,t),Ue(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(i,t)}t.hidden?L(n,"display","none"):L(n,"display","block")}},Xn.prototype.remove=function(e){ee(this._elementRegistry.getGraphics(e).parentNode)};var Jn={__depends__:[_n],__init__:["canvas"],canvas:["type",Cn],elementRegistry:["type",Nn],elementFactory:["type",Hn],eventBus:["type",qn],graphicsFactory:["type",Xn]};function Qn(e){return function(e){var t=new wn(e);return t.init(),t}([{config:["value",e=e||{}]},Jn].concat(e.modules||[]))}function ei(e,t){this._injector=t||Qn(e),this.get("eventBus").fire("diagram.init")}function ti(){}function ni(e,t){this.model=e,this.properties=t}ei.prototype.get=function(e,t){return this._injector.get(e,t)},ei.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},ei.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},ei.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")},ti.prototype.get=function(e){return this.$model.properties.get(this,e)},ti.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},ni.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(ti.prototype);f(e.properties,(function(e){e.isMany||void 0===e.default||(i[e.name]=e.default)})),n.defineModel(i,t),n.defineDescriptor(i,e);var r=e.ns.name;function o(e){n.define(this,"$type",{value:r,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),f(e,b((function(e,t){this.set(t,e)}),this))}return o.prototype=i,o.hasType=i.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var ii={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},ri={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 oi(e,t){var n=ri[e];return n?n(t):t}function ai(e){return!!ii[e]}function si(e){return!!ri[e]}function li(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function pi(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function ci(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,f(e,b(this.registerPackage,this))}function ui(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function hi(e){this.model=e}function fi(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function mi(e){return e.replace(/^:/,"")}function di(e,t={}){this.properties=new hi(this),this.factory=new ni(this,this.properties),this.registry=new ci(e,this.properties),this.typeCache={},this.config=t}pi.prototype.build=function(){return function(e,t){let n={},i=Object(e);return f(t,(function(t){t in i&&(n[t]=e[t])})),n}(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},pi.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},pi.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,o=this.propertiesByName,a=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=r.indexOf(e);if(-1===s)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,a),o[i.name]=o[i.localName]=t},pi.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=li(r[0],i),a=li(r[1],o.prefix).name,s=this.propertiesByName[a];if(!s)throw new Error("refined property <"+a+"> not found");this.replaceProperty(s,e,n),delete e.redefines},pi.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},pi.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},pi.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},pi.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},pi.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},pi.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},pi.prototype.hasProperty=function(e){return this.propertiesByName[e]},pi.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(f(e.properties,b((function(n){n=E({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var i=n.replaces,r=n.redefines;i||r?this.redefineProperty(n,i||r,i):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))}),this)),i.push(e),n[r]=e)},ci.prototype.getPackage=function(e){return this.packageMap[e]},ci.prototype.getPackages=function(){return this.packages},ci.prototype.registerPackage=function(e){e=E({},e);var t=this.packageMap;ui(t,e,"prefix"),ui(t,e,"uri"),f(e.types,b((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},ci.prototype.registerType=function(e,t){var n=li((e=E({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:E(e.meta||{})})).name,t.prefix),i=n.name,r={};f(e.properties,b((function(e){var t=li(e.name,n.prefix),i=t.name;ai(e.type)||(e.type=li(e.type,t.prefix).name),E(e,{ns:t,name:i}),r[i]=e}),this)),E(e,{ns:n,name:i,propertiesByName:r}),f(e.extends,b((function(e){var t=li(e,n.prefix),r=this.typeMap[t.name];r.traits=r.traits||[],r.traits.push(i)}),this)),this.definePackage(e,t),this.typeMap[i]=e},ci.prototype.mapTypes=function(e,t,n){var i=ai(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(n,i){var o=li(n,ai(n)?"":e.prefix);r.mapTypes(o,t,i)}function a(e){return o(e,!0)}if(!i)throw new Error("unknown type <"+e.name+">");f(i.superClass,n?a:function(e){return o(e,!1)}),t(i,!n),f(i.traits,a)},ci.prototype.getEffectiveDescriptor=function(e){var t=li(e),n=new pi(t);this.mapTypes(t,(function(e,t){n.addTrait(e,t)}));var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},ci.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},hi.prototype.set=function(e,t,n){if(!p(t)||!t.length)throw new TypeError("property name must be a non-empty string");var i=this.getProperty(e,t),r=i&&i.name;void 0===n?i?delete e[r]:delete e.$attrs[mi(t)]:i?r in e?e[r]=n:fi(e,i,n):e.$attrs[mi(t)]=n},hi.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[mi(t)];var i=n.name;return!e[i]&&n.isMany&&fi(e,n,[]),e[i]},hi.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;delete(n=E({},n,{get:function(){return i}})).value}Object.defineProperty(e,t,n)},hi.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},hi.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},hi.prototype.getProperty=function(e,t){var n=this.model,i=n.getPropertyDescriptor(e,t);if(i)return i;if(t.includes(":"))return null;const r=n.config.strict;if(void 0!==r){const n=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(r)throw n;"undefined"!=typeof console&&console.warn(n)}return null},di.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},di.prototype.getType=function(e){var t=this.typeCache,n=p(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},di.prototype.createAny=function(e,t,n){var o=li(e),s={$type:e,$instanceOf:function(e){return e===this.$type},get:function(e){return this[e]},set:function(e,t){!function(e,t,n){let o=e;f(t,(function(e,a){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 s=t[a+1],l=o[e];r(s)&&null==l&&(l=o[e]=isNaN(+s)?{}:[]),i(s)?i(n)?delete o[e]:o[e]=n:o=l}))}(this,[e],t)}},l={name:e,isGeneric:!0,ns:{prefix:o.prefix,localName:o.localName,uri:t}};return this.properties.defineDescriptor(s,l),this.properties.defineModel(s,this),this.properties.define(s,"get",{enumerable:!1,writable:!0}),this.properties.define(s,"set",{enumerable:!1,writable:!0}),this.properties.define(s,"$parent",{enumerable:!1,writable:!0}),this.properties.define(s,"$instanceOf",{enumerable:!1,writable:!0}),f(n,(function(e,t){a(e)&&void 0!==e.value?s[e.name]=e.value:s[t]=e})),s},di.prototype.getPackage=function(e){return this.registry.getPackage(e)},di.prototype.getPackages=function(){return this.registry.getPackages()},di.prototype.getElementDescriptor=function(e){return e.$descriptor},di.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},di.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},di.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var yi=String.fromCharCode,gi=Object.prototype.hasOwnProperty,vi=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,xi={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function wi(e,t,n,i){return i?gi.call(xi,i)?xi[i]:"&"+i+";":yi(t||parseInt(n,16))}function bi(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(vi,wi):e}Object.keys(xi).forEach((function(e){xi[e.toUpperCase()]=xi[e]}));var Ei="non-whitespace outside of root node";function _i(e){return new Error(e)}function Ai(e){return"missing namespace for prefix <"+e+">"}function Ri(e){return{get:e,enumerable:!0}}function ki(e){var t,n={};for(t in e)n[t]=e[t];return n}function Si(e){return e+"$uri"}function Ci(){return{line:0,column:0}}function Mi(e){throw e}function Pi(e){if(!this)return new Pi(e);var t,n,i,r,o,a,s,l,p,c=e&&e.proxy,u=Mi,h=Ci,f=!1,m=!1,d=null,y=!1;function g(e){e instanceof Error||(e=_i(e)),d=e,u(e,h)}function v(e){o&&(e instanceof Error||(e=_i(e)),o(e,h))}this.on=function(e,p){if("function"!=typeof p)throw _i("required args <name, cb>");switch(e){case"openTag":n=p;break;case"text":t=p;break;case"closeTag":i=p;break;case"error":u=p;break;case"warn":o=p;break;case"cdata":r=p;break;case"attention":l=p;break;case"question":s=p;break;case"comment":a=p;break;default:throw _i("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw _i("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return m=!0,p=n,this},this.parse=function(e){if("string"!=typeof e)throw _i("required args <xml=string>");return d=null,function(e){var o,u,d,x,w,b,E,_,A,R,k,S=m?[]:null,C=m?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[Si(n)]=t;return i}(p):null,M=[],P=0,N=!1,T=!1,D=0,B=0,O="",L=0;function I(){if(null!==k)return k;var e,t,n,i,r,o,a,s,l,c,u,h=m&&C.xmlns,d=m&&f?[]:null,y=L,g=O,x=g.length,w={},b={};e:for(;y<x;y++)if(l=!1,!(32===(c=g.charCodeAt(y))||c<14&&c>8)){for((c<65||c>122||c>90&&c<97)&&95!==c&&58!==c&&(v("illegal first char attribute name"),l=!0),u=y+1;u<x;u++)if(!((c=g.charCodeAt(u))>96&&c<123||c>64&&c<91||c>47&&c<59||46===c||45===c||95===c)){if(32===c||c<14&&c>8){v("missing attribute value"),y=u;continue e}if(61===c)break;v("illegal attribute name char"),l=!0}if("xmlns:xmlns"===(s=g.substring(y,u))&&(v("illegal declaration of xmlns"),l=!0),34===(c=g.charCodeAt(u+1)))-1===(u=g.indexOf('"',y=u+2))&&-1!==(u=g.indexOf("'",y))&&(v("attribute value quote missmatch"),l=!0);else if(39===c)-1===(u=g.indexOf("'",y=u+2))&&-1!==(u=g.indexOf('"',y))&&(v("attribute value quote missmatch"),l=!0);else for(v("missing attribute value quotes"),l=!0,u+=1;u<x&&!(32===(c=g.charCodeAt(u+1))||c<14&&c>8);u++);for(-1===u&&(v("missing closing quotes"),u=x,l=!0),l||(o=g.substring(y,u)),y=u;u+1<x&&!(32===(c=g.charCodeAt(u+1))||c<14&&c>8);u++)y===u&&(v("illegal character after attribute end"),l=!0);if(y=u+1,!l)if(s in b)v("attribute <"+s+"> already defined");else if(b[s]=!0,m)if(f){if(null!==(r="xmlns"===s?"xmlns":120===s.charCodeAt(0)&&"xmlns:"===s.substr(0,6)?s.substr(6):null)){if(e=bi(o),t=Si(r),!(a=p[e])){if("xmlns"===r||t in C&&C[t]!==e)do{a="ns"+P++}while(void 0!==C[a]);else a=r;p[e]=a}C[r]!==a&&(i||(C=ki(C),i=!0),C[r]=a,"xmlns"===r&&(C[Si(a)]=e,h=a),C[t]=e),w[s]=o;continue}d.push(s,o)}else-1!==(c=s.indexOf(":"))?(n=C[s.substring(0,c)])?w[s=h===n?s.substr(c+1):n+s.substr(c)]=o:v(Ai(s.substring(0,c))):w[s]=o;else w[s]=o}if(f)for(y=0,x=d.length;y<x;y++){if(s=d[y++],o=d[y],-1!==(c=s.indexOf(":"))){if(!(n=C[s.substring(0,c)])){v(Ai(s.substring(0,c)));continue}s=h===n?s.substr(c+1):n+s.substr(c)}w[s]=o}return k=w}function F(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,o=0,a=0,s=B;D>=a&&(t=i.exec(e))&&!((s=t[0].length+t.index)>D);)r+=1,a=s;return-1==D?(o=s,n=e.substring(B)):0===B?n=e.substring(B,D):(o=D-a,n=-1==B?e.substring(D):e.substring(D,B+1)),{data:n,line:r,column:o}}h=F,c&&(R=Object.create({},{name:Ri((function(){return _})),originalName:Ri((function(){return A})),attrs:Ri(I),ns:Ri((function(){return C}))}));for(;-1!==B;){if(-1===(D=60===e.charCodeAt(B)?B:e.indexOf("<",B)))return M.length?g("unexpected end of file"):0===B?g("missing start tag"):void(B<e.length&&e.substring(B).trim()&&v(Ei));if(B!==D)if(M.length){if(t&&(t(e.substring(B,D),bi,h),y))return}else if(e.substring(B,D).trim()&&(v(Ei),y))return;if(33===(w=e.charCodeAt(D+1))){if(91===(x=e.charCodeAt(D+2))&&"CDATA["===e.substr(D+3,6)){if(-1===(B=e.indexOf("]]>",D)))return g("unclosed cdata");if(r&&(r(e.substring(D+9,B),h),y))return;B+=3;continue}if(45===x&&45===e.charCodeAt(D+3)){if(-1===(B=e.indexOf("--\x3e",D)))return g("unclosed comment");if(a&&(a(e.substring(D+4,B),bi,h),y))return;B+=3;continue}}if(63!==w){for(u=D+1;;u++){if(b=e.charCodeAt(u),isNaN(b))return B=-1,g("unclosed tag");if(34===b)u=-1!==(x=e.indexOf('"',u+1))?x:u;else if(39===b)u=-1!==(x=e.indexOf("'",u+1))?x:u;else if(62===b){B=u;break}}if(33!==w){if(k={},47===w){if(N=!1,T=!0,!M.length)return g("missing open tag");if(u=_=M.pop(),x=D+2+u.length,e.substring(D+2,x)!==u)return g("closing tag mismatch");for(;x<B;x++)if(!(32===(w=e.charCodeAt(x))||w>8&&w<14))return g("close tag")}else{if(47===e.charCodeAt(B-1)?(u=_=e.substring(D+1,B-1),N=!0,T=!0):(u=_=e.substring(D+1,B),N=!0,T=!1),!(w>96&&w<123||w>64&&w<91||95===w||58===w))return g("illegal first char nodeName");for(x=1,d=u.length;x<d;x++)if(!((w=u.charCodeAt(x))>96&&w<123||w>64&&w<91||w>47&&w<59||45===w||95===w||46==w)){if(32===w||w<14&&w>8){_=u.substring(0,x),k=null;break}return g("invalid nodeName")}T||M.push(_)}if(m){if(o=C,N&&(T||S.push(o),null===k&&(f=-1!==u.indexOf("xmlns",x))&&(L=x,O=u,I(),f=!1)),A=_,-1!==(w=_.indexOf(":"))){if(!(E=C[_.substring(0,w)]))return g("missing namespace on <"+A+">");_=_.substr(w+1)}else E=C.xmlns;E&&(_=E+":"+_)}if(N&&(L=x,O=u,n&&(c?n(R,bi,T,h):n(_,I,bi,T,h),y)))return;if(T){if(i&&(i(c?R:_,bi,N,h),y))return;m&&(C=N?o:S.pop())}B+=1}else{if(l&&(l(e.substring(D,B+1),bi,h),y))return;B+=1}}else{if(-1===(B=e.indexOf("?>",D)))return g("unclosed question");if(s&&(s(e.substring(D,B+2),h),y))return;B+=2}}}(e),h=Ci,y=!1,d},this.stop=function(){y=!0}}function Ni(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var Ti={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},Di="property";function Bi(e){return e.xml&&e.xml.serialize}function Oi(e,t){return Ni(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function Li(e){return new Error(e)}function Ii(e){return e.$descriptor}function Fi(e){E(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw Li("expected element");var t,n=this.elementsById,i=Ii(e).idProperty;if(i&&(t=e.get(i.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw Li("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function ji(){}function Vi(){}function Wi(){}function $i(e,t){this.property=e,this.context=t}function zi(e,t){this.element=t,this.propertyDesc=e}function Gi(){}function Hi(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function Ki(e,t,n){Hi.call(this,e,t,n)}function Ui(e,t,n){this.model=e,this.context=n}function qi(e){e instanceof di&&(e={model:e}),E(this,{lax:!1},e)}ji.prototype.handleEnd=function(){},ji.prototype.handleText=function(){},ji.prototype.handleNode=function(){},Vi.prototype=Object.create(ji.prototype),Vi.prototype.handleNode=function(){return this},Wi.prototype=Object.create(ji.prototype),Wi.prototype.handleText=function(e){this.body=(this.body||"")+e},$i.prototype=Object.create(Wi.prototype),$i.prototype.handleNode=function(e){if(this.element)throw Li("expected no sub nodes");return this.element=this.createReference(e),this},$i.prototype.handleEnd=function(){this.element.id=this.body},$i.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},zi.prototype=Object.create(Wi.prototype),zi.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=oi(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},Gi.prototype=Object.create(Wi.prototype),Gi.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},Hi.prototype=Object.create(Gi.prototype),Hi.prototype.addReference=function(e){this.context.addReference(e)},Hi.prototype.handleText=function(e){if(!Ii(this.element).bodyProperty)throw Li("unexpected body text <"+e+">");Wi.prototype.handleText.call(this,e)},Hi.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Ii(t).bodyProperty;n&&void 0!==e&&(e=oi(n.type,e),t.set(n.name,e))},Hi.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=Ii(i),o=this.context,a=new i({}),s=this.model;return f(n,(function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?f(e.split(" "),(function(e){o.addReference({element:a,property:i.ns.name,id:e})})):o.addReference({element:a,property:i.ns.name,id:e}):(i?e=oi(i.type,e):"xmlns"===n?n=":"+n:(t=li(n,r.ns.prefix),s.getPackage(t.prefix)&&o.addWarning({message:"unknown attribute <"+n+">",element:a,property:n,value:e})),a.set(n,e))})),a},Hi.prototype.getPropertyForNode=function(e){var t=li(e.name),n=this.type,i=this.model,r=Ii(n),o=t.name,a=r.propertiesByName[o];if(a&&!a.isAttr){const t=function(e){const t=Bi(e);return t!==Di&&(t||null)}(a);if(t){const n=e.attributes[t];if(n){const t=function(e,t,n){const i=li(e,t.xmlns),r=li(`${t[i.prefix]||i.prefix}:${i.localName}`);return function(e,t){var n=e.name,i=e.localName,r=t&&t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(r,n.getPackage(r.prefix))}(n,e.ns,i);return E({},a,{effectiveType:Ii(i.getType(t)).name})}}return a}var s=i.getPackage(t.prefix);if(s){const e=Oi(t,s),n=i.getType(e);if(a=u(r.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})))return E({},a,{effectiveType:Ii(n).name})}else if(a=u(r.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})))return a;throw Li("unrecognized element <"+t.name+">")},Hi.prototype.toString=function(){return"ElementDescriptor["+Ii(this.type).name+"]"},Hi.prototype.valueHandler=function(e,t){return new zi(e,t)},Hi.prototype.referenceHandler=function(e){return new $i(e,this.context)},Hi.prototype.handler=function(e){return"Element"===e?new Ui(this.model,e,this.context):new Hi(this.model,e,this.context)},Hi.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,si(n=t.effectiveType||t.type))return this.valueHandler(t,i);var o=(r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==o&&(t.isMany?i.get(t.name).push(o):i.set(t.name,o),t.isReference?(E(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},Ki.prototype=Object.create(Hi.prototype),Ki.prototype.createElement=function(e){var t=e.name,n=li(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),a=o&&Oi(n,o)||t;if(!r.hasType(a))throw Li("unexpected element <"+e.originalName+">");return Hi.prototype.createElement.call(this,e)},Ui.prototype=Object.create(Gi.prototype),Ui.prototype.createElement=function(e){var t=e.name,n=li(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},Ui.prototype.handleChild=function(e){var t=new Ui(this.model,"Element",this.context).handleNode(e),n=this.element,i=t.element;return void 0!==i&&((n.$children=n.$children||[]).push(i),i.$parent=n),t},Ui.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},qi.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof Hi?(i=t,t={}):"string"==typeof t?(i=this.handler(t),t={}):"string"==typeof i&&(i=this.handler(i));var r=this.model,o=this.lax,a=new Fi(E({},t,{rootHandler:i})),s=new Pi({proxy:!0}),l=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function p(e,t,n){var i=t(),r=i.line,o=i.column,s=i.data;"<"===s.charAt(0)&&-1!==s.indexOf(" ")&&(s=s.slice(0,s.indexOf(" "))+">");var l="unparsable content "+(s?s+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return a.addWarning({message:l,error:e}),!0;throw Li(l)}function c(e,t){return p(e,t,!0)}i.context=a,l.push(i);var u=/^<\?xml /i,h=/ encoding="([^"]+)"/i,f=/^utf-8$/i;function m(e,t){try{l.peek().handleText(e)}catch(e){c(e,t)}}var d=r.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),Object.entries(Ti).reduce((function(e,[t,n]){return e[n]=t,e}),r.config&&r.config.nsMap||{}));return s.ns(d).on("openTag",(function(e,t,n,i){var r=e.attrs||{},a=Object.keys(r).reduce((function(e,n){var i=t(r[n]);return e[n]=i,e}),{});!function(e,t){var n=l.peek();try{l.push(n.handleNode(e))}catch(e){p(e,t,o)&&l.push(new Vi)}}({name:e.name,originalName:e.originalName,attributes:a,ns:e.ns},i)})).on("question",(function(e){if(u.test(e)){var t=h.exec(e),n=t&&t[1];n&&!f.test(n)&&a.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}})).on("closeTag",(function(){l.pop().handleEnd()})).on("cdata",m).on("text",(function(e,t,n){!function(e,t){e.trim()&&m(e,t)}(t(e),n)})).on("error",p).on("warn",c),new Promise((function(t,n){var r;try{s.parse(e),function(){var e,t,n=a.elementsById,i=a.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],s=Ii(r).propertiesByName[t.property];if(o||a.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),s.isMany){var l=r.get(s.name),p=l.indexOf(t);-1===p&&(p=l.length),o?l[p]=o:l.splice(p,1)}else r.set(s.name,o)}}()}catch(e){r=e}var o=i.element;r||o||(r=Li("failed to parse document as <"+i.type.$descriptor.name+">"));var l=a.warnings,p=a.references,c=a.elementsById;return r?(r.warnings=l,n(r)):t({rootElement:o,elementsById:c,references:p,warnings:l})}))},qi.prototype.handler=function(e){return new Ki(this.model,e)};var Yi=/<|>|'|"|&|\n\r|\n/g,Xi=/<|>|&/g;function Zi(e){this.prefixMap={},this.uriMap={},this.used={},this.wellknown=[],this.custom=[],this.parent=e,this.defaultPrefixMap=e&&e.defaultPrefixMap||{}}function Ji(e,t){return Ni(t)?(n=e).charAt(0).toLowerCase()+n.slice(1):e;var n}function Qi(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function er(e){return p(e)?e:(e.prefix?e.prefix+":":"")+e.localName}Zi.prototype.mapDefaultPrefixes=function(e){this.defaultPrefixMap=e},Zi.prototype.defaultUriByPrefix=function(e){return this.defaultPrefixMap[e]},Zi.prototype.byUri=function(e){return this.uriMap[e]||this.parent&&this.parent.byUri(e)},Zi.prototype.add=function(e,t){this.uriMap[e.uri]=e,t?this.wellknown.push(e):this.custom.push(e),this.mapPrefix(e.prefix,e.uri)},Zi.prototype.uriByPrefix=function(e){return this.prefixMap[e||"xmlns"]||this.parent&&this.parent.uriByPrefix(e)},Zi.prototype.mapPrefix=function(e,t){this.prefixMap[e||"xmlns"]=t},Zi.prototype.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},Zi.prototype.logUsed=function(e){var t=e.uri,n=this.getNSKey(e);this.used[n]=this.byUri(t),this.parent&&this.parent.logUsed(e)},Zi.prototype.getUsed=function(e){return[].concat(this.wellknown,this.custom).filter((e=>{var t=this.getNSKey(e);return this.used[t]}))};var tr={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},nr={"<":"lt",">":"gt","&":"amp"};function ir(e,t,n){return(e=p(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function rr(e){this.tagName=e}function or(){}function ar(e){this.tagName=e}function sr(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function lr(e,t,n){sr.call(this,e,t),this.serialization=n}function pr(){this.value="",this.write=function(e){this.value+=e}}function cr(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 ur(e){return e=E({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new pr,r=new cr(i,e.format);e.preamble&&r.append('<?xml version="1.0" encoding="UTF-8"?>\n');var o=new sr,a=t.$model;if(o.getNamespaces().mapDefaultPrefixes(function(e){const t=e.config&&e.config.nsMap||{},n={};for(const e in Ti)n[e]=Ti[e];for(const e in t){n[t[e]]=e}for(const t of e.getPackages())n[t.prefix]=t.uri;return n}(a)),o.build(t).serializeTo(r),!n)return i.value}}}function hr(e,t){di.call(this,e,t)}rr.prototype.build=function(e){return this.element=e,this},rr.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},or.prototype.serializeValue=or.prototype.serializeTo=function(e){e.append(this.escape?ir(this.value,Xi,nr):this.value)},or.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(Xi)&&(this.escape=!0),this},Qi(ar,or),ar.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},sr.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,o=i.isGeneric;return t=o?this.parseGenericNsAttributes(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),o?this.parseGenericContainments(e):(n=function(e){return h(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!c(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)}))}(e),this.parseAttributes(h(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return h(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},sr.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?E({localName:t.ns.localName},e):E({localName:Ji(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},sr.prototype.nsPropertyTagName=function(e){return function(e,t){return E({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},sr.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},sr.prototype.nsAttributeName=function(e){var t;if(t=p(e)?li(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}:E({localName:t.localName},n)},sr.prototype.parseGenericNsAttributes=function(e){return Object.entries(e).filter((([t,n])=>!t.startsWith("$")&&this.parseNsAttribute(e,t,n))).map((([e,t])=>({name:e,value:t})))},sr.prototype.parseGenericContainments=function(e){var t=e.$body;t&&this.body.push((new or).build({type:"String"},t));var n=e.$children;n&&f(n,(e=>{this.body.push(new sr(this).build(e))}))},sr.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=li(t);if("xmlns"===o.prefix&&(i={prefix:o.localName,uri:n}),o.prefix||"xmlns"!==o.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var a=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(a)}},sr.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,i=[];return f(n,(function(n,r){var o=t.parseNsAttribute(e,r,n);o&&i.push(o)})),i},sr.prototype.parseGenericAttributes=function(e,t){var n=this;f(t,(function(t){try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){"undefined"!=typeof console&&console.warn(`missing namespace information for <${t.name}=${t.value}> on`,e,n)}}))},sr.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;f(e,(function(e){var r=i.get(e.name),o=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new or).build(e,r[0]));else if(si(e.type))f(r,(function(i){n.push(new ar(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(o)f(r,(function(i){n.push(new rr(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var a=Bi(e);f(r,(function(i){var r;r=a?a===Di?new sr(t,e):new lr(t,e,a):new sr(t),n.push(r.build(i))}))}}))},sr.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new Zi(t):n=t),n},sr.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,o=e.prefix;return i.byUri(r)&&!n||i.add(e,t),i.mapPrefix(o,r),e},sr.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.getNamespaces(t),a=e.prefix,s=e.uri;if(!a&&!s)return{localName:e.localName};if(r=o.defaultUriByPrefix(a),!(s=s||r||o.uriByPrefix(a)))throw new Error("no namespace uri given for prefix <"+a+">");if((e=o.byUri(s))||a||(e=this.logNamespace({uri:s},r===s,!0)),!e){for(n=a,i=1;o.uriByPrefix(n);)n=a+"_"+i++;e=this.logNamespace({prefix:n,uri:s},r===s)}return a&&o.mapPrefix(a,s),e},sr.prototype.parseAttributes=function(e){var t=this,n=this.element;f(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];f(i,(function(e){r.push(e.id)})),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},sr.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),er(e)},sr.prototype.addAttribute=function(e,t){var n=this.attrs;p(t)&&(t=ir(t,Yi,tr));var i=function(e,t){const n=v(t);let i=o(e)?-1:void 0;return f(e,(function(e,t){if(n(e,t))return i=t,!1})),i}(n,(function(t){return t.name.localName===e.localName&&t.name.uri===e.uri&&t.name.prefix===e.prefix})),r={name:e,value:t};-1!==i?n.splice(i,1,r):n.push(r)},sr.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)),f(t,(function(t){e.append(" ").append(er(t.name)).append('="').append(t.value).append('"')}))},sr.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==or;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),f(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},Qi(lr,sr),lr.prototype.parseNsAttributes=function(e){var t=sr.prototype.parseNsAttributes.call(this,e).filter((e=>e.name!==this.serialization)),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),o=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(this.serialization),(i.prefix?i.prefix+":":"")+o+n.ns.localName),t},lr.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},hr.prototype=Object.create(di.prototype),hr.prototype.fromXML=function(e,t,n){p(t)||(n=t,t="bpmn:Definitions");var i=new qi(E({model:this,lax:!0},n)),r=i.handler(t);return i.fromXML(e,r)},hr.prototype.toXML=function(e,t){var n=new ur(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(e){return i(e)}}))};const fr={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 mr(e,t){return new hr(E({},fr,e),t)}function dr(e,t){return e.$instanceOf(t)}function yr(e){var t={},n=[],i={};function r(e,t){return function(n){e(n,t)}}function o(e){t[e.id]=e}function a(t,n){try{var r=i[t.id]&&function(t,n){if(t.gfx)throw new Error(`already rendered ${yt(t)}`);return e.element(t,i[t.id],n)}(t,n);return o(t),r}catch(e){s(e.message,{element:t,error:e}),console.error(`failed to import ${yt(t)}`,e)}}function s(t,n){e.error(t,n)}var l=this.registerDi=function(e){var t,n=e.bpmnElement;n?i[n.id]?s(`multiple DI elements defined for ${yt(n)}`,{element:n}):(i[n.id]=e,c(t=n,"di")||Object.defineProperty(t,"di",{enumerable:!1,get:function(){throw new Error("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")}})):s(`no bpmnElement referenced in ${yt(e)}`,{element:e})};function p(e){var t;t=e.plane,l(t),f(t.planeElement,m)}function m(e){l(e)}this.handleDefinitions=function(o,a){var c=o.diagrams;if(a&&-1===c.indexOf(a))throw new Error("diagram not part of <bpmn:Definitions />");if(!a&&c&&c.length&&(a=c[0]),!a)throw new Error("no diagram to display");i={},p(a);var m=a.plane;if(!m)throw new Error(`no plane for ${yt(a)}`);var v=m.bpmnElement;if(!v){if(v=function(e){return u(e.rootElements,(function(e){return dr(e,"bpmn:Process")||dr(e,"bpmn:Collaboration")}))}(o),!v)throw new Error("no process or collaboration to display");s(`correcting missing bpmnElement on ${yt(m)} to ${yt(v)}`),m.bpmnElement=v,l(m)}var x,w,b=function(t,n){return e.root(t,i[t.id],n)}(v,m);if(dr(v,"bpmn:Process")||dr(v,"bpmn:SubProcess"))y(v,b);else{if(!dr(v,"bpmn:Collaboration"))throw new Error(`unsupported bpmnElement for ${yt(m)}: ${yt(v)}`);w=b,f((x=v).participants,r(P,w)),E(x.artifacts,w),n.push((function(){!function(e,t){f(e,r(g,t))}(x.messageFlows,w)})),function(e,n){var i=h(e,(function(e){return!t[e.id]&&dr(e,"bpmn:Process")&&e.laneSets}));i.forEach(r(y,n))}(o.rootElements,b)}d(n)};var d=this.handleDeferred=function(){for(;n.length;)n.shift()()};function y(e,t){M(e,t),_(e.ioSpecification,t),E(e.artifacts,t),o(e)}function g(e,t){a(e,t)}function v(e,t){a(e,t)}function x(e,t){a(e,t)}function w(e,t){a(e,t)}function b(e,t){a(e,t)}function E(e,t){f(e,(function(e){dr(e,"bpmn:Association")?n.push((function(){b(e,t)})):b(e,t)}))}function _(e,t){e&&(f(e.dataInputs,r(x,t)),f(e.dataOutputs,r(w,t)))}var A=this.handleSubProcess=function(e,t){M(e,t),E(e.artifacts,t)};function R(e,t){var i=a(e,t);dr(e,"bpmn:SubProcess")&&A(e,i||t),dr(e,"bpmn:Activity")&&_(e.ioSpecification,t),n.push((function(){f(e.dataInputAssociations,r(v,t)),f(e.dataOutputAssociations,r(v,t))}))}function k(e,t){a(e,t)}function S(e,t){n.push((function(){var n=a(e,t);e.childLaneSet&&C(e.childLaneSet,n||t),function(e){f(e.flowNodeRef,(function(t){var n=t.get("lanes");n&&n.push(e)}))}(e)}))}function C(e,t){f(e.lanes,r(S,t))}function M(e,t){!function(e,t){f(e,(function(e){dr(e,"bpmn:SequenceFlow")?n.push((function(){!function(e,t){a(e,t)}(e,t)})):dr(e,"bpmn:BoundaryEvent")?n.unshift((function(){R(e,t)})):dr(e,"bpmn:FlowNode")?R(e,t):dr(e,"bpmn:DataObject")||(dr(e,"bpmn:DataStoreReference")||dr(e,"bpmn:DataObjectReference")?k(e,t):s(`unrecognized flowElement ${yt(e)} in context ${yt(t&&t.businessObject)}`,{element:e,context:t}))}))}(e.flowElements,t),e.laneSets&&function(e,t){f(e,r(C,t))}(e.laneSets,t)}function P(e,t){var n=a(e,t),i=e.processRef;i&&y(i,n||t)}}function gr(e,t,n){var i,r,o,a=[];function s(e,t){var n=new yr({root:function(e,t){return i.add(e,t)},element:function(e,t,n){return i.add(e,t,n)},error:function(e,t){a.push({message:e,context:t})}});t=t||e.diagrams&&e.diagrams[0];var r=function(e,t){if(!t||!t.plane)return;var n,i=t.plane.bpmnElement,r=i;A(i,"bpmn:Process")||A(i,"bpmn:Collaboration")||(r=function(e){var t=e;for(;t;){if(A(t,"bpmn:Process"))return t;t=t.$parent}} method in dr
H A Dbpmn-navigated-viewer.production.min.js2 !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).BpmnJS=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}}))}const t=Object.prototype.toString,n=Object.prototype.hasOwnProperty;function i(e){return void 0===e}function r(e){return void 0!==e}function o(e){return"[object Array]"===t.call(e)}function a(e){return"[object Object]"===t.call(e)}function s(e){return"[object Number]"===t.call(e)}function l(e){const n=t.call(e);return"[object Function]"===n||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n}function p(e){return"[object String]"===t.call(e)}function c(e,t){return n.call(e,t)}function u(e,t){const n=v(t);let i;return f(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function h(e,t){const n=v(t);let i=[];return f(e,(function(e,t){n(e,t)&&i.push(e)})),i}function f(e,t){let n,r;if(i(e))return;const a=o(e)?b:x;for(let i in e)if(c(e,i)&&(n=e[i],r=t(n,a(i)),!1===r))return n}function m(e,t,n){return f(e,(function(e,i){n=t(n,e,i)})),n}function d(e,t){return!!m(e,(function(e,n,i){return e&&t(n,i)}),!0)}function y(e,t){return!!u(e,t)}function g(e){return function(t){return d(e,(function(e,n){return t[n]===e}))}}function v(e){return l(e)?e:t=>t===e}function x(e){return e}function b(e){return Number(e)}function w(e,t){return e.bind(t)}function E(e,...t){return Object.assign(e,...t)}function _(e,t){var n=this;t=t||1e3,e.on(["render.shape","render.connection"],t,(function(e,t){var i=e.type,r=t.element,o=t.gfx,a=t.attrs;if(n.canRender(r))return"render.shape"===i?n.drawShape(o,r,a):n.drawConnection(o,r,a)})),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 A(e,t){var n=k(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function k(e){return e&&e.businessObject||e}function R(e){return e&&e.di}function S(e,t){return!A(e,"bpmn:CallActivity")&&(A(e,"bpmn:SubProcess")?!(!(t=t||R(e))||!A(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded:!A(e,"bpmn:Participant")||!!k(e).processRef)}function C(e){if(A(e,"bpmn:Participant")||A(e,"bpmn:Lane")){var t=R(e).isHorizontal;return void 0===t||t}}_.prototype.canRender=function(e){},_.prototype.drawShape=function(e,t){},_.prototype.drawConnection=function(e,t){},_.prototype.getShapePath=function(e){},_.prototype.getConnectionPath=function(e){};var M={width:90,height:20};function P(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)],r=function(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)];return{x:n.x+(i.x-n.x)/2,y:n.y+(i.y-n.y)/2}}(e),o=Math.atan((i.y-n.y)/(i.x-n.x)),a=r.x,s=r.y;return Math.abs(o)<Math.PI/2?s-=15:a+=15,{x:a,y:s}}function N(e,t){var n,i,r,o=e.label;return o&&o.bounds?(r=o.bounds,i={width:Math.max(M.width,r.width),height:r.height},n={x:r.x+r.width/2,y:r.y+r.height/2}):(n=function(e){return e.waypoints?P(e.waypoints):A(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+M.height/2}:{x:e.x+e.width/2,y:e.y+e.height+M.height/2}}(t),i=M),E({x:n.x-i.width/2,y:n.y-i.height/2},i)}function T(e){var t=e.businessObject,n=function(e){return A(e,"bpmn:FlowElement")||A(e,"bpmn:Participant")||A(e,"bpmn:Lane")||A(e,"bpmn:SequenceFlow")||A(e,"bpmn:MessageFlow")||A(e,"bpmn:DataInput")||A(e,"bpmn:DataOutput")?"name":A(e,"bpmn:TextAnnotation")?"text":A(e,"bpmn:Group")?"categoryValueRef":void 0}(t);if(n)return"categoryValueRef"===n?function(e){var t=e.categoryValueRef;return t&&t.value||""}(t):t[n]||""}function D(e,t){return function(e,t){t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}(e,t))}(t,e),e}var B={"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":2,"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":2,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function O(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=B[i];r?(2===r&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function L(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return B[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);O(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)O(e,i,t[i])}(e,t);return e}const I=Object.prototype.toString;function F(e){return new j(e)}function j(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}j.prototype.add=function(e){return this.list.add(e),this},j.prototype.remove=function(e){return"[object RegExp]"==I.call(e)?this.removeMatching(e):(this.list.remove(e),this)},j.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},j.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},j.prototype.array=function(){return Array.from(this.list)},j.prototype.has=j.prototype.contains=function(e){return this.list.contains(e)};var V="http://www.w3.org/2000/svg",W='<svg xmlns="'+V+'"';function z(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(V)&&(e=W+e.substring(4)):(e=W+">"+e+"</svg>",t=!0);var n=function(e){var t;return(t=new DOMParser).async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function $(e,t){var n;return"<"===(e=e.trim()).charAt(0)?(n=z(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(V,e),t&&L(n,t),n}var G=null;function H(){return null===G&&(G=$("svg")),G}function K(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}function U(e){return H().createSVGTransform()}var q=/([&<>]{1})/g,Y=/([\n\r"]{1})/g,X={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function Z(e,t){return e.replace(t,(function(e,t){return X[t]||t}))}function J(e,t){var n,i,r,o,a;switch(e.nodeType){case 3:t.push(Z(e.textContent,q));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n<i;++n)o=r.item(n),t.push(" ",o.name,'="',Z(o.value,Y),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,i=(a=e.childNodes).length;n<i;++n)J(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",Z(e.nodeValue,q),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function Q(e,t){return function(e){for(var t=e.firstChild,n=[];t;)J(t,n),t=t.nextSibling;return n.join("")}(e)}function ee(e){var t=e.parentNode;return t&&t.removeChild(e),e}function te(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function ne(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(te(e,i))}(n,t)),n.consolidate()}function ie(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function re(e){return["L",e.x,e.y]}function oe(e,t){const n=e.length,i=[(r=e[0],["M",r.x,r.y])];var r,o,a,s;for(let r=1;r<n;r++){const n=e[r-1],l=e[r],p=e[r+1];if(!p||!t){i.push(re(l));continue}const c=Math.min(t,se(l.x-n.x,l.y-n.y),se(p.x-l.x,p.y-l.y));if(!c){i.push(re(l));continue}const u=ae(l,n,c),h=ae(l,n,.5*c),f=ae(l,p,c),m=ae(l,p,.5*c);i.push(re(u)),i.push((a=m,s=f,["C",(o=h).x,o.y,a.x,a.y,s.x,s.y]))}return i}function ae(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=n/se(i,r);return{x:e.x+i*o,y:e.y+r*o}}function se(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function le(e,t,n){s(t)&&(n=t,t=null),t||(t={});const i=$("path",t);return s(n)&&(i.dataset.cornerRadius=String(n)),pe(i,e)}function pe(e,t){return L(e,{d:ie(oe(t,parseInt(e.dataset.cornerRadius,10)||0))}),e}var ce="hsl(225, 10%, 15%)";function ue(e,t){return y(e.eventDefinitions,(function(e){return e.$type===t}))}function he(e,t,n){var i=R(e);return n||i.get("color:background-color")||i.get("bioc:fill")||t||"white"}function fe(e,t,n){var i=R(e);return n||i.get("color:border-color")||i.get("bioc:stroke")||t||ce}function me(e,t,n,i){var r=R(e).get("label");return i||r&&r.get("color:color")||t||fe(e,n)}function de(e,t={}){return{width:ye(e,t),height:ge(e,t)}}function ye(e,t={}){return c(t,"width")?t.width:e.width}function ge(e,t={}){return c(t,"height")?t.height:e.height}function ve(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 i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const xe=Object.prototype.toString,be=Object.prototype.hasOwnProperty;function we(e,t){return be.call(e,t)}function Ee(e,t){let n,i;if(void 0===e)return;const r=function(e){return"[object Array]"===xe.call(e)}(e)?Ae:_e;for(let o in e)if(we(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function _e(e){return e}function Ae(e){return Number(e)}function ke(e,...t){const n=e.style;return Ee(t,(function(e){e&&Ee(e,(function(e,t){n[t]=e}))})),e}function Re(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}const Se=Object.prototype.toString;function Ce(e){return new Me(e)}function Me(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Pe(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Ne(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}Me.prototype.add=function(e){return this.list.add(e),this},Me.prototype.remove=function(e){return"[object RegExp]"==Se.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Me.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},Me.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Me.prototype.array=function(){return Array.from(this.list)},Me.prototype.has=Me.prototype.contains=function(e){return this.list.contains(e)};var Te,De,Be,Oe={};function Le(){Te=window.addEventListener?"addEventListener":"attachEvent",De=window.removeEventListener?"removeEventListener":"detachEvent",Be="addEventListener"!==Te?"on":""}var Ie=ve({__proto__:null,bind:Oe.bind=function(e,t,n,i){return Te||Le(),e[Te](Be+t,n,i||!1),n},unbind:Oe.unbind=function(e,t,n,i){return De||Le(),e[De](Be+t,n,i||!1),n},default:Oe},[Oe]),Fe=["focus","blur"];var je,Ve={bind:function(e,t,n,i,r){return-1!==Fe.indexOf(n)&&(r=!0),Ie.bind(e,n,(function(n){var r=n.target||n.srcElement;n.delegateTarget=Ne(r,t,!0),n.delegateTarget&&i.call(e,n)}),r)},unbind:function(e,t,n,i){return-1!==Fe.indexOf(t)&&(i=!0),Ie.unbind(e,t,n,i)}},We=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 i=n[1];if("body"==i){return(r=t.createElement("html")).innerHTML=e,r.removeChild(r.lastChild)}var r,o=Object.prototype.hasOwnProperty.call($e,i)?$e[i]:$e._default,a=o[0],s=o[1],l=o[2];(r=t.createElement("div")).innerHTML=s+e+l;for(;a--;)r=r.lastChild;if(r.firstChild==r.lastChild)return r.removeChild(r.firstChild);var p=t.createDocumentFragment();for(;r.firstChild;)p.appendChild(r.removeChild(r.firstChild));return p},ze=!1;"undefined"!=typeof document&&((je=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',ze=!je.getElementsByTagName("link").length,je=void 0);var $e={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:ze?[1,"X<div>","</div>"]:[0,"",""]};$e.td=$e.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],$e.option=$e.optgroup=[1,'<select multiple="multiple">',"</select>"],$e.thead=$e.tbody=$e.colgroup=$e.caption=$e.tfoot=[1,"<table>","</table>"],$e.polyline=$e.ellipse=$e.polygon=$e.circle=$e.text=$e.line=$e.path=$e.rect=$e.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var Ge=We;function He(e,t){return(t=t||document).querySelector(e)}function Ke(e){e.parentNode&&e.parentNode.removeChild(e)}function Ue(e,t,n,i,r){var o=U();o.setTranslate(t,n);var a=U();a.setRotate(i||0,0,0);var s=U();s.setScale(1,1),ne(e,[o,a,s])}function qe(e,t,n){var i=U();i.setTranslate(t,n),ne(e,i)}var Ye=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 i=Math.log(Math.pow(2,e))/Math.log(n),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,e/r))/Math.log(n)*r;var o=i-Math.floor(i),a="";for(r=0;r<Math.floor(i);r++){a=Math.floor(Math.random()*n).toString(n)+a}if(o){var s=Math.pow(n,o);a=Math.floor(Math.random()*s).toString(n)+a}var l=parseInt(a,n);return l!==1/0&&l>=Math.pow(2,e)?t(e,n):a};t.rack=function(e,n,i){var r=function(r){var a=0;do{if(a++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var s=t(e,n)}while(Object.hasOwnProperty.call(o,s));return o[s]=r,s},o=r.hats={};return r.get=function(e){return r.hats[e]},r.set=function(e,t){return r.hats[e]=t,r},r.bits=e||128,r.base=n||16,r}}));function Xe(e){if(!(this instanceof Xe))return new Xe(e);e=e||[128,36,1],this._seed=e.length?Ye.rack(e[0],e[1],e[2]):e}Xe.prototype.next=function(e){return this._seed(e||!0)},Xe.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},Xe.prototype.claim=function(e,t){this._seed.set(e,t||!0)},Xe.prototype.assigned=function(e){return this._seed.get(e)||!1},Xe.prototype.unclaim=function(e){delete this._seed.hats[e]},Xe.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};var Ze=new Xe,Je=.95;function Qe(e,t,n,i,r,o,s){_.call(this,t,s);var l=e&&e.defaultFillColor,p=e&&e.defaultStrokeColor,c=e&&e.defaultLabelColor;function u(e){return n.computeStyle(e,{strokeLinecap:"round",strokeLinejoin:"round",stroke:ce,strokeWidth:2,fill:"white"})}function h(e){return n.computeStyle(e,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:ce,strokeWidth:2})}function m(e,t){var{ref:n={x:0,y:0},scale:i=1,element:o,parentGfx:a=r._svg}=t,s=$("marker",{id:e,viewBox:"0 0 20 20",refX:n.x,refY:n.y,markerWidth:20*i,markerHeight:20*i,orient:"auto"});D(s,o);var l=He(":scope > defs",a);l||D(a,l=$("defs")),D(l,s)}function d(e,t,n,i){var r=Ze.nextPrefixed("marker-");return function(e,t,n,i,r){if("sequenceflow-end"===n){m(t,{element:$("path",{d:"M 1 5 L 11 10 L 1 15 Z",...u({fill:r,stroke:r,strokeWidth:1})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("messageflow-start"===n){m(t,{element:$("circle",{cx:6,cy:6,r:3.5,...u({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:6,y:6},parentGfx:e})}if("messageflow-end"===n){m(t,{element:$("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...u({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:8.5,y:5},parentGfx:e})}if("association-start"===n){m(t,{element:$("path",{d:"M 11 5 L 1 10 L 11 15",...h({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:1,y:10},scale:.5,parentGfx:e})}if("association-end"===n){m(t,{element:$("path",{d:"M 1 5 L 11 10 L 1 15",...h({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("conditional-flow-marker"===n){m(t,{element:$("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...u({fill:i,stroke:r})}),ref:{x:-1,y:10},scale:.5,parentGfx:e})}if("conditional-default-flow-marker"===n){m(t,{element:$("path",{d:"M 6 4 L 10 16",...u({stroke:r,fill:"none"})}),ref:{x:0,y:10},scale:.5,parentGfx:e})}}(e,r,t,n,i),"url(#"+r+")"}function y(e,t,n,i,r={}){a(i)&&(r=i,i=0),i=i||0,r=u(r);var o=$("circle",{cx:t/2,cy:n/2,r:Math.round((t+n)/4-i),...r});return D(e,o),o}function g(e,t,n,i,r,o){a(r)&&(o=r,r=0),r=r||0,o=u(o);var s=$("rect",{x:r,y:r,width:t-2*r,height:n-2*r,rx:i,ry:i,...o});return D(e,s),s}function v(e,t,n,i){var r=le(t,n=h(n),i);return D(e,r),r}function x(e,t,n){return v(e,t,n,5)}function b(e,t,n){n=h(n);var i=$("path",{...n,d:t});return D(e,i),i}function w(e,t,n,i){return b(t,n,E({"data-marker":e},i))}function M(e){return be[e]}function P(e){return function(t,n,i){return M(e)(t,n,i)}}var N=function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:r?he(t,l,n.fill):fe(t,p,n.stroke),strokeWidth:1})},B=function(e,t,n={}){var r=y(e,t.width,t.height,.2*t.height,{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:2});b(e,i.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),{stroke:fe(t,p,n.stroke),strokeWidth:2});for(var o=0;o<12;o++){var a=i.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),s=t.width/2,c=t.height/2;b(e,a,{strokeWidth:1,stroke:fe(t,p,n.stroke),transform:"rotate("+30*o+","+c+","+s+")"})}return r},O=function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},I=function(e,t,n={}){return b(e,i.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},j=function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},V=function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},W=function(e,t,n={},r){var o=b(e,i.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{fill:r?fe(t,p,n.stroke):"none",stroke:fe(t,p,n.stroke),strokeWidth:1});return function(e,t){var n=U();n.setRotate(t,0,0),ne(e,n)}(o,45),o},z=function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.22,my:.5}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},G=function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},H=function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),strokeWidth:1})},K=function(e,t,n={}){return b(e,i.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},q=function(e,t,n={}){return y(e,t.width,t.height,8,{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:4})};function Y(e,t,n={}){var i=k(e),r=function(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}(i);return i.get("eventDefinitions")&&i.get("eventDefinitions").length>1?i.get("parallelMultiple")?K(t,e,n,r):H(t,e,n,r):ue(i,"bpmn:MessageEventDefinition")?N(t,e,n,r):ue(i,"bpmn:TimerEventDefinition")?B(t,e,n,r):ue(i,"bpmn:ConditionalEventDefinition")?I(t,e,n,r):ue(i,"bpmn:SignalEventDefinition")?G(t,e,n,r):ue(i,"bpmn:EscalationEventDefinition")?O(t,e,n,r):ue(i,"bpmn:LinkEventDefinition")?j(t,e,n,r):ue(i,"bpmn:ErrorEventDefinition")?V(t,e,n,r):ue(i,"bpmn:CancelEventDefinition")?W(t,e,n,r):ue(i,"bpmn:CompensateEventDefinition")?z(t,e,n,r):ue(i,"bpmn:TerminateEventDefinition")?q(t,e,n,r):null}var X={ParticipantMultiplicityMarker:function(e,t,n={}){var r=ye(t,n),o=ge(t,n);w("participant-multiplicity",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2-6)/r,my:(o-15)/o}}),{strokeWidth:2,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},SubProcessMarker:function(e,t,n={}){qe(g(e,14,14,0,{strokeWidth:1,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)}),t.width/2-7.5,t.height-20),w("sub-process",e,i.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:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},ParallelMarker:function(e,t,n){var r=ye(t,n),o=ge(t,n);w("parallel",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.parallel)/r,my:(o-20)/o}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},SequentialMarker:function(e,t,n){w("sequential",e,i.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:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},CompensationMarker:function(e,t,n){w("compensation",e,i.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:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},LoopMarker:function(e,t,n){var r=ye(t,n),o=ge(t,n);w("loop",e,i.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.loop)/r,my:(o-7)/o}}),{strokeWidth:1.5,fill:"none",stroke:fe(t,p,n.stroke),strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){var r=ye(t,n),o=ge(t,n);w("adhoc",e,i.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.adhoc)/r,my:(o-15)/o}}),{strokeWidth:1,fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke)})}};function Z(e,t,n,i){X[e](t,n,i)}function J(e,t,n,i={}){i={fill:i.fill,stroke:i.stroke,width:ye(t,i),height:ge(t,i)};var r=k(t),o=n&&n.includes("SubProcessMarker");i=o?{...i,seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{...i,seq:-5,parallel:-6,compensation:-27,loop:0,adhoc:10},f(n,(function(n){Z(n,e,t,i)})),r.get("isForCompensation")&&Z("CompensationMarker",e,t,i),A(r,"bpmn:AdHocSubProcess")&&Z("AdhocMarker",e,t,i);var a=r.get("loopCharacteristics"),s=a&&a.get("isSequential");a&&(void 0===s&&Z("LoopMarker",e,t,i),!1===s&&Z("ParallelMarker",e,t,i),!0===s&&Z("SequentialMarker",e,t,i))}function Q(e,t,n={}){n=E({size:{width:100}},n);var i=o.createText(t||"",n);return F(i).add("djs-label"),D(e,i),i}function ee(e,t,n,i={}){var r=k(t),o=de({x:t.x,y:t.y,width:t.width,height:t.height},i);return Q(e,r.name,{align:n,box:o,padding:7,style:{fill:me(t,c,p,i.stroke)}})}function te(e,t,n,i={}){var r=C(n),o=Q(e,t,{box:{height:30,width:r?ge(n,i):ye(n,i)},align:"center-middle",style:{fill:me(n,c,p,i.stroke)}});r&&Ue(o,0,-(-1*ge(n,i)),270)}function ie(e,t,n={}){var{width:i,height:r}=de(t,n);return g(e,i,r,10,{...n,fill:he(t,l,n.fill),fillOpacity:Je,stroke:fe(t,p,n.stroke)})}function re(e,t,n={}){var i=k(t),r=he(t,l,n.fill),o=fe(t,p,n.stroke);return"One"!==i.get("associationDirection")&&"Both"!==i.get("associationDirection")||(n.markerEnd=d(e,"association-end",r,o)),"Both"===i.get("associationDirection")&&(n.markerStart=d(e,"association-start",r,o)),n=et(n,["markerStart","markerEnd"]),x(e,t.waypoints,{...n,stroke:o,strokeDasharray:"0, 5"})}function oe(e,t,n={}){var r=he(t,l,n.fill),o=fe(t,p,n.stroke),a=b(e,i.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:r,fillOpacity:Je,stroke:o});(function(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection})(k(t))&&b(e,i.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:r,stroke:o});return a}function ae(e,t,n={}){return y(e,t.width,t.height,{fillOpacity:Je,...n,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})}function se(e,t,n={}){return function(e,t,n,i){var r=t/2,o=n/2,a=[{x:r,y:0},{x:t,y:o},{x:r,y:n},{x:0,y:o}].map((function(e){return e.x+","+e.y})).join(" ");i=u(i);var s=$("polygon",{...i,points:a});return D(e,s),s}(e,t.width,t.height,{fill:he(t,l,n.fill),fillOpacity:Je,stroke:fe(t,p,n.stroke)})}function pe(e,t,n={}){var i=g(e,ye(t,n),ge(t,n),0,{fill:he(t,l,n.fill),fillOpacity:n.fillOpacity||Je,stroke:fe(t,p,n.stroke),strokeWidth:1.5}),r=k(t);A(r,"bpmn:Lane")&&te(e,r.get("name"),t,n);return i}function ve(e,t,n={}){var i=ie(e,t,n);(function(e){return e&&!!k(e).triggeredByEvent})(t)&&L(i,{strokeDasharray:"0, 5.5",strokeWidth:2.5});var r=S(t);return ee(e,t,r?"center-top":"center-middle",n),J(e,t,r?void 0:["SubProcessMarker"],n),i}function xe(e,t,n={}){var i=ie(e,t,n);return ee(e,t,"center-middle",n),J(e,t,void 0,n),i}var be=this.handlers={"bpmn:AdHocSubProcess":function(e,t,n={}){return ve(e,t,n=S(t)?et(n,["fill","stroke","width","height"]):et(n,["fill","stroke"]))},"bpmn:Association":function(e,t,n={}){return re(e,t,n=et(n,["fill","stroke"]))},"bpmn:BoundaryEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=et(n,["fill","stroke"]);var r=k(t).get("cancelActivity");n={strokeWidth:1.5,fill:he(t,l,n.fill),fillOpacity:1,stroke:fe(t,p,n.stroke)},r||(n.strokeDasharray="6");var o=ae(e,t,n);return y(e,t.width,t.height,3,{...n,fill:"none"}),i&&Y(t,e,n),o},"bpmn:BusinessRuleTask":function(e,t,n={}){var r=xe(e,t,n=et(n,["fill","stroke"]));return L(b(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}})),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),L(b(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}})),{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:CallActivity":function(e,t,n={}){return n=et(n,["fill","stroke"]),ve(e,t,{strokeWidth:5,...n})},"bpmn:ComplexGateway":function(e,t,n={}){var r=se(e,t,n=et(n,["fill","stroke"]));return b(e,i.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:DataInput":function(e,t,n={}){n=et(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=oe(e,t,n);return b(e,r,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:1}),o},"bpmn:DataInputAssociation":function(e,t,n={}){return n=et(n,["fill","stroke"]),re(e,t,{...n,markerEnd:d(e,"association-end",he(t,l,n.fill),fe(t,p,n.stroke))})},"bpmn:DataObject":function(e,t,n={}){return oe(e,t,n=et(n,["fill","stroke"]))},"bpmn:DataObjectReference":P("bpmn:DataObject"),"bpmn:DataOutput":function(e,t,n={}){n=et(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=oe(e,t,n);return b(e,r,{strokeWidth:1,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)}),o},"bpmn:DataOutputAssociation":function(e,t,n={}){return n=et(n,["fill","stroke"]),re(e,t,{...n,markerEnd:d(e,"association-end",he(t,l,n.fill),fe(t,p,n.stroke))})},"bpmn:DataStoreReference":function(e,t,n={}){return n=et(n,["fill","stroke"]),b(e,i.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{fill:he(t,l,n.fill),fillOpacity:Je,stroke:fe(t,p,n.stroke),strokeWidth:2})},"bpmn:EndEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=et(n,["fill","stroke"]);var r=ae(e,t,{...n,strokeWidth:4});return i&&Y(t,e,n),r},"bpmn:EventBasedGateway":function(e,t,n={}){n=et(n,["fill","stroke"]);var r=k(t),o=se(e,t,n);y(e,t.width,t.height,.2*t.height,{fill:he(t,"none",n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1});var a=r.get("eventGatewayType"),s=!!r.get("instantiate");if("Parallel"===a){var l=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}});b(e,l,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:1})}else"Exclusive"===a&&(s||y(e,t.width,t.height,.26*t.height,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:1}),function(){var r=i.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}});b(e,r,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:2})}());return o},"bpmn:ExclusiveGateway":function(e,t,n={}){var r=se(e,t,n=et(n,["fill","stroke"])),o=i.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return R(t).get("isMarkerVisible")&&b(e,o,{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:Gateway":function(e,t,n={}){return se(e,t,n=et(n,["fill","stroke"]))},"bpmn:Group":function(e,t,n={}){return n=et(n,["fill","stroke","width","height"]),g(e,t.width,t.height,10,{stroke:fe(t,p,n.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:ye(t,n),height:ge(t,n)})},"bpmn:InclusiveGateway":function(e,t,n={}){var i=se(e,t,n=et(n,["fill","stroke"]));return y(e,t.width,t.height,.24*t.height,{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:2.5}),i},"bpmn:IntermediateEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=et(n,["fill","stroke"]);var r=ae(e,t,{...n,strokeWidth:1.5});return y(e,t.width,t.height,3,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:1.5}),i&&Y(t,e,n),r},"bpmn:IntermediateCatchEvent":P("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":P("bpmn:IntermediateEvent"),"bpmn:Lane":function(e,t,n={}){return n=et(n,["fill","stroke","width","height"]),pe(e,t,{...n,fillOpacity:.25})},"bpmn:ManualTask":function(e,t,n={}){var r=xe(e,t,n=et(n,["fill","stroke"]));return b(e,i.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:.5}),r},"bpmn:MessageFlow":function(e,t,n={}){n=et(n,["fill","stroke"]);var r=k(t),o=R(t),a=he(t,l,n.fill),s=fe(t,p,n.stroke),c=x(e,t.waypoints,{markerEnd:d(e,"messageflow-end",a,s),markerStart:d(e,"messageflow-start",a,s),stroke:s,strokeDasharray:"10, 11",strokeWidth:1.5});if(r.get("messageRef")){var u=c.getPointAtLength(c.getTotalLength()/2),h=i.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:u.x,y:u.y}}),f={strokeWidth:1};"initiating"===o.get("messageVisibleKind")?(f.fill=a,f.stroke=s):(f.fill=s,f.stroke=a);var m=b(e,h,f),y=Q(e,r.get("messageRef").get("name"),{align:"center-top",fitBox:!0,style:{fill:s}}),g=m.getBBox(),v=y.getBBox();Ue(y,u.x-v.width/2,u.y+g.height/2+10,0)}return c},"bpmn:ParallelGateway":function(e,t,n={}){var r=se(e,t,n=et(n,["fill","stroke"]));return b(e,i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:Participant":function(e,t,n={}){var i=pe(e,t,n=et(n,["fill","stroke","width","height"])),r=S(t),o=C(t),a=k(t),s=a.get("name");if(r){v(e,o?[{x:30,y:0},{x:30,y:ge(t,n)}]:[{x:0,y:30},{x:ye(t,n),y:30}],{stroke:fe(t,p,n.stroke),strokeWidth:1.5}),te(e,s,t,n)}else{var l=de(t,n);o||(l.height=ye(t,n),l.width=ge(t,n));var u=Q(e,s,{box:l,align:"center-middle",style:{fill:me(t,c,p,n.stroke)}});if(!o)Ue(u,0,-(-1*ge(t,n)),270)}return a.get("participantMultiplicity")&&Z("ParticipantMultiplicityMarker",e,t,n),i},"bpmn:ReceiveTask":function(e,t,n={}){n=et(n,["fill","stroke"]);var r,o=k(t),a=xe(e,t,n);return o.get("instantiate")?(y(e,28,28,4.4,{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),r=i.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):r=i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),b(e,r,{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),a},"bpmn:ScriptTask":function(e,t,n={}){var r=xe(e,t,n=et(n,["fill","stroke"]));return b(e,i.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:SendTask":function(e,t,n={}){var r=xe(e,t,n=et(n,["fill","stroke"]));return b(e,i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{fill:fe(t,p,n.stroke),stroke:he(t,l,n.fill),strokeWidth:1}),r},"bpmn:SequenceFlow":function(e,t,n={}){n=et(n,["fill","stroke"]);var i=he(t,l,n.fill),r=fe(t,p,n.stroke),o=x(e,t.waypoints,{markerEnd:d(e,"sequenceflow-end",i,r),stroke:r}),a=k(t),{source:s}=t;if(s){var c=k(s);a.get("conditionExpression")&&A(c,"bpmn:Activity")&&L(o,{markerStart:d(e,"conditional-flow-marker",i,r)}),c.get("default")&&(A(c,"bpmn:Gateway")||A(c,"bpmn:Activity"))&&c.get("default")===a&&L(o,{markerStart:d(e,"conditional-default-flow-marker",i,r)})}return o},"bpmn:ServiceTask":function(e,t,n={}){var r=xe(e,t,n=et(n,["fill","stroke"]));return y(e,10,10,{fill:he(t,l,n.fill),stroke:"none",transform:"translate(6, 6)"}),b(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),y(e,10,10,{fill:he(t,l,n.fill),stroke:"none",transform:"translate(11, 10)"}),b(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:StartEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=et(n,["fill","stroke"]),k(t).get("isInterrupting")||(n={...n,strokeDasharray:"6"});var r=ae(e,t,n);return i&&Y(t,e,n),r},"bpmn:SubProcess":function(e,t,n={}){return ve(e,t,n=S(t)?et(n,["fill","stroke","width","height"]):et(n,["fill","stroke"]))},"bpmn:Task":function(e,t,n={}){return xe(e,t,n=et(n,["fill","stroke"]))},"bpmn:TextAnnotation":function(e,t,n={}){n=et(n,["fill","stroke","width","height"]);var{width:r,height:o}=de(t,n),a=g(e,r,o,0,0,{fill:"none",stroke:"none"});return b(e,i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:0,my:0}}),{stroke:fe(t,p,n.stroke)}),Q(e,k(t).get("text")||"",{align:"left-top",box:de(t,n),padding:7,style:{fill:me(t,c,p,n.stroke)}}),a},"bpmn:Transaction":function(e,t,i={}){i=S(t)?et(i,["fill","stroke","width","height"]):et(i,["fill","stroke"]);var r=ve(e,t,{strokeWidth:1.5,...i}),o=n.style(["no-fill","no-events"],{stroke:fe(t,p,i.stroke),strokeWidth:1.5});return S(t)||(i={}),g(e,ye(t,i),ge(t,i),7,3,o),r},"bpmn:UserTask":function(e,t,n={}){var r=xe(e,t,n=et(n,["fill","stroke"]));return b(e,i.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:.5}),b(e,i.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:.5}),b(e,i.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:.5}),r},label:function(e,t,n={}){return function(e,t,n={}){var i={width:90,height:30,x:t.width/2+t.x,y:t.height/2+t.y};return Q(e,T(t),{box:i,fitBox:!0,style:E({},o.getExternalStyle(),{fill:me(t,c,p,n.stroke)})})}(e,t,n)}};this._drawPath=b,this._renderer=M}function et(e,t=[]){return t.reduce(((t,n)=>(e[n]&&(t[n]=e[n]),t)),{})}e(Qe,_),Qe.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Qe.prototype.canRender=function(e){return A(e,"bpmn:BaseElement")},Qe.prototype.drawShape=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},Qe.prototype.drawConnection=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},Qe.prototype.getShapePath=function(e){return A(e,"bpmn:Event")?function(e){var t=e.x+e.width/2,n=e.y+e.height/2,i=e.width/2;return ie([["M",t,n],["m",0,-i],["a",i,i,0,1,1,0,2*i],["a",i,i,0,1,1,0,-2*i],["z"]])}(e):A(e,"bpmn:Activity")?function(e,t){var n=e.x,i=e.y,r=e.width,o=e.height;return ie([["M",n+t,i],["l",r-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-r,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):A(e,"bpmn:Gateway")?function(e){var t=e.width/2,n=e.height/2;return ie([["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,i=e.width;return ie([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])}(e)};var tt={width:150,height:50};function nt(e,t){var n;t.textContent=e;try{var i,r=""===e;return t.textContent=r?"dummy":e,i={width:(n=t.getBBox()).width+2*n.x,height:n.height},r&&(i.width=0),i}catch(e){return console.log(e),{width:0,height:0}}}function it(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=nt(o,n)).width=o?i.width:0," "===o||""===o||i.width<Math.round(t)||o.length<2)return rt(e,o,r,i);o=at(o,i.width,t)}}function rt(e,t,n,i){if(t.length<n.length){var r=n.slice(t.length).trim();e.unshift(r)}return{width:i.width,height:i.height,text:t}}var ot="­";function at(e,t,n){var i=Math.max(e.length*(n/t),1),r=function(e,t){var n,i=e.split(/(\s|-|\u00AD)/g),r=[],o=0;if(i.length>1)for(;n=i.shift();){if(!(n.length+o<t)){"-"!==n&&n!==ot||r.pop();break}r.push(n),o+=n.length}var a=r[r.length-1];return a&&a===ot&&(r[r.length-1]="-"),r.join("")}(e,i);return r||(r=e.slice(0,Math.max(Math.round(i-1),1))),r}function st(e){this._config=E({},{size:tt,padding:0,style:{},align:"center-top"},e||{})}st.prototype.createText=function(e,t){return this.layoutText(e,t).element},st.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},st.prototype.layoutText=function(e,t){var n=E({},this._config.size,t.box),i=E({},this._config.style,t.style),r=function(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}(t.align||this._config.align),o=function(e){return a(e)?E({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,l=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(i),p=e.split(/\u00AD?\r?\n/),c=[],u=n.width-o.left-o.right,h=$("text");for(L(h,{x:0,y:0}),L(h,i),D(function(){var e=document.getElementById("helper-svg");return e||(L(e=$("svg"),{id:"helper-svg"}),ke(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}(),h);p.length;)c.push(it(p,u,h));"middle"===r.vertical&&(o.top=o.bottom=0);var d=m(c,(function(e,t,n){return e+(l||t.height)}),0)+o.top+o.bottom,y=m(c,(function(e,t,n){return t.width>e?t.width:e}),0),g=o.top;"middle"===r.vertical&&(g+=(n.height-d)/2),g-=(l||c[0].height)/4;var v=$("text");return L(v,i),f(c,(function(e){var t;switch(g+=l||e.height,r.horizontal){case"left":t=o.left;break;case"right":t=(s?y:u)-o.right-e.width;break;default:t=Math.max(((s?y:u)-e.width)/2+o.left,0)}var n=$("tspan");L(n,{x:t,y:g}),n.textContent=e.text,D(v,n)})),ee(h),{dimensions:{width:y,height:d},element:v}};function lt(e){var t=E({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=E({},t,{fontSize:n},e&&e.externalStyle||{}),r=new st({style:t});this.getExternalLabelBounds=function(e,t){var n=r.getDimensions(t,{box:{width:90,height:30},style:i});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 i=r.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(i.height))}},this.createText=function(e,t){return r.createText(e,t||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return i}}lt.$inject=["config.textRenderer"];var pt=/\{([^{}]+)\}/g,ct=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var ut={__init__:["bpmnRenderer"],bpmnRenderer:["type",Qe],textRenderer:["type",lt],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,i,r=this.pathMap[e];t.abspos?(n=t.abspos.x,i=t.abspos.y):(n=t.containerWidth*t.position.mx,i=t.containerHeight*t.position.my);var o={};if(t.position){for(var a=t.containerHeight/r.height*t.yScaleFactor,s=t.containerWidth/r.width*t.xScaleFactor,l=0;l<r.heightElements.length;l++)o["y"+l]=r.heightElements[l]*a;for(var p=0;p<r.widthElements.length;p++)o["x"+p]=r.widthElements[p]*s}var c,u,h=(c=r.d,u={mx:n,my:i,e:o},String(c).replace(pt,(function(e,t){return function(e,t,n){var i=n;return t.replace(ct,(function(e,t,n,r,o){t=t||r,i&&(t in i&&(i=i[t]),"function"==typeof i&&o&&(i=i()))})),i=(null==i||i==n?e:i)+""}(e,t,u)})));return h}}]};var ht={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]};function ft(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function mt(e){return t={x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2},{x:Math.round(t.x),y:Math.round(t.y)};var t}function dt(e){for(var t=e.waypoints,n=t.reduce((function(e,n,i){var r,o,a=t[i-1];if(a){var s=e[e.length-1],l=s&&s.endLength||0,p=(r=a,o=n,Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)));e.push({start:a,end:n,startLength:l,endLength:l+p,length:p})}return e}),[]),i=n.reduce((function(e,t){return e+t.length}),0),r=i/2,o=0,a=n[o];a.endLength<r;)a=n[++o];var s=(r-a.startLength)/a.length;return{x:a.start.x+(a.end.x-a.start.x)*s,y:a.start.y+(a.end.y-a.start.y)*s}}function yt(e){return a(t=e)&&c(t,"waypoints")?dt(e):mt(e);var t}function gt(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function vt(e,t,n){return E({id:e.id,type:e.$type,businessObject:e,di:t},n)}function xt(e,t,n){var i=e.waypoint;return!i||i.length<2?[yt(t),yt(n)]:i.map((function(e){return{x:e.x,y:e.y}}))}function bt(e,t,n){return new Error(`element ${gt(t)} referenced by ${gt(e)}#${n} not yet drawn`)}function wt(e,t,n,i,r){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._textRenderer=r}wt.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],wt.prototype.add=function(e,t,n){var i,r,o,a,s,l,p;if(A(t,"bpmndi:BPMNPlane")){var c=A(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};i=this._elementFactory.createRoot(vt(e,t,c)),this._canvas.addRootElement(i)}else if(A(t,"bpmndi:BPMNShape")){var u=!S(e,t),h=function(e){return A(e,"bpmn:Group")}(e);r=n&&(n.hidden||n.collapsed);var f=t.bounds;i=this._elementFactory.createShape(vt(e,t,{collapsed:u,hidden:r,x:Math.round(f.x),y:Math.round(f.y),width:Math.round(f.width),height:Math.round(f.height),isFrame:h})),A(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,i),A(e,"bpmn:Lane")&&(o=0),A(e,"bpmn:DataStoreReference")&&(a=n,s=yt(f),l=s.x,p=s.y,l>=a.x&&l<=a.x+a.width&&p>=a.y&&p<=a.y+a.height||(n=this._canvas.findRoot(n))),this._canvas.addShape(i,n,o)}else{if(!A(t,"bpmndi:BPMNEdge"))throw new Error(`unknown di ${gt(t)} for element ${gt(e)}`);var m=this._getSource(e),d=this._getTarget(e);r=n&&(n.hidden||n.collapsed),i=this._elementFactory.createConnection(vt(e,t,{hidden:r,source:m,target:d,waypoints:xt(t,m,d)})),A(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(i,n,o)}return function(e){return A(e,"bpmn:Event")||A(e,"bpmn:Gateway")||A(e,"bpmn:DataStoreReference")||A(e,"bpmn:DataObjectReference")||A(e,"bpmn:DataInput")||A(e,"bpmn:DataOutput")||A(e,"bpmn:SequenceFlow")||A(e,"bpmn:MessageFlow")||A(e,"bpmn:Group")}(e)&&T(i)&&this.addLabel(e,t,i),this._eventBus.fire("bpmnElement.added",{element:i}),i},wt.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${gt(e)}#attachedToRef`);var i=this._elementRegistry.get(n.id),r=i&&i.attachers;if(!i)throw bt(e,n,"attachedToRef");t.host=i,r||(i.attachers=r=[]),-1===r.indexOf(t)&&r.push(t)},wt.prototype.addLabel=function(e,t,n){var i,r,o;return i=N(t,n),(r=T(n))&&(i=this._textRenderer.getExternalLabelBounds(i,r)),o=this._elementFactory.createLabel(vt(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!T(n),x:Math.round(i.x),y:Math.round(i.y),width:Math.round(i.width),height:Math.round(i.height)})),this._canvas.addShape(o,n.parent)},wt.prototype._getConnectedElement=function(e,t){var n,i,r=e.$type;if(i=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===r&&(i=i&&i[0]),("source"===t&&"bpmn:DataOutputAssociation"===r||"target"===t&&"bpmn:DataInputAssociation"===r)&&(i=e.$parent),n=i&&this._getElement(i))return n;throw i?bt(e,i,t+"Ref"):new Error(`${gt(e)}#${t} Ref not specified`)},wt.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},wt.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},wt.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};var Et={__depends__:[ut,{__depends__:[ht],bpmnImporter:["type",wt]}]};function _t(e,t){var n,i,r,a;return t=!!t,o(e)||(e=[e]),f(e,(function(e){var o=e;e.waypoints&&!t&&(o=_t(e.waypoints,!0));var s=o.x,l=o.y,p=o.height||0,c=o.width||0;(s<n||void 0===n)&&(n=s),(l<i||void 0===i)&&(i=l),(s+c>r||void 0===r)&&(r=s+c),(l+p>a||void 0===a)&&(a=l+p)})),{x:n,y:i,height:a-i,width:r-n}}function At(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function kt(e){return!(!e||!e.isFrame)}function Rt(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}Rt.prototype.next=function(){return this._prefix+ ++this._counter};var St=new Rt("ov");function Ct(e,t,n,i){var r,o;this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=St,this._overlayDefaults=E({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(r=n.getContainer(),ke(o=Ge('<div class="djs-overlay-container" />'),{position:"absolute",width:0,height:0}),r.insertBefore(o,r.firstChild),o),this._init()}function Mt(e,t,n){ke(e,{left:t+"px",top:n+"px"})}function Pt(e,t){e.style.display=!1===t?"none":""}function Nt(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}Ct.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Ct.prototype.get=function(e){if(p(e)&&(e={id:e}),p(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?h(t.overlays,g({type:e.type})):t.overlays.slice():[]}return e.type?h(this._overlays,g({type:e.type})):e.id?this._overlays[e.id]:null},Ct.prototype.add=function(e,t,n){if(a(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 i=this._ids.next();return n=E({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},Ct.prototype.remove=function(e){var t=this.get(e)||[];o(t)||(t=[t]);var n=this;f(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(Ke(e.html),Ke(e.htmlContainer),delete e.htmlContainer,delete e.element,delete n._overlays[e.id]),t){var i=t.overlays.indexOf(e);-1!==i&&t.overlays.splice(i,1)}}))},Ct.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},Ct.prototype.show=function(){Pt(this._overlayRoot)},Ct.prototype.hide=function(){Pt(this._overlayRoot,!1)},Ct.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Pe(this._overlayRoot)},Ct.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var o=_t(t);i=o.x,r=o.y}Mt(n,i,r),Re(e.html,"data-container-id",t.id)},Ct.prototype._updateOverlay=function(e){var t,n,i=e.position,r=e.htmlContainer,o=e.element,a=i.left,s=i.top;void 0!==i.right&&(t=o.waypoints?_t(o).width:o.width,a=-1*i.right+t);void 0!==i.bottom&&(n=o.waypoints?_t(o).height:o.height,s=-1*i.bottom+n);Mt(r,a||0,s||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Ct.prototype._createOverlayContainer=function(e){var t=Ge('<div class="djs-overlays" />');ke(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Ct.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Nt(this._overlayRoot,n)},Ct.prototype._getOverlayContainer=function(e,t){var n=u(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},Ct.prototype._addOverlay=function(e){var t,n,i=e.id,r=e.element,o=e.html;o.get&&o.constructor.prototype.jquery&&(o=o.get(0)),p(o)&&(o=Ge(o)),n=this._getOverlayContainer(r),ke(t=Ge('<div class="djs-overlay" data-overlay-id="'+i+'">'),{position:"absolute"}),t.appendChild(o),e.type&&Ce(t).add("djs-overlay-"+e.type),Pt(t,this._canvas.findRoot(r)===this._canvas.getRootElement()),e.htmlContainer=t,n.overlays.push(e),n.html.appendChild(t),this._overlays[i]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Ct.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,i=this._canvas.findRoot(e.element),o=n&&n.minZoom,a=n&&n.maxZoom,s=e.htmlContainer,l=!0;(i!==this._canvas.getRootElement()||n&&(r(o)&&o>t.scale||r(a)&&a<t.scale))&&(l=!1),Pt(s,l),this._updateOverlayScale(e,t)},Ct.prototype._updateOverlayScale=function(e,t){var n,i,o,a=e.scale,s=e.htmlContainer,l="";!0!==a&&(!1===a?(n=1,i=1):(n=a.min,i=a.max),r(n)&&t.scale<n&&(o=(1/t.scale||1)*n),r(i)&&t.scale>i&&(o=(1/t.scale||1)*i)),r(o)&&(l="scale("+o+","+o+")"),Nt(s,l)},Ct.prototype._updateOverlaysVisibilty=function(e){var t=this;f(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},Ct.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;f(t.get({element:n}),(function(e){t.remove(e.id)}));var i=t._getOverlayContainer(n);if(i){Ke(i.html);var r=t._overlayContainers.indexOf(i);-1!==r&&t._overlayContainers.splice(r,1)}})),e.on("element.changed",500,(function(e){var n=e.element,i=t._getOverlayContainer(n,!0);i&&(f(i.overlays,(function(e){t._updateOverlay(e)})),t._updateOverlayContainer(i))})),e.on("element.marker.update",(function(e){var n=t._getOverlayContainer(e.element,!0);n&&Ce(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 Tt={__init__:["overlays"],overlays:["type",Ct]};function Dt(e,t,n,i){e.on("element.changed",(function(i){var r=i.element;(r.parent||r===t.getRootElement())&&(i.gfx=n.getGraphics(r)),i.gfx&&e.fire(At(r)+".changed",i)})),e.on("elements.changed",(function(t){var n=t.elements;n.forEach((function(t){e.fire("element.changed",{element:t})})),i.updateContainments(n)})),e.on("shape.changed",(function(e){i.update("shape",e.element,e.gfx)})),e.on("connection.changed",(function(e){i.update("connection",e.element,e.gfx)}))}Dt.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var Bt={__init__:["changeSupport"],changeSupport:["type",Dt]};function Ot(e){this._eventBus=e}function Lt(e){return function(t,n,i,r,o){(l(t)||s(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}}function It(e,t){t.invoke(Ot,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)}))}Ot.$inject=["eventBus"],Ot.prototype.on=function(e,t,n,i,r,p){if((l(t)||s(t))&&(p=r,r=i,i=n,n=t,t=null),l(n)&&(p=r,r=i,i=n,n=1e3),a(r)&&(p=r,r=!1),!l(i))throw new Error("handlerFn must be a function");o(e)||(e=[e]);var c=this._eventBus;f(e,(function(e){var o=["commandStack",e,t].filter((function(e){return e})).join(".");c.on(o,n,r?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(i,p):i,p)}))},Ot.prototype.canExecute=Lt("canExecute"),Ot.prototype.preExecute=Lt("preExecute"),Ot.prototype.preExecuted=Lt("preExecuted"),Ot.prototype.execute=Lt("execute"),Ot.prototype.executed=Lt("executed"),Ot.prototype.postExecute=Lt("postExecute"),Ot.prototype.postExecuted=Lt("postExecuted"),Ot.prototype.revert=Lt("revert"),Ot.prototype.reverted=Lt("reverted"),e(It,Ot),It.$inject=["canvas","injector"];var Ft={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",It]},jt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};var Vt="_plane";function Wt(e){var t=e.id;return A(e,"bpmn:SubProcess")?function(e){return e+Vt}(t):t}function zt(e,t,n){var i=Ge('<ul class="bjs-breadcrumbs"></ul>'),r=n.getContainer(),o=Ce(r);r.appendChild(i);var a=[];function s(e){e&&(a=function(e){for(var t=k(e),n=[],i=t;i;i=i.$parent)(A(i,"bpmn:SubProcess")||A(i,"bpmn:Process"))&&n.push(i);return n.reverse()}(e));var r=a.flatMap((function(e){var i=n.findRoot(Wt(e))||n.findRoot(e.id);if(!i&&A(e,"bpmn:Process")){var r=t.find((function(t){var n=k(t);return n&&n.get("processRef")===e}));i=r&&n.findRoot(r.id)}if(!i)return[];var o,a=(o=""+(o=e.name||e.id))&&o.replace(/[&<>"']/g,(function(e){return jt[e]})),s=Ge('<li><span class="bjs-crumb"><a title="'+a+'">'+a+"</a></span></li>");return s.addEventListener("click",(function(){n.setRootElement(i)})),s}));i.innerHTML="";var s=r.length>1;o.toggle("bjs-breadcrumbs-shown",s),r.forEach((function(e){i.appendChild(e)}))}e.on("element.changed",(function(e){var t=k(e.element);u(a,(function(e){return e===t}))&&s()})),e.on("root.set",(function(e){s(e.element)}))}function $t(e,t){var n=null,i=new Gt;e.on("root.set",(function(e){var r=e.element,o=t.viewbox(),a=i.get(r);if(i.set(n,{x:o.x,y:o.y,zoom:o.scale}),n=r,A(r,"bpmn:SubProcess")||a){a=a||{x:0,y:0,zoom:1};var s=(o.x-a.x)*o.scale,l=(o.y-a.y)*o.scale;0===s&&0===l||t.scroll({dx:s,dy:l}),a.zoom!==o.scale&&t.zoom(a.zoom,{x:0,y:0})}})),e.on("diagram.clear",(function(){i.clear(),n=null}))}function Gt(){this._entries=[],this.set=function(e,t){var n=!1;for(var i in this._entries)if(this._entries[i][0]===e){this._entries[i][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)}}zt.$inject=["eventBus","elementRegistry","canvas"],$t.$inject=["eventBus","canvas"];var Ht=180,Kt=160;function Ut(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 qt(e){return A(e,"bpmndi:BPMNDiagram")?e:qt(e.$parent)}Ut.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)})),e.diagrams.filter((e=>e.plane)).flatMap((e=>t._createNewDiagrams(e.plane))).forEach((function(e){t._movePlaneElementsToOrigin(e.plane)}))}},Ut.prototype._createNewDiagrams=function(e){var t=this,n=[],i=[];e.get("planeElement").forEach((function(t){var r=t.bpmnElement;if(r){var o=r.$parent;A(r,"bpmn:SubProcess")&&!t.isExpanded&&n.push(r),function(e,t){var n=e.$parent;if(!A(n,"bpmn:SubProcess")||n===t.bpmnElement)return!1;if(function(e,t){return y(t,(function(t){return A(e,t)}))}(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))return!1;return!0}(r,e)&&i.push({diElement:t,parent:o})}}));var r=[];return n.forEach((function(e){if(!t._processToDiagramMap[e.id]){var n=t._createDiagram(e);t._processToDiagramMap[e.id]=n,r.push(n)}})),i.forEach((function(e){for(var i=e.diElement,r=e.parent;r&&-1===n.indexOf(r);)r=r.$parent;if(r){var o=t._processToDiagramMap[r.id];t._moveToDiPlane(i,o.plane)}})),r},Ut.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=ft(e.bounds);t.top=Math.min(n.top,t.top),t.left=Math.min(n.left,t.left)}})),function(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}(t)}(e),i=n.x-Ht,r=n.y-Kt;t.forEach((function(e){e.waypoint?e.waypoint.forEach((function(e){e.x=e.x-i,e.y=e.y-r})):e.bounds&&(e.bounds.x=e.bounds.x-i,e.bounds.y=e.bounds.y-r)}))},Ut.prototype._moveToDiPlane=function(e,t){var n=qt(e).plane.get("planeElement");n.splice(n.indexOf(e),1),t.get("planeElement").push(e)},Ut.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},Ut.$inject=["eventBus","moddle"];var Yt=250;function Xt(e,t,n,i,r){Ot.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=i,this._translate=r;var o=this;this.executed("shape.toggleCollapse",Yt,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.reverted("shape.toggleCollapse",Yt,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.executed(["shape.create","shape.move","shape.delete"],Yt,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;o._canDrillDown(i)&&o._addOverlay(i),o._updateDrilldownOverlay(t),o._updateDrilldownOverlay(n),o._updateDrilldownOverlay(i)}),!0),this.reverted(["shape.create","shape.move","shape.delete"],Yt,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;o._canDrillDown(i)&&o._addOverlay(i),o._updateDrilldownOverlay(t),o._updateDrilldownOverlay(n),o._updateDrilldownOverlay(i)}),!0),t.on("import.render.complete",(function(){n.filter((function(e){return o._canDrillDown(e)})).map((function(e){o._addOverlay(e)}))}))}e(Xt,Ot),Xt.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},Xt.prototype._canDrillDown=function(e){var t=this._canvas;return A(e,"bpmn:SubProcess")&&t.findRoot(Wt(e))},Xt.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=k(e),i=t.get({element:n.id,type:"drilldown"})[0];if(i){var r=n&&n.get("flowElements")&&n.get("flowElements").length;Ce(i.html).toggle("bjs-drilldown-empty",!r)}},Xt.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,i=k(e);n.get({element:e,type:"drilldown"}).length&&this._removeOverlay(e);var r=Ge('<button type="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>'),o=i.get("name")||i.get("id"),a=this._translate("Open {element}",{element:o});r.setAttribute("title",a),r.addEventListener("click",(function(){t.setRootElement(t.findRoot(Wt(e)))})),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:r}),this._updateOverlayVisibility(e)},Xt.prototype._removeOverlay=function(e){this._overlays.remove({element:e,type:"drilldown"})},Xt.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];var Zt={__depends__:[Tt,Bt,Ft],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",zt],drilldownCentering:["type",$t],drilldownOverlayBehavior:["type",Xt],subprocessCompatibility:["type",Ut]};function Jt(e){return e.originalEvent||e.srcEvent}function Qt(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 en(e,t){return(Jt(e)||e).button===t}function tn(e){return en(e,0)}function nn(e){return!0}function rn(e){return tn(e)||function(e){return en(e,1)}(e)}function on(e,t,n){var i=this;function r(n,i,r){var o,a;(function(e,t){var n=l[e]||tn;return!n(t)})(n,i)||(r?a=t.getGraphics(r):(o=i.delegateTarget||i.target)&&(a=o,r=t.get(a)),a&&r&&!1===e.fire(n,{element:r,gfx:a,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var o={};function a(e){return o[e]}var s={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":nn,"element.mousedown":rn,"element.mouseup":rn,"element.click":rn,"element.dblclick":rn};function p(e,t,n,i){var a=o[n]=function(e){r(n,e)};i&&(l[n]=i),a.$delegate=Ve.bind(e,"svg, .djs-element",t,a)}function c(e,t,n){var i=a(n);i&&Ve.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){var t;t=e.svg,f(s,(function(e,n){c(t,n,e)}))})),e.on("canvas.init",(function(e){var t;t=e.svg,f(s,(function(e,n){p(t,n,e)}))})),e.on(["shape.added","connection.added"],(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.createHit",{element:n,gfx:i})})),e.on(["shape.changed","connection.changed"],500,(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.updateHit",{element:n,gfx:i})})),e.on("interactionEvents.createHit",500,(function(e){var t=e.element,n=e.gfx;i.createDefaultHit(t,n)})),e.on("interactionEvents.updateHit",(function(e){var t=e.element,n=e.gfx;i.updateDefaultHit(t,n)}));var u=d("djs-hit djs-hit-stroke"),h=d("djs-hit djs-hit-click-stroke"),m={all:d("djs-hit djs-hit-all"),"click-stroke":h,stroke:u,"no-move":d("djs-hit djs-hit-no-move")};function d(e,t){return t=E({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function y(e,t){var n=m[t];if(!n)throw new Error("invalid hit type <"+t+">");return L(e,n),e}function g(e,t){D(e,t)}this.removeHits=function(e){var t;f((t=".djs-hit",(e||document).querySelectorAll(t)),ee)},this.createDefaultHit=function(e,t){var n,i=e.waypoints,r=e.isFrame;return i?this.createWaypointsHit(t,i):(n=r?"stroke":"all",this.createBoxHit(t,n,{width:e.width,height:e.height}))},this.createWaypointsHit=function(e,t){var n=le(t);return y(n,"stroke"),g(e,n),n},this.createBoxHit=function(e,t,n){n=E({x:0,y:0},n);var i=$("rect");return y(i,t),L(i,n),g(e,i),i},this.updateDefaultHit=function(e,t){var n=He(".djs-hit",t);if(n)return e.waypoints?pe(n,e.waypoints):L(n,{width:e.width,height:e.height}),n},this.fire=r,this.triggerMouseEvent=function(e,t,n){var i=s[e];if(!i)throw new Error("unmapped DOM event name <"+e+">");return r(i,t,n)},this.mouseHandler=a,this.registerEvent=p,this.unregisterEvent=c}on.$inject=["eventBus","elementRegistry","styles"];var an={__init__:["interactionEvents"],interactionEvents:["type",on]};function sn(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)}))}sn.$inject=["eventBus","canvas"],sn.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(-1!==n){var i=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:t})}},sn.prototype.get=function(){return this._selectedElements},sn.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},sn.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();o(e)||(e=e?[e]:[]);var r=this._canvas,a=r.getRootElement();e=e.filter((function(e){var t=r.findRoot(e);return a===t})),t?f(e,(function(e){-1===n.indexOf(e)&&n.push(e)})):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:n})};var ln="hover",pn="selected";function cn(e,t){function n(t,n){e.addMarker(t,n)}function i(t,n){e.removeMarker(t,n)}this._canvas=e,t.on("element.hover",(function(e){n(e.element,ln)})),t.on("element.out",(function(e){i(e.element,ln)})),t.on("selection.changed",(function(e){var t=e.oldSelection,r=e.newSelection;f(t,(function(e){-1===r.indexOf(e)&&i(e,pn)})),f(r,(function(e){-1===t.indexOf(e)&&n(e,pn)}))}))}function un(e,t,n,i){e.on("create.end",500,(function(e){var n=e.context,i=n.canExecute,r=n.elements,a=(n.hints||{}).autoSelect;if(i){if(!1===a)return;o(a)?t.select(a):t.select(r.filter(hn))}})),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||[],r=i.get(e.context.shape.id);u(n,(function(e){return r.id===e.id}))||t.select(r)})),e.on("element.click",(function(e){if(tn(e)){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,a=function(e){var t=Jt(e)||e;return tn(e)&&t.shiftKey}(e);if(r&&o)return a?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,a)}}))}function hn(e){return!e.hidden}cn.$inject=["canvas","eventBus"],un.$inject=["eventBus","selection","canvas","elementRegistry"];var fn={__init__:["selectionVisuals","selectionBehavior"],__depends__:[an],selection:["type",sn],selectionVisuals:["type",cn],selectionBehavior:["type",un]};const mn=/^class[ {]/;function dn(e){return Array.isArray(e)}function yn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function gn(...e){1===e.length&&dn(e[0])&&(e=e[0]);const t=(e=[...e]).pop();return t.$inject=e,t}const vn=/constructor\s*[^(]*\(\s*([^)]*)\)/m,xn=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,bn=/\/\*([^*]*)\*\//m;function wn(e){if("function"!=typeof e)throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(function(e){return mn.test(e.toString())}(e)?vn:xn);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map((e=>{const t=e.match(bn);return(t&&t[1]||e).trim()}))||[]}function En(e,t){const n=t||{get:function(e,t){if(i.push(e),!1===t)return null;throw s(`No provider for "${e}"!`)}},i=[],r=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(e){const t=i.join(" -> ");return i.length=0,new Error(t?`${e} (Resolving: ${t})`:e)};function l(e,t){if(!r[e]&&e.includes(".")){const t=e.split(".");let n=l(t.shift());for(;t.length;)n=n[t.shift()];return n}if(yn(o,e))return o[e];if(yn(r,e)){if(-1!==i.indexOf(e))throw i.push(e),s("Cannot resolve circular dependency!");return i.push(e),o[e]=r[e][0](r[e][1]),i.pop(),o[e]}return n.get(e,t)}function p(e,t){if(void 0===t&&(t={}),"function"!=typeof e){if(!dn(e))throw s(`Cannot invoke "${e}". Expected a function!`);e=gn(e.slice())}return{fn:e,dependencies:(e.$inject||wn(e)).map((e=>yn(t,e)?t[e]:l(e)))}}function c(e){const{fn:t,dependencies:n}=p(e);return new(Function.prototype.bind.call(t,null,...n))}function u(e,t,n){const{fn:i,dependencies:r}=p(e,n);return i.apply(t,r)}function h(e){return gn((t=>e.get(t)))}function f(e,t){if(t&&t.length){const n=Object.create(null),i=Object.create(null),o=[],a=[],s=[];let l,p,c,u;for(let e in r)l=r[e],-1!==t.indexOf(e)&&("private"===l[2]?(p=o.indexOf(l[3]),-1===p?(c=l[3].createChild([],t),u=h(c),o.push(l[3]),a.push(c),s.push(u),n[e]=[u,e,"private",c]):n[e]=[s[p],e,"private",a[p]]):n[e]=[l[2],l[1]],i[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]],i[t]=!0)}));t.forEach((e=>{if(!i[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')})),e.unshift(n)}return new En(e,a)}const m={factory:u,type:c,value:function(e){return e}};function d(e,t){const n=e.__init__||[];return function(){n.forEach((e=>{"string"==typeof e?t.get(e):t.invoke(e)}))}}function y(e){const t=e.__exports__;if(t){const n=e.__modules__,i=Object.keys(e).reduce(((t,n)=>("__exports__"!==n&&"__modules__"!==n&&"__init__"!==n&&"__depends__"!==n&&(t[n]=e[n]),t)),Object.create(null)),o=f((n||[]).concat(i)),a=gn((function(e){return o.get(e)}));t.forEach((function(e){r[e]=[a,e,"private",o]}));const s=(e.__init__||[]).slice();return s.unshift((function(){o.init()})),d(e=Object.assign({},e,{__init__:s}),o)}return Object.keys(e).forEach((function(t){if("__init__"===t||"__depends__"===t)return;const n=e[t];if("private"===n[2])return void(r[t]=n);const i=n[0],o=n[1];r[t]=[m[i],_n(i,o),i]})),d(e,a)}function g(e,t){return-1!==e.indexOf(t)||-1!==(e=(t.__depends__||[]).reduce(g,e)).indexOf(t)?e:e.concat(t)}this.get=l,this.invoke=u,this.instantiate=c,this.createChild=f,this.init=function(e){const t=e.reduce(g,[]).map(y);let n=!1;return function(){n||(n=!0,t.forEach((e=>e())))}}(e)}function _n(e,t){return"value"!==e&&dn(t)&&(t=gn(t.slice())),t}function An(e,t){_.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(An,_),An.prototype.canRender=function(){return!0},An.prototype.drawShape=function(e,t,n){var i=$("rect");return L(i,{x:0,y:0,width:t.width||0,height:t.height||0}),kt(t)?L(i,E({},this.FRAME_STYLE,n||{})):L(i,E({},this.SHAPE_STYLE,n||{})),D(e,i),i},An.prototype.drawConnection=function(e,t,n){var i=le(t.waypoints,E({},this.CONNECTION_STYLE,n||{}));return D(e,i),i},An.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width;return ie([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])},An.prototype.getConnectionPath=function(e){var t,n,i=e.waypoints,r=[];for(t=0;n=i[t];t++)n=n.original||n,r.push([0===t?"M":"L",n.x,n.y]);return ie(r)},An.$inject=["eventBus","styles"];var kn={__init__:["defaultRenderer"],defaultRenderer:["type",An],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 E(this.style(t,n),{class:e})},this.style=function(t,n){o(t)||n||(n=t,t=[]);var i=m(t,(function(t,n){return E(t,e[n]||{})}),{});return n?E(i,n):i},this.computeStyle=function(e,n,i){return o(n)||(i=n,n=[]),t.style(n||[],E({},i,e||{}))}}]};function Rn(e,t){return Math.round(e*t)/t}function Sn(e){return s(e)?e+"px":e}function Cn(e,t,n){const i=$("g");F(i).add(t);const r=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]||null),i}const Mn={shape:["x","y","width","height"],connection:["waypoints"]};function Pn(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}function Nn(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}Pn.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],Pn.prototype._init=function(e){const t=this._eventBus,n=this._container=function(e){const t=(e=E({},{width:"100%",height:"100%"},e)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),ke(n,{position:"relative",overflow:"hidden",width:Sn(e.width),height:Sn(e.height)}),t.appendChild(n),n}(e),i=this._svg=$("svg");L(i,{width:"100%",height:"100%"}),Re(i,"tabindex",0),e.autoFocus&&t.on("element.hover",(()=>{this.restoreFocus()})),t.on("element.mousedown",500,(e=>{this.focus()})),i.addEventListener("focusin",(()=>{this._setFocused(!0)})),i.addEventListener("focusout",(()=>{this._setFocused(!1)})),D(n,i);const r=this._viewport=Cn(i,"viewport");e.deferUpdate&&(this._viewboxChanged=function(e,t){let n,i,r,o;function a(n){let a=Date.now(),p=n?0:o+t-a;if(p>0)return s(p);e.apply(r,i),l()}function s(e){n=setTimeout(a,e)}function l(){n&&clearTimeout(n),n=o=i=r=void 0}function p(...e){o=Date.now(),i=e,r=this,n||s(t)}return p.flush=function(){n&&a(!0),l()},p.cancel=l,p}(w(this._viewboxChanged,this),300)),t.on("diagram.init",(()=>{t.fire("canvas.init",{svg:i,viewport:r})})),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)},Pn.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},Pn.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},Pn.prototype._clear=function(){this._elementRegistry.getAll().forEach((e=>{const t=At(e);"root"===t?this.removeRootElement(e):this._removeElement(e,t)})),this._planes=[],this._rootElement=null,delete this._cachedViewbox},Pn.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},Pn.prototype.restoreFocus=function(){document.activeElement===document.body&&this.focus()},Pn.prototype.isFocused=function(){return this._focused},Pn.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},Pn.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},Pn.prototype._getChildIndex=function(e){return m(this._layers,(function(t,n){return n.visible&&e>=n.index&&t++,t}),0)},Pn.prototype._createLayer=function(e,t){void 0===t&&(t=1);const n=this._getChildIndex(t);return{group:Cn(this._viewport,"layer-"+e,n),index:t,visible:!0}},Pn.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,i=t.group,r=t.index;if(t.visible)return i;const o=this._getChildIndex(r);return n.insertBefore(i,n.childNodes[o]||null),t.visible=!0,i},Pn.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?(ee(n),t.visible=!1,n):n},Pn.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],ee(t.group))},Pn.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},Pn.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},Pn.prototype.getRootElements=function(){return this._planes.map((function(e){return e.rootElement}))},Pn.prototype._findPlaneForRoot=function(e){return u(this._planes,(function(t){return t.rootElement===e}))},Pn.prototype.getContainer=function(){return this._container},Pn.prototype._updateMarker=function(e,t,n){let i;e.id||(e=this._elementRegistry.get(e)),e.markers=e.markers||new Set,i=this._elementRegistry._elements[e.id],i&&(f([i.gfx,i.secondaryGfx],(function(i){i&&(n?(e.markers.add(t),F(i).add(t)):(e.markers.delete(t),F(i).remove(t)))})),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},Pn.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},Pn.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},Pn.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),!!e.markers&&e.markers.has(t)},Pn.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},Pn.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},Pn.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 i=this.getLayer(n,0);return this.hideLayer(n),this._addRoot(e,i),this._planes.push({rootElement:e,layer:i}),e},Pn.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},Pn.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},Pn.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)},Pn.prototype._addRoot=function(e,t){const n=this._elementRegistry,i=this._eventBus;i.fire("root.add",{element:e}),n.add(e,t),i.fire("root.added",{element:e,gfx:t})},Pn.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})},Pn.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=Mn[e],i=d(n,(function(e){return void 0!==t[e]}));if(!i)throw new Error("must supply { "+n.join(", ")+" } with "+e)},Pn.prototype._setParent=function(e,t,n){!function(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}(t.children,e,n),e.parent=t},Pn.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();const r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),r.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);const a=o.create(e,t,i);return this._elementRegistry.add(t,a),o.update(e,t,a),r.fire(e+".added",{element:t,gfx:a}),t},Pn.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},Pn.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},Pn.prototype._removeElement=function(e,t){const n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(e=n.get(e.id||e))return r.fire(t+".remove",{element:e}),i.remove(e),function(e,t){if(!e||!t)return-1;var n=e.indexOf(t);-1!==n&&e.splice(n,1)}(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},Pn.prototype.removeShape=function(e){return this._removeElement(e,"shape")},Pn.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},Pn.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},Pn.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},Pn.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},Pn.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let i,r,o,a,s,l,p;return e?(this._changeViewbox((function(){s=Math.min(n.width/e.width,n.height/e.height);const i=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);ne(t,i)})),e):(o=this._rootElement?this.getActiveLayer():null,i=o&&o.getBBox()||{},a=ne(t),r=a?a.matrix:function(e,t,n,i,r,o){var a=H().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return K(a,e);case 6:return K(a,{a:e,b:t,c:n,d:i,e:r,f:o})}}(),s=Rn(r.a,1e3),l=Rn(-r.e||0,1e3),p=Rn(-r.f||0,1e3),e=this._cachedViewbox={x:l?l/s:0,y:p?p/s:0,width:n.width/s,height:n.height/s,scale:s,inner:{width:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:n})},Pn.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox((function(){e=E({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),Nn(t,n)})),{x:n.e,y:n.f}},Pn.prototype.scrollToElement=function(e,t){let n=100;"string"==typeof e&&(e=this._elementRegistry.get(e));const i=this.findRoot(e);if(i!==this.getRootElement()&&this.setRootElement(i),i===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 r=_t(e),o=ft(r),a=this.viewbox(),s=this.zoom();let l,p;a.y+=t.top/s,a.x+=t.left/s,a.width-=(t.right+t.left)/s,a.height-=(t.bottom+t.top)/s;const c=ft(a);if(r.width<a.width&&r.height<a.height){const e=Math.max(0,o.right-c.right),t=Math.min(0,o.left-c.left),n=Math.max(0,o.bottom-c.bottom),i=Math.min(0,o.top-c.top);l=e||t,p=n||i}else l=r.x-a.x,p=r.y-a.y;this.scroll({dx:-l*s,dy:-p*s})},Pn.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if("fit-viewport"===e)return this._fitViewport(t);let n,i;return this._changeViewbox((function(){"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)})),Rn(i.a,1e3)},Pn.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,i=t.inner;let r,o;return i.x>=0&&i.y>=0&&i.x+i.width<=n.width&&i.y+i.height<=n.height&&!e?o={x:0,y:0,width:Math.max(i.width+i.x,n.width),height:Math.max(i.height+i.y,n.height)}:(r=Math.min(1,n.width/i.width,n.height/i.height),o={x:i.x+(e?i.width/2-n.width/r/2:0),y:i.y+(e?i.height/2-n.height/r/2:0),width:n.width/r,height:n.height/r}),this.viewbox(o),this.viewbox(!1).scale},Pn.prototype._setZoom=function(e,t){const n=this._svg,i=this._viewport,r=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,l,p,c;l=i.getCTM();const u=l.a;return t?(a=E(o,t),s=a.matrixTransform(l.inverse()),p=r.translate(s.x,s.y).scale(1/u*e).translate(-s.x,-s.y),c=l.multiply(p)):c=r.scale(e),Nn(this._viewport,c),c},Pn.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},Pn.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}},Pn.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Tn="data-element-id";function Dn(e){this._elements={},this._eventBus=e}function Bn(e,t,n){var i=function(e,t,n,i){var r=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,r,i)),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,r,i)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:i}),i.length&&i.forEach((function(i){e.set(i,t.inverse,n)}))}function On(e,t){if(!(this instanceof On))return new On(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Dn.$inject=["eventBus"],Dn.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),L(t,Tn,i),n&&L(n,Tn,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},Dn.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(L(i.gfx,Tn,""),i.secondaryGfx&&L(i.secondaryGfx,Tn,""),delete t[n])},Dn.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),i=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,i)},Dn.prototype.updateGraphics=function(e,t,n){var i=e.id||e,r=this._elements[i];return n?r.secondaryGfx=t:r.gfx=t,t&&L(t,Tn,i),t},Dn.prototype.get=function(e){var t;t="string"==typeof e?e:e&&L(e,Tn);var n=this._elements[t];return n&&n.element},Dn.prototype.filter=function(e){var t=[];return this.forEach((function(n,i){e(n,i)&&t.push(n)})),t},Dn.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),i=0;i<n.length;i++){var r=t[n[i]],o=r.element;if(e(o,r.gfx))return o}},Dn.prototype.getAll=function(){return this.filter((function(e){return e}))},Dn.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach((function(n){var i=t[n],r=i.element,o=i.gfx;return e(r,o)}))},Dn.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},Dn.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")},On.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?Bn(this,t,e):function(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var o=r;r=null,o&&e.unset(o,i,n),r=t,e.set(r,i,n)}}})}(this,t,e)},On.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return function(e){return!0===e.__refs_collection}(n)||Bn(this,t,e),n},On.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},On.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},On.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Ln=new On({name:"children",enumerable:!0,collection:!0},{name:"parent"}),In=new On({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Fn=new On({name:"attachers",collection:!0},{name:"host"}),jn=new On({name:"outgoing",collection:!0},{name:"source"}),Vn=new On({name:"incoming",collection:!0},{name:"target"});function Wn(){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)}}),Ln.bind(this,"parent"),In.bind(this,"labels"),jn.bind(this,"outgoing"),Vn.bind(this,"incoming")}function zn(){Wn.call(this),Ln.bind(this,"children"),Fn.bind(this,"host"),Fn.bind(this,"attachers")}function $n(){Wn.call(this),Ln.bind(this,"children")}function Gn(){zn.call(this),In.bind(this,"labelTarget")}function Hn(){Wn.call(this),jn.bind(this,"source"),Vn.bind(this,"target")}e(zn,Wn),e($n,zn),e(Gn,zn),e(Hn,Wn);var Kn={connection:Hn,shape:zn,label:Gn,root:$n};function Un(){this._uid=12}Un.prototype.createRoot=function(e){return this.create("root",e)},Un.prototype.createLabel=function(e){return this.create("label",e)},Un.prototype.createShape=function(e){return this.create("shape",e)},Un.prototype.createConnection=function(e){return this.create("connection",e)},Un.prototype.create=function(e,t){return(t=E({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=Kn[e];if(!n)throw new Error("unknown type: <"+e+">");return E(new n,t)}(e,t)};var qn="__fn",Yn=Array.prototype.slice;function Xn(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function Zn(){}function Jn(e,t){this._eventBus=e,this._elementRegistry=t}function Qn(e,t,n){var i=n||t.firstChild;e!==i&&t.insertBefore(e,i)}Xn.prototype.on=function(e,t,n,i){if(e=o(e)?e:[e],l(t)&&(i=n,n=t,t=1e3),!s(t))throw new Error("priority must be a number");var r=n;i&&((r=w(n,i))[qn]=n[qn]||n);var a=this;e.forEach((function(e){a._addListener(e,{priority:t,callback:r,next:null})}))},Xn.prototype.once=function(e,t,n,i){var r=this;if(l(t)&&(i=n,n=t,t=1e3),!s(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var t=n.apply(i,arguments);return r.off(e,o),t}o[qn]=n,this.on(e,t,o)},Xn.prototype.off=function(e,t){e=o(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},Xn.prototype.createEvent=function(e){var t=new Zn;return t.init(e),t},Xn.prototype.fire=function(e,t){var n,i,r,o;if(o=Yn.call(arguments),"object"==typeof e&&(e=(t=e).type),!e)throw new Error("no event type specified");if(i=this._listeners[e]){n=t instanceof Zn?t:this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{r=this._invokeListeners(n,o,i)}finally{e!==a&&(n.type=a)}return void 0===r&&n.defaultPrevented&&(r=!1),r}},Xn.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},Xn.prototype._destroy=function(){this._listeners={}},Xn.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},Xn.prototype._invokeListener=function(e,t,n){var i;if(n.callback.__isTomb)return i;try{i=function(e,t){return e.apply(null,t)}(n.callback,t),void 0!==i&&(e.returnValue=i,e.stopPropagation()),!1===i&&e.preventDefault()}catch(e){if(!this.handleError(e))throw console.error("unhandled error in event listener",e),e}return i},Xn.prototype._addListener=function(e,t){var n,i=this._getListeners(e);if(i){for(;i;){if(i.priority<t.priority)return t.next=i,void(n?n.next=t:this._setListeners(e,t));n=i,i=i.next}n.next=t}else this._setListeners(e,t)},Xn.prototype._getListeners=function(e){return this._listeners[e]},Xn.prototype._setListeners=function(e,t){this._listeners[e]=t},Xn.prototype._removeListener=function(e,t){var n,i,r,o=this._getListeners(e);if(t)for(;o;)n=o.next,(r=o.callback)!==t&&r[qn]!==t||(i?i.next=n:this._setListeners(e,n)),i=o,o=n;else this._setListeners(e,null)},Zn.prototype.stopPropagation=function(){this.cancelBubble=!0},Zn.prototype.preventDefault=function(){this.defaultPrevented=!0},Zn.prototype.init=function(e){E(this,e||{})},Jn.$inject=["eventBus","elementRegistry"],Jn.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=function(e){return e.parentNode.childNodes[1]}(n),t||(F(t=$("g")).add("djs-children"),D(n.parentNode,t))):t=n,t},Jn.prototype._clear=function(e){var t=function(e){return e.childNodes[0]}(e);return Pe(t),t},Jn.prototype._createContainer=function(e,t,n,i){var r=$("g");F(r).add("djs-group"),void 0!==n?Qn(r,t,t.childNodes[n]):D(t,r);var o=$("g");F(o).add("djs-element"),F(o).add("djs-"+e),i&&F(o).add("djs-frame"),D(r,o);var a=$("g");return F(a).add("djs-visual"),D(o,a),o},Jn.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,kt(t))},Jn.prototype.updateContainments=function(e){var t,n=this,i=this._elementRegistry;t=m(e,(function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e}),{}),f(t,(function(e){var t=e.children;if(t){var r=n._getChildrenContainer(e);f(t.slice().reverse(),(function(e){Qn(i.getGraphics(e).parentNode,r)}))}}))},Jn.prototype.drawShape=function(e,t,n={}){return this._eventBus.fire("render.shape",{gfx:e,element:t,attrs:n})},Jn.prototype.getShapePath=function(e){return this._eventBus.fire("render.getShapePath",e)},Jn.prototype.drawConnection=function(e,t,n={}){return this._eventBus.fire("render.connection",{gfx:e,element:t,attrs:n})},Jn.prototype.getConnectionPath=function(e){return this._eventBus.fire("render.getConnectionPath",e)},Jn.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if("shape"===e)this.drawShape(i,t),qe(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(i,t)}t.hidden?L(n,"display","none"):L(n,"display","block")}},Jn.prototype.remove=function(e){ee(this._elementRegistry.getGraphics(e).parentNode)};var ei={__depends__:[kn],__init__:["canvas"],canvas:["type",Pn],elementRegistry:["type",Dn],elementFactory:["type",Un],eventBus:["type",Xn],graphicsFactory:["type",Jn]};function ti(e){return function(e){var t=new En(e);return t.init(),t}([{config:["value",e=e||{}]},ei].concat(e.modules||[]))}function ni(e,t){this._injector=t||ti(e),this.get("eventBus").fire("diagram.init")}function ii(){}function ri(e,t){this.model=e,this.properties=t}ni.prototype.get=function(e,t){return this._injector.get(e,t)},ni.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},ni.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},ni.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")},ii.prototype.get=function(e){return this.$model.properties.get(this,e)},ii.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},ri.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(ii.prototype);f(e.properties,(function(e){e.isMany||void 0===e.default||(i[e.name]=e.default)})),n.defineModel(i,t),n.defineDescriptor(i,e);var r=e.ns.name;function o(e){n.define(this,"$type",{value:r,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),f(e,w((function(e,t){this.set(t,e)}),this))}return o.prototype=i,o.hasType=i.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var oi={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},ai={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 si(e,t){var n=ai[e];return n?n(t):t}function li(e){return!!oi[e]}function pi(e){return!!ai[e]}function ci(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function ui(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function hi(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,f(e,w(this.registerPackage,this))}function fi(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function mi(e){this.model=e}function di(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function yi(e){return e.replace(/^:/,"")}function gi(e,t={}){this.properties=new mi(this),this.factory=new ri(this,this.properties),this.registry=new hi(e,this.properties),this.typeCache={},this.config=t}ui.prototype.build=function(){return function(e,t){let n={},i=Object(e);return f(t,(function(t){t in i&&(n[t]=e[t])})),n}(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},ui.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},ui.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,o=this.propertiesByName,a=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=r.indexOf(e);if(-1===s)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,a),o[i.name]=o[i.localName]=t},ui.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=ci(r[0],i),a=ci(r[1],o.prefix).name,s=this.propertiesByName[a];if(!s)throw new Error("refined property <"+a+"> not found");this.replaceProperty(s,e,n),delete e.redefines},ui.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},ui.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},ui.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},ui.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},ui.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},ui.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},ui.prototype.hasProperty=function(e){return this.propertiesByName[e]},ui.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(f(e.properties,w((function(n){n=E({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var i=n.replaces,r=n.redefines;i||r?this.redefineProperty(n,i||r,i):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))}),this)),i.push(e),n[r]=e)},hi.prototype.getPackage=function(e){return this.packageMap[e]},hi.prototype.getPackages=function(){return this.packages},hi.prototype.registerPackage=function(e){e=E({},e);var t=this.packageMap;fi(t,e,"prefix"),fi(t,e,"uri"),f(e.types,w((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},hi.prototype.registerType=function(e,t){var n=ci((e=E({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:E(e.meta||{})})).name,t.prefix),i=n.name,r={};f(e.properties,w((function(e){var t=ci(e.name,n.prefix),i=t.name;li(e.type)||(e.type=ci(e.type,t.prefix).name),E(e,{ns:t,name:i}),r[i]=e}),this)),E(e,{ns:n,name:i,propertiesByName:r}),f(e.extends,w((function(e){var t=ci(e,n.prefix),r=this.typeMap[t.name];r.traits=r.traits||[],r.traits.push(i)}),this)),this.definePackage(e,t),this.typeMap[i]=e},hi.prototype.mapTypes=function(e,t,n){var i=li(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(n,i){var o=ci(n,li(n)?"":e.prefix);r.mapTypes(o,t,i)}function a(e){return o(e,!0)}if(!i)throw new Error("unknown type <"+e.name+">");f(i.superClass,n?a:function(e){return o(e,!1)}),t(i,!n),f(i.traits,a)},hi.prototype.getEffectiveDescriptor=function(e){var t=ci(e),n=new ui(t);this.mapTypes(t,(function(e,t){n.addTrait(e,t)}));var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},hi.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},mi.prototype.set=function(e,t,n){if(!p(t)||!t.length)throw new TypeError("property name must be a non-empty string");var i=this.getProperty(e,t),r=i&&i.name;void 0===n?i?delete e[r]:delete e.$attrs[yi(t)]:i?r in e?e[r]=n:di(e,i,n):e.$attrs[yi(t)]=n},mi.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[yi(t)];var i=n.name;return!e[i]&&n.isMany&&di(e,n,[]),e[i]},mi.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;delete(n=E({},n,{get:function(){return i}})).value}Object.defineProperty(e,t,n)},mi.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},mi.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},mi.prototype.getProperty=function(e,t){var n=this.model,i=n.getPropertyDescriptor(e,t);if(i)return i;if(t.includes(":"))return null;const r=n.config.strict;if(void 0!==r){const n=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(r)throw n;"undefined"!=typeof console&&console.warn(n)}return null},gi.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},gi.prototype.getType=function(e){var t=this.typeCache,n=p(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},gi.prototype.createAny=function(e,t,n){var o=ci(e),s={$type:e,$instanceOf:function(e){return e===this.$type},get:function(e){return this[e]},set:function(e,t){!function(e,t,n){let o=e;f(t,(function(e,a){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 s=t[a+1],l=o[e];r(s)&&null==l&&(l=o[e]=isNaN(+s)?{}:[]),i(s)?i(n)?delete o[e]:o[e]=n:o=l}))}(this,[e],t)}},l={name:e,isGeneric:!0,ns:{prefix:o.prefix,localName:o.localName,uri:t}};return this.properties.defineDescriptor(s,l),this.properties.defineModel(s,this),this.properties.define(s,"get",{enumerable:!1,writable:!0}),this.properties.define(s,"set",{enumerable:!1,writable:!0}),this.properties.define(s,"$parent",{enumerable:!1,writable:!0}),this.properties.define(s,"$instanceOf",{enumerable:!1,writable:!0}),f(n,(function(e,t){a(e)&&void 0!==e.value?s[e.name]=e.value:s[t]=e})),s},gi.prototype.getPackage=function(e){return this.registry.getPackage(e)},gi.prototype.getPackages=function(){return this.registry.getPackages()},gi.prototype.getElementDescriptor=function(e){return e.$descriptor},gi.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},gi.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},gi.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var vi=String.fromCharCode,xi=Object.prototype.hasOwnProperty,bi=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,wi={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function Ei(e,t,n,i){return i?xi.call(wi,i)?wi[i]:"&"+i+";":vi(t||parseInt(n,16))}function _i(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(bi,Ei):e}Object.keys(wi).forEach((function(e){wi[e.toUpperCase()]=wi[e]}));var Ai="non-whitespace outside of root node";function ki(e){return new Error(e)}function Ri(e){return"missing namespace for prefix <"+e+">"}function Si(e){return{get:e,enumerable:!0}}function Ci(e){var t,n={};for(t in e)n[t]=e[t];return n}function Mi(e){return e+"$uri"}function Pi(){return{line:0,column:0}}function Ni(e){throw e}function Ti(e){if(!this)return new Ti(e);var t,n,i,r,o,a,s,l,p,c=e&&e.proxy,u=Ni,h=Pi,f=!1,m=!1,d=null,y=!1;function g(e){e instanceof Error||(e=ki(e)),d=e,u(e,h)}function v(e){o&&(e instanceof Error||(e=ki(e)),o(e,h))}this.on=function(e,p){if("function"!=typeof p)throw ki("required args <name, cb>");switch(e){case"openTag":n=p;break;case"text":t=p;break;case"closeTag":i=p;break;case"error":u=p;break;case"warn":o=p;break;case"cdata":r=p;break;case"attention":l=p;break;case"question":s=p;break;case"comment":a=p;break;default:throw ki("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw ki("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return m=!0,p=n,this},this.parse=function(e){if("string"!=typeof e)throw ki("required args <xml=string>");return d=null,function(e){var o,u,d,x,b,w,E,_,A,k,R,S=m?[]:null,C=m?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[Mi(n)]=t;return i}(p):null,M=[],P=0,N=!1,T=!1,D=0,B=0,O="",L=0;function I(){if(null!==R)return R;var e,t,n,i,r,o,a,s,l,c,u,h=m&&C.xmlns,d=m&&f?[]:null,y=L,g=O,x=g.length,b={},w={};e:for(;y<x;y++)if(l=!1,!(32===(c=g.charCodeAt(y))||c<14&&c>8)){for((c<65||c>122||c>90&&c<97)&&95!==c&&58!==c&&(v("illegal first char attribute name"),l=!0),u=y+1;u<x;u++)if(!((c=g.charCodeAt(u))>96&&c<123||c>64&&c<91||c>47&&c<59||46===c||45===c||95===c)){if(32===c||c<14&&c>8){v("missing attribute value"),y=u;continue e}if(61===c)break;v("illegal attribute name char"),l=!0}if("xmlns:xmlns"===(s=g.substring(y,u))&&(v("illegal declaration of xmlns"),l=!0),34===(c=g.charCodeAt(u+1)))-1===(u=g.indexOf('"',y=u+2))&&-1!==(u=g.indexOf("'",y))&&(v("attribute value quote missmatch"),l=!0);else if(39===c)-1===(u=g.indexOf("'",y=u+2))&&-1!==(u=g.indexOf('"',y))&&(v("attribute value quote missmatch"),l=!0);else for(v("missing attribute value quotes"),l=!0,u+=1;u<x&&!(32===(c=g.charCodeAt(u+1))||c<14&&c>8);u++);for(-1===u&&(v("missing closing quotes"),u=x,l=!0),l||(o=g.substring(y,u)),y=u;u+1<x&&!(32===(c=g.charCodeAt(u+1))||c<14&&c>8);u++)y===u&&(v("illegal character after attribute end"),l=!0);if(y=u+1,!l)if(s in w)v("attribute <"+s+"> already defined");else if(w[s]=!0,m)if(f){if(null!==(r="xmlns"===s?"xmlns":120===s.charCodeAt(0)&&"xmlns:"===s.substr(0,6)?s.substr(6):null)){if(e=_i(o),t=Mi(r),!(a=p[e])){if("xmlns"===r||t in C&&C[t]!==e)do{a="ns"+P++}while(void 0!==C[a]);else a=r;p[e]=a}C[r]!==a&&(i||(C=Ci(C),i=!0),C[r]=a,"xmlns"===r&&(C[Mi(a)]=e,h=a),C[t]=e),b[s]=o;continue}d.push(s,o)}else-1!==(c=s.indexOf(":"))?(n=C[s.substring(0,c)])?b[s=h===n?s.substr(c+1):n+s.substr(c)]=o:v(Ri(s.substring(0,c))):b[s]=o;else b[s]=o}if(f)for(y=0,x=d.length;y<x;y++){if(s=d[y++],o=d[y],-1!==(c=s.indexOf(":"))){if(!(n=C[s.substring(0,c)])){v(Ri(s.substring(0,c)));continue}s=h===n?s.substr(c+1):n+s.substr(c)}b[s]=o}return R=b}function F(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,o=0,a=0,s=B;D>=a&&(t=i.exec(e))&&!((s=t[0].length+t.index)>D);)r+=1,a=s;return-1==D?(o=s,n=e.substring(B)):0===B?n=e.substring(B,D):(o=D-a,n=-1==B?e.substring(D):e.substring(D,B+1)),{data:n,line:r,column:o}}h=F,c&&(k=Object.create({},{name:Si((function(){return _})),originalName:Si((function(){return A})),attrs:Si(I),ns:Si((function(){return C}))}));for(;-1!==B;){if(-1===(D=60===e.charCodeAt(B)?B:e.indexOf("<",B)))return M.length?g("unexpected end of file"):0===B?g("missing start tag"):void(B<e.length&&e.substring(B).trim()&&v(Ai));if(B!==D)if(M.length){if(t&&(t(e.substring(B,D),_i,h),y))return}else if(e.substring(B,D).trim()&&(v(Ai),y))return;if(33===(b=e.charCodeAt(D+1))){if(91===(x=e.charCodeAt(D+2))&&"CDATA["===e.substr(D+3,6)){if(-1===(B=e.indexOf("]]>",D)))return g("unclosed cdata");if(r&&(r(e.substring(D+9,B),h),y))return;B+=3;continue}if(45===x&&45===e.charCodeAt(D+3)){if(-1===(B=e.indexOf("--\x3e",D)))return g("unclosed comment");if(a&&(a(e.substring(D+4,B),_i,h),y))return;B+=3;continue}}if(63!==b){for(u=D+1;;u++){if(w=e.charCodeAt(u),isNaN(w))return B=-1,g("unclosed tag");if(34===w)u=-1!==(x=e.indexOf('"',u+1))?x:u;else if(39===w)u=-1!==(x=e.indexOf("'",u+1))?x:u;else if(62===w){B=u;break}}if(33!==b){if(R={},47===b){if(N=!1,T=!0,!M.length)return g("missing open tag");if(u=_=M.pop(),x=D+2+u.length,e.substring(D+2,x)!==u)return g("closing tag mismatch");for(;x<B;x++)if(!(32===(b=e.charCodeAt(x))||b>8&&b<14))return g("close tag")}else{if(47===e.charCodeAt(B-1)?(u=_=e.substring(D+1,B-1),N=!0,T=!0):(u=_=e.substring(D+1,B),N=!0,T=!1),!(b>96&&b<123||b>64&&b<91||95===b||58===b))return g("illegal first char nodeName");for(x=1,d=u.length;x<d;x++)if(!((b=u.charCodeAt(x))>96&&b<123||b>64&&b<91||b>47&&b<59||45===b||95===b||46==b)){if(32===b||b<14&&b>8){_=u.substring(0,x),R=null;break}return g("invalid nodeName")}T||M.push(_)}if(m){if(o=C,N&&(T||S.push(o),null===R&&(f=-1!==u.indexOf("xmlns",x))&&(L=x,O=u,I(),f=!1)),A=_,-1!==(b=_.indexOf(":"))){if(!(E=C[_.substring(0,b)]))return g("missing namespace on <"+A+">");_=_.substr(b+1)}else E=C.xmlns;E&&(_=E+":"+_)}if(N&&(L=x,O=u,n&&(c?n(k,_i,T,h):n(_,I,_i,T,h),y)))return;if(T){if(i&&(i(c?k:_,_i,N,h),y))return;m&&(C=N?o:S.pop())}B+=1}else{if(l&&(l(e.substring(D,B+1),_i,h),y))return;B+=1}}else{if(-1===(B=e.indexOf("?>",D)))return g("unclosed question");if(s&&(s(e.substring(D,B+2),h),y))return;B+=2}}}(e),h=Pi,y=!1,d},this.stop=function(){y=!0}}function Di(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var Bi={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},Oi="property";function Li(e){return e.xml&&e.xml.serialize}function Ii(e,t){return Di(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function Fi(e){return new Error(e)}function ji(e){return e.$descriptor}function Vi(e){E(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw Fi("expected element");var t,n=this.elementsById,i=ji(e).idProperty;if(i&&(t=e.get(i.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw Fi("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function Wi(){}function zi(){}function $i(){}function Gi(e,t){this.property=e,this.context=t}function Hi(e,t){this.element=t,this.propertyDesc=e}function Ki(){}function Ui(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function qi(e,t,n){Ui.call(this,e,t,n)}function Yi(e,t,n){this.model=e,this.context=n}function Xi(e){e instanceof gi&&(e={model:e}),E(this,{lax:!1},e)}Wi.prototype.handleEnd=function(){},Wi.prototype.handleText=function(){},Wi.prototype.handleNode=function(){},zi.prototype=Object.create(Wi.prototype),zi.prototype.handleNode=function(){return this},$i.prototype=Object.create(Wi.prototype),$i.prototype.handleText=function(e){this.body=(this.body||"")+e},Gi.prototype=Object.create($i.prototype),Gi.prototype.handleNode=function(e){if(this.element)throw Fi("expected no sub nodes");return this.element=this.createReference(e),this},Gi.prototype.handleEnd=function(){this.element.id=this.body},Gi.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},Hi.prototype=Object.create($i.prototype),Hi.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=si(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},Ki.prototype=Object.create($i.prototype),Ki.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},Ui.prototype=Object.create(Ki.prototype),Ui.prototype.addReference=function(e){this.context.addReference(e)},Ui.prototype.handleText=function(e){if(!ji(this.element).bodyProperty)throw Fi("unexpected body text <"+e+">");$i.prototype.handleText.call(this,e)},Ui.prototype.handleEnd=function(){var e=this.body,t=this.element,n=ji(t).bodyProperty;n&&void 0!==e&&(e=si(n.type,e),t.set(n.name,e))},Ui.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=ji(i),o=this.context,a=new i({}),s=this.model;return f(n,(function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?f(e.split(" "),(function(e){o.addReference({element:a,property:i.ns.name,id:e})})):o.addReference({element:a,property:i.ns.name,id:e}):(i?e=si(i.type,e):"xmlns"===n?n=":"+n:(t=ci(n,r.ns.prefix),s.getPackage(t.prefix)&&o.addWarning({message:"unknown attribute <"+n+">",element:a,property:n,value:e})),a.set(n,e))})),a},Ui.prototype.getPropertyForNode=function(e){var t=ci(e.name),n=this.type,i=this.model,r=ji(n),o=t.name,a=r.propertiesByName[o];if(a&&!a.isAttr){const t=function(e){const t=Li(e);return t!==Oi&&(t||null)}(a);if(t){const n=e.attributes[t];if(n){const t=function(e,t,n){const i=ci(e,t.xmlns),r=ci(`${t[i.prefix]||i.prefix}:${i.localName}`);return function(e,t){var n=e.name,i=e.localName,r=t&&t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(r,n.getPackage(r.prefix))}(n,e.ns,i);return E({},a,{effectiveType:ji(i.getType(t)).name})}}return a}var s=i.getPackage(t.prefix);if(s){const e=Ii(t,s),n=i.getType(e);if(a=u(r.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})))return E({},a,{effectiveType:ji(n).name})}else if(a=u(r.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})))return a;throw Fi("unrecognized element <"+t.name+">")},Ui.prototype.toString=function(){return"ElementDescriptor["+ji(this.type).name+"]"},Ui.prototype.valueHandler=function(e,t){return new Hi(e,t)},Ui.prototype.referenceHandler=function(e){return new Gi(e,this.context)},Ui.prototype.handler=function(e){return"Element"===e?new Yi(this.model,e,this.context):new Ui(this.model,e,this.context)},Ui.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,pi(n=t.effectiveType||t.type))return this.valueHandler(t,i);var o=(r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==o&&(t.isMany?i.get(t.name).push(o):i.set(t.name,o),t.isReference?(E(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},qi.prototype=Object.create(Ui.prototype),qi.prototype.createElement=function(e){var t=e.name,n=ci(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),a=o&&Ii(n,o)||t;if(!r.hasType(a))throw Fi("unexpected element <"+e.originalName+">");return Ui.prototype.createElement.call(this,e)},Yi.prototype=Object.create(Ki.prototype),Yi.prototype.createElement=function(e){var t=e.name,n=ci(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},Yi.prototype.handleChild=function(e){var t=new Yi(this.model,"Element",this.context).handleNode(e),n=this.element,i=t.element;return void 0!==i&&((n.$children=n.$children||[]).push(i),i.$parent=n),t},Yi.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},Xi.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof Ui?(i=t,t={}):"string"==typeof t?(i=this.handler(t),t={}):"string"==typeof i&&(i=this.handler(i));var r=this.model,o=this.lax,a=new Vi(E({},t,{rootHandler:i})),s=new Ti({proxy:!0}),l=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function p(e,t,n){var i=t(),r=i.line,o=i.column,s=i.data;"<"===s.charAt(0)&&-1!==s.indexOf(" ")&&(s=s.slice(0,s.indexOf(" "))+">");var l="unparsable content "+(s?s+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return a.addWarning({message:l,error:e}),!0;throw Fi(l)}function c(e,t){return p(e,t,!0)}i.context=a,l.push(i);var u=/^<\?xml /i,h=/ encoding="([^"]+)"/i,f=/^utf-8$/i;function m(e,t){try{l.peek().handleText(e)}catch(e){c(e,t)}}var d=r.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),Object.entries(Bi).reduce((function(e,[t,n]){return e[n]=t,e}),r.config&&r.config.nsMap||{}));return s.ns(d).on("openTag",(function(e,t,n,i){var r=e.attrs||{},a=Object.keys(r).reduce((function(e,n){var i=t(r[n]);return e[n]=i,e}),{});!function(e,t){var n=l.peek();try{l.push(n.handleNode(e))}catch(e){p(e,t,o)&&l.push(new zi)}}({name:e.name,originalName:e.originalName,attributes:a,ns:e.ns},i)})).on("question",(function(e){if(u.test(e)){var t=h.exec(e),n=t&&t[1];n&&!f.test(n)&&a.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}})).on("closeTag",(function(){l.pop().handleEnd()})).on("cdata",m).on("text",(function(e,t,n){!function(e,t){e.trim()&&m(e,t)}(t(e),n)})).on("error",p).on("warn",c),new Promise((function(t,n){var r;try{s.parse(e),function(){var e,t,n=a.elementsById,i=a.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],s=ji(r).propertiesByName[t.property];if(o||a.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),s.isMany){var l=r.get(s.name),p=l.indexOf(t);-1===p&&(p=l.length),o?l[p]=o:l.splice(p,1)}else r.set(s.name,o)}}()}catch(e){r=e}var o=i.element;r||o||(r=Fi("failed to parse document as <"+i.type.$descriptor.name+">"));var l=a.warnings,p=a.references,c=a.elementsById;return r?(r.warnings=l,n(r)):t({rootElement:o,elementsById:c,references:p,warnings:l})}))},Xi.prototype.handler=function(e){return new qi(this.model,e)};var Zi=/<|>|'|"|&|\n\r|\n/g,Ji=/<|>|&/g;function Qi(e){this.prefixMap={},this.uriMap={},this.used={},this.wellknown=[],this.custom=[],this.parent=e,this.defaultPrefixMap=e&&e.defaultPrefixMap||{}}function er(e,t){return Di(t)?(n=e).charAt(0).toLowerCase()+n.slice(1):e;var n}function tr(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function nr(e){return p(e)?e:(e.prefix?e.prefix+":":"")+e.localName}Qi.prototype.mapDefaultPrefixes=function(e){this.defaultPrefixMap=e},Qi.prototype.defaultUriByPrefix=function(e){return this.defaultPrefixMap[e]},Qi.prototype.byUri=function(e){return this.uriMap[e]||this.parent&&this.parent.byUri(e)},Qi.prototype.add=function(e,t){this.uriMap[e.uri]=e,t?this.wellknown.push(e):this.custom.push(e),this.mapPrefix(e.prefix,e.uri)},Qi.prototype.uriByPrefix=function(e){return this.prefixMap[e||"xmlns"]||this.parent&&this.parent.uriByPrefix(e)},Qi.prototype.mapPrefix=function(e,t){this.prefixMap[e||"xmlns"]=t},Qi.prototype.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},Qi.prototype.logUsed=function(e){var t=e.uri,n=this.getNSKey(e);this.used[n]=this.byUri(t),this.parent&&this.parent.logUsed(e)},Qi.prototype.getUsed=function(e){return[].concat(this.wellknown,this.custom).filter((e=>{var t=this.getNSKey(e);return this.used[t]}))};var ir={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},rr={"<":"lt",">":"gt","&":"amp"};function or(e,t,n){return(e=p(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function ar(e){this.tagName=e}function sr(){}function lr(e){this.tagName=e}function pr(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function cr(e,t,n){pr.call(this,e,t),this.serialization=n}function ur(){this.value="",this.write=function(e){this.value+=e}}function hr(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 fr(e){return e=E({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new ur,r=new hr(i,e.format);e.preamble&&r.append('<?xml version="1.0" encoding="UTF-8"?>\n');var o=new pr,a=t.$model;if(o.getNamespaces().mapDefaultPrefixes(function(e){const t=e.config&&e.config.nsMap||{},n={};for(const e in Bi)n[e]=Bi[e];for(const e in t){n[t[e]]=e}for(const t of e.getPackages())n[t.prefix]=t.uri;return n}(a)),o.build(t).serializeTo(r),!n)return i.value}}}function mr(e,t){gi.call(this,e,t)}ar.prototype.build=function(e){return this.element=e,this},ar.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},sr.prototype.serializeValue=sr.prototype.serializeTo=function(e){e.append(this.escape?or(this.value,Ji,rr):this.value)},sr.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(Ji)&&(this.escape=!0),this},tr(lr,sr),lr.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},pr.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,o=i.isGeneric;return t=o?this.parseGenericNsAttributes(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),o?this.parseGenericContainments(e):(n=function(e){return h(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!c(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)}))}(e),this.parseAttributes(h(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return h(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},pr.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?E({localName:t.ns.localName},e):E({localName:er(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},pr.prototype.nsPropertyTagName=function(e){return function(e,t){return E({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},pr.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},pr.prototype.nsAttributeName=function(e){var t;if(t=p(e)?ci(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}:E({localName:t.localName},n)},pr.prototype.parseGenericNsAttributes=function(e){return Object.entries(e).filter((([t,n])=>!t.startsWith("$")&&this.parseNsAttribute(e,t,n))).map((([e,t])=>({name:e,value:t})))},pr.prototype.parseGenericContainments=function(e){var t=e.$body;t&&this.body.push((new sr).build({type:"String"},t));var n=e.$children;n&&f(n,(e=>{this.body.push(new pr(this).build(e))}))},pr.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=ci(t);if("xmlns"===o.prefix&&(i={prefix:o.localName,uri:n}),o.prefix||"xmlns"!==o.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var a=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(a)}},pr.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,i=[];return f(n,(function(n,r){var o=t.parseNsAttribute(e,r,n);o&&i.push(o)})),i},pr.prototype.parseGenericAttributes=function(e,t){var n=this;f(t,(function(t){try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){"undefined"!=typeof console&&console.warn(`missing namespace information for <${t.name}=${t.value}> on`,e,n)}}))},pr.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;f(e,(function(e){var r=i.get(e.name),o=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new sr).build(e,r[0]));else if(pi(e.type))f(r,(function(i){n.push(new lr(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(o)f(r,(function(i){n.push(new ar(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var a=Li(e);f(r,(function(i){var r;r=a?a===Oi?new pr(t,e):new cr(t,e,a):new pr(t),n.push(r.build(i))}))}}))},pr.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new Qi(t):n=t),n},pr.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,o=e.prefix;return i.byUri(r)&&!n||i.add(e,t),i.mapPrefix(o,r),e},pr.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.getNamespaces(t),a=e.prefix,s=e.uri;if(!a&&!s)return{localName:e.localName};if(r=o.defaultUriByPrefix(a),!(s=s||r||o.uriByPrefix(a)))throw new Error("no namespace uri given for prefix <"+a+">");if((e=o.byUri(s))||a||(e=this.logNamespace({uri:s},r===s,!0)),!e){for(n=a,i=1;o.uriByPrefix(n);)n=a+"_"+i++;e=this.logNamespace({prefix:n,uri:s},r===s)}return a&&o.mapPrefix(a,s),e},pr.prototype.parseAttributes=function(e){var t=this,n=this.element;f(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];f(i,(function(e){r.push(e.id)})),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},pr.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),nr(e)},pr.prototype.addAttribute=function(e,t){var n=this.attrs;p(t)&&(t=or(t,Zi,ir));var i=function(e,t){const n=v(t);let i=o(e)?-1:void 0;return f(e,(function(e,t){if(n(e,t))return i=t,!1})),i}(n,(function(t){return t.name.localName===e.localName&&t.name.uri===e.uri&&t.name.prefix===e.prefix})),r={name:e,value:t};-1!==i?n.splice(i,1,r):n.push(r)},pr.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)),f(t,(function(t){e.append(" ").append(nr(t.name)).append('="').append(t.value).append('"')}))},pr.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==sr;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),f(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},tr(cr,pr),cr.prototype.parseNsAttributes=function(e){var t=pr.prototype.parseNsAttributes.call(this,e).filter((e=>e.name!==this.serialization)),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),o=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(this.serialization),(i.prefix?i.prefix+":":"")+o+n.ns.localName),t},cr.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},mr.prototype=Object.create(gi.prototype),mr.prototype.fromXML=function(e,t,n){p(t)||(n=t,t="bpmn:Definitions");var i=new Xi(E({model:this,lax:!0},n)),r=i.handler(t);return i.fromXML(e,r)},mr.prototype.toXML=function(e,t){var n=new fr(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(e){return i(e)}}))};const dr={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 yr(e,t){return new mr(E({},dr,e),t)}function gr(e,t){return e.$instanceOf(t)}function vr(e){var t={},n=[],i={};function r(e,t){return function(n){e(n,t)}}function o(e){t[e.id]=e}function a(t,n){try{var r=i[t.id]&&function(t,n){if(t.gfx)throw new Error(`already rendered ${gt(t)}`);return e.element(t,i[t.id],n)}(t,n);return o(t),r}catch(e){s(e.message,{element:t,error:e}),console.error(`failed to import ${gt(t)}`,e)}}function s(t,n){e.error(t,n)}var l=this.registerDi=function(e){var t,n=e.bpmnElement;n?i[n.id]?s(`multiple DI elements defined for ${gt(n)}`,{element:n}):(i[n.id]=e,c(t=n,"di")||Object.defineProperty(t,"di",{enumerable:!1,get:function(){throw new Error("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")}})):s(`no bpmnElement referenced in ${gt(e)}`,{element:e})};function p(e){var t;t=e.plane,l(t),f(t.planeElement,m)}function m(e){l(e)}this.handleDefinitions=function(o,a){var c=o.diagrams;if(a&&-1===c.indexOf(a))throw new Error("diagram not part of <bpmn:Definitions />");if(!a&&c&&c.length&&(a=c[0]),!a)throw new Error("no diagram to display");i={},p(a);var m=a.plane;if(!m)throw new Error(`no plane for ${gt(a)}`);var v=m.bpmnElement;if(!v){if(v=function(e){return u(e.rootElements,(function(e){return gr(e,"bpmn:Process")||gr(e,"bpmn:Collaboration")}))}(o),!v)throw new Error("no process or collaboration to display");s(`correcting missing bpmnElement on ${gt(m)} to ${gt(v)}`),m.bpmnElement=v,l(m)}var x,b,w=function(t,n){return e.root(t,i[t.id],n)}(v,m);if(gr(v,"bpmn:Process")||gr(v,"bpmn:SubProcess"))y(v,w);else{if(!gr(v,"bpmn:Collaboration"))throw new Error(`unsupported bpmnElement for ${gt(m)}: ${gt(v)}`);b=w,f((x=v).participants,r(P,b)),E(x.artifacts,b),n.push((function(){!function(e,t){f(e,r(g,t))}(x.messageFlows,b)})),function(e,n){var i=h(e,(function(e){return!t[e.id]&&gr(e,"bpmn:Process")&&e.laneSets}));i.forEach(r(y,n))}(o.rootElements,w)}d(n)};var d=this.handleDeferred=function(){for(;n.length;)n.shift()()};function y(e,t){M(e,t),_(e.ioSpecification,t),E(e.artifacts,t),o(e)}function g(e,t){a(e,t)}function v(e,t){a(e,t)}function x(e,t){a(e,t)}function b(e,t){a(e,t)}function w(e,t){a(e,t)}function E(e,t){f(e,(function(e){gr(e,"bpmn:Association")?n.push((function(){w(e,t)})):w(e,t)}))}function _(e,t){e&&(f(e.dataInputs,r(x,t)),f(e.dataOutputs,r(b,t)))}var A=this.handleSubProcess=function(e,t){M(e,t),E(e.artifacts,t)};function k(e,t){var i=a(e,t);gr(e,"bpmn:SubProcess")&&A(e,i||t),gr(e,"bpmn:Activity")&&_(e.ioSpecification,t),n.push((function(){f(e.dataInputAssociations,r(v,t)),f(e.dataOutputAssociations,r(v,t))}))}function R(e,t){a(e,t)}function S(e,t){n.push((function(){var n=a(e,t);e.childLaneSet&&C(e.childLaneSet,n||t),function(e){f(e.flowNodeRef,(function(t){var n=t.get("lanes");n&&n.push(e)}))}(e)}))}function C(e,t){f(e.lanes,r(S,t))}function M(e,t){!function(e,t){f(e,(function(e){gr(e,"bpmn:SequenceFlow")?n.push((function(){!function(e,t){a(e,t)}(e,t)})):gr(e,"bpmn:BoundaryEvent")?n.unshift((function(){k(e,t)})):gr(e,"bpmn:FlowNode")?k(e,t):gr(e,"bpmn:DataObject")||(gr(e,"bpmn:DataStoreReference")||gr(e,"bpmn:DataObjectReference")?R(e,t):s(`unrecognized flowElement ${gt(e)} in context ${gt(t&&t.businessObject)}`,{element:e,context:t}))}))}(e.flowElements,t),e.laneSets&&function(e,t){f(e,r(C,t))}(e.laneSets,t)}function P(e,t){var n=a(e,t),i=e.processRef;i&&y(i,n||t)}}function xr(e,t,n){var i,r,o,a=[];function s(e,t){var n=new vr({root:function(e,t){return i.add(e,t)},element:function(e,t,n){return i.add(e,t,n)},error:function(e,t){a.push({message:e,context:t})}});t=t||e.diagrams&&e.diagrams[0];var r=function(e,t){if(!t||!t.plane)return;var n,i=t.plane.bpmnElement,r=i;A(i,"bpmn:Process")||A(i,"bpmn:Collaboration")||(r=function(e){var t=e;for(;t;){if(A(t,"bpmn:Process"))return t;t=t.$parent}} method in gr
H A Dbpmn-modeler.production.min.js7 */var Pt=/,?([a-z]),?/gi,At=parseFloat,Mt=Math,Tt=Mt.PI,Dt=Mt.min,Bt=Mt.max,Nt=Mt.pow,jt=Mt.abs,Ot=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/gi,Lt=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/gi,$t=Array.isArray||function(e){return e instanceof Array};function It(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ft(e){if("function"==typeof e||Object(e)!==e)return e;var t=new e.constructor;for(var n in e)It(e,n)&&(t[n]=Ft(e[n]));return t}function zt(e){var t=zt.ps=zt.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout((function(){for(var n in t)It(t,n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])})),t[e]}function Ht(e,t,n,i){return 1===arguments.length&&(t=e.y,n=e.width,i=e.height,e=e.x),{x:e,y:t,width:n,height:i,x2:e+n,y2:t+i}}function Vt(){return this.join(",").replace(Pt,"$1")}function Gt(e){var t=Ft(e);return t.toString=Vt,t}function Wt(e,t,n,i,r,o,a,s,c){var p=1-c,l=Nt(p,3),u=Nt(p,2),h=c*c*c,d=l*t+3*u*c*i+3*p*c*c*o+h*s;return{x:Zt(l*e+3*u*c*n+3*p*c*c*r+h*a),y:Zt(d)}}function Ut(e){var t=function(e,t,n,i,r,o,a,s){for(var c,p,l,u,h,d,f,m,v=[],y=[[],[]],g=0;g<2;++g)if(0==g?(p=6*e-12*n+6*r,c=-3*e+9*n-9*r+3*a,l=3*n-3*e):(p=6*t-12*i+6*o,c=-3*t+9*i-9*o+3*s,l=3*i-3*t),jt(c)<1e-12){if(jt(p)<1e-12)continue;0<(u=-l/p)&&u<1&&v.push(u)}else f=p*p-4*l*c,m=Mt.sqrt(f),f<0||(0<(h=(-p+m)/(2*c))&&h<1&&v.push(h),0<(d=(-p-m)/(2*c))&&d<1&&v.push(d));var b,_=v.length,x=_;for(;_--;)b=1-(u=v[_]),y[0][_]=b*b*b*e+3*b*b*u*n+3*b*u*u*r+u*u*u*a,y[1][_]=b*b*b*t+3*b*b*u*i+3*b*u*u*o+u*u*u*s;return y[0][x]=e,y[1][x]=t,y[0][x+1]=a,y[1][x+1]=s,y[0].length=y[1].length=x+2,{x0:Dt(...y[0]),y0:Dt(...y[1]),x1:Bt(...y[0]),y1:Bt(...y[1])}}(...e);return Ht(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function qt(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function Kt(e,t,n,i,r){return e*(e*(-3*t+9*n-9*i+3*r)+6*t-12*n+6*i)-3*t+3*n}function Yt(e,t,n,i,r,o,a,s,c){null==c&&(c=1);for(var p=(c=c>1?1:c<0?0:c)/2,l=[-.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],h=0,d=0;d<12;d++){var f=p*l[d]+p,m=Kt(f,e,n,r,a),v=Kt(f,t,i,o,s),y=m*m+v*v;h+=u[d]*Mt.sqrt(y)}return p*h}function Xt(e,t,n,i,r,o,a,s){if(!(Bt(e,n)<Dt(r,a)||Dt(e,n)>Bt(r,a)||Bt(t,i)<Dt(o,s)||Dt(t,i)>Bt(o,s))){var c=(e*i-t*n)*(o-s)-(t-i)*(r*s-o*a),p=(e-n)*(o-s)-(t-i)*(r-a);if(p){var l=Zt(((e*i-t*n)*(r-a)-(e-n)*(r*s-o*a))/p),u=Zt(c/p),h=+l.toFixed(2),d=+u.toFixed(2);if(!(h<+Dt(e,n).toFixed(2)||h>+Bt(e,n).toFixed(2)||h<+Dt(r,a).toFixed(2)||h>+Bt(r,a).toFixed(2)||d<+Dt(t,i).toFixed(2)||d>+Bt(t,i).toFixed(2)||d<+Dt(o,s).toFixed(2)||d>+Bt(o,s).toFixed(2)))return{x:l,y:u}}}}function Zt(e){return Math.round(1e11*e)/1e11}function Qt(e,t,n){if(!function(e,t){return e=Ht(e),qt(t=Ht(t),e.x,e.y)||qt(t,e.x2,e.y)||qt(t,e.x,e.y2)||qt(t,e.x2,e.y2)||qt(e,t.x,t.y)||qt(e,t.x2,t.y)||qt(e,t.x,t.y2)||qt(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)}(Ut(e),Ut(t)))return n?0:[];for(var i=Yt(...e),r=Yt(...t),o=tn(e)?1:~~(i/5)||1,a=tn(t)?1:~~(r/5)||1,s=[],c=[],p={},l=n?0:[],u=0;u<o+1;u++){var h=Wt(...e,u/o);s.push({x:h.x,y:h.y,t:u/o})}for(u=0;u<a+1;u++)h=Wt(...t,u/a),c.push({x:h.x,y:h.y,t:u/a});for(u=0;u<o;u++)for(var d=0;d<a;d++){var f,m=s[u],v=s[u+1],y=c[d],g=c[d+1],b=jt(v.x-m.x)<.01?"y":"x",_=jt(g.x-y.x)<.01?"y":"x",x=Xt(m.x,m.y,v.x,v.y,y.x,y.y,g.x,g.y);if(x){if(p[f=x.x.toFixed(9)+"#"+x.y.toFixed(9)])continue;p[f]=!0;var w=m.t+jt((x[b]-m[b])/(v[b]-m[b]))*(v.t-m.t),E=y.t+jt((x[_]-y[_])/(g[_]-y[_]))*(g.t-y.t);w>=0&&w<=1&&E>=0&&E<=1&&(n?l++:l.push({x:x.x,y:x.y,t1:w,t2:E}))}}return l}function Jt(e,t,n){e=an(e),t=an(t);for(var i,r,o,a,s,c,p,l,u,h,d=n?0:[],f=0,m=e.length;f<m;f++){var v=e[f];if("M"==v[0])i=s=v[1],r=c=v[2];else{"C"==v[0]?(i=(u=[i,r,...v.slice(1)])[6],r=u[7]):(u=[i,r,i,r,s,c,s,c],i=s,r=c);for(var y=0,g=t.length;y<g;y++){var b=t[y];if("M"==b[0])o=p=b[1],a=l=b[2];else{"C"==b[0]?(o=(h=[o,a,...b.slice(1)])[6],a=h[7]):(h=[o,a,o,a,p,l,p,l],o=p,a=l);var _=Qt(u,h,n);if(n)d+=_;else{for(var x=0,w=_.length;x<w;x++)_[x].segment1=f,_[x].segment2=y,_[x].bez1=u,_[x].bez2=h;d=d.concat(_)}}}}}return d}function en(e){var t=zt(e);if(t.abs)return Gt(t.abs);if($t(e)&&$t(e&&e[0])||(e=function(e){if(!e)return null;var t=zt(e);if(t.arr)return Ft(t.arr);var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=[];return $t(e)&&$t(e[0])&&(i=Ft(e)),i.length||String(e).replace(Ot,(function(e,t,r){var o=[],a=t.toLowerCase();for(r.replace(Lt,(function(e,t){t&&o.push(+t)})),"m"==a&&o.length>2&&(i.push([t,...o.splice(0,2)]),a="l",t="m"==t?"l":"L");o.length>=n[a]&&(i.push([t,...o.splice(0,n[a])]),n[a]););})),i.toString=zt.toString,t.arr=Ft(i),i}(e)),!e||!e.length)return[["M",0,0]];var n,i=[],r=0,o=0,a=0,s=0,c=0;"M"==e[0][0]&&(a=r=+e[0][1],s=o=+e[0][2],c++,i[0]=["M",r,o]);for(var p,l,u=c,h=e.length;u<h;u++){if(i.push(p=[]),(n=(l=e[u])[0])!=n.toUpperCase())switch(p[0]=n.toUpperCase(),p[0]){case"A":p[1]=l[1],p[2]=l[2],p[3]=l[3],p[4]=l[4],p[5]=l[5],p[6]=+l[6]+r,p[7]=+l[7]+o;break;case"V":p[1]=+l[1]+o;break;case"H":p[1]=+l[1]+r;break;case"M":a=+l[1]+r,s=+l[2]+o;default:for(var d=1,f=l.length;d<f;d++)p[d]=+l[d]+(d%2?r:o)}else for(var m=0,v=l.length;m<v;m++)p[m]=l[m];switch(n=n.toUpperCase(),p[0]){case"Z":r=+a,o=+s;break;case"H":r=p[1];break;case"V":o=p[1];break;case"M":a=p[p.length-2],s=p[p.length-1];default:r=p[p.length-2],o=p[p.length-1]}}return i.toString=Vt,t.abs=Gt(i),i}function tn(e){return e[0]===e[2]&&e[1]===e[3]&&e[4]===e[6]&&e[5]===e[7]}function nn(e,t,n,i){return[e,t,n,i,n,i]}function rn(e,t,n,i,r,o){var a=1/3,s=2/3;return[a*e+s*n,a*t+s*i,a*r+s*n,a*o+s*i,r,o]}function on(e,t,n,i,r,o,a,s,c,p){var l,u=120*Tt/180,h=Tt/180*(+r||0),d=[],f=function(e){return function t(){var n=Array.prototype.slice.call(arguments,0).join("␀"),i=t.cache=t.cache||{},r=t.count=t.count||[];return It(i,n)?(function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}(r,n),i[n]):(r.length>=1e3&&delete i[r.shift()],r.push(n),i[n]=e(...arguments),i[n])}}((function(e,t,n){return{x:e*Mt.cos(n)-t*Mt.sin(n),y:e*Mt.sin(n)+t*Mt.cos(n)}}));if(p)E=p[0],S=p[1],x=p[2],w=p[3];else{e=(l=f(e,t,-h)).x,t=l.y;var m=(e-(s=(l=f(s,c,-h)).x))/2,v=(t-(c=l.y))/2,y=m*m/(n*n)+v*v/(i*i);y>1&&(n*=y=Mt.sqrt(y),i*=y);var g=n*n,b=i*i,_=(o==a?-1:1)*Mt.sqrt(jt((g*b-g*v*v-b*m*m)/(g*v*v+b*m*m))),x=_*n*v/i+(e+s)/2,w=_*-i*m/n+(t+c)/2,E=Mt.asin(((t-w)/i).toFixed(9)),S=Mt.asin(((c-w)/i).toFixed(9));(E=e<x?Tt-E:E)<0&&(E=2*Tt+E),(S=s<x?Tt-S:S)<0&&(S=2*Tt+S),a&&E>S&&(E-=2*Tt),!a&&S>E&&(S-=2*Tt)}var C=S-E;if(jt(C)>u){var k=S,R=s,P=c;S=E+u*(a&&S>E?1:-1),d=on(s=x+n*Mt.cos(S),c=w+i*Mt.sin(S),n,i,r,0,a,R,P,[S,k,x,w])}C=S-E;var A=Mt.cos(E),M=Mt.sin(E),T=Mt.cos(S),D=Mt.sin(S),B=Mt.tan(C/4),N=4/3*n*B,j=4/3*i*B,O=[e,t],L=[e+N*M,t-j*A],$=[s+N*D,c-j*T],I=[s,c];if(L[0]=2*O[0]-L[0],L[1]=2*O[1]-L[1],p)return[L,$,I].concat(d);for(var F=[],z=0,H=(d=[L,$,I].concat(d).join().split(",")).length;z<H;z++)F[z]=z%2?f(d[z-1],d[z],h).y:f(d[z],d[z+1],h).x;return F}function an(e){var t=zt(e);if(t.curve)return Gt(t.curve);for(var n=en(e),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},r=function(e,t,n){var i,r;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",...on(t.x,t.y,...e.slice(1))];break;case"S":"C"==n||"S"==n?(i=2*t.x-t.bx,r=2*t.y-t.by):(i=t.x,r=t.y),e=["C",i,r,...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",...rn(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",...rn(t.x,t.y,e[1],e[2],e[3],e[4])];break;case"L":e=["C",...nn(t.x,t.y,e[1],e[2])];break;case"H":e=["C",...nn(t.x,t.y,e[1],t.y)];break;case"V":e=["C",...nn(t.x,t.y,t.x,e[1])];break;case"Z":e=["C",...nn(t.x,t.y,t.X,t.Y)]}return e},o=function(e,t){if(e[t].length>7){e[t].shift();for(var i=e[t];i.length;)a[t]="A",e.splice(t++,0,["C",...i.splice(0,6)]);e.splice(t,1),l=n.length}},a=[],s="",c="",p=0,l=n.length;p<l;p++){n[p]&&(s=n[p][0]),"C"!=s&&(a[p]=s,p&&(c=a[p-1])),n[p]=r(n[p],i,c),"A"!=a[p]&&"C"==s&&(a[p]="C"),o(n,p);var u=n[p],h=u.length;i.x=u[h-2],i.y=u[h-1],i.bx=At(u[h-4])||i.x,i.by=At(u[h-3])||i.y}return t.curve=Gt(n),n}function sn(e){return l(e)&&f(e,"waypoints")}function cn(e){return l(e)&&f(e,"labelTarget")}function pn(e){return{x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height)}}function ln(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function un(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function hn(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function dn(e){for(var t=e.waypoints,n=t.reduce((function(e,n,i){var r=t[i-1];if(r){var o=e[e.length-1],a=o&&o.endLength||0,s=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}(r,n);e.push({start:r,end:n,startLength:a,endLength:a+s,length:s})}return e}),[]),i=n.reduce((function(e,t){return e+t.length}),0),r=i/2,o=0,a=n[o];a.endLength<r;)a=n[++o];var s=(r-a.startLength)/a.length;return{x:a.start.x+(a.end.x-a.start.x)*s,y:a.start.y+(a.end.y-a.start.y)*s}}function fn(e){return sn(e)?dn(e):ln({x:(t=e).x+(t.width||0)/2,y:t.y+(t.height||0)/2});var t}function mn(e,t,n){l(n=n||0)||(n={x:n,y:n});var i=un(e),r=un(t),o=i.bottom+n.y<=r.top,a=i.left-n.x>=r.right,s=i.top-n.y>=r.bottom,c=o?"top":s?"bottom":null,p=i.right+n.x<=r.left?"left":a?"right":null;return p&&c?c+"-"+p:p||c||"intersect"}function vn(e,t,n){var i=function(e,t){return Jt(e,t)}(e,t);return 1===i.length||2===i.length&&wt(i[0],i[1])<1?ln(i[0]):i.length>1?(i=A(i,(function(e){var t=Math.floor(100*e.t2)||1;return t=((t=100-t)<10?"0":"")+t,e.segment2+"#"+t})),ln(i[n?0:i.length-1])):null}function yn(e,t){return Math.round(e*t)/t}function gn(e){return u(e)?e+"px":e}function bn(e,t,n){const i=Ae("g");we(i).add(t);const r=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]||null),i}const _n={shape:["x","y","width","height"],connection:["waypoints"]};function xn(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}function wn(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}xn.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],xn.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"),q(n,{position:"relative",overflow:"hidden",width:gn(e.width),height:gn(e.height)}),t.appendChild(n),n}(e),i=this._svg=Ae("svg");_e(i,{width:"100%",height:"100%"}),K(i,"tabindex",0),e.autoFocus&&t.on("element.hover",(()=>{this.restoreFocus()})),t.on("element.mousedown",500,(e=>{this.focus()})),i.addEventListener("focusin",(()=>{this._setFocused(!0)})),i.addEventListener("focusout",(()=>{this._setFocused(!1)})),ye(n,i);const r=this._viewport=bn(i,"viewport");e.deferUpdate&&(this._viewboxChanged=j(O(this._viewboxChanged,this),300)),t.on("diagram.init",(()=>{t.fire("canvas.init",{svg:i,viewport:r})})),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)},xn.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},xn.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},xn.prototype._clear=function(){this._elementRegistry.getAll().forEach((e=>{const t=ft(e);"root"===t?this.removeRootElement(e):this._removeElement(e,t)})),this._planes=[],this._rootElement=null,delete this._cachedViewbox},xn.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},xn.prototype.restoreFocus=function(){document.activeElement===document.body&&this.focus()},xn.prototype.isFocused=function(){return this._focused},xn.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},xn.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},xn.prototype._getChildIndex=function(e){return _(this._layers,(function(t,n){return n.visible&&e>=n.index&&t++,t}),0)},xn.prototype._createLayer=function(e,t){void 0===t&&(t=1);const n=this._getChildIndex(t);return{group:bn(this._viewport,"layer-"+e,n),index:t,visible:!0}},xn.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,i=t.group,r=t.index;if(t.visible)return i;const o=this._getChildIndex(r);return n.insertBefore(i,n.childNodes[o]||null),t.visible=!0,i},xn.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?(Fe(n),t.visible=!1,n):n},xn.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],Fe(t.group))},xn.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},xn.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},xn.prototype.getRootElements=function(){return this._planes.map((function(e){return e.rootElement}))},xn.prototype._findPlaneForRoot=function(e){return m(this._planes,(function(t){return t.rootElement===e}))},xn.prototype.getContainer=function(){return this._container},xn.prototype._updateMarker=function(e,t,n){let i;e.id||(e=this._elementRegistry.get(e)),e.markers=e.markers||new Set,i=this._elementRegistry._elements[e.id],i&&(g([i.gfx,i.secondaryGfx],(function(i){i&&(n?(e.markers.add(t),we(i).add(t)):(e.markers.delete(t),we(i).remove(t)))})),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},xn.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},xn.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},xn.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),!!e.markers&&e.markers.has(t)},xn.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},xn.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},xn.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 i=this.getLayer(n,0);return this.hideLayer(n),this._addRoot(e,i),this._planes.push({rootElement:e,layer:i}),e},xn.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},xn.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},xn.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)},xn.prototype._addRoot=function(e,t){const n=this._elementRegistry,i=this._eventBus;i.fire("root.add",{element:e}),n.add(e,t),i.fire("root.added",{element:e,gfx:t})},xn.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})},xn.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=_n[e],i=x(n,(function(e){return void 0!==t[e]}));if(!i)throw new Error("must supply { "+n.join(", ")+" } with "+e)},xn.prototype._setParent=function(e,t,n){_t(t.children,e,n),e.parent=t},xn.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();const r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),r.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);const a=o.create(e,t,i);return this._elementRegistry.add(t,a),o.update(e,t,a),r.fire(e+".added",{element:t,gfx:a}),t},xn.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},xn.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},xn.prototype._removeElement=function(e,t){const n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(e=n.get(e.id||e))return r.fire(t+".remove",{element:e}),i.remove(e),bt(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},xn.prototype.removeShape=function(e){return this._removeElement(e,"shape")},xn.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},xn.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},xn.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},xn.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},xn.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let i,r,o,a,s,c,p;return e?(this._changeViewbox((function(){s=Math.min(n.width/e.width,n.height/e.height);const i=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);He(t,i)})),e):(o=this._rootElement?this.getActiveLayer():null,i=o&&o.getBBox()||{},a=He(t),r=a?a.matrix:function(e,t,n,i,r,o){var a=Te().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return De(a,e);case 6:return De(a,{a:e,b:t,c:n,d:i,e:r,f:o})}}(),s=yn(r.a,1e3),c=yn(-r.e||0,1e3),p=yn(-r.f||0,1e3),e=this._cachedViewbox={x:c?c/s:0,y:p?p/s:0,width:n.width/s,height:n.height/s,scale:s,inner:{width:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:n})},xn.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),wn(t,n)})),{x:n.e,y:n.f}},xn.prototype.scrollToElement=function(e,t){let n=100;"string"==typeof e&&(e=this._elementRegistry.get(e));const i=this.findRoot(e);if(i!==this.getRootElement()&&this.setRootElement(i),i===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 r=ht(e),o=un(r),a=this.viewbox(),s=this.zoom();let c,p;a.y+=t.top/s,a.x+=t.left/s,a.width-=(t.right+t.left)/s,a.height-=(t.bottom+t.top)/s;const l=un(a);if(r.width<a.width&&r.height<a.height){const e=Math.max(0,o.right-l.right),t=Math.min(0,o.left-l.left),n=Math.max(0,o.bottom-l.bottom),i=Math.min(0,o.top-l.top);c=e||t,p=n||i}else c=r.x-a.x,p=r.y-a.y;this.scroll({dx:-c*s,dy:-p*s})},xn.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if("fit-viewport"===e)return this._fitViewport(t);let n,i;return this._changeViewbox((function(){"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)})),yn(i.a,1e3)},xn.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,i=t.inner;let r,o;return i.x>=0&&i.y>=0&&i.x+i.width<=n.width&&i.y+i.height<=n.height&&!e?o={x:0,y:0,width:Math.max(i.width+i.x,n.width),height:Math.max(i.height+i.y,n.height)}:(r=Math.min(1,n.width/i.width,n.height/i.height),o={x:i.x+(e?i.width/2-n.width/r/2:0),y:i.y+(e?i.height/2-n.height/r/2:0),width:n.width/r,height:n.height/r}),this.viewbox(o),this.viewbox(!1).scale},xn.prototype._setZoom=function(e,t){const n=this._svg,i=this._viewport,r=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,c,p,l;c=i.getCTM();const u=c.a;return t?(a=L(o,t),s=a.matrixTransform(c.inverse()),p=r.translate(s.x,s.y).scale(1/u*e).translate(-s.x,-s.y),l=c.multiply(p)):l=r.scale(e),wn(this._viewport,l),l},xn.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},xn.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}},xn.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var En="data-element-id";function Sn(e){this._elements={},this._eventBus=e}function Cn(e,t,n){var i=function(e,t,n,i){var r=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,r,i)),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,r,i)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:i}),i.length&&i.forEach((function(i){e.set(i,t.inverse,n)}))}function kn(e,t){if(!(this instanceof kn))return new kn(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Sn.$inject=["eventBus"],Sn.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),_e(t,En,i),n&&_e(n,En,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},Sn.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(_e(i.gfx,En,""),i.secondaryGfx&&_e(i.secondaryGfx,En,""),delete t[n])},Sn.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),i=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,i)},Sn.prototype.updateGraphics=function(e,t,n){var i=e.id||e,r=this._elements[i];return n?r.secondaryGfx=t:r.gfx=t,t&&_e(t,En,i),t},Sn.prototype.get=function(e){var t;t="string"==typeof e?e:e&&_e(e,En);var n=this._elements[t];return n&&n.element},Sn.prototype.filter=function(e){var t=[];return this.forEach((function(n,i){e(n,i)&&t.push(n)})),t},Sn.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),i=0;i<n.length;i++){var r=t[n[i]],o=r.element;if(e(o,r.gfx))return o}},Sn.prototype.getAll=function(){return this.filter((function(e){return e}))},Sn.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach((function(n){var i=t[n],r=i.element,o=i.gfx;return e(r,o)}))},Sn.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},Sn.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")},kn.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?Cn(this,t,e):function(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var o=r;r=null,o&&e.unset(o,i,n),r=t,e.set(r,i,n)}}})}(this,t,e)},kn.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return function(e){return!0===e.__refs_collection}(n)||Cn(this,t,e),n},kn.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},kn.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},kn.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Rn=new kn({name:"children",enumerable:!0,collection:!0},{name:"parent"}),Pn=new kn({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),An=new kn({name:"attachers",collection:!0},{name:"host"}),Mn=new kn({name:"outgoing",collection:!0},{name:"source"}),Tn=new kn({name:"incoming",collection:!0},{name:"target"});function Dn(){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)}}),Rn.bind(this,"parent"),Pn.bind(this,"labels"),Mn.bind(this,"outgoing"),Tn.bind(this,"incoming")}function Bn(){Dn.call(this),Rn.bind(this,"children"),An.bind(this,"host"),An.bind(this,"attachers")}function Nn(){Dn.call(this),Rn.bind(this,"children")}function jn(){Bn.call(this),Pn.bind(this,"labelTarget")}function On(){Dn.call(this),Mn.bind(this,"source"),Tn.bind(this,"target")}e(Bn,Dn),e(Nn,Bn),e(jn,Bn),e(On,Dn);var Ln={connection:On,shape:Bn,label:jn,root:Nn};function $n(){this._uid=12}$n.prototype.createRoot=function(e){return this.create("root",e)},$n.prototype.createLabel=function(e){return this.create("label",e)},$n.prototype.createShape=function(e){return this.create("shape",e)},$n.prototype.createConnection=function(e){return this.create("connection",e)},$n.prototype.create=function(e,t){return(t=L({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=Ln[e];if(!n)throw new Error("unknown type: <"+e+">");return L(new n,t)}(e,t)};var In="__fn",Fn=Array.prototype.slice;function zn(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function Hn(){}function Vn(e){return e.childNodes[0]}function Gn(e,t,n,i,r){var o=Be();o.setTranslate(t,n);var a=Be();a.setRotate(i||0,0,0);var s=Be();s.setScale(1,1),He(e,[o,a,s])}function Wn(e,t,n){var i=Be();i.setTranslate(t,n),He(e,i)}function Un(e,t){var n=Be();n.setRotate(t,0,0),He(e,n)}function qn(e,t){this._eventBus=e,this._elementRegistry=t}function Kn(e,t,n){var i=n||t.firstChild;e!==i&&t.insertBefore(e,i)}zn.prototype.on=function(e,t,n,i){if(e=p(e)?e:[e],h(t)&&(i=n,n=t,t=1e3),!u(t))throw new Error("priority must be a number");var r=n;i&&((r=O(n,i))[In]=n[In]||n);var o=this;e.forEach((function(e){o._addListener(e,{priority:t,callback:r,next:null})}))},zn.prototype.once=function(e,t,n,i){var r=this;if(h(t)&&(i=n,n=t,t=1e3),!u(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var t=n.apply(i,arguments);return r.off(e,o),t}o[In]=n,this.on(e,t,o)},zn.prototype.off=function(e,t){e=p(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},zn.prototype.createEvent=function(e){var t=new Hn;return t.init(e),t},zn.prototype.fire=function(e,t){var n,i,r,o;if(o=Fn.call(arguments),"object"==typeof e&&(e=(t=e).type),!e)throw new Error("no event type specified");if(i=this._listeners[e]){n=t instanceof Hn?t:this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{r=this._invokeListeners(n,o,i)}finally{e!==a&&(n.type=a)}return void 0===r&&n.defaultPrevented&&(r=!1),r}},zn.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},zn.prototype._destroy=function(){this._listeners={}},zn.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},zn.prototype._invokeListener=function(e,t,n){var i;if(n.callback.__isTomb)return i;try{i=function(e,t){return e.apply(null,t)}(n.callback,t),void 0!==i&&(e.returnValue=i,e.stopPropagation()),!1===i&&e.preventDefault()}catch(e){if(!this.handleError(e))throw console.error("unhandled error in event listener",e),e}return i},zn.prototype._addListener=function(e,t){var n,i=this._getListeners(e);if(i){for(;i;){if(i.priority<t.priority)return t.next=i,void(n?n.next=t:this._setListeners(e,t));n=i,i=i.next}n.next=t}else this._setListeners(e,t)},zn.prototype._getListeners=function(e){return this._listeners[e]},zn.prototype._setListeners=function(e,t){this._listeners[e]=t},zn.prototype._removeListener=function(e,t){var n,i,r,o=this._getListeners(e);if(t)for(;o;)n=o.next,(r=o.callback)!==t&&r[In]!==t||(i?i.next=n:this._setListeners(e,n)),i=o,o=n;else this._setListeners(e,null)},Hn.prototype.stopPropagation=function(){this.cancelBubble=!0},Hn.prototype.preventDefault=function(){this.defaultPrevented=!0},Hn.prototype.init=function(e){L(this,e||{})},qn.$inject=["eventBus","elementRegistry"],qn.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=function(e){return e.parentNode.childNodes[1]}(n),t||(we(t=Ae("g")).add("djs-children"),ye(n.parentNode,t))):t=n,t},qn.prototype._clear=function(e){var t=Vn(e);return Q(t),t},qn.prototype._createContainer=function(e,t,n,i){var r=Ae("g");we(r).add("djs-group"),void 0!==n?Kn(r,t,t.childNodes[n]):ye(t,r);var o=Ae("g");we(o).add("djs-element"),we(o).add("djs-"+e),i&&we(o).add("djs-frame"),ye(r,o);var a=Ae("g");return we(a).add("djs-visual"),ye(o,a),o},qn.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,mt(t))},qn.prototype.updateContainments=function(e){var t,n=this,i=this._elementRegistry;t=_(e,(function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e}),{}),g(t,(function(e){var t=e.children;if(t){var r=n._getChildrenContainer(e);g(t.slice().reverse(),(function(e){Kn(i.getGraphics(e).parentNode,r)}))}}))},qn.prototype.drawShape=function(e,t,n={}){return this._eventBus.fire("render.shape",{gfx:e,element:t,attrs:n})},qn.prototype.getShapePath=function(e){return this._eventBus.fire("render.getShapePath",e)},qn.prototype.drawConnection=function(e,t,n={}){return this._eventBus.fire("render.connection",{gfx:e,element:t,attrs:n})},qn.prototype.getConnectionPath=function(e){return this._eventBus.fire("render.getConnectionPath",e)},qn.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if("shape"===e)this.drawShape(i,t),Wn(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(i,t)}t.hidden?_e(n,"display","none"):_e(n,"display","block")}},qn.prototype.remove=function(e){Fe(this._elementRegistry.getGraphics(e).parentNode)};var Yn={__depends__:[gt],__init__:["canvas"],canvas:["type",xn],elementRegistry:["type",Sn],elementFactory:["type",$n],eventBus:["type",zn],graphicsFactory:["type",qn]};function Xn(e){return function(e){var t=new Ze(e);return t.init(),t}([{config:["value",e=e||{}]},Yn].concat(e.modules||[]))}function Zn(e,t){this._injector=t||Xn(e),this.get("eventBus").fire("diagram.init")}function Qn(){}function Jn(e,t){this.model=e,this.properties=t}Zn.prototype.get=function(e,t){return this._injector.get(e,t)},Zn.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},Zn.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},Zn.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")},Qn.prototype.get=function(e){return this.$model.properties.get(this,e)},Qn.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},Jn.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(Qn.prototype);g(e.properties,(function(e){e.isMany||void 0===e.default||(i[e.name]=e.default)})),n.defineModel(i,t),n.defineDescriptor(i,e);var r=e.ns.name;function o(e){n.define(this,"$type",{value:r,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),g(e,O((function(e,t){this.set(t,e)}),this))}return o.prototype=i,o.hasType=i.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var ei={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},ti={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 ni(e,t){var n=ti[e];return n?n(t):t}function ii(e){return!!ei[e]}function ri(e){return!!ti[e]}function oi(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function ai(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function si(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,g(e,O(this.registerPackage,this))}function ci(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function pi(e){this.model=e}function li(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function ui(e){return e.replace(/^:/,"")}function hi(e,t={}){this.properties=new pi(this),this.factory=new Jn(this,this.properties),this.registry=new si(e,this.properties),this.typeCache={},this.config=t}ai.prototype.build=function(){return $(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},ai.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},ai.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,o=this.propertiesByName,a=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=r.indexOf(e);if(-1===s)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,a),o[i.name]=o[i.localName]=t},ai.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=oi(r[0],i),a=oi(r[1],o.prefix).name,s=this.propertiesByName[a];if(!s)throw new Error("refined property <"+a+"> not found");this.replaceProperty(s,e,n),delete e.redefines},ai.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},ai.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},ai.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},ai.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},ai.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},ai.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},ai.prototype.hasProperty=function(e){return this.propertiesByName[e]},ai.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(g(e.properties,O((function(n){n=L({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var i=n.replaces,r=n.redefines;i||r?this.redefineProperty(n,i||r,i):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))}),this)),i.push(e),n[r]=e)},si.prototype.getPackage=function(e){return this.packageMap[e]},si.prototype.getPackages=function(){return this.packages},si.prototype.registerPackage=function(e){e=L({},e);var t=this.packageMap;ci(t,e,"prefix"),ci(t,e,"uri"),g(e.types,O((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},si.prototype.registerType=function(e,t){var n=oi((e=L({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:L(e.meta||{})})).name,t.prefix),i=n.name,r={};g(e.properties,O((function(e){var t=oi(e.name,n.prefix),i=t.name;ii(e.type)||(e.type=oi(e.type,t.prefix).name),L(e,{ns:t,name:i}),r[i]=e}),this)),L(e,{ns:n,name:i,propertiesByName:r}),g(e.extends,O((function(e){var t=oi(e,n.prefix),r=this.typeMap[t.name];r.traits=r.traits||[],r.traits.push(i)}),this)),this.definePackage(e,t),this.typeMap[i]=e},si.prototype.mapTypes=function(e,t,n){var i=ii(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(n,i){var o=oi(n,ii(n)?"":e.prefix);r.mapTypes(o,t,i)}function a(e){return o(e,!0)}if(!i)throw new Error("unknown type <"+e.name+">");g(i.superClass,n?a:function(e){return o(e,!1)}),t(i,!n),g(i.traits,a)},si.prototype.getEffectiveDescriptor=function(e){var t=oi(e),n=new ai(t);this.mapTypes(t,(function(e,t){n.addTrait(e,t)}));var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},si.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},pi.prototype.set=function(e,t,n){if(!d(t)||!t.length)throw new TypeError("property name must be a non-empty string");var i=this.getProperty(e,t),r=i&&i.name;void 0===n?i?delete e[r]:delete e.$attrs[ui(t)]:i?r in e?e[r]=n:li(e,i,n):e.$attrs[ui(t)]=n},pi.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[ui(t)];var i=n.name;return!e[i]&&n.isMany&&li(e,n,[]),e[i]},pi.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;delete(n=L({},n,{get:function(){return i}})).value}Object.defineProperty(e,t,n)},pi.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},pi.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},pi.prototype.getProperty=function(e,t){var n=this.model,i=n.getPropertyDescriptor(e,t);if(i)return i;if(t.includes(":"))return null;const r=n.config.strict;if(void 0!==r){const n=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(r)throw n;"undefined"!=typeof console&&console.warn(n)}return null},hi.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},hi.prototype.getType=function(e){var t=this.typeCache,n=d(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},hi.prototype.createAny=function(e,t,n){var i=oi(e),r={$type:e,$instanceOf:function(e){return e===this.$type},get:function(e){return this[e]},set:function(e,t){!function(e,t,n){let i=e;g(t,(function(e,r){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[r+1],p=i[e];s(o)&&c(p)&&(p=i[e]=isNaN(+o)?{}:[]),a(o)?a(n)?delete i[e]:i[e]=n:i=p}))}(this,[e],t)}},o={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};return this.properties.defineDescriptor(r,o),this.properties.defineModel(r,this),this.properties.define(r,"get",{enumerable:!1,writable:!0}),this.properties.define(r,"set",{enumerable:!1,writable:!0}),this.properties.define(r,"$parent",{enumerable:!1,writable:!0}),this.properties.define(r,"$instanceOf",{enumerable:!1,writable:!0}),g(n,(function(e,t){l(e)&&void 0!==e.value?r[e.name]=e.value:r[t]=e})),r},hi.prototype.getPackage=function(e){return this.registry.getPackage(e)},hi.prototype.getPackages=function(){return this.registry.getPackages()},hi.prototype.getElementDescriptor=function(e){return e.$descriptor},hi.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},hi.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},hi.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var di=String.fromCharCode,fi=Object.prototype.hasOwnProperty,mi=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,vi={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function yi(e,t,n,i){return i?fi.call(vi,i)?vi[i]:"&"+i+";":di(t||parseInt(n,16))}function gi(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(mi,yi):e}Object.keys(vi).forEach((function(e){vi[e.toUpperCase()]=vi[e]}));var bi="non-whitespace outside of root node";function _i(e){return new Error(e)}function xi(e){return"missing namespace for prefix <"+e+">"}function wi(e){return{get:e,enumerable:!0}}function Ei(e){var t,n={};for(t in e)n[t]=e[t];return n}function Si(e){return e+"$uri"}function Ci(){return{line:0,column:0}}function ki(e){throw e}function Ri(e){if(!this)return new Ri(e);var t,n,i,r,o,a,s,c,p,l=e&&e.proxy,u=ki,h=Ci,d=!1,f=!1,m=null,v=!1;function y(e){e instanceof Error||(e=_i(e)),m=e,u(e,h)}function g(e){o&&(e instanceof Error||(e=_i(e)),o(e,h))}this.on=function(e,p){if("function"!=typeof p)throw _i("required args <name, cb>");switch(e){case"openTag":n=p;break;case"text":t=p;break;case"closeTag":i=p;break;case"error":u=p;break;case"warn":o=p;break;case"cdata":r=p;break;case"attention":c=p;break;case"question":s=p;break;case"comment":a=p;break;default:throw _i("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw _i("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return f=!0,p=n,this},this.parse=function(e){if("string"!=typeof e)throw _i("required args <xml=string>");return m=null,function(e){var o,u,m,b,_,x,w,E,S,C,k,R=f?[]:null,P=f?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[Si(n)]=t;return i}(p):null,A=[],M=0,T=!1,D=!1,B=0,N=0,j="",O=0;function L(){if(null!==k)return k;var e,t,n,i,r,o,a,s,c,l,u,h=f&&P.xmlns,m=f&&d?[]:null,v=O,y=j,b=y.length,_={},x={};e:for(;v<b;v++)if(c=!1,!(32===(l=y.charCodeAt(v))||l<14&&l>8)){for((l<65||l>122||l>90&&l<97)&&95!==l&&58!==l&&(g("illegal first char attribute name"),c=!0),u=v+1;u<b;u++)if(!((l=y.charCodeAt(u))>96&&l<123||l>64&&l<91||l>47&&l<59||46===l||45===l||95===l)){if(32===l||l<14&&l>8){g("missing attribute value"),v=u;continue e}if(61===l)break;g("illegal attribute name char"),c=!0}if("xmlns:xmlns"===(s=y.substring(v,u))&&(g("illegal declaration of xmlns"),c=!0),34===(l=y.charCodeAt(u+1)))-1===(u=y.indexOf('"',v=u+2))&&-1!==(u=y.indexOf("'",v))&&(g("attribute value quote missmatch"),c=!0);else if(39===l)-1===(u=y.indexOf("'",v=u+2))&&-1!==(u=y.indexOf('"',v))&&(g("attribute value quote missmatch"),c=!0);else for(g("missing attribute value quotes"),c=!0,u+=1;u<b&&!(32===(l=y.charCodeAt(u+1))||l<14&&l>8);u++);for(-1===u&&(g("missing closing quotes"),u=b,c=!0),c||(o=y.substring(v,u)),v=u;u+1<b&&!(32===(l=y.charCodeAt(u+1))||l<14&&l>8);u++)v===u&&(g("illegal character after attribute end"),c=!0);if(v=u+1,!c)if(s in x)g("attribute <"+s+"> already defined");else if(x[s]=!0,f)if(d){if(null!==(r="xmlns"===s?"xmlns":120===s.charCodeAt(0)&&"xmlns:"===s.substr(0,6)?s.substr(6):null)){if(e=gi(o),t=Si(r),!(a=p[e])){if("xmlns"===r||t in P&&P[t]!==e)do{a="ns"+M++}while(void 0!==P[a]);else a=r;p[e]=a}P[r]!==a&&(i||(P=Ei(P),i=!0),P[r]=a,"xmlns"===r&&(P[Si(a)]=e,h=a),P[t]=e),_[s]=o;continue}m.push(s,o)}else-1!==(l=s.indexOf(":"))?(n=P[s.substring(0,l)])?_[s=h===n?s.substr(l+1):n+s.substr(l)]=o:g(xi(s.substring(0,l))):_[s]=o;else _[s]=o}if(d)for(v=0,b=m.length;v<b;v++){if(s=m[v++],o=m[v],-1!==(l=s.indexOf(":"))){if(!(n=P[s.substring(0,l)])){g(xi(s.substring(0,l)));continue}s=h===n?s.substr(l+1):n+s.substr(l)}_[s]=o}return k=_}function $(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,o=0,a=0,s=N;B>=a&&(t=i.exec(e))&&!((s=t[0].length+t.index)>B);)r+=1,a=s;return-1==B?(o=s,n=e.substring(N)):0===N?n=e.substring(N,B):(o=B-a,n=-1==N?e.substring(B):e.substring(B,N+1)),{data:n,line:r,column:o}}h=$,l&&(C=Object.create({},{name:wi((function(){return E})),originalName:wi((function(){return S})),attrs:wi(L),ns:wi((function(){return P}))}));for(;-1!==N;){if(-1===(B=60===e.charCodeAt(N)?N:e.indexOf("<",N)))return A.length?y("unexpected end of file"):0===N?y("missing start tag"):void(N<e.length&&e.substring(N).trim()&&g(bi));if(N!==B)if(A.length){if(t&&(t(e.substring(N,B),gi,h),v))return}else if(e.substring(N,B).trim()&&(g(bi),v))return;if(33===(_=e.charCodeAt(B+1))){if(91===(b=e.charCodeAt(B+2))&&"CDATA["===e.substr(B+3,6)){if(-1===(N=e.indexOf("]]>",B)))return y("unclosed cdata");if(r&&(r(e.substring(B+9,N),h),v))return;N+=3;continue}if(45===b&&45===e.charCodeAt(B+3)){if(-1===(N=e.indexOf("--\x3e",B)))return y("unclosed comment");if(a&&(a(e.substring(B+4,N),gi,h),v))return;N+=3;continue}}if(63!==_){for(u=B+1;;u++){if(x=e.charCodeAt(u),isNaN(x))return N=-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){N=u;break}}if(33!==_){if(k={},47===_){if(T=!1,D=!0,!A.length)return y("missing open tag");if(u=E=A.pop(),b=B+2+u.length,e.substring(B+2,b)!==u)return y("closing tag mismatch");for(;b<N;b++)if(!(32===(_=e.charCodeAt(b))||_>8&&_<14))return y("close tag")}else{if(47===e.charCodeAt(N-1)?(u=E=e.substring(B+1,N-1),T=!0,D=!0):(u=E=e.substring(B+1,N),T=!0,D=!1),!(_>96&&_<123||_>64&&_<91||95===_||58===_))return y("illegal first char nodeName");for(b=1,m=u.length;b<m;b++)if(!((_=u.charCodeAt(b))>96&&_<123||_>64&&_<91||_>47&&_<59||45===_||95===_||46==_)){if(32===_||_<14&&_>8){E=u.substring(0,b),k=null;break}return y("invalid nodeName")}D||A.push(E)}if(f){if(o=P,T&&(D||R.push(o),null===k&&(d=-1!==u.indexOf("xmlns",b))&&(O=b,j=u,L(),d=!1)),S=E,-1!==(_=E.indexOf(":"))){if(!(w=P[E.substring(0,_)]))return y("missing namespace on <"+S+">");E=E.substr(_+1)}else w=P.xmlns;w&&(E=w+":"+E)}if(T&&(O=b,j=u,n&&(l?n(C,gi,D,h):n(E,L,gi,D,h),v)))return;if(D){if(i&&(i(l?C:E,gi,T,h),v))return;f&&(P=T?o:R.pop())}N+=1}else{if(c&&(c(e.substring(B,N+1),gi,h),v))return;N+=1}}else{if(-1===(N=e.indexOf("?>",B)))return y("unclosed question");if(s&&(s(e.substring(B,N+2),h),v))return;N+=2}}}(e),h=Ci,v=!1,m},this.stop=function(){v=!0}}function Pi(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var Ai={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},Mi="property";function Ti(e){return e.xml&&e.xml.serialize}function Di(e,t){return Pi(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function Bi(e){return new Error(e)}function Ni(e){return e.$descriptor}function ji(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 Bi("expected element");var t,n=this.elementsById,i=Ni(e).idProperty;if(i&&(t=e.get(i.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw Bi("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function Oi(){}function Li(){}function $i(){}function Ii(e,t){this.property=e,this.context=t}function Fi(e,t){this.element=t,this.propertyDesc=e}function zi(){}function Hi(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function Vi(e,t,n){Hi.call(this,e,t,n)}function Gi(e,t,n){this.model=e,this.context=n}function Wi(e){e instanceof hi&&(e={model:e}),L(this,{lax:!1},e)}Oi.prototype.handleEnd=function(){},Oi.prototype.handleText=function(){},Oi.prototype.handleNode=function(){},Li.prototype=Object.create(Oi.prototype),Li.prototype.handleNode=function(){return this},$i.prototype=Object.create(Oi.prototype),$i.prototype.handleText=function(e){this.body=(this.body||"")+e},Ii.prototype=Object.create($i.prototype),Ii.prototype.handleNode=function(e){if(this.element)throw Bi("expected no sub nodes");return this.element=this.createReference(e),this},Ii.prototype.handleEnd=function(){this.element.id=this.body},Ii.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},Fi.prototype=Object.create($i.prototype),Fi.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=ni(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},zi.prototype=Object.create($i.prototype),zi.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},Hi.prototype=Object.create(zi.prototype),Hi.prototype.addReference=function(e){this.context.addReference(e)},Hi.prototype.handleText=function(e){if(!Ni(this.element).bodyProperty)throw Bi("unexpected body text <"+e+">");$i.prototype.handleText.call(this,e)},Hi.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Ni(t).bodyProperty;n&&void 0!==e&&(e=ni(n.type,e),t.set(n.name,e))},Hi.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=Ni(i),o=this.context,a=new i({}),s=this.model;return g(n,(function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?g(e.split(" "),(function(e){o.addReference({element:a,property:i.ns.name,id:e})})):o.addReference({element:a,property:i.ns.name,id:e}):(i?e=ni(i.type,e):"xmlns"===n?n=":"+n:(t=oi(n,r.ns.prefix),s.getPackage(t.prefix)&&o.addWarning({message:"unknown attribute <"+n+">",element:a,property:n,value:e})),a.set(n,e))})),a},Hi.prototype.getPropertyForNode=function(e){var t=oi(e.name),n=this.type,i=this.model,r=Ni(n),o=t.name,a=r.propertiesByName[o];if(a&&!a.isAttr){const t=function(e){const t=Ti(e);return t!==Mi&&(t||null)}(a);if(t){const n=e.attributes[t];if(n){const t=function(e,t,n){const i=oi(e,t.xmlns),r=oi(`${t[i.prefix]||i.prefix}:${i.localName}`);return function(e,t){var n=e.name,i=e.localName,r=t&&t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(r,n.getPackage(r.prefix))}(n,e.ns,i);return L({},a,{effectiveType:Ni(i.getType(t)).name})}}return a}var s=i.getPackage(t.prefix);if(s){const e=Di(t,s),n=i.getType(e);if(a=m(r.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})),a)return L({},a,{effectiveType:Ni(n).name})}else if(a=m(r.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})),a)return a;throw Bi("unrecognized element <"+t.name+">")},Hi.prototype.toString=function(){return"ElementDescriptor["+Ni(this.type).name+"]"},Hi.prototype.valueHandler=function(e,t){return new Fi(e,t)},Hi.prototype.referenceHandler=function(e){return new Ii(e,this.context)},Hi.prototype.handler=function(e){return"Element"===e?new Gi(this.model,e,this.context):new Hi(this.model,e,this.context)},Hi.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,ri(n=t.effectiveType||t.type))return this.valueHandler(t,i);var o=(r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==o&&(t.isMany?i.get(t.name).push(o):i.set(t.name,o),t.isReference?(L(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},Vi.prototype=Object.create(Hi.prototype),Vi.prototype.createElement=function(e){var t=e.name,n=oi(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),a=o&&Di(n,o)||t;if(!r.hasType(a))throw Bi("unexpected element <"+e.originalName+">");return Hi.prototype.createElement.call(this,e)},Gi.prototype=Object.create(zi.prototype),Gi.prototype.createElement=function(e){var t=e.name,n=oi(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},Gi.prototype.handleChild=function(e){var t=new Gi(this.model,"Element",this.context).handleNode(e),n=this.element,i=t.element;return void 0!==i&&((n.$children=n.$children||[]).push(i),i.$parent=n),t},Gi.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},Wi.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof Hi?(i=t,t={}):"string"==typeof t?(i=this.handler(t),t={}):"string"==typeof i&&(i=this.handler(i));var r=this.model,o=this.lax,a=new ji(L({},t,{rootHandler:i})),s=new Ri({proxy:!0}),c=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function p(e,t,n){var i=t(),r=i.line,o=i.column,s=i.data;"<"===s.charAt(0)&&-1!==s.indexOf(" ")&&(s=s.slice(0,s.indexOf(" "))+">");var c="unparsable content "+(s?s+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return a.addWarning({message:c,error:e}),!0;throw Bi(c)}function l(e,t){return p(e,t,!0)}i.context=a,c.push(i);var u=/^<\?xml /i,h=/ encoding="([^"]+)"/i,d=/^utf-8$/i;function f(e,t){try{c.peek().handleText(e)}catch(e){l(e,t)}}var m=r.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),Object.entries(Ai).reduce((function(e,[t,n]){return e[n]=t,e}),r.config&&r.config.nsMap||{}));return s.ns(m).on("openTag",(function(e,t,n,i){var r=e.attrs||{},a=Object.keys(r).reduce((function(e,n){var i=t(r[n]);return e[n]=i,e}),{});!function(e,t){var n=c.peek();try{c.push(n.handleNode(e))}catch(e){p(e,t,o)&&c.push(new Li)}}({name:e.name,originalName:e.originalName,attributes:a,ns:e.ns},i)})).on("question",(function(e){if(u.test(e)){var t=h.exec(e),n=t&&t[1];n&&!d.test(n)&&a.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}})).on("closeTag",(function(){c.pop().handleEnd()})).on("cdata",f).on("text",(function(e,t,n){!function(e,t){e.trim()&&f(e,t)}(t(e),n)})).on("error",p).on("warn",l),new Promise((function(t,n){var r;try{s.parse(e),function(){var e,t,n=a.elementsById,i=a.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],s=Ni(r).propertiesByName[t.property];if(o||a.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),s.isMany){var c=r.get(s.name),p=c.indexOf(t);-1===p&&(p=c.length),o?c[p]=o:c.splice(p,1)}else r.set(s.name,o)}}()}catch(e){r=e}var o=i.element;r||o||(r=Bi("failed to parse document as <"+i.type.$descriptor.name+">"));var c=a.warnings,p=a.references,l=a.elementsById;return r?(r.warnings=c,n(r)):t({rootElement:o,elementsById:l,references:p,warnings:c})}))},Wi.prototype.handler=function(e){return new Vi(this.model,e)};var Ui=/<|>|'|"|&|\n\r|\n/g,qi=/<|>|&/g;function Ki(e){this.prefixMap={},this.uriMap={},this.used={},this.wellknown=[],this.custom=[],this.parent=e,this.defaultPrefixMap=e&&e.defaultPrefixMap||{}}function Yi(e,t){return Pi(t)?(n=e).charAt(0).toLowerCase()+n.slice(1):e;var n}function Xi(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function Zi(e){return d(e)?e:(e.prefix?e.prefix+":":"")+e.localName}Ki.prototype.mapDefaultPrefixes=function(e){this.defaultPrefixMap=e},Ki.prototype.defaultUriByPrefix=function(e){return this.defaultPrefixMap[e]},Ki.prototype.byUri=function(e){return this.uriMap[e]||this.parent&&this.parent.byUri(e)},Ki.prototype.add=function(e,t){this.uriMap[e.uri]=e,t?this.wellknown.push(e):this.custom.push(e),this.mapPrefix(e.prefix,e.uri)},Ki.prototype.uriByPrefix=function(e){return this.prefixMap[e||"xmlns"]||this.parent&&this.parent.uriByPrefix(e)},Ki.prototype.mapPrefix=function(e,t){this.prefixMap[e||"xmlns"]=t},Ki.prototype.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},Ki.prototype.logUsed=function(e){var t=e.uri,n=this.getNSKey(e);this.used[n]=this.byUri(t),this.parent&&this.parent.logUsed(e)},Ki.prototype.getUsed=function(e){return[].concat(this.wellknown,this.custom).filter((e=>{var t=this.getNSKey(e);return this.used[t]}))};var Qi={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Ji={"<":"lt",">":"gt","&":"amp"};function er(e,t,n){return(e=d(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function tr(e){this.tagName=e}function nr(){}function ir(e){this.tagName=e}function rr(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function or(e,t,n){rr.call(this,e,t),this.serialization=n}function ar(){this.value="",this.write=function(e){this.value+=e}}function sr(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 cr(e){return e=L({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new ar,r=new sr(i,e.format);e.preamble&&r.append('<?xml version="1.0" encoding="UTF-8"?>\n');var o=new rr,a=t.$model;if(o.getNamespaces().mapDefaultPrefixes(function(e){const t=e.config&&e.config.nsMap||{},n={};for(const e in Ai)n[e]=Ai[e];for(const e in t){n[t[e]]=e}for(const t of e.getPackages())n[t.prefix]=t.uri;return n}(a)),o.build(t).serializeTo(r),!n)return i.value}}}function pr(e,t){hi.call(this,e,t)}tr.prototype.build=function(e){return this.element=e,this},tr.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},nr.prototype.serializeValue=nr.prototype.serializeTo=function(e){e.append(this.escape?er(this.value,qi,Ji):this.value)},nr.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(qi)&&(this.escape=!0),this},Xi(ir,nr),ir.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},rr.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,o=i.isGeneric;return t=o?this.parseGenericNsAttributes(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),o?this.parseGenericContainments(e):(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 i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.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},rr.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?L({localName:t.ns.localName},e):L({localName:Yi(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},rr.prototype.nsPropertyTagName=function(e){return function(e,t){return L({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},rr.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},rr.prototype.nsAttributeName=function(e){var t;if(t=d(e)?oi(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)},rr.prototype.parseGenericNsAttributes=function(e){return Object.entries(e).filter((([t,n])=>!t.startsWith("$")&&this.parseNsAttribute(e,t,n))).map((([e,t])=>({name:e,value:t})))},rr.prototype.parseGenericContainments=function(e){var t=e.$body;t&&this.body.push((new nr).build({type:"String"},t));var n=e.$children;n&&g(n,(e=>{this.body.push(new rr(this).build(e))}))},rr.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=oi(t);if("xmlns"===o.prefix&&(i={prefix:o.localName,uri:n}),o.prefix||"xmlns"!==o.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var a=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(a)}},rr.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,i=[];return g(n,(function(n,r){var o=t.parseNsAttribute(e,r,n);o&&i.push(o)})),i},rr.prototype.parseGenericAttributes=function(e,t){var n=this;g(t,(function(t){try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){"undefined"!=typeof console&&console.warn(`missing namespace information for <${t.name}=${t.value}> on`,e,n)}}))},rr.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;g(e,(function(e){var r=i.get(e.name),o=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new nr).build(e,r[0]));else if(ri(e.type))g(r,(function(i){n.push(new ir(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(o)g(r,(function(i){n.push(new tr(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var a=Ti(e);g(r,(function(i){var r;r=a?a===Mi?new rr(t,e):new or(t,e,a):new rr(t),n.push(r.build(i))}))}}))},rr.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new Ki(t):n=t),n},rr.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,o=e.prefix;return i.byUri(r)&&!n||i.add(e,t),i.mapPrefix(o,r),e},rr.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.getNamespaces(t),a=e.prefix,s=e.uri;if(!a&&!s)return{localName:e.localName};if(r=o.defaultUriByPrefix(a),!(s=s||r||o.uriByPrefix(a)))throw new Error("no namespace uri given for prefix <"+a+">");if((e=o.byUri(s))||a||(e=this.logNamespace({uri:s},r===s,!0)),!e){for(n=a,i=1;o.uriByPrefix(n);)n=a+"_"+i++;e=this.logNamespace({prefix:n,uri:s},r===s)}return a&&o.mapPrefix(a,s),e},rr.prototype.parseAttributes=function(e){var t=this,n=this.element;g(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];g(i,(function(e){r.push(e.id)})),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},rr.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),Zi(e)},rr.prototype.addAttribute=function(e,t){var n=this.attrs;d(t)&&(t=er(t,Ui,Qi));var i=v(n,(function(t){return t.name.localName===e.localName&&t.name.uri===e.uri&&t.name.prefix===e.prefix})),r={name:e,value:t};-1!==i?n.splice(i,1,r):n.push(r)},rr.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)),g(t,(function(t){e.append(" ").append(Zi(t.name)).append('="').append(t.value).append('"')}))},rr.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==nr;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),g(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},Xi(or,rr),or.prototype.parseNsAttributes=function(e){var t=rr.prototype.parseNsAttributes.call(this,e).filter((e=>e.name!==this.serialization)),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),o=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(this.serialization),(i.prefix?i.prefix+":":"")+o+n.ns.localName),t},or.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},pr.prototype=Object.create(hi.prototype),pr.prototype.fromXML=function(e,t,n){d(t)||(n=t,t="bpmn:Definitions");var i=new Wi(L({model:this,lax:!0},n)),r=i.handler(t);return i.fromXML(e,r)},pr.prototype.toXML=function(e,t){var n=new cr(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(e){return i(e)}}))};const lr={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 ur(e,t){return new pr(L({},lr,e),t)}function hr(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function dr(e){f(e,"di")||Object.defineProperty(e,"di",{enumerable:!1,get:function(){throw new Error("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 fr(e,t){return e.$instanceOf(t)}function mr(e){var t={},n=[],i={};function r(e,t){return function(n){e(n,t)}}function o(e){t[e.id]=e}function a(t,n){try{var r=i[t.id]&&function(t,n){if(t.gfx)throw new Error(`already rendered ${hr(t)}`);return e.element(t,i[t.id],n)}(t,n);return o(t),r}catch(e){s(e.message,{element:t,error:e}),console.error(`failed to import ${hr(t)}`,e)}}function s(t,n){e.error(t,n)}var c=this.registerDi=function(e){var t=e.bpmnElement;t?i[t.id]?s(`multiple DI elements defined for ${hr(t)}`,{element:t}):(i[t.id]=e,dr(t)):s(`no bpmnElement referenced in ${hr(e)}`,{element:e})};function p(e){var t;t=e.plane,c(t),g(t.planeElement,l)}function l(e){c(e)}this.handleDefinitions=function(o,a){var l=o.diagrams;if(a&&-1===l.indexOf(a))throw new Error("diagram not part of <bpmn:Definitions />");if(!a&&l&&l.length&&(a=l[0]),!a)throw new Error("no diagram to display");i={},p(a);var f=a.plane;if(!f)throw new Error(`no plane for ${hr(a)}`);var v=f.bpmnElement;if(!v){if(v=function(e){return m(e.rootElements,(function(e){return fr(e,"bpmn:Process")||fr(e,"bpmn:Collaboration")}))}(o),!v)throw new Error("no process or collaboration to display");s(`correcting missing bpmnElement on ${hr(f)} to ${hr(v)}`),f.bpmnElement=v,c(f)}var b,_,w=function(t,n){return e.root(t,i[t.id],n)}(v,f);if(fr(v,"bpmn:Process")||fr(v,"bpmn:SubProcess"))h(v,w);else{if(!fr(v,"bpmn:Collaboration"))throw new Error(`unsupported bpmnElement for ${hr(f)}: ${hr(v)}`);_=w,g((b=v).participants,r(A,_)),x(b.artifacts,_),n.push((function(){!function(e,t){g(e,r(d,t))}(b.messageFlows,_)})),function(e,n){var i=y(e,(function(e){return!t[e.id]&&fr(e,"bpmn:Process")&&e.laneSets}));i.forEach(r(h,n))}(o.rootElements,w)}u(n)};var u=this.handleDeferred=function(){for(;n.length;)n.shift()()};function h(e,t){P(e,t),w(e.ioSpecification,t),x(e.artifacts,t),o(e)}function d(e,t){a(e,t)}function f(e,t){a(e,t)}function v(e,t){a(e,t)}function b(e,t){a(e,t)}function _(e,t){a(e,t)}function x(e,t){g(e,(function(e){fr(e,"bpmn:Association")?n.push((function(){_(e,t)})):_(e,t)}))}function w(e,t){e&&(g(e.dataInputs,r(v,t)),g(e.dataOutputs,r(b,t)))}var E=this.handleSubProcess=function(e,t){P(e,t),x(e.artifacts,t)};function S(e,t){var i=a(e,t);fr(e,"bpmn:SubProcess")&&E(e,i||t),fr(e,"bpmn:Activity")&&w(e.ioSpecification,t),n.push((function(){g(e.dataInputAssociations,r(f,t)),g(e.dataOutputAssociations,r(f,t))}))}function C(e,t){a(e,t)}function k(e,t){n.push((function(){var n=a(e,t);e.childLaneSet&&R(e.childLaneSet,n||t),function(e){g(e.flowNodeRef,(function(t){var n=t.get("lanes");n&&n.push(e)}))}(e)}))}function R(e,t){g(e.lanes,r(k,t))}function P(e,t){!function(e,t){g(e,(function(e){fr(e,"bpmn:SequenceFlow")?n.push((function(){!function(e,t){a(e,t)}(e,t)})):fr(e,"bpmn:BoundaryEvent")?n.unshift((function(){S(e,t)})):fr(e,"bpmn:FlowNode")?S(e,t):fr(e,"bpmn:DataObject")||(fr(e,"bpmn:DataStoreReference")||fr(e,"bpmn:DataObjectReference")?C(e,t):s(`unrecognized flowElement ${hr(e)} in context ${hr(t&&t.businessObject)}`,{element:e,context:t}))}))}(e.flowElements,t),e.laneSets&&function(e,t){g(e,r(R,t))}(e.laneSets,t)}function A(e,t){var n=a(e,t),i=e.processRef;i&&h(i,n||t)}}function vr(e,t){var n=gr(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function yr(e,t){return w(t,(function(t){return vr(e,t)}))}function gr(e){return e&&e.businessObject||e}function br(e){return e&&e.di}function _r(e,t,n){var i,r,o,a=[];function s(e,t){var n=new mr({root:function(e,t){return i.add(e,t)},element:function(e,t,n){return i.add(e,t,n)},error:function(e,t){a.push({message:e,context:t})}});t=t||e.diagrams&&e.diagrams[0];var r=function(e,t){if(!t||!t.plane)return;var n,i=t.plane.bpmnElement,r=i;vr(i,"bpmn:Process")||vr(i,"bpmn:Collaboration")||(r=function(e){var t=e;for(;t;){if(vr(t,"bpmn:Process"))return t;t=t.$parent}} method in mr
/plugin/bpmnio/vendor/dmn-js/dist/
H A Ddmn-viewer.production.min.js2 !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).DmnJS=t()}(this,(function(){"use strict";const e=Object.prototype.toString,t=Object.prototype.hasOwnProperty;function n(e){return void 0!==e}function i(t){return"[object Array]"===e.call(t)}function r(t){return"[object Object]"===e.call(t)}function o(t){return"[object Number]"===e.call(t)}function s(t){const n=e.call(t);return"[object Function]"===n||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n}function a(t){return"[object String]"===e.call(t)}function l(e,n){return!(null==e)&&t.call(e,n)}function c(e,t){const n=g(t);let i;return u(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function h(e,t){const n=g(t);let i=[];return u(e,(function(e,t){n(e,t)&&i.push(e)})),i}function u(e,t){let n,r;if(void 0===e)return;const o=i(e)?y:m;for(let i in e)if(l(e,i)&&(n=e[i],r=t(n,o(i)),!1===r))return n}function d(e,t,n){return u(e,(function(e,i){n=t(n,e,i)})),n}function p(e,t){return!!d(e,(function(e,n,i){return e&&t(n,i)}),!0)}function f(e){return function(t){return p(e,(function(e,n){return t[n]===e}))}}function g(e){return s(e)?e:t=>t===e}function m(e){return e}function y(e){return Number(e)}function v(e,t){let n,i,r,o;function s(n){let s=Date.now(),c=n?0:o+t-s;if(c>0)return a(c);e.apply(r,i),l()}function a(e){n=setTimeout(s,e)}function l(){n&&clearTimeout(n),n=o=i=r=void 0}function c(...e){o=Date.now(),i=e,r=this,n||a(t)}return c.flush=function(){n&&s(!0),l()},c.cancel=l,c}function w(e,t){return e.bind(t)}function b(e,...t){return Object.assign(e,...t)}var x="__fn",k=Array.prototype.slice;function _(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function S(){}_.prototype.on=function(e,t,n,r){if(e=i(e)?e:[e],s(t)&&(r=n,n=t,t=1e3),!o(t))throw new Error("priority must be a number");var a=n;r&&((a=w(n,r))[x]=n[x]||n);var l=this;e.forEach((function(e){l._addListener(e,{priority:t,callback:a,next:null})}))},_.prototype.once=function(e,t,n,i){var r=this;if(s(t)&&(i=n,n=t,t=1e3),!o(t))throw new Error("priority must be a number");function a(){a.__isTomb=!0;var t=n.apply(i,arguments);return r.off(e,a),t}a[x]=n,this.on(e,t,a)},_.prototype.off=function(e,t){e=i(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},_.prototype.createEvent=function(e){var t=new S;return t.init(e),t},_.prototype.fire=function(e,t){var n,i,r,o;if(o=k.call(arguments),"object"==typeof e&&(e=(t=e).type),!e)throw new Error("no event type specified");if(i=this._listeners[e]){n=t instanceof S?t:this.createEvent(t),o[0]=n;var s=n.type;e!==s&&(n.type=e);try{r=this._invokeListeners(n,o,i)}finally{e!==s&&(n.type=s)}return void 0===r&&n.defaultPrevented&&(r=!1),r}},_.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},_.prototype._destroy=function(){this._listeners={}},_.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},_.prototype._invokeListener=function(e,t,n){var i;if(n.callback.__isTomb)return i;try{i=function(e,t){return e.apply(null,t)}(n.callback,t),void 0!==i&&(e.returnValue=i,e.stopPropagation()),!1===i&&e.preventDefault()}catch(e){if(!this.handleError(e))throw console.error("unhandled error in event listener",e),e}return i},_.prototype._addListener=function(e,t){var n,i=this._getListeners(e);if(i){for(;i;){if(i.priority<t.priority)return t.next=i,void(n?n.next=t:this._setListeners(e,t));n=i,i=i.next}n.next=t}else this._setListeners(e,t)},_.prototype._getListeners=function(e){return this._listeners[e]},_.prototype._setListeners=function(e,t){this._listeners[e]=t},_.prototype._removeListener=function(e,t){var n,i,r,o=this._getListeners(e);if(t)for(;o;)n=o.next,(r=o.callback)!==t&&r[x]!==t||(i?i.next=n:this._setListeners(e,n)),i=o,o=n;else this._setListeners(e,null)},S.prototype.stopPropagation=function(){this.cancelBubble=!0},S.prototype.preventDefault=function(){this.defaultPrevented=!0},S.prototype.init=function(e){b(this,e||{})};var C=Object.prototype.toString;function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},E.apply(this,arguments)}function M(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return E.apply(void 0,[e].concat(n))}var A=Object.prototype.toString,D=Object.prototype.hasOwnProperty;function R(e){return"[object String]"===A.call(e)}function O(e,t){return D.call(e,t)}function T(e,t){var n;if(void 0!==e){var i=function(e){return"[object Array]"===A.call(e)}(e)?P:N;for(var r in e)if(O(e,r)&&!1===t(n=e[r],i(r)))return n}}function N(e){return e}function P(e){return Number(e)}function q(e,t){return e.bind(t)}function B(){return B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},B.apply(this,arguments)}function L(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return B.apply(void 0,[e].concat(n))}function I(){}function F(e,t){this.model=e,this.properties=t}I.prototype.get=function(e){return this.$model.properties.get(this,e)},I.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},F.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(I.prototype);T(e.properties,(function(e){e.isMany||void 0===e.default||(i[e.name]=e.default)})),n.defineModel(i,t),n.defineDescriptor(i,e);var r=e.ns.name;function o(e){n.define(this,"$type",{value:r,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),T(e,q((function(e,t){this.set(t,e)}),this))}return o.prototype=i,o.hasType=i.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var j={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},V={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 $(e,t){var n=V[e];return n?n(t):t}function z(e){return!!j[e]}function H(e){return!!V[e]}function W(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function U(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function G(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,T(e,q(this.registerPackage,this))}function K(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function X(e){this.model=e}function Y(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function J(e){this.properties=new X(this),this.factory=new F(this,this.properties),this.registry=new G(e,this.properties),this.typeCache={}}U.prototype.build=function(){return e=this,t=["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"],n={},i=Object(e),T(t,(function(t){t in i&&(n[t]=e[t])})),n;var e,t,n,i},U.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},U.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=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=r.indexOf(e);if(-1===a)throw new Error("property <"+i.name+"> not found in property list");r.splice(a,1),this.addProperty(t,n?void 0:a,s),o[i.name]=o[i.localName]=t},U.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=W(r[0],i),s=W(r[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},U.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},U.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},U.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},U.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},U.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},U.prototype.hasProperty=function(e){return this.propertiesByName[e]},U.prototype.addTrait=function(e,t){var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(T(e.properties,q((function(n){n=L({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var i=n.replaces,r=n.redefines;i||r?this.redefineProperty(n,i||r,i):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))}),this)),i.push(e),n[r]=e)},G.prototype.getPackage=function(e){return this.packageMap[e]},G.prototype.getPackages=function(){return this.packages},G.prototype.registerPackage=function(e){e=L({},e);var t=this.packageMap;K(t,e,"prefix"),K(t,e,"uri"),T(e.types,q((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},G.prototype.registerType=function(e,t){var n=W((e=L({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:L(e.meta||{})})).name,t.prefix),i=n.name,r={};T(e.properties,q((function(e){var t=W(e.name,n.prefix),i=t.name;z(e.type)||(e.type=W(e.type,t.prefix).name),L(e,{ns:t,name:i}),r[i]=e}),this)),L(e,{ns:n,name:i,propertiesByName:r}),T(e.extends,q((function(e){var t=this.typeMap[e];t.traits=t.traits||[],t.traits.push(i)}),this)),this.definePackage(e,t),this.typeMap[i]=e},G.prototype.mapTypes=function(e,t,n){var i=z(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(e){return s(e,!0)}function s(n,i){var o=W(n,z(n)?"":e.prefix);r.mapTypes(o,t,i)}if(!i)throw new Error("unknown type <"+e.name+">");T(i.superClass,n?o:s),t(i,!n),T(i.traits,o)},G.prototype.getEffectiveDescriptor=function(e){var t=W(e),n=new U(t);this.mapTypes(t,(function(e,t){n.addTrait(e,t)}));var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},G.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},X.prototype.set=function(e,t,n){if(!R(t)||!t.length)throw new TypeError("property name must be a non-empty string");var i=this.model.getPropertyDescriptor(e,t),r=i&&i.name;void 0===n?i?delete e[r]:delete e.$attrs[t]:i?r in e?e[r]=n:Y(e,i,n):e.$attrs[t]=n},X.prototype.get=function(e,t){var n=this.model.getPropertyDescriptor(e,t);if(!n)return e.$attrs[t];var i=n.name;return!e[i]&&n.isMany&&Y(e,n,[]),e[i]},X.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;delete(n=L({},n,{get:function(){return i}})).value}Object.defineProperty(e,t,n)},X.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},X.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},J.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},J.prototype.getType=function(e){var t=this.typeCache,n=R(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},J.prototype.createAny=function(e,t,n){var i=W(e),r={$type:e,$instanceOf:function(e){return e===this.$type}},o={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};return this.properties.defineDescriptor(r,o),this.properties.defineModel(r,this),this.properties.define(r,"$parent",{enumerable:!1,writable:!0}),this.properties.define(r,"$instanceOf",{enumerable:!1,writable:!0}),T(n,(function(e,t){var n;n=e,"[object Object]"===A.call(n)&&void 0!==e.value?r[e.name]=e.value:r[t]=e})),r},J.prototype.getPackage=function(e){return this.registry.getPackage(e)},J.prototype.getPackages=function(){return this.registry.getPackages()},J.prototype.getElementDescriptor=function(e){return e.$descriptor},J.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},J.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},J.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var Q=Object.prototype.toString,Z=Object.prototype.hasOwnProperty;function ee(e){return"[object Array]"===Q.call(e)}function te(e){return"[object String]"===Q.call(e)}function ne(e,t){return Z.call(e,t)}function ie(e,t){var n;return t=se(t),oe(e,(function(e,i){if(t(e,i))return n=e,!1})),n}function re(e,t){var n=[];return oe(e,(function(e,i){t(e,i)&&n.push(e)})),n}function oe(e,t){var n;if(void 0!==e){var i=ee(e)?le:ae;for(var r in e)if(ne(e,r)&&!1===t(n=e[r],i(r)))return n}}function se(e){return t=e,"[object Function]"===(n=Q.call(t))||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n?e:function(t){return t===e};var t,n}function ae(e){return e}function le(e){return Number(e)}function ce(){return ce=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ce.apply(this,arguments)}function he(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return ce.apply(void 0,[e].concat(n))}var ue=String.fromCharCode,de=Object.prototype.hasOwnProperty,pe=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,fe={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function ge(e,t,n,i){return i?de.call(fe,i)?fe[i]:"&"+i+";":ue(t||parseInt(n,16))}function me(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(pe,ge):e}Object.keys(fe).forEach((function(e){fe[e.toUpperCase()]=fe[e]}));var ye="xsi:type",ve="non-whitespace outside of root node";function we(e){return new Error(e)}function be(e){return"missing namespace for prefix <"+e+">"}function xe(e){return{get:e,enumerable:!0}}function ke(e){var t,n={};for(t in e)n[t]=e[t];return n}function _e(e){return e+"$uri"}function Se(){return{line:0,column:0}}function Ce(e){throw e}function Ee(e){if(!this)return new Ee(e);var t,n,i,r,o,s,a,l,c,h=e&&e.proxy,u=Ce,d=Se,p=!1,f=!1,g=null,m=!1;function y(e){e instanceof Error||(e=we(e)),g=e,u(e,d)}function v(e){o&&(e instanceof Error||(e=we(e)),o(e,d))}this.on=function(e,c){if("function"!=typeof c)throw we("required args <name, cb>");switch(e){case"openTag":n=c;break;case"text":t=c;break;case"closeTag":i=c;break;case"error":u=c;break;case"warn":o=c;break;case"cdata":r=c;break;case"attention":l=c;break;case"question":a=c;break;case"comment":s=c;break;default:throw we("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw we("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 we("required args <xml=string>");return g=null,function(e){var o,u,g,w,b,x,k,_,S,C,E,M=f?[]:null,A=f?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[_e(n)]=t;return i}(c):null,D=[],R=0,O=!1,T=!1,N=0,P=0,q="",B=0;function L(){if(null!==E)return E;var e,t,n,i,r,o,s,a,l,h,u,d=f&&A.xmlns,g=f&&p?[]:null,m=B,y=q,w=y.length,b={},x={};e:for(;m<w;m++)if(l=!1,!(32===(h=y.charCodeAt(m))||h<14&&h>8)){for((h<65||h>122||h>90&&h<97)&&95!==h&&58!==h&&(v("illegal first char attribute name"),l=!0),u=m+1;u<w;u++)if(!((h=y.charCodeAt(u))>96&&h<123||h>64&&h<91||h>47&&h<59||46===h||45===h||95===h)){if(32===h||h<14&&h>8){v("missing attribute value"),m=u;continue e}if(61===h)break;v("illegal attribute name char"),l=!0}if("xmlns:xmlns"===(a=y.substring(m,u))&&(v("illegal declaration of xmlns"),l=!0),34===(h=y.charCodeAt(u+1)))-1===(u=y.indexOf('"',m=u+2))&&-1!==(u=y.indexOf("'",m))&&(v("attribute value quote missmatch"),l=!0);else if(39===h)-1===(u=y.indexOf("'",m=u+2))&&-1!==(u=y.indexOf('"',m))&&(v("attribute value quote missmatch"),l=!0);else for(v("missing attribute value quotes"),l=!0,u+=1;u<w&&!(32===(h=y.charCodeAt(u+1))||h<14&&h>8);u++);for(-1===u&&(v("missing closing quotes"),u=w,l=!0),l||(o=y.substring(m,u)),m=u;u+1<w&&!(32===(h=y.charCodeAt(u+1))||h<14&&h>8);u++)m===u&&(v("illegal character after attribute end"),l=!0);if(m=u+1,!l)if(a in x)v("attribute <"+a+"> already defined");else if(x[a]=!0,f)if(p){if(null!==(r="xmlns"===a?"xmlns":120===a.charCodeAt(0)&&"xmlns:"===a.substr(0,6)?a.substr(6):null)){if(e=me(o),t=_e(r),!(s=c[e])){if("xmlns"===r||t in A&&A[t]!==e)do{s="ns"+R++}while(void 0!==A[s]);else s=r;c[e]=s}A[r]!==s&&(i||(A=ke(A),i=!0),A[r]=s,"xmlns"===r&&(A[_e(s)]=e,d=s),A[t]=e),b[a]=o;continue}g.push(a,o)}else-1!==(h=a.indexOf(":"))?(n=A[a.substring(0,h)])?((a=d===n?a.substr(h+1):n+a.substr(h))===ye&&(-1!==(h=o.indexOf(":"))?(n=o.substring(0,h),o=(n=A[n]||n)+o.substring(h)):o=d+":"+o),b[a]=o):v(be(a.substring(0,h))):b[a]=o;else b[a]=o}if(p)for(m=0,w=g.length;m<w;m++){if(a=g[m++],o=g[m],-1!==(h=a.indexOf(":"))){if(!(n=A[a.substring(0,h)])){v(be(a.substring(0,h)));continue}(a=d===n?a.substr(h+1):n+a.substr(h))===ye&&(-1!==(h=o.indexOf(":"))?(n=o.substring(0,h),o=(n=A[n]||n)+o.substring(h)):o=d+":"+o)}b[a]=o}return E=b}function I(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,o=0,s=0,a=P;N>=s&&(t=i.exec(e))&&!((a=t[0].length+t.index)>N);)r+=1,s=a;return-1==N?(o=a,n=e.substring(P)):0===P?n=e.substring(P,N):(o=N-s,n=-1==P?e.substring(N):e.substring(N,P+1)),{data:n,line:r,column:o}}d=I,h&&(C=Object.create({},{name:xe((function(){return _})),originalName:xe((function(){return S})),attrs:xe(L),ns:xe((function(){return A}))}));for(;-1!==P;){if(-1===(N=60===e.charCodeAt(P)?P:e.indexOf("<",P)))return D.length?y("unexpected end of file"):0===P?y("missing start tag"):void(P<e.length&&e.substring(P).trim()&&v(ve));if(P!==N)if(D.length){if(t&&(t(e.substring(P,N),me,d),m))return}else if(e.substring(P,N).trim()&&(v(ve),m))return;if(33===(b=e.charCodeAt(N+1))){if(91===(w=e.charCodeAt(N+2))&&"CDATA["===e.substr(N+3,6)){if(-1===(P=e.indexOf("]]>",N)))return y("unclosed cdata");if(r&&(r(e.substring(N+9,P),d),m))return;P+=3;continue}if(45===w&&45===e.charCodeAt(N+3)){if(-1===(P=e.indexOf("--\x3e",N)))return y("unclosed comment");if(s&&(s(e.substring(N+4,P),me,d),m))return;P+=3;continue}}if(63!==b){for(u=N+1;;u++){if(x=e.charCodeAt(u),isNaN(x))return P=-1,y("unclosed tag");if(34===x)u=-1!==(w=e.indexOf('"',u+1))?w:u;else if(39===x)u=-1!==(w=e.indexOf("'",u+1))?w:u;else if(62===x){P=u;break}}if(33!==b){if(E={},47===b){if(O=!1,T=!0,!D.length)return y("missing open tag");if(u=_=D.pop(),w=N+2+u.length,e.substring(N+2,w)!==u)return y("closing tag mismatch");for(;w<P;w++)if(!(32===(b=e.charCodeAt(w))||b>8&&b<14))return y("close tag")}else{if(47===e.charCodeAt(P-1)?(u=_=e.substring(N+1,P-1),O=!0,T=!0):(u=_=e.substring(N+1,P),O=!0,T=!1),!(b>96&&b<123||b>64&&b<91||95===b||58===b))return y("illegal first char nodeName");for(w=1,g=u.length;w<g;w++)if(!((b=u.charCodeAt(w))>96&&b<123||b>64&&b<91||b>47&&b<59||45===b||95===b||46==b)){if(32===b||b<14&&b>8){_=u.substring(0,w),E=null;break}return y("invalid nodeName")}T||D.push(_)}if(f){if(o=A,O&&(T||M.push(o),null===E&&(p=-1!==u.indexOf("xmlns",w))&&(B=w,q=u,L(),p=!1)),S=_,-1!==(b=_.indexOf(":"))){if(!(k=A[_.substring(0,b)]))return y("missing namespace on <"+S+">");_=_.substr(b+1)}else k=A.xmlns;k&&(_=k+":"+_)}if(O&&(B=w,q=u,n&&(h?n(C,me,T,d):n(_,L,me,T,d),m)))return;if(T){if(i&&(i(h?C:_,me,O,d),m))return;f&&(A=O?o:M.pop())}P+=1}else{if(l&&(l(e.substring(N,P+1),me,d),m))return;P+=1}}else{if(-1===(P=e.indexOf("?>",N)))return y("unclosed question");if(a&&(a(e.substring(N,P+2),d),m))return;P+=2}}}(e),d=Se,m=!1,g},this.stop=function(){m=!0}}function Me(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var Ae={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},De="xsi:type";function Re(e){return e.xml&&e.xml.serialize}function Oe(e){return Re(e)===De}function Te(e,t){return Me(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function Ne(e){return new Error(e)}function Pe(e){return e.$descriptor}function qe(e){he(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw Ne("expected element");var t,n=this.elementsById,i=Pe(e).idProperty;if(i&&(t=e.get(i.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw Ne("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function Be(){}function Le(){}function Ie(){}function Fe(e,t){this.property=e,this.context=t}function je(e,t){this.element=t,this.propertyDesc=e}function Ve(){}function $e(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function ze(e,t,n){$e.call(this,e,t,n)}function He(e,t,n){this.model=e,this.context=n}function We(e){e instanceof J&&(e={model:e}),he(this,{lax:!1},e)}Be.prototype.handleEnd=function(){},Be.prototype.handleText=function(){},Be.prototype.handleNode=function(){},Le.prototype=Object.create(Be.prototype),Le.prototype.handleNode=function(){return this},Ie.prototype=Object.create(Be.prototype),Ie.prototype.handleText=function(e){this.body=(this.body||"")+e},Fe.prototype=Object.create(Ie.prototype),Fe.prototype.handleNode=function(e){if(this.element)throw Ne("expected no sub nodes");return this.element=this.createReference(e),this},Fe.prototype.handleEnd=function(){this.element.id=this.body},Fe.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},je.prototype=Object.create(Ie.prototype),je.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=$(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},Ve.prototype=Object.create(Ie.prototype),Ve.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},$e.prototype=Object.create(Ve.prototype),$e.prototype.addReference=function(e){this.context.addReference(e)},$e.prototype.handleText=function(e){if(!Pe(this.element).bodyProperty)throw Ne("unexpected body text <"+e+">");Ie.prototype.handleText.call(this,e)},$e.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Pe(t).bodyProperty;n&&void 0!==e&&(e=$(n.type,e),t.set(n.name,e))},$e.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=Pe(i),o=this.context,s=new i({}),a=this.model;return oe(n,(function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?oe(e.split(" "),(function(e){o.addReference({element:s,property:i.ns.name,id:e})})):o.addReference({element:s,property:i.ns.name,id:e}):(i?e=$(i.type,e):"xmlns"!==n&&(t=W(n,r.ns.prefix),a.getPackage(t.prefix)&&o.addWarning({message:"unknown attribute <"+n+">",element:s,property:n,value:e})),s.set(n,e))})),s},$e.prototype.getPropertyForNode=function(e){var t,n,i=W(e.name),r=this.type,o=this.model,s=Pe(r),a=i.name,l=s.propertiesByName[a];if(l&&!l.isAttr)return Oe(l)&&(t=e.attributes[De])?(t=function(e,t){var n=W(e);return function(e,t){var n=e.name,i=e.localName,r=t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(n,t.getPackage(n.prefix))}(t,o),he({},l,{effectiveType:Pe(n=o.getType(t)).name})):l;var c=o.getPackage(i.prefix);if(c){if(t=Te(i,c),n=o.getType(t),l=ie(s.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})))return he({},l,{effectiveType:Pe(n).name})}else if(l=ie(s.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})))return l;throw Ne("unrecognized element <"+i.name+">")},$e.prototype.toString=function(){return"ElementDescriptor["+Pe(this.type).name+"]"},$e.prototype.valueHandler=function(e,t){return new je(e,t)},$e.prototype.referenceHandler=function(e){return new Fe(e,this.context)},$e.prototype.handler=function(e){return"Element"===e?new He(this.model,e,this.context):new $e(this.model,e,this.context)},$e.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,H(n=t.effectiveType||t.type))return this.valueHandler(t,i);var o=(r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==o&&(t.isMany?i.get(t.name).push(o):i.set(t.name,o),t.isReference?(he(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},ze.prototype=Object.create($e.prototype),ze.prototype.createElement=function(e){var t=e.name,n=W(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),s=o&&Te(n,o)||t;if(!r.hasType(s))throw Ne("unexpected element <"+e.originalName+">");return $e.prototype.createElement.call(this,e)},He.prototype=Object.create(Ve.prototype),He.prototype.createElement=function(e){var t=e.name,n=W(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},He.prototype.handleChild=function(e){var t=new He(this.model,"Element",this.context).handleNode(e),n=this.element,i=t.element;return void 0!==i&&((n.$children=n.$children||[]).push(i),i.$parent=n),t},He.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},We.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof $e?(i=t,t={}):"string"==typeof t?(i=this.handler(t),t={}):"string"==typeof i&&(i=this.handler(i));var r=this.model,o=this.lax,s=new qe(he({},t,{rootHandler:i})),a=new Ee({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 i=t(),r=i.line,o=i.column,a=i.data;"<"===a.charAt(0)&&-1!==a.indexOf(" ")&&(a=a.slice(0,a.indexOf(" "))+">");var l="unparsable content "+(a?a+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return s.addWarning({message:l,error:e}),!0;throw Ne(l)}function h(e,t){return c(e,t,!0)}i.context=s,l.push(i);var u=/^<\?xml /i,d=/ encoding="([^"]+)"/i,p=/^utf-8$/i;function f(e,t){try{l.peek().handleText(e)}catch(e){h(e,t)}}var g=r.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),{"http://www.w3.org/XML/1998/namespace":"xml"});return a.ns(g).on("openTag",(function(e,t,n,i){var r=e.attrs||{},s=Object.keys(r).reduce((function(e,n){var i=t(r[n]);return e[n]=i,e}),{});!function(e,t){var n=l.peek();try{l.push(n.handleNode(e))}catch(e){c(e,t,o)&&l.push(new Le)}}({name:e.name,originalName:e.originalName,attributes:s,ns:e.ns},i)})).on("question",(function(e){if(u.test(e)){var t=d.exec(e),n=t&&t[1];n&&!p.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",h),new Promise((function(t,n){var r;try{a.parse(e),function(){var e,t,n=s.elementsById,i=s.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],a=Pe(r).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=r.get(a.name),c=l.indexOf(t);-1===c&&(c=l.length),o?l[c]=o:l.splice(c,1)}else r.set(a.name,o)}}()}catch(e){r=e}var o=i.element;r||o||(r=Ne("failed to parse document as <"+i.type.$descriptor.name+">"));var l=s.warnings,c=s.references,h=s.elementsById;return r?(r.warnings=l,n(r)):t({rootElement:o,elementsById:h,references:c,warnings:l})}))},We.prototype.handler=function(e){return new ze(this.model,e)};var Ue=/<|>|'|"|&|\n\r|\n/g,Ge=/<|>|&/g;function Ke(e){var t={},n={},i={},r=[],o=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?r.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,r=this.getNSKey(t);i[r]=this.byUri(n),e&&e.logUsed(t)},this.getUsed=function(e){var t=this;return[].concat(r,o).filter((function(e){var n=t.getNSKey(e);return i[n]}))}}function Xe(e,t){return Me(t)?function(e){return e.charAt(0).toLowerCase()+e.slice(1)}(e):e}function Ye(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function Je(e){return te(e)?e:(e.prefix?e.prefix+":":"")+e.localName}var Qe={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Ze={"<":"lt",">":"gt","&":"amp"};function et(e,t,n){return(e=te(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function tt(e){this.tagName=e}function nt(){}function it(e){this.tagName=e}function rt(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function ot(e,t){rt.call(this,e,t)}function st(){this.value="",this.write=function(e){this.value+=e}}function at(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 lt(e){return e=he({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new st,r=new at(i,e.format);if(e.preamble&&r.append('<?xml version="1.0" encoding="UTF-8"?>\n'),(new rt).build(t).serializeTo(r),!n)return i.value}}}function ct(e,t){J.call(this,e,t)}tt.prototype.build=function(e){return this.element=e,this},tt.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},nt.prototype.serializeValue=nt.prototype.serializeTo=function(e){e.append(this.escape?et(this.value,Ge,Ze):this.value)},nt.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(Ge)&&(this.escape=!0),this},Ye(it,nt),it.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},rt.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,o=i.isGeneric;return t=o?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),o||(n=function(e){return re(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!ne(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)}))}(e),this.parseAttributes(re(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return re(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},rt.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?he({localName:t.ns.localName},e):he({localName:Xe(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},rt.prototype.nsPropertyTagName=function(e){return function(e,t){return he({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},rt.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},rt.prototype.nsAttributeName=function(e){var t;if(t=te(e)?W(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}:he({localName:t.localName},n)},rt.prototype.parseGeneric=function(e){var t=this,n=this.body,i=[];return oe(e,(function(r,o){"$body"===o?n.push((new nt).build({type:"String"},r)):"$children"===o?oe(r,(function(e){n.push(new rt(t).build(e))})):0!==o.indexOf("$")&&t.parseNsAttribute(e,o,r)&&i.push({name:o,value:r})})),i},rt.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=W(t);if("xmlns"===o.prefix&&(i={prefix:o.localName,uri:n}),o.prefix||"xmlns"!==o.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var s=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(s)}},rt.prototype.parseNsAttributes=function(e,t){var n=this,i=e.$attrs,r=[];return oe(i,(function(t,i){var o=n.parseNsAttribute(e,i,t);o&&r.push(o)})),r},rt.prototype.parseGenericAttributes=function(e,t){var n=this;oe(t,(function(t){if(t.name!==De)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,n)}}))},rt.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;oe(e,(function(e){var r=i.get(e.name),o=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new nt).build(e,r[0]));else if(H(e.type))oe(r,(function(i){n.push(new it(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(o)oe(r,(function(i){n.push(new tt(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var s=Oe(e),a=function(e){return"property"===Re(e)}(e);oe(r,(function(i){var r;r=s?new ot(t,e):a?new rt(t,e):new rt(t),n.push(r.build(i))}))}}))},rt.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new Ke(t):n=t),n},rt.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,o=e.prefix;return i.byUri(r)&&!n||i.add(e,t),i.mapPrefix(o,r),e},rt.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.element.$model,s=this.getNamespaces(t),a=e.prefix,l=e.uri;if(!a&&!l)return{localName:e.localName};if(r=Ae[a]||o&&(o.getPackage(a)||{}).uri,!(l=l||r||s.uriByPrefix(a)))throw new Error("no namespace uri given for prefix <"+a+">");if(!(e=s.byUri(l))){for(n=a,i=1;s.uriByPrefix(n);)n=a+"_"+i++;e=this.logNamespace({prefix:n,uri:l},r===l)}return a&&s.mapPrefix(a,l),e},rt.prototype.parseAttributes=function(e){var t=this,n=this.element;oe(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];oe(i,(function(e){r.push(e.id)})),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},rt.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),Je(e)},rt.prototype.addAttribute=function(e,t){var n=this.attrs;te(t)&&(t=et(t,Ue,Qe));var i=function(e,t){t=se(t);var n=ee(e)?-1:void 0;return oe(e,(function(e,i){if(t(e,i))return n=i,!1})),n}(n,(function(t){return t.name.localName===e.localName&&t.name.uri===e.uri&&t.name.prefix===e.prefix})),r={name:e,value:t};-1!==i?n.splice(i,1,r):n.push(r)},rt.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)),oe(t,(function(t){e.append(" ").append(Je(t.name)).append('="').append(t.value).append('"')}))},rt.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==nt;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),oe(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},Ye(ot,rt),ot.prototype.parseNsAttributes=function(e){var t=rt.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),o=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(De),(i.prefix?i.prefix+":":"")+o+n.ns.localName),t},ot.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},ct.prototype=Object.create(J.prototype),ct.prototype.fromXML=function(e,t,n){var i;i=t,"[object String]"!==C.call(i)&&(n=t,t="dmn:Definitions");var r=new We(M({model:this,lax:!0},n)),o=r.handler(t);return r.fromXML(e,o)},ct.prototype.toXML=function(e,t){var n=new lt(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(e){return i(e)}}))};var ht={dc:{name:"DC",prefix:"dc",uri:"http://www.omg.org/spec/DMN/20180521/DC/",types:[{name:"Dimension",properties:[{name:"width",isAttr:!0,type:"Real"},{name:"height",isAttr:!0,type:"Real"}]},{name:"Bounds",properties:[{name:"height",isAttr:!0,type:"Real"},{name:"width",isAttr:!0,type:"Real"},{name:"x",isAttr:!0,type:"Real"},{name:"y",isAttr:!0,type:"Real"}]},{name:"Point",properties:[{name:"x",isAttr:!0,type:"Real"},{name:"y",isAttr:!0,type:"Real"}]},{name:"Color",properties:[{name:"red",type:"UML_Standard_Profile.mdzip:eee_1045467100323_917313_65"},{name:"green",type:"UML_Standard_Profile.mdzip:eee_1045467100323_917313_65"},{name:"blue",type:"UML_Standard_Profile.mdzip:eee_1045467100323_917313_65"}]}],associations:[],enumerations:[{name:"AlignmentKind",literalValues:[{name:"start"},{name:"center"},{name:"end"}]}]},di:{name:"DI",prefix:"di",uri:"http://www.omg.org/spec/DMN/20180521/DI/",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"extension",type:"Extension"},{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"style",isReference:!0,type:"Style",xml:{serialize:"property"}},{name:"sharedStyle",isReference:!0,isVirtual:!0,type:"Style"}]},{name:"Diagram",superClass:["DiagramElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"}]},{name:"Shape",isAbstract:!0,properties:[{name:"bounds",type:"dc:Bounds"}],superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,properties:[{name:"waypoint",type:"dc:Point",isMany:!0,xml:{serialize:"property"}}],superClass:["DiagramElement"]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],associations:[],enumerations:[],xml:{tagAlias:"lowerCase"}},dmn:{name:"DMN",prefix:"dmn",uri:"https://www.omg.org/spec/DMN/20191111/MODEL/",types:[{name:"AuthorityRequirement",superClass:["DMNElement"],properties:[{name:"requiredAuthority",type:"DMNElementReference",xml:{serialize:"property"}},{name:"requiredDecision",type:"DMNElementReference",xml:{serialize:"property"}},{name:"requiredInput",type:"DMNElementReference",xml:{serialize:"property"}}]},{name:"ItemDefinition",superClass:["NamedElement"],properties:[{name:"typeRef",type:"String"},{name:"allowedValues",type:"UnaryTests",xml:{serialize:"property"}},{name:"typeLanguage",type:"String",isAttr:!0},{name:"itemComponent",type:"ItemDefinition",isMany:!0,xml:{serialize:"property"}},{name:"functionItem",type:"FunctionItem"},{name:"isCollection",isAttr:!0,type:"Boolean"}]},{name:"Definitions",superClass:["NamedElement"],properties:[{name:"import",type:"Import",isMany:!0},{name:"itemDefinition",type:"ItemDefinition",isMany:!0},{name:"drgElement",type:"DRGElement",isMany:!0},{name:"artifact",type:"Artifact",isMany:!0},{name:"elementCollection",type:"ElementCollection",isMany:!0},{name:"businessContextElement",type:"BusinessContextElement",isMany:!0},{name:"namespace",type:"String",isAttr:!0},{name:"expressionLanguage",type:"String",isAttr:!0},{name:"typeLanguage",type:"String",isAttr:!0},{name:"exporter",isAttr:!0,type:"String"},{name:"exporterVersion",isAttr:!0,type:"String"},{name:"dmnDI",type:"dmndi:DMNDI"}]},{name:"KnowledgeSource",superClass:["DRGElement"],properties:[{name:"authorityRequirement",type:"AuthorityRequirement",isMany:!0},{name:"type",type:"String"},{name:"owner",type:"DMNElementReference",xml:{serialize:"property"}},{name:"locationURI",type:"String",isAttr:!0}]},{name:"DecisionRule",superClass:["DMNElement"],properties:[{name:"inputEntry",type:"UnaryTests",isMany:!0,xml:{serialize:"property"}},{name:"outputEntry",type:"LiteralExpression",isMany:!0,xml:{serialize:"property"}},{name:"annotationEntry",type:"RuleAnnotation",isMany:!0,xml:{serialize:"property"}}]},{name:"Expression",isAbstract:!0,superClass:["DMNElement"],properties:[{name:"typeRef",isAttr:!0,type:"String"}]},{name:"InformationItem",superClass:["NamedElement"],properties:[{name:"typeRef",isAttr:!0,type:"String"}]},{name:"Decision",superClass:["DRGElement"],properties:[{name:"question",type:"String",xml:{serialize:"property"}},{name:"allowedAnswers",type:"String",xml:{serialize:"property"}},{name:"variable",type:"InformationItem",xml:{serialize:"property"}},{name:"informationRequirement",type:"InformationRequirement",isMany:!0},{name:"knowledgeRequirement",type:"KnowledgeRequirement",isMany:!0},{name:"authorityRequirement",type:"AuthorityRequirement",isMany:!0},{name:"supportedObjective",isMany:!0,type:"DMNElementReference",xml:{serialize:"property"}},{name:"impactedPerformanceIndicator",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"decisionMaker",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"decisionOwner",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"usingProcess",isMany:!0,type:"DMNElementReference",xml:{serialize:"property"}},{name:"usingTask",isMany:!0,type:"DMNElementReference",xml:{serialize:"property"}},{name:"decisionLogic",type:"Expression"}]},{name:"Invocation",superClass:["Expression"],properties:[{name:"calledFunction",type:"Expression"},{name:"binding",type:"Binding",isMany:!0}]},{name:"OrganisationalUnit",superClass:["BusinessContextElement"],properties:[{name:"decisionMade",type:"Decision",isReference:!0,isMany:!0},{name:"decisionOwned",type:"Decision",isReference:!0,isMany:!0}]},{name:"Import",superClass:["NamedElement"],properties:[{name:"importType",type:"String",isAttr:!0},{name:"locationURI",type:"String",isAttr:!0},{name:"namespace",type:"String",isAttr:!0}]},{name:"InformationRequirement",superClass:["DMNElement"],properties:[{name:"requiredDecision",type:"DMNElementReference",xml:{serialize:"property"}},{name:"requiredInput",type:"DMNElementReference",xml:{serialize:"property"}}]},{name:"ElementCollection",superClass:["NamedElement"],properties:[{name:"drgElement",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}}]},{name:"DRGElement",isAbstract:!0,superClass:["NamedElement"],properties:[]},{name:"InputData",superClass:["DRGElement"],properties:[{name:"variable",type:"InformationItem",xml:{serialize:"property"}}]},{name:"DMNElement",isAbstract:!0,properties:[{name:"description",type:"String"},{name:"extensionElements",type:"ExtensionElements"},{name:"id",type:"String",isAttr:!0,isId:!0},{name:"extensionAttribute",type:"ExtensionAttribute",isMany:!0},{name:"label",isAttr:!0,type:"String"}]},{name:"InputClause",superClass:["DMNElement"],properties:[{name:"inputExpression",type:"LiteralExpression",xml:{serialize:"property"}},{name:"inputValues",type:"UnaryTests",xml:{serialize:"property"}}]},{name:"DecisionTable",superClass:["Expression"],properties:[{name:"input",type:"InputClause",isMany:!0,xml:{serialize:"property"}},{name:"output",type:"OutputClause",isMany:!0,xml:{serialize:"property"}},{name:"annotation",type:"RuleAnnotationClause",isMany:!0,xml:{serialize:"property"}},{name:"rule",type:"DecisionRule",isMany:!0,xml:{serialize:"property"}},{name:"hitPolicy",type:"HitPolicy",isAttr:!0,default:"UNIQUE"},{name:"aggregation",type:"BuiltinAggregator",isAttr:!0},{name:"preferredOrientation",type:"DecisionTableOrientation",isAttr:!0},{name:"outputLabel",isAttr:!0,type:"String"}]},{name:"LiteralExpression",superClass:["Expression"],properties:[{name:"expressionLanguage",type:"String",isAttr:!0},{name:"text",type:"String"},{name:"importedValues",type:"ImportedValues"}]},{name:"Binding",properties:[{name:"parameter",type:"InformationItem",xml:{serialize:"property"}},{name:"bindingFormula",type:"Expression"}]},{name:"KnowledgeRequirement",superClass:["DMNElement"],properties:[{name:"requiredKnowledge",type:"DMNElementReference",xml:{serialize:"property"}}]},{name:"BusinessKnowledgeModel",superClass:["Invocable"],properties:[{name:"encapsulatedLogic",type:"FunctionDefinition",xml:{serialize:"property"}},{name:"knowledgeRequirement",type:"KnowledgeRequirement",isMany:!0},{name:"authorityRequirement",type:"AuthorityRequirement",isMany:!0}]},{name:"BusinessContextElement",isAbstract:!0,superClass:["NamedElement"],properties:[{name:"URI",type:"String",isAttr:!0}]},{name:"PerformanceIndicator",superClass:["BusinessContextElement"],properties:[{name:"impactingDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}}]},{name:"FunctionDefinition",superClass:["Expression"],properties:[{name:"formalParameter",type:"InformationItem",isMany:!0,xml:{serialize:"property"}},{name:"body",type:"Expression"},{name:"kind",type:"FunctionKind",isAttr:!0}]},{name:"Context",superClass:["Expression"],properties:[{name:"contextEntry",type:"ContextEntry",isMany:!0}]},{name:"ContextEntry",superClass:["DMNElement"],properties:[{name:"variable",type:"InformationItem",xml:{serialize:"property"}},{name:"value",type:"Expression"}]},{name:"List",superClass:["Expression"],properties:[{name:"elements",isMany:!0,type:"Expression"}]},{name:"Relation",superClass:["Expression"],properties:[{name:"column",type:"InformationItem",isMany:!0,xml:{serialize:"property"}},{name:"row",type:"List",isMany:!0,xml:{serialize:"property"}}]},{name:"OutputClause",superClass:["DMNElement"],properties:[{name:"outputValues",type:"UnaryTests",xml:{serialize:"property"}},{name:"defaultOutputEntry",type:"LiteralExpression",xml:{serialize:"property"}},{name:"name",isAttr:!0,type:"String"},{name:"typeRef",isAttr:!0,type:"String"}]},{name:"UnaryTests",superClass:["Expression"],properties:[{name:"text",type:"String"},{name:"expressionLanguage",type:"String",isAttr:!0}]},{name:"NamedElement",isAbstract:!0,superClass:["DMNElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ImportedValues",superClass:["Import"],properties:[{name:"importedElement",type:"String"},{name:"expressionLanguage",type:"String",isAttr:!0}]},{name:"DecisionService",superClass:["Invocable"],properties:[{name:"outputDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"encapsulatedDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"inputDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"inputData",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}}]},{name:"ExtensionElements",properties:[{name:"values",type:"Element",isMany:!0}]},{name:"ExtensionAttribute",properties:[{name:"value",type:"Element"},{name:"valueRef",type:"Element",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Element",isAbstract:!0,properties:[{name:"extensionAttribute",type:"ExtensionAttribute",isAttr:!0,isReference:!0},{name:"elements",type:"ExtensionElements",isAttr:!0,isReference:!0}]},{name:"Artifact",isAbstract:!0,superClass:["DMNElement"],properties:[]},{name:"Association",superClass:["Artifact"],properties:[{name:"sourceRef",type:"DMNElementReference",xml:{serialize:"property"}},{name:"targetRef",type:"DMNElementReference",xml:{serialize:"property"}},{name:"associationDirection",type:"AssociationDirection",isAttr:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",isAttr:!0,type:"String",default:"text/plain"}]},{name:"RuleAnnotationClause",properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"RuleAnnotation",properties:[{name:"text",type:"String"}]},{name:"Invocable",isAbstract:!0,superClass:["DRGElement"],properties:[{name:"variable",type:"InformationItem",xml:{serialize:"property"}}]},{name:"Group",superClass:["Artifact"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"FunctionItem",superClass:["DMNElement"],properties:[{name:"parameters",isMany:!0,type:"InformationItem",xml:{serialize:"property"}},{name:"outputTypeRef",isAttr:!0,type:"String"}]},{name:"DMNElementReference",properties:[{isAttr:!0,name:"href",type:"String"}]}],enumerations:[{name:"HitPolicy",literalValues:[{name:"UNIQUE"},{name:"FIRST"},{name:"PRIORITY"},{name:"ANY"},{name:"COLLECT"},{name:"RULE ORDER"},{name:"OUTPUT ORDER"}]},{name:"BuiltinAggregator",literalValues:[{name:"SUM"},{name:"COUNT"},{name:"MIN"},{name:"MAX"}]},{name:"DecisionTableOrientation",literalValues:[{name:"Rule-as-Row"},{name:"Rule-as-Column"},{name:"CrossTable"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"FunctionKind",literalValues:[{name:"FEEL"},{name:"Java"},{name:"PMML"}]}],associations:[],xml:{tagAlias:"lowerCase"}},dmndi:{name:"DMNDI",prefix:"dmndi",uri:"https://www.omg.org/spec/DMN/20191111/DMNDI/",types:[{name:"DMNDI",properties:[{name:"diagrams",type:"DMNDiagram",isMany:!0},{name:"styles",type:"DMNStyle",isMany:!0}]},{name:"DMNStyle",superClass:["di:Style"],properties:[{name:"fillColor",type:"dc:Color",isAttr:!0},{name:"strokeColor",type:"dc:Color",isAttr:!0},{name:"fontColor",type:"dc:Color",isAttr:!0},{name:"fontSize",isAttr:!0,type:"Real"},{name:"fontFamily",isAttr:!0,type:"String"},{name:"fontItalic",isAttr:!0,type:"Boolean"},{name:"fontBold",isAttr:!0,type:"Boolean"},{name:"fontUnderline",isAttr:!0,type:"Boolean"},{name:"fontStrikeThrough",isAttr:!0,type:"Boolean"},{name:"labelHorizontalAlignment",type:"dc:AlignmentKind",isAttr:!0},{name:"labelVerticalAlignment",type:"dc:AlignmentKind",isAttr:!0}]},{name:"DMNDiagram",superClass:["di:Diagram"],properties:[{name:"dmnElementRef",type:"dmn:DMNElement",isAttr:!0,isReference:!0},{name:"size",type:"Size"},{name:"localStyle",type:"DMNStyle",isVirtual:!0},{name:"sharedStyle",type:"DMNStyle",isVirtual:!0,isReference:!0,redefines:"di:DiagramElement#sharedStyle"},{name:"diagramElements",type:"DMNDiagramElement",isMany:!0}]},{name:"DMNDiagramElement",isAbstract:!0,superClass:["di:DiagramElement"],properties:[{name:"dmnElementRef",type:"dmn:DMNElement",isAttr:!0,isReference:!0},{name:"sharedStyle",type:"DMNStyle",isVirtual:!0,isReference:!0,redefines:"di:DiagramElement#sharedStyle"},{name:"localStyle",type:"DMNStyle",isVirtual:!0},{name:"label",type:"DMNLabel"}]},{name:"DMNLabel",superClass:["di:Shape"],properties:[{name:"text",type:"Text"}]},{name:"DMNShape",superClass:["di:Shape","DMNDiagramElement"],properties:[{name:"isListedInputData",isAttr:!0,type:"Boolean"},{name:"decisionServiceDividerLine",type:"DMNDecisionServiceDividerLine"},{name:"isCollapsed",isAttr:!0,type:"Boolean"}]},{name:"DMNEdge",superClass:["di:Edge","DMNDiagramElement"],properties:[{name:"sourceElement",type:"DMNDiagramElement",isAttr:!0,isReference:!0},{name:"targetElement",type:"DMNDiagramElement",isAttr:!0,isReference:!0}]},{name:"DMNDecisionServiceDividerLine",superClass:["di:Edge"]},{name:"Text",properties:[{name:"text",isBody:!0,type:"String"}]},{name:"Size",superClass:["dc:Dimension"]}],associations:[],enumerations:[]},biodi:{name:"bpmn.io DI for DMN",uri:"http://bpmn.io/schema/dmn/biodi/2.0",prefix:"biodi",xml:{tagAlias:"lowerCase"},types:[{name:"DecisionTable",isAbstract:!0,extends:["dmn:DecisionTable"],properties:[{name:"annotationsWidth",isAttr:!0,type:"Integer"}]},{name:"OutputClause",isAbstract:!0,extends:["dmn:OutputClause"],properties:[{name:"width",isAttr:!0,type:"Integer"}]},{name:"InputClause",isAbstract:!0,extends:["dmn:InputClause"],properties:[{name:"width",isAttr:!0,type:"Integer"}]}]}};function ut(e,t){return new ct(M({},ht,e),t)}function dt(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 i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const pt=Object.prototype.toString,ft=Object.prototype.hasOwnProperty;function gt(e,t){return ft.call(e,t)}function mt(e,t){let n,i;if(void 0===e)return;const r=function(e){return"[object Array]"===pt.call(e)}(e)?vt:yt;for(let o in e)if(gt(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function yt(e){return e}function vt(e){return Number(e)}function wt(e,...t){const n=e.style;return mt(t,(function(e){e&&mt(e,(function(e,t){n[t]=e}))})),e}function bt(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}const xt=Object.prototype.toString;function kt(e){return new _t(e)}function _t(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function St(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}_t.prototype.add=function(e){return this.list.add(e),this},_t.prototype.remove=function(e){return"[object RegExp]"==xt.call(e)?this.removeMatching(e):(this.list.remove(e),this)},_t.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},_t.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},_t.prototype.array=function(){return Array.from(this.list)},_t.prototype.has=_t.prototype.contains=function(e){return this.list.contains(e)};var Ct,Et,Mt,At={};function Dt(){Ct=window.addEventListener?"addEventListener":"attachEvent",Et=window.removeEventListener?"removeEventListener":"detachEvent",Mt="addEventListener"!==Ct?"on":""}var Rt=dt({__proto__:null,bind:At.bind=function(e,t,n,i){return Ct||Dt(),e[Ct](Mt+t,n,i||!1),n},unbind:At.unbind=function(e,t,n,i){return Et||Dt(),e[Et](Mt+t,n,i||!1),n},default:At},[At]),Ot=["focus","blur"];var Tt,Nt={bind:function(e,t,n,i,r){return-1!==Ot.indexOf(n)&&(r=!0),Rt.bind(e,n,(function(n){var r=n.target||n.srcElement;n.delegateTarget=function(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}(r,t,!0),n.delegateTarget&&i.call(e,n)}),r)},unbind:function(e,t,n,i){return-1!==Ot.indexOf(t)&&(i=!0),Rt.unbind(e,t,n,i)}},Pt=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 i=n[1];if("body"==i){return(l=t.createElement("html")).innerHTML=e,l.removeChild(l.lastChild)}var r=Object.prototype.hasOwnProperty.call(Bt,i)?Bt[i]:Bt._default,o=r[0],s=r[1],a=r[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&&((Tt=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',qt=!Tt.getElementsByTagName("link").length,Tt=void 0);var Bt={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,"",""]};Bt.td=Bt.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Bt.option=Bt.optgroup=[1,'<select multiple="multiple">',"</select>"],Bt.thead=Bt.tbody=Bt.colgroup=Bt.caption=Bt.tfoot=[1,"<table>","</table>"],Bt.polyline=Bt.ellipse=Bt.polygon=Bt.circle=Bt.text=Bt.line=Bt.path=Bt.rect=Bt.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var Lt=Pt;function It(e,t){return(t=t||document).querySelector(e)}function Ft(e){e.parentNode&&e.parentNode.removeChild(e)}function jt(e){return function(){if(!window.Promise)throw new Error("Promises is not supported in this environment. Please polyfill Promise.");var t=arguments.length;if(!(t>=1&&s(arguments[t-1])))return e.apply(this,arguments);var n=arguments[t-1];console.warn(new Error("Passing callbacks to "+function(e){return e.replace("bound ","")}(e.name)+" is deprecated and will be removed in a future major release. Please switch to promises: https://bpmn.io/l/moving-to-promises.html"));var i=Array.prototype.slice.call(arguments,0,-1);e.apply(this,i).then((function(e){var t=Object.keys(e)[0];return n(null,e[t])}),(function(e){return n(e,e.warnings)}))}}const Vt={width:"100%",height:"100%",position:"relative"};class $t{constructor(e={}){this._eventBus=new _,this._viewsChanged=v(this._viewsChanged,0),this._views=[],this._viewers={},this.open=jt(this.open.bind(this)),this.importXML=jt(this.importXML.bind(this)),this.saveXML=jt(this.saveXML.bind(this)),this._init(e)}importXML(e,t){var n=this;return t=t||{open:!0},new Promise((function(r,o){var s=n._activeView;n._clear().then((()=>{var a;e=n._emit("import.parse.start",{xml:e})||e,n._moddle.fromXML(e,"dmn:Definitions").then((e=>{var l=e.rootElement,c=e.references,h=e.elementsById;if(a=e.warnings,l=n._emit("import.parse.complete",i({error:null,definitions:l,elementsById:h,references:c,warnings:a}))||l,n._setDefinitions(l),!t.open)return n._emit("import.done",{error:null,warnings:a}),void r({warnings:a});var u=n._getInitialView(n._views,s);if(!u){var d=new Error("no displayable contents");return n._emit("import.done",{error:d,warnings:a}),d.warnings=a,o(d)}n.open(u).then((e=>({warnings:e.warnings}))).catch((e=>({error:e,warnings:e.warnings}))).then((e=>{var t=[].concat(a,e.warnings);n._emit("import.done",{error:e.error,warnings:t}),e.error?(e.error.warnings=t,o(e.error)):r({warnings:t})}))})).catch((t=>(a=t.warnings,t=function(e,t){if("failed to parse document as <dmn:Definitions>"!==e.message)return null;var n=-1!==t.indexOf('"http://www.omg.org/spec/DMN/20151101/dmn.xsd"')?"1.1":-1!==t.indexOf('"http://www.omg.org/spec/DMN/20180521/MODEL/"')&&"1.2";if(!n)return null;return e=new Error("unsupported DMN "+n+" file detected; only DMN 1.3 files can be opened"),console.error("Cannot open what looks like a DMN "+n+" diagram. Please refer to https://bpmn.io/l/dmn-compatibility.html to learn how to make the toolkit compatible with older DMN files",e),e}(t,e)||function(e){var t=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);if(!t)return null;return e.message="unparsable content <"+t[1]+"> detected; this may indicate an invalid DMN 1.3 diagram file"+t[2],e}(t)||t,n._emit("import.parse.complete",i({error:t,warnings:a})),n._emit("import.done",{error:t,warnings:a}),t.warnings=a,o(t))))})).catch((e=>(n._emit("import.done",{error:e,warnings:[]}),e.warnings=[],o(e))))}));function i(e){var t=n._eventBus.createEvent(e);return Object.defineProperty(t,"context",{enumerable:!0,get:function(){return console.warn(new Error("import.parse.complete <context> is deprecated and will be removed in future library versions")),{warnings:e.warnings,references:e.references,elementsById:e.elementsById}}}),t}}getDefinitions(){return this._definitions}getActiveView(){return this._activeView}getActiveViewer(){var e=this.getActiveView();return e&&this._getViewer(e)}getView(e){return this._views.filter((function(t){return t.element===e}))[0]}getViews(){return this._views}saveXML(e){var t=this;e=e||{};var n=this._definitions;return new Promise((function(i,r){n?(n=t._emit("saveXML.start",{definitions:n})||n,t._moddle.toXML(n,e).then((function(e){var n=e.xml;return{xml:n=t._emit("saveXML.serialized",{xml:n})||n}})).catch((e=>({error:e}))).then((e=>{t._emit("saveXML.done",e),e.error?r(e.error):i({xml:e.xml})}))):r(new Error("no definitions loaded"))}))}on(...e){this._eventBus.on(...e)}off(...e){this._eventBus.off(...e)}once(...e){this._eventBus.once(...e)}attachTo(e){e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),"string"==typeof e&&(e=It(e)),e.appendChild(this._container),this._emit("attach",{})}detach(){this._emit("detach",{}),Ft(this._container)}destroy(){Object.keys(this._viewers).forEach((e=>{Ut(this._viewers[e],"destroy")})),Ft(this._container)}_init(e){this._options=e,this._moddle=this._createModdle(e),this._viewers={},this._views=[];const t=Lt('<div class="dmn-js-parent"></div>'),n=b({},Vt,e);b(t.style,{width:zt(n.width),height:zt(n.height),position:n.position}),this._container=t,e.container&&this.attachTo(e.container)}_clear(){return this._switchView(null)}open(e){return this._switchView(e)}_setDefinitions(e){this._definitions=e,this._updateViews()}_viewsChanged=()=>{this._emit("views.changed",{views:this._views,activeView:this._activeView})};_updateViews(){var e=this._definitions;if(!e)return this._views=[],void this._switchView(null);var t=this._getViewProviders(),n=[e,...e.drgElement||[]],i=this._views,r=[];for(var o of n){var s=c(t,(function(e){return"string"==typeof e.opens?e.opens===o.$type:e.opens(o)}));if(s){var a={element:o,id:o.id,name:o.name,type:s.id};r.push(a)}}var l,h=this._activeView;if(!h||(l=c(r,(function(e){return Ht(h,e)}))||this._getInitialView(r),l)){var u=!Ht(h,l)||Wt(h,l),d=i.length!==r.length||!p(r,(function(e){return c(i,(function(t){return Ht(t,e)&&!Wt(t,e)}))}));this._activeView=l,this._views=r,(u||d)&&this._viewsChanged()}else this._switchView(null)}_getInitialView(e,t){var n;return t&&(n=c(e,(function(e){return Ht(e,t)}))||c(e,(function(e){return e.type===t}))),n||e[0]}_switchView(e){var t=this;return new Promise((function(n,i){var r,o=(e,r)=>{t._viewsChanged(),e?i(e):n(r)},s=t.getActiveView(),a=e&&t._getViewer(e),l=e&&e.element;if(s&&(r=t._getViewer(s))!==a&&(Ut(r,"clear"),r.detach()),t._activeView=e,a)return r!==a&&a.attachTo(t._container),t._emit("import.render.start",{view:e,element:l}),void a.open(l).then((n=>{t._emit("import.render.complete",{view:e,error:null,warnings:n.warnings}),o(null,n)})).catch((n=>{t._emit("import.render.complete",{view:e,error:n,warnings:n.warnings}),o(n,null)}));o()}))}_getViewer(e){var t=e.type,n=this._viewers[t];return n||(n=this._viewers[t]=this._createViewer(e.type),this._emit("viewer.created",{type:t,viewer:n})),n}_createViewer(e){var t=c(this._getViewProviders(),(function(t){return t.id===e}));if(!t)throw new Error("no provider for view type <"+e+">");var n=t.constructor,i=this._options[e]||{};return new n({...this._options.common||{},...i,additionalModules:[...i.additionalModules||[],{_parent:["value",this],moddle:["value",this._moddle]}]})}_emit(...e){return this._eventBus.fire(...e)}_createModdle(e){return new ut(e.moddleExtensions)}_getViewProviders(){return[]}}function zt(e){return e+(o(e)?"px":"")}function Ht(e,t){return n(e)?!!n(t)&&(e.element===t.element||e.id===t.id):!n(t)}function Wt(e,t){return!e||!t||e.name!==t.name}function Ut(e,t){s(e[t])&&e[t]()}const Gt=/^class[ {]/;function Kt(e){return Array.isArray(e)}function Xt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Yt(...e){1===e.length&&Kt(e[0])&&(e=e[0]);const t=(e=[...e]).pop();return t.$inject=e,t}const Jt=/constructor\s*[^(]*\(\s*([^)]*)\)/m,Qt=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,Zt=/\/\*([^*]*)\*\//m;function en(e){if("function"!=typeof e)throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(function(e){return Gt.test(e.toString())}(e)?Jt:Qt);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map((e=>{const t=e.match(Zt);return(t&&t[1]||e).trim()}))||[]}function tn(e,t){const n=t||{get:function(e,t){if(i.push(e),!1===t)return null;throw a(`No provider for "${e}"!`)}},i=[],r=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),s=o.injector=this,a=function(e){const t=i.join(" -> ");return i.length=0,new Error(t?`${e} (Resolving: ${t})`:e)};function l(e,t){if(!r[e]&&e.includes(".")){const t=e.split(".");let n=l(t.shift());for(;t.length;)n=n[t.shift()];return n}if(Xt(o,e))return o[e];if(Xt(r,e)){if(-1!==i.indexOf(e))throw i.push(e),a("Cannot resolve circular dependency!");return i.push(e),o[e]=r[e][0](r[e][1]),i.pop(),o[e]}return n.get(e,t)}function c(e,t){if(void 0===t&&(t={}),"function"!=typeof e){if(!Kt(e))throw a(`Cannot invoke "${e}". Expected a function!`);e=Yt(e.slice())}return{fn:e,dependencies:(e.$inject||en(e)).map((e=>Xt(t,e)?t[e]:l(e)))}}function h(e){const{fn:t,dependencies:n}=c(e);return new(Function.prototype.bind.call(t,null,...n))}function u(e,t,n){const{fn:i,dependencies:r}=c(e,n);return i.apply(t,r)}function d(e){return Yt((t=>e.get(t)))}function p(e,t){if(t&&t.length){const n=Object.create(null),i=Object.create(null),o=[],s=[],a=[];let l,c,h,u;for(let e in r)l=r[e],-1!==t.indexOf(e)&&("private"===l[2]?(c=o.indexOf(l[3]),-1===c?(h=l[3].createChild([],t),u=d(h),o.push(l[3]),s.push(h),a.push(u),n[e]=[u,e,"private",h]):n[e]=[a[c],e,"private",s[c]]):n[e]=[l[2],l[1]],i[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]],i[t]=!0)}));t.forEach((e=>{if(!i[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')})),e.unshift(n)}return new tn(e,s)}const f={factory:u,type:h,value:function(e){return e}};function g(e,t){const n=e.__init__||[];return function(){n.forEach((e=>{"string"==typeof e?t.get(e):t.invoke(e)}))}}function m(e){const t=e.__exports__;if(t){const n=e.__modules__,i=Object.keys(e).reduce(((t,n)=>("__exports__"!==n&&"__modules__"!==n&&"__init__"!==n&&"__depends__"!==n&&(t[n]=e[n]),t)),Object.create(null)),o=p((n||[]).concat(i)),s=Yt((function(e){return o.get(e)}));t.forEach((function(e){r[e]=[s,e,"private",o]}));const a=(e.__init__||[]).slice();return a.unshift((function(){o.init()})),g(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(r[t]=n);const i=n[0],o=n[1];r[t]=[f[i],nn(i,o),i]})),g(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=h,this.createChild=p,this.init=function(e){const t=e.reduce(y,[]).map(m);let n=!1;return function(){n||(n=!0,t.forEach((e=>e())))}}(e)}function nn(e,t){return"value"!==e&&Kt(t)&&(t=Yt(t.slice())),t}function rn(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}var on=1e3;function sn(e,t){var n=this;t=t||on,e.on(["render.shape","render.connection"],t,(function(e,t){var i=e.type,r=t.element,o=t.gfx,s=t.attrs;if(n.canRender(r))return"render.shape"===i?n.drawShape(o,r,s):n.drawConnection(o,r,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 an(e,t){return function(e,t){t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}(e,t))}(t,e),e}sn.prototype.canRender=function(e){},sn.prototype.drawShape=function(e,t){},sn.prototype.drawConnection=function(e,t){},sn.prototype.getShapePath=function(e){},sn.prototype.getConnectionPath=function(e){};var ln=2,cn={"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":ln,"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":ln,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function hn(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=cn[i];r?(r===ln&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function un(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return cn[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);hn(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)hn(e,i,t[i])}(e,t);return e}const dn=Object.prototype.toString;function pn(e){return new fn(e)}function fn(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}fn.prototype.add=function(e){return this.list.add(e),this},fn.prototype.remove=function(e){return"[object RegExp]"==dn.call(e)?this.removeMatching(e):(this.list.remove(e),this)},fn.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},fn.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},fn.prototype.array=function(){return Array.from(this.list)},fn.prototype.has=fn.prototype.contains=function(e){return this.list.contains(e)};var gn={svg:"http://www.w3.org/2000/svg"},mn='<svg xmlns="'+gn.svg+'"';function yn(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(gn.svg)&&(e=mn+e.substring(4)):(e=mn+">"+e+"</svg>",t=!0);var n=function(e){var t;return(t=new DOMParser).async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function vn(e,t){var n;return"<"===(e=e.trim()).charAt(0)?(n=yn(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(gn.svg,e),t&&un(n,t),n}var wn=null;function bn(){return null===wn&&(wn=vn("svg")),wn}function xn(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}var kn=/([&<>]{1})/g,_n=/([&<>\n\r"]{1})/g,Sn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function Cn(e,t){return e.replace(t,(function(e,t){return Sn[t]||t}))}function En(e,t){var n,i,r,o,s;switch(e.nodeType){case 3:t.push(Cn(e.textContent,kn));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n<i;++n)o=r.item(n),t.push(" ",o.name,'="',Cn(o.value,_n),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,i=(s=e.childNodes).length;n<i;++n)En(s.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",Cn(e.nodeValue,kn),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function Mn(e,t){return function(e){for(var t=e.firstChild,n=[];t;)En(t,n),t=t.nextSibling;return n.join("")}(e)}function An(e){var t=e.parentNode;return t&&t.removeChild(e),e}function Dn(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function Rn(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(Dn(e,i))}(n,t)),n.consolidate()}function On(e){return e.flat().join(",").replace(/,?([A-z]),?/g,"$1")}function Tn(e){return["L",e.x,e.y]}function Nn(e,t){const n=e.length,i=[(r=e[0],["M",r.x,r.y])];var r,o,s,a;for(let r=1;r<n;r++){const n=e[r-1],l=e[r],c=e[r+1];if(!c||!t){i.push(Tn(l));continue}const h=Math.min(t,qn(l.x-n.x,l.y-n.y),qn(c.x-l.x,c.y-l.y));if(!h){i.push(Tn(l));continue}const u=Pn(l,n,h),d=Pn(l,n,.5*h),p=Pn(l,c,h),f=Pn(l,c,.5*h);i.push(Tn(u)),i.push((s=f,a=p,["C",(o=d).x,o.y,s.x,s.y,a.x,a.y]))}return i}function Pn(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=n/qn(i,r);return{x:e.x+i*o,y:e.y+r*o}}function qn(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function Bn(e,t,n){o(t)&&(n=t,t=null),t||(t={});const i=vn("path",t);return o(n)&&(i.dataset.cornerRadius=String(n)),Ln(i,e)}function Ln(e,t){return un(e,{d:On(Nn(t,parseInt(e.dataset.cornerRadius,10)||0))}),e}function In(e,t){var n,r,o,s;return t=!!t,i(e)||(e=[e]),u(e,(function(e){var i=e;e.waypoints&&!t&&(i=In(e.waypoints,!0));var a=i.x,l=i.y,c=i.height||0,h=i.width||0;(a<n||void 0===n)&&(n=a),(l<r||void 0===r)&&(r=l),(a+h>o||void 0===o)&&(o=a+h),(l+c>s||void 0===s)&&(s=l+c)})),{x:n,y:r,height:s-r,width:o-n}}function Fn(e){return!(!e||!e.isFrame)}function jn(e,t){sn.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})}rn(jn,sn),jn.prototype.canRender=function(){return!0},jn.prototype.drawShape=function(e,t,n){var i=vn("rect");return un(i,{x:0,y:0,width:t.width||0,height:t.height||0}),Fn(t)?un(i,b({},this.FRAME_STYLE,n||{})):un(i,b({},this.SHAPE_STYLE,n||{})),an(e,i),i},jn.prototype.drawConnection=function(e,t,n){var i=Bn(t.waypoints,b({},this.CONNECTION_STYLE,n||{}));return an(e,i),i},jn.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width;return On([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])},jn.prototype.getConnectionPath=function(e){var t,n,i=e.waypoints,r=[];for(t=0;n=i[t];t++)n=n.original||n,r.push([0===t?"M":"L",n.x,n.y]);return On(r)},jn.$inject=["eventBus","styles"];var Vn={__init__:["defaultRenderer"],defaultRenderer:["type",jn],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 b(this.style(t,n),{class:e})},this.style=function(t,n){i(t)||n||(n=t,t=[]);var r=d(t,(function(t,n){return b(t,e[n]||{})}),{});return n?b(r,n):r},this.computeStyle=function(e,n,r){return i(n)||(r=n,n=[]),t.style(n||[],b({},r,e||{}))}}]};function $n(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function zn(e,t){return Math.round(e*t)/t}function Hn(e){return o(e)?e+"px":e}function Wn(e,t,n){const i=vn("g");pn(i).add(t);const r=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]||null),i}const Un={shape:["x","y","width","height"],connection:["waypoints"]};function Gn(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}function Kn(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}Gn.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],Gn.prototype._init=function(e){const t=this._eventBus,n=this._container=function(e){const t=(e=b({},{width:"100%",height:"100%"},e)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),wt(n,{position:"relative",overflow:"hidden",width:Hn(e.width),height:Hn(e.height)}),t.appendChild(n),n}(e),i=this._svg=vn("svg");un(i,{width:"100%",height:"100%"}),bt(i,"tabindex",0),t.on("element.hover",(()=>{this.restoreFocus()})),i.addEventListener("focusin",(()=>{this._focused=!0,t.fire("canvas.focus.changed",{focused:!0})})),i.addEventListener("focusout",(()=>{this._focused=!1,t.fire("canvas.focus.changed",{focused:!1})})),an(n,i);const r=this._viewport=Wn(i,"viewport");e.deferUpdate&&(this._viewboxChanged=v(w(this._viewboxChanged,this),300)),t.on("diagram.init",(()=>{t.fire("canvas.init",{svg:i,viewport:r})})),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)},Gn.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},Gn.prototype._clear=function(){this._elementRegistry.getAll().forEach((e=>{const t=function(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}(e);"root"===t?this.removeRootElement(e):this._removeElement(e,t)})),this._planes=[],this._rootElement=null,delete this._cachedViewbox},Gn.prototype.focus=function(){this._svg.focus({preventScroll:!0})},Gn.prototype.restoreFocus=function(){document.activeElement===document.body&&this.focus()},Gn.prototype.isFocused=function(){return this._focused},Gn.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},Gn.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},Gn.prototype._getChildIndex=function(e){return d(this._layers,(function(t,n){return n.visible&&e>=n.index&&t++,t}),0)},Gn.prototype._createLayer=function(e,t){void 0===t&&(t=1);const n=this._getChildIndex(t);return{group:Wn(this._viewport,"layer-"+e,n),index:t,visible:!0}},Gn.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,i=t.group,r=t.index;if(t.visible)return i;const o=this._getChildIndex(r);return n.insertBefore(i,n.childNodes[o]||null),t.visible=!0,i},Gn.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?(An(n),t.visible=!1,n):n},Gn.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],An(t.group))},Gn.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},Gn.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},Gn.prototype.getRootElements=function(){return this._planes.map((function(e){return e.rootElement}))},Gn.prototype._findPlaneForRoot=function(e){return c(this._planes,(function(t){return t.rootElement===e}))},Gn.prototype.getContainer=function(){return this._container},Gn.prototype._updateMarker=function(e,t,n){let i;e.id||(e=this._elementRegistry.get(e)),e.markers=e.markers||new Set,i=this._elementRegistry._elements[e.id],i&&(u([i.gfx,i.secondaryGfx],(function(i){i&&(n?(e.markers.add(t),pn(i).add(t)):(e.markers.delete(t),pn(i).remove(t)))})),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},Gn.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},Gn.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},Gn.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),!!e.markers&&e.markers.has(t)},Gn.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},Gn.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},Gn.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 i=this.getLayer(n,0);return this.hideLayer(n),this._addRoot(e,i),this._planes.push({rootElement:e,layer:i}),e},Gn.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},Gn.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},Gn.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)},Gn.prototype._addRoot=function(e,t){const n=this._elementRegistry,i=this._eventBus;i.fire("root.add",{element:e}),n.add(e,t),i.fire("root.added",{element:e,gfx:t})},Gn.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})},Gn.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=Un[e],i=p(n,(function(e){return void 0!==t[e]}));if(!i)throw new Error("must supply { "+n.join(", ")+" } with "+e)},Gn.prototype._setParent=function(e,t,n){!function(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}(t.children,e,n),e.parent=t},Gn.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();const r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),r.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);const s=o.create(e,t,i);return this._elementRegistry.add(t,s),o.update(e,t,s),r.fire(e+".added",{element:t,gfx:s}),t},Gn.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},Gn.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},Gn.prototype._removeElement=function(e,t){const n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(e=n.get(e.id||e))return r.fire(t+".remove",{element:e}),i.remove(e),function(e,t){if(!e||!t)return-1;var n=e.indexOf(t);-1!==n&&e.splice(n,1)}(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},Gn.prototype.removeShape=function(e){return this._removeElement(e,"shape")},Gn.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},Gn.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},Gn.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},Gn.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},Gn.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let i,r,o,s,a,l,c;return e?(this._changeViewbox((function(){a=Math.min(n.width/e.width,n.height/e.height);const i=this._svg.createSVGMatrix().scale(a).translate(-e.x,-e.y);Rn(t,i)})),e):(o=this._rootElement?this.getActiveLayer():null,i=o&&o.getBBox()||{},s=Rn(t),r=s?s.matrix:function(e,t,n,i,r,o){var s=bn().createSVGMatrix();switch(arguments.length){case 0:return s;case 1:return xn(s,e);case 6:return xn(s,{a:e,b:t,c:n,d:i,e:r,f:o})}}(),a=zn(r.a,1e3),l=zn(-r.e||0,1e3),c=zn(-r.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:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:n})},Gn.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox((function(){e=b({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),Kn(t,n)})),{x:n.e,y:n.f}},Gn.prototype.scrollToElement=function(e,t){let n=100;"string"==typeof e&&(e=this._elementRegistry.get(e));const i=this.findRoot(e);if(i!==this.getRootElement()&&this.setRootElement(i),i===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 r=In(e),o=$n(r),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 h=$n(s);if(r.width<s.width&&r.height<s.height){const e=Math.max(0,o.right-h.right),t=Math.min(0,o.left-h.left),n=Math.max(0,o.bottom-h.bottom),i=Math.min(0,o.top-h.top);l=e||t,c=n||i}else l=r.x-s.x,c=r.y-s.y;this.scroll({dx:-l*a,dy:-c*a})},Gn.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if("fit-viewport"===e)return this._fitViewport(t);let n,i;return this._changeViewbox((function(){"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)})),zn(i.a,1e3)},Gn.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,i=t.inner;let r,o;return i.x>=0&&i.y>=0&&i.x+i.width<=n.width&&i.y+i.height<=n.height&&!e?o={x:0,y:0,width:Math.max(i.width+i.x,n.width),height:Math.max(i.height+i.y,n.height)}:(r=Math.min(1,n.width/i.width,n.height/i.height),o={x:i.x+(e?i.width/2-n.width/r/2:0),y:i.y+(e?i.height/2-n.height/r/2:0),width:n.width/r,height:n.height/r}),this.viewbox(o),this.viewbox(!1).scale},Gn.prototype._setZoom=function(e,t){const n=this._svg,i=this._viewport,r=n.createSVGMatrix(),o=n.createSVGPoint();let s,a,l,c,h;l=i.getCTM();const u=l.a;return t?(s=b(o,t),a=s.matrixTransform(l.inverse()),c=r.translate(a.x,a.y).scale(1/u*e).translate(-a.x,-a.y),h=l.multiply(c)):h=r.scale(e),Kn(this._viewport,h),h},Gn.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},Gn.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}},Gn.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Xn="data-element-id";function Yn(e){this._elements={},this._eventBus=e}function Jn(e,t,n){var i=function(e,t,n,i){var r=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,r,i)),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,r,i)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:i}),i.length&&i.forEach((function(i){e.set(i,t.inverse,n)}))}function Qn(e,t){if(!(this instanceof Qn))return new Qn(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Yn.$inject=["eventBus"],Yn.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),un(t,Xn,i),n&&un(n,Xn,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},Yn.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(un(i.gfx,Xn,""),i.secondaryGfx&&un(i.secondaryGfx,Xn,""),delete t[n])},Yn.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),i=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,i)},Yn.prototype.updateGraphics=function(e,t,n){var i=e.id||e,r=this._elements[i];return n?r.secondaryGfx=t:r.gfx=t,t&&un(t,Xn,i),t},Yn.prototype.get=function(e){var t;t="string"==typeof e?e:e&&un(e,Xn);var n=this._elements[t];return n&&n.element},Yn.prototype.filter=function(e){var t=[];return this.forEach((function(n,i){e(n,i)&&t.push(n)})),t},Yn.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),i=0;i<n.length;i++){var r=t[n[i]],o=r.element;if(e(o,r.gfx))return o}},Yn.prototype.getAll=function(){return this.filter((function(e){return e}))},Yn.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach((function(n){var i=t[n],r=i.element,o=i.gfx;return e(r,o)}))},Yn.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},Yn.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")},Qn.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?Jn(this,t,e):function(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var o=r;r=null,o&&e.unset(o,i,n),r=t,e.set(r,i,n)}}})}(this,t,e)},Qn.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return function(e){return!0===e.__refs_collection}(n)||Jn(this,t,e),n},Qn.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},Qn.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},Qn.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Zn=new Qn({name:"children",enumerable:!0,collection:!0},{name:"parent"}),ei=new Qn({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),ti=new Qn({name:"attachers",collection:!0},{name:"host"}),ni=new Qn({name:"outgoing",collection:!0},{name:"source"}),ii=new Qn({name:"incoming",collection:!0},{name:"target"});function ri(){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)}}),Zn.bind(this,"parent"),ei.bind(this,"labels"),ni.bind(this,"outgoing"),ii.bind(this,"incoming")}function oi(){ri.call(this),Zn.bind(this,"children"),ti.bind(this,"host"),ti.bind(this,"attachers")}function si(){ri.call(this),Zn.bind(this,"children")}function ai(){oi.call(this),ei.bind(this,"labelTarget")}function li(){ri.call(this),ni.bind(this,"source"),ii.bind(this,"target")}rn(oi,ri),rn(si,oi),rn(ai,oi),rn(li,ri);var ci={connection:li,shape:oi,label:ai,root:si};function hi(){this._uid=12}function ui(e,t,n){var i=bn().createSVGTransform();i.setTranslate(t,n),Rn(e,i)}function di(e,t){this._eventBus=e,this._elementRegistry=t}function pi(e,t,n){var i=n||t.firstChild;e!==i&&t.insertBefore(e,i)}hi.prototype.createRoot=function(e){return this.create("root",e)},hi.prototype.createLabel=function(e){return this.create("label",e)},hi.prototype.createShape=function(e){return this.create("shape",e)},hi.prototype.createConnection=function(e){return this.create("connection",e)},hi.prototype.create=function(e,t){return(t=b({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=ci[e];if(!n)throw new Error("unknown type: <"+e+">");return b(new n,t)}(e,t)},di.$inject=["eventBus","elementRegistry"],di.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=function(e){return e.parentNode.childNodes[1]}(n),t||(pn(t=vn("g")).add("djs-children"),an(n.parentNode,t))):t=n,t},di.prototype._clear=function(e){var t=function(e){return e.childNodes[0]}(e);return St(t),t},di.prototype._createContainer=function(e,t,n,i){var r=vn("g");pn(r).add("djs-group"),void 0!==n?pi(r,t,t.childNodes[n]):an(t,r);var o=vn("g");pn(o).add("djs-element"),pn(o).add("djs-"+e),i&&pn(o).add("djs-frame"),an(r,o);var s=vn("g");return pn(s).add("djs-visual"),an(o,s),o},di.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,Fn(t))},di.prototype.updateContainments=function(e){var t,n=this,i=this._elementRegistry;t=d(e,(function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e}),{}),u(t,(function(e){var t=e.children;if(t){var r=n._getChildrenContainer(e);u(t.slice().reverse(),(function(e){pi(i.getGraphics(e).parentNode,r)}))}}))},di.prototype.drawShape=function(e,t,n={}){return this._eventBus.fire("render.shape",{gfx:e,element:t,attrs:n})},di.prototype.getShapePath=function(e){return this._eventBus.fire("render.getShapePath",e)},di.prototype.drawConnection=function(e,t,n={}){return this._eventBus.fire("render.connection",{gfx:e,element:t,attrs:n})},di.prototype.getConnectionPath=function(e){return this._eventBus.fire("render.getConnectionPath",e)},di.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if("shape"===e)this.drawShape(i,t),ui(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(i,t)}t.hidden?un(n,"display","none"):un(n,"display","block")}},di.prototype.remove=function(e){An(this._elementRegistry.getGraphics(e).parentNode)};var fi={__depends__:[Vn],__init__:["canvas"],canvas:["type",Gn],elementRegistry:["type",Yn],elementFactory:["type",hi],eventBus:["type",_],graphicsFactory:["type",di]};function gi(e){return function(e){var t=new tn(e);return t.init(),t}([{config:["value",e=e||{}]},fi].concat(e.modules||[]))}function mi(e,t){this._injector=t||gi(e),this.get("eventBus").fire("diagram.init")}function yi(e,t){var n=vi(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function vi(e){return e&&e.businessObject||e}function wi(e){var t=vi(e);if(yi(t,"dmn:Decision"))return t.get("decisionLogic");if(yi(t,"dmn:BusinessKnowledgeModel")){var n=t.get("encapsulatedLogic");return n&&n.get("body")}}mi.prototype.get=function(e,t){return this._injector.get(e,t)},mi.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},mi.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},mi.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};var bi=new Qn({name:"dmnElementRef",enumerable:!0},{name:"di",configurable:!0});function xi(e,t){var n=[];function i(t){try{var n=t.di&&function(t){if(t.gfx)throw new Error("already rendered "+t.id);return e.element(t)}(t);return n}catch(e){s(e.message,{element:t,error:e})}}function r(e){var t,n;(n=(t=e).dmnElementRef)?n.di?s("multiple DI elements defined for element",{element:n}):(bi.bind(n,"di"),n.di=t):s("no DMN element referenced in element",{element:t})}function o(e){n.push(e)}function s(t,n){e.error(t,n)}return{handleDefinitions:function(t,s){var a=t.dmnDI;if(!a)throw new Error("no dmndi:DMNDI");var l,c=a.diagrams||[];if(s&&-1===c.indexOf(s))throw new Error("diagram not part of dmndi:DMNDI");if(!s&&c&&c.length&&(s=c[0]),!s)throw new Error("no diagram to display");t.di=s,function(e){u(e.diagramElements,r)}(s),l=t,e.root(l),u(t.get("drgElement"),(function(e){i(e),function(e){u(["informationRequirement","knowledgeRequirement","authorityRequirement"],(function(t){u(e[t],(function(e){o((function(){i(e)}))}))}))}(e)})),function(e){u(e,(function(e){yi(e,"dmn:Association")?function(e){o((function(){i(e)}))}(e):i(e)}))}(t.get("artifact")),u(n,(function(e){e()}))}}}var ki="$NO_OP",_i="a runtime error occured! Use Inferno in development environment to find the error.",Si=!("undefined"==typeof window||!window.document),Ci=Array.isArray;function Ei(e){var t=typeof e;return"string"===t||"number"===t}function Mi(e){return Ni(e)||Ti(e)}function Ai(e){return Ti(e)||!1===e||function(e){return!0===e}(e)||Ni(e)}function Di(e){return"function"==typeof e}function Ri(e){return"string"==typeof e}function Oi(e){return"number"==typeof e}function Ti(e){return null===e}function Ni(e){return void 0===e}function Pi(e){throw e||(e=_i),new Error("Inferno Error: "+e)}function qi(e){console.error(e)}function Bi(e,t){var n={};if(e)for(var i in e)n[i]=e[i];if(t)for(var r in t)n[r]=t[r];return n}function Li(e){var t;if(Ci(e))t="Array("+(e.length>3?e.slice(0,3).toString()+",...":e.toString())+")";else if(Ei(e))t="Text("+e+")";else if(Ai(e))t="InvalidVNode("+e+")";else{var n=e.flags;if(481&n)t="<"+e.type+(e.className?' class="'+e.className+'"':"")+">";else if(16&n)t="Text("+e.children+")";else if(1024&n)t="Portal*";else{var i=e.type;t="<"+(i.name||i.displayName||i.constructor.name||(i.toString().match(/^function\s*([^\s(]+)/)||[])[1])+" />"}}return">> "+t+"\n"}function Ii(e,t){for(var n={},i=0,r=e.length;i<r;i++){var o=e[i];if(Ci(o))return"Encountered ARRAY in mount, array must be flattened, or normalize used. Location: \n"+Li(o);if(Ai(o)){if(t)return"Encountered invalid node when preparing to keyed algorithm. Location: \n"+Li(o);if(0!==Object.keys(n).length)return"Encountered invalid node with mixed keys. Location: \n"+Li(o)}else{"object"==typeof o&&(o.isValidated=!0);var s=o.key;if(!Mi(s)&&!Ei(s))return"Encountered child vNode where key property is not string or number. Location: \n"+Li(o);var a=o.children,l=o.childFlags;if(!Ai(a)){var c=void 0;if(12&l?c=Ii(a,8&o.childFlags):2===l&&(c=Ii([a],8&o.childFlags)),c)return c+=Li(o)}if(t&&Mi(s))return"Encountered child without key during keyed algorithm. If this error points to Array make sure children is flat list. Location: \n"+Li(o);if(t||!Mi(s)){if(n[s])return"Encountered two children with same key: {"+s+"}. Location: \n"+Li(o);n[s]=!0}else if(0!==Object.keys(n).length)return"Encountered children with key missing. Location: \n"+Li(o)}}}function Fi(e){if(!(1&e.childFlags)&&(64&e.flags&&Pi("input elements can't have children."),128&e.flags&&Pi("textarea elements can't have children."),481&e.flags)){var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=e.type.toLowerCase();"media"===n&&Pi("media elements can't have children.");var i=t.indexOf(n);-1!==i&&Pi(t[i]+" elements can't have children.")}}function ji(e){if(!1===e.isValidated&&e.children&&481&e.flags){var t=Ii(Array.isArray(e.children)?e.children:[e.children],(8&e.childFlags)>0);t&&Pi(t+Li(e))}e.isValidated=!0}var Vi="$";function $i(e,t,n,i,r,o,s,a){return{childFlags:e,children:t,className:n,dom:null,flags:i,isValidated:!1,key:void 0===r?null:r,parentVNode:null,props:void 0===o?null:o,ref:void 0===s?null:s,type:a}}function zi(e,t,n,i,r,o,s,a){14&e&&Pi("Creating Component vNodes using createVNode is not allowed. Use Inferno.createComponentVNode method.");var l=void 0===r?1:r,c=$i(l,i,n,e,s,o,a,t);return 0===l&&Yi(c,c.children),Fi(c),c}function Hi(e,t,n,i,r){1&e&&Pi("Creating element vNodes using createComponentVNode is not allowed. Use Inferno.createVNode method."),(2&e)>0&&(e=t.prototype&&Di(t.prototype.render)?4:8);var o=t.defaultProps;if(!Mi(o))for(var s in n||(n={}),o)Ni(n[s])&&(n[s]=o[s]);if((8&e)>0){var a=t.defaultHooks;if(!Mi(a))if(r)for(var l in a)Ni(r[l])&&(r[l]=a[l]);else r=a}var c=$i(1,null,null,e,i,n,r,t),h=Ji.createVNode;return Di(h)&&h(c),c}function Wi(e,t){return $i(1,Mi(e)?"":e,null,16,t,null,null,null)}function Ui(e){var t=e.props;if(t){var n=e.flags;481&n&&(void 0!==t.children&&Mi(e.children)&&Yi(e,t.children),void 0!==t.className&&(e.className=t.className||null,t.className=void 0)),void 0!==t.key&&(e.key=t.key,t.key=void 0),void 0!==t.ref&&(e.ref=8&n?Bi(e.ref,t.ref):t.ref,t.ref=void 0)}return e}function Gi(e){var t,n=e.flags;if(14&n){var i,r=e.props;if(!Ti(r))for(var o in i={},r)i[o]=r[o];t=Hi(n,e.type,i,e.key,e.ref)}else 481&n?t=zi(n,e.type,e.className,e.children,e.childFlags,e.props,e.key,e.ref):16&n?t=Wi(e.children,e.key):1024&n&&(t=e);return t}function Ki(){return Wi("",null)}function Xi(e,t,n,i){for(var r=e.length;n<r;n++){var o=e[n];if(!Ai(o)){var s=i+Vi+n;if(Ci(o))Xi(o,t,0,s);else{if(Ei(o))o=Wi(o,s);else{var a=o.key,l=Ri(a)&&a[0]===Vi;Ti(o.dom)&&!l||(o=Gi(o)),Ti(a)||l?o.key=s:o.key=i+a}t.push(o)}}}}function Yi(e,t){var n,i=1;if(Ai(t))n=t;else if(Ri(t))i=2,n=Wi(t);else if(Oi(t))i=2,n=Wi(t+"");else if(Ci(t)){var r=t.length;if(0===r)n=null,i=1;else{(Object.isFrozen(t)||!0===t.$)&&(t=t.slice()),i=8;for(var o=0;o<r;o++){var s=t[o];if(Ai(s)||Ci(s)){n=n||t.slice(0,o),Xi(t,n,o,"");break}if(Ei(s))(n=n||t.slice(0,o)).push(Wi(s,Vi+o));else{var a=s.key,l=Ti(s.dom),c=Ti(a),h=!c&&Ri(a)&&a[0]===Vi;!l||c||h?(n=n||t.slice(0,o),l&&!h||(s=Gi(s)),(c||h)&&(s.key=Vi+o),n.push(s)):n&&n.push(s)}}(n=n||t).$=!0}}else n=t,Ti(t.dom)||(n=Gi(t)),i=2;return e.children=n,e.childFlags=i,Fi(e),e}var Ji={afterRender:null,beforeRender:null,createVNode:null,renderComplete:null},Qi="http://www.w3.org/1999/xlink",Zi="http://www.w3.org/XML/1998/namespace",er="http://www.w3.org/2000/svg",tr={"xlink:actuate":Qi,"xlink:arcrole":Qi,"xlink:href":Qi,"xlink:role":Qi,"xlink:show":Qi,"xlink:title":Qi,"xlink:type":Qi,"xml:base":Zi,"xml:lang":Zi,"xml:space":Zi},nr={},ir=[];function rr(e,t){e.appendChild(t)}function or(e,t,n){Mi(n)?rr(e,t):e.insertBefore(t,n)}function sr(e,t,n){e.replaceChild(t,n)}function ar(e){for(var t;void 0!==(t=e.shift());)t()}Object.freeze(nr);var lr={},cr={};function hr(e,t,n){var i=lr[e],r=n.$EV;t?(i||(cr[e]=function(e){var t=function(t){var n=t.type,i="click"===n||"dblclick"===n;if(i&&0!==t.button)return t.stopPropagation(),!1;t.stopPropagation=dr;var r={dom:document};Object.defineProperty(t,"currentTarget",{configurable:!0,get:function(){return r.dom}}),function(e,t,n,i){var r=function(e){return Di(e.composedPath)?e.composedPath()[0]:e.target}(e);for(;!Ti(r);){if(t&&r.disabled)return;var o=r.$EV;if(o){var s=o[n];if(s&&(i.dom=r,s.event?s.event(s.data,e):s(e),e.cancelBubble))return}r=r.parentNode}}(t,i,e,r)};return document.addEventListener(ur(e),t),t}(e),lr[e]=0),r||(r=n.$EV={}),r[e]||lr[e]++,r[e]=t):r&&r[e]&&(lr[e]--,1===i&&(document.removeEventListener(ur(e),cr[e]),cr[e]=null),r[e]=t)}function ur(e){return e.substr(2).toLowerCase()}function dr(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function pr(e,t){var n=document.createElement("i");return n.innerHTML=t,n.innerHTML===e.innerHTML}function fr(e,t,n){if(e[t]){var i=e[t];i.event?i.event(i.data,n):i(n)}else{var r=t.toLowerCase();e[r]&&e[r](n)}}function gr(e,t){var n=function(n){n.stopPropagation();var i=this.$V;if(i){var r=i.props||nr,o=i.dom;if(Ri(e))fr(r,e,n);else for(var s=0;s<e.length;s++)fr(r,e[s],n);if(Di(t)){var a=this.$V,l=a.props||nr;t(l,o,!1,a)}}};return Object.defineProperty(n,"wrapped",{configurable:!1,enumerable:!1,value:!0,writable:!1}),n}function mr(e){return"checkbox"===e||"radio"===e}var yr=gr("onInput",br),vr=gr(["onClick","onChange"],br);function wr(e){e.stopPropagation()}function br(e,t){var n=e.type,i=e.value,r=e.checked,o=e.multiple,s=e.defaultValue,a=!Mi(i);n&&n!==t.type&&t.setAttribute("type",n),Mi(o)||o===t.multiple||(t.multiple=o),Mi(s)||a||(t.defaultValue=s+""),mr(n)?(a&&(t.value=i),Mi(r)||(t.checked=r)):a&&t.value!==i?(t.defaultValue=i,t.value=i):Mi(r)||(t.checked=r)}function xr(e,t){if("optgroup"===e.type){var n=e.children,i=e.childFlags;if(12&i)for(var r=0,o=n.length;r<o;r++)kr(n[r],t);else 2===i&&kr(n,t)}else kr(e,t)}function kr(e,t){var n=e.props||nr,i=e.dom;i.value=n.value,Ci(t)&&-1!==t.indexOf(n.value)||n.value===t?i.selected=!0:Mi(t)&&Mi(n.selected)||(i.selected=n.selected||!1)}wr.wrapped=!0;var _r=gr("onChange",Sr);function Sr(e,t,n,i){var r=Boolean(e.multiple);Mi(e.multiple)||r===t.multiple||(t.multiple=r);var o=i.childFlags;if(!(1&o)){var s=i.children,a=e.value;if(n&&Mi(a)&&(a=e.defaultValue),12&o)for(var l=0,c=s.length;l<c;l++)xr(s[l],a);else 2===o&&xr(s,a)}}var Cr=gr("onInput",Mr),Er=gr("onChange");function Mr(e,t,n){var i=e.value,r=t.value;if(Mi(i)){if(n){var o=e.defaultValue;Mi(o)||o===r||(t.defaultValue=o,t.value=o)}}else r!==i&&(t.defaultValue=i,t.value=i)}function Ar(e,t,n,i,r,o){64&e?br(i,n):256&e?Sr(i,n,r,t):128&e&&Mr(i,n,r),o&&(n.$V=t)}function Dr(e,t,n){64&e?function(e,t){mr(t.type)?(e.onchange=vr,e.onclick=wr):e.oninput=yr}(t,n):256&e?function(e){e.onchange=_r}(t):128&e&&function(e,t){e.oninput=Cr,t.onChange&&(e.onchange=Er)}(t,n)}function Rr(e){return e.type&&mr(e.type)?!Mi(e.checked):!Mi(e.value)}function Or(e,t){Tr(e),t&&e.dom&&(!function(e,t){e.removeChild(t)}(t,e.dom),e.dom=null)}function Tr(e){var t=e.flags;if(481&t){var n=e.ref,i=e.props;Di(n)&&n(null);var r=e.children,o=e.childFlags;if(12&o?Nr(r):2===o&&Tr(r),!Ti(i))for(var s in i)switch(s){case"onClick":case"onDblClick":case"onFocusIn":case"onFocusOut":case"onKeyDown":case"onKeyPress":case"onKeyUp":case"onMouseDown":case"onMouseMove":case"onMouseUp":case"onSubmit":case"onTouchEnd":case"onTouchMove":case"onTouchStart":hr(s,null,e.dom)}}else{var a=e.children;if(a)if(14&t){var l=e.ref;4&t?(Di(a.componentWillUnmount)&&a.componentWillUnmount(),Di(l)&&l(null),a.$UN=!0,a.$LI&&Tr(a.$LI)):(!Mi(l)&&Di(l.onComponentWillUnmount)&&l.onComponentWillUnmount(e.dom,e.props||nr),Tr(a))}else 1024&t&&Or(a,e.type)}}function Nr(e){for(var t=0,n=e.length;t<n;t++)Tr(e[t])}function Pr(e,t){Nr(t),e.textContent=""}function qr(e,t){switch(e){case"animationIterationCount":case"borderImageOutset":case"borderImageSlice":case"borderImageWidth":case"boxFlex":case"boxFlexGroup":case"boxOrdinalGroup":case"columnCount":case"fillOpacity":case"flex":case"flexGrow":case"flexNegative":case"flexOrder":case"flexPositive":case"flexShrink":case"floodOpacity":case"fontWeight":case"gridColumn":case"gridRow":case"lineClamp":case"lineHeight":case"opacity":case"order":case"orphans":case"stopOpacity":case"strokeDasharray":case"strokeDashoffset":case"strokeMiterlimit":case"strokeOpacity":case"strokeWidth":case"tabSize":case"widows":case"zIndex":case"zoom":return t;default:return t+"px"}}function Br(e,t,n,i,r,o,s){switch(e){case"onClick":case"onDblClick":case"onFocusIn":case"onFocusOut":case"onKeyDown":case"onKeyPress":case"onKeyUp":case"onMouseDown":case"onMouseMove":case"onMouseUp":case"onSubmit":case"onTouchEnd":case"onTouchMove":case"onTouchStart":hr(e,n,i);break;case"children":case"childrenType":case"className":case"defaultValue":case"key":case"multiple":case"ref":break;case"autoFocus":i.autofocus=!!n;break;case"allowfullscreen":case"autoplay":case"capture":case"checked":case"controls":case"default":case"disabled":case"hidden":case"indeterminate":case"loop":case"muted":case"novalidate":case"open":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"selected":i[e]=!!n;break;case"defaultChecked":case"value":case"volume":if(o&&"value"===e)return;var a=Mi(n)?"":n;i[e]!==a&&(i[e]=a);break;case"dangerouslySetInnerHTML":var l=t&&t.__html||"",c=n&&n.__html||"";l!==c&&(Mi(c)||pr(i,c)||(Ti(s)||(12&s.childFlags?Nr(s.children):2===s.childFlags&&Tr(s.children),s.children=null,s.childFlags=1),i.innerHTML=c));break;default:"o"===e[0]&&"n"===e[1]?function(e,t,n){var i=e.toLowerCase();if(Di(t)||Mi(t)){var r=n[i];r&&r.wrapped||(n[i]=t)}else{var o=t.event;o&&Di(o)?n[i]=function(e,t){return function(n){e(t.data,n)}}(o,t):Pi('an event on a VNode "'+e+'". was not a function or a valid linkEvent.')}}(e,n,i):Mi(n)?i.removeAttribute(e):"style"===e?function(e,t,n){var i,r,o=n.style;if(Ri(t))o.cssText=t;else if(Mi(e)||Ri(e))for(i in t)r=t[i],o[i]=Oi(r)?qr(i,r):r;else{for(i in t)(r=t[i])!==e[i]&&(o[i]=Oi(r)?qr(i,r):r);for(i in e)Mi(t[i])&&(o[i]="")}}(t,n,i):r&&tr[e]?i.setAttributeNS(tr[e],e,n):i.setAttribute(e,n)}}function Lr(e,t,n,i,r){var o=!1,s=(448&t)>0;for(var a in s&&(o=Rr(n))&&Dr(t,i,n),n)Br(a,null,n[a],i,r,o,null);s&&Ar(t,e,i,n,!0,o)}function Ir(e,t,n,i){var r=new t(n,i);if(e.children=r,r.$V=e,r.$BS=!1,r.context=i,r.props===nr&&(r.props=n),r.$UN=!1,Di(r.componentWillMount)){if(r.$BR=!0,r.componentWillMount(),r.$PSS){var o=r.state,s=r.$PS;if(Ti(o))r.state=s;else for(var a in s)o[a]=s[a];r.$PSS=!1,r.$PS=null}r.$BR=!1}Di(Ji.beforeRender)&&Ji.beforeRender(r);var l,c=Fr(r.render(n,r.state,i),e);return Di(r.getChildContext)&&(l=r.getChildContext()),Mi(l)?r.$CX=i:r.$CX=Bi(i,l),Di(Ji.afterRender)&&Ji.afterRender(r),r.$LI=c,r}function Fr(e,t){return Ci(e)&&Pi("a valid Inferno VNode (or null) must be returned from a component render. You may have returned an array or an invalid object."),Ai(e)?e=Ki():Ei(e)?e=Wi(e,null):(e.dom&&(e=Gi(e)),14&e.flags&&(e.parentVNode=t)),e}function jr(e,t,n,i){var r=e.flags;return 481&r?$r(e,t,n,i):14&r?function(e,t,n,i,r){var o,s=e.type,a=e.props||nr,l=e.ref;if(r){var c=Ir(e,s,a,n);e.dom=o=jr(c.$LI,null,c.$CX,i),Hr(e,l,c),c.$UPD=!1}else{var h=Fr(s(a,n),e);e.children=h,e.dom=o=jr(h,null,n,i),Wr(a,l,o)}Ti(t)||rr(t,o);return o}(e,t,n,i,(4&r)>0):512&r||16&r?Vr(e,t):1024&r?(jr(e.children,e.type,n,!1),e.dom=Vr(Ki(),t)):void Pi("object"==typeof e?"mount() received an object that's not a valid VNode, you should stringify it first, fix createVNode flags or call normalizeChildren. Object: \""+JSON.stringify(e)+'".':'mount() expects a valid VNode, instead it received an object with the type "'+typeof e+'".')}function Vr(e,t){var n=e.dom=document.createTextNode(e.children);return Ti(t)||rr(t,n),n}function $r(e,t,n,i){var r=e.flags,o=e.children,s=e.props,a=e.className,l=e.ref,c=e.childFlags;i=i||(32&r)>0;var h=function(e,t){return t?document.createElementNS(er,e):document.createElement(e)}(e.type,i);if(e.dom=h,Mi(a)||""===a||(i?h.setAttribute("class",a):h.className=a),ji(e),Ti(t)||rr(t,h),!(1&c)){var u=!0===i&&"foreignObject"!==e.type;2===c?jr(o,h,n,u):12&c&&zr(o,h,n,u)}return Ti(s)||Lr(e,r,s,h,i),Ri(l)&&Pi('string "refs" are not supported in Inferno 1.0. Use callback "refs" instead.'),Di(l)&&Ur(h,l),h}function zr(e,t,n,i){for(var r=0,o=e.length;r<o;r++){var s=e[r];Ti(s.dom)||(e[r]=s=Gi(s)),jr(s,t,n,i)}}function Hr(e,t,n){Di(t)?t(n):Ei(t)?Pi('string "refs" are not supported in Inferno 1.0. Use callback "refs" instead.'):!Mi(t)&&"object"==typeof t&&4&e.flags&&Pi("functional component lifecycle events are not supported on ES2015 class components."),Di(n.componentDidMount)&&ir.push(function(e){return function(){e.$UPD=!0,e.componentDidMount(),e.$UPD=!1}}(n))}function Wr(e,t,n){Mi(t)||(Di(t.onComponentWillMount)&&t.onComponentWillMount(e),Di(t.onComponentDidMount)&&ir.push(function(e,t,n){return function(){return e.onComponentDidMount(t,n)}}(t,n,e)))}function Ur(e,t){ir.push((function(){return t(e)}))}function Gr(e,t,n,i){var r=e.children,o=e.props,s=e.className,a=e.flags,l=e.ref;if(i=i||(32&a)>0,1!==t.nodeType||t.tagName.toLowerCase()!==e.type){qi("Inferno hydration: Server-side markup doesn't match client-side markup or Initial render target is not empty");var c=$r(e,null,n,i);e.dom=c,sr(t.parentNode,c,t)}else{e.dom=t;var h=t.firstChild,u=e.childFlags;if(1&u)Ti(t.firstChild)||function(e,t){return Boolean(t&&t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html&&pr(e,t.dangerouslySetInnerHTML.__html))}(t,o)||(t.textContent="",448&a&&(t.defaultValue=""));else{for(var d=null;h;)d=h.nextSibling,8===h.nodeType&&("!"===h.data?t.replaceChild(document.createTextNode(""),h):t.removeChild(h)),h=d;if(h=t.firstChild,2===u)Ti(h)?jr(r,t,n,i):(d=h.nextSibling,Kr(r,h,n,i),h=d);else if(12&u)for(var p=0,f=r.length;p<f;p++){var g=r[p];Ti(h)?jr(g,t,n,i):(d=h.nextSibling,Kr(g,h,n,i),h=d)}for(;h;)d=h.nextSibling,t.removeChild(h),h=d}Ti(o)||Lr(e,a,o,t,i),Mi(s)?""!==t.className&&t.removeAttribute("class"):i?t.setAttribute("class",s):t.className=s,Di(l)?Ur(t,l):Ri(l)&&Pi('string "refs" are not supported in Inferno 1.0. Use callback "refs" instead.')}}function Kr(e,t,n,i){var r=e.flags;14&r?function(e,t,n,i,r){var o=e.type,s=e.ref,a=e.props||nr;if(r){var l=Ir(e,o,a,n),c=l.$LI;Kr(c,t,l.$CX,i),e.dom=c.dom,Hr(e,s,l),l.$UPD=!1}else{var h=Fr(o(a,n),e);Kr(h,t,n,i),e.children=h,e.dom=h.dom,Wr(a,s,t)}}(e,t,n,i,(4&r)>0):481&r?Gr(e,t,n,i):16&r?function(e,t){if(3!==t.nodeType){var n=Vr(e,null);e.dom=n,sr(t.parentNode,n,t)}else{var i=e.children;t.nodeValue!==i&&(t.nodeValue=i),e.dom=t}}(e,t):512&r?e.dom=t:(Pi('hydrate() expects a valid VNode, instead it received an object with the type "'+typeof e+'".'),Pi())}function Xr(e,t,n,i,r){Tr(e),sr(n,jr(t,null,i,r),e.dom)}function Yr(e,t,n,i,r){var o=0|t.flags;e.flags!==o||2048&o?Xr(e,t,n,i,r):481&o?function(e,t,n,i,r,o){var s=t.type;if(e.type!==s)Xr(e,t,n,i,r);else{var a,l=e.dom,c=e.props,h=t.props,u=!1,d=!1;if(t.dom=l,r=r||(32&o)>0,c!==h){var p=c||nr;if((a=h||nr)!==nr)for(var f in(u=(448&o)>0)&&(d=Rr(a)),a){var g=p[f],m=a[f];g!==m&&Br(f,g,m,l,r,d,e)}if(p!==nr)for(var y in p)a.hasOwnProperty(y)||Mi(p[y])||Br(y,p[y],null,l,r,d,e)}var v=e.children,w=t.children,b=t.ref,x=e.className,k=t.className;ji(t),4096&o?function(e,t){e.textContent!==t.children&&(e.textContent=t.children)}(l,w):Jr(e.childFlags,t.childFlags,v,w,l,i,r&&"foreignObject"!==s),u&&Ar(o,t,l,a,!1,d),x!==k&&(Mi(k)?l.removeAttribute("class"):r?l.setAttribute("class",k):l.className=k),Di(b)&&e.ref!==b?Ur(l,b):Ri(b)&&Pi('string "refs" are not supported in Inferno 1.0. Use callback "refs" instead.')}}(e,t,n,i,r,o):14&o?function(e,t,n,i,r,o){var s=t.type,a=e.key,l=t.key;if(e.type!==s||a!==l)Xr(e,t,n,i,r);else{var c=t.props||nr;if(o){var h=e.children;h.$UPD=!0,h.$V=t,Qr(h,h.state,t,c,n,i,r,!1,!1),h.$UPD=!1}else{var u=!0,d=e.props,p=t.ref,f=!Mi(p),g=e.children;if(t.dom=e.dom,t.children=g,f&&Di(p.onComponentShouldUpdate)&&(u=p.onComponentShouldUpdate(d,c)),!1!==u){f&&Di(p.onComponentWillUpdate)&&p.onComponentWillUpdate(d,c);var m=s(c,i);m!==ki&&(Yr(g,m=Fr(m,t),n,i,r),t.children=m,t.dom=m.dom,f&&Di(p.onComponentDidUpdate)&&p.onComponentDidUpdate(d,c))}else 14&g.flags&&(g.parentVNode=t)}}}(e,t,n,i,r,(4&o)>0):16&o?function(e,t){var n=t.children,i=e.dom;n!==e.children&&(i.nodeValue=n);t.dom=i}(e,t):512&o?t.dom=e.dom:function(e,t,n){var i=e.type,r=t.type,o=t.children;if(Jr(e.childFlags,t.childFlags,e.children,o,i,n,!1),t.dom=e.dom,i!==r&&!Ai(o)){var s=o.dom;i.removeChild(s),r.appendChild(s)}}(e,t,i)}function Jr(e,t,n,i,r,o,s){switch(e){case 2:switch(t){case 2:Yr(n,i,r,o,s);break;case 1:Or(n,r);break;default:Or(n,r),zr(i,r,o,s)}break;case 1:switch(t){case 2:jr(i,r,o,s);break;case 1:break;default:zr(i,r,o,s)}break;default:if(12&t){var a=n.length,l=i.length;0===a?l>0&&zr(i,r,o,s):0===l?Pr(r,n):8===t&&8===e?function(e,t,n,i,r,o,s){var a,l,c=o-1,h=s-1,u=0,d=e[u],p=t[u];e:{for(;d.key===p.key;){if(p.dom&&(t[u]=p=Gi(p)),Yr(d,p,n,i,r),e[u]=p,++u>c||u>h)break e;d=e[u],p=t[u]}for(d=e[c],p=t[h];d.key===p.key;){if(p.dom&&(t[h]=p=Gi(p)),Yr(d,p,n,i,r),e[c]=p,h--,u>--c||u>h)break e;d=e[c],p=t[h]}}if(u>c){if(u<=h)for(var f=(l=h+1)<s?t[l].dom:null;u<=h;)(p=t[u]).dom&&(t[u]=p=Gi(p)),u++,or(n,jr(p,null,i,r),f)}else if(u>h)for(;u<=c;)Or(e[u++],n);else{var g=u,m=u,y=c-u+1,v=h-u+1,w=[];for(a=0;a<v;a++)w.push(0);var b=y===o,x=!1,k=0,_=0;if(s<4||(y|v)<32)for(a=g;a<=c;a++)if(d=e[a],_<v){for(u=m;u<=h;u++)if(p=t[u],d.key===p.key){if(w[u-m]=a+1,b)for(b=!1;a>g;)Or(e[g++],n);k>u?x=!0:k=u,p.dom&&(t[u]=p=Gi(p)),Yr(d,p,n,i,r),_++;break}!b&&u>h&&Or(d,n)}else b||Or(d,n);else{var S={};for(a=m;a<=h;a++)S[t[a].key]=a;for(a=g;a<=c;a++)if(d=e[a],_<v)if(void 0!==(u=S[d.key])){if(b)for(b=!1;a>g;)Or(e[g++],n);p=t[u],w[u-m]=a+1,k>u?x=!0:k=u,p.dom&&(t[u]=p=Gi(p)),Yr(d,p,n,i,r),_++}else b||Or(d,n);else b||Or(d,n)}if(b)Pr(n,e),zr(t,n,i,r);else if(x){var C=function(e){var t,n,i,r,o,s=e.slice(),a=[0],l=e.length;for(t=0;t<l;t++){var c=e[t];if(0!==c){if(e[n=a[a.length-1]]<c){s[t]=n,a.push(t);continue}for(i=0,r=a.length-1;i<r;)e[a[o=(i+r)/2|0]]<c?i=o+1:r=o;c<e[a[i]]&&(i>0&&(s[t]=a[i-1]),a[i]=t)}}i=a.length,r=a[i-1];for(;i-- >0;)a[i]=r,r=s[r];return a}(w);for(u=C.length-1,a=v-1;a>=0;a--)0===w[a]?((p=t[k=a+m]).dom&&(t[k]=p=Gi(p)),l=k+1,or(n,jr(p,null,i,r),l<s?t[l].dom:null)):u<0||a!==C[u]?(l=(k=a+m)+1,or(n,(p=t[k]).dom,l<s?t[l].dom:null)):u--}else if(_!==v)for(a=v-1;a>=0;a--)0===w[a]&&((p=t[k=a+m]).dom&&(t[k]=p=Gi(p)),l=k+1,or(n,jr(p,null,i,r),l<s?t[l].dom:null))}}(n,i,r,o,s,a,l):function(e,t,n,i,r,o,s){for(var a,l,c=o>s?s:o,h=0;h<c;h++)a=t[h],l=e[h],a.dom&&(a=t[h]=Gi(a)),Yr(l,a,n,i,r),e[h]=a;if(o<s)for(h=c;h<s;h++)(a=t[h]).dom&&(a=t[h]=Gi(a)),jr(a,n,i,r);else if(o>s)for(h=c;h<o;h++)Or(e[h],n)}(n,i,r,o,s,a,l)}else 1===t?Pr(r,n):2===t&&(Pr(r,n),jr(i,r,o,s))}}function Qr(e,t,n,i,r,o,s,a,l){var c,h=e.state,u=e.props;if(n.children=e,e.$UN)qi("Inferno Error: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.");else{if(u!==i||i===nr){if(!l&&Di(e.componentWillReceiveProps)){if(e.$BR=!0,e.componentWillReceiveProps(i,o),e.$UN)return;e.$BR=!1}e.$PSS&&(t=Bi(t,e.$PS),e.$PSS=!1,e.$PS=null)}var d=Boolean(e.shouldComponentUpdate);if(a||!d||d&&e.shouldComponentUpdate(i,t,o)){Di(e.componentWillUpdate)&&(e.$BS=!0,e.componentWillUpdate(i,t,o),e.$BS=!1),e.props=i,e.state=t,e.context=o,Di(Ji.beforeRender)&&Ji.beforeRender(e),c=e.render(i,t,o),Di(Ji.afterRender)&&Ji.afterRender(e);var p,f=c!==ki;if(Di(e.getChildContext)&&(p=e.getChildContext()),p=Mi(p)?o:Bi(o,p),e.$CX=p,f){var g=e.$LI,m=Fr(c,n);Yr(g,m,r,p,s),e.$LI=m,Di(e.componentDidUpdate)&&e.componentDidUpdate(u,h)}}else e.props=i,e.state=t,e.context=o;n.dom=e.$LI.dom}}Si&&null===document.body&&qi('Inferno warning: you cannot initialize inferno without "document.body". Wait on "DOMContentLoaded" event, add script to bottom of body, or use async/defer attributes on script tag.');var Zr=Si?document.body:null;function eo(e,t,n){if(Zr===t&&Pi('you cannot render() to the "document.body". Use an empty element as a container instead.'),e!==ki){var i=t.$V;return Mi(i)?Ai(e)||(e.dom&&(e=Gi(e)),Ti(t.firstChild)?(jr(e,t,nr,!1),t.$V=e):function(e,t,n){var i=t.firstChild;if(!Ti(i))for(Ai(e)||Kr(e,i,nr,!1),i=t.firstChild;i=i.nextSibling;)t.removeChild(i);ir.length>0&&ar(ir),t.$V=e,Di(n)&&n()}(e,t),i=e):Mi(e)?(Or(i,t),t.$V=null):(e.dom&&(e=Gi(e)),Yr(i,e,t,nr,!1),i=t.$V=e),ir.length>0&&ar(ir),Di(n)&&n(),Di(Ji.renderComplete)&&Ji.renderComplete(i),i&&14&i.flags?i.children:void 0}}var to="undefined"==typeof Promise?null:Promise.resolve(),no="undefined"==typeof requestAnimationFrame?setTimeout:requestAnimationFrame.bind(window);function io(e,t,n,i){Di(t)&&(t=t(e.state,e.props,e.context));var r,o=e.$PS;if(Mi(o))e.$PS=t;else for(var s in t)o[s]=t[s];if(e.$PSS||e.$BR)e.$PSS=!0,e.$BR&&Di(n)&&ir.push(n.bind(e));else if(e.$UPD){var a=e.$QU;Ti(a)&&(a=e.$QU=[],r=function(e,t){return function(){e.$QU=null,e.$UPD=!0,ro(e,!1,(function(){for(var n=0,i=t.length;n<i;n++)t[n].call(e)})),e.$UPD=!1}}(e,a),to?to.then(r):no(r)),Di(n)&&a.push(n)}else e.$PSS=!0,e.$UPD=!0,ro(e,i,n),e.$UPD=!1}function ro(e,t,n){if(!e.$UN){if(t||!e.$BR){e.$PSS=!1;var i=e.$PS,r=Bi(e.state,i),o=e.props,s=e.context;e.$PS=null;var a=e.$V,l=e.$LI;if(Qr(e,r,a,o,l.dom&&l.dom.parentNode,s,(32&a.flags)>0,t,!0),e.$UN)return;if(!(1024&e.$LI.flags))for(var c=e.$LI.dom;!Ti(a=a.parentVNode);)(14&a.flags)>0&&(a.dom=c);ir.length>0&&ar(ir)}else e.state=e.$PS,e.$PS=null;Di(n)&&n.call(e)}}var oo=function(){function e(e,t){this.state=null,this.props=void 0,this.context=void 0,this.refs=void 0,this.$BR=!1,this.$BS=!0,this.$PSS=!1,this.$PS=null,this.$LI=null,this.$V=null,this.$UN=!1,this.$CX=null,this.$UPD=!0,this.$QU=null,this.props=e||nr,this.context=t||nr}var t=e.prototype;return t.forceUpdate=function(e){this.$UN||io(this,{},e,!0)},t.setState=function(e,t){this.$UN||(this.$BS?Pi("cannot update state via setState() in componentWillUpdate() or constructor."):io(this,e,t,!1))},t.render=function(e,t,n){},e}();oo.defaultProps=void 0;var so=function(){};console.info("Inferno is in development mode."),-1===(so.name||so.toString()).indexOf("testFn")&&qi("It looks like you're using a minified copy of the development build of Inferno. When deploying Inferno apps to production, make sure to use the production build which skips development warnings and is faster. See http://infernojs.org for more details.");var ao='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21" style="vertical-align:middle"><path fill="#000000" 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="#000000" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>'; method in Ot
H A Ddmn-navigated-viewer.production.min.js2 !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).DmnJS=t()}(this,(function(){"use strict";const e=Object.prototype.toString,t=Object.prototype.hasOwnProperty;function n(e){return void 0!==e}function i(t){return"[object Array]"===e.call(t)}function r(t){return"[object Object]"===e.call(t)}function o(t){return"[object Number]"===e.call(t)}function s(t){const n=e.call(t);return"[object Function]"===n||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n}function a(t){return"[object String]"===e.call(t)}function l(e,n){return!(null==e)&&t.call(e,n)}function c(e,t){const n=v(t);let i;return u(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function h(e,t){const n=v(t);let i=[];return u(e,(function(e,t){n(e,t)&&i.push(e)})),i}function u(e,t){let n,r;if(void 0===e)return;const o=i(e)?w:y;for(let i in e)if(l(e,i)&&(n=e[i],r=t(n,o(i)),!1===r))return n}function d(e,t,n){return u(e,(function(e,i){n=t(n,e,i)})),n}function p(e,t){return!!d(e,(function(e,n,i){return e&&t(n,i)}),!0)}function f(e,t){let n=[];return u(e,(function(e,i){n.push(t(e,i))})),n}function g(e,t){t=function(e){return s(e)?e:t=>t[e]}(t);let n=[];return u(e,(function(e,i){let r=t(e,i),o={d:r,v:e};for(var s=0;s<n.length;s++){let{d:e}=n[s];if(r<e)return void n.splice(s,0,o)}n.push(o)})),f(n,(e=>e.v))}function m(e){return function(t){return p(e,(function(e,n){return t[n]===e}))}}function v(e){return s(e)?e:t=>t===e}function y(e){return e}function w(e){return Number(e)}function b(e,t){let n,i,r,o;function s(n){let s=Date.now(),c=n?0:o+t-s;if(c>0)return a(c);e.apply(r,i),l()}function a(e){n=setTimeout(s,e)}function l(){n&&clearTimeout(n),n=o=i=r=void 0}function c(...e){o=Date.now(),i=e,r=this,n||a(t)}return c.flush=function(){n&&s(!0),l()},c.cancel=l,c}function x(e,t){return e.bind(t)}function _(e,...t){return Object.assign(e,...t)}var S="__fn",k=Array.prototype.slice;function C(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function E(){}C.prototype.on=function(e,t,n,r){if(e=i(e)?e:[e],s(t)&&(r=n,n=t,t=1e3),!o(t))throw new Error("priority must be a number");var a=n;r&&((a=x(n,r))[S]=n[S]||n);var l=this;e.forEach((function(e){l._addListener(e,{priority:t,callback:a,next:null})}))},C.prototype.once=function(e,t,n,i){var r=this;if(s(t)&&(i=n,n=t,t=1e3),!o(t))throw new Error("priority must be a number");function a(){a.__isTomb=!0;var t=n.apply(i,arguments);return r.off(e,a),t}a[S]=n,this.on(e,t,a)},C.prototype.off=function(e,t){e=i(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},C.prototype.createEvent=function(e){var t=new E;return t.init(e),t},C.prototype.fire=function(e,t){var n,i,r,o;if(o=k.call(arguments),"object"==typeof e&&(e=(t=e).type),!e)throw new Error("no event type specified");if(i=this._listeners[e]){n=t instanceof E?t:this.createEvent(t),o[0]=n;var s=n.type;e!==s&&(n.type=e);try{r=this._invokeListeners(n,o,i)}finally{e!==s&&(n.type=s)}return void 0===r&&n.defaultPrevented&&(r=!1),r}},C.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},C.prototype._destroy=function(){this._listeners={}},C.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},C.prototype._invokeListener=function(e,t,n){var i;if(n.callback.__isTomb)return i;try{i=function(e,t){return e.apply(null,t)}(n.callback,t),void 0!==i&&(e.returnValue=i,e.stopPropagation()),!1===i&&e.preventDefault()}catch(e){if(!this.handleError(e))throw console.error("unhandled error in event listener",e),e}return i},C.prototype._addListener=function(e,t){var n,i=this._getListeners(e);if(i){for(;i;){if(i.priority<t.priority)return t.next=i,void(n?n.next=t:this._setListeners(e,t));n=i,i=i.next}n.next=t}else this._setListeners(e,t)},C.prototype._getListeners=function(e){return this._listeners[e]},C.prototype._setListeners=function(e,t){this._listeners[e]=t},C.prototype._removeListener=function(e,t){var n,i,r,o=this._getListeners(e);if(t)for(;o;)n=o.next,(r=o.callback)!==t&&r[S]!==t||(i?i.next=n:this._setListeners(e,n)),i=o,o=n;else this._setListeners(e,null)},E.prototype.stopPropagation=function(){this.cancelBubble=!0},E.prototype.preventDefault=function(){this.defaultPrevented=!0},E.prototype.init=function(e){_(this,e||{})};var M=Object.prototype.toString;function A(){return A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},A.apply(this,arguments)}function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return A.apply(void 0,[e].concat(n))}var T=Object.prototype.toString,D=Object.prototype.hasOwnProperty;function O(e){return"[object String]"===T.call(e)}function N(e,t){return D.call(e,t)}function P(e,t){var n;if(void 0!==e){var i=function(e){return"[object Array]"===T.call(e)}(e)?B:q;for(var r in e)if(N(e,r)&&!1===t(n=e[r],i(r)))return n}}function q(e){return e}function B(e){return Number(e)}function L(e,t){return e.bind(t)}function I(){return I=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},I.apply(this,arguments)}function j(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return I.apply(void 0,[e].concat(n))}function F(){}function V(e,t){this.model=e,this.properties=t}F.prototype.get=function(e){return this.$model.properties.get(this,e)},F.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},V.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(F.prototype);P(e.properties,(function(e){e.isMany||void 0===e.default||(i[e.name]=e.default)})),n.defineModel(i,t),n.defineDescriptor(i,e);var r=e.ns.name;function o(e){n.define(this,"$type",{value:r,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),P(e,L((function(e,t){this.set(t,e)}),this))}return o.prototype=i,o.hasType=i.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var $={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},z={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 H(e,t){var n=z[e];return n?n(t):t}function W(e){return!!$[e]}function U(e){return!!z[e]}function G(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function K(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function X(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,P(e,L(this.registerPackage,this))}function Y(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function J(e){this.model=e}function Q(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function Z(e){this.properties=new J(this),this.factory=new V(this,this.properties),this.registry=new X(e,this.properties),this.typeCache={}}K.prototype.build=function(){return e=this,t=["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"],n={},i=Object(e),P(t,(function(t){t in i&&(n[t]=e[t])})),n;var e,t,n,i},K.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},K.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=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=r.indexOf(e);if(-1===a)throw new Error("property <"+i.name+"> not found in property list");r.splice(a,1),this.addProperty(t,n?void 0:a,s),o[i.name]=o[i.localName]=t},K.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=G(r[0],i),s=G(r[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},K.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},K.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},K.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},K.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},K.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},K.prototype.hasProperty=function(e){return this.propertiesByName[e]},K.prototype.addTrait=function(e,t){var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(P(e.properties,L((function(n){n=j({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var i=n.replaces,r=n.redefines;i||r?this.redefineProperty(n,i||r,i):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))}),this)),i.push(e),n[r]=e)},X.prototype.getPackage=function(e){return this.packageMap[e]},X.prototype.getPackages=function(){return this.packages},X.prototype.registerPackage=function(e){e=j({},e);var t=this.packageMap;Y(t,e,"prefix"),Y(t,e,"uri"),P(e.types,L((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},X.prototype.registerType=function(e,t){var n=G((e=j({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:j(e.meta||{})})).name,t.prefix),i=n.name,r={};P(e.properties,L((function(e){var t=G(e.name,n.prefix),i=t.name;W(e.type)||(e.type=G(e.type,t.prefix).name),j(e,{ns:t,name:i}),r[i]=e}),this)),j(e,{ns:n,name:i,propertiesByName:r}),P(e.extends,L((function(e){var t=this.typeMap[e];t.traits=t.traits||[],t.traits.push(i)}),this)),this.definePackage(e,t),this.typeMap[i]=e},X.prototype.mapTypes=function(e,t,n){var i=W(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(e){return s(e,!0)}function s(n,i){var o=G(n,W(n)?"":e.prefix);r.mapTypes(o,t,i)}if(!i)throw new Error("unknown type <"+e.name+">");P(i.superClass,n?o:s),t(i,!n),P(i.traits,o)},X.prototype.getEffectiveDescriptor=function(e){var t=G(e),n=new K(t);this.mapTypes(t,(function(e,t){n.addTrait(e,t)}));var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},X.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},J.prototype.set=function(e,t,n){if(!O(t)||!t.length)throw new TypeError("property name must be a non-empty string");var i=this.model.getPropertyDescriptor(e,t),r=i&&i.name;void 0===n?i?delete e[r]:delete e.$attrs[t]:i?r in e?e[r]=n:Q(e,i,n):e.$attrs[t]=n},J.prototype.get=function(e,t){var n=this.model.getPropertyDescriptor(e,t);if(!n)return e.$attrs[t];var i=n.name;return!e[i]&&n.isMany&&Q(e,n,[]),e[i]},J.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;delete(n=j({},n,{get:function(){return i}})).value}Object.defineProperty(e,t,n)},J.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},J.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},Z.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},Z.prototype.getType=function(e){var t=this.typeCache,n=O(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},Z.prototype.createAny=function(e,t,n){var i=G(e),r={$type:e,$instanceOf:function(e){return e===this.$type}},o={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};return this.properties.defineDescriptor(r,o),this.properties.defineModel(r,this),this.properties.define(r,"$parent",{enumerable:!1,writable:!0}),this.properties.define(r,"$instanceOf",{enumerable:!1,writable:!0}),P(n,(function(e,t){var n;n=e,"[object Object]"===T.call(n)&&void 0!==e.value?r[e.name]=e.value:r[t]=e})),r},Z.prototype.getPackage=function(e){return this.registry.getPackage(e)},Z.prototype.getPackages=function(){return this.registry.getPackages()},Z.prototype.getElementDescriptor=function(e){return e.$descriptor},Z.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},Z.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},Z.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var ee=Object.prototype.toString,te=Object.prototype.hasOwnProperty;function ne(e){return"[object Array]"===ee.call(e)}function ie(e){return"[object String]"===ee.call(e)}function re(e,t){return te.call(e,t)}function oe(e,t){var n;return t=le(t),ae(e,(function(e,i){if(t(e,i))return n=e,!1})),n}function se(e,t){var n=[];return ae(e,(function(e,i){t(e,i)&&n.push(e)})),n}function ae(e,t){var n;if(void 0!==e){var i=ne(e)?he:ce;for(var r in e)if(re(e,r)&&!1===t(n=e[r],i(r)))return n}}function le(e){return t=e,"[object Function]"===(n=ee.call(t))||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n?e:function(t){return t===e};var t,n}function ce(e){return e}function he(e){return Number(e)}function ue(){return ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ue.apply(this,arguments)}function de(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return ue.apply(void 0,[e].concat(n))}var pe=String.fromCharCode,fe=Object.prototype.hasOwnProperty,ge=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,me={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function ve(e,t,n,i){return i?fe.call(me,i)?me[i]:"&"+i+";":pe(t||parseInt(n,16))}function ye(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(ge,ve):e}Object.keys(me).forEach((function(e){me[e.toUpperCase()]=me[e]}));var we="xsi:type",be="non-whitespace outside of root node";function xe(e){return new Error(e)}function _e(e){return"missing namespace for prefix <"+e+">"}function Se(e){return{get:e,enumerable:!0}}function ke(e){var t,n={};for(t in e)n[t]=e[t];return n}function Ce(e){return e+"$uri"}function Ee(){return{line:0,column:0}}function Me(e){throw e}function Ae(e){if(!this)return new Ae(e);var t,n,i,r,o,s,a,l,c,h=e&&e.proxy,u=Me,d=Ee,p=!1,f=!1,g=null,m=!1;function v(e){e instanceof Error||(e=xe(e)),g=e,u(e,d)}function y(e){o&&(e instanceof Error||(e=xe(e)),o(e,d))}this.on=function(e,c){if("function"!=typeof c)throw xe("required args <name, cb>");switch(e){case"openTag":n=c;break;case"text":t=c;break;case"closeTag":i=c;break;case"error":u=c;break;case"warn":o=c;break;case"cdata":r=c;break;case"attention":l=c;break;case"question":a=c;break;case"comment":s=c;break;default:throw xe("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw xe("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 xe("required args <xml=string>");return g=null,function(e){var o,u,g,w,b,x,_,S,k,C,E,M=f?[]:null,A=f?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[Ce(n)]=t;return i}(c):null,R=[],T=0,D=!1,O=!1,N=0,P=0,q="",B=0;function L(){if(null!==E)return E;var e,t,n,i,r,o,s,a,l,h,u,d=f&&A.xmlns,g=f&&p?[]:null,m=B,v=q,w=v.length,b={},x={};e:for(;m<w;m++)if(l=!1,!(32===(h=v.charCodeAt(m))||h<14&&h>8)){for((h<65||h>122||h>90&&h<97)&&95!==h&&58!==h&&(y("illegal first char attribute name"),l=!0),u=m+1;u<w;u++)if(!((h=v.charCodeAt(u))>96&&h<123||h>64&&h<91||h>47&&h<59||46===h||45===h||95===h)){if(32===h||h<14&&h>8){y("missing attribute value"),m=u;continue e}if(61===h)break;y("illegal attribute name char"),l=!0}if("xmlns:xmlns"===(a=v.substring(m,u))&&(y("illegal declaration of xmlns"),l=!0),34===(h=v.charCodeAt(u+1)))-1===(u=v.indexOf('"',m=u+2))&&-1!==(u=v.indexOf("'",m))&&(y("attribute value quote missmatch"),l=!0);else if(39===h)-1===(u=v.indexOf("'",m=u+2))&&-1!==(u=v.indexOf('"',m))&&(y("attribute value quote missmatch"),l=!0);else for(y("missing attribute value quotes"),l=!0,u+=1;u<w&&!(32===(h=v.charCodeAt(u+1))||h<14&&h>8);u++);for(-1===u&&(y("missing closing quotes"),u=w,l=!0),l||(o=v.substring(m,u)),m=u;u+1<w&&!(32===(h=v.charCodeAt(u+1))||h<14&&h>8);u++)m===u&&(y("illegal character after attribute end"),l=!0);if(m=u+1,!l)if(a in x)y("attribute <"+a+"> already defined");else if(x[a]=!0,f)if(p){if(null!==(r="xmlns"===a?"xmlns":120===a.charCodeAt(0)&&"xmlns:"===a.substr(0,6)?a.substr(6):null)){if(e=ye(o),t=Ce(r),!(s=c[e])){if("xmlns"===r||t in A&&A[t]!==e)do{s="ns"+T++}while(void 0!==A[s]);else s=r;c[e]=s}A[r]!==s&&(i||(A=ke(A),i=!0),A[r]=s,"xmlns"===r&&(A[Ce(s)]=e,d=s),A[t]=e),b[a]=o;continue}g.push(a,o)}else-1!==(h=a.indexOf(":"))?(n=A[a.substring(0,h)])?((a=d===n?a.substr(h+1):n+a.substr(h))===we&&(-1!==(h=o.indexOf(":"))?(n=o.substring(0,h),o=(n=A[n]||n)+o.substring(h)):o=d+":"+o),b[a]=o):y(_e(a.substring(0,h))):b[a]=o;else b[a]=o}if(p)for(m=0,w=g.length;m<w;m++){if(a=g[m++],o=g[m],-1!==(h=a.indexOf(":"))){if(!(n=A[a.substring(0,h)])){y(_e(a.substring(0,h)));continue}(a=d===n?a.substr(h+1):n+a.substr(h))===we&&(-1!==(h=o.indexOf(":"))?(n=o.substring(0,h),o=(n=A[n]||n)+o.substring(h)):o=d+":"+o)}b[a]=o}return E=b}function I(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,o=0,s=0,a=P;N>=s&&(t=i.exec(e))&&!((a=t[0].length+t.index)>N);)r+=1,s=a;return-1==N?(o=a,n=e.substring(P)):0===P?n=e.substring(P,N):(o=N-s,n=-1==P?e.substring(N):e.substring(N,P+1)),{data:n,line:r,column:o}}d=I,h&&(C=Object.create({},{name:Se((function(){return S})),originalName:Se((function(){return k})),attrs:Se(L),ns:Se((function(){return A}))}));for(;-1!==P;){if(-1===(N=60===e.charCodeAt(P)?P:e.indexOf("<",P)))return R.length?v("unexpected end of file"):0===P?v("missing start tag"):void(P<e.length&&e.substring(P).trim()&&y(be));if(P!==N)if(R.length){if(t&&(t(e.substring(P,N),ye,d),m))return}else if(e.substring(P,N).trim()&&(y(be),m))return;if(33===(b=e.charCodeAt(N+1))){if(91===(w=e.charCodeAt(N+2))&&"CDATA["===e.substr(N+3,6)){if(-1===(P=e.indexOf("]]>",N)))return v("unclosed cdata");if(r&&(r(e.substring(N+9,P),d),m))return;P+=3;continue}if(45===w&&45===e.charCodeAt(N+3)){if(-1===(P=e.indexOf("--\x3e",N)))return v("unclosed comment");if(s&&(s(e.substring(N+4,P),ye,d),m))return;P+=3;continue}}if(63!==b){for(u=N+1;;u++){if(x=e.charCodeAt(u),isNaN(x))return P=-1,v("unclosed tag");if(34===x)u=-1!==(w=e.indexOf('"',u+1))?w:u;else if(39===x)u=-1!==(w=e.indexOf("'",u+1))?w:u;else if(62===x){P=u;break}}if(33!==b){if(E={},47===b){if(D=!1,O=!0,!R.length)return v("missing open tag");if(u=S=R.pop(),w=N+2+u.length,e.substring(N+2,w)!==u)return v("closing tag mismatch");for(;w<P;w++)if(!(32===(b=e.charCodeAt(w))||b>8&&b<14))return v("close tag")}else{if(47===e.charCodeAt(P-1)?(u=S=e.substring(N+1,P-1),D=!0,O=!0):(u=S=e.substring(N+1,P),D=!0,O=!1),!(b>96&&b<123||b>64&&b<91||95===b||58===b))return v("illegal first char nodeName");for(w=1,g=u.length;w<g;w++)if(!((b=u.charCodeAt(w))>96&&b<123||b>64&&b<91||b>47&&b<59||45===b||95===b||46==b)){if(32===b||b<14&&b>8){S=u.substring(0,w),E=null;break}return v("invalid nodeName")}O||R.push(S)}if(f){if(o=A,D&&(O||M.push(o),null===E&&(p=-1!==u.indexOf("xmlns",w))&&(B=w,q=u,L(),p=!1)),k=S,-1!==(b=S.indexOf(":"))){if(!(_=A[S.substring(0,b)]))return v("missing namespace on <"+k+">");S=S.substr(b+1)}else _=A.xmlns;_&&(S=_+":"+S)}if(D&&(B=w,q=u,n&&(h?n(C,ye,O,d):n(S,L,ye,O,d),m)))return;if(O){if(i&&(i(h?C:S,ye,D,d),m))return;f&&(A=D?o:M.pop())}P+=1}else{if(l&&(l(e.substring(N,P+1),ye,d),m))return;P+=1}}else{if(-1===(P=e.indexOf("?>",N)))return v("unclosed question");if(a&&(a(e.substring(N,P+2),d),m))return;P+=2}}}(e),d=Ee,m=!1,g},this.stop=function(){m=!0}}function Re(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var Te={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},De="xsi:type";function Oe(e){return e.xml&&e.xml.serialize}function Ne(e){return Oe(e)===De}function Pe(e,t){return Re(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function qe(e){return new Error(e)}function Be(e){return e.$descriptor}function Le(e){de(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw qe("expected element");var t,n=this.elementsById,i=Be(e).idProperty;if(i&&(t=e.get(i.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw qe("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function Ie(){}function je(){}function Fe(){}function Ve(e,t){this.property=e,this.context=t}function $e(e,t){this.element=t,this.propertyDesc=e}function ze(){}function He(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function We(e,t,n){He.call(this,e,t,n)}function Ue(e,t,n){this.model=e,this.context=n}function Ge(e){e instanceof Z&&(e={model:e}),de(this,{lax:!1},e)}Ie.prototype.handleEnd=function(){},Ie.prototype.handleText=function(){},Ie.prototype.handleNode=function(){},je.prototype=Object.create(Ie.prototype),je.prototype.handleNode=function(){return this},Fe.prototype=Object.create(Ie.prototype),Fe.prototype.handleText=function(e){this.body=(this.body||"")+e},Ve.prototype=Object.create(Fe.prototype),Ve.prototype.handleNode=function(e){if(this.element)throw qe("expected no sub nodes");return this.element=this.createReference(e),this},Ve.prototype.handleEnd=function(){this.element.id=this.body},Ve.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},$e.prototype=Object.create(Fe.prototype),$e.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=H(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},ze.prototype=Object.create(Fe.prototype),ze.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},He.prototype=Object.create(ze.prototype),He.prototype.addReference=function(e){this.context.addReference(e)},He.prototype.handleText=function(e){if(!Be(this.element).bodyProperty)throw qe("unexpected body text <"+e+">");Fe.prototype.handleText.call(this,e)},He.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Be(t).bodyProperty;n&&void 0!==e&&(e=H(n.type,e),t.set(n.name,e))},He.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=Be(i),o=this.context,s=new i({}),a=this.model;return ae(n,(function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?ae(e.split(" "),(function(e){o.addReference({element:s,property:i.ns.name,id:e})})):o.addReference({element:s,property:i.ns.name,id:e}):(i?e=H(i.type,e):"xmlns"!==n&&(t=G(n,r.ns.prefix),a.getPackage(t.prefix)&&o.addWarning({message:"unknown attribute <"+n+">",element:s,property:n,value:e})),s.set(n,e))})),s},He.prototype.getPropertyForNode=function(e){var t,n,i=G(e.name),r=this.type,o=this.model,s=Be(r),a=i.name,l=s.propertiesByName[a];if(l&&!l.isAttr)return Ne(l)&&(t=e.attributes[De])?(t=function(e,t){var n=G(e);return function(e,t){var n=e.name,i=e.localName,r=t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(n,t.getPackage(n.prefix))}(t,o),de({},l,{effectiveType:Be(n=o.getType(t)).name})):l;var c=o.getPackage(i.prefix);if(c){if(t=Pe(i,c),n=o.getType(t),l=oe(s.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})))return de({},l,{effectiveType:Be(n).name})}else if(l=oe(s.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})))return l;throw qe("unrecognized element <"+i.name+">")},He.prototype.toString=function(){return"ElementDescriptor["+Be(this.type).name+"]"},He.prototype.valueHandler=function(e,t){return new $e(e,t)},He.prototype.referenceHandler=function(e){return new Ve(e,this.context)},He.prototype.handler=function(e){return"Element"===e?new Ue(this.model,e,this.context):new He(this.model,e,this.context)},He.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,U(n=t.effectiveType||t.type))return this.valueHandler(t,i);var o=(r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==o&&(t.isMany?i.get(t.name).push(o):i.set(t.name,o),t.isReference?(de(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},We.prototype=Object.create(He.prototype),We.prototype.createElement=function(e){var t=e.name,n=G(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),s=o&&Pe(n,o)||t;if(!r.hasType(s))throw qe("unexpected element <"+e.originalName+">");return He.prototype.createElement.call(this,e)},Ue.prototype=Object.create(ze.prototype),Ue.prototype.createElement=function(e){var t=e.name,n=G(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},Ue.prototype.handleChild=function(e){var t=new Ue(this.model,"Element",this.context).handleNode(e),n=this.element,i=t.element;return void 0!==i&&((n.$children=n.$children||[]).push(i),i.$parent=n),t},Ue.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},Ge.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof He?(i=t,t={}):"string"==typeof t?(i=this.handler(t),t={}):"string"==typeof i&&(i=this.handler(i));var r=this.model,o=this.lax,s=new Le(de({},t,{rootHandler:i})),a=new Ae({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 i=t(),r=i.line,o=i.column,a=i.data;"<"===a.charAt(0)&&-1!==a.indexOf(" ")&&(a=a.slice(0,a.indexOf(" "))+">");var l="unparsable content "+(a?a+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return s.addWarning({message:l,error:e}),!0;throw qe(l)}function h(e,t){return c(e,t,!0)}i.context=s,l.push(i);var u=/^<\?xml /i,d=/ encoding="([^"]+)"/i,p=/^utf-8$/i;function f(e,t){try{l.peek().handleText(e)}catch(e){h(e,t)}}var g=r.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),{"http://www.w3.org/XML/1998/namespace":"xml"});return a.ns(g).on("openTag",(function(e,t,n,i){var r=e.attrs||{},s=Object.keys(r).reduce((function(e,n){var i=t(r[n]);return e[n]=i,e}),{});!function(e,t){var n=l.peek();try{l.push(n.handleNode(e))}catch(e){c(e,t,o)&&l.push(new je)}}({name:e.name,originalName:e.originalName,attributes:s,ns:e.ns},i)})).on("question",(function(e){if(u.test(e)){var t=d.exec(e),n=t&&t[1];n&&!p.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",h),new Promise((function(t,n){var r;try{a.parse(e),function(){var e,t,n=s.elementsById,i=s.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],a=Be(r).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=r.get(a.name),c=l.indexOf(t);-1===c&&(c=l.length),o?l[c]=o:l.splice(c,1)}else r.set(a.name,o)}}()}catch(e){r=e}var o=i.element;r||o||(r=qe("failed to parse document as <"+i.type.$descriptor.name+">"));var l=s.warnings,c=s.references,h=s.elementsById;return r?(r.warnings=l,n(r)):t({rootElement:o,elementsById:h,references:c,warnings:l})}))},Ge.prototype.handler=function(e){return new We(this.model,e)};var Ke=/<|>|'|"|&|\n\r|\n/g,Xe=/<|>|&/g;function Ye(e){var t={},n={},i={},r=[],o=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?r.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,r=this.getNSKey(t);i[r]=this.byUri(n),e&&e.logUsed(t)},this.getUsed=function(e){var t=this;return[].concat(r,o).filter((function(e){var n=t.getNSKey(e);return i[n]}))}}function Je(e,t){return Re(t)?function(e){return e.charAt(0).toLowerCase()+e.slice(1)}(e):e}function Qe(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function Ze(e){return ie(e)?e:(e.prefix?e.prefix+":":"")+e.localName}var et={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},tt={"<":"lt",">":"gt","&":"amp"};function nt(e,t,n){return(e=ie(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function it(e){this.tagName=e}function rt(){}function ot(e){this.tagName=e}function st(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function at(e,t){st.call(this,e,t)}function lt(){this.value="",this.write=function(e){this.value+=e}}function ct(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 ht(e){return e=de({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new lt,r=new ct(i,e.format);if(e.preamble&&r.append('<?xml version="1.0" encoding="UTF-8"?>\n'),(new st).build(t).serializeTo(r),!n)return i.value}}}function ut(e,t){Z.call(this,e,t)}it.prototype.build=function(e){return this.element=e,this},it.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},rt.prototype.serializeValue=rt.prototype.serializeTo=function(e){e.append(this.escape?nt(this.value,Xe,tt):this.value)},rt.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(Xe)&&(this.escape=!0),this},Qe(ot,rt),ot.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},st.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,o=i.isGeneric;return t=o?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),o||(n=function(e){return se(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!re(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)}))}(e),this.parseAttributes(se(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return se(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},st.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?de({localName:t.ns.localName},e):de({localName:Je(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},st.prototype.nsPropertyTagName=function(e){return function(e,t){return de({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},st.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},st.prototype.nsAttributeName=function(e){var t;if(t=ie(e)?G(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}:de({localName:t.localName},n)},st.prototype.parseGeneric=function(e){var t=this,n=this.body,i=[];return ae(e,(function(r,o){"$body"===o?n.push((new rt).build({type:"String"},r)):"$children"===o?ae(r,(function(e){n.push(new st(t).build(e))})):0!==o.indexOf("$")&&t.parseNsAttribute(e,o,r)&&i.push({name:o,value:r})})),i},st.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=G(t);if("xmlns"===o.prefix&&(i={prefix:o.localName,uri:n}),o.prefix||"xmlns"!==o.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var s=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(s)}},st.prototype.parseNsAttributes=function(e,t){var n=this,i=e.$attrs,r=[];return ae(i,(function(t,i){var o=n.parseNsAttribute(e,i,t);o&&r.push(o)})),r},st.prototype.parseGenericAttributes=function(e,t){var n=this;ae(t,(function(t){if(t.name!==De)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,n)}}))},st.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;ae(e,(function(e){var r=i.get(e.name),o=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new rt).build(e,r[0]));else if(U(e.type))ae(r,(function(i){n.push(new ot(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(o)ae(r,(function(i){n.push(new it(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var s=Ne(e),a=function(e){return"property"===Oe(e)}(e);ae(r,(function(i){var r;r=s?new at(t,e):a?new st(t,e):new st(t),n.push(r.build(i))}))}}))},st.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new Ye(t):n=t),n},st.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,o=e.prefix;return i.byUri(r)&&!n||i.add(e,t),i.mapPrefix(o,r),e},st.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.element.$model,s=this.getNamespaces(t),a=e.prefix,l=e.uri;if(!a&&!l)return{localName:e.localName};if(r=Te[a]||o&&(o.getPackage(a)||{}).uri,!(l=l||r||s.uriByPrefix(a)))throw new Error("no namespace uri given for prefix <"+a+">");if(!(e=s.byUri(l))){for(n=a,i=1;s.uriByPrefix(n);)n=a+"_"+i++;e=this.logNamespace({prefix:n,uri:l},r===l)}return a&&s.mapPrefix(a,l),e},st.prototype.parseAttributes=function(e){var t=this,n=this.element;ae(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];ae(i,(function(e){r.push(e.id)})),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},st.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),Ze(e)},st.prototype.addAttribute=function(e,t){var n=this.attrs;ie(t)&&(t=nt(t,Ke,et));var i=function(e,t){t=le(t);var n=ne(e)?-1:void 0;return ae(e,(function(e,i){if(t(e,i))return n=i,!1})),n}(n,(function(t){return t.name.localName===e.localName&&t.name.uri===e.uri&&t.name.prefix===e.prefix})),r={name:e,value:t};-1!==i?n.splice(i,1,r):n.push(r)},st.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)),ae(t,(function(t){e.append(" ").append(Ze(t.name)).append('="').append(t.value).append('"')}))},st.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==rt;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),ae(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},Qe(at,st),at.prototype.parseNsAttributes=function(e){var t=st.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),o=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(De),(i.prefix?i.prefix+":":"")+o+n.ns.localName),t},at.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},ut.prototype=Object.create(Z.prototype),ut.prototype.fromXML=function(e,t,n){var i;i=t,"[object String]"!==M.call(i)&&(n=t,t="dmn:Definitions");var r=new Ge(R({model:this,lax:!0},n)),o=r.handler(t);return r.fromXML(e,o)},ut.prototype.toXML=function(e,t){var n=new ht(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(e){return i(e)}}))};var dt={dc:{name:"DC",prefix:"dc",uri:"http://www.omg.org/spec/DMN/20180521/DC/",types:[{name:"Dimension",properties:[{name:"width",isAttr:!0,type:"Real"},{name:"height",isAttr:!0,type:"Real"}]},{name:"Bounds",properties:[{name:"height",isAttr:!0,type:"Real"},{name:"width",isAttr:!0,type:"Real"},{name:"x",isAttr:!0,type:"Real"},{name:"y",isAttr:!0,type:"Real"}]},{name:"Point",properties:[{name:"x",isAttr:!0,type:"Real"},{name:"y",isAttr:!0,type:"Real"}]},{name:"Color",properties:[{name:"red",type:"UML_Standard_Profile.mdzip:eee_1045467100323_917313_65"},{name:"green",type:"UML_Standard_Profile.mdzip:eee_1045467100323_917313_65"},{name:"blue",type:"UML_Standard_Profile.mdzip:eee_1045467100323_917313_65"}]}],associations:[],enumerations:[{name:"AlignmentKind",literalValues:[{name:"start"},{name:"center"},{name:"end"}]}]},di:{name:"DI",prefix:"di",uri:"http://www.omg.org/spec/DMN/20180521/DI/",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"extension",type:"Extension"},{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"style",isReference:!0,type:"Style",xml:{serialize:"property"}},{name:"sharedStyle",isReference:!0,isVirtual:!0,type:"Style"}]},{name:"Diagram",superClass:["DiagramElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"}]},{name:"Shape",isAbstract:!0,properties:[{name:"bounds",type:"dc:Bounds"}],superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,properties:[{name:"waypoint",type:"dc:Point",isMany:!0,xml:{serialize:"property"}}],superClass:["DiagramElement"]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],associations:[],enumerations:[],xml:{tagAlias:"lowerCase"}},dmn:{name:"DMN",prefix:"dmn",uri:"https://www.omg.org/spec/DMN/20191111/MODEL/",types:[{name:"AuthorityRequirement",superClass:["DMNElement"],properties:[{name:"requiredAuthority",type:"DMNElementReference",xml:{serialize:"property"}},{name:"requiredDecision",type:"DMNElementReference",xml:{serialize:"property"}},{name:"requiredInput",type:"DMNElementReference",xml:{serialize:"property"}}]},{name:"ItemDefinition",superClass:["NamedElement"],properties:[{name:"typeRef",type:"String"},{name:"allowedValues",type:"UnaryTests",xml:{serialize:"property"}},{name:"typeLanguage",type:"String",isAttr:!0},{name:"itemComponent",type:"ItemDefinition",isMany:!0,xml:{serialize:"property"}},{name:"functionItem",type:"FunctionItem"},{name:"isCollection",isAttr:!0,type:"Boolean"}]},{name:"Definitions",superClass:["NamedElement"],properties:[{name:"import",type:"Import",isMany:!0},{name:"itemDefinition",type:"ItemDefinition",isMany:!0},{name:"drgElement",type:"DRGElement",isMany:!0},{name:"artifact",type:"Artifact",isMany:!0},{name:"elementCollection",type:"ElementCollection",isMany:!0},{name:"businessContextElement",type:"BusinessContextElement",isMany:!0},{name:"namespace",type:"String",isAttr:!0},{name:"expressionLanguage",type:"String",isAttr:!0},{name:"typeLanguage",type:"String",isAttr:!0},{name:"exporter",isAttr:!0,type:"String"},{name:"exporterVersion",isAttr:!0,type:"String"},{name:"dmnDI",type:"dmndi:DMNDI"}]},{name:"KnowledgeSource",superClass:["DRGElement"],properties:[{name:"authorityRequirement",type:"AuthorityRequirement",isMany:!0},{name:"type",type:"String"},{name:"owner",type:"DMNElementReference",xml:{serialize:"property"}},{name:"locationURI",type:"String",isAttr:!0}]},{name:"DecisionRule",superClass:["DMNElement"],properties:[{name:"inputEntry",type:"UnaryTests",isMany:!0,xml:{serialize:"property"}},{name:"outputEntry",type:"LiteralExpression",isMany:!0,xml:{serialize:"property"}},{name:"annotationEntry",type:"RuleAnnotation",isMany:!0,xml:{serialize:"property"}}]},{name:"Expression",isAbstract:!0,superClass:["DMNElement"],properties:[{name:"typeRef",isAttr:!0,type:"String"}]},{name:"InformationItem",superClass:["NamedElement"],properties:[{name:"typeRef",isAttr:!0,type:"String"}]},{name:"Decision",superClass:["DRGElement"],properties:[{name:"question",type:"String",xml:{serialize:"property"}},{name:"allowedAnswers",type:"String",xml:{serialize:"property"}},{name:"variable",type:"InformationItem",xml:{serialize:"property"}},{name:"informationRequirement",type:"InformationRequirement",isMany:!0},{name:"knowledgeRequirement",type:"KnowledgeRequirement",isMany:!0},{name:"authorityRequirement",type:"AuthorityRequirement",isMany:!0},{name:"supportedObjective",isMany:!0,type:"DMNElementReference",xml:{serialize:"property"}},{name:"impactedPerformanceIndicator",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"decisionMaker",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"decisionOwner",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"usingProcess",isMany:!0,type:"DMNElementReference",xml:{serialize:"property"}},{name:"usingTask",isMany:!0,type:"DMNElementReference",xml:{serialize:"property"}},{name:"decisionLogic",type:"Expression"}]},{name:"Invocation",superClass:["Expression"],properties:[{name:"calledFunction",type:"Expression"},{name:"binding",type:"Binding",isMany:!0}]},{name:"OrganisationalUnit",superClass:["BusinessContextElement"],properties:[{name:"decisionMade",type:"Decision",isReference:!0,isMany:!0},{name:"decisionOwned",type:"Decision",isReference:!0,isMany:!0}]},{name:"Import",superClass:["NamedElement"],properties:[{name:"importType",type:"String",isAttr:!0},{name:"locationURI",type:"String",isAttr:!0},{name:"namespace",type:"String",isAttr:!0}]},{name:"InformationRequirement",superClass:["DMNElement"],properties:[{name:"requiredDecision",type:"DMNElementReference",xml:{serialize:"property"}},{name:"requiredInput",type:"DMNElementReference",xml:{serialize:"property"}}]},{name:"ElementCollection",superClass:["NamedElement"],properties:[{name:"drgElement",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}}]},{name:"DRGElement",isAbstract:!0,superClass:["NamedElement"],properties:[]},{name:"InputData",superClass:["DRGElement"],properties:[{name:"variable",type:"InformationItem",xml:{serialize:"property"}}]},{name:"DMNElement",isAbstract:!0,properties:[{name:"description",type:"String"},{name:"extensionElements",type:"ExtensionElements"},{name:"id",type:"String",isAttr:!0,isId:!0},{name:"extensionAttribute",type:"ExtensionAttribute",isMany:!0},{name:"label",isAttr:!0,type:"String"}]},{name:"InputClause",superClass:["DMNElement"],properties:[{name:"inputExpression",type:"LiteralExpression",xml:{serialize:"property"}},{name:"inputValues",type:"UnaryTests",xml:{serialize:"property"}}]},{name:"DecisionTable",superClass:["Expression"],properties:[{name:"input",type:"InputClause",isMany:!0,xml:{serialize:"property"}},{name:"output",type:"OutputClause",isMany:!0,xml:{serialize:"property"}},{name:"annotation",type:"RuleAnnotationClause",isMany:!0,xml:{serialize:"property"}},{name:"rule",type:"DecisionRule",isMany:!0,xml:{serialize:"property"}},{name:"hitPolicy",type:"HitPolicy",isAttr:!0,default:"UNIQUE"},{name:"aggregation",type:"BuiltinAggregator",isAttr:!0},{name:"preferredOrientation",type:"DecisionTableOrientation",isAttr:!0},{name:"outputLabel",isAttr:!0,type:"String"}]},{name:"LiteralExpression",superClass:["Expression"],properties:[{name:"expressionLanguage",type:"String",isAttr:!0},{name:"text",type:"String"},{name:"importedValues",type:"ImportedValues"}]},{name:"Binding",properties:[{name:"parameter",type:"InformationItem",xml:{serialize:"property"}},{name:"bindingFormula",type:"Expression"}]},{name:"KnowledgeRequirement",superClass:["DMNElement"],properties:[{name:"requiredKnowledge",type:"DMNElementReference",xml:{serialize:"property"}}]},{name:"BusinessKnowledgeModel",superClass:["Invocable"],properties:[{name:"encapsulatedLogic",type:"FunctionDefinition",xml:{serialize:"property"}},{name:"knowledgeRequirement",type:"KnowledgeRequirement",isMany:!0},{name:"authorityRequirement",type:"AuthorityRequirement",isMany:!0}]},{name:"BusinessContextElement",isAbstract:!0,superClass:["NamedElement"],properties:[{name:"URI",type:"String",isAttr:!0}]},{name:"PerformanceIndicator",superClass:["BusinessContextElement"],properties:[{name:"impactingDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}}]},{name:"FunctionDefinition",superClass:["Expression"],properties:[{name:"formalParameter",type:"InformationItem",isMany:!0,xml:{serialize:"property"}},{name:"body",type:"Expression"},{name:"kind",type:"FunctionKind",isAttr:!0}]},{name:"Context",superClass:["Expression"],properties:[{name:"contextEntry",type:"ContextEntry",isMany:!0}]},{name:"ContextEntry",superClass:["DMNElement"],properties:[{name:"variable",type:"InformationItem",xml:{serialize:"property"}},{name:"value",type:"Expression"}]},{name:"List",superClass:["Expression"],properties:[{name:"elements",isMany:!0,type:"Expression"}]},{name:"Relation",superClass:["Expression"],properties:[{name:"column",type:"InformationItem",isMany:!0,xml:{serialize:"property"}},{name:"row",type:"List",isMany:!0,xml:{serialize:"property"}}]},{name:"OutputClause",superClass:["DMNElement"],properties:[{name:"outputValues",type:"UnaryTests",xml:{serialize:"property"}},{name:"defaultOutputEntry",type:"LiteralExpression",xml:{serialize:"property"}},{name:"name",isAttr:!0,type:"String"},{name:"typeRef",isAttr:!0,type:"String"}]},{name:"UnaryTests",superClass:["Expression"],properties:[{name:"text",type:"String"},{name:"expressionLanguage",type:"String",isAttr:!0}]},{name:"NamedElement",isAbstract:!0,superClass:["DMNElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ImportedValues",superClass:["Import"],properties:[{name:"importedElement",type:"String"},{name:"expressionLanguage",type:"String",isAttr:!0}]},{name:"DecisionService",superClass:["Invocable"],properties:[{name:"outputDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"encapsulatedDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"inputDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"inputData",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}}]},{name:"ExtensionElements",properties:[{name:"values",type:"Element",isMany:!0}]},{name:"ExtensionAttribute",properties:[{name:"value",type:"Element"},{name:"valueRef",type:"Element",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Element",isAbstract:!0,properties:[{name:"extensionAttribute",type:"ExtensionAttribute",isAttr:!0,isReference:!0},{name:"elements",type:"ExtensionElements",isAttr:!0,isReference:!0}]},{name:"Artifact",isAbstract:!0,superClass:["DMNElement"],properties:[]},{name:"Association",superClass:["Artifact"],properties:[{name:"sourceRef",type:"DMNElementReference",xml:{serialize:"property"}},{name:"targetRef",type:"DMNElementReference",xml:{serialize:"property"}},{name:"associationDirection",type:"AssociationDirection",isAttr:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",isAttr:!0,type:"String",default:"text/plain"}]},{name:"RuleAnnotationClause",properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"RuleAnnotation",properties:[{name:"text",type:"String"}]},{name:"Invocable",isAbstract:!0,superClass:["DRGElement"],properties:[{name:"variable",type:"InformationItem",xml:{serialize:"property"}}]},{name:"Group",superClass:["Artifact"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"FunctionItem",superClass:["DMNElement"],properties:[{name:"parameters",isMany:!0,type:"InformationItem",xml:{serialize:"property"}},{name:"outputTypeRef",isAttr:!0,type:"String"}]},{name:"DMNElementReference",properties:[{isAttr:!0,name:"href",type:"String"}]}],enumerations:[{name:"HitPolicy",literalValues:[{name:"UNIQUE"},{name:"FIRST"},{name:"PRIORITY"},{name:"ANY"},{name:"COLLECT"},{name:"RULE ORDER"},{name:"OUTPUT ORDER"}]},{name:"BuiltinAggregator",literalValues:[{name:"SUM"},{name:"COUNT"},{name:"MIN"},{name:"MAX"}]},{name:"DecisionTableOrientation",literalValues:[{name:"Rule-as-Row"},{name:"Rule-as-Column"},{name:"CrossTable"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"FunctionKind",literalValues:[{name:"FEEL"},{name:"Java"},{name:"PMML"}]}],associations:[],xml:{tagAlias:"lowerCase"}},dmndi:{name:"DMNDI",prefix:"dmndi",uri:"https://www.omg.org/spec/DMN/20191111/DMNDI/",types:[{name:"DMNDI",properties:[{name:"diagrams",type:"DMNDiagram",isMany:!0},{name:"styles",type:"DMNStyle",isMany:!0}]},{name:"DMNStyle",superClass:["di:Style"],properties:[{name:"fillColor",type:"dc:Color",isAttr:!0},{name:"strokeColor",type:"dc:Color",isAttr:!0},{name:"fontColor",type:"dc:Color",isAttr:!0},{name:"fontSize",isAttr:!0,type:"Real"},{name:"fontFamily",isAttr:!0,type:"String"},{name:"fontItalic",isAttr:!0,type:"Boolean"},{name:"fontBold",isAttr:!0,type:"Boolean"},{name:"fontUnderline",isAttr:!0,type:"Boolean"},{name:"fontStrikeThrough",isAttr:!0,type:"Boolean"},{name:"labelHorizontalAlignment",type:"dc:AlignmentKind",isAttr:!0},{name:"labelVerticalAlignment",type:"dc:AlignmentKind",isAttr:!0}]},{name:"DMNDiagram",superClass:["di:Diagram"],properties:[{name:"dmnElementRef",type:"dmn:DMNElement",isAttr:!0,isReference:!0},{name:"size",type:"Size"},{name:"localStyle",type:"DMNStyle",isVirtual:!0},{name:"sharedStyle",type:"DMNStyle",isVirtual:!0,isReference:!0,redefines:"di:DiagramElement#sharedStyle"},{name:"diagramElements",type:"DMNDiagramElement",isMany:!0}]},{name:"DMNDiagramElement",isAbstract:!0,superClass:["di:DiagramElement"],properties:[{name:"dmnElementRef",type:"dmn:DMNElement",isAttr:!0,isReference:!0},{name:"sharedStyle",type:"DMNStyle",isVirtual:!0,isReference:!0,redefines:"di:DiagramElement#sharedStyle"},{name:"localStyle",type:"DMNStyle",isVirtual:!0},{name:"label",type:"DMNLabel"}]},{name:"DMNLabel",superClass:["di:Shape"],properties:[{name:"text",type:"Text"}]},{name:"DMNShape",superClass:["di:Shape","DMNDiagramElement"],properties:[{name:"isListedInputData",isAttr:!0,type:"Boolean"},{name:"decisionServiceDividerLine",type:"DMNDecisionServiceDividerLine"},{name:"isCollapsed",isAttr:!0,type:"Boolean"}]},{name:"DMNEdge",superClass:["di:Edge","DMNDiagramElement"],properties:[{name:"sourceElement",type:"DMNDiagramElement",isAttr:!0,isReference:!0},{name:"targetElement",type:"DMNDiagramElement",isAttr:!0,isReference:!0}]},{name:"DMNDecisionServiceDividerLine",superClass:["di:Edge"]},{name:"Text",properties:[{name:"text",isBody:!0,type:"String"}]},{name:"Size",superClass:["dc:Dimension"]}],associations:[],enumerations:[]},biodi:{name:"bpmn.io DI for DMN",uri:"http://bpmn.io/schema/dmn/biodi/2.0",prefix:"biodi",xml:{tagAlias:"lowerCase"},types:[{name:"DecisionTable",isAbstract:!0,extends:["dmn:DecisionTable"],properties:[{name:"annotationsWidth",isAttr:!0,type:"Integer"}]},{name:"OutputClause",isAbstract:!0,extends:["dmn:OutputClause"],properties:[{name:"width",isAttr:!0,type:"Integer"}]},{name:"InputClause",isAbstract:!0,extends:["dmn:InputClause"],properties:[{name:"width",isAttr:!0,type:"Integer"}]}]}};function pt(e,t){return new ut(R({},dt,e),t)}function ft(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 i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const gt=Object.prototype.toString,mt=Object.prototype.hasOwnProperty;function vt(e,t){return mt.call(e,t)}function yt(e,t){let n,i;if(void 0===e)return;const r=function(e){return"[object Array]"===gt.call(e)}(e)?bt:wt;for(let o in e)if(vt(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function wt(e){return e}function bt(e){return Number(e)}function xt(e,...t){const n=e.style;return yt(t,(function(e){e&&yt(e,(function(e,t){n[t]=e}))})),e}function _t(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}const St=Object.prototype.toString;function kt(e){return new Ct(e)}function Ct(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Et(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Mt(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}Ct.prototype.add=function(e){return this.list.add(e),this},Ct.prototype.remove=function(e){return"[object RegExp]"==St.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Ct.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},Ct.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Ct.prototype.array=function(){return Array.from(this.list)},Ct.prototype.has=Ct.prototype.contains=function(e){return this.list.contains(e)};var At,Rt,Tt,Dt={};function Ot(){At=window.addEventListener?"addEventListener":"attachEvent",Rt=window.removeEventListener?"removeEventListener":"detachEvent",Tt="addEventListener"!==At?"on":""}var Nt=ft({__proto__:null,bind:Dt.bind=function(e,t,n,i){return At||Ot(),e[At](Tt+t,n,i||!1),n},unbind:Dt.unbind=function(e,t,n,i){return Rt||Ot(),e[Rt](Tt+t,n,i||!1),n},default:Dt},[Dt]),Pt=["focus","blur"];var qt,Bt={bind:function(e,t,n,i,r){return-1!==Pt.indexOf(n)&&(r=!0),Nt.bind(e,n,(function(n){var r=n.target||n.srcElement;n.delegateTarget=Mt(r,t,!0),n.delegateTarget&&i.call(e,n)}),r)},unbind:function(e,t,n,i){return-1!==Pt.indexOf(t)&&(i=!0),Nt.unbind(e,t,n,i)}},Lt=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 i=n[1];if("body"==i){return(l=t.createElement("html")).innerHTML=e,l.removeChild(l.lastChild)}var r=Object.prototype.hasOwnProperty.call(jt,i)?jt[i]:jt._default,o=r[0],s=r[1],a=r[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},It=!1;"undefined"!=typeof document&&((qt=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',It=!qt.getElementsByTagName("link").length,qt=void 0);var jt={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:It?[1,"X<div>","</div>"]:[0,"",""]};jt.td=jt.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],jt.option=jt.optgroup=[1,'<select multiple="multiple">',"</select>"],jt.thead=jt.tbody=jt.colgroup=jt.caption=jt.tfoot=[1,"<table>","</table>"],jt.polyline=jt.ellipse=jt.polygon=jt.circle=jt.text=jt.line=jt.path=jt.rect=jt.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var Ft=Lt;function Vt(e,t){return(t=t||document).querySelector(e)}function $t(e){e.parentNode&&e.parentNode.removeChild(e)}function zt(e){return function(){if(!window.Promise)throw new Error("Promises is not supported in this environment. Please polyfill Promise.");var t=arguments.length;if(!(t>=1&&s(arguments[t-1])))return e.apply(this,arguments);var n=arguments[t-1];console.warn(new Error("Passing callbacks to "+function(e){return e.replace("bound ","")}(e.name)+" is deprecated and will be removed in a future major release. Please switch to promises: https://bpmn.io/l/moving-to-promises.html"));var i=Array.prototype.slice.call(arguments,0,-1);e.apply(this,i).then((function(e){var t=Object.keys(e)[0];return n(null,e[t])}),(function(e){return n(e,e.warnings)}))}}const Ht={width:"100%",height:"100%",position:"relative"};class Wt{constructor(e={}){this._eventBus=new C,this._viewsChanged=b(this._viewsChanged,0),this._views=[],this._viewers={},this.open=zt(this.open.bind(this)),this.importXML=zt(this.importXML.bind(this)),this.saveXML=zt(this.saveXML.bind(this)),this._init(e)}importXML(e,t){var n=this;return t=t||{open:!0},new Promise((function(r,o){var s=n._activeView;n._clear().then((()=>{var a;e=n._emit("import.parse.start",{xml:e})||e,n._moddle.fromXML(e,"dmn:Definitions").then((e=>{var l=e.rootElement,c=e.references,h=e.elementsById;if(a=e.warnings,l=n._emit("import.parse.complete",i({error:null,definitions:l,elementsById:h,references:c,warnings:a}))||l,n._setDefinitions(l),!t.open)return n._emit("import.done",{error:null,warnings:a}),void r({warnings:a});var u=n._getInitialView(n._views,s);if(!u){var d=new Error("no displayable contents");return n._emit("import.done",{error:d,warnings:a}),d.warnings=a,o(d)}n.open(u).then((e=>({warnings:e.warnings}))).catch((e=>({error:e,warnings:e.warnings}))).then((e=>{var t=[].concat(a,e.warnings);n._emit("import.done",{error:e.error,warnings:t}),e.error?(e.error.warnings=t,o(e.error)):r({warnings:t})}))})).catch((t=>(a=t.warnings,t=function(e,t){if("failed to parse document as <dmn:Definitions>"!==e.message)return null;var n=-1!==t.indexOf('"http://www.omg.org/spec/DMN/20151101/dmn.xsd"')?"1.1":-1!==t.indexOf('"http://www.omg.org/spec/DMN/20180521/MODEL/"')&&"1.2";if(!n)return null;return e=new Error("unsupported DMN "+n+" file detected; only DMN 1.3 files can be opened"),console.error("Cannot open what looks like a DMN "+n+" diagram. Please refer to https://bpmn.io/l/dmn-compatibility.html to learn how to make the toolkit compatible with older DMN files",e),e}(t,e)||function(e){var t=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);if(!t)return null;return e.message="unparsable content <"+t[1]+"> detected; this may indicate an invalid DMN 1.3 diagram file"+t[2],e}(t)||t,n._emit("import.parse.complete",i({error:t,warnings:a})),n._emit("import.done",{error:t,warnings:a}),t.warnings=a,o(t))))})).catch((e=>(n._emit("import.done",{error:e,warnings:[]}),e.warnings=[],o(e))))}));function i(e){var t=n._eventBus.createEvent(e);return Object.defineProperty(t,"context",{enumerable:!0,get:function(){return console.warn(new Error("import.parse.complete <context> is deprecated and will be removed in future library versions")),{warnings:e.warnings,references:e.references,elementsById:e.elementsById}}}),t}}getDefinitions(){return this._definitions}getActiveView(){return this._activeView}getActiveViewer(){var e=this.getActiveView();return e&&this._getViewer(e)}getView(e){return this._views.filter((function(t){return t.element===e}))[0]}getViews(){return this._views}saveXML(e){var t=this;e=e||{};var n=this._definitions;return new Promise((function(i,r){n?(n=t._emit("saveXML.start",{definitions:n})||n,t._moddle.toXML(n,e).then((function(e){var n=e.xml;return{xml:n=t._emit("saveXML.serialized",{xml:n})||n}})).catch((e=>({error:e}))).then((e=>{t._emit("saveXML.done",e),e.error?r(e.error):i({xml:e.xml})}))):r(new Error("no definitions loaded"))}))}on(...e){this._eventBus.on(...e)}off(...e){this._eventBus.off(...e)}once(...e){this._eventBus.once(...e)}attachTo(e){e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),"string"==typeof e&&(e=Vt(e)),e.appendChild(this._container),this._emit("attach",{})}detach(){this._emit("detach",{}),$t(this._container)}destroy(){Object.keys(this._viewers).forEach((e=>{Xt(this._viewers[e],"destroy")})),$t(this._container)}_init(e){this._options=e,this._moddle=this._createModdle(e),this._viewers={},this._views=[];const t=Ft('<div class="dmn-js-parent"></div>'),n=_({},Ht,e);_(t.style,{width:Ut(n.width),height:Ut(n.height),position:n.position}),this._container=t,e.container&&this.attachTo(e.container)}_clear(){return this._switchView(null)}open(e){return this._switchView(e)}_setDefinitions(e){this._definitions=e,this._updateViews()}_viewsChanged=()=>{this._emit("views.changed",{views:this._views,activeView:this._activeView})};_updateViews(){var e=this._definitions;if(!e)return this._views=[],void this._switchView(null);var t=this._getViewProviders(),n=[e,...e.drgElement||[]],i=this._views,r=[];for(var o of n){var s=c(t,(function(e){return"string"==typeof e.opens?e.opens===o.$type:e.opens(o)}));if(s){var a={element:o,id:o.id,name:o.name,type:s.id};r.push(a)}}var l,h=this._activeView;if(!h||(l=c(r,(function(e){return Gt(h,e)}))||this._getInitialView(r),l)){var u=!Gt(h,l)||Kt(h,l),d=i.length!==r.length||!p(r,(function(e){return c(i,(function(t){return Gt(t,e)&&!Kt(t,e)}))}));this._activeView=l,this._views=r,(u||d)&&this._viewsChanged()}else this._switchView(null)}_getInitialView(e,t){var n;return t&&(n=c(e,(function(e){return Gt(e,t)}))||c(e,(function(e){return e.type===t}))),n||e[0]}_switchView(e){var t=this;return new Promise((function(n,i){var r,o=(e,r)=>{t._viewsChanged(),e?i(e):n(r)},s=t.getActiveView(),a=e&&t._getViewer(e),l=e&&e.element;if(s&&(r=t._getViewer(s))!==a&&(Xt(r,"clear"),r.detach()),t._activeView=e,a)return r!==a&&a.attachTo(t._container),t._emit("import.render.start",{view:e,element:l}),void a.open(l).then((n=>{t._emit("import.render.complete",{view:e,error:null,warnings:n.warnings}),o(null,n)})).catch((n=>{t._emit("import.render.complete",{view:e,error:n,warnings:n.warnings}),o(n,null)}));o()}))}_getViewer(e){var t=e.type,n=this._viewers[t];return n||(n=this._viewers[t]=this._createViewer(e.type),this._emit("viewer.created",{type:t,viewer:n})),n}_createViewer(e){var t=c(this._getViewProviders(),(function(t){return t.id===e}));if(!t)throw new Error("no provider for view type <"+e+">");var n=t.constructor,i=this._options[e]||{};return new n({...this._options.common||{},...i,additionalModules:[...i.additionalModules||[],{_parent:["value",this],moddle:["value",this._moddle]}]})}_emit(...e){return this._eventBus.fire(...e)}_createModdle(e){return new pt(e.moddleExtensions)}_getViewProviders(){return[]}}function Ut(e){return e+(o(e)?"px":"")}function Gt(e,t){return n(e)?!!n(t)&&(e.element===t.element||e.id===t.id):!n(t)}function Kt(e,t){return!e||!t||e.name!==t.name}function Xt(e,t){s(e[t])&&e[t]()}function Yt(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}const Jt=/^class[ {]/;function Qt(e){return Array.isArray(e)}function Zt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function en(...e){1===e.length&&Qt(e[0])&&(e=e[0]);const t=(e=[...e]).pop();return t.$inject=e,t}const tn=/constructor\s*[^(]*\(\s*([^)]*)\)/m,nn=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,rn=/\/\*([^*]*)\*\//m;function on(e){if("function"!=typeof e)throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(function(e){return Jt.test(e.toString())}(e)?tn:nn);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map((e=>{const t=e.match(rn);return(t&&t[1]||e).trim()}))||[]}function sn(e,t){const n=t||{get:function(e,t){if(i.push(e),!1===t)return null;throw a(`No provider for "${e}"!`)}},i=[],r=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),s=o.injector=this,a=function(e){const t=i.join(" -> ");return i.length=0,new Error(t?`${e} (Resolving: ${t})`:e)};function l(e,t){if(!r[e]&&e.includes(".")){const t=e.split(".");let n=l(t.shift());for(;t.length;)n=n[t.shift()];return n}if(Zt(o,e))return o[e];if(Zt(r,e)){if(-1!==i.indexOf(e))throw i.push(e),a("Cannot resolve circular dependency!");return i.push(e),o[e]=r[e][0](r[e][1]),i.pop(),o[e]}return n.get(e,t)}function c(e,t){if(void 0===t&&(t={}),"function"!=typeof e){if(!Qt(e))throw a(`Cannot invoke "${e}". Expected a function!`);e=en(e.slice())}return{fn:e,dependencies:(e.$inject||on(e)).map((e=>Zt(t,e)?t[e]:l(e)))}}function h(e){const{fn:t,dependencies:n}=c(e);return new(Function.prototype.bind.call(t,null,...n))}function u(e,t,n){const{fn:i,dependencies:r}=c(e,n);return i.apply(t,r)}function d(e){return en((t=>e.get(t)))}function p(e,t){if(t&&t.length){const n=Object.create(null),i=Object.create(null),o=[],s=[],a=[];let l,c,h,u;for(let e in r)l=r[e],-1!==t.indexOf(e)&&("private"===l[2]?(c=o.indexOf(l[3]),-1===c?(h=l[3].createChild([],t),u=d(h),o.push(l[3]),s.push(h),a.push(u),n[e]=[u,e,"private",h]):n[e]=[a[c],e,"private",s[c]]):n[e]=[l[2],l[1]],i[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]],i[t]=!0)}));t.forEach((e=>{if(!i[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')})),e.unshift(n)}return new sn(e,s)}const f={factory:u,type:h,value:function(e){return e}};function g(e,t){const n=e.__init__||[];return function(){n.forEach((e=>{"string"==typeof e?t.get(e):t.invoke(e)}))}}function m(e){const t=e.__exports__;if(t){const n=e.__modules__,i=Object.keys(e).reduce(((t,n)=>("__exports__"!==n&&"__modules__"!==n&&"__init__"!==n&&"__depends__"!==n&&(t[n]=e[n]),t)),Object.create(null)),o=p((n||[]).concat(i)),s=en((function(e){return o.get(e)}));t.forEach((function(e){r[e]=[s,e,"private",o]}));const a=(e.__init__||[]).slice();return a.unshift((function(){o.init()})),g(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(r[t]=n);const i=n[0],o=n[1];r[t]=[f[i],an(i,o),i]})),g(e,s)}function v(e,t){return-1!==e.indexOf(t)||-1!==(e=(t.__depends__||[]).reduce(v,e)).indexOf(t)?e:e.concat(t)}this.get=l,this.invoke=u,this.instantiate=h,this.createChild=p,this.init=function(e){const t=e.reduce(v,[]).map(m);let n=!1;return function(){n||(n=!0,t.forEach((e=>e())))}}(e)}function an(e,t){return"value"!==e&&Qt(t)&&(t=en(t.slice())),t}var ln=1e3;function cn(e,t){var n=this;t=t||ln,e.on(["render.shape","render.connection"],t,(function(e,t){var i=e.type,r=t.element,o=t.gfx,s=t.attrs;if(n.canRender(r))return"render.shape"===i?n.drawShape(o,r,s):n.drawConnection(o,r,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 hn(e,t){return function(e,t){t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}(e,t))}(t,e),e}cn.prototype.canRender=function(e){},cn.prototype.drawShape=function(e,t){},cn.prototype.drawConnection=function(e,t){},cn.prototype.getShapePath=function(e){},cn.prototype.getConnectionPath=function(e){};var un=2,dn={"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":un,"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":un,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function pn(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=dn[i];r?(r===un&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function fn(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return dn[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);pn(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)pn(e,i,t[i])}(e,t);return e}const gn=Object.prototype.toString;function mn(e){return new vn(e)}function vn(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}vn.prototype.add=function(e){return this.list.add(e),this},vn.prototype.remove=function(e){return"[object RegExp]"==gn.call(e)?this.removeMatching(e):(this.list.remove(e),this)},vn.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},vn.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},vn.prototype.array=function(){return Array.from(this.list)},vn.prototype.has=vn.prototype.contains=function(e){return this.list.contains(e)};var yn={svg:"http://www.w3.org/2000/svg"},wn='<svg xmlns="'+yn.svg+'"';function bn(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(yn.svg)&&(e=wn+e.substring(4)):(e=wn+">"+e+"</svg>",t=!0);var n=function(e){var t;return(t=new DOMParser).async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function xn(e,t){var n;return"<"===(e=e.trim()).charAt(0)?(n=bn(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(yn.svg,e),t&&fn(n,t),n}var _n=null;function Sn(){return null===_n&&(_n=xn("svg")),_n}function kn(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}var Cn=/([&<>]{1})/g,En=/([&<>\n\r"]{1})/g,Mn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function An(e,t){return e.replace(t,(function(e,t){return Mn[t]||t}))}function Rn(e,t){var n,i,r,o,s;switch(e.nodeType){case 3:t.push(An(e.textContent,Cn));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n<i;++n)o=r.item(n),t.push(" ",o.name,'="',An(o.value,En),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,i=(s=e.childNodes).length;n<i;++n)Rn(s.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",An(e.nodeValue,Cn),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function Tn(e,t){return function(e){for(var t=e.firstChild,n=[];t;)Rn(t,n),t=t.nextSibling;return n.join("")}(e)}function Dn(e){var t=e.parentNode;return t&&t.removeChild(e),e}function On(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function Nn(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(On(e,i))}(n,t)),n.consolidate()}function Pn(e){return e.flat().join(",").replace(/,?([A-z]),?/g,"$1")}function qn(e){return["L",e.x,e.y]}function Bn(e,t){const n=e.length,i=[(r=e[0],["M",r.x,r.y])];var r,o,s,a;for(let r=1;r<n;r++){const n=e[r-1],l=e[r],c=e[r+1];if(!c||!t){i.push(qn(l));continue}const h=Math.min(t,In(l.x-n.x,l.y-n.y),In(c.x-l.x,c.y-l.y));if(!h){i.push(qn(l));continue}const u=Ln(l,n,h),d=Ln(l,n,.5*h),p=Ln(l,c,h),f=Ln(l,c,.5*h);i.push(qn(u)),i.push((s=f,a=p,["C",(o=d).x,o.y,s.x,s.y,a.x,a.y]))}return i}function Ln(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=n/In(i,r);return{x:e.x+i*o,y:e.y+r*o}}function In(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function jn(e,t,n){o(t)&&(n=t,t=null),t||(t={});const i=xn("path",t);return o(n)&&(i.dataset.cornerRadius=String(n)),Fn(i,e)}function Fn(e,t){return fn(e,{d:Pn(Bn(t,parseInt(e.dataset.cornerRadius,10)||0))}),e}function Vn(e,t){var n,r,o,s;return t=!!t,i(e)||(e=[e]),u(e,(function(e){var i=e;e.waypoints&&!t&&(i=Vn(e.waypoints,!0));var a=i.x,l=i.y,c=i.height||0,h=i.width||0;(a<n||void 0===n)&&(n=a),(l<r||void 0===r)&&(r=l),(a+h>o||void 0===o)&&(o=a+h),(l+c>s||void 0===s)&&(s=l+c)})),{x:n,y:r,height:s-r,width:o-n}}function $n(e){return!(!e||!e.isFrame)}function zn(e,t){cn.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})}Yt(zn,cn),zn.prototype.canRender=function(){return!0},zn.prototype.drawShape=function(e,t,n){var i=xn("rect");return fn(i,{x:0,y:0,width:t.width||0,height:t.height||0}),$n(t)?fn(i,_({},this.FRAME_STYLE,n||{})):fn(i,_({},this.SHAPE_STYLE,n||{})),hn(e,i),i},zn.prototype.drawConnection=function(e,t,n){var i=jn(t.waypoints,_({},this.CONNECTION_STYLE,n||{}));return hn(e,i),i},zn.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width;return Pn([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])},zn.prototype.getConnectionPath=function(e){var t,n,i=e.waypoints,r=[];for(t=0;n=i[t];t++)n=n.original||n,r.push([0===t?"M":"L",n.x,n.y]);return Pn(r)},zn.$inject=["eventBus","styles"];var Hn={__init__:["defaultRenderer"],defaultRenderer:["type",zn],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 _(this.style(t,n),{class:e})},this.style=function(t,n){i(t)||n||(n=t,t=[]);var r=d(t,(function(t,n){return _(t,e[n]||{})}),{});return n?_(r,n):r},this.computeStyle=function(e,n,r){return i(n)||(r=n,n=[]),t.style(n||[],_({},r,e||{}))}}]};function Wn(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function Un(e,t){return Math.round(e*t)/t}function Gn(e){return o(e)?e+"px":e}function Kn(e,t,n){const i=xn("g");mn(i).add(t);const r=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]||null),i}const Xn={shape:["x","y","width","height"],connection:["waypoints"]};function Yn(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}function Jn(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}Yn.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],Yn.prototype._init=function(e){const t=this._eventBus,n=this._container=function(e){const t=(e=_({},{width:"100%",height:"100%"},e)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),xt(n,{position:"relative",overflow:"hidden",width:Gn(e.width),height:Gn(e.height)}),t.appendChild(n),n}(e),i=this._svg=xn("svg");fn(i,{width:"100%",height:"100%"}),_t(i,"tabindex",0),t.on("element.hover",(()=>{this.restoreFocus()})),i.addEventListener("focusin",(()=>{this._focused=!0,t.fire("canvas.focus.changed",{focused:!0})})),i.addEventListener("focusout",(()=>{this._focused=!1,t.fire("canvas.focus.changed",{focused:!1})})),hn(n,i);const r=this._viewport=Kn(i,"viewport");e.deferUpdate&&(this._viewboxChanged=b(x(this._viewboxChanged,this),300)),t.on("diagram.init",(()=>{t.fire("canvas.init",{svg:i,viewport:r})})),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)},Yn.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},Yn.prototype._clear=function(){this._elementRegistry.getAll().forEach((e=>{const t=function(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}(e);"root"===t?this.removeRootElement(e):this._removeElement(e,t)})),this._planes=[],this._rootElement=null,delete this._cachedViewbox},Yn.prototype.focus=function(){this._svg.focus({preventScroll:!0})},Yn.prototype.restoreFocus=function(){document.activeElement===document.body&&this.focus()},Yn.prototype.isFocused=function(){return this._focused},Yn.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},Yn.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},Yn.prototype._getChildIndex=function(e){return d(this._layers,(function(t,n){return n.visible&&e>=n.index&&t++,t}),0)},Yn.prototype._createLayer=function(e,t){void 0===t&&(t=1);const n=this._getChildIndex(t);return{group:Kn(this._viewport,"layer-"+e,n),index:t,visible:!0}},Yn.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,i=t.group,r=t.index;if(t.visible)return i;const o=this._getChildIndex(r);return n.insertBefore(i,n.childNodes[o]||null),t.visible=!0,i},Yn.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?(Dn(n),t.visible=!1,n):n},Yn.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],Dn(t.group))},Yn.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},Yn.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},Yn.prototype.getRootElements=function(){return this._planes.map((function(e){return e.rootElement}))},Yn.prototype._findPlaneForRoot=function(e){return c(this._planes,(function(t){return t.rootElement===e}))},Yn.prototype.getContainer=function(){return this._container},Yn.prototype._updateMarker=function(e,t,n){let i;e.id||(e=this._elementRegistry.get(e)),e.markers=e.markers||new Set,i=this._elementRegistry._elements[e.id],i&&(u([i.gfx,i.secondaryGfx],(function(i){i&&(n?(e.markers.add(t),mn(i).add(t)):(e.markers.delete(t),mn(i).remove(t)))})),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},Yn.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},Yn.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},Yn.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),!!e.markers&&e.markers.has(t)},Yn.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},Yn.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},Yn.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 i=this.getLayer(n,0);return this.hideLayer(n),this._addRoot(e,i),this._planes.push({rootElement:e,layer:i}),e},Yn.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},Yn.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},Yn.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)},Yn.prototype._addRoot=function(e,t){const n=this._elementRegistry,i=this._eventBus;i.fire("root.add",{element:e}),n.add(e,t),i.fire("root.added",{element:e,gfx:t})},Yn.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})},Yn.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=Xn[e],i=p(n,(function(e){return void 0!==t[e]}));if(!i)throw new Error("must supply { "+n.join(", ")+" } with "+e)},Yn.prototype._setParent=function(e,t,n){!function(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}(t.children,e,n),e.parent=t},Yn.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();const r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),r.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);const s=o.create(e,t,i);return this._elementRegistry.add(t,s),o.update(e,t,s),r.fire(e+".added",{element:t,gfx:s}),t},Yn.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},Yn.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},Yn.prototype._removeElement=function(e,t){const n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(e=n.get(e.id||e))return r.fire(t+".remove",{element:e}),i.remove(e),function(e,t){if(!e||!t)return-1;var n=e.indexOf(t);-1!==n&&e.splice(n,1)}(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},Yn.prototype.removeShape=function(e){return this._removeElement(e,"shape")},Yn.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},Yn.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},Yn.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},Yn.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},Yn.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let i,r,o,s,a,l,c;return e?(this._changeViewbox((function(){a=Math.min(n.width/e.width,n.height/e.height);const i=this._svg.createSVGMatrix().scale(a).translate(-e.x,-e.y);Nn(t,i)})),e):(o=this._rootElement?this.getActiveLayer():null,i=o&&o.getBBox()||{},s=Nn(t),r=s?s.matrix:function(e,t,n,i,r,o){var s=Sn().createSVGMatrix();switch(arguments.length){case 0:return s;case 1:return kn(s,e);case 6:return kn(s,{a:e,b:t,c:n,d:i,e:r,f:o})}}(),a=Un(r.a,1e3),l=Un(-r.e||0,1e3),c=Un(-r.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:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:n})},Yn.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox((function(){e=_({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),Jn(t,n)})),{x:n.e,y:n.f}},Yn.prototype.scrollToElement=function(e,t){let n=100;"string"==typeof e&&(e=this._elementRegistry.get(e));const i=this.findRoot(e);if(i!==this.getRootElement()&&this.setRootElement(i),i===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 r=Vn(e),o=Wn(r),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 h=Wn(s);if(r.width<s.width&&r.height<s.height){const e=Math.max(0,o.right-h.right),t=Math.min(0,o.left-h.left),n=Math.max(0,o.bottom-h.bottom),i=Math.min(0,o.top-h.top);l=e||t,c=n||i}else l=r.x-s.x,c=r.y-s.y;this.scroll({dx:-l*a,dy:-c*a})},Yn.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if("fit-viewport"===e)return this._fitViewport(t);let n,i;return this._changeViewbox((function(){"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)})),Un(i.a,1e3)},Yn.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,i=t.inner;let r,o;return i.x>=0&&i.y>=0&&i.x+i.width<=n.width&&i.y+i.height<=n.height&&!e?o={x:0,y:0,width:Math.max(i.width+i.x,n.width),height:Math.max(i.height+i.y,n.height)}:(r=Math.min(1,n.width/i.width,n.height/i.height),o={x:i.x+(e?i.width/2-n.width/r/2:0),y:i.y+(e?i.height/2-n.height/r/2:0),width:n.width/r,height:n.height/r}),this.viewbox(o),this.viewbox(!1).scale},Yn.prototype._setZoom=function(e,t){const n=this._svg,i=this._viewport,r=n.createSVGMatrix(),o=n.createSVGPoint();let s,a,l,c,h;l=i.getCTM();const u=l.a;return t?(s=_(o,t),a=s.matrixTransform(l.inverse()),c=r.translate(a.x,a.y).scale(1/u*e).translate(-a.x,-a.y),h=l.multiply(c)):h=r.scale(e),Jn(this._viewport,h),h},Yn.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},Yn.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}},Yn.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Qn="data-element-id";function Zn(e){this._elements={},this._eventBus=e}function ei(e,t,n){var i=function(e,t,n,i){var r=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,r,i)),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,r,i)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:i}),i.length&&i.forEach((function(i){e.set(i,t.inverse,n)}))}function ti(e,t){if(!(this instanceof ti))return new ti(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Zn.$inject=["eventBus"],Zn.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),fn(t,Qn,i),n&&fn(n,Qn,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},Zn.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(fn(i.gfx,Qn,""),i.secondaryGfx&&fn(i.secondaryGfx,Qn,""),delete t[n])},Zn.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),i=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,i)},Zn.prototype.updateGraphics=function(e,t,n){var i=e.id||e,r=this._elements[i];return n?r.secondaryGfx=t:r.gfx=t,t&&fn(t,Qn,i),t},Zn.prototype.get=function(e){var t;t="string"==typeof e?e:e&&fn(e,Qn);var n=this._elements[t];return n&&n.element},Zn.prototype.filter=function(e){var t=[];return this.forEach((function(n,i){e(n,i)&&t.push(n)})),t},Zn.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),i=0;i<n.length;i++){var r=t[n[i]],o=r.element;if(e(o,r.gfx))return o}},Zn.prototype.getAll=function(){return this.filter((function(e){return e}))},Zn.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach((function(n){var i=t[n],r=i.element,o=i.gfx;return e(r,o)}))},Zn.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},Zn.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")},ti.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?ei(this,t,e):function(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var o=r;r=null,o&&e.unset(o,i,n),r=t,e.set(r,i,n)}}})}(this,t,e)},ti.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return function(e){return!0===e.__refs_collection}(n)||ei(this,t,e),n},ti.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},ti.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},ti.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var ni=new ti({name:"children",enumerable:!0,collection:!0},{name:"parent"}),ii=new ti({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),ri=new ti({name:"attachers",collection:!0},{name:"host"}),oi=new ti({name:"outgoing",collection:!0},{name:"source"}),si=new ti({name:"incoming",collection:!0},{name:"target"});function ai(){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)}}),ni.bind(this,"parent"),ii.bind(this,"labels"),oi.bind(this,"outgoing"),si.bind(this,"incoming")}function li(){ai.call(this),ni.bind(this,"children"),ri.bind(this,"host"),ri.bind(this,"attachers")}function ci(){ai.call(this),ni.bind(this,"children")}function hi(){li.call(this),ii.bind(this,"labelTarget")}function ui(){ai.call(this),oi.bind(this,"source"),si.bind(this,"target")}Yt(li,ai),Yt(ci,li),Yt(hi,li),Yt(ui,ai);var di={connection:ui,shape:li,label:hi,root:ci};function pi(){this._uid=12}function fi(e,t,n){var i=Sn().createSVGTransform();i.setTranslate(t,n),Nn(e,i)}function gi(e,t){this._eventBus=e,this._elementRegistry=t}function mi(e,t,n){var i=n||t.firstChild;e!==i&&t.insertBefore(e,i)}pi.prototype.createRoot=function(e){return this.create("root",e)},pi.prototype.createLabel=function(e){return this.create("label",e)},pi.prototype.createShape=function(e){return this.create("shape",e)},pi.prototype.createConnection=function(e){return this.create("connection",e)},pi.prototype.create=function(e,t){return(t=_({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=di[e];if(!n)throw new Error("unknown type: <"+e+">");return _(new n,t)}(e,t)},gi.$inject=["eventBus","elementRegistry"],gi.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=function(e){return e.parentNode.childNodes[1]}(n),t||(mn(t=xn("g")).add("djs-children"),hn(n.parentNode,t))):t=n,t},gi.prototype._clear=function(e){var t=function(e){return e.childNodes[0]}(e);return Et(t),t},gi.prototype._createContainer=function(e,t,n,i){var r=xn("g");mn(r).add("djs-group"),void 0!==n?mi(r,t,t.childNodes[n]):hn(t,r);var o=xn("g");mn(o).add("djs-element"),mn(o).add("djs-"+e),i&&mn(o).add("djs-frame"),hn(r,o);var s=xn("g");return mn(s).add("djs-visual"),hn(o,s),o},gi.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,$n(t))},gi.prototype.updateContainments=function(e){var t,n=this,i=this._elementRegistry;t=d(e,(function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e}),{}),u(t,(function(e){var t=e.children;if(t){var r=n._getChildrenContainer(e);u(t.slice().reverse(),(function(e){mi(i.getGraphics(e).parentNode,r)}))}}))},gi.prototype.drawShape=function(e,t,n={}){return this._eventBus.fire("render.shape",{gfx:e,element:t,attrs:n})},gi.prototype.getShapePath=function(e){return this._eventBus.fire("render.getShapePath",e)},gi.prototype.drawConnection=function(e,t,n={}){return this._eventBus.fire("render.connection",{gfx:e,element:t,attrs:n})},gi.prototype.getConnectionPath=function(e){return this._eventBus.fire("render.getConnectionPath",e)},gi.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if("shape"===e)this.drawShape(i,t),fi(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(i,t)}t.hidden?fn(n,"display","none"):fn(n,"display","block")}},gi.prototype.remove=function(e){Dn(this._elementRegistry.getGraphics(e).parentNode)};var vi={__depends__:[Hn],__init__:["canvas"],canvas:["type",Yn],elementRegistry:["type",Zn],elementFactory:["type",pi],eventBus:["type",C],graphicsFactory:["type",gi]};function yi(e){return function(e){var t=new sn(e);return t.init(),t}([{config:["value",e=e||{}]},vi].concat(e.modules||[]))}function wi(e,t){this._injector=t||yi(e),this.get("eventBus").fire("diagram.init")}function bi(e,t){var n=xi(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function xi(e){return e&&e.businessObject||e}function _i(e){var t=xi(e);if(bi(t,"dmn:Decision"))return t.get("decisionLogic");if(bi(t,"dmn:BusinessKnowledgeModel")){var n=t.get("encapsulatedLogic");return n&&n.get("body")}}wi.prototype.get=function(e,t){return this._injector.get(e,t)},wi.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},wi.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},wi.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};var Si=new ti({name:"dmnElementRef",enumerable:!0},{name:"di",configurable:!0});function ki(e,t){var n=[];function i(t){try{var n=t.di&&function(t){if(t.gfx)throw new Error("already rendered "+t.id);return e.element(t)}(t);return n}catch(e){s(e.message,{element:t,error:e})}}function r(e){var t,n;(n=(t=e).dmnElementRef)?n.di?s("multiple DI elements defined for element",{element:n}):(Si.bind(n,"di"),n.di=t):s("no DMN element referenced in element",{element:t})}function o(e){n.push(e)}function s(t,n){e.error(t,n)}return{handleDefinitions:function(t,s){var a=t.dmnDI;if(!a)throw new Error("no dmndi:DMNDI");var l,c=a.diagrams||[];if(s&&-1===c.indexOf(s))throw new Error("diagram not part of dmndi:DMNDI");if(!s&&c&&c.length&&(s=c[0]),!s)throw new Error("no diagram to display");t.di=s,function(e){u(e.diagramElements,r)}(s),l=t,e.root(l),u(t.get("drgElement"),(function(e){i(e),function(e){u(["informationRequirement","knowledgeRequirement","authorityRequirement"],(function(t){u(e[t],(function(e){o((function(){i(e)}))}))}))}(e)})),function(e){u(e,(function(e){bi(e,"dmn:Association")?function(e){o((function(){i(e)}))}(e):i(e)}))}(t.get("artifact")),u(n,(function(e){e()}))}}}var Ci="$NO_OP",Ei="a runtime error occured! Use Inferno in development environment to find the error.",Mi=!("undefined"==typeof window||!window.document),Ai=Array.isArray;function Ri(e){var t=typeof e;return"string"===t||"number"===t}function Ti(e){return Bi(e)||qi(e)}function Di(e){return qi(e)||!1===e||function(e){return!0===e}(e)||Bi(e)}function Oi(e){return"function"==typeof e}function Ni(e){return"string"==typeof e}function Pi(e){return"number"==typeof e}function qi(e){return null===e}function Bi(e){return void 0===e}function Li(e){throw e||(e=Ei),new Error("Inferno Error: "+e)}function Ii(e){console.error(e)}function ji(e,t){var n={};if(e)for(var i in e)n[i]=e[i];if(t)for(var r in t)n[r]=t[r];return n}function Fi(e){var t;if(Ai(e))t="Array("+(e.length>3?e.slice(0,3).toString()+",...":e.toString())+")";else if(Ri(e))t="Text("+e+")";else if(Di(e))t="InvalidVNode("+e+")";else{var n=e.flags;if(481&n)t="<"+e.type+(e.className?' class="'+e.className+'"':"")+">";else if(16&n)t="Text("+e.children+")";else if(1024&n)t="Portal*";else{var i=e.type;t="<"+(i.name||i.displayName||i.constructor.name||(i.toString().match(/^function\s*([^\s(]+)/)||[])[1])+" />"}}return">> "+t+"\n"}function Vi(e,t){for(var n={},i=0,r=e.length;i<r;i++){var o=e[i];if(Ai(o))return"Encountered ARRAY in mount, array must be flattened, or normalize used. Location: \n"+Fi(o);if(Di(o)){if(t)return"Encountered invalid node when preparing to keyed algorithm. Location: \n"+Fi(o);if(0!==Object.keys(n).length)return"Encountered invalid node with mixed keys. Location: \n"+Fi(o)}else{"object"==typeof o&&(o.isValidated=!0);var s=o.key;if(!Ti(s)&&!Ri(s))return"Encountered child vNode where key property is not string or number. Location: \n"+Fi(o);var a=o.children,l=o.childFlags;if(!Di(a)){var c=void 0;if(12&l?c=Vi(a,8&o.childFlags):2===l&&(c=Vi([a],8&o.childFlags)),c)return c+=Fi(o)}if(t&&Ti(s))return"Encountered child without key during keyed algorithm. If this error points to Array make sure children is flat list. Location: \n"+Fi(o);if(t||!Ti(s)){if(n[s])return"Encountered two children with same key: {"+s+"}. Location: \n"+Fi(o);n[s]=!0}else if(0!==Object.keys(n).length)return"Encountered children with key missing. Location: \n"+Fi(o)}}}function $i(e){if(!(1&e.childFlags)&&(64&e.flags&&Li("input elements can't have children."),128&e.flags&&Li("textarea elements can't have children."),481&e.flags)){var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=e.type.toLowerCase();"media"===n&&Li("media elements can't have children.");var i=t.indexOf(n);-1!==i&&Li(t[i]+" elements can't have children.")}}function zi(e){if(!1===e.isValidated&&e.children&&481&e.flags){var t=Vi(Array.isArray(e.children)?e.children:[e.children],(8&e.childFlags)>0);t&&Li(t+Fi(e))}e.isValidated=!0}var Hi="$";function Wi(e,t,n,i,r,o,s,a){return{childFlags:e,children:t,className:n,dom:null,flags:i,isValidated:!1,key:void 0===r?null:r,parentVNode:null,props:void 0===o?null:o,ref:void 0===s?null:s,type:a}}function Ui(e,t,n,i,r,o,s,a){14&e&&Li("Creating Component vNodes using createVNode is not allowed. Use Inferno.createComponentVNode method.");var l=void 0===r?1:r,c=Wi(l,i,n,e,s,o,a,t);return 0===l&&Zi(c,c.children),$i(c),c}function Gi(e,t,n,i,r){1&e&&Li("Creating element vNodes using createComponentVNode is not allowed. Use Inferno.createVNode method."),(2&e)>0&&(e=t.prototype&&Oi(t.prototype.render)?4:8);var o=t.defaultProps;if(!Ti(o))for(var s in n||(n={}),o)Bi(n[s])&&(n[s]=o[s]);if((8&e)>0){var a=t.defaultHooks;if(!Ti(a))if(r)for(var l in a)Bi(r[l])&&(r[l]=a[l]);else r=a}var c=Wi(1,null,null,e,i,n,r,t),h=er.createVNode;return Oi(h)&&h(c),c}function Ki(e,t){return Wi(1,Ti(e)?"":e,null,16,t,null,null,null)}function Xi(e){var t=e.props;if(t){var n=e.flags;481&n&&(void 0!==t.children&&Ti(e.children)&&Zi(e,t.children),void 0!==t.className&&(e.className=t.className||null,t.className=void 0)),void 0!==t.key&&(e.key=t.key,t.key=void 0),void 0!==t.ref&&(e.ref=8&n?ji(e.ref,t.ref):t.ref,t.ref=void 0)}return e}function Yi(e){var t,n=e.flags;if(14&n){var i,r=e.props;if(!qi(r))for(var o in i={},r)i[o]=r[o];t=Gi(n,e.type,i,e.key,e.ref)}else 481&n?t=Ui(n,e.type,e.className,e.children,e.childFlags,e.props,e.key,e.ref):16&n?t=Ki(e.children,e.key):1024&n&&(t=e);return t}function Ji(){return Ki("",null)}function Qi(e,t,n,i){for(var r=e.length;n<r;n++){var o=e[n];if(!Di(o)){var s=i+Hi+n;if(Ai(o))Qi(o,t,0,s);else{if(Ri(o))o=Ki(o,s);else{var a=o.key,l=Ni(a)&&a[0]===Hi;qi(o.dom)&&!l||(o=Yi(o)),qi(a)||l?o.key=s:o.key=i+a}t.push(o)}}}}function Zi(e,t){var n,i=1;if(Di(t))n=t;else if(Ni(t))i=2,n=Ki(t);else if(Pi(t))i=2,n=Ki(t+"");else if(Ai(t)){var r=t.length;if(0===r)n=null,i=1;else{(Object.isFrozen(t)||!0===t.$)&&(t=t.slice()),i=8;for(var o=0;o<r;o++){var s=t[o];if(Di(s)||Ai(s)){n=n||t.slice(0,o),Qi(t,n,o,"");break}if(Ri(s))(n=n||t.slice(0,o)).push(Ki(s,Hi+o));else{var a=s.key,l=qi(s.dom),c=qi(a),h=!c&&Ni(a)&&a[0]===Hi;!l||c||h?(n=n||t.slice(0,o),l&&!h||(s=Yi(s)),(c||h)&&(s.key=Hi+o),n.push(s)):n&&n.push(s)}}(n=n||t).$=!0}}else n=t,qi(t.dom)||(n=Yi(t)),i=2;return e.children=n,e.childFlags=i,$i(e),e}var er={afterRender:null,beforeRender:null,createVNode:null,renderComplete:null},tr="http://www.w3.org/1999/xlink",nr="http://www.w3.org/XML/1998/namespace",ir="http://www.w3.org/2000/svg",rr={"xlink:actuate":tr,"xlink:arcrole":tr,"xlink:href":tr,"xlink:role":tr,"xlink:show":tr,"xlink:title":tr,"xlink:type":tr,"xml:base":nr,"xml:lang":nr,"xml:space":nr},or={},sr=[];function ar(e,t){e.appendChild(t)}function lr(e,t,n){Ti(n)?ar(e,t):e.insertBefore(t,n)}function cr(e,t,n){e.replaceChild(t,n)}function hr(e){for(var t;void 0!==(t=e.shift());)t()}Object.freeze(or);var ur={},dr={};function pr(e,t,n){var i=ur[e],r=n.$EV;t?(i||(dr[e]=function(e){var t=function(t){var n=t.type,i="click"===n||"dblclick"===n;if(i&&0!==t.button)return t.stopPropagation(),!1;t.stopPropagation=gr;var r={dom:document};Object.defineProperty(t,"currentTarget",{configurable:!0,get:function(){return r.dom}}),function(e,t,n,i){var r=function(e){return Oi(e.composedPath)?e.composedPath()[0]:e.target}(e);for(;!qi(r);){if(t&&r.disabled)return;var o=r.$EV;if(o){var s=o[n];if(s&&(i.dom=r,s.event?s.event(s.data,e):s(e),e.cancelBubble))return}r=r.parentNode}}(t,i,e,r)};return document.addEventListener(fr(e),t),t}(e),ur[e]=0),r||(r=n.$EV={}),r[e]||ur[e]++,r[e]=t):r&&r[e]&&(ur[e]--,1===i&&(document.removeEventListener(fr(e),dr[e]),dr[e]=null),r[e]=t)}function fr(e){return e.substr(2).toLowerCase()}function gr(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function mr(e,t){var n=document.createElement("i");return n.innerHTML=t,n.innerHTML===e.innerHTML}function vr(e,t,n){if(e[t]){var i=e[t];i.event?i.event(i.data,n):i(n)}else{var r=t.toLowerCase();e[r]&&e[r](n)}}function yr(e,t){var n=function(n){n.stopPropagation();var i=this.$V;if(i){var r=i.props||or,o=i.dom;if(Ni(e))vr(r,e,n);else for(var s=0;s<e.length;s++)vr(r,e[s],n);if(Oi(t)){var a=this.$V,l=a.props||or;t(l,o,!1,a)}}};return Object.defineProperty(n,"wrapped",{configurable:!1,enumerable:!1,value:!0,writable:!1}),n}function wr(e){return"checkbox"===e||"radio"===e}var br=yr("onInput",Sr),xr=yr(["onClick","onChange"],Sr);function _r(e){e.stopPropagation()}function Sr(e,t){var n=e.type,i=e.value,r=e.checked,o=e.multiple,s=e.defaultValue,a=!Ti(i);n&&n!==t.type&&t.setAttribute("type",n),Ti(o)||o===t.multiple||(t.multiple=o),Ti(s)||a||(t.defaultValue=s+""),wr(n)?(a&&(t.value=i),Ti(r)||(t.checked=r)):a&&t.value!==i?(t.defaultValue=i,t.value=i):Ti(r)||(t.checked=r)}function kr(e,t){if("optgroup"===e.type){var n=e.children,i=e.childFlags;if(12&i)for(var r=0,o=n.length;r<o;r++)Cr(n[r],t);else 2===i&&Cr(n,t)}else Cr(e,t)}function Cr(e,t){var n=e.props||or,i=e.dom;i.value=n.value,Ai(t)&&-1!==t.indexOf(n.value)||n.value===t?i.selected=!0:Ti(t)&&Ti(n.selected)||(i.selected=n.selected||!1)}_r.wrapped=!0;var Er=yr("onChange",Mr);function Mr(e,t,n,i){var r=Boolean(e.multiple);Ti(e.multiple)||r===t.multiple||(t.multiple=r);var o=i.childFlags;if(!(1&o)){var s=i.children,a=e.value;if(n&&Ti(a)&&(a=e.defaultValue),12&o)for(var l=0,c=s.length;l<c;l++)kr(s[l],a);else 2===o&&kr(s,a)}}var Ar=yr("onInput",Tr),Rr=yr("onChange");function Tr(e,t,n){var i=e.value,r=t.value;if(Ti(i)){if(n){var o=e.defaultValue;Ti(o)||o===r||(t.defaultValue=o,t.value=o)}}else r!==i&&(t.defaultValue=i,t.value=i)}function Dr(e,t,n,i,r,o){64&e?Sr(i,n):256&e?Mr(i,n,r,t):128&e&&Tr(i,n,r),o&&(n.$V=t)}function Or(e,t,n){64&e?function(e,t){wr(t.type)?(e.onchange=xr,e.onclick=_r):e.oninput=br}(t,n):256&e?function(e){e.onchange=Er}(t):128&e&&function(e,t){e.oninput=Ar,t.onChange&&(e.onchange=Rr)}(t,n)}function Nr(e){return e.type&&wr(e.type)?!Ti(e.checked):!Ti(e.value)}function Pr(e,t){qr(e),t&&e.dom&&(!function(e,t){e.removeChild(t)}(t,e.dom),e.dom=null)}function qr(e){var t=e.flags;if(481&t){var n=e.ref,i=e.props;Oi(n)&&n(null);var r=e.children,o=e.childFlags;if(12&o?Br(r):2===o&&qr(r),!qi(i))for(var s in i)switch(s){case"onClick":case"onDblClick":case"onFocusIn":case"onFocusOut":case"onKeyDown":case"onKeyPress":case"onKeyUp":case"onMouseDown":case"onMouseMove":case"onMouseUp":case"onSubmit":case"onTouchEnd":case"onTouchMove":case"onTouchStart":pr(s,null,e.dom)}}else{var a=e.children;if(a)if(14&t){var l=e.ref;4&t?(Oi(a.componentWillUnmount)&&a.componentWillUnmount(),Oi(l)&&l(null),a.$UN=!0,a.$LI&&qr(a.$LI)):(!Ti(l)&&Oi(l.onComponentWillUnmount)&&l.onComponentWillUnmount(e.dom,e.props||or),qr(a))}else 1024&t&&Pr(a,e.type)}}function Br(e){for(var t=0,n=e.length;t<n;t++)qr(e[t])}function Lr(e,t){Br(t),e.textContent=""}function Ir(e,t){switch(e){case"animationIterationCount":case"borderImageOutset":case"borderImageSlice":case"borderImageWidth":case"boxFlex":case"boxFlexGroup":case"boxOrdinalGroup":case"columnCount":case"fillOpacity":case"flex":case"flexGrow":case"flexNegative":case"flexOrder":case"flexPositive":case"flexShrink":case"floodOpacity":case"fontWeight":case"gridColumn":case"gridRow":case"lineClamp":case"lineHeight":case"opacity":case"order":case"orphans":case"stopOpacity":case"strokeDasharray":case"strokeDashoffset":case"strokeMiterlimit":case"strokeOpacity":case"strokeWidth":case"tabSize":case"widows":case"zIndex":case"zoom":return t;default:return t+"px"}}function jr(e,t,n,i,r,o,s){switch(e){case"onClick":case"onDblClick":case"onFocusIn":case"onFocusOut":case"onKeyDown":case"onKeyPress":case"onKeyUp":case"onMouseDown":case"onMouseMove":case"onMouseUp":case"onSubmit":case"onTouchEnd":case"onTouchMove":case"onTouchStart":pr(e,n,i);break;case"children":case"childrenType":case"className":case"defaultValue":case"key":case"multiple":case"ref":break;case"autoFocus":i.autofocus=!!n;break;case"allowfullscreen":case"autoplay":case"capture":case"checked":case"controls":case"default":case"disabled":case"hidden":case"indeterminate":case"loop":case"muted":case"novalidate":case"open":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"selected":i[e]=!!n;break;case"defaultChecked":case"value":case"volume":if(o&&"value"===e)return;var a=Ti(n)?"":n;i[e]!==a&&(i[e]=a);break;case"dangerouslySetInnerHTML":var l=t&&t.__html||"",c=n&&n.__html||"";l!==c&&(Ti(c)||mr(i,c)||(qi(s)||(12&s.childFlags?Br(s.children):2===s.childFlags&&qr(s.children),s.children=null,s.childFlags=1),i.innerHTML=c));break;default:"o"===e[0]&&"n"===e[1]?function(e,t,n){var i=e.toLowerCase();if(Oi(t)||Ti(t)){var r=n[i];r&&r.wrapped||(n[i]=t)}else{var o=t.event;o&&Oi(o)?n[i]=function(e,t){return function(n){e(t.data,n)}}(o,t):Li('an event on a VNode "'+e+'". was not a function or a valid linkEvent.')}}(e,n,i):Ti(n)?i.removeAttribute(e):"style"===e?function(e,t,n){var i,r,o=n.style;if(Ni(t))o.cssText=t;else if(Ti(e)||Ni(e))for(i in t)r=t[i],o[i]=Pi(r)?Ir(i,r):r;else{for(i in t)(r=t[i])!==e[i]&&(o[i]=Pi(r)?Ir(i,r):r);for(i in e)Ti(t[i])&&(o[i]="")}}(t,n,i):r&&rr[e]?i.setAttributeNS(rr[e],e,n):i.setAttribute(e,n)}}function Fr(e,t,n,i,r){var o=!1,s=(448&t)>0;for(var a in s&&(o=Nr(n))&&Or(t,i,n),n)jr(a,null,n[a],i,r,o,null);s&&Dr(t,e,i,n,!0,o)}function Vr(e,t,n,i){var r=new t(n,i);if(e.children=r,r.$V=e,r.$BS=!1,r.context=i,r.props===or&&(r.props=n),r.$UN=!1,Oi(r.componentWillMount)){if(r.$BR=!0,r.componentWillMount(),r.$PSS){var o=r.state,s=r.$PS;if(qi(o))r.state=s;else for(var a in s)o[a]=s[a];r.$PSS=!1,r.$PS=null}r.$BR=!1}Oi(er.beforeRender)&&er.beforeRender(r);var l,c=$r(r.render(n,r.state,i),e);return Oi(r.getChildContext)&&(l=r.getChildContext()),Ti(l)?r.$CX=i:r.$CX=ji(i,l),Oi(er.afterRender)&&er.afterRender(r),r.$LI=c,r}function $r(e,t){return Ai(e)&&Li("a valid Inferno VNode (or null) must be returned from a component render. You may have returned an array or an invalid object."),Di(e)?e=Ji():Ri(e)?e=Ki(e,null):(e.dom&&(e=Yi(e)),14&e.flags&&(e.parentVNode=t)),e}function zr(e,t,n,i){var r=e.flags;return 481&r?Wr(e,t,n,i):14&r?function(e,t,n,i,r){var o,s=e.type,a=e.props||or,l=e.ref;if(r){var c=Vr(e,s,a,n);e.dom=o=zr(c.$LI,null,c.$CX,i),Gr(e,l,c),c.$UPD=!1}else{var h=$r(s(a,n),e);e.children=h,e.dom=o=zr(h,null,n,i),Kr(a,l,o)}qi(t)||ar(t,o);return o}(e,t,n,i,(4&r)>0):512&r||16&r?Hr(e,t):1024&r?(zr(e.children,e.type,n,!1),e.dom=Hr(Ji(),t)):void Li("object"==typeof e?"mount() received an object that's not a valid VNode, you should stringify it first, fix createVNode flags or call normalizeChildren. Object: \""+JSON.stringify(e)+'".':'mount() expects a valid VNode, instead it received an object with the type "'+typeof e+'".')}function Hr(e,t){var n=e.dom=document.createTextNode(e.children);return qi(t)||ar(t,n),n}function Wr(e,t,n,i){var r=e.flags,o=e.children,s=e.props,a=e.className,l=e.ref,c=e.childFlags;i=i||(32&r)>0;var h=function(e,t){return t?document.createElementNS(ir,e):document.createElement(e)}(e.type,i);if(e.dom=h,Ti(a)||""===a||(i?h.setAttribute("class",a):h.className=a),zi(e),qi(t)||ar(t,h),!(1&c)){var u=!0===i&&"foreignObject"!==e.type;2===c?zr(o,h,n,u):12&c&&Ur(o,h,n,u)}return qi(s)||Fr(e,r,s,h,i),Ni(l)&&Li('string "refs" are not supported in Inferno 1.0. Use callback "refs" instead.'),Oi(l)&&Xr(h,l),h}function Ur(e,t,n,i){for(var r=0,o=e.length;r<o;r++){var s=e[r];qi(s.dom)||(e[r]=s=Yi(s)),zr(s,t,n,i)}}function Gr(e,t,n){Oi(t)?t(n):Ri(t)?Li('string "refs" are not supported in Inferno 1.0. Use callback "refs" instead.'):!Ti(t)&&"object"==typeof t&&4&e.flags&&Li("functional component lifecycle events are not supported on ES2015 class components."),Oi(n.componentDidMount)&&sr.push(function(e){return function(){e.$UPD=!0,e.componentDidMount(),e.$UPD=!1}}(n))}function Kr(e,t,n){Ti(t)||(Oi(t.onComponentWillMount)&&t.onComponentWillMount(e),Oi(t.onComponentDidMount)&&sr.push(function(e,t,n){return function(){return e.onComponentDidMount(t,n)}}(t,n,e)))}function Xr(e,t){sr.push((function(){return t(e)}))}function Yr(e,t,n,i){var r=e.children,o=e.props,s=e.className,a=e.flags,l=e.ref;if(i=i||(32&a)>0,1!==t.nodeType||t.tagName.toLowerCase()!==e.type){Ii("Inferno hydration: Server-side markup doesn't match client-side markup or Initial render target is not empty");var c=Wr(e,null,n,i);e.dom=c,cr(t.parentNode,c,t)}else{e.dom=t;var h=t.firstChild,u=e.childFlags;if(1&u)qi(t.firstChild)||function(e,t){return Boolean(t&&t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html&&mr(e,t.dangerouslySetInnerHTML.__html))}(t,o)||(t.textContent="",448&a&&(t.defaultValue=""));else{for(var d=null;h;)d=h.nextSibling,8===h.nodeType&&("!"===h.data?t.replaceChild(document.createTextNode(""),h):t.removeChild(h)),h=d;if(h=t.firstChild,2===u)qi(h)?zr(r,t,n,i):(d=h.nextSibling,Jr(r,h,n,i),h=d);else if(12&u)for(var p=0,f=r.length;p<f;p++){var g=r[p];qi(h)?zr(g,t,n,i):(d=h.nextSibling,Jr(g,h,n,i),h=d)}for(;h;)d=h.nextSibling,t.removeChild(h),h=d}qi(o)||Fr(e,a,o,t,i),Ti(s)?""!==t.className&&t.removeAttribute("class"):i?t.setAttribute("class",s):t.className=s,Oi(l)?Xr(t,l):Ni(l)&&Li('string "refs" are not supported in Inferno 1.0. Use callback "refs" instead.')}}function Jr(e,t,n,i){var r=e.flags;14&r?function(e,t,n,i,r){var o=e.type,s=e.ref,a=e.props||or;if(r){var l=Vr(e,o,a,n),c=l.$LI;Jr(c,t,l.$CX,i),e.dom=c.dom,Gr(e,s,l),l.$UPD=!1}else{var h=$r(o(a,n),e);Jr(h,t,n,i),e.children=h,e.dom=h.dom,Kr(a,s,t)}}(e,t,n,i,(4&r)>0):481&r?Yr(e,t,n,i):16&r?function(e,t){if(3!==t.nodeType){var n=Hr(e,null);e.dom=n,cr(t.parentNode,n,t)}else{var i=e.children;t.nodeValue!==i&&(t.nodeValue=i),e.dom=t}}(e,t):512&r?e.dom=t:(Li('hydrate() expects a valid VNode, instead it received an object with the type "'+typeof e+'".'),Li())}function Qr(e,t,n,i,r){qr(e),cr(n,zr(t,null,i,r),e.dom)}function Zr(e,t,n,i,r){var o=0|t.flags;e.flags!==o||2048&o?Qr(e,t,n,i,r):481&o?function(e,t,n,i,r,o){var s=t.type;if(e.type!==s)Qr(e,t,n,i,r);else{var a,l=e.dom,c=e.props,h=t.props,u=!1,d=!1;if(t.dom=l,r=r||(32&o)>0,c!==h){var p=c||or;if((a=h||or)!==or)for(var f in(u=(448&o)>0)&&(d=Nr(a)),a){var g=p[f],m=a[f];g!==m&&jr(f,g,m,l,r,d,e)}if(p!==or)for(var v in p)a.hasOwnProperty(v)||Ti(p[v])||jr(v,p[v],null,l,r,d,e)}var y=e.children,w=t.children,b=t.ref,x=e.className,_=t.className;zi(t),4096&o?function(e,t){e.textContent!==t.children&&(e.textContent=t.children)}(l,w):eo(e.childFlags,t.childFlags,y,w,l,i,r&&"foreignObject"!==s),u&&Dr(o,t,l,a,!1,d),x!==_&&(Ti(_)?l.removeAttribute("class"):r?l.setAttribute("class",_):l.className=_),Oi(b)&&e.ref!==b?Xr(l,b):Ni(b)&&Li('string "refs" are not supported in Inferno 1.0. Use callback "refs" instead.')}}(e,t,n,i,r,o):14&o?function(e,t,n,i,r,o){var s=t.type,a=e.key,l=t.key;if(e.type!==s||a!==l)Qr(e,t,n,i,r);else{var c=t.props||or;if(o){var h=e.children;h.$UPD=!0,h.$V=t,to(h,h.state,t,c,n,i,r,!1,!1),h.$UPD=!1}else{var u=!0,d=e.props,p=t.ref,f=!Ti(p),g=e.children;if(t.dom=e.dom,t.children=g,f&&Oi(p.onComponentShouldUpdate)&&(u=p.onComponentShouldUpdate(d,c)),!1!==u){f&&Oi(p.onComponentWillUpdate)&&p.onComponentWillUpdate(d,c);var m=s(c,i);m!==Ci&&(Zr(g,m=$r(m,t),n,i,r),t.children=m,t.dom=m.dom,f&&Oi(p.onComponentDidUpdate)&&p.onComponentDidUpdate(d,c))}else 14&g.flags&&(g.parentVNode=t)}}}(e,t,n,i,r,(4&o)>0):16&o?function(e,t){var n=t.children,i=e.dom;n!==e.children&&(i.nodeValue=n);t.dom=i}(e,t):512&o?t.dom=e.dom:function(e,t,n){var i=e.type,r=t.type,o=t.children;if(eo(e.childFlags,t.childFlags,e.children,o,i,n,!1),t.dom=e.dom,i!==r&&!Di(o)){var s=o.dom;i.removeChild(s),r.appendChild(s)}}(e,t,i)}function eo(e,t,n,i,r,o,s){switch(e){case 2:switch(t){case 2:Zr(n,i,r,o,s);break;case 1:Pr(n,r);break;default:Pr(n,r),Ur(i,r,o,s)}break;case 1:switch(t){case 2:zr(i,r,o,s);break;case 1:break;default:Ur(i,r,o,s)}break;default:if(12&t){var a=n.length,l=i.length;0===a?l>0&&Ur(i,r,o,s):0===l?Lr(r,n):8===t&&8===e?function(e,t,n,i,r,o,s){var a,l,c=o-1,h=s-1,u=0,d=e[u],p=t[u];e:{for(;d.key===p.key;){if(p.dom&&(t[u]=p=Yi(p)),Zr(d,p,n,i,r),e[u]=p,++u>c||u>h)break e;d=e[u],p=t[u]}for(d=e[c],p=t[h];d.key===p.key;){if(p.dom&&(t[h]=p=Yi(p)),Zr(d,p,n,i,r),e[c]=p,h--,u>--c||u>h)break e;d=e[c],p=t[h]}}if(u>c){if(u<=h)for(var f=(l=h+1)<s?t[l].dom:null;u<=h;)(p=t[u]).dom&&(t[u]=p=Yi(p)),u++,lr(n,zr(p,null,i,r),f)}else if(u>h)for(;u<=c;)Pr(e[u++],n);else{var g=u,m=u,v=c-u+1,y=h-u+1,w=[];for(a=0;a<y;a++)w.push(0);var b=v===o,x=!1,_=0,S=0;if(s<4||(v|y)<32)for(a=g;a<=c;a++)if(d=e[a],S<y){for(u=m;u<=h;u++)if(p=t[u],d.key===p.key){if(w[u-m]=a+1,b)for(b=!1;a>g;)Pr(e[g++],n);_>u?x=!0:_=u,p.dom&&(t[u]=p=Yi(p)),Zr(d,p,n,i,r),S++;break}!b&&u>h&&Pr(d,n)}else b||Pr(d,n);else{var k={};for(a=m;a<=h;a++)k[t[a].key]=a;for(a=g;a<=c;a++)if(d=e[a],S<y)if(void 0!==(u=k[d.key])){if(b)for(b=!1;a>g;)Pr(e[g++],n);p=t[u],w[u-m]=a+1,_>u?x=!0:_=u,p.dom&&(t[u]=p=Yi(p)),Zr(d,p,n,i,r),S++}else b||Pr(d,n);else b||Pr(d,n)}if(b)Lr(n,e),Ur(t,n,i,r);else if(x){var C=function(e){var t,n,i,r,o,s=e.slice(),a=[0],l=e.length;for(t=0;t<l;t++){var c=e[t];if(0!==c){if(e[n=a[a.length-1]]<c){s[t]=n,a.push(t);continue}for(i=0,r=a.length-1;i<r;)e[a[o=(i+r)/2|0]]<c?i=o+1:r=o;c<e[a[i]]&&(i>0&&(s[t]=a[i-1]),a[i]=t)}}i=a.length,r=a[i-1];for(;i-- >0;)a[i]=r,r=s[r];return a}(w);for(u=C.length-1,a=y-1;a>=0;a--)0===w[a]?((p=t[_=a+m]).dom&&(t[_]=p=Yi(p)),l=_+1,lr(n,zr(p,null,i,r),l<s?t[l].dom:null)):u<0||a!==C[u]?(l=(_=a+m)+1,lr(n,(p=t[_]).dom,l<s?t[l].dom:null)):u--}else if(S!==y)for(a=y-1;a>=0;a--)0===w[a]&&((p=t[_=a+m]).dom&&(t[_]=p=Yi(p)),l=_+1,lr(n,zr(p,null,i,r),l<s?t[l].dom:null))}}(n,i,r,o,s,a,l):function(e,t,n,i,r,o,s){for(var a,l,c=o>s?s:o,h=0;h<c;h++)a=t[h],l=e[h],a.dom&&(a=t[h]=Yi(a)),Zr(l,a,n,i,r),e[h]=a;if(o<s)for(h=c;h<s;h++)(a=t[h]).dom&&(a=t[h]=Yi(a)),zr(a,n,i,r);else if(o>s)for(h=c;h<o;h++)Pr(e[h],n)}(n,i,r,o,s,a,l)}else 1===t?Lr(r,n):2===t&&(Lr(r,n),zr(i,r,o,s))}}function to(e,t,n,i,r,o,s,a,l){var c,h=e.state,u=e.props;if(n.children=e,e.$UN)Ii("Inferno Error: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.");else{if(u!==i||i===or){if(!l&&Oi(e.componentWillReceiveProps)){if(e.$BR=!0,e.componentWillReceiveProps(i,o),e.$UN)return;e.$BR=!1}e.$PSS&&(t=ji(t,e.$PS),e.$PSS=!1,e.$PS=null)}var d=Boolean(e.shouldComponentUpdate);if(a||!d||d&&e.shouldComponentUpdate(i,t,o)){Oi(e.componentWillUpdate)&&(e.$BS=!0,e.componentWillUpdate(i,t,o),e.$BS=!1),e.props=i,e.state=t,e.context=o,Oi(er.beforeRender)&&er.beforeRender(e),c=e.render(i,t,o),Oi(er.afterRender)&&er.afterRender(e);var p,f=c!==Ci;if(Oi(e.getChildContext)&&(p=e.getChildContext()),p=Ti(p)?o:ji(o,p),e.$CX=p,f){var g=e.$LI,m=$r(c,n);Zr(g,m,r,p,s),e.$LI=m,Oi(e.componentDidUpdate)&&e.componentDidUpdate(u,h)}}else e.props=i,e.state=t,e.context=o;n.dom=e.$LI.dom}}Mi&&null===document.body&&Ii('Inferno warning: you cannot initialize inferno without "document.body". Wait on "DOMContentLoaded" event, add script to bottom of body, or use async/defer attributes on script tag.');var no=Mi?document.body:null;function io(e,t,n){if(no===t&&Li('you cannot render() to the "document.body". Use an empty element as a container instead.'),e!==Ci){var i=t.$V;return Ti(i)?Di(e)||(e.dom&&(e=Yi(e)),qi(t.firstChild)?(zr(e,t,or,!1),t.$V=e):function(e,t,n){var i=t.firstChild;if(!qi(i))for(Di(e)||Jr(e,i,or,!1),i=t.firstChild;i=i.nextSibling;)t.removeChild(i);sr.length>0&&hr(sr),t.$V=e,Oi(n)&&n()}(e,t),i=e):Ti(e)?(Pr(i,t),t.$V=null):(e.dom&&(e=Yi(e)),Zr(i,e,t,or,!1),i=t.$V=e),sr.length>0&&hr(sr),Oi(n)&&n(),Oi(er.renderComplete)&&er.renderComplete(i),i&&14&i.flags?i.children:void 0}}var ro="undefined"==typeof Promise?null:Promise.resolve(),oo="undefined"==typeof requestAnimationFrame?setTimeout:requestAnimationFrame.bind(window);function so(e,t,n,i){Oi(t)&&(t=t(e.state,e.props,e.context));var r,o=e.$PS;if(Ti(o))e.$PS=t;else for(var s in t)o[s]=t[s];if(e.$PSS||e.$BR)e.$PSS=!0,e.$BR&&Oi(n)&&sr.push(n.bind(e));else if(e.$UPD){var a=e.$QU;qi(a)&&(a=e.$QU=[],r=function(e,t){return function(){e.$QU=null,e.$UPD=!0,ao(e,!1,(function(){for(var n=0,i=t.length;n<i;n++)t[n].call(e)})),e.$UPD=!1}}(e,a),ro?ro.then(r):oo(r)),Oi(n)&&a.push(n)}else e.$PSS=!0,e.$UPD=!0,ao(e,i,n),e.$UPD=!1}function ao(e,t,n){if(!e.$UN){if(t||!e.$BR){e.$PSS=!1;var i=e.$PS,r=ji(e.state,i),o=e.props,s=e.context;e.$PS=null;var a=e.$V,l=e.$LI;if(to(e,r,a,o,l.dom&&l.dom.parentNode,s,(32&a.flags)>0,t,!0),e.$UN)return;if(!(1024&e.$LI.flags))for(var c=e.$LI.dom;!qi(a=a.parentVNode);)(14&a.flags)>0&&(a.dom=c);sr.length>0&&hr(sr)}else e.state=e.$PS,e.$PS=null;Oi(n)&&n.call(e)}}var lo=function(){function e(e,t){this.state=null,this.props=void 0,this.context=void 0,this.refs=void 0,this.$BR=!1,this.$BS=!0,this.$PSS=!1,this.$PS=null,this.$LI=null,this.$V=null,this.$UN=!1,this.$CX=null,this.$UPD=!0,this.$QU=null,this.props=e||or,this.context=t||or}var t=e.prototype;return t.forceUpdate=function(e){this.$UN||so(this,{},e,!0)},t.setState=function(e,t){this.$UN||(this.$BS?Li("cannot update state via setState() in componentWillUpdate() or constructor."):so(this,e,t,!1))},t.render=function(e,t,n){},e}();lo.defaultProps=void 0;var co=function(){};console.info("Inferno is in development mode."),-1===(co.name||co.toString()).indexOf("testFn")&&Ii("It looks like you're using a minified copy of the development build of Inferno. When deploying Inferno apps to production, make sure to use the production build which skips development warnings and is faster. See http://infernojs.org for more details.");var ho='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21" style="vertical-align:middle"><path fill="#000000" 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="#000000" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>'; method in Ot
H A Ddmn-modeler.production.min.js2 !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).DmnJS=t()}(this,(function(){"use strict";const e=Object.prototype.toString,t=Object.prototype.hasOwnProperty;function n(e){return void 0===e}function i(e){return void 0!==e}function o(e){return null==e}function r(t){return"[object Array]"===e.call(t)}function s(t){return"[object Object]"===e.call(t)}function a(t){return"[object Number]"===e.call(t)}function l(t){const n=e.call(t);return"[object Function]"===n||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n}function c(t){return"[object String]"===e.call(t)}function u(e,n){return!o(e)&&t.call(e,n)}function h(e,t){const n=k(t);let i;return p(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function d(e,t){const n=k(t);let i=[];return p(e,(function(e,t){n(e,t)&&i.push(e)})),i}function p(e,t){let i,o;if(n(e))return;const s=r(e)?S:E;for(let n in e)if(u(e,n)&&(i=e[n],o=t(i,s(n)),!1===o))return i}function f(e,t,n){return p(e,(function(e,i){n=t(n,e,i)})),n}function g(e,t){return!!f(e,(function(e,n,i){return e&&t(n,i)}),!0)}function m(e,t){return!!h(e,t)}function v(e,t){let n=[];return p(e,(function(e,i){n.push(t(e,i))})),n}function y(e){return e&&Object.keys(e)||[]}function x(e){return v(e,(e=>e))}function b(e,t,n={}){return t=O(t),p(e,(function(e){let i=t(e)||"_",o=n[i];o||(o=n[i]=[]),o.push(e)})),n}function _(e,...t){e=O(e);let n={};return p(t,(t=>b(t,e,n))),v(n,(function(e,t){return e[0]}))}function w(e,t){t=O(t);let n=[];return p(e,(function(e,i){let o=t(e,i),r={d:o,v:e};for(var s=0;s<n.length;s++){let{d:e}=n[s];if(o<e)return void n.splice(s,0,r)}n.push(r)})),v(n,(e=>e.v))}function C(e){return function(t){return g(e,(function(e,n){return t[n]===e}))}}function O(e){return l(e)?e:t=>t[e]}function k(e){return l(e)?e:t=>t===e}function E(e){return e}function S(e){return Number(e)}function R(e,t){let n,i,o,r;function s(n){let s=Date.now(),c=n?0:r+t-s;if(c>0)return a(c);e.apply(o,i),l()}function a(e){n=setTimeout(s,e)}function l(){n&&clearTimeout(n),n=r=i=o=void 0}function c(...e){r=Date.now(),i=e,o=this,n||a(t)}return c.flush=function(){n&&s(!0),l()},c.cancel=l,c}function T(e,t){return e.bind(t)}function M(e,...t){return Object.assign(e,...t)}function A(e,t){let n={},i=Object(e);return p(t,(function(t){t in i&&(n[t]=e[t])})),n}function P(e,t){let n={};return p(Object(e),(function(e,i){-1===t.indexOf(i)&&(n[i]=e)})),n}var D="__fn",$=Array.prototype.slice;function j(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function I(){}j.prototype.on=function(e,t,n,i){if(e=r(e)?e:[e],l(t)&&(i=n,n=t,t=1e3),!a(t))throw new Error("priority must be a number");var o=n;i&&((o=T(n,i))[D]=n[D]||n);var s=this;e.forEach((function(e){s._addListener(e,{priority:t,callback:o,next:null})}))},j.prototype.once=function(e,t,n,i){var o=this;if(l(t)&&(i=n,n=t,t=1e3),!a(t))throw new Error("priority must be a number");function r(){r.__isTomb=!0;var t=n.apply(i,arguments);return o.off(e,r),t}r[D]=n,this.on(e,t,r)},j.prototype.off=function(e,t){e=r(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},j.prototype.createEvent=function(e){var t=new I;return t.init(e),t},j.prototype.fire=function(e,t){var n,i,o,r;if(r=$.call(arguments),"object"==typeof e&&(e=(t=e).type),!e)throw new Error("no event type specified");if(i=this._listeners[e]){n=t instanceof I?t:this.createEvent(t),r[0]=n;var s=n.type;e!==s&&(n.type=e);try{o=this._invokeListeners(n,r,i)}finally{e!==s&&(n.type=s)}return void 0===o&&n.defaultPrevented&&(o=!1),o}},j.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},j.prototype._destroy=function(){this._listeners={}},j.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},j.prototype._invokeListener=function(e,t,n){var i;if(n.callback.__isTomb)return i;try{i=function(e,t){return e.apply(null,t)}(n.callback,t),void 0!==i&&(e.returnValue=i,e.stopPropagation()),!1===i&&e.preventDefault()}catch(e){if(!this.handleError(e))throw console.error("unhandled error in event listener",e),e}return i},j.prototype._addListener=function(e,t){var n,i=this._getListeners(e);if(i){for(;i;){if(i.priority<t.priority)return t.next=i,void(n?n.next=t:this._setListeners(e,t));n=i,i=i.next}n.next=t}else this._setListeners(e,t)},j.prototype._getListeners=function(e){return this._listeners[e]},j.prototype._setListeners=function(e,t){this._listeners[e]=t},j.prototype._removeListener=function(e,t){var n,i,o,r=this._getListeners(e);if(t)for(;r;)n=r.next,(o=r.callback)!==t&&o[D]!==t||(i?i.next=n:this._setListeners(e,n)),i=r,r=n;else this._setListeners(e,null)},I.prototype.stopPropagation=function(){this.cancelBubble=!0},I.prototype.preventDefault=function(){this.defaultPrevented=!0},I.prototype.init=function(e){M(this,e||{})};var B=Object.prototype.toString;function L(){return L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},L.apply(this,arguments)}function N(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return L.apply(void 0,[e].concat(n))}var q=Object.prototype.toString,V=Object.prototype.hasOwnProperty;function F(e){return"[object String]"===q.call(e)}function z(e,t){return V.call(e,t)}function Q(e,t){var n;if(void 0!==e){var i=function(e){return"[object Array]"===q.call(e)}(e)?W:H;for(var o in e)if(z(e,o)&&!1===t(n=e[o],i(o)))return n}}function H(e){return e}function W(e){return Number(e)}function U(e,t){return e.bind(t)}function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},X.apply(this,arguments)}function K(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return X.apply(void 0,[e].concat(n))}function G(){}function Y(e,t){this.model=e,this.properties=t}G.prototype.get=function(e){return this.$model.properties.get(this,e)},G.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},Y.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(G.prototype);Q(e.properties,(function(e){e.isMany||void 0===e.default||(i[e.name]=e.default)})),n.defineModel(i,t),n.defineDescriptor(i,e);var o=e.ns.name;function r(e){n.define(this,"$type",{value:o,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),Q(e,U((function(e,t){this.set(t,e)}),this))}return r.prototype=i,r.hasType=i.$instanceOf=this.model.hasType,n.defineModel(r,t),n.defineDescriptor(r,e),r};var Z={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},J={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 ee(e,t){var n=J[e];return n?n(t):t}function te(e){return!!Z[e]}function ne(e){return!!J[e]}function ie(e,t){var n,i,o=e.split(/:/);if(1===o.length)n=e,i=t;else{if(2!==o.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=o[1],i=o[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function oe(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function re(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,Q(e,U(this.registerPackage,this))}function se(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function ae(e){this.model=e}function le(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function ce(e){this.properties=new ae(this),this.factory=new Y(this,this.properties),this.registry=new re(e,this.properties),this.typeCache={}}oe.prototype.build=function(){return e=this,t=["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"],n={},i=Object(e),Q(t,(function(t){t in i&&(n[t]=e[t])})),n;var e,t,n,i},oe.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},oe.prototype.replaceProperty=function(e,t,n){var i=e.ns,o=this.properties,r=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=o.indexOf(e);if(-1===a)throw new Error("property <"+i.name+"> not found in property list");o.splice(a,1),this.addProperty(t,n?void 0:a,s),r[i.name]=r[i.localName]=t},oe.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,o=t.split("#"),r=ie(o[0],i),s=ie(o[1],r.prefix).name,a=this.propertiesByName[s];if(!a)throw new Error("refined property <"+s+"> not found");this.replaceProperty(a,e,n),delete e.redefines},oe.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},oe.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},oe.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},oe.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},oe.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},oe.prototype.hasProperty=function(e){return this.propertiesByName[e]},oe.prototype.addTrait=function(e,t){var n=this.allTypesByName,i=this.allTypes,o=e.name;o in n||(Q(e.properties,U((function(n){n=K({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var i=n.replaces,o=n.redefines;i||o?this.redefineProperty(n,i||o,i):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))}),this)),i.push(e),n[o]=e)},re.prototype.getPackage=function(e){return this.packageMap[e]},re.prototype.getPackages=function(){return this.packages},re.prototype.registerPackage=function(e){e=K({},e);var t=this.packageMap;se(t,e,"prefix"),se(t,e,"uri"),Q(e.types,U((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},re.prototype.registerType=function(e,t){var n=ie((e=K({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:K(e.meta||{})})).name,t.prefix),i=n.name,o={};Q(e.properties,U((function(e){var t=ie(e.name,n.prefix),i=t.name;te(e.type)||(e.type=ie(e.type,t.prefix).name),K(e,{ns:t,name:i}),o[i]=e}),this)),K(e,{ns:n,name:i,propertiesByName:o}),Q(e.extends,U((function(e){var t=this.typeMap[e];t.traits=t.traits||[],t.traits.push(i)}),this)),this.definePackage(e,t),this.typeMap[i]=e},re.prototype.mapTypes=function(e,t,n){var i=te(e.name)?{name:e.name}:this.typeMap[e.name],o=this;function r(e){return s(e,!0)}function s(n,i){var r=ie(n,te(n)?"":e.prefix);o.mapTypes(r,t,i)}if(!i)throw new Error("unknown type <"+e.name+">");Q(i.superClass,n?r:s),t(i,!n),Q(i.traits,r)},re.prototype.getEffectiveDescriptor=function(e){var t=ie(e),n=new oe(t);this.mapTypes(t,(function(e,t){n.addTrait(e,t)}));var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},re.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},ae.prototype.set=function(e,t,n){if(!F(t)||!t.length)throw new TypeError("property name must be a non-empty string");var i=this.model.getPropertyDescriptor(e,t),o=i&&i.name;void 0===n?i?delete e[o]:delete e.$attrs[t]:i?o in e?e[o]=n:le(e,i,n):e.$attrs[t]=n},ae.prototype.get=function(e,t){var n=this.model.getPropertyDescriptor(e,t);if(!n)return e.$attrs[t];var i=n.name;return!e[i]&&n.isMany&&le(e,n,[]),e[i]},ae.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;delete(n=K({},n,{get:function(){return i}})).value}Object.defineProperty(e,t,n)},ae.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},ae.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},ce.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},ce.prototype.getType=function(e){var t=this.typeCache,n=F(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},ce.prototype.createAny=function(e,t,n){var i=ie(e),o={$type:e,$instanceOf:function(e){return e===this.$type}},r={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};return this.properties.defineDescriptor(o,r),this.properties.defineModel(o,this),this.properties.define(o,"$parent",{enumerable:!1,writable:!0}),this.properties.define(o,"$instanceOf",{enumerable:!1,writable:!0}),Q(n,(function(e,t){var n;n=e,"[object Object]"===q.call(n)&&void 0!==e.value?o[e.name]=e.value:o[t]=e})),o},ce.prototype.getPackage=function(e){return this.registry.getPackage(e)},ce.prototype.getPackages=function(){return this.registry.getPackages()},ce.prototype.getElementDescriptor=function(e){return e.$descriptor},ce.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},ce.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},ce.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var ue=Object.prototype.toString,he=Object.prototype.hasOwnProperty;function de(e){return"[object Array]"===ue.call(e)}function pe(e){return"[object String]"===ue.call(e)}function fe(e,t){return he.call(e,t)}function ge(e,t){var n;return t=ye(t),ve(e,(function(e,i){if(t(e,i))return n=e,!1})),n}function me(e,t){var n=[];return ve(e,(function(e,i){t(e,i)&&n.push(e)})),n}function ve(e,t){var n;if(void 0!==e){var i=de(e)?be:xe;for(var o in e)if(fe(e,o)&&!1===t(n=e[o],i(o)))return n}}function ye(e){return t=e,"[object Function]"===(n=ue.call(t))||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n?e:function(t){return t===e};var t,n}function xe(e){return e}function be(e){return Number(e)}function _e(){return _e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_e.apply(this,arguments)}function we(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return _e.apply(void 0,[e].concat(n))}var Ce=String.fromCharCode,Oe=Object.prototype.hasOwnProperty,ke=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,Ee={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function Se(e,t,n,i){return i?Oe.call(Ee,i)?Ee[i]:"&"+i+";":Ce(t||parseInt(n,16))}function Re(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(ke,Se):e}Object.keys(Ee).forEach((function(e){Ee[e.toUpperCase()]=Ee[e]}));var Te="xsi:type",Me="non-whitespace outside of root node";function Ae(e){return new Error(e)}function Pe(e){return"missing namespace for prefix <"+e+">"}function De(e){return{get:e,enumerable:!0}}function $e(e){var t,n={};for(t in e)n[t]=e[t];return n}function je(e){return e+"$uri"}function Ie(){return{line:0,column:0}}function Be(e){throw e}function Le(e){if(!this)return new Le(e);var t,n,i,o,r,s,a,l,c,u=e&&e.proxy,h=Be,d=Ie,p=!1,f=!1,g=null,m=!1;function v(e){e instanceof Error||(e=Ae(e)),g=e,h(e,d)}function y(e){r&&(e instanceof Error||(e=Ae(e)),r(e,d))}this.on=function(e,c){if("function"!=typeof c)throw Ae("required args <name, cb>");switch(e){case"openTag":n=c;break;case"text":t=c;break;case"closeTag":i=c;break;case"error":h=c;break;case"warn":r=c;break;case"cdata":o=c;break;case"attention":l=c;break;case"question":a=c;break;case"comment":s=c;break;default:throw Ae("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw Ae("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 Ae("required args <xml=string>");return g=null,function(e){var r,h,g,x,b,_,w,C,O,k,E,S=f?[]:null,R=f?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[je(n)]=t;return i}(c):null,T=[],M=0,A=!1,P=!1,D=0,$=0,j="",I=0;function B(){if(null!==E)return E;var e,t,n,i,o,r,s,a,l,u,h,d=f&&R.xmlns,g=f&&p?[]:null,m=I,v=j,x=v.length,b={},_={};e:for(;m<x;m++)if(l=!1,!(32===(u=v.charCodeAt(m))||u<14&&u>8)){for((u<65||u>122||u>90&&u<97)&&95!==u&&58!==u&&(y("illegal first char attribute name"),l=!0),h=m+1;h<x;h++)if(!((u=v.charCodeAt(h))>96&&u<123||u>64&&u<91||u>47&&u<59||46===u||45===u||95===u)){if(32===u||u<14&&u>8){y("missing attribute value"),m=h;continue e}if(61===u)break;y("illegal attribute name char"),l=!0}if("xmlns:xmlns"===(a=v.substring(m,h))&&(y("illegal declaration of xmlns"),l=!0),34===(u=v.charCodeAt(h+1)))-1===(h=v.indexOf('"',m=h+2))&&-1!==(h=v.indexOf("'",m))&&(y("attribute value quote missmatch"),l=!0);else if(39===u)-1===(h=v.indexOf("'",m=h+2))&&-1!==(h=v.indexOf('"',m))&&(y("attribute value quote missmatch"),l=!0);else for(y("missing attribute value quotes"),l=!0,h+=1;h<x&&!(32===(u=v.charCodeAt(h+1))||u<14&&u>8);h++);for(-1===h&&(y("missing closing quotes"),h=x,l=!0),l||(r=v.substring(m,h)),m=h;h+1<x&&!(32===(u=v.charCodeAt(h+1))||u<14&&u>8);h++)m===h&&(y("illegal character after attribute end"),l=!0);if(m=h+1,!l)if(a in _)y("attribute <"+a+"> already defined");else if(_[a]=!0,f)if(p){if(null!==(o="xmlns"===a?"xmlns":120===a.charCodeAt(0)&&"xmlns:"===a.substr(0,6)?a.substr(6):null)){if(e=Re(r),t=je(o),!(s=c[e])){if("xmlns"===o||t in R&&R[t]!==e)do{s="ns"+M++}while(void 0!==R[s]);else s=o;c[e]=s}R[o]!==s&&(i||(R=$e(R),i=!0),R[o]=s,"xmlns"===o&&(R[je(s)]=e,d=s),R[t]=e),b[a]=r;continue}g.push(a,r)}else-1!==(u=a.indexOf(":"))?(n=R[a.substring(0,u)])?((a=d===n?a.substr(u+1):n+a.substr(u))===Te&&(-1!==(u=r.indexOf(":"))?(n=r.substring(0,u),r=(n=R[n]||n)+r.substring(u)):r=d+":"+r),b[a]=r):y(Pe(a.substring(0,u))):b[a]=r;else b[a]=r}if(p)for(m=0,x=g.length;m<x;m++){if(a=g[m++],r=g[m],-1!==(u=a.indexOf(":"))){if(!(n=R[a.substring(0,u)])){y(Pe(a.substring(0,u)));continue}(a=d===n?a.substr(u+1):n+a.substr(u))===Te&&(-1!==(u=r.indexOf(":"))?(n=r.substring(0,u),r=(n=R[n]||n)+r.substring(u)):r=d+":"+r)}b[a]=r}return E=b}function L(){for(var t,n,i=/(\r\n|\r|\n)/g,o=0,r=0,s=0,a=$;D>=s&&(t=i.exec(e))&&!((a=t[0].length+t.index)>D);)o+=1,s=a;return-1==D?(r=a,n=e.substring($)):0===$?n=e.substring($,D):(r=D-s,n=-1==$?e.substring(D):e.substring(D,$+1)),{data:n,line:o,column:r}}d=L,u&&(k=Object.create({},{name:De((function(){return C})),originalName:De((function(){return O})),attrs:De(B),ns:De((function(){return R}))}));for(;-1!==$;){if(-1===(D=60===e.charCodeAt($)?$:e.indexOf("<",$)))return T.length?v("unexpected end of file"):0===$?v("missing start tag"):void($<e.length&&e.substring($).trim()&&y(Me));if($!==D)if(T.length){if(t&&(t(e.substring($,D),Re,d),m))return}else if(e.substring($,D).trim()&&(y(Me),m))return;if(33===(b=e.charCodeAt(D+1))){if(91===(x=e.charCodeAt(D+2))&&"CDATA["===e.substr(D+3,6)){if(-1===($=e.indexOf("]]>",D)))return v("unclosed cdata");if(o&&(o(e.substring(D+9,$),d),m))return;$+=3;continue}if(45===x&&45===e.charCodeAt(D+3)){if(-1===($=e.indexOf("--\x3e",D)))return v("unclosed comment");if(s&&(s(e.substring(D+4,$),Re,d),m))return;$+=3;continue}}if(63!==b){for(h=D+1;;h++){if(_=e.charCodeAt(h),isNaN(_))return $=-1,v("unclosed tag");if(34===_)h=-1!==(x=e.indexOf('"',h+1))?x:h;else if(39===_)h=-1!==(x=e.indexOf("'",h+1))?x:h;else if(62===_){$=h;break}}if(33!==b){if(E={},47===b){if(A=!1,P=!0,!T.length)return v("missing open tag");if(h=C=T.pop(),x=D+2+h.length,e.substring(D+2,x)!==h)return v("closing tag mismatch");for(;x<$;x++)if(!(32===(b=e.charCodeAt(x))||b>8&&b<14))return v("close tag")}else{if(47===e.charCodeAt($-1)?(h=C=e.substring(D+1,$-1),A=!0,P=!0):(h=C=e.substring(D+1,$),A=!0,P=!1),!(b>96&&b<123||b>64&&b<91||95===b||58===b))return v("illegal first char nodeName");for(x=1,g=h.length;x<g;x++)if(!((b=h.charCodeAt(x))>96&&b<123||b>64&&b<91||b>47&&b<59||45===b||95===b||46==b)){if(32===b||b<14&&b>8){C=h.substring(0,x),E=null;break}return v("invalid nodeName")}P||T.push(C)}if(f){if(r=R,A&&(P||S.push(r),null===E&&(p=-1!==h.indexOf("xmlns",x))&&(I=x,j=h,B(),p=!1)),O=C,-1!==(b=C.indexOf(":"))){if(!(w=R[C.substring(0,b)]))return v("missing namespace on <"+O+">");C=C.substr(b+1)}else w=R.xmlns;w&&(C=w+":"+C)}if(A&&(I=x,j=h,n&&(u?n(k,Re,P,d):n(C,B,Re,P,d),m)))return;if(P){if(i&&(i(u?k:C,Re,A,d),m))return;f&&(R=A?r:S.pop())}$+=1}else{if(l&&(l(e.substring(D,$+1),Re,d),m))return;$+=1}}else{if(-1===($=e.indexOf("?>",D)))return v("unclosed question");if(a&&(a(e.substring(D,$+2),d),m))return;$+=2}}}(e),d=Ie,m=!1,g},this.stop=function(){m=!0}}function Ne(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var qe={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},Ve="xsi:type";function Fe(e){return e.xml&&e.xml.serialize}function ze(e){return Fe(e)===Ve}function Qe(e,t){return Ne(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function He(e){return new Error(e)}function We(e){return e.$descriptor}function Ue(e){we(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw He("expected element");var t,n=this.elementsById,i=We(e).idProperty;if(i&&(t=e.get(i.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw He("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function Xe(){}function Ke(){}function Ge(){}function Ye(e,t){this.property=e,this.context=t}function Ze(e,t){this.element=t,this.propertyDesc=e}function Je(){}function et(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function tt(e,t,n){et.call(this,e,t,n)}function nt(e,t,n){this.model=e,this.context=n}function it(e){e instanceof ce&&(e={model:e}),we(this,{lax:!1},e)}Xe.prototype.handleEnd=function(){},Xe.prototype.handleText=function(){},Xe.prototype.handleNode=function(){},Ke.prototype=Object.create(Xe.prototype),Ke.prototype.handleNode=function(){return this},Ge.prototype=Object.create(Xe.prototype),Ge.prototype.handleText=function(e){this.body=(this.body||"")+e},Ye.prototype=Object.create(Ge.prototype),Ye.prototype.handleNode=function(e){if(this.element)throw He("expected no sub nodes");return this.element=this.createReference(e),this},Ye.prototype.handleEnd=function(){this.element.id=this.body},Ye.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},Ze.prototype=Object.create(Ge.prototype),Ze.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=ee(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},Je.prototype=Object.create(Ge.prototype),Je.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},et.prototype=Object.create(Je.prototype),et.prototype.addReference=function(e){this.context.addReference(e)},et.prototype.handleText=function(e){if(!We(this.element).bodyProperty)throw He("unexpected body text <"+e+">");Ge.prototype.handleText.call(this,e)},et.prototype.handleEnd=function(){var e=this.body,t=this.element,n=We(t).bodyProperty;n&&void 0!==e&&(e=ee(n.type,e),t.set(n.name,e))},et.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,o=We(i),r=this.context,s=new i({}),a=this.model;return ve(n,(function(e,n){var i=o.propertiesByName[n];i&&i.isReference?i.isMany?ve(e.split(" "),(function(e){r.addReference({element:s,property:i.ns.name,id:e})})):r.addReference({element:s,property:i.ns.name,id:e}):(i?e=ee(i.type,e):"xmlns"!==n&&(t=ie(n,o.ns.prefix),a.getPackage(t.prefix)&&r.addWarning({message:"unknown attribute <"+n+">",element:s,property:n,value:e})),s.set(n,e))})),s},et.prototype.getPropertyForNode=function(e){var t,n,i=ie(e.name),o=this.type,r=this.model,s=We(o),a=i.name,l=s.propertiesByName[a];if(l&&!l.isAttr)return ze(l)&&(t=e.attributes[Ve])?(t=function(e,t){var n=ie(e);return function(e,t){var n=e.name,i=e.localName,o=t.xml&&t.xml.typePrefix;return o&&0===i.indexOf(o)?e.prefix+":"+i.slice(o.length):n}(n,t.getPackage(n.prefix))}(t,r),we({},l,{effectiveType:We(n=r.getType(t)).name})):l;var c=r.getPackage(i.prefix);if(c){if(t=Qe(i,c),n=r.getType(t),l=ge(s.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})),l)return we({},l,{effectiveType:We(n).name})}else if(l=ge(s.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})),l)return l;throw He("unrecognized element <"+i.name+">")},et.prototype.toString=function(){return"ElementDescriptor["+We(this.type).name+"]"},et.prototype.valueHandler=function(e,t){return new Ze(e,t)},et.prototype.referenceHandler=function(e){return new Ye(e,this.context)},et.prototype.handler=function(e){return"Element"===e?new nt(this.model,e,this.context):new et(this.model,e,this.context)},et.prototype.handleChild=function(e){var t,n,i,o;if(t=this.getPropertyForNode(e),i=this.element,ne(n=t.effectiveType||t.type))return this.valueHandler(t,i);var r=(o=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==r&&(t.isMany?i.get(t.name).push(r):i.set(t.name,r),t.isReference?(we(r,{element:i}),this.context.addReference(r)):r.$parent=i),o},tt.prototype=Object.create(et.prototype),tt.prototype.createElement=function(e){var t=e.name,n=ie(t),i=this.model,o=this.type,r=i.getPackage(n.prefix),s=r&&Qe(n,r)||t;if(!o.hasType(s))throw He("unexpected element <"+e.originalName+">");return et.prototype.createElement.call(this,e)},nt.prototype=Object.create(Je.prototype),nt.prototype.createElement=function(e){var t=e.name,n=ie(t).prefix,i=e.ns[n+"$uri"],o=e.attributes;return this.model.createAny(t,i,o)},nt.prototype.handleChild=function(e){var t=new nt(this.model,"Element",this.context).handleNode(e),n=this.element,i=t.element;return void 0!==i&&((n.$children=n.$children||[]).push(i),i.$parent=n),t},nt.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},it.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof et?(i=t,t={}):"string"==typeof t?(i=this.handler(t),t={}):"string"==typeof i&&(i=this.handler(i));var o=this.model,r=this.lax,s=new Ue(we({},t,{rootHandler:i})),a=new Le({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 i=t(),o=i.line,r=i.column,a=i.data;"<"===a.charAt(0)&&-1!==a.indexOf(" ")&&(a=a.slice(0,a.indexOf(" "))+">");var l="unparsable content "+(a?a+" ":"")+"detected\n\tline: "+o+"\n\tcolumn: "+r+"\n\tnested error: "+e.message;if(n)return s.addWarning({message:l,error:e}),!0;throw He(l)}function u(e,t){return c(e,t,!0)}i.context=s,l.push(i);var h=/^<\?xml /i,d=/ encoding="([^"]+)"/i,p=/^utf-8$/i;function f(e,t){try{l.peek().handleText(e)}catch(e){u(e,t)}}var g=o.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),{"http://www.w3.org/XML/1998/namespace":"xml"});return a.ns(g).on("openTag",(function(e,t,n,i){var o=e.attrs||{},s=Object.keys(o).reduce((function(e,n){var i=t(o[n]);return e[n]=i,e}),{});!function(e,t){var n=l.peek();try{l.push(n.handleNode(e))}catch(e){c(e,t,r)&&l.push(new Ke)}}({name:e.name,originalName:e.originalName,attributes:s,ns:e.ns},i)})).on("question",(function(e){if(h.test(e)){var t=d.exec(e),n=t&&t[1];n&&!p.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",u),new Promise((function(t,n){var o;try{a.parse(e),function(){var e,t,n=s.elementsById,i=s.references;for(e=0;t=i[e];e++){var o=t.element,r=n[t.id],a=We(o).propertiesByName[t.property];if(r||s.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),a.isMany){var l=o.get(a.name),c=l.indexOf(t);-1===c&&(c=l.length),r?l[c]=r:l.splice(c,1)}else o.set(a.name,r)}}()}catch(e){o=e}var r=i.element;o||r||(o=He("failed to parse document as <"+i.type.$descriptor.name+">"));var l=s.warnings,c=s.references,u=s.elementsById;return o?(o.warnings=l,n(o)):t({rootElement:r,elementsById:u,references:c,warnings:l})}))},it.prototype.handler=function(e){return new tt(this.model,e)};var ot=/<|>|'|"|&|\n\r|\n/g,rt=/<|>|&/g;function st(e){var t={},n={},i={},o=[],r=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?o.push(e):r.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,o=this.getNSKey(t);i[o]=this.byUri(n),e&&e.logUsed(t)},this.getUsed=function(e){var t=this;return[].concat(o,r).filter((function(e){var n=t.getNSKey(e);return i[n]}))}}function at(e,t){return Ne(t)?function(e){return e.charAt(0).toLowerCase()+e.slice(1)}(e):e}function lt(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function ct(e){return pe(e)?e:(e.prefix?e.prefix+":":"")+e.localName}var ut={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},ht={"<":"lt",">":"gt","&":"amp"};function dt(e,t,n){return(e=pe(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function pt(e){this.tagName=e}function ft(){}function gt(e){this.tagName=e}function mt(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function vt(e,t){mt.call(this,e,t)}function yt(){this.value="",this.write=function(e){this.value+=e}}function xt(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 bt(e){return e=we({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new yt,o=new xt(i,e.format);if(e.preamble&&o.append('<?xml version="1.0" encoding="UTF-8"?>\n'),(new mt).build(t).serializeTo(o),!n)return i.value}}}function _t(e,t){ce.call(this,e,t)}pt.prototype.build=function(e){return this.element=e,this},pt.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},ft.prototype.serializeValue=ft.prototype.serializeTo=function(e){e.append(this.escape?dt(this.value,rt,ht):this.value)},ft.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(rt)&&(this.escape=!0),this},lt(gt,ft),gt.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},mt.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,o=this.propertyDescriptor,r=i.isGeneric;return t=r?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=o?this.nsPropertyTagName(o):this.nsTagName(i),this.tagName=this.addTagName(this.ns),r||(n=function(e){return me(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!fe(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)}))}(e),this.parseAttributes(function(e){return me(e,(function(e){return e.isAttr}))}(n)),this.parseContainments(function(e){return me(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},mt.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?we({localName:t.ns.localName},e):we({localName:at(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},mt.prototype.nsPropertyTagName=function(e){return function(e,t){return we({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},mt.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},mt.prototype.nsAttributeName=function(e){var t;if(t=pe(e)?ie(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}:we({localName:t.localName},n)},mt.prototype.parseGeneric=function(e){var t=this,n=this.body,i=[];return ve(e,(function(o,r){"$body"===r?n.push((new ft).build({type:"String"},o)):"$children"===r?ve(o,(function(e){n.push(new mt(t).build(e))})):0!==r.indexOf("$")&&t.parseNsAttribute(e,r,o)&&i.push({name:r,value:o})})),i},mt.prototype.parseNsAttribute=function(e,t,n){var i,o=e.$model,r=ie(t);if("xmlns"===r.prefix&&(i={prefix:r.localName,uri:n}),r.prefix||"xmlns"!==r.localName||(i={uri:n}),!i)return{name:t,value:n};if(o&&o.getPackage(n))this.logNamespace(i,!0,!0);else{var s=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(s)}},mt.prototype.parseNsAttributes=function(e,t){var n=this,i=e.$attrs,o=[];return ve(i,(function(t,i){var r=n.parseNsAttribute(e,i,t);r&&o.push(r)})),o},mt.prototype.parseGenericAttributes=function(e,t){var n=this;ve(t,(function(t){if(t.name!==Ve)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,n)}}))},mt.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;ve(e,(function(e){var o=i.get(e.name),r=e.isReference;if(e.isMany||(o=[o]),e.isBody)n.push((new ft).build(e,o[0]));else if(ne(e.type))ve(o,(function(i){n.push(new gt(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(r)ve(o,(function(i){n.push(new pt(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var s=ze(e),a=function(e){return"property"===Fe(e)}(e);ve(o,(function(i){var o;o=s?new vt(t,e):a?new mt(t,e):new mt(t),n.push(o.build(i))}))}}))},mt.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new st(t):n=t),n},mt.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),o=e.uri,r=e.prefix;return i.byUri(o)&&!n||i.add(e,t),i.mapPrefix(r,o),e},mt.prototype.logNamespaceUsed=function(e,t){var n,i,o,r=this.element.$model,s=this.getNamespaces(t),a=e.prefix,l=e.uri;if(!a&&!l)return{localName:e.localName};if(o=qe[a]||r&&(r.getPackage(a)||{}).uri,!(l=l||o||s.uriByPrefix(a)))throw new Error("no namespace uri given for prefix <"+a+">");if(!(e=s.byUri(l))){for(n=a,i=1;s.uriByPrefix(n);)n=a+"_"+i++;e=this.logNamespace({prefix:n,uri:l},o===l)}return a&&s.mapPrefix(a,l),e},mt.prototype.parseAttributes=function(e){var t=this,n=this.element;ve(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var o=[];ve(i,(function(e){o.push(e.id)})),i=o.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},mt.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),ct(e)},mt.prototype.addAttribute=function(e,t){var n=this.attrs;pe(t)&&(t=dt(t,ot,ut));var i=function(e,t){t=ye(t);var n=de(e)?-1:void 0;return ve(e,(function(e,i){if(t(e,i))return n=i,!1})),n}(n,(function(t){return t.name.localName===e.localName&&t.name.uri===e.uri&&t.name.prefix===e.prefix})),o={name:e,value:t};-1!==i?n.splice(i,1,o):n.push(o)},mt.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)),ve(t,(function(t){e.append(" ").append(ct(t.name)).append('="').append(t.value).append('"')}))},mt.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==ft;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),ve(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},lt(vt,mt),vt.prototype.parseNsAttributes=function(e){var t=mt.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var o=e.$model.getPackage(i.uri),r=o.xml&&o.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(Ve),(i.prefix?i.prefix+":":"")+r+n.ns.localName),t},vt.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},_t.prototype=Object.create(ce.prototype),_t.prototype.fromXML=function(e,t,n){var i;i=t,"[object String]"!==B.call(i)&&(n=t,t="dmn:Definitions");var o=new it(N({model:this,lax:!0},n)),r=o.handler(t);return o.fromXML(e,r)},_t.prototype.toXML=function(e,t){var n=new bt(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(e){return i(e)}}))};var wt={dc:{name:"DC",prefix:"dc",uri:"http://www.omg.org/spec/DMN/20180521/DC/",types:[{name:"Dimension",properties:[{name:"width",isAttr:!0,type:"Real"},{name:"height",isAttr:!0,type:"Real"}]},{name:"Bounds",properties:[{name:"height",isAttr:!0,type:"Real"},{name:"width",isAttr:!0,type:"Real"},{name:"x",isAttr:!0,type:"Real"},{name:"y",isAttr:!0,type:"Real"}]},{name:"Point",properties:[{name:"x",isAttr:!0,type:"Real"},{name:"y",isAttr:!0,type:"Real"}]},{name:"Color",properties:[{name:"red",type:"UML_Standard_Profile.mdzip:eee_1045467100323_917313_65"},{name:"green",type:"UML_Standard_Profile.mdzip:eee_1045467100323_917313_65"},{name:"blue",type:"UML_Standard_Profile.mdzip:eee_1045467100323_917313_65"}]}],associations:[],enumerations:[{name:"AlignmentKind",literalValues:[{name:"start"},{name:"center"},{name:"end"}]}]},di:{name:"DI",prefix:"di",uri:"http://www.omg.org/spec/DMN/20180521/DI/",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"extension",type:"Extension"},{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"style",isReference:!0,type:"Style",xml:{serialize:"property"}},{name:"sharedStyle",isReference:!0,isVirtual:!0,type:"Style"}]},{name:"Diagram",superClass:["DiagramElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"}]},{name:"Shape",isAbstract:!0,properties:[{name:"bounds",type:"dc:Bounds"}],superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,properties:[{name:"waypoint",type:"dc:Point",isMany:!0,xml:{serialize:"property"}}],superClass:["DiagramElement"]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],associations:[],enumerations:[],xml:{tagAlias:"lowerCase"}},dmn:{name:"DMN",prefix:"dmn",uri:"https://www.omg.org/spec/DMN/20191111/MODEL/",types:[{name:"AuthorityRequirement",superClass:["DMNElement"],properties:[{name:"requiredAuthority",type:"DMNElementReference",xml:{serialize:"property"}},{name:"requiredDecision",type:"DMNElementReference",xml:{serialize:"property"}},{name:"requiredInput",type:"DMNElementReference",xml:{serialize:"property"}}]},{name:"ItemDefinition",superClass:["NamedElement"],properties:[{name:"typeRef",type:"String"},{name:"allowedValues",type:"UnaryTests",xml:{serialize:"property"}},{name:"typeLanguage",type:"String",isAttr:!0},{name:"itemComponent",type:"ItemDefinition",isMany:!0,xml:{serialize:"property"}},{name:"functionItem",type:"FunctionItem"},{name:"isCollection",isAttr:!0,type:"Boolean"}]},{name:"Definitions",superClass:["NamedElement"],properties:[{name:"import",type:"Import",isMany:!0},{name:"itemDefinition",type:"ItemDefinition",isMany:!0},{name:"drgElement",type:"DRGElement",isMany:!0},{name:"artifact",type:"Artifact",isMany:!0},{name:"elementCollection",type:"ElementCollection",isMany:!0},{name:"businessContextElement",type:"BusinessContextElement",isMany:!0},{name:"namespace",type:"String",isAttr:!0},{name:"expressionLanguage",type:"String",isAttr:!0},{name:"typeLanguage",type:"String",isAttr:!0},{name:"exporter",isAttr:!0,type:"String"},{name:"exporterVersion",isAttr:!0,type:"String"},{name:"dmnDI",type:"dmndi:DMNDI"}]},{name:"KnowledgeSource",superClass:["DRGElement"],properties:[{name:"authorityRequirement",type:"AuthorityRequirement",isMany:!0},{name:"type",type:"String"},{name:"owner",type:"DMNElementReference",xml:{serialize:"property"}},{name:"locationURI",type:"String",isAttr:!0}]},{name:"DecisionRule",superClass:["DMNElement"],properties:[{name:"inputEntry",type:"UnaryTests",isMany:!0,xml:{serialize:"property"}},{name:"outputEntry",type:"LiteralExpression",isMany:!0,xml:{serialize:"property"}},{name:"annotationEntry",type:"RuleAnnotation",isMany:!0,xml:{serialize:"property"}}]},{name:"Expression",isAbstract:!0,superClass:["DMNElement"],properties:[{name:"typeRef",isAttr:!0,type:"String"}]},{name:"InformationItem",superClass:["NamedElement"],properties:[{name:"typeRef",isAttr:!0,type:"String"}]},{name:"Decision",superClass:["DRGElement"],properties:[{name:"question",type:"String",xml:{serialize:"property"}},{name:"allowedAnswers",type:"String",xml:{serialize:"property"}},{name:"variable",type:"InformationItem",xml:{serialize:"property"}},{name:"informationRequirement",type:"InformationRequirement",isMany:!0},{name:"knowledgeRequirement",type:"KnowledgeRequirement",isMany:!0},{name:"authorityRequirement",type:"AuthorityRequirement",isMany:!0},{name:"supportedObjective",isMany:!0,type:"DMNElementReference",xml:{serialize:"property"}},{name:"impactedPerformanceIndicator",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"decisionMaker",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"decisionOwner",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"usingProcess",isMany:!0,type:"DMNElementReference",xml:{serialize:"property"}},{name:"usingTask",isMany:!0,type:"DMNElementReference",xml:{serialize:"property"}},{name:"decisionLogic",type:"Expression"}]},{name:"Invocation",superClass:["Expression"],properties:[{name:"calledFunction",type:"Expression"},{name:"binding",type:"Binding",isMany:!0}]},{name:"OrganisationalUnit",superClass:["BusinessContextElement"],properties:[{name:"decisionMade",type:"Decision",isReference:!0,isMany:!0},{name:"decisionOwned",type:"Decision",isReference:!0,isMany:!0}]},{name:"Import",superClass:["NamedElement"],properties:[{name:"importType",type:"String",isAttr:!0},{name:"locationURI",type:"String",isAttr:!0},{name:"namespace",type:"String",isAttr:!0}]},{name:"InformationRequirement",superClass:["DMNElement"],properties:[{name:"requiredDecision",type:"DMNElementReference",xml:{serialize:"property"}},{name:"requiredInput",type:"DMNElementReference",xml:{serialize:"property"}}]},{name:"ElementCollection",superClass:["NamedElement"],properties:[{name:"drgElement",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}}]},{name:"DRGElement",isAbstract:!0,superClass:["NamedElement"],properties:[]},{name:"InputData",superClass:["DRGElement"],properties:[{name:"variable",type:"InformationItem",xml:{serialize:"property"}}]},{name:"DMNElement",isAbstract:!0,properties:[{name:"description",type:"String"},{name:"extensionElements",type:"ExtensionElements"},{name:"id",type:"String",isAttr:!0,isId:!0},{name:"extensionAttribute",type:"ExtensionAttribute",isMany:!0},{name:"label",isAttr:!0,type:"String"}]},{name:"InputClause",superClass:["DMNElement"],properties:[{name:"inputExpression",type:"LiteralExpression",xml:{serialize:"property"}},{name:"inputValues",type:"UnaryTests",xml:{serialize:"property"}}]},{name:"DecisionTable",superClass:["Expression"],properties:[{name:"input",type:"InputClause",isMany:!0,xml:{serialize:"property"}},{name:"output",type:"OutputClause",isMany:!0,xml:{serialize:"property"}},{name:"annotation",type:"RuleAnnotationClause",isMany:!0,xml:{serialize:"property"}},{name:"rule",type:"DecisionRule",isMany:!0,xml:{serialize:"property"}},{name:"hitPolicy",type:"HitPolicy",isAttr:!0,default:"UNIQUE"},{name:"aggregation",type:"BuiltinAggregator",isAttr:!0},{name:"preferredOrientation",type:"DecisionTableOrientation",isAttr:!0},{name:"outputLabel",isAttr:!0,type:"String"}]},{name:"LiteralExpression",superClass:["Expression"],properties:[{name:"expressionLanguage",type:"String",isAttr:!0},{name:"text",type:"String"},{name:"importedValues",type:"ImportedValues"}]},{name:"Binding",properties:[{name:"parameter",type:"InformationItem",xml:{serialize:"property"}},{name:"bindingFormula",type:"Expression"}]},{name:"KnowledgeRequirement",superClass:["DMNElement"],properties:[{name:"requiredKnowledge",type:"DMNElementReference",xml:{serialize:"property"}}]},{name:"BusinessKnowledgeModel",superClass:["Invocable"],properties:[{name:"encapsulatedLogic",type:"FunctionDefinition",xml:{serialize:"property"}},{name:"knowledgeRequirement",type:"KnowledgeRequirement",isMany:!0},{name:"authorityRequirement",type:"AuthorityRequirement",isMany:!0}]},{name:"BusinessContextElement",isAbstract:!0,superClass:["NamedElement"],properties:[{name:"URI",type:"String",isAttr:!0}]},{name:"PerformanceIndicator",superClass:["BusinessContextElement"],properties:[{name:"impactingDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}}]},{name:"FunctionDefinition",superClass:["Expression"],properties:[{name:"formalParameter",type:"InformationItem",isMany:!0,xml:{serialize:"property"}},{name:"body",type:"Expression"},{name:"kind",type:"FunctionKind",isAttr:!0}]},{name:"Context",superClass:["Expression"],properties:[{name:"contextEntry",type:"ContextEntry",isMany:!0}]},{name:"ContextEntry",superClass:["DMNElement"],properties:[{name:"variable",type:"InformationItem",xml:{serialize:"property"}},{name:"value",type:"Expression"}]},{name:"List",superClass:["Expression"],properties:[{name:"elements",isMany:!0,type:"Expression"}]},{name:"Relation",superClass:["Expression"],properties:[{name:"column",type:"InformationItem",isMany:!0,xml:{serialize:"property"}},{name:"row",type:"List",isMany:!0,xml:{serialize:"property"}}]},{name:"OutputClause",superClass:["DMNElement"],properties:[{name:"outputValues",type:"UnaryTests",xml:{serialize:"property"}},{name:"defaultOutputEntry",type:"LiteralExpression",xml:{serialize:"property"}},{name:"name",isAttr:!0,type:"String"},{name:"typeRef",isAttr:!0,type:"String"}]},{name:"UnaryTests",superClass:["Expression"],properties:[{name:"text",type:"String"},{name:"expressionLanguage",type:"String",isAttr:!0}]},{name:"NamedElement",isAbstract:!0,superClass:["DMNElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ImportedValues",superClass:["Import"],properties:[{name:"importedElement",type:"String"},{name:"expressionLanguage",type:"String",isAttr:!0}]},{name:"DecisionService",superClass:["Invocable"],properties:[{name:"outputDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"encapsulatedDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"inputDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"inputData",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}}]},{name:"ExtensionElements",properties:[{name:"values",type:"Element",isMany:!0}]},{name:"ExtensionAttribute",properties:[{name:"value",type:"Element"},{name:"valueRef",type:"Element",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Element",isAbstract:!0,properties:[{name:"extensionAttribute",type:"ExtensionAttribute",isAttr:!0,isReference:!0},{name:"elements",type:"ExtensionElements",isAttr:!0,isReference:!0}]},{name:"Artifact",isAbstract:!0,superClass:["DMNElement"],properties:[]},{name:"Association",superClass:["Artifact"],properties:[{name:"sourceRef",type:"DMNElementReference",xml:{serialize:"property"}},{name:"targetRef",type:"DMNElementReference",xml:{serialize:"property"}},{name:"associationDirection",type:"AssociationDirection",isAttr:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",isAttr:!0,type:"String",default:"text/plain"}]},{name:"RuleAnnotationClause",properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"RuleAnnotation",properties:[{name:"text",type:"String"}]},{name:"Invocable",isAbstract:!0,superClass:["DRGElement"],properties:[{name:"variable",type:"InformationItem",xml:{serialize:"property"}}]},{name:"Group",superClass:["Artifact"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"FunctionItem",superClass:["DMNElement"],properties:[{name:"parameters",isMany:!0,type:"InformationItem",xml:{serialize:"property"}},{name:"outputTypeRef",isAttr:!0,type:"String"}]},{name:"DMNElementReference",properties:[{isAttr:!0,name:"href",type:"String"}]}],enumerations:[{name:"HitPolicy",literalValues:[{name:"UNIQUE"},{name:"FIRST"},{name:"PRIORITY"},{name:"ANY"},{name:"COLLECT"},{name:"RULE ORDER"},{name:"OUTPUT ORDER"}]},{name:"BuiltinAggregator",literalValues:[{name:"SUM"},{name:"COUNT"},{name:"MIN"},{name:"MAX"}]},{name:"DecisionTableOrientation",literalValues:[{name:"Rule-as-Row"},{name:"Rule-as-Column"},{name:"CrossTable"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"FunctionKind",literalValues:[{name:"FEEL"},{name:"Java"},{name:"PMML"}]}],associations:[],xml:{tagAlias:"lowerCase"}},dmndi:{name:"DMNDI",prefix:"dmndi",uri:"https://www.omg.org/spec/DMN/20191111/DMNDI/",types:[{name:"DMNDI",properties:[{name:"diagrams",type:"DMNDiagram",isMany:!0},{name:"styles",type:"DMNStyle",isMany:!0}]},{name:"DMNStyle",superClass:["di:Style"],properties:[{name:"fillColor",type:"dc:Color",isAttr:!0},{name:"strokeColor",type:"dc:Color",isAttr:!0},{name:"fontColor",type:"dc:Color",isAttr:!0},{name:"fontSize",isAttr:!0,type:"Real"},{name:"fontFamily",isAttr:!0,type:"String"},{name:"fontItalic",isAttr:!0,type:"Boolean"},{name:"fontBold",isAttr:!0,type:"Boolean"},{name:"fontUnderline",isAttr:!0,type:"Boolean"},{name:"fontStrikeThrough",isAttr:!0,type:"Boolean"},{name:"labelHorizontalAlignment",type:"dc:AlignmentKind",isAttr:!0},{name:"labelVerticalAlignment",type:"dc:AlignmentKind",isAttr:!0}]},{name:"DMNDiagram",superClass:["di:Diagram"],properties:[{name:"dmnElementRef",type:"dmn:DMNElement",isAttr:!0,isReference:!0},{name:"size",type:"Size"},{name:"localStyle",type:"DMNStyle",isVirtual:!0},{name:"sharedStyle",type:"DMNStyle",isVirtual:!0,isReference:!0,redefines:"di:DiagramElement#sharedStyle"},{name:"diagramElements",type:"DMNDiagramElement",isMany:!0}]},{name:"DMNDiagramElement",isAbstract:!0,superClass:["di:DiagramElement"],properties:[{name:"dmnElementRef",type:"dmn:DMNElement",isAttr:!0,isReference:!0},{name:"sharedStyle",type:"DMNStyle",isVirtual:!0,isReference:!0,redefines:"di:DiagramElement#sharedStyle"},{name:"localStyle",type:"DMNStyle",isVirtual:!0},{name:"label",type:"DMNLabel"}]},{name:"DMNLabel",superClass:["di:Shape"],properties:[{name:"text",type:"Text"}]},{name:"DMNShape",superClass:["di:Shape","DMNDiagramElement"],properties:[{name:"isListedInputData",isAttr:!0,type:"Boolean"},{name:"decisionServiceDividerLine",type:"DMNDecisionServiceDividerLine"},{name:"isCollapsed",isAttr:!0,type:"Boolean"}]},{name:"DMNEdge",superClass:["di:Edge","DMNDiagramElement"],properties:[{name:"sourceElement",type:"DMNDiagramElement",isAttr:!0,isReference:!0},{name:"targetElement",type:"DMNDiagramElement",isAttr:!0,isReference:!0}]},{name:"DMNDecisionServiceDividerLine",superClass:["di:Edge"]},{name:"Text",properties:[{name:"text",isBody:!0,type:"String"}]},{name:"Size",superClass:["dc:Dimension"]}],associations:[],enumerations:[]},biodi:{name:"bpmn.io DI for DMN",uri:"http://bpmn.io/schema/dmn/biodi/2.0",prefix:"biodi",xml:{tagAlias:"lowerCase"},types:[{name:"DecisionTable",isAbstract:!0,extends:["dmn:DecisionTable"],properties:[{name:"annotationsWidth",isAttr:!0,type:"Integer"}]},{name:"OutputClause",isAbstract:!0,extends:["dmn:OutputClause"],properties:[{name:"width",isAttr:!0,type:"Integer"}]},{name:"InputClause",isAbstract:!0,extends:["dmn:InputClause"],properties:[{name:"width",isAttr:!0,type:"Integer"}]}]}};function Ct(e,t){return new _t(N({},wt,e),t)}function Ot(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 i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const kt=Object.prototype.toString,Et=Object.prototype.hasOwnProperty;function St(e,t){return Et.call(e,t)}function Rt(e,t){let n,i;if(void 0===e)return;const o=function(e){return"[object Array]"===kt.call(e)}(e)?Mt:Tt;for(let r in e)if(St(e,r)&&(n=e[r],i=t(n,o(r)),!1===i))return n}function Tt(e){return e}function Mt(e){return Number(e)}function At(e,...t){const n=e.style;return Rt(t,(function(e){e&&Rt(e,(function(e,t){n[t]=e}))})),e}function Pt(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}const Dt=Object.prototype.toString;function $t(e){return new jt(e)}function jt(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function It(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Bt(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}jt.prototype.add=function(e){return this.list.add(e),this},jt.prototype.remove=function(e){return"[object RegExp]"==Dt.call(e)?this.removeMatching(e):(this.list.remove(e),this)},jt.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},jt.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},jt.prototype.array=function(){return Array.from(this.list)},jt.prototype.has=jt.prototype.contains=function(e){return this.list.contains(e)};var Lt,Nt,qt,Vt={};function Ft(){Lt=window.addEventListener?"addEventListener":"attachEvent",Nt=window.removeEventListener?"removeEventListener":"detachEvent",qt="addEventListener"!==Lt?"on":""}var zt=Ot({__proto__:null,bind:Vt.bind=function(e,t,n,i){return Lt||Ft(),e[Lt](qt+t,n,i||!1),n},unbind:Vt.unbind=function(e,t,n,i){return Nt||Ft(),e[Nt](qt+t,n,i||!1),n},default:Vt},[Vt]),Qt=["focus","blur"];var Ht,Wt={bind:function(e,t,n,i,o){return-1!==Qt.indexOf(n)&&(o=!0),zt.bind(e,n,(function(n){var o=n.target||n.srcElement;n.delegateTarget=Bt(o,t,!0),n.delegateTarget&&i.call(e,n)}),o)},unbind:function(e,t,n,i){return-1!==Qt.indexOf(t)&&(i=!0),zt.unbind(e,t,n,i)}},Ut=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 i=n[1];if("body"==i){return(l=t.createElement("html")).innerHTML=e,l.removeChild(l.lastChild)}var o=Object.prototype.hasOwnProperty.call(Kt,i)?Kt[i]:Kt._default,r=o[0],s=o[1],a=o[2],l=t.createElement("div");l.innerHTML=s+e+a;for(;r--;)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},Xt=!1;"undefined"!=typeof document&&((Ht=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',Xt=!Ht.getElementsByTagName("link").length,Ht=void 0);var Kt={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:Xt?[1,"X<div>","</div>"]:[0,"",""]};Kt.td=Kt.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Kt.option=Kt.optgroup=[1,'<select multiple="multiple">',"</select>"],Kt.thead=Kt.tbody=Kt.colgroup=Kt.caption=Kt.tfoot=[1,"<table>","</table>"],Kt.polyline=Kt.ellipse=Kt.polygon=Kt.circle=Kt.text=Kt.line=Kt.path=Kt.rect=Kt.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var Gt=Ut;function Yt(e,t){return e&&"function"==typeof e.matches&&e.matches(t)||!1}function Zt(e,t){return(t=t||document).querySelector(e)}function Jt(e,t){return(t=t||document).querySelectorAll(e)}function en(e){e.parentNode&&e.parentNode.removeChild(e)}function tn(e){return function(){if(!window.Promise)throw new Error("Promises is not supported in this environment. Please polyfill Promise.");var t=arguments.length;if(!(t>=1&&l(arguments[t-1])))return e.apply(this,arguments);var n=arguments[t-1];console.warn(new Error("Passing callbacks to "+function(e){return e.replace("bound ","")}(e.name)+" is deprecated and will be removed in a future major release. Please switch to promises: https://bpmn.io/l/moving-to-promises.html"));var i=Array.prototype.slice.call(arguments,0,-1);e.apply(this,i).then((function(e){var t=Object.keys(e)[0];return n(null,e[t])}),(function(e){return n(e,e.warnings)}))}}const nn={width:"100%",height:"100%",position:"relative"};class on{constructor(e={}){this._eventBus=new j,this._viewsChanged=R(this._viewsChanged,0),this._views=[],this._viewers={},this.open=tn(this.open.bind(this)),this.importXML=tn(this.importXML.bind(this)),this.saveXML=tn(this.saveXML.bind(this)),this._init(e)}importXML(e,t){var n=this;return t=t||{open:!0},new Promise((function(o,r){var s=n._activeView;n._clear().then((()=>{var a;e=n._emit("import.parse.start",{xml:e})||e,n._moddle.fromXML(e,"dmn:Definitions").then((e=>{var l=e.rootElement,c=e.references,u=e.elementsById;if(a=e.warnings,l=n._emit("import.parse.complete",i({error:null,definitions:l,elementsById:u,references:c,warnings:a}))||l,n._setDefinitions(l),!t.open)return n._emit("import.done",{error:null,warnings:a}),void o({warnings:a});var h=n._getInitialView(n._views,s);if(!h){var d=new Error("no displayable contents");return n._emit("import.done",{error:d,warnings:a}),d.warnings=a,r(d)}n.open(h).then((e=>({warnings:e.warnings}))).catch((e=>({error:e,warnings:e.warnings}))).then((e=>{var t=[].concat(a,e.warnings);n._emit("import.done",{error:e.error,warnings:t}),e.error?(e.error.warnings=t,r(e.error)):o({warnings:t})}))})).catch((t=>(a=t.warnings,t=function(e,t){if("failed to parse document as <dmn:Definitions>"!==e.message)return null;var n=-1!==t.indexOf('"http://www.omg.org/spec/DMN/20151101/dmn.xsd"')?"1.1":-1!==t.indexOf('"http://www.omg.org/spec/DMN/20180521/MODEL/"')&&"1.2";if(!n)return null;return e=new Error("unsupported DMN "+n+" file detected; only DMN 1.3 files can be opened"),console.error("Cannot open what looks like a DMN "+n+" diagram. Please refer to https://bpmn.io/l/dmn-compatibility.html to learn how to make the toolkit compatible with older DMN files",e),e}(t,e)||function(e){var t=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);if(!t)return null;return e.message="unparsable content <"+t[1]+"> detected; this may indicate an invalid DMN 1.3 diagram file"+t[2],e}(t)||t,n._emit("import.parse.complete",i({error:t,warnings:a})),n._emit("import.done",{error:t,warnings:a}),t.warnings=a,r(t))))})).catch((e=>(n._emit("import.done",{error:e,warnings:[]}),e.warnings=[],r(e))))}));function i(e){var t=n._eventBus.createEvent(e);return Object.defineProperty(t,"context",{enumerable:!0,get:function(){return console.warn(new Error("import.parse.complete <context> is deprecated and will be removed in future library versions")),{warnings:e.warnings,references:e.references,elementsById:e.elementsById}}}),t}}getDefinitions(){return this._definitions}getActiveView(){return this._activeView}getActiveViewer(){var e=this.getActiveView();return e&&this._getViewer(e)}getView(e){return this._views.filter((function(t){return t.element===e}))[0]}getViews(){return this._views}saveXML(e){var t=this;e=e||{};var n=this._definitions;return new Promise((function(i,o){n?(n=t._emit("saveXML.start",{definitions:n})||n,t._moddle.toXML(n,e).then((function(e){var n=e.xml;return{xml:n=t._emit("saveXML.serialized",{xml:n})||n}})).catch((e=>({error:e}))).then((e=>{t._emit("saveXML.done",e),e.error?o(e.error):i({xml:e.xml})}))):o(new Error("no definitions loaded"))}))}on(...e){this._eventBus.on(...e)}off(...e){this._eventBus.off(...e)}once(...e){this._eventBus.once(...e)}attachTo(e){e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),"string"==typeof e&&(e=Zt(e)),e.appendChild(this._container),this._emit("attach",{})}detach(){this._emit("detach",{}),en(this._container)}destroy(){Object.keys(this._viewers).forEach((e=>{ln(this._viewers[e],"destroy")})),en(this._container)}_init(e){this._options=e,this._moddle=this._createModdle(e),this._viewers={},this._views=[];const t=Gt('<div class="dmn-js-parent"></div>'),n=M({},nn,e);M(t.style,{width:rn(n.width),height:rn(n.height),position:n.position}),this._container=t,e.container&&this.attachTo(e.container)}_clear(){return this._switchView(null)}open(e){return this._switchView(e)}_setDefinitions(e){this._definitions=e,this._updateViews()}_viewsChanged=()=>{this._emit("views.changed",{views:this._views,activeView:this._activeView})};_updateViews(){var e=this._definitions;if(!e)return this._views=[],void this._switchView(null);var t=this._getViewProviders(),n=[e,...e.drgElement||[]],i=this._views,o=[];for(var r of n){var s=h(t,(function(e){return"string"==typeof e.opens?e.opens===r.$type:e.opens(r)}));if(s){var a={element:r,id:r.id,name:r.name,type:s.id};o.push(a)}}var l,c=this._activeView;if(!c||(l=h(o,(function(e){return sn(c,e)}))||this._getInitialView(o),l)){var u=!sn(c,l)||an(c,l),d=i.length!==o.length||!g(o,(function(e){return h(i,(function(t){return sn(t,e)&&!an(t,e)}))}));this._activeView=l,this._views=o,(u||d)&&this._viewsChanged()}else this._switchView(null)}_getInitialView(e,t){var n;return t&&(n=h(e,(function(e){return sn(e,t)}))||h(e,(function(e){return e.type===t}))),n||e[0]}_switchView(e){var t=this;return new Promise((function(n,i){var o,r=(e,o)=>{t._viewsChanged(),e?i(e):n(o)},s=t.getActiveView(),a=e&&t._getViewer(e),l=e&&e.element;if(s&&(o=t._getViewer(s))!==a&&(ln(o,"clear"),o.detach()),t._activeView=e,a)return o!==a&&a.attachTo(t._container),t._emit("import.render.start",{view:e,element:l}),void a.open(l).then((n=>{t._emit("import.render.complete",{view:e,error:null,warnings:n.warnings}),r(null,n)})).catch((n=>{t._emit("import.render.complete",{view:e,error:n,warnings:n.warnings}),r(n,null)}));r()}))}_getViewer(e){var t=e.type,n=this._viewers[t];return n||(n=this._viewers[t]=this._createViewer(e.type),this._emit("viewer.created",{type:t,viewer:n})),n}_createViewer(e){var t=h(this._getViewProviders(),(function(t){return t.id===e}));if(!t)throw new Error("no provider for view type <"+e+">");var n=t.constructor,i=this._options[e]||{};return new n({...this._options.common||{},...i,additionalModules:[...i.additionalModules||[],{_parent:["value",this],moddle:["value",this._moddle]}]})}_emit(...e){return this._eventBus.fire(...e)}_createModdle(e){return new Ct(e.moddleExtensions)}_getViewProviders(){return[]}}function rn(e){return e+(a(e)?"px":"")}function sn(e,t){return i(e)?!!i(t)&&(e.element===t.element||e.id===t.id):!i(t)}function an(e,t){return!e||!t||e.name!==t.name}function ln(e,t){l(e[t])&&e[t]()}var cn=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 i=Math.log(Math.pow(2,e))/Math.log(n),o=2;i===1/0;o*=2)i=Math.log(Math.pow(2,e/o))/Math.log(n)*o;var r=i-Math.floor(i),s="";for(o=0;o<Math.floor(i);o++){s=Math.floor(Math.random()*n).toString(n)+s}if(r){var a=Math.pow(n,r);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,i){var o=function(o){var s=0;do{if(s++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var a=t(e,n)}while(Object.hasOwnProperty.call(r,a));return r[a]=o,a},r=o.hats={};return o.get=function(e){return o.hats[e]},o.set=function(e,t){return o.hats[e]=t,o},o.bits=e||128,o.base=n||16,o}}));function un(e){if(!(this instanceof un))return new un(e);e=e||[128,36,1],this._seed=e.length?cn.rack(e[0],e[1],e[2]):e}function hn(e,t){var n=fn(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function dn(e){return hn(e,"dmn:InputClause")}function pn(e){return hn(e,"dmn:OutputClause")}function fn(e){return e&&e.businessObject||e}function gn(e,t){return m(t,(function(t){return hn(e,t)}))}function mn(e){var t=fn(e);if(hn(t,"dmn:Decision"))return t.get("decisionLogic");if(hn(t,"dmn:BusinessKnowledgeModel")){var n=t.get("encapsulatedLogic");return n&&n.get("body")}}un.prototype.next=function(e){return this._seed(e||!0)},un.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},un.prototype.claim=function(e,t){this._seed.set(e,t||!0)},un.prototype.assigned=function(e){return this._seed.get(e)||!1},un.prototype.unclaim=function(e){delete this._seed.hats[e]},un.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};class vn extends on{_init(e){super._init(e),this.on("import.parse.complete",(e=>{e.error||this._collectIds(e.definitions,e.elementsById)})),this.on("destroy",(()=>{this._moddle.ids.clear()})),this.on("viewer.created",(({viewer:e})=>{e.on("elements.changed",(({elements:e})=>{var t=e.some((function(e){return gn(e,["dmn:Decision","dmn:Definitions","dmn:BusinessKnowledgeModel"])}));t&&this._updateViews()}))}))}_collectIds(e,t){var n,i=e.$model.ids;for(n in i.clear(),t)i.claim(n,t[n])}_createModdle(e){var t=super._createModdle(e);return t.ids=new un([32,36,1]),t}}function yn(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}const xn=/^class[ {]/;function bn(e){return Array.isArray(e)}function _n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function wn(...e){1===e.length&&bn(e[0])&&(e=e[0]);const t=(e=[...e]).pop();return t.$inject=e,t}const Cn=/constructor\s*[^(]*\(\s*([^)]*)\)/m,On=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,kn=/\/\*([^*]*)\*\//m;function En(e){if("function"!=typeof e)throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(function(e){return xn.test(e.toString())}(e)?Cn:On);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map((e=>{const t=e.match(kn);return(t&&t[1]||e).trim()}))||[]}function Sn(e,t){const n=t||{get:function(e,t){if(i.push(e),!1===t)return null;throw a(`No provider for "${e}"!`)}},i=[],o=this._providers=Object.create(n._providers||null),r=this._instances=Object.create(null),s=r.injector=this,a=function(e){const t=i.join(" -> ");return i.length=0,new Error(t?`${e} (Resolving: ${t})`:e)};function l(e,t){if(!o[e]&&e.includes(".")){const t=e.split(".");let n=l(t.shift());for(;t.length;)n=n[t.shift()];return n}if(_n(r,e))return r[e];if(_n(o,e)){if(-1!==i.indexOf(e))throw i.push(e),a("Cannot resolve circular dependency!");return i.push(e),r[e]=o[e][0](o[e][1]),i.pop(),r[e]}return n.get(e,t)}function c(e,t){if(void 0===t&&(t={}),"function"!=typeof e){if(!bn(e))throw a(`Cannot invoke "${e}". Expected a function!`);e=wn(e.slice())}return{fn:e,dependencies:(e.$inject||En(e)).map((e=>_n(t,e)?t[e]:l(e)))}}function u(e){const{fn:t,dependencies:n}=c(e);return new(Function.prototype.bind.call(t,null,...n))}function h(e,t,n){const{fn:i,dependencies:o}=c(e,n);return i.apply(t,o)}function d(e){return wn((t=>e.get(t)))}function p(e,t){if(t&&t.length){const n=Object.create(null),i=Object.create(null),r=[],s=[],a=[];let l,c,u,h;for(let e in o)l=o[e],-1!==t.indexOf(e)&&("private"===l[2]?(c=r.indexOf(l[3]),-1===c?(u=l[3].createChild([],t),h=d(u),r.push(l[3]),s.push(u),a.push(h),n[e]=[h,e,"private",u]):n[e]=[a[c],e,"private",s[c]]):n[e]=[l[2],l[1]],i[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]],i[t]=!0)}));t.forEach((e=>{if(!i[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')})),e.unshift(n)}return new Sn(e,s)}const f={factory:h,type:u,value:function(e){return e}};function g(e,t){const n=e.__init__||[];return function(){n.forEach((e=>{"string"==typeof e?t.get(e):t.invoke(e)}))}}function m(e){const t=e.__exports__;if(t){const n=e.__modules__,i=Object.keys(e).reduce(((t,n)=>("__exports__"!==n&&"__modules__"!==n&&"__init__"!==n&&"__depends__"!==n&&(t[n]=e[n]),t)),Object.create(null)),r=p((n||[]).concat(i)),s=wn((function(e){return r.get(e)}));t.forEach((function(e){o[e]=[s,e,"private",r]}));const a=(e.__init__||[]).slice();return a.unshift((function(){r.init()})),g(e=Object.assign({},e,{__init__:a}),r)}return Object.keys(e).forEach((function(t){if("__init__"===t||"__depends__"===t)return;const n=e[t];if("private"===n[2])return void(o[t]=n);const i=n[0],r=n[1];o[t]=[f[i],Rn(i,r),i]})),g(e,s)}function v(e,t){return-1!==e.indexOf(t)||-1!==(e=(t.__depends__||[]).reduce(v,e)).indexOf(t)?e:e.concat(t)}this.get=l,this.invoke=h,this.instantiate=u,this.createChild=p,this.init=function(e){const t=e.reduce(v,[]).map(m);let n=!1;return function(){n||(n=!0,t.forEach((e=>e())))}}(e)}function Rn(e,t){return"value"!==e&&bn(t)&&(t=wn(t.slice())),t}var Tn=1e3;function Mn(e,t){var n=this;t=t||Tn,e.on(["render.shape","render.connection"],t,(function(e,t){var i=e.type,o=t.element,r=t.gfx,s=t.attrs;if(n.canRender(o))return"render.shape"===i?n.drawShape(r,o,s):n.drawConnection(r,o,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 An(e,t){return function(e,t){t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}(e,t))}(t,e),e}Mn.prototype.canRender=function(e){},Mn.prototype.drawShape=function(e,t){},Mn.prototype.drawConnection=function(e,t){},Mn.prototype.getShapePath=function(e){},Mn.prototype.getConnectionPath=function(e){};var Pn=2,Dn={"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":Pn,"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":Pn,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function $n(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=Dn[i];o?(o===Pn&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function jn(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return Dn[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);$n(e,t,n)}else!function(e,t){var n,i,o=Object.keys(t);for(n=0;i=o[n];n++)$n(e,i,t[i])}(e,t);return e}const In=Object.prototype.toString;function Bn(e){return new Ln(e)}function Ln(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Nn(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function qn(e){return e.cloneNode(!0)}Ln.prototype.add=function(e){return this.list.add(e),this},Ln.prototype.remove=function(e){return"[object RegExp]"==In.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Ln.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},Ln.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Ln.prototype.array=function(){return Array.from(this.list)},Ln.prototype.has=Ln.prototype.contains=function(e){return this.list.contains(e)};var Vn={svg:"http://www.w3.org/2000/svg"},Fn='<svg xmlns="'+Vn.svg+'"';function zn(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(Vn.svg)&&(e=Fn+e.substring(4)):(e=Fn+">"+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 i=document.createDocumentFragment(),o=n.firstChild;o.firstChild;)i.appendChild(o.firstChild);return i}function Qn(e,t){var n;return"<"===(e=e.trim()).charAt(0)?(n=zn(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(Vn.svg,e),t&&jn(n,t),n}var Hn=null;function Wn(){return null===Hn&&(Hn=Qn("svg")),Hn}function Un(e,t){var n,i,o=Object.keys(t);for(n=0;i=o[n];n++)e[i]=t[i];return e}function Xn(e){return Wn().createSVGTransform()}var Kn=/([&<>]{1})/g,Gn=/([&<>\n\r"]{1})/g,Yn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function Zn(e,t){return e.replace(t,(function(e,t){return Yn[t]||t}))}function Jn(e,t){var n,i,o,r,s;switch(e.nodeType){case 3:t.push(Zn(e.textContent,Kn));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(o=e.attributes).length;n<i;++n)r=o.item(n),t.push(" ",r.name,'="',Zn(r.value,Gn),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,i=(s=e.childNodes).length;n<i;++n)Jn(s.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",Zn(e.nodeValue,Kn),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function ei(e,t){return function(e){for(var t=e.firstChild,n=[];t;)Jn(t,n),t=t.nextSibling;return n.join("")}(e)}function ti(e){var t=e.parentNode;return t&&t.removeChild(e),e}function ni(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function ii(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(ni(e,i))}(n,t)),n.consolidate()}function oi(e){return e.flat().join(",").replace(/,?([A-z]),?/g,"$1")}function ri(e){return["L",e.x,e.y]}function si(e,t){const n=e.length,i=[(o=e[0],["M",o.x,o.y])];var o,r,s,a;for(let o=1;o<n;o++){const n=e[o-1],l=e[o],c=e[o+1];if(!c||!t){i.push(ri(l));continue}const u=Math.min(t,li(l.x-n.x,l.y-n.y),li(c.x-l.x,c.y-l.y));if(!u){i.push(ri(l));continue}const h=ai(l,n,u),d=ai(l,n,.5*u),p=ai(l,c,u),f=ai(l,c,.5*u);i.push(ri(h)),i.push((s=f,a=p,["C",(r=d).x,r.y,s.x,s.y,a.x,a.y]))}return i}function ai(e,t,n){const i=t.x-e.x,o=t.y-e.y,r=n/li(i,o);return{x:e.x+i*r,y:e.y+o*r}}function li(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function ci(e,t,n){a(t)&&(n=t,t=null),t||(t={});const i=Qn("path",t);return a(n)&&(i.dataset.cornerRadius=String(n)),ui(i,e)}function ui(e,t){return jn(e,{d:oi(si(t,parseInt(e.dataset.cornerRadius,10)||0))}),e}function hi(e){return d(e,(function(t){return!h(e,(function(e){return e!==t&&di(t,e)}))}))}function di(e,t){if(t){if(e===t)return t;if(e.parent)return di(e.parent,t)}}function pi(e,t,n){var i=!n;return e.push(t),i}function fi(e,t,n){n=n||0,r(e)||(e=[e]),p(e,(function(e,i){var o=t(e,i,n);r(o)&&o.length&&fi(o,t,n+1)}))}function gi(e,t){return function(e,t,n){var i=[],o=[];return fi(e,(function(e,n,r){pi(i,e,t);var s=e.children;if(s&&pi(o,s,t))return s})),i}(e,!t)}function mi(e,t){var n,i,o,s;return t=!!t,r(e)||(e=[e]),p(e,(function(e){var r=e;e.waypoints&&!t&&(r=mi(e.waypoints,!0));var a=r.x,l=r.y,c=r.height||0,u=r.width||0;(a<n||void 0===n)&&(n=a),(l<i||void 0===i)&&(i=l),(a+u>o||void 0===o)&&(o=a+u),(l+c>s||void 0===s)&&(s=l+c)})),{x:n,y:i,height:s-i,width:o-n}}function vi(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function yi(e){return!(!e||!e.isFrame)}function xi(e,t){return M({},e||{},t||{})}function bi(e,t){Mn.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})}yn(bi,Mn),bi.prototype.canRender=function(){return!0},bi.prototype.drawShape=function(e,t,n){var i=Qn("rect");return jn(i,{x:0,y:0,width:t.width||0,height:t.height||0}),yi(t)?jn(i,M({},this.FRAME_STYLE,n||{})):jn(i,M({},this.SHAPE_STYLE,n||{})),An(e,i),i},bi.prototype.drawConnection=function(e,t,n){var i=ci(t.waypoints,M({},this.CONNECTION_STYLE,n||{}));return An(e,i),i},bi.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width;return oi([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])},bi.prototype.getConnectionPath=function(e){var t,n,i=e.waypoints,o=[];for(t=0;n=i[t];t++)n=n.original||n,o.push([0===t?"M":"L",n.x,n.y]);return oi(o)},bi.$inject=["eventBus","styles"];var _i={__init__:["defaultRenderer"],defaultRenderer:["type",bi],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 M(this.style(t,n),{class:e})},this.style=function(t,n){r(t)||n||(n=t,t=[]);var i=f(t,(function(t,n){return M(t,e[n]||{})}),{});return n?M(i,n):i},this.computeStyle=function(e,n,i){return r(n)||(i=n,n=[]),t.style(n||[],M({},i,e||{}))}}]};function wi(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return-1!==n&&e.splice(n,1),n}function Ci(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}function Oi(e,t){return e&&t?e.indexOf(t):-1}function ki(e,t){return e&&t?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):-1}function Ei(e,t,n,i){if(void 0===i&&(i=5),!e||!t||!n)return!1;var o=(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),r=ki(e,t);return Math.abs(o/r)<=i}var Si=2;function Ri(e,t){var n=Array.from(arguments).flat();const i={x:"v",y:"h"};for(const[e,t]of Object.entries(i))if(Ti(e,n))return t;return!1}function Ti(e,t){const n=t[0];return g(t,(function(t){return Math.abs(n[e]-t[e])<=Si}))}function Mi(e,t){return{x:Math.round(e.x+(t.x-e.x)/2),y:Math.round(e.y+(t.y-e.y)/2)}} method in Ft
/plugin/bpmnioeditor/vendor/bpmnio-js/
H A Dbpmn-modeler.production.min.js7unindent=function(){return n.pop(),this}}function pr(e){return e=F({format:!1,preamble:!0},e||{}),… method in cr
H A Dbpmn-modeler.development.js11067 .unindent()
11158 this.unindent = function() { method in FormatingWriter