xref: /plugin/bpmnio/vendor/bpmn-js/dist/bpmn-viewer.production.min.js (revision 033061be24b61e2ca1dcf4d5ade55358f0bb0818)
1/*! bpmn-js - 18.14.0 | generated for dokuwiki-plugin-bpmnio | SEE LICENSE IN LICENSE */
2(()=>{function Ee(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}var Vt=Object.prototype.toString,wo=Object.prototype.hasOwnProperty;function Jt(e){return e===void 0}function Et(e){return e!==void 0}function jr(e){return e==null}function ye(e){return Vt.call(e)==="[object Array]"}function Ae(e){return Vt.call(e)==="[object Object]"}function Te(e){return Vt.call(e)==="[object Number]"}function ot(e){let t=Vt.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function ke(e){return Vt.call(e)==="[object String]"}function Ue(e,t){return!jr(e)&&wo.call(e,t)}function he(e,t){let r=$r(t),n;return R(e,function(i,o){if(r(i,o))return n=i,!1}),n}function Pn(e,t){let r=$r(t),n=ye(e)?-1:void 0;return R(e,function(i,o){if(r(i,o))return n=o,!1}),n}function Xe(e,t){let r=$r(t),n=[];return R(e,function(i,o){r(i,o)&&n.push(i)}),n}function R(e,t){let r,n;if(Jt(e))return;let i=ye(e)?bo:_o;for(let o in e)if(Ue(e,o)&&(r=e[o],n=t(r,i(o)),n===!1))return r}function Ze(e,t,r){return R(e,function(n,i){r=t(r,n,i)}),r}function Vr(e,t){return!!Ze(e,function(r,n,i){return r&&t(n,i)},!0)}function er(e,t){return!!he(e,t)}function Tn(e,t){let r=[];return R(e,function(n,i){r.push(t(n,i))}),r}function Wr(e){return function(t){return Vr(e,function(r,n){return t[n]===r})}}function $r(e){return ot(e)?e:t=>t===e}function _o(e){return e}function bo(e){return Number(e)}function kn(e,t){let r,n,i,o;function u(A){let j=Date.now(),$=A?0:o+t-j;if($>0)return l($);e.apply(i,n),f()}function l(A){r=setTimeout(u,A)}function f(){r&&clearTimeout(r),r=o=n=i=void 0}function d(){r&&u(!0),f()}function g(...A){o=Date.now(),n=A,i=this,r||l(t)}return g.flush=d,g.cancel=f,g}function qe(e,t){return e.bind(t)}function k(e,...t){return Object.assign(e,...t)}function Mn(e,t,r){let n=e;return R(t,function(i,o){if(typeof i!="number"&&typeof i!="string")throw new Error("illegal key type: "+typeof i+". Key should be of type number or string.");if(i==="constructor")throw new Error("illegal key: constructor");if(i==="__proto__")throw new Error("illegal key: __proto__");let u=t[o+1],l=n[i];Et(u)&&jr(l)&&(l=n[i]=isNaN(+u)?{}:[]),Jt(u)?Jt(r)?delete n[i]:n[i]=r:n=l}),e}function Dn(e,t){let r={},n=Object(e);return R(t,function(i){i in n&&(r[i]=e[i])}),r}function Nn(e,t){let r={},n=Object(e);return R(n,function(i,o){t.indexOf(o)===-1&&(r[o]=i)}),r}var Ao=1e3;function We(e,t){var r=this;t=t||Ao,e.on(["render.shape","render.connection"],t,function(n,i){var o=n.type,u=i.element,l=i.gfx,f=i.attrs;if(r.canRender(u))return o==="render.shape"?r.drawShape(l,u,f):r.drawConnection(l,u,f)}),e.on(["render.getShapePath","render.getConnectionPath"],t,function(n,i){if(r.canRender(i))return n.type==="render.getShapePath"?r.getShapePath(i):r.getConnectionPath(i)})}We.prototype.canRender=function(e){};We.prototype.drawShape=function(e,t){};We.prototype.drawConnection=function(e,t){};We.prototype.getShapePath=function(e){};We.prototype.getConnectionPath=function(e){};function D(e,t){var r=re(e);return r&&typeof r.$instanceOf=="function"&&r.$instanceOf(t)}function Bn(e,t){return er(t,function(r){return D(e,r)})}function re(e){return e&&e.businessObject||e}function $e(e){return e&&e.di}function at(e,t){return D(e,"bpmn:CallActivity")?!1:D(e,"bpmn:SubProcess")?(t=t||$e(e),t&&D(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):D(e,"bpmn:Participant")?!!re(e).processRef:!0}function zr(e){if(!(!D(e,"bpmn:Participant")&&!D(e,"bpmn:Lane"))){var t=$e(e).isHorizontal;return t===void 0?!0:t}}function On(e){return e&&!!re(e).triggeredByEvent}function Ln(e){return Ae(e)&&Ue(e,"waypoints")}function Hr(e){return Ae(e)&&Ue(e,"labelTarget")}var tr={width:90,height:20},In=15;function Fn(e){return D(e,"bpmn:Event")||D(e,"bpmn:Gateway")||D(e,"bpmn:DataStoreReference")||D(e,"bpmn:DataObjectReference")||D(e,"bpmn:DataInput")||D(e,"bpmn:DataOutput")||D(e,"bpmn:SequenceFlow")||D(e,"bpmn:MessageFlow")||D(e,"bpmn:Group")}function So(e){var t=e.length/2-1,r=e[Math.floor(t)],n=e[Math.ceil(t+.01)],i=Ro(e),o=Math.atan((n.y-r.y)/(n.x-r.x)),u=i.x,l=i.y;return Math.abs(o)<Math.PI/2?l-=In:u+=In,{x:u,y:l}}function Ro(e){var t=e.length/2-1,r=e[Math.floor(t)],n=e[Math.ceil(t+.01)];return{x:r.x+(n.x-r.x)/2,y:r.y+(n.y-r.y)/2}}function Co(e){return e.waypoints?So(e.waypoints):D(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+tr.height/2}:{x:e.x+e.width/2,y:e.y+e.height+tr.height/2}}function jn(e,t){var r,n,i,o=e.label;return o&&o.bounds?(i=o.bounds,n={width:Math.max(tr.width,i.width),height:i.height},r={x:i.x+i.width/2,y:i.y+i.height/2}):(r=Co(t),n=tr),k({x:r.x-n.width/2,y:r.y-n.height/2},n)}function Po(e){if(D(e,"bpmn:FlowElement")||D(e,"bpmn:Participant")||D(e,"bpmn:Lane")||D(e,"bpmn:SequenceFlow")||D(e,"bpmn:MessageFlow")||D(e,"bpmn:DataInput")||D(e,"bpmn:DataOutput"))return"name";if(D(e,"bpmn:TextAnnotation"))return"text";if(D(e,"bpmn:Group"))return"categoryValueRef"}function To(e){var t=e.categoryValueRef;return t&&t.value||""}function Ct(e){var t=e.businessObject,r=Po(t);if(r)return r==="categoryValueRef"?To(t):t[r]||""}function ko(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function zn(e,t){return t.appendChild(ko(e,t))}function ae(e,t){return zn(t,e),e}var Kr=2,Hn={"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":Kr,"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":Kr,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function Mo(e,t){return Hn[t]?e.style[t]:e.getAttributeNS(null,t)}function Un(e,t,r){var n=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=Hn[n];i?(i===Kr&&typeof r=="number"&&(r=String(r)+"px"),e.style[n]=r):e.setAttributeNS(null,t,r)}function Do(e,t){var r=Object.keys(t),n,i;for(n=0,i;i=r[n];n++)Un(e,i,t[i])}function Q(e,t,r){if(typeof t=="string")if(r!==void 0)Un(e,t,r);else return Mo(e,t);else Do(e,t);return e}var No=Object.prototype.toString;function Be(e){return new pt(e)}function pt(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}pt.prototype.add=function(e){return this.list.add(e),this};pt.prototype.remove=function(e){return No.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)};pt.prototype.removeMatching=function(e){let t=this.array();for(let r=0;r<t.length;r++)e.test(t[r])&&this.remove(t[r]);return this};pt.prototype.toggle=function(e,t){return typeof t!="undefined"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this};pt.prototype.array=function(){return Array.from(this.list)};pt.prototype.has=pt.prototype.contains=function(e){return this.list.contains(e)};function Bo(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}var Gr={svg:"http://www.w3.org/2000/svg"},Vn='<svg xmlns="'+Gr.svg+'"';function qn(e){var t=!1;e.substring(0,4)==="<svg"?e.indexOf(Gr.svg)===-1&&(e=Vn+e.substring(4)):(e=Vn+">"+e+"</svg>",t=!0);var r=Oo(e);if(!t)return r;for(var n=document.createDocumentFragment(),i=r.firstChild;i.firstChild;)n.appendChild(i.firstChild);return n}function Oo(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function J(e,t){var r;return e=e.trim(),e.charAt(0)==="<"?(r=qn(e).firstChild,r=document.importNode(r,!0)):r=document.createElementNS(Gr.svg,e),t&&Q(r,t),r}var Ur=null;function Yr(){return Ur===null&&(Ur=J("svg")),Ur}function Wn(e,t){var r,n,i=Object.keys(t);for(r=0;n=i[r];r++)e[n]=t[n];return e}function Kn(e,t,r,n,i,o){var u=Yr().createSVGMatrix();switch(arguments.length){case 0:return u;case 1:return Wn(u,e);case 6:return Wn(u,{a:e,b:t,c:r,d:n,e:i,f:o})}}function Pt(e){return e?Yr().createSVGTransformFromMatrix(e):Yr().createSVGTransform()}var $n=/([&<>]{1})/g,Lo=/([&<>\n\r"]{1})/g,Io={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function qr(e,t){function r(n,i){return Io[i]||i}return e.replace(t,r)}function Yn(e,t){var r,n,i,o,u;switch(e.nodeType){case 3:t.push(qr(e.textContent,$n));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(i=e.attributes,r=0,n=i.length;r<n;++r)o=i.item(r),t.push(" ",o.name,'="',qr(o.value,Lo),'"');if(e.hasChildNodes()){for(t.push(">"),u=e.childNodes,r=0,n=u.length;r<n;++r)Yn(u.item(r),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("<!--",qr(e.nodeValue,$n),"-->");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function Fo(e,t){var r=qn(t);if(Bo(e),!!t){Vo(r)||(r=r.documentElement);for(var n=Wo(r.childNodes),i=0;i<n.length;i++)zn(n[i],e)}}function jo(e){for(var t=e.firstChild,r=[];t;)Yn(t,r),t=t.nextSibling;return r.join("")}function Vo(e){return e.nodeName==="#document-fragment"}function Xr(e,t){if(t!==void 0){try{Fo(e,t)}catch(r){throw new Error("error parsing SVG: "+r.message)}return e}else return jo(e)}function Wo(e){return Array.prototype.slice.call(e)}function xt(e){var t=e.parentNode;return t&&t.removeChild(e),e}function $o(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function zo(e,t){var r,n;for(e.clear(),r=0;n=t[r];r++)e.appendItem($o(e,n))}function wt(e,t){var r=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),zo(r,t)),r.consolidate()}function st(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function Ho(e){return["M",e.x,e.y]}function Zr(e){return["L",e.x,e.y]}function Uo(e,t,r){return["C",e.x,e.y,t.x,t.y,r.x,r.y]}function qo(e,t){let r=e.length,n=[Ho(e[0])];for(let i=1;i<r;i++){let o=e[i-1],u=e[i],l=e[i+1];if(!l||!t){n.push(Zr(u));continue}let f=Math.min(t,Qr(u.x-o.x,u.y-o.y),Qr(l.x-u.x,l.y-u.y));if(!f){n.push(Zr(u));continue}let d=rr(u,o,f),g=rr(u,o,f*.5),A=rr(u,l,f),j=rr(u,l,f*.5);n.push(Zr(d)),n.push(Uo(g,j,A))}return n}function rr(e,t,r){let n=t.x-e.x,i=t.y-e.y,o=Qr(n,i),u=r/o;return{x:e.x+n*u,y:e.y+i*u}}function Qr(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function Tt(e,t,r){Te(t)&&(r=t,t=null),t||(t={});let n=J("path",t);return Te(r)&&(n.dataset.cornerRadius=String(r)),Jr(n,e)}function Jr(e,t){let r=parseInt(e.dataset.cornerRadius,10)||0;return Q(e,{d:st(qo(t,r))}),e}var nr="hsl(225, 10%, 15%)",Ko="white";function Ke(e,t){return er(e.eventDefinitions,function(r){return r.$type===t})}function Gn(e){return e.$type==="bpmn:IntermediateThrowEvent"||e.$type==="bpmn:EndEvent"}function Xn(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function z(e,t,r){var n=$e(e);return r||n.get("color:background-color")||n.get("bioc:fill")||t||Ko}function C(e,t,r){var n=$e(e);return r||n.get("color:border-color")||n.get("bioc:stroke")||t||nr}function kt(e,t,r,n){var i=$e(e),o=i.get("label");return n||o&&o.get("color:color")||t||C(e,r)}function Zn(e){var t=e.x+e.width/2,r=e.y+e.height/2,n=e.width/2,i=[["M",t,r],["m",0,-n],["a",n,n,0,1,1,0,2*n],["a",n,n,0,1,1,0,-2*n],["z"]];return st(i)}function en(e,t){var r=e.x,n=e.y,i=e.width,o=e.height,u=[["M",r+t,n],["l",i-t*2,0],["a",t,t,0,0,1,t,t],["l",0,o-t*2],["a",t,t,0,0,1,-t,t],["l",t*2-i,0],["a",t,t,0,0,1,-t,-t],["l",0,t*2-o],["a",t,t,0,0,1,t,-t],["z"]];return st(u)}function Qn(e){var t=e.width,r=e.height,n=e.x,i=e.y,o=t/2,u=r/2,l=[["M",n+o,i],["l",o,u],["l",-o,u],["l",-o,-u],["z"]];return st(l)}function Jn(e){var t=e.x,r=e.y,n=e.width,i=e.height,o=[["M",t,r],["l",n,0],["l",0,i],["l",-n,0],["z"]];return st(o)}function Mt(e,t={}){return{width:Oe(e,t),height:Se(e,t)}}function Oe(e,t={}){return Ue(t,"width")?t.width:e.width}function Se(e,t={}){return Ue(t,"height")?t.height:e.height}var fe={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]};fe.td=fe.th=[3,"<table><tbody><tr>","</tr></tbody></table>"];fe.option=fe.optgroup=[1,'<select multiple="multiple">',"</select>"];fe.thead=fe.tbody=fe.colgroup=fe.caption=fe.tfoot=[1,"<table>","</table>"];fe.polyline=fe.ellipse=fe.polygon=fe.circle=fe.text=fe.line=fe.path=fe.rect=fe.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function xe(e,t=globalThis.document){var d;if(typeof e!="string")throw new TypeError("String expected");let r=/^<!--(.*?)-->$/s.exec(e);if(r)return t.createComment(r[1]);let n=(d=/<([\w:]+)/.exec(e))==null?void 0:d[1];if(!n)return t.createTextNode(e);if(e=e.trim(),n==="body"){let g=t.createElement("html");g.innerHTML=e;let{lastChild:A}=g;return A.remove(),A}let[i,o,u]=Object.hasOwn(fe,n)?fe[n]:fe._default,l=t.createElement("div");for(l.innerHTML=o+e+u;i--;)l=l.lastChild;if(l.firstChild===l.lastChild){let{firstChild:g}=l;return g.remove(),g}let f=t.createDocumentFragment();return f.append(...l.childNodes),f}function Yo(e,t){return t.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(n){if(n!=="default"&&!(n in e)){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(e)}function we(e,...t){let r=e.style;return R(t,function(n){n&&R(n,function(i,o){r[o]=i})}),e}function or(e,t,r){return arguments.length==2?e.getAttribute(t):r===null?e.removeAttribute(t):(e.setAttribute(t,r),e)}var Go=Object.prototype.toString;function _t(e){return new ht(e)}function ht(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}ht.prototype.add=function(e){return this.list.add(e),this};ht.prototype.remove=function(e){return Go.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)};ht.prototype.removeMatching=function(e){let t=this.array();for(let r=0;r<t.length;r++)e.test(t[r])&&this.remove(t[r]);return this};ht.prototype.toggle=function(e,t){return typeof t!="undefined"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this};ht.prototype.array=function(){return Array.from(this.list)};ht.prototype.has=ht.prototype.contains=function(e){return this.list.contains(e)};function ar(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Xo(e,t,r){var n=r?e:e.parentNode;return n&&typeof n.closest=="function"&&n.closest(t)||null}function Zo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ir={},ei;function Qo(){if(ei)return ir;ei=1;var e,t,r;function n(){e=window.addEventListener?"addEventListener":"attachEvent",t=window.removeEventListener?"removeEventListener":"detachEvent",r=e!=="addEventListener"?"on":""}return ir.bind=function(i,o,u,l){return e||n(),i[e](r+o,u,l||!1),u},ir.unbind=function(i,o,u,l){return t||n(),i[t](r+o,u,l||!1),u},ir}var ti=Qo(),Jo=Zo(ti),sr=Yo({__proto__:null,default:Jo},[ti]),ri=["focus","blur"];function ea(e,t,r,n,i){return ri.indexOf(r)!==-1&&(i=!0),sr.bind(e,r,function(o){var u=o.target||o.srcElement;o.delegateTarget=Xo(u,t,!0),o.delegateTarget&&n.call(e,o)},i)}function ta(e,t,r,n){return ri.indexOf(t)!==-1&&(n=!0),sr.unbind(e,t,r,n)}var Wt={bind:ea,unbind:ta};function Le(e,t){return t=t||document,t.querySelector(e)}function ni(e,t){return t=t||document,t.querySelectorAll(e)}function Dt(e){e.parentNode&&e.parentNode.removeChild(e)}function ur(e,t,r,n,i){var o=Pt();o.setTranslate(t,r);var u=Pt();u.setRotate(n||0,0,0);var l=Pt();l.setScale(i||1,i||1),wt(e,[o,u,l])}function lr(e,t,r){var n=Pt();n.setTranslate(t,r),wt(e,n)}function ii(e,t){var r=Pt();r.setRotate(t,0,0),wt(e,r)}function ra(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tn={exports:{}},oi;function na(){if(oi)return tn.exports;oi=1;var e=tn.exports=function(t,r){if(r||(r=16),t===void 0&&(t=128),t<=0)return"0";for(var n=Math.log(Math.pow(2,t))/Math.log(r),i=2;n===1/0;i*=2)n=Math.log(Math.pow(2,t/i))/Math.log(r)*i;for(var o=n-Math.floor(n),u="",i=0;i<Math.floor(n);i++){var l=Math.floor(Math.random()*r).toString(r);u=l+u}if(o){var f=Math.pow(r,o),l=Math.floor(Math.random()*f).toString(r);u=l+u}var d=parseInt(u,r);return d!==1/0&&d>=Math.pow(2,t)?e(t,r):u};return e.rack=function(t,r,n){var i=function(u){var l=0;do{if(l++>10)if(n)t+=n;else throw new Error("too many ID collisions, use more bits");var f=e(t,r)}while(Object.hasOwnProperty.call(o,f));return o[f]=u,f},o=i.hats={};return i.get=function(u){return i.hats[u]},i.set=function(u,l){return i.hats[u]=l,i},i.bits=t||128,i.base=r||16,i},tn.exports}var ia=na(),oa=ra(ia);function Qe(e){if(!(this instanceof Qe))return new Qe(e);e=e||[128,36,1],this._seed=e.length?oa.rack(e[0],e[1],e[2]):e}Qe.prototype.next=function(e){return this._seed(e||!0)};Qe.prototype.nextPrefixed=function(e,t){var r;do r=e+this.next(!0);while(this.assigned(r));return this.claim(r,t),r};Qe.prototype.claim=function(e,t){this._seed.set(e,t||!0)};Qe.prototype.assigned=function(e){return this._seed.get(e)||!1};Qe.prototype.unclaim=function(e){delete this._seed.hats[e]};Qe.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};var aa=new Qe,sa=10,cr=3,ua=1.5,fr=10,la=4,Nt=.95,ca=1,fa=.25;function ut(e,t,r,n,i,o,u){We.call(this,t,u);var l=e&&e.defaultFillColor,f=e&&e.defaultStrokeColor,d=e&&e.defaultLabelColor;function g(c){return r.computeStyle(c,{strokeLinecap:"round",strokeLinejoin:"round",stroke:nr,strokeWidth:2,fill:"white"})}function A(c){return r.computeStyle(c,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:nr,strokeWidth:2})}function j(c,s){var{ref:a={x:0,y:0},scale:p=1,element:h,parentGfx:y=i._svg}=s,w=J("marker",{id:c,viewBox:"0 0 20 20",refX:a.x,refY:a.y,markerWidth:20*p,markerHeight:20*p,orient:"auto"});ae(w,h);var O=Le(":scope > defs",y);O||(O=J("defs"),ae(y,O)),ae(O,w)}function $(c,s,a,p){var h=aa.nextPrefixed("marker-");return ne(c,h,s,a,p),"url(#"+h+")"}function ne(c,s,a,p,h){if(a==="sequenceflow-end"){var y=J("path",{d:"M 1 5 L 11 10 L 1 15 Z",...g({fill:h,stroke:h,strokeWidth:1})});j(s,{element:y,ref:{x:11,y:10},scale:.5,parentGfx:c})}if(a==="messageflow-start"){var w=J("circle",{cx:6,cy:6,r:3.5,...g({fill:p,stroke:h,strokeWidth:1,strokeDasharray:[1e4,1]})});j(s,{element:w,ref:{x:6,y:6},parentGfx:c})}if(a==="messageflow-end"){var O=J("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...g({fill:p,stroke:h,strokeWidth:1,strokeDasharray:[1e4,1]})});j(s,{element:O,ref:{x:8.5,y:5},parentGfx:c})}if(a==="association-start"){var U=J("path",{d:"M 11 5 L 1 10 L 11 15",...A({fill:"none",stroke:h,strokeWidth:1.5,strokeDasharray:[1e4,1]})});j(s,{element:U,ref:{x:1,y:10},scale:.5,parentGfx:c})}if(a==="association-end"){var ce=J("path",{d:"M 1 5 L 11 10 L 1 15",...A({fill:"none",stroke:h,strokeWidth:1.5,strokeDasharray:[1e4,1]})});j(s,{element:ce,ref:{x:11,y:10},scale:.5,parentGfx:c})}if(a==="conditional-flow-marker"){var ue=J("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...g({fill:p,stroke:h})});j(s,{element:ue,ref:{x:-1,y:10},scale:.5,parentGfx:c})}if(a==="conditional-default-flow-marker"){var de=J("path",{d:"M 6 4 L 10 16",...g({stroke:h,fill:"none"})});j(s,{element:de,ref:{x:0,y:10},scale:.5,parentGfx:c})}}function V(c,s,a,p,h={}){Ae(p)&&(h=p,p=0),p=p||0,h=g(h);var y=s/2,w=a/2,O=J("circle",{cx:y,cy:w,r:Math.round((s+a)/4-p),...h});return ae(c,O),O}function q(c,s,a,p,h,y){Ae(h)&&(y=h,h=0),h=h||0,y=g(y);var w=J("rect",{x:h,y:h,width:s-h*2,height:a-h*2,rx:p,ry:p,...y});return ae(c,w),w}function Y(c,s,a,p){var h=s/2,y=a/2,w=[{x:h,y:0},{x:s,y},{x:h,y:a},{x:0,y}],O=w.map(function(ce){return ce.x+","+ce.y}).join(" ");p=g(p);var U=J("polygon",{...p,points:O});return ae(c,U),U}function Z(c,s,a,p){a=A(a);var h=Tt(s,a,p);return ae(c,h),h}function P(c,s,a){return Z(c,s,a,5)}function m(c,s,a){a=A(a);var p=J("path",{...a,d:s});return ae(c,p),p}function _(c,s,a,p){return m(s,a,k({"data-marker":c},p))}function S(c){return De[c]}function F(c){return function(s,a,p){return S(c)(s,a,p)}}var v={"bpmn:MessageEventDefinition":function(c,s,a={},p){var h=n.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:a.width||s.width,containerHeight:a.height||s.height,position:{mx:.235,my:.315}}),y=p?C(s,f,a.stroke):z(s,l,a.fill),w=p?z(s,l,a.fill):C(s,f,a.stroke),O=m(c,h,{fill:y,stroke:w,strokeWidth:1});return O},"bpmn:TimerEventDefinition":function(c,s,a={}){var p=a.width||s.width,h=a.height||s.height,y=a.width?1:2,w=V(c,p,h,.2*h,{fill:z(s,l,a.fill),stroke:C(s,f,a.stroke),strokeWidth:y}),O=n.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:p,containerHeight:h,position:{mx:.5,my:.5}});m(c,O,{stroke:C(s,f,a.stroke),strokeWidth:y});for(var U=0;U<12;U++){var ce=n.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:p,containerHeight:h,position:{mx:.5,my:.5}}),ue=p/2,de=h/2;m(c,ce,{strokeWidth:1,stroke:C(s,f,a.stroke),transform:"rotate("+U*30+","+de+","+ue+")"})}return w},"bpmn:EscalationEventDefinition":function(c,s,a={},p){var h=n.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:a.width||s.width,containerHeight:a.height||s.height,position:{mx:.5,my:.2}}),y=p?C(s,f,a.stroke):z(s,l,a.fill);return m(c,h,{fill:y,stroke:C(s,f,a.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(c,s,a={}){var p=n.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:a.width||s.width,containerHeight:a.height||s.height,position:{mx:.5,my:.222}});return m(c,p,{fill:z(s,l,a.fill),stroke:C(s,f,a.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(c,s,a={},p){var h=n.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:.57,my:.263}}),y=p?C(s,f,a.stroke):z(s,l,a.fill);return m(c,h,{fill:y,stroke:C(s,f,a.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(c,s,a={},p){var h=n.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:a.width||s.width,containerHeight:a.height||s.height,position:{mx:.2,my:.722}}),y=p?C(s,f,a.stroke):z(s,l,a.fill);return m(c,h,{fill:y,stroke:C(s,f,a.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(c,s,a={},p){var h=n.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:.638,my:-.055}}),y=p?C(s,f,a.stroke):"none",w=m(c,h,{fill:y,stroke:C(s,f,a.stroke),strokeWidth:1});return ii(w,45),w},"bpmn:CompensateEventDefinition":function(c,s,a={},p){var h=n.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:a.width||s.width,containerHeight:a.height||s.height,position:{mx:.22,my:.5}}),y=p?C(s,f,a.stroke):z(s,l,a.fill);return m(c,h,{fill:y,stroke:C(s,f,a.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(c,s,a={},p){var h=n.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:a.width||s.width,containerHeight:a.height||s.height,position:{mx:.5,my:.2}}),y=p?C(s,f,a.stroke):z(s,l,a.fill);return m(c,h,{strokeWidth:1,fill:y,stroke:C(s,f,a.stroke)})},"bpmn:MultipleEventDefinition":function(c,s,a={},p){var h=n.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:a.width||s.width,containerHeight:a.height||s.height,position:{mx:.211,my:.36}}),y=p?C(s,f,a.stroke):z(s,l,a.fill);return m(c,h,{fill:y,stroke:C(s,f,a.stroke),strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(c,s,a={}){var p=n.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:a.width||s.width,containerHeight:a.height||s.height,position:{mx:.458,my:.194}});return m(c,p,{fill:z(s,l,a.fill),stroke:C(s,f,a.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(c,s,a={}){var p=V(c,s.width,s.height,8,{fill:C(s,f,a.stroke),stroke:C(s,f,a.stroke),strokeWidth:4});return p}};function T(c,s,a={},p){var h=re(c),y=Gn(h),w=p||c;return h.get("eventDefinitions")&&h.get("eventDefinitions").length>1?h.get("parallelMultiple")?v["bpmn:ParallelMultipleEventDefinition"](s,w,a,y):v["bpmn:MultipleEventDefinition"](s,w,a,y):Ke(h,"bpmn:MessageEventDefinition")?v["bpmn:MessageEventDefinition"](s,w,a,y):Ke(h,"bpmn:TimerEventDefinition")?v["bpmn:TimerEventDefinition"](s,w,a,y):Ke(h,"bpmn:ConditionalEventDefinition")?v["bpmn:ConditionalEventDefinition"](s,w,a,y):Ke(h,"bpmn:SignalEventDefinition")?v["bpmn:SignalEventDefinition"](s,w,a,y):Ke(h,"bpmn:EscalationEventDefinition")?v["bpmn:EscalationEventDefinition"](s,w,a,y):Ke(h,"bpmn:LinkEventDefinition")?v["bpmn:LinkEventDefinition"](s,w,a,y):Ke(h,"bpmn:ErrorEventDefinition")?v["bpmn:ErrorEventDefinition"](s,w,a,y):Ke(h,"bpmn:CancelEventDefinition")?v["bpmn:CancelEventDefinition"](s,w,a,y):Ke(h,"bpmn:CompensateEventDefinition")?v["bpmn:CompensateEventDefinition"](s,w,a,y):Ke(h,"bpmn:TerminateEventDefinition")?v["bpmn:TerminateEventDefinition"](s,w,a,y):null}var b={ParticipantMultiplicityMarker:function(c,s,a={}){var p=Oe(s,a),h=Se(s,a),y=n.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:p,containerHeight:h,position:{mx:(p/2-6)/p,my:(h-15)/h}});_("participant-multiplicity",c,y,{strokeWidth:2,fill:z(s,l,a.fill),stroke:C(s,f,a.stroke)})},SubProcessMarker:function(c,s,a={}){var p=q(c,14,14,0,{strokeWidth:1,fill:z(s,l,a.fill),stroke:C(s,f,a.stroke)});lr(p,s.width/2-7.5,s.height-20);var h=n.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:s.width,containerHeight:s.height,position:{mx:(s.width/2-7.5)/s.width,my:(s.height-20)/s.height}});_("sub-process",c,h,{fill:z(s,l,a.fill),stroke:C(s,f,a.stroke)})},ParallelMarker:function(c,s,a){var p=Oe(s,a),h=Se(s,a),y=n.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:p,containerHeight:h,position:{mx:(p/2+a.parallel)/p,my:(h-20)/h}});_("parallel",c,y,{fill:z(s,l,a.fill),stroke:C(s,f,a.stroke)})},SequentialMarker:function(c,s,a){var p=n.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:(s.width/2+a.seq)/s.width,my:(s.height-19)/s.height}});_("sequential",c,p,{fill:z(s,l,a.fill),stroke:C(s,f,a.stroke)})},CompensationMarker:function(c,s,a){var p=n.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:(s.width/2+a.compensation)/s.width,my:(s.height-13)/s.height}});_("compensation",c,p,{strokeWidth:1,fill:z(s,l,a.fill),stroke:C(s,f,a.stroke)})},LoopMarker:function(c,s,a){var p=Oe(s,a),h=Se(s,a),y=n.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:p,containerHeight:h,position:{mx:(p/2+a.loop)/p,my:(h-7)/h}});_("loop",c,y,{strokeWidth:1.5,fill:"none",stroke:C(s,f,a.stroke),strokeMiterlimit:.5})},AdhocMarker:function(c,s,a){var p=Oe(s,a),h=Se(s,a),y=n.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:p,containerHeight:h,position:{mx:(p/2+a.adhoc)/p,my:(h-15)/h}});_("adhoc",c,y,{strokeWidth:1,fill:C(s,f,a.stroke),stroke:C(s,f,a.stroke)})}};function B(c,s,a,p){b[c](s,a,p)}function M(c,s,a=[],p={}){p={fill:p.fill,stroke:p.stroke,width:Oe(s,p),height:Se(s,p)};var h=re(s),y=a.includes("SubProcessMarker");y?p={...p,seq:-21,parallel:-22,compensation:-25,loop:-18,adhoc:10}:p={...p,seq:-5,parallel:-6,compensation:-7,loop:0,adhoc:-8},h.get("isForCompensation")&&a.push("CompensationMarker"),D(h,"bpmn:AdHocSubProcess")&&(a.push("AdhocMarker"),y||k(p,{compensation:p.compensation-18}));var w=h.get("loopCharacteristics"),O=w&&w.get("isSequential");w&&(k(p,{compensation:p.compensation-18}),a.includes("AdhocMarker")&&k(p,{seq:-23,loop:-18,parallel:-24}),O===void 0&&a.push("LoopMarker"),O===!1&&a.push("ParallelMarker"),O===!0&&a.push("SequentialMarker")),a.includes("CompensationMarker")&&a.length===1&&k(p,{compensation:-8}),R(a,function(U){B(U,c,s,p)})}function N(c,s,a={}){a=k({size:{width:100}},a);var p=o.createText(s||"",a);return Be(p).add("djs-label"),ae(c,p),p}function H(c,s,a,p={}){var h=re(s),y=Mt({x:s.x,y:s.y,width:s.width,height:s.height},p);return N(c,h.name,{align:a,box:y,padding:7,style:{fill:kt(s,d,f,p.stroke)}})}function Ge(c,s,a={}){var p={width:90,height:30,x:s.width/2+s.x,y:s.height/2+s.y};return N(c,Ct(s),{box:p,fitBox:!0,style:k({},o.getExternalStyle(),{fill:kt(s,d,f,a.stroke)})})}function ie(c,s,a,p={}){var h=zr(a),y=N(c,s,{box:{height:30,width:h?Se(a,p):Oe(a,p)},align:"center-middle",style:{fill:kt(a,d,f,p.stroke)}});if(h){var w=-1*Se(a,p);ur(y,0,-w,270)}}function G(c,s,a={}){var{width:p,height:h}=Mt(s,a);return q(c,p,h,fr,{...a,fill:z(s,l,a.fill),fillOpacity:Nt,stroke:C(s,f,a.stroke)})}function ze(c,s,a={}){var p=re(s),h=z(s,l,a.fill),y=C(s,f,a.stroke);return(p.get("associationDirection")==="One"||p.get("associationDirection")==="Both")&&(a.markerEnd=$(c,"association-end",h,y)),p.get("associationDirection")==="Both"&&(a.markerStart=$(c,"association-start",h,y)),a=K(a,["markerStart","markerEnd"]),P(c,s.waypoints,{...a,stroke:y,strokeDasharray:"0, 5"})}function He(c,s,a={}){var p=z(s,l,a.fill),h=C(s,f,a.stroke),y=n.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:.474,my:.296}}),w=m(c,y,{fill:p,fillOpacity:Nt,stroke:h}),O=re(s);if(Xn(O)){var U=n.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:.33,my:(s.height-18)/s.height}});m(c,U,{strokeWidth:2,fill:p,stroke:h})}return w}function le(c,s,a={}){return V(c,s.width,s.height,{fillOpacity:Nt,...a,fill:z(s,l,a.fill),stroke:C(s,f,a.stroke)})}function je(c,s,a={}){return Y(c,s.width,s.height,{fill:z(s,l,a.fill),fillOpacity:Nt,stroke:C(s,f,a.stroke)})}function E(c,s,a={}){var p=q(c,Oe(s,a),Se(s,a),0,{fill:z(s,l,a.fill),fillOpacity:a.fillOpacity||Nt,stroke:C(s,f,a.stroke),strokeWidth:1.5}),h=re(s);if(D(h,"bpmn:Lane")){var y=h.get("name");ie(c,y,s,a)}return p}function x(c,s,a={}){var p=G(c,s,a),h=at(s);if(On(s)&&(Q(p,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!h)){var y=re(s).flowElements||[],w=y.filter(O=>D(O,"bpmn:StartEvent"));w.length===1&&L(w[0],c,a,s)}return H(c,s,h?"center-top":"center-middle",a),h?M(c,s,void 0,a):M(c,s,["SubProcessMarker"],a),p}function L(c,s,a,p){var h=22,y={fill:z(p,l,a.fill),stroke:C(p,f,a.stroke),width:h,height:h},w=re(c).isInterrupting,O=w?0:3,U=w?1:1.2,ce=20,ue=(h-ce)/2,de="translate("+ue+","+ue+")";V(s,ce,ce,{fill:y.fill,stroke:y.stroke,strokeWidth:U,strokeDasharray:O,transform:de}),T(c,s,y,p)}function ee(c,s,a={}){var p=G(c,s,a);return H(c,s,"center-middle",a),M(c,s,void 0,a),p}var De=this.handlers={"bpmn:AdHocSubProcess":function(c,s,a={}){return at(s)?a=K(a,["fill","stroke","width","height"]):a=K(a,["fill","stroke"]),x(c,s,a)},"bpmn:Association":function(c,s,a={}){return a=K(a,["fill","stroke"]),ze(c,s,a)},"bpmn:BoundaryEvent":function(c,s,a={}){var{renderIcon:p=!0}=a;a=K(a,["fill","stroke"]);var h=re(s),y=h.get("cancelActivity");a={strokeWidth:1.5,fill:z(s,l,a.fill),fillOpacity:ca,stroke:C(s,f,a.stroke)},y||(a.strokeDasharray="6");var w=le(c,s,a);return V(c,s.width,s.height,cr,{...a,fill:"none"}),p&&T(s,c,a),w},"bpmn:BusinessRuleTask":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=ee(c,s,a),h=n.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),y=m(c,h);Q(y,{fill:z(s,l,a.fill),stroke:C(s,f,a.stroke),strokeWidth:1});var w=n.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),O=m(c,w);return Q(O,{fill:C(s,f,a.stroke),stroke:C(s,f,a.stroke),strokeWidth:1}),p},"bpmn:CallActivity":function(c,s,a={}){return a=K(a,["fill","stroke"]),x(c,s,{strokeWidth:5,...a})},"bpmn:ComplexGateway":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=je(c,s,a),h=n.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:s.width,containerHeight:s.height,position:{mx:.46,my:.26}});return m(c,h,{fill:C(s,f,a.stroke),stroke:C(s,f,a.stroke),strokeWidth:1}),p},"bpmn:DataInput":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=n.getRawPath("DATA_ARROW"),h=He(c,s,a);return m(c,p,{fill:"none",stroke:C(s,f,a.stroke),strokeWidth:1}),h},"bpmn:DataInputAssociation":function(c,s,a={}){return a=K(a,["fill","stroke"]),ze(c,s,{...a,markerEnd:$(c,"association-end",z(s,l,a.fill),C(s,f,a.stroke))})},"bpmn:DataObject":function(c,s,a={}){return a=K(a,["fill","stroke"]),He(c,s,a)},"bpmn:DataObjectReference":F("bpmn:DataObject"),"bpmn:DataOutput":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=n.getRawPath("DATA_ARROW"),h=He(c,s,a);return m(c,p,{strokeWidth:1,fill:z(s,l,a.fill),stroke:C(s,f,a.stroke)}),h},"bpmn:DataOutputAssociation":function(c,s,a={}){return a=K(a,["fill","stroke"]),ze(c,s,{...a,markerEnd:$(c,"association-end",z(s,l,a.fill),C(s,f,a.stroke))})},"bpmn:DataStoreReference":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=n.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:0,my:.133}});return m(c,p,{fill:z(s,l,a.fill),fillOpacity:Nt,stroke:C(s,f,a.stroke),strokeWidth:2})},"bpmn:EndEvent":function(c,s,a={}){var{renderIcon:p=!0}=a;a=K(a,["fill","stroke"]);var h=le(c,s,{...a,strokeWidth:4});return p&&T(s,c,a),h},"bpmn:EventBasedGateway":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=re(s),h=je(c,s,a);V(c,s.width,s.height,s.height*.2,{fill:z(s,"none",a.fill),stroke:C(s,f,a.stroke),strokeWidth:1});var y=p.get("eventGatewayType"),w=!!p.get("instantiate");function O(){var ce=n.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:s.width,containerHeight:s.height,position:{mx:.36,my:.44}});m(c,ce,{fill:"none",stroke:C(s,f,a.stroke),strokeWidth:2})}if(y==="Parallel"){var U=n.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:s.width,containerHeight:s.height,position:{mx:.474,my:.296}});m(c,U,{fill:"none",stroke:C(s,f,a.stroke),strokeWidth:1})}else y==="Exclusive"&&(w||V(c,s.width,s.height,s.height*.26,{fill:"none",stroke:C(s,f,a.stroke),strokeWidth:1}),O());return h},"bpmn:ExclusiveGateway":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=je(c,s,a),h=n.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:s.width,containerHeight:s.height,position:{mx:.32,my:.3}}),y=$e(s);return y.get("isMarkerVisible")&&m(c,h,{fill:C(s,f,a.stroke),stroke:C(s,f,a.stroke),strokeWidth:1}),p},"bpmn:Gateway":function(c,s,a={}){return a=K(a,["fill","stroke"]),je(c,s,a)},"bpmn:Group":function(c,s,a={}){return a=K(a,["fill","stroke","width","height"]),q(c,s.width,s.height,fr,{stroke:C(s,f,a.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:Oe(s,a),height:Se(s,a)})},"bpmn:InclusiveGateway":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=je(c,s,a);return V(c,s.width,s.height,s.height*.24,{fill:z(s,l,a.fill),stroke:C(s,f,a.stroke),strokeWidth:2.5}),p},"bpmn:IntermediateEvent":function(c,s,a={}){var{renderIcon:p=!0}=a;a=K(a,["fill","stroke"]);var h=le(c,s,{...a,strokeWidth:1.5});return V(c,s.width,s.height,cr,{fill:"none",stroke:C(s,f,a.stroke),strokeWidth:1.5}),p&&T(s,c,a),h},"bpmn:IntermediateCatchEvent":F("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":F("bpmn:IntermediateEvent"),"bpmn:Lane":function(c,s,a={}){return a=K(a,["fill","stroke","width","height"]),E(c,s,{...a,fillOpacity:fa})},"bpmn:ManualTask":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=ee(c,s,a),h=n.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return m(c,h,{fill:z(s,l,a.fill),stroke:C(s,f,a.stroke),strokeWidth:.5}),p},"bpmn:MessageFlow":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=re(s),h=$e(s),y=z(s,l,a.fill),w=C(s,f,a.stroke),O=P(c,s.waypoints,{markerEnd:$(c,"messageflow-end",y,w),markerStart:$(c,"messageflow-start",y,w),stroke:w,strokeDasharray:"10, 11",strokeWidth:1.5});if(p.get("messageRef")){var U=O.getPointAtLength(O.getTotalLength()/2),ce=n.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:U.x,y:U.y}}),ue={strokeWidth:1};h.get("messageVisibleKind")==="initiating"?(ue.fill=y,ue.stroke=w):(ue.fill=w,ue.stroke=y);var de=m(c,ce,ue),Ve=p.get("messageRef"),te=Ve.get("name"),it=N(c,te,{align:"center-top",fitBox:!0,style:{fill:w}}),Qt=de.getBBox(),Ne=it.getBBox(),W=U.x-Ne.width/2,X=U.y+Qt.height/2+sa;ur(it,W,X,0)}return O},"bpmn:ParallelGateway":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=je(c,s,a),h=n.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:s.width,containerHeight:s.height,position:{mx:.46,my:.2}});return m(c,h,{fill:C(s,f,a.stroke),stroke:C(s,f,a.stroke),strokeWidth:1}),p},"bpmn:Participant":function(c,s,a={}){a=K(a,["fill","stroke","width","height"]);var p=E(c,s,a),h=at(s),y=zr(s),w=re(s),O=w.get("name");if(h){var U=y?[{x:30,y:0},{x:30,y:Se(s,a)}]:[{x:0,y:30},{x:Oe(s,a),y:30}];Z(c,U,{stroke:C(s,f,a.stroke),strokeWidth:ua}),ie(c,O,s,a)}else{var ce=Mt(s,a);y||(ce.height=Oe(s,a),ce.width=Se(s,a));var ue=N(c,O,{box:ce,align:"center-middle",style:{fill:kt(s,d,f,a.stroke)}});if(!y){var de=-1*Se(s,a);ur(ue,0,-de,270)}}return w.get("participantMultiplicity")&&B("ParticipantMultiplicityMarker",c,s,a),p},"bpmn:ReceiveTask":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=re(s),h=ee(c,s,a),y;return p.get("instantiate")?(V(c,28,28,20*.22,{fill:z(s,l,a.fill),stroke:C(s,f,a.stroke),strokeWidth:1}),y=n.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):y=n.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),m(c,y,{fill:z(s,l,a.fill),stroke:C(s,f,a.stroke),strokeWidth:1}),h},"bpmn:ScriptTask":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=ee(c,s,a),h=n.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return m(c,h,{fill:z(s,l,a.fill),stroke:C(s,f,a.stroke),strokeWidth:1}),p},"bpmn:SendTask":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=ee(c,s,a),h=n.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return m(c,h,{fill:C(s,f,a.stroke),stroke:z(s,l,a.fill),strokeWidth:1}),p},"bpmn:SequenceFlow":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=z(s,l,a.fill),h=C(s,f,a.stroke),y=P(c,s.waypoints,{markerEnd:$(c,"sequenceflow-end",p,h),stroke:h}),w=re(s),{source:O}=s;if(O){var U=re(O);w.get("conditionExpression")&&D(U,"bpmn:Activity")&&Q(y,{markerStart:$(c,"conditional-flow-marker",p,h)}),U.get("default")&&(D(U,"bpmn:Gateway")||D(U,"bpmn:Activity"))&&U.get("default")===w&&Q(y,{markerStart:$(c,"conditional-default-flow-marker",p,h)})}return y},"bpmn:ServiceTask":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=ee(c,s,a);V(c,10,10,{fill:z(s,l,a.fill),stroke:"none",transform:"translate(6, 6)"});var h=n.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});m(c,h,{fill:z(s,l,a.fill),stroke:C(s,f,a.stroke),strokeWidth:1}),V(c,10,10,{fill:z(s,l,a.fill),stroke:"none",transform:"translate(11, 10)"});var y=n.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return m(c,y,{fill:z(s,l,a.fill),stroke:C(s,f,a.stroke),strokeWidth:1}),p},"bpmn:StartEvent":function(c,s,a={}){var{renderIcon:p=!0}=a;a=K(a,["fill","stroke"]);var h=re(s);h.get("isInterrupting")||(a={...a,strokeDasharray:"6"});var y=le(c,s,a);return p&&T(s,c,a),y},"bpmn:SubProcess":function(c,s,a={}){return at(s)?a=K(a,["fill","stroke","width","height"]):a=K(a,["fill","stroke"]),x(c,s,a)},"bpmn:Task":function(c,s,a={}){return a=K(a,["fill","stroke"]),ee(c,s,a)},"bpmn:TextAnnotation":function(c,s,a={}){a=K(a,["fill","stroke","width","height"]);var{width:p,height:h}=Mt(s,a),y=q(c,p,h,0,0,{fill:"none",stroke:"none"}),w=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:p,containerHeight:h,position:{mx:0,my:0}});m(c,w,{stroke:C(s,f,a.stroke)});var O=re(s),U=O.get("text")||"";return N(c,U,{align:"left-top",box:Mt(s,a),padding:7,style:{fill:kt(s,d,f,a.stroke)}}),y},"bpmn:Transaction":function(c,s,a={}){at(s)?a=K(a,["fill","stroke","width","height"]):a=K(a,["fill","stroke"]);var p=x(c,s,{strokeWidth:1.5,...a}),h=r.style(["no-fill","no-events"],{stroke:C(s,f,a.stroke),strokeWidth:1.5}),y=at(s);return y||(a={}),q(c,Oe(s,a),Se(s,a),fr-cr,cr,h),p},"bpmn:UserTask":function(c,s,a={}){a=K(a,["fill","stroke"]);var p=ee(c,s,a),h=15,y=12,w=n.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:h,y}});m(c,w,{fill:z(s,l,a.fill),stroke:C(s,f,a.stroke),strokeWidth:.5});var O=n.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:h,y}});m(c,O,{fill:z(s,l,a.fill),stroke:C(s,f,a.stroke),strokeWidth:.5});var U=n.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:h,y}});return m(c,U,{fill:C(s,f,a.stroke),stroke:C(s,f,a.stroke),strokeWidth:.5}),p},label:function(c,s,a={}){return Ge(c,s,a)}};this._drawPath=m,this._renderer=S}Ee(ut,We);ut.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"];ut.prototype.canRender=function(e){return D(e,"bpmn:BaseElement")};ut.prototype.drawShape=function(e,t,r={}){var{type:n}=t,i=this._renderer(n);return i(e,t,r)};ut.prototype.drawConnection=function(e,t,r={}){var{type:n}=t,i=this._renderer(n);return i(e,t,r)};ut.prototype.getShapePath=function(e){return Hr(e)?en(e,la):D(e,"bpmn:Event")?Zn(e):D(e,"bpmn:Activity")?en(e,fr):D(e,"bpmn:Gateway")?Qn(e):Jn(e)};function K(e,t=[]){return t.reduce((r,n)=>(e[n]&&(r[n]=e[n]),r),{})}var pa=0,ha={width:150,height:50};function da(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function ma(e){return Ae(e)?k({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}var rn=null;function ya(){return rn||(rn=document.createElement("canvas").getContext("2d")),rn}function ga(e){var t=[];return e.fontStyle&&t.push(e.fontStyle),e.fontVariant&&t.push(e.fontVariant),e.fontWeight&&t.push(e.fontWeight),e.fontStretch&&t.push(e.fontStretch),t.push(si(e.fontSize)||"12px"),t.push(e.fontFamily||"sans-serif"),t.join(" ")}function si(e){if(e!=null)return typeof e=="number"||/^-?\d+(\.\d+)?$/.test(e)?e+"px":e}function va(e,t){var r=ya();if(!r)return{width:0,height:0};r.font=ga(t),"letterSpacing"in r&&(r.letterSpacing=si(t.letterSpacing)||"0px");var n=e==="",i=n?"dummy":e.replace(/\s+$/,""),o=r.measureText(i);return{width:n?0:o.width,height:"fontBoundingBoxAscent"in o?o.fontBoundingBoxAscent+o.fontBoundingBoxDescent:o.actualBoundingBoxAscent+o.actualBoundingBoxDescent}}function Ea(e,t,r){for(var n=e.shift(),i=n,o;;){if(o=va(i,r),o.width=i?o.width:0,i===" "||i===""||o.width<Math.round(t)||i.length<2)return xa(e,i,n,o);i=_a(i,o.width,t)}}function xa(e,t,r,n){if(t.length<r.length){var i=r.slice(t.length).trim();e.unshift(i)}return{width:n.width,height:n.height,text:t}}var ai="\xAD";function wa(e,t){var r=e.split(/(\s|-|\u00AD)/g),n,i=[],o=0;if(r.length>1)for(;n=r.shift();)if(n.length+o<t)i.push(n),o+=n.length;else{(n==="-"||n===ai)&&i.pop();break}var u=i[i.length-1];return u&&u===ai&&(i[i.length-1]="-"),i.join("")}function _a(e,t,r){var n=Math.max(e.length*(r/t),1),i=wa(e,n);return i||(i=e.slice(0,Math.max(Math.round(n-1),1))),i}function Bt(e){this._config=k({},{size:ha,padding:pa,style:{},align:"center-top"},e||{})}Bt.prototype.createText=function(e,t){return this.layoutText(e,t).element};Bt.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions};Bt.prototype.layoutText=function(e,t){for(var r=k({},this._config.size,t.box),n=k({},this._config.style,t.style),i=da(t.align||this._config.align),o=ma(t.padding!==void 0?t.padding:this._config.padding),u=t.fitBox||!1,l=ba(n),f=e.split(/\u00AD?\r?\n/),d=[],g=r.width-o.left-o.right;f.length;)d.push(Ea(f,g,n));i.vertical==="middle"&&(o.top=o.bottom=0);var A=Ze(d,function(q,Y,Z){return q+(l||Y.height)},0)+o.top+o.bottom,j=Ze(d,function(q,Y,Z){return Y.width>q?Y.width:q},0),$=o.top;i.vertical==="middle"&&($+=(r.height-A)/2),$-=(l||d[0].height)/4;var ne=J("text");Q(ne,n),R(d,function(q){var Y;switch($+=l||q.height,i.horizontal){case"left":Y=o.left;break;case"right":Y=(u?j:g)-o.right-q.width;break;default:Y=Math.max(((u?j:g)-q.width)/2+o.left,0)}var Z=J("tspan");Q(Z,{x:Y,y:$}),Z.textContent=q.text,ae(ne,Z)});var V={width:j,height:A};return{dimensions:V,element:ne}};function ba(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var Aa=12,Sa=1.2,Ra=30;function pr(e){var t=k({fontFamily:"Arial, sans-serif",fontSize:Aa,fontWeight:"normal",lineHeight:Sa},e&&e.defaultStyle||{}),r=parseInt(t.fontSize,10)-1,n=k({},t,{fontSize:r},e&&e.externalStyle||{}),i=new Bt({style:t});this.getExternalLabelBounds=function(o,u){var l=i.getDimensions(u,{box:{width:90,height:30},style:n});return{x:Math.round(o.x+o.width/2-l.width/2),y:Math.round(o.y),width:Math.ceil(l.width),height:Math.ceil(l.height)}},this.getTextAnnotationBounds=function(o,u){var l=i.getDimensions(u,{box:o,style:t,align:"left-top",padding:5});return{x:o.x,y:o.y,width:o.width,height:Math.max(Ra,Math.round(l.height))}},this.createText=function(o,u){return i.createText(o,u||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return n}}pr.$inject=["config.textRenderer"];function nn(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0  -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m  {mx},{my} l  0,{e.y2} c  {e.x0},{e.y1} {e.x1},{e.y1}  {e.x2},0 l  0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c  {e.x0},{e.y1} {e.x1},{e.y1}  {e.x2},0 m  -{e.x2},{e.y0}c  {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m  -{e.x2},{e.y0}c  {e.x0},{e.y1} {e.x1},{e.y1}  {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(t){return this.pathMap[t].d},this.getScaledPath=function(t,r){var n=this.pathMap[t],i,o;r.abspos?(i=r.abspos.x,o=r.abspos.y):(i=r.containerWidth*r.position.mx,o=r.containerHeight*r.position.my);var u={};if(r.position){for(var l=r.containerHeight/n.height*r.yScaleFactor,f=r.containerWidth/n.width*r.xScaleFactor,d=0;d<n.heightElements.length;d++)u["y"+d]=n.heightElements[d]*l;for(var g=0;g<n.widthElements.length;g++)u["x"+g]=n.widthElements[g]*f}var A=ka(n.d,{mx:i,my:o,e:u});return A}}var Ca=/\{([^{}]+)\}/g,Pa=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function Ta(e,t,r){var n=r;return t.replace(Pa,function(i,o,u,l,f){o=o||l,n&&(o in n&&(n=n[o]),typeof n=="function"&&f&&(n=n()))}),n=(n==null||n==r?e:n)+"",n}function ka(e,t){return String(e).replace(Ca,function(r,n){return Ta(r,n,t)})}var ui={__init__:["bpmnRenderer"],bpmnRenderer:["type",ut],textRenderer:["type",pr],pathMap:["type",nn]};function on(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(r,n){return t[n]||"{"+n+"}"})}var hr={translate:["value",on]};var $t=Math,ac=$t.PI,sc=$t.min,uc=$t.max,lc=$t.pow,cc=$t.abs;function Ma(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function zt(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function li(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function Da(e){return Ma({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function Na(e){for(var t=e.waypoints,r=t.reduce(function(d,g,A){var j=t[A-1];if(j){var $=d[d.length-1],ne=$&&$.endLength||0,V=Ba(j,g);d.push({start:j,end:g,startLength:ne,endLength:ne+V,length:V})}return d},[]),n=r.reduce(function(d,g){return d+g.length},0),i=n/2,o=0,u=r[o];u.endLength<i;)u=r[++o];var l=(i-u.startLength)/u.length,f={x:u.start.x+(u.end.x-u.start.x)*l,y:u.start.y+(u.end.y-u.start.y)*l};return f}function dr(e){return Ln(e)?Na(e):Da(e)}function Ba(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function me(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function mr(e,t,r){return k({id:e.id,type:e.$type,businessObject:e,di:t},r)}function Oa(e,t,r){var n=e.waypoint;return!n||n.length<2?[dr(t),dr(r)]:n.map(function(i){return{x:i.x,y:i.y}})}function ci(e,t,r){return new Error(`element ${me(t)} referenced by ${me(e)}#${r} not yet drawn`)}function Ye(e,t,r,n,i){this._eventBus=e,this._canvas=t,this._elementFactory=r,this._elementRegistry=n,this._textRenderer=i}Ye.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"];Ye.prototype.add=function(e,t,r){var n,i,o;if(D(t,"bpmndi:BPMNPlane")){var u=D(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};n=this._elementFactory.createRoot(mr(e,t,u)),this._canvas.addRootElement(n)}else if(D(t,"bpmndi:BPMNShape")){var l=!at(e,t),f=Ia(e);i=r&&(r.hidden||r.collapsed);var d=t.bounds;n=this._elementFactory.createShape(mr(e,t,{collapsed:l,hidden:i,x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),isFrame:f})),D(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,n),D(e,"bpmn:Lane")&&(o=0),D(e,"bpmn:DataStoreReference")&&(La(r,dr(d))||(r=this._canvas.findRoot(r))),this._canvas.addShape(n,r,o)}else if(D(t,"bpmndi:BPMNEdge")){var g=this._getSource(e),A=this._getTarget(e);i=r&&(r.hidden||r.collapsed),n=this._elementFactory.createConnection(mr(e,t,{hidden:i,source:g,target:A,waypoints:Oa(t,g,A)})),D(e,"bpmn:DataAssociation")&&(r=this._canvas.findRoot(r)),this._canvas.addConnection(n,r,o)}else throw new Error(`unknown di ${me(t)} for element ${me(e)}`);return Fn(e)&&Ct(n)&&this.addLabel(e,t,n),this._eventBus.fire("bpmnElement.added",{element:n}),n};Ye.prototype._attachBoundary=function(e,t){var r=e.attachedToRef;if(!r)throw new Error(`missing ${me(e)}#attachedToRef`);var n=this._elementRegistry.get(r.id),i=n&&n.attachers;if(!n)throw ci(e,r,"attachedToRef");t.host=n,i||(n.attachers=i=[]),i.indexOf(t)===-1&&i.push(t)};Ye.prototype.addLabel=function(e,t,r){var n,i,o;return n=jn(t,r),i=Ct(r),i&&(n=this._textRenderer.getExternalLabelBounds(n,i)),o=this._elementFactory.createLabel(mr(e,t,{id:e.id+"_label",labelTarget:r,type:"label",hidden:r.hidden||!Ct(r),x:Math.round(n.x),y:Math.round(n.y),width:Math.round(n.width),height:Math.round(n.height)})),this._canvas.addShape(o,r.parent)};Ye.prototype._getConnectedElement=function(e,t){var r,n,i=e.$type;if(n=e[t+"Ref"],t==="source"&&i==="bpmn:DataInputAssociation"&&(n=n&&n[0]),(t==="source"&&i==="bpmn:DataOutputAssociation"||t==="target"&&i==="bpmn:DataInputAssociation")&&(n=e.$parent),r=n&&this._getElement(n),r)return r;throw n?ci(e,n,t+"Ref"):new Error(`${me(e)}#${t} Ref not specified`)};Ye.prototype._getSource=function(e){return this._getConnectedElement(e,"source")};Ye.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")};Ye.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};function La(e,t){var r=t.x,n=t.y;return r>=e.x&&r<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function Ia(e){return D(e,"bpmn:Group")}var fi={__depends__:[hr],bpmnImporter:["type",Ye]};var pi={__depends__:[ui,fi]};function bt(e,t){t=!!t,ye(e)||(e=[e]);var r,n,i,o;return R(e,function(u){var l=u;u.waypoints&&!t&&(l=bt(u.waypoints,!0));var f=l.x,d=l.y,g=l.height||0,A=l.width||0;(f<r||r===void 0)&&(r=f),(d<n||n===void 0)&&(n=d),(f+A>i||i===void 0)&&(i=f+A),(d+g>o||o===void 0)&&(o=d+g)}),{x:r,y:n,height:o-n,width:i-r}}function yr(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function gr(e){return!!(e&&e.isFrame)}function vr(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(Math.random()*1e9)+"-"}vr.prototype.next=function(){return this._prefix+ ++this._counter};var Fa=new vr("ov"),ja=500;function pe(e,t,r,n){this._eventBus=t,this._canvas=r,this._elementRegistry=n,this._ids=Fa,this._overlayDefaults=k({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=Va(r.getContainer()),this._init()}pe.$inject=["config.overlays","eventBus","canvas","elementRegistry"];pe.prototype.get=function(e){if(ke(e)&&(e={id:e}),ke(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?Xe(t.overlays,Wr({type:e.type})):t.overlays.slice():[]}else return e.type?Xe(this._overlays,Wr({type:e.type})):e.id?this._overlays[e.id]:null};pe.prototype.add=function(e,t,r){if(Ae(t)&&(r=t,t=null),e.id||(e=this._elementRegistry.get(e)),!r.position)throw new Error("must specifiy overlay position");if(!r.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var n=this._ids.next();return r=k({},this._overlayDefaults,r,{id:n,type:t,element:e,html:r.html}),this._addOverlay(r),n};pe.prototype.remove=function(e){var t=this.get(e)||[];ye(t)||(t=[t]);var r=this;R(t,function(n){var i=r._getOverlayContainer(n.element,!0);if(n&&(Dt(n.html),Dt(n.htmlContainer),delete n.htmlContainer,delete n.element,delete r._overlays[n.id]),i){var o=i.overlays.indexOf(n);o!==-1&&i.overlays.splice(o,1)}})};pe.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"};pe.prototype.show=function(){Er(this._overlayRoot)};pe.prototype.hide=function(){Er(this._overlayRoot,!1)};pe.prototype.clear=function(){this._overlays={},this._overlayContainers=[],ar(this._overlayRoot)};pe.prototype._updateOverlayContainer=function(e){var t=e.element,r=e.html,n=t.x,i=t.y;if(t.waypoints){var o=bt(t);n=o.x,i=o.y}hi(r,n,i),or(e.html,"data-container-id",t.id)};pe.prototype._updateOverlay=function(e){var t=e.position,r=e.htmlContainer,n=e.element,i=t.left,o=t.top;if(t.right!==void 0){var u;n.waypoints?u=bt(n).width:u=n.width,i=t.right*-1+u}if(t.bottom!==void 0){var l;n.waypoints?l=bt(n).height:l=n.height,o=t.bottom*-1+l}hi(r,i||0,o||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())};pe.prototype._createOverlayContainer=function(e){var t=xe('<div class="djs-overlays" />');we(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var r={html:t,element:e,overlays:[]};return this._updateOverlayContainer(r),this._overlayContainers.push(r),r};pe.prototype._updateRoot=function(e){var t=e.scale||1,r="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";di(this._overlayRoot,r)};pe.prototype._getOverlayContainer=function(e,t){var r=he(this._overlayContainers,function(n){return n.element===e});return!r&&!t?this._createOverlayContainer(e):r};pe.prototype._addOverlay=function(e){var t=e.id,r=e.element,n=e.html,i,o;n.get&&n.constructor.prototype.jquery&&(n=n.get(0)),ke(n)&&(n=xe(n)),o=this._getOverlayContainer(r),i=xe('<div class="djs-overlay" data-overlay-id="'+t+'">'),we(i,{position:"absolute"}),i.appendChild(n),e.type&&_t(i).add("djs-overlay-"+e.type);var u=this._canvas.findRoot(r),l=this._canvas.getRootElement();Er(i,u===l),e.htmlContainer=i,o.overlays.push(e),o.html.appendChild(i),this._overlays[t]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())};pe.prototype._updateOverlayVisibilty=function(e,t){var r=e.show,n=this._canvas.findRoot(e.element),i=r&&r.minZoom,o=r&&r.maxZoom,u=e.htmlContainer,l=this._canvas.getRootElement(),f=!0;(n!==l||r&&(Et(i)&&i>t.scale||Et(o)&&o<t.scale))&&(f=!1),Er(u,f),this._updateOverlayScale(e,t)};pe.prototype._updateOverlayScale=function(e,t){var r=e.scale,n,i,o=e.htmlContainer,u,l="";r!==!0&&(r===!1?(n=1,i=1):(n=r.min,i=r.max),Et(n)&&t.scale<n&&(u=(1/t.scale||1)*n),Et(i)&&t.scale>i&&(u=(1/t.scale||1)*i)),Et(u)&&(l="scale("+u+","+u+")"),di(o,l)};pe.prototype._updateOverlaysVisibilty=function(e){var t=this;R(this._overlays,function(r){t._updateOverlayVisibilty(r,e)})};pe.prototype._init=function(){var e=this._eventBus,t=this;function r(n){t._updateRoot(n),t._updateOverlaysVisibilty(n),t.show()}e.on("canvas.viewbox.changing",function(n){t.hide()}),e.on("canvas.viewbox.changed",function(n){r(n.viewbox)}),e.on(["shape.remove","connection.remove"],function(n){var i=n.element,o=t.get({element:i});R(o,function(f){t.remove(f.id)});var u=t._getOverlayContainer(i);if(u){Dt(u.html);var l=t._overlayContainers.indexOf(u);l!==-1&&t._overlayContainers.splice(l,1)}}),e.on("element.changed",ja,function(n){var i=n.element,o=t._getOverlayContainer(i,!0);o&&(R(o.overlays,function(u){t._updateOverlay(u)}),t._updateOverlayContainer(o))}),e.on("element.marker.update",function(n){var i=t._getOverlayContainer(n.element,!0);i&&_t(i.html)[n.add?"add":"remove"](n.marker)}),e.on("root.set",function(){t._updateOverlaysVisibilty(t._canvas.viewbox())}),e.on("diagram.clear",this.clear,this)};function Va(e){var t=xe('<div class="djs-overlay-container" />');return we(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}function hi(e,t,r){we(e,{left:t+"px",top:r+"px"})}function Er(e,t){e.style.display=t===!1?"none":""}function di(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(r){e.style[r+"transform"]=t})}var xr={__init__:["overlays"],overlays:["type",pe]};function wr(e,t,r,n){e.on("element.changed",function(i){var o=i.element;(o.parent||o===t.getRootElement())&&(i.gfx=r.getGraphics(o)),i.gfx&&e.fire(yr(o)+".changed",i)}),e.on("elements.changed",function(i){var o=i.elements;o.forEach(function(u){e.fire("element.changed",{element:u})}),n.updateContainments(o)}),e.on("shape.changed",function(i){n.update("shape",i.element,i.gfx)}),e.on("connection.changed",function(i){n.update("connection",i.element,i.gfx)})}wr.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var mi={__init__:["changeSupport"],changeSupport:["type",wr]};var Wa=1e3;function ge(e){this._eventBus=e}ge.$inject=["eventBus"];function $a(e,t){return function(r){return e.call(t||null,r.context,r.command,r)}}ge.prototype.on=function(e,t,r,n,i,o){if((ot(t)||Te(t))&&(o=i,i=n,n=r,r=t,t=null),ot(r)&&(o=i,i=n,n=r,r=Wa),Ae(i)&&(o=i,i=!1),!ot(n))throw new Error("handlerFn must be a function");ye(e)||(e=[e]);var u=this._eventBus;R(e,function(l){var f=["commandStack",l,t].filter(function(d){return d}).join(".");u.on(f,r,i?$a(n,o):n,o)})};ge.prototype.canExecute=lt("canExecute");ge.prototype.preExecute=lt("preExecute");ge.prototype.preExecuted=lt("preExecuted");ge.prototype.execute=lt("execute");ge.prototype.executed=lt("executed");ge.prototype.postExecute=lt("postExecute");ge.prototype.postExecuted=lt("postExecuted");ge.prototype.revert=lt("revert");ge.prototype.reverted=lt("reverted");function lt(e){return function(r,n,i,o,u){(ot(r)||Te(r))&&(u=o,o=i,i=n,n=r,r=null),this.on(r,e,n,i,o,u)}}function Ht(e,t){t.invoke(ge,this),this.executed(function(r){var n=r.context;n.rootElement?e.setRootElement(n.rootElement):n.rootElement=e.getRootElement()}),this.revert(function(r){var n=r.context;n.rootElement&&e.setRootElement(n.rootElement)})}Ee(Ht,ge);Ht.$inject=["canvas","injector"];var yi={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",Ht]};var za={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function gi(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return za[t]})}var Ha="_plane";function Ut(e){var t=e.id;return D(e,"bpmn:SubProcess")?Ua(t):t}function Ua(e){return e+Ha}var qa="bjs-breadcrumbs-shown";function _r(e,t,r){var n=xe('<ul class="bjs-breadcrumbs"></ul>'),i=r.getContainer(),o=_t(i);i.appendChild(n);var u=[];e.on("element.changed",function(f){var d=f.element,g=re(d),A=he(u,function(j){return j===g});A&&l()});function l(f){f&&(u=Ka(f));var d=u.flatMap(function(A){var j=r.findRoot(Ut(A))||r.findRoot(A.id);if(!j&&D(A,"bpmn:Process")){var $=t.find(function(q){var Y=re(q);return Y&&Y.get("processRef")===A});j=$&&r.findRoot($.id)}if(!j)return[];var ne=gi(A.name||A.id),V=xe('<li><span class="bjs-crumb"><a title="'+ne+'">'+ne+"</a></span></li>");return V.addEventListener("click",function(){r.setRootElement(j)}),V});n.innerHTML="";var g=d.length>1;o.toggle(qa,g),d.forEach(function(A){n.appendChild(A)})}e.on("root.set",function(f){l(f.element)})}_r.$inject=["eventBus","elementRegistry","canvas"];function Ka(e){for(var t=re(e),r=[],n=t;n;n=n.$parent)(D(n,"bpmn:SubProcess")||D(n,"bpmn:Process"))&&r.push(n);return r.reverse()}function br(e,t){var r=null,n=new Ya;e.on("root.set",function(i){var o=i.element,u=t.viewbox(),l=n.get(o);if(n.set(r,{x:u.x,y:u.y,zoom:u.scale}),r=o,!(!D(o,"bpmn:SubProcess")&&!l)){l=l||{x:0,y:0,zoom:1};var f=(u.x-l.x)*u.scale,d=(u.y-l.y)*u.scale;(f!==0||d!==0)&&t.scroll({dx:f,dy:d}),l.zoom!==u.scale&&t.zoom(l.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){n.clear(),r=null})}br.$inject=["eventBus","canvas"];function Ya(){this._entries=[],this.set=function(e,t){var r=!1;for(var n in this._entries)if(this._entries[n][0]===e){this._entries[n][1]=t,r=!0;break}r||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 r in this._entries)if(this._entries[r][0]===e){t=r;break}t!==-1&&this._entries.splice(t,1)}}var vi={x:180,y:160};function ct(e,t){this._eventBus=e,this._moddle=t;var r=this;e.on("import.render.start",1500,function(n,i){r._handleImport(i.definitions)})}ct.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach(function(n){!n.plane||!n.plane.bpmnElement||(t._processToDiagramMap[n.plane.bpmnElement.id]=n)});var r=e.diagrams.filter(n=>n.plane).flatMap(n=>t._createNewDiagrams(n.plane));r.forEach(function(n){t._movePlaneElementsToOrigin(n.plane)})}};ct.prototype._createNewDiagrams=function(e){var t=this,r=[],n=[];e.get("planeElement").forEach(function(o){var u=o.bpmnElement;if(u){var l=u.$parent;D(u,"bpmn:SubProcess")&&!o.isExpanded&&r.push(u),Xa(u,e)&&n.push({diElement:o,parent:l})}});var i=[];return r.forEach(function(o){if(!t._processToDiagramMap[o.id]){var u=t._createDiagram(o);t._processToDiagramMap[o.id]=u,i.push(u)}}),n.forEach(function(o){for(var u=o.diElement,l=o.parent;l&&r.indexOf(l)===-1;)l=l.$parent;if(l){var f=t._processToDiagramMap[l.id];t._moveToDiPlane(u,f.plane)}}),i};ct.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),r=Ga(e),n={x:r.x-vi.x,y:r.y-vi.y};t.forEach(function(i){i.waypoint?i.waypoint.forEach(function(o){o.x=o.x-n.x,o.y=o.y-n.y}):i.bounds&&(i.bounds.x=i.bounds.x-n.x,i.bounds.y=i.bounds.y-n.y)})};ct.prototype._moveToDiPlane=function(e,t){var r=Ei(e),n=r.plane.get("planeElement");n.splice(n.indexOf(e),1),t.get("planeElement").push(e)};ct.prototype._createDiagram=function(e){var t=this._moddle.create("bpmndi:BPMNPlane",{bpmnElement:e}),r=this._moddle.create("bpmndi:BPMNDiagram",{plane:t});return t.$parent=r,t.bpmnElement=e,r.$parent=this._definitions,this._definitions.diagrams.push(r),r};ct.$inject=["eventBus","moddle"];function Ei(e){return D(e,"bpmndi:BPMNDiagram")?e:Ei(e.$parent)}function Ga(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach(function(r){if(r.bounds){var n=zt(r.bounds);t.top=Math.min(n.top,t.top),t.left=Math.min(n.left,t.left)}}),li(t)}function Xa(e,t){var r=e.$parent;return!(!D(r,"bpmn:SubProcess")||r===t.bpmnElement||Bn(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var Ar=250,Za='<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>',Qa="bjs-drilldown-empty";function Je(e,t,r,n,i){ge.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=r,this._overlays=n,this._translate=i;var o=this;this.executed("shape.toggleCollapse",Ar,function(u){var l=u.shape;o._canDrillDown(l)?o._addOverlay(l):o._removeOverlay(l)},!0),this.reverted("shape.toggleCollapse",Ar,function(u){var l=u.shape;o._canDrillDown(l)?o._addOverlay(l):o._removeOverlay(l)},!0),this.executed(["shape.create","shape.move","shape.delete"],Ar,function(u){var l=u.oldParent,f=u.newParent||u.parent,d=u.shape;o._canDrillDown(d)&&o._addOverlay(d),o._updateDrilldownOverlay(l),o._updateDrilldownOverlay(f),o._updateDrilldownOverlay(d)},!0),this.reverted(["shape.create","shape.move","shape.delete"],Ar,function(u){var l=u.oldParent,f=u.newParent||u.parent,d=u.shape;o._canDrillDown(d)&&o._addOverlay(d),o._updateDrilldownOverlay(l),o._updateDrilldownOverlay(f),o._updateDrilldownOverlay(d)},!0),t.on("import.render.complete",function(){r.filter(function(u){return o._canDrillDown(u)}).map(function(u){o._addOverlay(u)})})}Ee(Je,ge);Je.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var r=t.findRoot(e);r&&this._updateOverlayVisibility(r)}};Je.prototype._canDrillDown=function(e){var t=this._canvas;return D(e,"bpmn:SubProcess")&&t.findRoot(Ut(e))};Je.prototype._updateOverlayVisibility=function(e){var t=this._overlays,r=re(e),n=t.get({element:r.id,type:"drilldown"})[0];if(n){var i=r&&r.get("flowElements")&&r.get("flowElements").length;_t(n.html).toggle(Qa,!i)}};Je.prototype._addOverlay=function(e){var t=this._canvas,r=this._overlays,n=re(e),i=r.get({element:e,type:"drilldown"});i.length&&this._removeOverlay(e);var o=xe('<button type="button" class="bjs-drilldown">'+Za+"</button>"),u=n.get("name")||n.get("id"),l=this._translate("Open {element}",{element:u});o.setAttribute("title",l),o.addEventListener("click",function(){t.setRootElement(t.findRoot(Ut(e)))}),r.add(e,"drilldown",{position:{bottom:-7,right:-8},html:o}),this._updateOverlayVisibility(e)};Je.prototype._removeOverlay=function(e){var t=this._overlays;t.remove({element:e,type:"drilldown"})};Je.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];var xi={__depends__:[xr,mi,yi],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",_r],drilldownCentering:["type",br],drilldownOverlayBehavior:["type",Je],subprocessCompatibility:["type",ct]};function an(e){return e.originalEvent||e.srcEvent}function wi(e,t){return(an(e)||e).button===t}function Ot(e){return wi(e,0)}function _i(e){return wi(e,1)}function bi(e){var t=an(e)||e;return Ot(e)&&t.shiftKey}function Ja(e){return!0}function Sr(e){return Ot(e)||_i(e)}var Ai=500;function Rr(e,t,r){var n=this;function i(v,T,b){if(!l(v,T)){var B,M,N;b?M=t.getGraphics(b):(B=T.delegateTarget||T.target,B&&(M=B,b=t.get(M))),!(!M||!b)&&(N=e.fire(v,{element:b,gfx:M,originalEvent:T}),N===!1&&(T.stopPropagation(),T.preventDefault()))}}var o={};function u(v){return o[v]}function l(v,T){var b=d[v]||Ot;return!b(T)}var f={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},d={"element.contextmenu":Ja,"element.mousedown":Sr,"element.mouseup":Sr,"element.click":Sr,"element.dblclick":Sr};function g(v,T,b){var B=f[v];if(!B)throw new Error("unmapped DOM event name <"+v+">");return i(B,T,b)}var A="svg, .djs-element";function j(v,T,b,B){var M=o[b]=function(N){i(b,N)};B&&(d[b]=B),M.$delegate=Wt.bind(v,A,T,M)}function $(v,T,b){var B=u(b);B&&Wt.unbind(v,T,B.$delegate)}function ne(v){R(f,function(T,b){j(v,b,T)})}function V(v){R(f,function(T,b){$(v,b,T)})}e.on("canvas.destroy",function(v){V(v.svg)}),e.on("canvas.init",function(v){ne(v.svg)}),e.on(["shape.added","connection.added"],function(v){var T=v.element,b=v.gfx;e.fire("interactionEvents.createHit",{element:T,gfx:b})}),e.on(["shape.changed","connection.changed"],Ai,function(v){var T=v.element,b=v.gfx;e.fire("interactionEvents.updateHit",{element:T,gfx:b})}),e.on("interactionEvents.createHit",Ai,function(v){var T=v.element,b=v.gfx;n.createDefaultHit(T,b)}),e.on("interactionEvents.updateHit",function(v){var T=v.element,b=v.gfx;n.updateDefaultHit(T,b)});var q=_("djs-hit djs-hit-stroke"),Y=_("djs-hit djs-hit-click-stroke"),Z=_("djs-hit djs-hit-all"),P=_("djs-hit djs-hit-no-move"),m={all:Z,"click-stroke":Y,stroke:q,"no-move":P};function _(v,T){return T=k({stroke:"white",strokeWidth:15},T||{}),r.cls(v,["no-fill","no-border"],T)}function S(v,T){var b=m[T];if(!b)throw new Error("invalid hit type <"+T+">");return Q(v,b),v}function F(v,T){ae(v,T)}this.removeHits=function(v){var T=ni(".djs-hit",v);R(T,xt)},this.createDefaultHit=function(v,T){var b=v.waypoints,B=v.isFrame,M;return b?this.createWaypointsHit(T,b):(M=B?"stroke":"all",this.createBoxHit(T,M,{width:v.width,height:v.height}))},this.createWaypointsHit=function(v,T){var b=Tt(T);return S(b,"stroke"),F(v,b),b},this.createBoxHit=function(v,T,b){b=k({x:0,y:0},b);var B=J("rect");return S(B,T),Q(B,b),F(v,B),B},this.updateDefaultHit=function(v,T){var b=Le(".djs-hit",T);if(b)return v.waypoints?Jr(b,v.waypoints):Q(b,{width:v.width,height:v.height}),b},this.fire=i,this.triggerMouseEvent=g,this.mouseHandler=u,this.registerEvent=j,this.unregisterEvent=$}Rr.$inject=["eventBus","elementRegistry","styles"];var Si={__init__:["interactionEvents"],interactionEvents:["type",Rr]};function dt(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=[];var r=this;e.on(["shape.remove","connection.remove"],function(n){var i=n.element;r.deselect(i)}),e.on(["diagram.clear","root.set"],function(n){r.select(null)})}dt.$inject=["eventBus","canvas"];dt.prototype.deselect=function(e){var t=this._selectedElements,r=t.indexOf(e);if(r!==-1){var n=t.slice();t.splice(r,1),this._eventBus.fire("selection.changed",{oldSelection:n,newSelection:t})}};dt.prototype.get=function(){return this._selectedElements};dt.prototype.isSelected=function(e){return this._selectedElements.indexOf(e)!==-1};dt.prototype.select=function(e,t){var r=this._selectedElements,n=r.slice();ye(e)||(e=e?[e]:[]);var i=this._canvas,o=i.getRootElement();e=e.filter(function(u){var l=i.findRoot(u);return o===l}),t?R(e,function(u){r.indexOf(u)===-1&&r.push(u)}):this._selectedElements=r=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:n,newSelection:r})};var Ri="hover",Ci="selected";function Cr(e,t){this._canvas=e;function r(i,o){e.addMarker(i,o)}function n(i,o){e.removeMarker(i,o)}t.on("element.hover",function(i){r(i.element,Ri)}),t.on("element.out",function(i){n(i.element,Ri)}),t.on("selection.changed",function(i){function o(d){n(d,Ci)}function u(d){r(d,Ci)}var l=i.oldSelection,f=i.newSelection;R(l,function(d){f.indexOf(d)===-1&&o(d)}),R(f,function(d){l.indexOf(d)===-1&&u(d)})})}Cr.$inject=["canvas","eventBus"];function Pr(e,t,r,n){e.on("create.end",500,function(i){var o=i.context,u=o.canExecute,l=o.elements,f=o.hints||{},d=f.autoSelect;if(u){if(d===!1)return;ye(d)?t.select(d):t.select(l.filter(es))}}),e.on("connect.end",500,function(i){var o=i.context,u=o.connection;u&&t.select(u)}),e.on("shape.move.end",500,function(i){var o=i.previousSelection||[],u=n.get(i.context.shape.id),l=he(o,function(f){return u.id===f.id});l||t.select(u)}),e.on("element.click",function(i){if(Ot(i)){var o=i.element;o===r.getRootElement()&&(o=null);var u=t.isSelected(o),l=t.get().length>1,f=bi(i);if(u&&l)return f?t.deselect(o):t.select(o);u?t.deselect(o):t.select(o,f)}})}Pr.$inject=["eventBus","selection","canvas","elementRegistry"];function es(e){return!e.hidden}var Pi={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Si],selection:["type",dt],selectionVisuals:["type",Cr],selectionBehavior:["type",Pr]};var ts=/^class[ {]/;function rs(e){return ts.test(e.toString())}function un(e){return Array.isArray(e)}function sn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Tr(...e){e.length===1&&un(e[0])&&(e=e[0]),e=[...e];let t=e.pop();return t.$inject=e,t}var ns=/constructor\s*[^(]*\(\s*([^)]*)\)/m,is=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,os=/\/\*([^*]*)\*\//m;function as(e){if(typeof e!="function")throw new Error(`Cannot annotate "${e}". Expected a function!`);let t=e.toString().match(rs(e)?ns:is);if(!t)return[];let r=t[1]||t[2];return r&&r.split(",").map(n=>{let i=n.match(os);return(i&&i[1]||n).trim()})||[]}function ln(e,t){let r=t||{get:function(P,m){if(n.push(P),m===!1)return null;throw l(`No provider for "${P}"!`)}},n=[],i=this._providers=Object.create(r._providers||null),o=this._instances=Object.create(null),u=o.injector=this,l=function(P){let m=n.join(" -> ");return n.length=0,new Error(m?`${P} (Resolving: ${m})`:P)};function f(P,m){if(!i[P]&&P.includes(".")){let _=P.split("."),S=f(_.shift());for(;_.length;)S=S[_.shift()];return S}if(sn(o,P))return o[P];if(sn(i,P)){if(n.indexOf(P)!==-1)throw n.push(P),l("Cannot resolve circular dependency!");return n.push(P),o[P]=i[P][0](i[P][1]),n.pop(),o[P]}return r.get(P,m)}function d(P,m){if(typeof m=="undefined"&&(m={}),typeof P!="function")if(un(P))P=Tr(P.slice());else throw l(`Cannot invoke "${P}". Expected a function!`);let S=(P.$inject||as(P)).map(F=>sn(m,F)?m[F]:f(F));return{fn:P,dependencies:S}}function g(P){let{fn:m,dependencies:_}=d(P),S=Function.prototype.bind.call(m,null,..._);return new S}function A(P,m,_){let{fn:S,dependencies:F}=d(P,_);return S.apply(m,F)}function j(P){return Tr(m=>P.get(m))}function $(P,m){if(m&&m.length){let _=Object.create(null),S=Object.create(null),F=[],v=[],T=[],b,B,M,N;for(let H in i)b=i[H],m.indexOf(H)!==-1&&(b[2]==="private"?(B=F.indexOf(b[3]),B===-1?(M=b[3].createChild([],m),N=j(M),F.push(b[3]),v.push(M),T.push(N),_[H]=[N,H,"private",M]):_[H]=[T[B],H,"private",v[B]]):_[H]=[b[2],b[1]],S[H]=!0),(b[2]==="factory"||b[2]==="type")&&b[1].$scope&&m.forEach(Ge=>{b[1].$scope.indexOf(Ge)!==-1&&(_[H]=[b[2],b[1]],S[Ge]=!0)});m.forEach(H=>{if(!S[H])throw new Error('No provider for "'+H+'". Cannot use provider from the parent!')}),P.unshift(_)}return new ln(P,u)}let ne={factory:A,type:g,value:function(P){return P}};function V(P,m){let _=P.__init__||[];return function(){_.forEach(S=>{typeof S=="string"?m.get(S):m.invoke(S)})}}function q(P){let m=P.__exports__;if(m){let _=P.__modules__,S=Object.keys(P).reduce((B,M)=>(M!=="__exports__"&&M!=="__modules__"&&M!=="__init__"&&M!=="__depends__"&&(B[M]=P[M]),B),Object.create(null)),F=(_||[]).concat(S),v=$(F),T=Tr(function(B){return v.get(B)});m.forEach(function(B){i[B]=[T,B,"private",v]});let b=(P.__init__||[]).slice();return b.unshift(function(){v.init()}),P=Object.assign({},P,{__init__:b}),V(P,v)}return Object.keys(P).forEach(function(_){if(_==="__init__"||_==="__depends__")return;let S=P[_];if(S[2]==="private"){i[_]=S;return}let F=S[0],v=S[1];i[_]=[ne[F],ss(F,v),F]}),V(P,u)}function Y(P,m){return P.indexOf(m)!==-1||(P=(m.__depends__||[]).reduce(Y,P),P.indexOf(m)!==-1)?P:P.concat(m)}function Z(P){let m=P.reduce(Y,[]).map(q),_=!1;return function(){_||(_=!0,m.forEach(S=>S()))}}this.get=f,this.invoke=A,this.instantiate=g,this.createChild=$,this.init=Z(e)}function ss(e,t){return e!=="value"&&un(t)&&(t=Tr(t.slice())),t}var us=1;function et(e,t){We.call(this,e,us),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})}Ee(et,We);et.prototype.canRender=function(){return!0};et.prototype.drawShape=function(t,r,n){var i=J("rect");return Q(i,{x:0,y:0,width:r.width||0,height:r.height||0}),gr(r)?Q(i,k({},this.FRAME_STYLE,n||{})):Q(i,k({},this.SHAPE_STYLE,n||{})),ae(t,i),i};et.prototype.drawConnection=function(t,r,n){var i=Tt(r.waypoints,k({},this.CONNECTION_STYLE,n||{}));return ae(t,i),i};et.prototype.getShapePath=function(t){var r=t.x,n=t.y,i=t.width,o=t.height,u=[["M",r,n],["l",i,0],["l",0,o],["l",-i,0],["z"]];return st(u)};et.prototype.getConnectionPath=function(t){var r=t.waypoints,n,i,o=[];for(n=0;i=r[n];n++)i=i.original||i,o.push([n===0?"M":"L",i.x,i.y]);return st(o)};et.$inject=["eventBus","styles"];function cn(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(r,n,i){var o=this.style(n,i);return k(o,{class:r})},this.style=function(r,n){!ye(r)&&!n&&(n=r,r=[]);var i=Ze(r,function(o,u){return k(o,e[u]||{})},{});return n?k(i,n):i},this.computeStyle=function(r,n,i){return ye(n)||(i=n,n=[]),t.style(n||[],k({},i,r||{}))}}var Ti={__init__:["defaultRenderer"],defaultRenderer:["type",et],styles:["type",cn]};function ki(e,t){if(!e||!t)return-1;var r=e.indexOf(t);return r!==-1&&e.splice(r,1),r}function Mi(e,t,r){if(!(!e||!t)){typeof r!="number"&&(r=-1);var n=e.indexOf(t);if(n!==-1){if(n===r)return;if(r!==-1)e.splice(n,1);else return}r!==-1?e.splice(r,0,t):e.push(t)}}function kr(e,t){return Math.round(e*t)/t}function Di(e){return Te(e)?e+"px":e}function ls(e){for(;e.parent;)e=e.parent;return e}function cs(e){e=k({},{width:"100%",height:"100%"},e);let t=e.container||document.body,r=document.createElement("div");return r.setAttribute("class","djs-container djs-parent"),we(r,{position:"relative",overflow:"hidden",width:Di(e.width),height:Di(e.height)}),t.appendChild(r),r}function Ni(e,t,r){let n=J("g");Be(n).add(t);let i=r!==void 0?r:e.childNodes.length-1;return e.insertBefore(n,e.childNodes[i]||null),n}var fs="base",Bi=0,ps=1,hs={shape:["x","y","width","height"],connection:["waypoints"]};function I(e,t,r,n){this._eventBus=t,this._elementRegistry=n,this._graphicsFactory=r,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}I.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"];I.prototype._init=function(e){let t=this._eventBus,r=this._container=cs(e),n=this._svg=J("svg");Q(n,{width:"100%",height:"100%"}),or(n,"tabindex",0),e.autoFocus&&t.on("element.hover",()=>{this.restoreFocus()}),t.on("element.mousedown",500,o=>{this.focus()}),n.addEventListener("focusin",()=>{this._setFocused(!0)}),n.addEventListener("focusout",()=>{this._setFocused(!1)}),n.addEventListener("mouseover",()=>{this._eventBus.fire("canvas.mouseover")}),n.addEventListener("mouseout",()=>{this._eventBus.fire("canvas.mouseout")}),ae(r,n);let i=this._viewport=Ni(n,"viewport");e.deferUpdate&&(this._viewboxChanged=kn(qe(this._viewboxChanged,this),300)),t.on("diagram.init",()=>{t.fire("canvas.init",{svg:n,viewport:i})}),t.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","root.set"],()=>{delete this._cachedViewbox}),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)};I.prototype._destroy=function(){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});let e=this._container.parentNode;e&&e.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._rootElement,delete this._viewport};I.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))};I.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{let r=yr(t);r==="root"?this.removeRootElement(t):this._removeElement(t,r)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox};I.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)};I.prototype.restoreFocus=function(){document.activeElement===document.body&&this.focus()};I.prototype.isFocused=function(){return this._focused};I.prototype.getDefaultLayer=function(){return this.getLayer(fs,Bi)};I.prototype.getLayer=function(e,t){if(!e)throw new Error("must specify a name");let r=this._layers[e];if(r||(r=this._layers[e]=this._createLayer(e,t)),typeof t!="undefined"&&r.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return r.group};I.prototype._getChildIndex=function(e){return Ze(this._layers,function(t,r){return r.visible&&e>=r.index&&t++,t},0)};I.prototype._createLayer=function(e,t){typeof t=="undefined"&&(t=ps);let r=this._getChildIndex(t);return{group:Ni(this._viewport,"layer-"+e,r),index:t,visible:!0}};I.prototype.showLayer=function(e){if(!e)throw new Error("must specify a name");let t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");let r=this._viewport,n=t.group,i=t.index;if(t.visible)return n;let o=this._getChildIndex(i);return r.insertBefore(n,r.childNodes[o]||null),t.visible=!0,n};I.prototype.hideLayer=function(e){if(!e)throw new Error("must specify a name");let t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");let r=t.group;return t.visible&&(xt(r),t.visible=!1),r};I.prototype._removeLayer=function(e){let t=this._layers[e];t&&(delete this._layers[e],xt(t.group))};I.prototype.getActiveLayer=function(){let e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null};I.prototype.findRoot=function(e){return typeof e=="string"&&(e=this._elementRegistry.get(e)),e?(this._findPlaneForRoot(ls(e))||{}).rootElement:void 0};I.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})};I.prototype._findPlaneForRoot=function(e){return he(this._planes,function(t){return t.rootElement===e})};I.prototype.getContainer=function(){return this._container};I.prototype._updateMarker=function(e,t,r){let n;e.id||(e=this._elementRegistry.get(e)),e.markers=e.markers||new Set,n=this._elementRegistry._elements[e.id],n&&(R([n.gfx,n.secondaryGfx],function(i){i&&(r?(e.markers.add(t),Be(i).add(t)):(e.markers.delete(t),Be(i).remove(t)))}),this._eventBus.fire("element.marker.update",{element:e,gfx:n.gfx,marker:t,add:!!r}))};I.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)};I.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)};I.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),e.markers?e.markers.has(t):!1};I.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)};I.prototype.getRootElement=function(){let e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))};I.prototype.addRootElement=function(e){let t=this._rootsIdx++;e||(e={id:"__implicitroot_"+t,children:[],isImplicit:!0});let r=e.layer="root-"+t;this._ensureValid("root",e);let n=this.getLayer(r,Bi);return this.hideLayer(r),this._addRoot(e,n),this._planes.push({rootElement:e,layer:n}),e};I.prototype.removeRootElement=function(e){if(typeof e=="string"&&(e=this._elementRegistry.get(e)),!!this._findPlaneForRoot(e))return this._removeRoot(e),this._removeLayer(e.layer),this._planes=this._planes.filter(function(r){return r.rootElement!==e}),this._rootElement===e&&(this._rootElement=null),e};I.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};I.prototype._removeRoot=function(e){let t=this._elementRegistry,r=this._eventBus;r.fire("root.remove",{element:e}),r.fire("root.removed",{element:e}),t.remove(e)};I.prototype._addRoot=function(e,t){let r=this._elementRegistry,n=this._eventBus;n.fire("root.add",{element:e}),r.add(e,t),n.fire("root.added",{element:e,gfx:t})};I.prototype._setRoot=function(e,t){let r=this._rootElement;r&&(this._elementRegistry.updateGraphics(r,null,!0),this.hideLayer(r.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})};I.prototype._ensureValid=function(e,t){if(!t.id)throw new Error("element must have an id");if(this._elementRegistry.get(t.id))throw new Error("element <"+t.id+"> already exists");let r=hs[e];if(!Vr(r,function(i){return typeof t[i]!="undefined"}))throw new Error("must supply { "+r.join(", ")+" } with "+e)};I.prototype._setParent=function(e,t,r){Mi(t.children,e,r),e.parent=t};I.prototype._addElement=function(e,t,r,n){r=r||this.getRootElement();let i=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),i.fire(e+".add",{element:t,parent:r}),this._setParent(t,r,n);let u=o.create(e,t,n);return this._elementRegistry.add(t,u),o.update(e,t,u),i.fire(e+".added",{element:t,gfx:u}),t};I.prototype.addShape=function(e,t,r){return this._addElement("shape",e,t,r)};I.prototype.addConnection=function(e,t,r){return this._addElement("connection",e,t,r)};I.prototype._removeElement=function(e,t){let r=this._elementRegistry,n=this._graphicsFactory,i=this._eventBus;if(e=r.get(e.id||e),!!e)return i.fire(t+".remove",{element:e}),n.remove(e),ki(e.parent&&e.parent.children,e),e.parent=null,i.fire(t+".removed",{element:e}),r.remove(e),e};I.prototype.removeShape=function(e){return this._removeElement(e,"shape")};I.prototype.removeConnection=function(e){return this._removeElement(e,"connection")};I.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)};I.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()};I.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})};I.prototype.viewbox=function(e){if(e===void 0&&this._cachedViewbox)return structuredClone(this._cachedViewbox);let t=this._viewport,r=this.getSize(),n,i,o,u,l,f,d;if(e)this._changeViewbox(function(){l=Math.min(r.width/e.width,r.height/e.height);let g=this._svg.createSVGMatrix().scale(l).translate(-e.x,-e.y);wt(t,g)});else return o=this._rootElement?this.getActiveLayer():null,n=o&&o.getBBox()||{},u=wt(t),i=u?u.matrix:Kn(),l=kr(i.a,1e3),f=kr(-i.e||0,1e3),d=kr(-i.f||0,1e3),e=this._cachedViewbox={x:f?f/l:0,y:d?d/l:0,width:r.width/l,height:r.height/l,scale:l,inner:{width:n.width||0,height:n.height||0,x:n.x||0,y:n.y||0},outer:r},e;return e};I.prototype.scroll=function(e){let t=this._viewport,r=t.getCTM();return e&&this._changeViewbox(function(){e=k({dx:0,dy:0},e||{}),r=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(r),Oi(t,r)}),{x:r.e,y:r.f}};I.prototype.scrollToElement=function(e,t){let r=100;typeof e=="string"&&(e=this._elementRegistry.get(e));let n=this.findRoot(e);if(n!==this.getRootElement()&&this.setRootElement(n),n===e)return;t||(t={}),typeof t=="number"&&(r=t),t={top:t.top||r,right:t.right||r,bottom:t.bottom||r,left:t.left||r};let i=bt(e),o=zt(i),u=this.viewbox(),l=this.zoom(),f,d;u.y+=t.top/l,u.x+=t.left/l,u.width-=(t.right+t.left)/l,u.height-=(t.bottom+t.top)/l;let g=zt(u);if(!(i.width<u.width&&i.height<u.height))f=i.x-u.x,d=i.y-u.y;else{let j=Math.max(0,o.right-g.right),$=Math.min(0,o.left-g.left),ne=Math.max(0,o.bottom-g.bottom),V=Math.min(0,o.top-g.top);f=j||$,d=ne||V}this.scroll({dx:-f*l,dy:-d*l})};I.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if(e==="fit-viewport")return this._fitViewport(t);let r,n;return this._changeViewbox(function(){typeof t!="object"&&(r=this.viewbox().outer,t={x:r.width/2,y:r.height/2}),n=this._setZoom(e,t)}),kr(n.a,1e3)};function Oi(e,t){let r="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",r)}I.prototype._fitViewport=function(e){let t=this.viewbox(),r=t.outer,n=t.inner,i,o;return n.x>=0&&n.y>=0&&n.x+n.width<=r.width&&n.y+n.height<=r.height&&!e?o={x:0,y:0,width:Math.max(n.width+n.x,r.width),height:Math.max(n.height+n.y,r.height)}:(i=Math.min(1,r.width/n.width,r.height/n.height),o={x:n.x+(e?n.width/2-r.width/i/2:0),y:n.y+(e?n.height/2-r.height/i/2:0),width:r.width/i,height:r.height/i}),this.viewbox(o),this.viewbox(!1).scale};I.prototype._setZoom=function(e,t){let r=this._svg,n=this._viewport,i=r.createSVGMatrix(),o=r.createSVGPoint(),u,l,f,d,g;f=n.getCTM();let A=f.a;return t?(u=k(o,t),l=u.matrixTransform(f.inverse()),d=i.translate(l.x,l.y).scale(1/A*e).translate(-l.x,-l.y),g=f.multiply(d)):g=i.scale(e),Oi(this._viewport,g),g};I.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}};I.prototype.getAbsoluteBBox=function(e){let t=this.viewbox(),r;e.waypoints?r=this.getGraphics(e).getBBox():r=e;let n=r.x*t.scale-t.x*t.scale,i=r.y*t.scale-t.y*t.scale,o=r.width*t.scale,u=r.height*t.scale;return{x:n,y:i,width:o,height:u}};I.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Lt="data-element-id";function Re(e){this._elements={},this._eventBus=e}Re.$inject=["eventBus"];Re.prototype.add=function(e,t,r){var n=e.id;this._validateId(n),Q(t,Lt,n),r&&Q(r,Lt,n),this._elements[n]={element:e,gfx:t,secondaryGfx:r}};Re.prototype.remove=function(e){var t=this._elements,r=e.id||e,n=r&&t[r];n&&(Q(n.gfx,Lt,""),n.secondaryGfx&&Q(n.secondaryGfx,Lt,""),delete t[r])};Re.prototype.updateId=function(e,t){this._validateId(t),typeof e=="string"&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t});var r=this.getGraphics(e),n=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,r,n)};Re.prototype.updateGraphics=function(e,t,r){var n=e.id||e,i=this._elements[n];return r?i.secondaryGfx=t:i.gfx=t,t&&Q(t,Lt,n),t};Re.prototype.get=function(e){var t;typeof e=="string"?t=e:t=e&&Q(e,Lt);var r=this._elements[t];return r&&r.element};Re.prototype.filter=function(e){var t=[];return this.forEach(function(r,n){e(r,n)&&t.push(r)}),t};Re.prototype.find=function(e){for(var t=this._elements,r=Object.keys(t),n=0;n<r.length;n++){var i=r[n],o=t[i],u=o.element,l=o.gfx;if(e(u,l))return u}};Re.prototype.getAll=function(){return this.filter(function(e){return e})};Re.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach(function(r){var n=t[r],i=n.element,o=n.gfx;return e(i,o)})};Re.prototype.getGraphics=function(e,t){var r=e.id||e,n=this._elements[r];return n&&(t?n.secondaryGfx:n.gfx)};Re.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")};function ds(e,t,r,n){var i=r.inverse;return Object.defineProperty(e,"remove",{value:function(o){var u=this.indexOf(o);return u!==-1&&(this.splice(u,1),t.unset(o,i,n)),o}}),Object.defineProperty(e,"contains",{value:function(o){return this.indexOf(o)!==-1}}),Object.defineProperty(e,"add",{value:function(o,u){var l=this.indexOf(o);if(typeof u=="undefined"){if(l!==-1)return;u=this.length}l!==-1&&this.splice(l,1),this.splice(u,0,o),l===-1&&t.set(o,i,n)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}function ms(e){return e.__refs_collection===!0}function ys(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function Li(e,t,r){var n=ds(r[t.name]||[],e,t,r);Object.defineProperty(r,t.name,{enumerable:t.enumerable,value:n}),n.length&&n.forEach(function(i){e.set(i,t.inverse,r)})}function gs(e,t,r){var n=t.inverse,i=r[t.name];Object.defineProperty(r,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return i},set:function(o){if(o!==i){var u=i;i=null,u&&e.unset(u,n,r),i=o,e.set(i,n,r)}}})}function Ie(e,t){if(!(this instanceof Ie))return new Ie(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Ie.prototype.bind=function(e,t){if(typeof t=="string"){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?Li(this,t,e):gs(this,t,e)};Ie.prototype.ensureRefsCollection=function(e,t){var r=e[t.name];return ms(r)||Li(this,t,e),r};Ie.prototype.ensureBound=function(e,t){ys(e,t)||this.bind(e,t)};Ie.prototype.unset=function(e,t,r){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(r):e[t.name]=void 0)};Ie.prototype.set=function(e,t,r){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(r):e[t.name]=r)};var fn=new Ie({name:"children",enumerable:!0,collection:!0},{name:"parent"}),Fi=new Ie({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Ii=new Ie({name:"attachers",collection:!0},{name:"host"}),ji=new Ie({name:"outgoing",collection:!0},{name:"source"}),Vi=new Ie({name:"incoming",collection:!0},{name:"target"});function qt(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(e){var t=this.label,r=this.labels;!e&&t?r.remove(t):r.add(e,0)}}),fn.bind(this,"parent"),Fi.bind(this,"labels"),ji.bind(this,"outgoing"),Vi.bind(this,"incoming")}function Kt(){qt.call(this),fn.bind(this,"children"),Ii.bind(this,"host"),Ii.bind(this,"attachers")}Ee(Kt,qt);function Wi(){qt.call(this),fn.bind(this,"children")}Ee(Wi,Kt);function $i(){Kt.call(this),Fi.bind(this,"labelTarget")}Ee($i,Kt);function zi(){qt.call(this),ji.bind(this,"source"),Vi.bind(this,"target")}Ee(zi,qt);var vs={connection:zi,shape:Kt,label:$i,root:Wi};function Hi(e,t){var r=vs[e];if(!r)throw new Error("unknown type: <"+e+">");return k(new r,t)}function mt(){this._uid=12}mt.prototype.createRoot=function(e){return this.create("root",e)};mt.prototype.createLabel=function(e){return this.create("label",e)};mt.prototype.createShape=function(e){return this.create("shape",e)};mt.prototype.createConnection=function(e){return this.create("connection",e)};mt.prototype.create=function(e,t){return t=k({},t||{}),t.id||(t.id=e+"_"+this._uid++),Hi(e,t)};var Mr="__fn",Ui=1e3,Es=Array.prototype.slice;function _e(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}_e.prototype.on=function(e,t,r,n){if(e=ye(e)?e:[e],ot(t)&&(n=r,r=t,t=Ui),!Te(t))throw new Error("priority must be a number");var i=r;n&&(i=qe(r,n),i[Mr]=r[Mr]||r);var o=this;e.forEach(function(u){o._addListener(u,{priority:t,callback:i,next:null})})};_e.prototype.once=function(e,t,r,n){var i=this;if(ot(t)&&(n=r,r=t,t=Ui),!Te(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var u=r.apply(n,arguments);return i.off(e,o),u}o[Mr]=r,this.on(e,t,o)};_e.prototype.off=function(e,t){e=ye(e)?e:[e];var r=this;e.forEach(function(n){r._removeListener(n,t)})};_e.prototype.createEvent=function(e){var t=new Yt;return t.init(e),t};_e.prototype.fire=function(e,t){var r,n,i,o;if(o=Es.call(arguments),typeof e=="object"&&(t=e,e=t.type),!e)throw new Error("no event type specified");if(n=this._listeners[e],!!n){t instanceof Yt?r=t:r=this.createEvent(t),o[0]=r;var u=r.type;e!==u&&(r.type=e);try{i=this._invokeListeners(r,o,n)}finally{e!==u&&(r.type=u)}return i===void 0&&r.defaultPrevented&&(i=!1),i}};_e.prototype.handleError=function(e){return this.fire("error",{error:e})===!1};_e.prototype._destroy=function(){this._listeners={}};_e.prototype._invokeListeners=function(e,t,r){for(var n;r&&!e.cancelBubble;)n=this._invokeListener(e,t,r),r=r.next;return n};_e.prototype._invokeListener=function(e,t,r){var n;if(r.callback.__isTomb)return n;try{n=xs(r.callback,t),n!==void 0&&(e.returnValue=n,e.stopPropagation()),n===!1&&e.preventDefault()}catch(i){if(!this.handleError(i))throw console.error("unhandled error in event listener",i),i}return n};_e.prototype._addListener=function(e,t){var r=this._getListeners(e),n;if(!r){this._setListeners(e,t);return}for(;r;){if(r.priority<t.priority){t.next=r,n?n.next=t:this._setListeners(e,t);return}n=r,r=r.next}n.next=t};_e.prototype._getListeners=function(e){return this._listeners[e]};_e.prototype._setListeners=function(e,t){this._listeners[e]=t};_e.prototype._removeListener=function(e,t){var r=this._getListeners(e),n,i,o;if(!t){this._setListeners(e,null);return}for(;r;)n=r.next,o=r.callback,(o===t||o[Mr]===t)&&(i?i.next=n:this._setListeners(e,n)),i=r,r=n};function Yt(){}Yt.prototype.stopPropagation=function(){this.cancelBubble=!0};Yt.prototype.preventDefault=function(){this.defaultPrevented=!0};Yt.prototype.init=function(e){k(this,e||{})};function xs(e,t){return e.apply(null,t)}function qi(e){return e.childNodes[0]}function Ki(e){return e.parentNode.childNodes[1]}function Ce(e,t){this._eventBus=e,this._elementRegistry=t}Ce.$inject=["eventBus","elementRegistry"];Ce.prototype._getChildrenContainer=function(e){var t=this._elementRegistry.getGraphics(e),r;return e.parent?(r=Ki(t),r||(r=J("g"),Be(r).add("djs-children"),ae(t.parentNode,r))):r=t,r};Ce.prototype._clear=function(e){var t=qi(e);return ar(t),t};Ce.prototype._createContainer=function(e,t,r,n){var i=J("g");Be(i).add("djs-group"),typeof r!="undefined"?Yi(i,t,t.childNodes[r]):ae(t,i);var o=J("g");Be(o).add("djs-element"),Be(o).add("djs-"+e),n&&Be(o).add("djs-frame"),ae(i,o);var u=J("g");return Be(u).add("djs-visual"),ae(o,u),o};Ce.prototype.create=function(e,t,r){var n=this._getChildrenContainer(t.parent);return this._createContainer(e,n,r,gr(t))};Ce.prototype.updateContainments=function(e){var t=this,r=this._elementRegistry,n;n=Ze(e,function(i,o){return o.parent&&(i[o.parent.id]=o.parent),i},{}),R(n,function(i){var o=i.children;if(o){var u=t._getChildrenContainer(i);R(o.slice().reverse(),function(l){var f=r.getGraphics(l);Yi(f.parentNode,u)})}})};Ce.prototype.drawShape=function(e,t,r={}){var n=this._eventBus;return n.fire("render.shape",{gfx:e,element:t,attrs:r})};Ce.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)};Ce.prototype.drawConnection=function(e,t,r={}){var n=this._eventBus;return n.fire("render.connection",{gfx:e,element:t,attrs:r})};Ce.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)};Ce.prototype.update=function(e,t,r){if(t.parent){var n=this._clear(r);if(e==="shape")this.drawShape(n,t),lr(r,t.x,t.y);else if(e==="connection")this.drawConnection(n,t);else throw new Error("unknown type: "+e);t.hidden?Q(r,"display","none"):Q(r,"display","block")}};Ce.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);xt(t.parentNode)};function Yi(e,t,r){var n=r||t.firstChild;e!==n&&t.insertBefore(e,n)}var Gi={__depends__:[Ti],__init__:["canvas"],canvas:["type",I],elementRegistry:["type",Re],elementFactory:["type",mt],eventBus:["type",_e],graphicsFactory:["type",Ce]};function ws(e){var t=new ln(e);return t.init(),t}function _s(e){e=e||{};var t={config:["value",e]},r=[t,Gi].concat(e.modules||[]);return ws(r)}function tt(e,t){this._injector=t||_s(e),this.get("eventBus").fire("diagram.init")}tt.prototype.get=function(e,t){return this._injector.get(e,t)};tt.prototype.invoke=function(e,t,r){return this._injector.invoke(e,t,r)};tt.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")};tt.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};function dn(){}dn.prototype.get=function(e){return this.$model.properties.get(this,e)};dn.prototype.set=function(e,t){this.$model.properties.set(this,e,t)};function Zi(e,t){this.model=e,this.properties=t}Zi.prototype.createType=function(e){var t=this.model,r=this.properties,n=Object.create(dn.prototype);R(e.properties,function(u){!u.isMany&&u.default!==void 0&&(n[u.name]=u.default)}),r.defineModel(n,t),r.defineDescriptor(n,e);var i=e.ns.name;function o(u){r.define(this,"$type",{value:i,enumerable:!0}),r.define(this,"$attrs",{value:{}}),r.define(this,"$parent",{writable:!0}),R(u,qe(function(l,f){this.set(f,l)},this))}return o.prototype=n,o.hasType=n.$instanceOf=this.model.hasType,r.defineModel(o,t),r.defineDescriptor(o,e),o};var bs={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},Qi={String:function(e){return e},Boolean:function(e){return e==="true"},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function Dr(e,t){var r=Qi[e];return r?r(t):t}function pn(e){return!!bs[e]}function mn(e){return!!Qi[e]}function ve(e,t){var r=e.split(/:/),n,i;if(r.length===1)n=e,i=t;else if(r.length===2)n=r[1],i=r[0];else throw new Error("expected <prefix:localName> or <localName>, got "+e);return e=(i?i+":":"")+n,{name:e,prefix:i,localName:n}}function Fe(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}Fe.prototype.build=function(){return Dn(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])};Fe.prototype.addProperty=function(e,t,r){typeof t=="boolean"&&(r=t,t=void 0),this.addNamedProperty(e,r!==!1);var n=this.properties;t!==void 0?n.splice(t,0,e):n.push(e)};Fe.prototype.replaceProperty=function(e,t,r){var n=e.ns,i=this.properties,o=this.propertiesByName,u=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 l=i.indexOf(e);if(l===-1)throw new Error("property <"+n.name+"> not found in property list");i.splice(l,1),this.addProperty(t,r?void 0:l,u),o[n.name]=o[n.localName]=t};Fe.prototype.redefineProperty=function(e,t,r){var n=e.ns.prefix,i=t.split("#"),o=ve(i[0],n),u=ve(i[1],o.prefix).name,l=this.propertiesByName[u];if(l)this.replaceProperty(l,e,r);else throw new Error("refined property <"+u+"> not found");delete e.redefines};Fe.prototype.addNamedProperty=function(e,t){var r=e.ns,n=this.propertiesByName;t&&(this.assertNotDefined(e,r.name),this.assertNotDefined(e,r.localName)),n[r.name]=n[r.localName]=e};Fe.prototype.removeNamedProperty=function(e){var t=e.ns,r=this.propertiesByName;delete r[t.name],delete r[t.localName]};Fe.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};Fe.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};Fe.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)};Fe.prototype.assertNotDefined=function(e,t){var r=e.name,n=this.propertiesByName[r];if(n)throw new Error("property <"+r+"> already defined; override of <"+n.definedBy.ns.name+"#"+n.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")};Fe.prototype.hasProperty=function(e){return this.propertiesByName[e]};Fe.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var r=this.allTypesByName,n=this.allTypes,i=e.name;i in r||(R(e.properties,qe(function(o){o=k({},o,{name:o.ns.localName,inherited:t}),Object.defineProperty(o,"definedBy",{value:e});var u=o.replaces,l=o.redefines;u||l?this.redefineProperty(o,u||l,u):(o.isBody&&this.setBodyProperty(o),o.isId&&this.setIdProperty(o),this.addProperty(o))},this)),n.push(e),r[i]=e)};function yt(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,R(e,qe(this.registerPackage,this))}yt.prototype.getPackage=function(e){return this.packageMap[e]};yt.prototype.getPackages=function(){return this.packages};yt.prototype.registerPackage=function(e){e=k({},e);var t=this.packageMap;Xi(t,e,"prefix"),Xi(t,e,"uri"),R(e.types,qe(function(r){this.registerType(r,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)};yt.prototype.registerType=function(e,t){e=k({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:k(e.meta||{})});var r=ve(e.name,t.prefix),n=r.name,i={};R(e.properties,qe(function(o){var u=ve(o.name,r.prefix),l=u.name;pn(o.type)||(o.type=ve(o.type,u.prefix).name),k(o,{ns:u,name:l}),i[l]=o},this)),k(e,{ns:r,name:n,propertiesByName:i}),R(e.extends,qe(function(o){var u=ve(o,r.prefix),l=this.typeMap[u.name];l.traits=l.traits||[],l.traits.push(n)},this)),this.definePackage(e,t),this.typeMap[n]=e};yt.prototype.mapTypes=function(e,t,r){var n=pn(e.name)?{name:e.name}:this.typeMap[e.name],i=this;function o(f,d){var g=ve(f,pn(f)?"":e.prefix);i.mapTypes(g,t,d)}function u(f){return o(f,!0)}function l(f){return o(f,!1)}if(!n)throw new Error("unknown type <"+e.name+">");R(n.superClass,r?u:l),t(n,!r),R(n.traits,u)};yt.prototype.getEffectiveDescriptor=function(e){var t=ve(e),r=new Fe(t);this.mapTypes(t,function(i,o){r.addTrait(i,o)});var n=r.build();return this.definePackage(n,n.allTypes[n.allTypes.length-1].$pkg),n};yt.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};function Xi(e,t,r){var n=t[r];if(n in e)throw new Error("package with "+r+" <"+n+"> already defined")}function At(e){this.model=e}At.prototype.set=function(e,t,r){if(!ke(t)||!t.length)throw new TypeError("property name must be a non-empty string");var n=this.getProperty(e,t),i=n&&n.name;As(r)?n?delete e[i]:delete e.$attrs[hn(t)]:n?i in e?e[i]=r:Ji(e,n,r):e.$attrs[hn(t)]=r};At.prototype.get=function(e,t){var r=this.getProperty(e,t);if(!r)return e.$attrs[hn(t)];var n=r.name;return!e[n]&&r.isMany&&Ji(e,r,[]),e[n]};At.prototype.define=function(e,t,r){if(!r.writable){var n=r.value;r=k({},r,{get:function(){return n}}),delete r.value}Object.defineProperty(e,t,r)};At.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})};At.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})};At.prototype.getProperty=function(e,t){var r=this.model,n=r.getPropertyDescriptor(e,t);if(n)return n;if(t.includes(":"))return null;let i=r.config.strict;if(typeof i!="undefined"){let o=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(i)throw o;typeof console!="undefined"&&console.warn(o)}return null};function As(e){return typeof e=="undefined"}function Ji(e,t,r){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:r,configurable:!0})}function hn(e){return e.replace(/^:/,"")}function Me(e,t={}){this.properties=new At(this),this.factory=new Zi(this,this.properties),this.registry=new yt(e,this.properties),this.typeCache={},this.config=t}Me.prototype.create=function(e,t){var r=this.getType(e);if(!r)throw new Error("unknown type <"+e+">");return new r(t)};Me.prototype.getType=function(e){var t=this.typeCache,r=ke(e)?e:e.ns.name,n=t[r];return n||(e=this.registry.getEffectiveDescriptor(r),n=t[r]=this.factory.createType(e)),n};Me.prototype.createAny=function(e,t,r){var n=ve(e),i={$type:e,$instanceOf:function(u){return u===this.$type},get:function(u){return this[u]},set:function(u,l){Mn(this,[u],l)}},o={name:e,isGeneric:!0,ns:{prefix:n.prefix,localName:n.localName,uri:t}};return this.properties.defineDescriptor(i,o),this.properties.defineModel(i,this),this.properties.define(i,"get",{enumerable:!1,writable:!0}),this.properties.define(i,"set",{enumerable:!1,writable:!0}),this.properties.define(i,"$parent",{enumerable:!1,writable:!0}),this.properties.define(i,"$instanceOf",{enumerable:!1,writable:!0}),R(r,function(u,l){Ae(u)&&u.value!==void 0?i[u.name]=u.value:i[l]=u}),i};Me.prototype.getPackage=function(e){return this.registry.getPackage(e)};Me.prototype.getPackages=function(){return this.registry.getPackages()};Me.prototype.getElementDescriptor=function(e){return e.$descriptor};Me.prototype.hasType=function(e,t){t===void 0&&(t=e,e=this);var r=e.$model.getElementDescriptor(e);return t in r.allTypesByName};Me.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]};Me.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var eo=String.fromCharCode,Ss=Object.prototype.hasOwnProperty,Rs=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,Gt={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(Gt).forEach(function(e){Gt[e.toUpperCase()]=Gt[e]});function Cs(e,t,r,n){return n?Ss.call(Gt,n)?Gt[n]:"&"+n+";":eo(t||parseInt(r,16))}function St(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(Rs,Cs):e}var to="non-whitespace outside of root node";function It(e){return new Error(e)}function ro(e){return"missing namespace for prefix <"+e+">"}function Nr(e){return{get:e,enumerable:!0}}function Ps(e){var t={},r;for(r in e)t[r]=e[r];return t}function yn(e){return e+"$uri"}function Ts(e){var t={},r,n;for(r in e)n=e[r],t[n]=n,t[yn(n)]=r;return t}function no(){return{line:0,column:0}}function ks(e){throw e}function gn(e){if(!this)return new gn(e);var t=e&&e.proxy,r,n,i,o,u=ks,l,f,d,g,A=no,j=!1,$=!1,ne=null,V=!1,q;function Y(m){m instanceof Error||(m=It(m)),ne=m,u(m,A)}function Z(m){l&&(m instanceof Error||(m=It(m)),l(m,A))}this.on=function(m,_){if(typeof _!="function")throw It("required args <name, cb>");switch(m){case"openTag":n=_;break;case"text":r=_;break;case"closeTag":i=_;break;case"error":u=_;break;case"warn":l=_;break;case"cdata":o=_;break;case"attention":g=_;break;case"question":d=_;break;case"comment":f=_;break;default:throw It("unsupported event: "+m)}return this},this.ns=function(m){if(typeof m=="undefined"&&(m={}),typeof m!="object")throw It("required args <nsMap={}>");var _={},S;for(S in m)_[S]=m[S];return $=!0,q=_,this},this.parse=function(m){if(typeof m!="string")throw It("required args <xml=string>");return ne=null,P(m),A=no,V=!1,ne},this.stop=function(){V=!0};function P(m){var _=$?[]:null,S=$?Ts(q):null,F,v=[],T=0,b=!1,B=!1,M=0,N=0,H,Ge,ie,G,ze,He,le,je,E,x="",L=0,ee;function De(){if(ee!==null)return ee;var s,a,p,h=$&&S.xmlns,y=$&&j?[]:null,w=L,O=x,U=O.length,ce,ue,de,Ve,te,it={},Qt={},Ne,W,X;e:for(;w<U;w++)if(Ne=!1,W=O.charCodeAt(w),!(W===32||W<14&&W>8)){for((W<65||W>122||W>90&&W<97)&&W!==95&&W!==58&&(Z("illegal first char attribute name"),Ne=!0),X=w+1;X<U;X++)if(W=O.charCodeAt(X),!(W>96&&W<123||W>64&&W<91||W>47&&W<59||W===46||W===45||W===95)){if(W===32||W<14&&W>8){Z("missing attribute value"),w=X;continue e}if(W===61)break;Z("illegal attribute name char"),Ne=!0}if(te=O.substring(w,X),te==="xmlns:xmlns"&&(Z("illegal declaration of xmlns"),Ne=!0),W=O.charCodeAt(X+1),W===34)X=O.indexOf('"',w=X+2),X===-1&&(X=O.indexOf("'",w),X!==-1&&(Z("attribute value quote missmatch"),Ne=!0));else if(W===39)X=O.indexOf("'",w=X+2),X===-1&&(X=O.indexOf('"',w),X!==-1&&(Z("attribute value quote missmatch"),Ne=!0));else for(Z("missing attribute value quotes"),Ne=!0,X=X+1;X<U&&(W=O.charCodeAt(X+1),!(W===32||W<14&&W>8));X++);for(X===-1&&(Z("missing closing quotes"),X=U,Ne=!0),Ne||(de=O.substring(w,X)),w=X;X+1<U&&(W=O.charCodeAt(X+1),!(W===32||W<14&&W>8));X++)w===X&&(Z("illegal character after attribute end"),Ne=!0);if(w=X+1,Ne)continue e;if(te in Qt){Z("attribute <"+te+"> already defined");continue}if(Qt[te]=!0,!$){it[te]=de;continue}if(j){if(ue=te==="xmlns"?"xmlns":te.charCodeAt(0)===120&&te.substr(0,6)==="xmlns:"?te.substr(6):null,ue!==null){if(s=St(de),a=yn(ue),Ve=q[s],!Ve){if(ue==="xmlns"||a in S&&S[a]!==s)do Ve="ns"+T++;while(typeof S[Ve]!="undefined");else Ve=ue;q[s]=Ve}S[ue]!==Ve&&(ce||(S=Ps(S),ce=!0),S[ue]=Ve,ue==="xmlns"&&(S[yn(Ve)]=s,h=Ve),S[a]=s),it[te]=de;continue}y.push(te,de);continue}if(W=te.indexOf(":"),W===-1){it[te]=de;continue}if(!(p=S[te.substring(0,W)])){Z(ro(te.substring(0,W)));continue}te=h===p?te.substr(W+1):p+te.substr(W),it[te]=de}if(j)for(w=0,U=y.length;w<U;w++){if(te=y[w++],de=y[w],W=te.indexOf(":"),W!==-1){if(!(p=S[te.substring(0,W)])){Z(ro(te.substring(0,W)));continue}te=h===p?te.substr(W+1):p+te.substr(W)}it[te]=de}return ee=it}function c(){for(var s=/(\r\n|\r|\n)/g,a=0,p=0,h=0,y=N,w,O;M>=h&&(w=s.exec(m),!(!w||(y=w[0].length+w.index,y>M)));)a+=1,h=y;return M==-1?(p=y,O=m.substring(N)):N===0?O=m.substring(N,M):(p=M-h,O=N==-1?m.substring(M):m.substring(M,N+1)),{data:O,line:a,column:p}}for(A=c,t&&(E=Object.create({},{name:Nr(function(){return le}),originalName:Nr(function(){return je}),attrs:Nr(De),ns:Nr(function(){return S})}));N!==-1;){if(m.charCodeAt(N)===60?M=N:M=m.indexOf("<",N),M===-1){if(v.length)return Y("unexpected end of file");if(N===0)return Y("missing start tag");N<m.length&&m.substring(N).trim()&&Z(to);return}if(N!==M){if(v.length){if(r&&(r(m.substring(N,M),St,A),V))return}else if(m.substring(N,M).trim()&&(Z(to),V))return}if(G=m.charCodeAt(M+1),G===33){if(ie=m.charCodeAt(M+2),ie===91&&m.substr(M+3,6)==="CDATA["){if(N=m.indexOf("]]>",M),N===-1)return Y("unclosed cdata");if(o&&(o(m.substring(M+9,N),A),V))return;N+=3;continue}if(ie===45&&m.charCodeAt(M+3)===45){if(N=m.indexOf("-->",M),N===-1)return Y("unclosed comment");if(f&&(f(m.substring(M+4,N),St,A),V))return;N+=3;continue}}if(G===63){if(N=m.indexOf("?>",M),N===-1)return Y("unclosed question");if(d&&(d(m.substring(M,N+2),A),V))return;N+=2;continue}for(H=M+1;;H++){if(ze=m.charCodeAt(H),isNaN(ze))return N=-1,Y("unclosed tag");if(ze===34)ie=m.indexOf('"',H+1),H=ie!==-1?ie:H;else if(ze===39)ie=m.indexOf("'",H+1),H=ie!==-1?ie:H;else if(ze===62){N=H;break}}if(G===33){if(g&&(g(m.substring(M,N+1),St,A),V))return;N+=1;continue}if(ee={},G===47){if(b=!1,B=!0,!v.length)return Y("missing open tag");if(H=le=v.pop(),ie=M+2+H.length,m.substring(M+2,ie)!==H)return Y("closing tag mismatch");for(;ie<N;ie++)if(G=m.charCodeAt(ie),!(G===32||G>8&&G<14))return Y("close tag")}else{if(m.charCodeAt(N-1)===47?(H=le=m.substring(M+1,N-1),b=!0,B=!0):(H=le=m.substring(M+1,N),b=!0,B=!1),!(G>96&&G<123||G>64&&G<91||G===95||G===58))return Y("illegal first char nodeName");for(ie=1,Ge=H.length;ie<Ge;ie++)if(G=H.charCodeAt(ie),!(G>96&&G<123||G>64&&G<91||G>47&&G<59||G===45||G===95||G==46)){if(G===32||G<14&&G>8){le=H.substring(0,ie),ee=null;break}return Y("invalid nodeName")}B||v.push(le)}if($){if(F=S,b&&(B||_.push(F),ee===null&&(j=H.indexOf("xmlns",ie)!==-1)&&(L=ie,x=H,De(),j=!1)),je=le,G=le.indexOf(":"),G!==-1){if(He=S[le.substring(0,G)],!He)return Y("missing namespace on <"+je+">");le=le.substr(G+1)}else He=S.xmlns;He&&(le=He+":"+le)}if(b&&(L=ie,x=H,n&&(t?n(E,St,B,A):n(le,De,St,B,A),V)))return;if(B){if(i&&(i(t?E:le,St,b,A),V))return;$&&(b?S=F:S=_.pop())}N+=1}}}function io(e){return e.xml&&e.xml.tagAlias==="lowerCase"}var vn={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},oo="property";function ao(e){return e.xml&&e.xml.serialize}function Ms(e){let t=ao(e);return t!==oo&&(t||null)}function Ds(e){return e.charAt(0).toUpperCase()+e.slice(1)}function so(e,t){return io(t)?e.prefix+":"+Ds(e.localName):e.name}function Ns(e,t){var r=e.name,n=e.localName,i=t&&t.xml&&t.xml.typePrefix;return i&&n.indexOf(i)===0?e.prefix+":"+n.slice(i.length):r}function Bs(e,t,r){let n=ve(e,t.xmlns),i=`${t[n.prefix]||n.prefix}:${n.localName}`,o=ve(i);var u=r.getPackage(o.prefix);return Ns(o,u)}function gt(e){return new Error(e)}function ft(e){return e.$descriptor}function Os(e){k(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t)},this.addElement=function(t){if(!t)throw gt("expected element");var r=this.elementsById,n=ft(t),i=n.idProperty,o;if(i&&(o=t.get(i.name),o)){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(o))throw new Error("illegal ID <"+o+">");if(r[o])throw gt("duplicate ID <"+o+">");r[o]=t}},this.addWarning=function(t){this.warnings.push(t)}}function Xt(){}Xt.prototype.handleEnd=function(){};Xt.prototype.handleText=function(){};Xt.prototype.handleNode=function(){};function En(){}En.prototype=Object.create(Xt.prototype);En.prototype.handleNode=function(){return this};function jt(){}jt.prototype=Object.create(Xt.prototype);jt.prototype.handleText=function(e){this.body=(this.body||"")+e};function Zt(e,t){this.property=e,this.context=t}Zt.prototype=Object.create(jt.prototype);Zt.prototype.handleNode=function(e){if(this.element)throw gt("expected no sub nodes");return this.element=this.createReference(e),this};Zt.prototype.handleEnd=function(){this.element.id=this.body};Zt.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}};function xn(e,t){this.element=t,this.propertyDesc=e}xn.prototype=Object.create(jt.prototype);xn.prototype.handleEnd=function(){var e=this.body||"",t=this.element,r=this.propertyDesc;e=Dr(r.type,e),r.isMany?t.get(r.name).push(e):t.set(r.name,e)};function Br(){}Br.prototype=Object.create(jt.prototype);Br.prototype.handleNode=function(e){var t=this,r=this.element;return r?t=this.handleChild(e):(r=this.element=this.createElement(e),this.context.addElement(r)),t};function be(e,t,r){this.model=e,this.type=e.getType(t),this.context=r}be.prototype=Object.create(Br.prototype);be.prototype.addReference=function(e){this.context.addReference(e)};be.prototype.handleText=function(e){var t=this.element,r=ft(t),n=r.bodyProperty;if(!n)throw gt("unexpected body text <"+e+">");jt.prototype.handleText.call(this,e)};be.prototype.handleEnd=function(){var e=this.body,t=this.element,r=ft(t),n=r.bodyProperty;n&&e!==void 0&&(e=Dr(n.type,e),t.set(n.name,e))};be.prototype.createElement=function(e){var t=e.attributes,r=this.type,n=ft(r),i=this.context,o=new r({}),u=this.model,l;return R(t,function(f,d){var g=n.propertiesByName[d],A;g&&g.isReference?g.isMany?(A=f.split(" "),R(A,function(j){i.addReference({element:o,property:g.ns.name,id:j})})):i.addReference({element:o,property:g.ns.name,id:f}):(g?f=Dr(g.type,f):d==="xmlns"?d=":"+d:(l=ve(d,n.ns.prefix),u.getPackage(l.prefix)&&i.addWarning({message:"unknown attribute <"+d+">",element:o,property:d,value:f})),o.set(d,f))}),o};be.prototype.getPropertyForNode=function(e){var t=e.name,r=ve(t),n=this.type,i=this.model,o=ft(n),u=r.name,l=o.propertiesByName[u];if(l&&!l.isAttr){let d=Ms(l);if(d){let g=e.attributes[d];if(g){let A=Bs(g,e.ns,i),j=i.getType(A);return k({},l,{effectiveType:ft(j).name})}}return l}var f=i.getPackage(r.prefix);if(f){let d=so(r,f),g=i.getType(d);if(l=he(o.properties,function(A){return!A.isVirtual&&!A.isReference&&!A.isAttribute&&g.hasType(A.type)}),l)return k({},l,{effectiveType:ft(g).name})}else if(l=he(o.properties,function(d){return!d.isReference&&!d.isAttribute&&d.type==="Element"}),l)return l;throw gt("unrecognized element <"+r.name+">")};be.prototype.toString=function(){return"ElementDescriptor["+ft(this.type).name+"]"};be.prototype.valueHandler=function(e,t){return new xn(e,t)};be.prototype.referenceHandler=function(e){return new Zt(e,this.context)};be.prototype.handler=function(e){return e==="Element"?new Ft(this.model,e,this.context):new be(this.model,e,this.context)};be.prototype.handleChild=function(e){var t,r,n,i;if(t=this.getPropertyForNode(e),n=this.element,r=t.effectiveType||t.type,mn(r))return this.valueHandler(t,n);t.isReference?i=this.referenceHandler(t).handleNode(e):i=this.handler(r).handleNode(e);var o=i.element;return o!==void 0&&(t.isMany?n.get(t.name).push(o):n.set(t.name,o),t.isReference?(k(o,{element:n}),this.context.addReference(o)):o.$parent=n),i};function wn(e,t,r){be.call(this,e,t,r)}wn.prototype=Object.create(be.prototype);wn.prototype.createElement=function(e){var t=e.name,r=ve(t),n=this.model,i=this.type,o=n.getPackage(r.prefix),u=o&&so(r,o)||t;if(!i.hasType(u))throw gt("unexpected element <"+e.originalName+">");return be.prototype.createElement.call(this,e)};function Ft(e,t,r){this.model=e,this.context=r}Ft.prototype=Object.create(Br.prototype);Ft.prototype.createElement=function(e){var t=e.name,r=ve(t),n=r.prefix,i=e.ns[n+"$uri"],o=e.attributes;return this.model.createAny(t,i,o)};Ft.prototype.handleChild=function(e){var t=new Ft(this.model,"Element",this.context).handleNode(e),r=this.element,n=t.element,i;return n!==void 0&&(i=r.$children=r.$children||[],i.push(n),n.$parent=r),t};Ft.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)};function Or(e){e instanceof Me&&(e={model:e}),k(this,{lax:!1},e)}Or.prototype.fromXML=function(e,t,r){var n=t.rootHandler;t instanceof be?(n=t,t={}):typeof t=="string"?(n=this.handler(t),t={}):typeof n=="string"&&(n=this.handler(n));var i=this.model,o=this.lax,u=new Os(k({},t,{rootHandler:n})),l=new gn({proxy:!0}),f=Ls();n.context=u,f.push(n);function d(_,S,F){var v=S(),T=v.line,b=v.column,B=v.data;B.charAt(0)==="<"&&B.indexOf(" ")!==-1&&(B=B.slice(0,B.indexOf(" "))+">");var M="unparsable content "+(B?B+" ":"")+`detected
3	line: `+T+`
4	column: `+b+`
5	nested error: `+_.message;if(F)return u.addWarning({message:M,error:_}),!0;throw gt(M)}function g(_,S){return d(_,S,!0)}function A(){var _=u.elementsById,S=u.references,F,v;for(F=0;v=S[F];F++){var T=v.element,b=_[v.id],B=ft(T).propertiesByName[v.property];if(b||u.addWarning({message:"unresolved reference <"+v.id+">",element:v.element,property:v.property,value:v.id}),B.isMany){var M=T.get(B.name),N=M.indexOf(v);N===-1&&(N=M.length),b?M[N]=b:M.splice(N,1)}else T.set(B.name,b)}}function j(){f.pop().handleEnd()}var $=/^<\?xml /i,ne=/ encoding="([^"]+)"/i,V=/^utf-8$/i;function q(_){if($.test(_)){var S=ne.exec(_),F=S&&S[1];!F||V.test(F)||u.addWarning({message:"unsupported document encoding <"+F+">, falling back to UTF-8"})}}function Y(_,S){var F=f.peek();try{f.push(F.handleNode(_))}catch(v){d(v,S,o)&&f.push(new En)}}function Z(_,S){try{f.peek().handleText(_)}catch(F){g(F,S)}}function P(_,S){_.trim()&&Z(_,S)}var m=i.getPackages().reduce(function(_,S){return _[S.uri]=S.prefix,_},Object.entries(vn).reduce(function(_,[S,F]){return _[F]=S,_},i.config&&i.config.nsMap||{}));return l.ns(m).on("openTag",function(_,S,F,v){var T=_.attrs||{},b=Object.keys(T).reduce(function(M,N){var H=S(T[N]);return M[N]=H,M},{}),B={name:_.name,originalName:_.originalName,attributes:b,ns:_.ns};Y(B,v)}).on("question",q).on("closeTag",j).on("cdata",Z).on("text",function(_,S,F){P(S(_),F)}).on("error",d).on("warn",g),new Promise(function(_,S){var F;try{l.parse(e),A()}catch(M){F=M}var v=n.element;!F&&!v&&(F=gt("failed to parse document as <"+n.type.$descriptor.name+">"));var T=u.warnings,b=u.references,B=u.elementsById;return F?(F.warnings=T,S(F)):_({rootElement:v,elementsById:B,references:b,warnings:T})})};Or.prototype.handler=function(e){return new wn(this.model,e)};function Ls(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}var Is=`<?xml version="1.0" encoding="UTF-8"?>
6`,Fs=/<|>|'|"|&|\n\r|\n/g,uo=/<|>|&/g;function rt(e){this.prefixMap={},this.uriMap={},this.used={},this.wellknown=[],this.custom=[],this.parent=e,this.defaultPrefixMap=e&&e.defaultPrefixMap||{}}rt.prototype.mapDefaultPrefixes=function(e){this.defaultPrefixMap=e};rt.prototype.defaultUriByPrefix=function(e){return this.defaultPrefixMap[e]};rt.prototype.byUri=function(e){return this.uriMap[e]||this.parent&&this.parent.byUri(e)};rt.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)};rt.prototype.uriByPrefix=function(e){return this.prefixMap[e||"xmlns"]||this.parent&&this.parent.uriByPrefix(e)};rt.prototype.mapPrefix=function(e,t){this.prefixMap[e||"xmlns"]=t};rt.prototype.getNSKey=function(e){return e.prefix!==void 0?e.uri+"|"+e.prefix:e.uri};rt.prototype.logUsed=function(e){var t=e.uri,r=this.getNSKey(e);this.used[r]=this.byUri(t),this.parent&&this.parent.logUsed(e)};rt.prototype.getUsed=function(e){var t=[].concat(this.wellknown,this.custom);return t.filter(r=>{var n=this.getNSKey(r);return this.used[n]})};function js(e){return e.charAt(0).toLowerCase()+e.slice(1)}function Vs(e,t){return io(t)?js(e):e}function lo(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function co(e){return ke(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function Ws(e){return e.getUsed().filter(function(t){return t.prefix!=="xml"}).map(function(t){var r="xmlns"+(t.prefix?":"+t.prefix:"");return{name:r,value:t.uri}})}function $s(e,t){return t.isGeneric?k({localName:t.ns.localName},e):k({localName:Vs(t.ns.localName,t.$pkg)},e)}function zs(e,t){return k({localName:t.ns.localName},e)}function Hs(e){var t=e.$descriptor;return Xe(t.properties,function(r){var n=r.name;if(r.isVirtual||!Ue(e,n))return!1;var i=e[n];return i===r.default||i===null?!1:r.isMany?i.length:!0})}var Us={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},qs={"<":"lt",">":"gt","&":"amp"};function fo(e,t,r){return e=ke(e)?e:""+e,e.replace(t,function(n){return"&"+r[n]+";"})}function Ks(e){return fo(e,Fs,Us)}function Ys(e){return fo(e,uo,qs)}function Gs(e){return Xe(e,function(t){return t.isAttr})}function Xs(e){return Xe(e,function(t){return!t.isAttr})}function _n(e){this.tagName=e}_n.prototype.build=function(e){return this.element=e,this};_n.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()};function Rt(){}Rt.prototype.serializeValue=Rt.prototype.serializeTo=function(e){e.append(this.escape?Ys(this.value):this.value)};Rt.prototype.build=function(e,t){return this.value=t,e.type==="String"&&t.search(uo)!==-1&&(this.escape=!0),this};function bn(e){this.tagName=e}lo(bn,Rt);bn.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()};function oe(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}oe.prototype.build=function(e){this.element=e;var t=e.$descriptor,r=this.propertyDescriptor,n,i,o=t.isGeneric;return o?n=this.parseGenericNsAttributes(e):n=this.parseNsAttributes(e),r?this.ns=this.nsPropertyTagName(r):this.ns=this.nsTagName(t),this.tagName=this.addTagName(this.ns),o?this.parseGenericContainments(e):(i=Hs(e),this.parseAttributes(Gs(i)),this.parseContainments(Xs(i))),this.parseGenericAttributes(e,n),this};oe.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return $s(t,e)};oe.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return zs(t,e)};oe.prototype.isLocalNs=function(e){return e.uri===this.ns.uri};oe.prototype.nsAttributeName=function(e){var t;if(ke(e)?t=ve(e):t=e.ns,e.inherited)return{localName:t.localName};var r=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(r),this.isLocalNs(r)?{localName:t.localName}:k({localName:t.localName},r)};oe.prototype.parseGenericNsAttributes=function(e){return Object.entries(e).filter(([t,r])=>!t.startsWith("$")&&this.parseNsAttribute(e,t,r)).map(([t,r])=>({name:t,value:r}))};oe.prototype.parseGenericContainments=function(e){var t=e.$body;t&&this.body.push(new Rt().build({type:"String"},t));var r=e.$children;r&&R(r,n=>{this.body.push(new oe(this).build(n))})};oe.prototype.parseNsAttribute=function(e,t,r){var n=e.$model,i=ve(t),o;if(i.prefix==="xmlns"&&(o={prefix:i.localName,uri:r}),!i.prefix&&i.localName==="xmlns"&&(o={uri:r}),!o)return{name:t,value:r};if(n&&n.getPackage(r))this.logNamespace(o,!0,!0);else{var u=this.logNamespaceUsed(o,!0);this.getNamespaces().logUsed(u)}};oe.prototype.parseNsAttributes=function(e){var t=this,r=e.$attrs,n=[];return R(r,function(i,o){var u=t.parseNsAttribute(e,o,i);u&&n.push(u)}),n};oe.prototype.parseGenericAttributes=function(e,t){var r=this;R(t,function(n){try{r.addAttribute(r.nsAttributeName(n.name),n.value)}catch(i){typeof console!="undefined"&&console.warn(`missing namespace information for <${n.name}=${n.value}> on`,e,i)}})};oe.prototype.parseContainments=function(e){var t=this,r=this.body,n=this.element;R(e,function(i){var o=n.get(i.name),u=i.isReference,l=i.isMany;if(l||(o=[o]),i.isBody)r.push(new Rt().build(i,o[0]));else if(mn(i.type))R(o,function(d){r.push(new bn(t.addTagName(t.nsPropertyTagName(i))).build(i,d))});else if(u)R(o,function(d){r.push(new _n(t.addTagName(t.nsPropertyTagName(i))).build(d))});else{var f=ao(i);R(o,function(d){var g;f?f===oo?g=new oe(t,i):g=new Lr(t,i,f):g=new oe(t),r.push(g.build(d))})}})};oe.prototype.getNamespaces=function(e){var t=this.namespaces,r=this.parent,n;return t||(n=r&&r.getNamespaces(),e||!n?this.namespaces=t=new rt(n):t=n),t};oe.prototype.logNamespace=function(e,t,r){var n=this.getNamespaces(r),i=e.uri,o=e.prefix,u=n.byUri(i);return(!u||r)&&n.add(e,t),n.mapPrefix(o,i),e};oe.prototype.logNamespaceUsed=function(e,t){var r=this.getNamespaces(t),n=e.prefix,i=e.uri,o,u,l;if(!n&&!i)return{localName:e.localName};if(l=r.defaultUriByPrefix(n),i=i||l||r.uriByPrefix(n),!i)throw new Error("no namespace uri given for prefix <"+n+">");if(e=r.byUri(i),!e&&!n&&(e=this.logNamespace({uri:i},l===i,!0)),!e){for(o=n,u=1;r.uriByPrefix(o);)o=n+"_"+u++;e=this.logNamespace({prefix:o,uri:i},l===i)}return n&&r.mapPrefix(n,i),e};oe.prototype.parseAttributes=function(e){var t=this,r=this.element;R(e,function(n){var i=r.get(n.name);if(n.isReference)if(!n.isMany)i=i.id;else{var o=[];R(i,function(u){o.push(u.id)}),i=o.join(" ")}t.addAttribute(t.nsAttributeName(n),i)})};oe.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),co(e)};oe.prototype.addAttribute=function(e,t){var r=this.attrs;ke(t)&&(t=Ks(t));var n=Pn(r,function(o){return o.name.localName===e.localName&&o.name.uri===e.uri&&o.name.prefix===e.prefix}),i={name:e,value:t};n!==-1?r.splice(n,1,i):r.push(i)};oe.prototype.serializeAttributes=function(e){var t=this.attrs,r=this.namespaces;r&&(t=Ws(r).concat(t)),R(t,function(n){e.append(" ").append(co(n.name)).append('="').append(n.value).append('"')})};oe.prototype.serializeTo=function(e){var t=this.body[0],r=t&&t.constructor!==Rt;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(r&&e.appendNewLine().indent(),R(this.body,function(n){n.serializeTo(e)}),r&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()};function Lr(e,t,r){oe.call(this,e,t),this.serialization=r}lo(Lr,oe);Lr.prototype.parseNsAttributes=function(e){var t=oe.prototype.parseNsAttributes.call(this,e).filter(u=>u.name!==this.serialization),r=e.$descriptor;if(r.name===this.propertyDescriptor.type)return t;var n=this.typeNs=this.nsTagName(r);this.getNamespaces().logUsed(this.typeNs);var i=e.$model.getPackage(n.uri),o=i.xml&&i.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(this.serialization),(n.prefix?n.prefix+":":"")+o+r.ns.localName),t};Lr.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri};function Zs(){this.value="",this.write=function(e){this.value+=e}}function Qs(e,t){var r=[""];this.append=function(n){return e.write(n),this},this.appendNewLine=function(){return t&&e.write(`
7`),this},this.appendIndent=function(){return t&&e.write(r.join("  ")),this},this.indent=function(){return r.push(""),this},this.unindent=function(){return r.pop(),this}}function po(e){e=k({format:!1,preamble:!0},e||{});function t(r,n){var i=n||new Zs,o=new Qs(i,e.format);e.preamble&&o.append(Is);var u=new oe,l=r.$model;if(u.getNamespaces().mapDefaultPrefixes(Js(l)),u.build(r).serializeTo(o),!n)return i.value}return{toXML:t}}function Js(e){let t=e.config&&e.config.nsMap||{},r={};for(let n in vn)r[n]=vn[n];for(let n in t){let i=t[n];r[i]=n}for(let n of e.getPackages())r[n.prefix]=n.uri;return r}function Ir(e,t){Me.call(this,e,t)}Ir.prototype=Object.create(Me.prototype);Ir.prototype.fromXML=function(e,t,r){ke(t)||(r=t,t="bpmn:Definitions");var n=new Or(k({model:this,lax:!0},r)),i=n.handler(t);return n.fromXML(e,i)};Ir.prototype.toXML=function(e,t){var r=new po(t);return new Promise(function(n,i){try{var o=r.toXML(e);return n({xml:o})}catch(u){return i(u)}})};var eu="BPMN20",tu="http://www.omg.org/spec/BPMN/20100524/MODEL",ru="bpmn",nu=[],iu=[{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",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"}]}],ou=[{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"}]}],au={tagAlias:"lowerCase",typePrefix:"t"},su={name:eu,uri:tu,prefix:ru,associations:nu,types:iu,enumerations:ou,xml:au},uu="BPMNDI",lu="http://www.omg.org/spec/BPMN/20100524/DI",cu="bpmndi",fu=[{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"]}],pu=[{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"}]}],hu=[],du={name:uu,uri:lu,prefix:cu,types:fu,enumerations:pu,associations:hu},mu="DC",yu="http://www.omg.org/spec/DD/20100524/DC",gu="dc",vu=[{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}]}],Eu=[],xu={name:mu,uri:yu,prefix:gu,types:vu,associations:Eu},wu="DI",_u="http://www.omg.org/spec/DD/20100524/DI",bu="di",Au=[{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"}]}],Su=[],Ru={tagAlias:"lowerCase"},Cu={name:wu,uri:_u,prefix:bu,types:Au,associations:Su,xml:Ru},Pu="bpmn.io colors for BPMN",Tu="http://bpmn.io/schema/bpmn/biocolor/1.0",ku="bioc",Mu=[{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"}]}],Du=[],Nu=[],Bu={name:Pu,uri:Tu,prefix:ku,types:Mu,enumerations:Du,associations:Nu},Ou="BPMN in Color",Lu="http://www.omg.org/spec/BPMN/non-normative/color/1.0",Iu="color",Fu=[{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"}]}],ju=[],Vu=[],Wu={name:Ou,uri:Lu,prefix:Iu,types:Fu,enumerations:ju,associations:Vu},$u={bpmn:su,bpmndi:du,dc:xu,di:Cu,bioc:Bu,color:Wu};function ho(e,t){let r=k({},$u,e);return new Ir(r,t)}var zu="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 mo(e){Ue(e,"di")||Object.defineProperty(e,"di",{enumerable:!1,get:function(){throw new Error(zu)}})}function Pe(e,t){return e.$instanceOf(t)}function Hu(e){return he(e.rootElements,function(t){return Pe(t,"bpmn:Process")||Pe(t,"bpmn:Collaboration")})}function An(e){var t={},r=[],n={};function i(E,x){return function(L){E(L,x)}}function o(E){t[E.id]=E}function u(E){return t[E.id]}function l(E,x){var L=E.gfx;if(L)throw new Error(`already rendered ${me(E)}`);return e.element(E,n[E.id],x)}function f(E,x){return e.root(E,n[E.id],x)}function d(E,x){try{var L=n[E.id]&&l(E,x);return o(E),L}catch(ee){g(ee.message,{element:E,error:ee}),console.error(`failed to import ${me(E)}`,ee)}}function g(E,x){e.error(E,x)}var A=this.registerDi=function(x){var L=x.bpmnElement;L?n[L.id]?g(`multiple DI elements defined for ${me(L)}`,{element:L}):(n[L.id]=x,mo(L)):g(`no bpmnElement referenced in ${me(x)}`,{element:x})};function j(E){$(E.plane)}function $(E){A(E),R(E.planeElement,ne)}function ne(E){A(E)}this.handleDefinitions=function(x,L){var ee=x.diagrams;if(L&&ee.indexOf(L)===-1)throw new Error("diagram not part of <bpmn:Definitions />");if(!L&&ee&&ee.length&&(L=ee[0]),!L)throw new Error("no diagram to display");n={},j(L);var De=L.plane;if(!De)throw new Error(`no plane for ${me(L)}`);var c=De.bpmnElement;if(!c)if(c=Hu(x),c)g(`correcting missing bpmnElement on ${me(De)} to ${me(c)}`),De.bpmnElement=c,A(De);else throw new Error("no process or collaboration to display");var s=f(c,De);if(Pe(c,"bpmn:Process")||Pe(c,"bpmn:SubProcess"))q(c,s);else if(Pe(c,"bpmn:Collaboration"))le(c,s),Y(x.rootElements,s);else throw new Error(`unsupported bpmnElement for ${me(De)}: ${me(c)}`);V(r)};var V=this.handleDeferred=function(){for(var x;r.length;)x=r.shift(),x()};function q(E,x){G(E,x),T(E.ioSpecification,x),v(E.artifacts,x),o(E)}function Y(E,x){var L=Xe(E,function(ee){return!u(ee)&&Pe(ee,"bpmn:Process")&&ee.laneSets});L.forEach(i(q,x))}function Z(E,x){d(E,x)}function P(E,x){R(E,i(Z,x))}function m(E,x){d(E,x)}function _(E,x){d(E,x)}function S(E,x){d(E,x)}function F(E,x){d(E,x)}function v(E,x){R(E,function(L){Pe(L,"bpmn:Association")?r.push(function(){F(L,x)}):F(L,x)})}function T(E,x){E&&(R(E.dataInputs,i(_,x)),R(E.dataOutputs,i(S,x)))}var b=this.handleSubProcess=function(x,L){G(x,L),v(x.artifacts,L)};function B(E,x){var L=d(E,x);Pe(E,"bpmn:SubProcess")&&b(E,L||x),Pe(E,"bpmn:Activity")&&T(E.ioSpecification,x),r.push(function(){R(E.dataInputAssociations,i(m,x)),R(E.dataOutputAssociations,i(m,x))})}function M(E,x){d(E,x)}function N(E,x){d(E,x)}function H(E,x){r.push(function(){var L=d(E,x);E.childLaneSet&&Ge(E.childLaneSet,L||x),je(E)})}function Ge(E,x){R(E.lanes,i(H,x))}function ie(E,x){R(E,i(Ge,x))}function G(E,x){ze(E.flowElements,x),E.laneSets&&ie(E.laneSets,x)}function ze(E,x){R(E,function(L){Pe(L,"bpmn:SequenceFlow")?r.push(function(){M(L,x)}):Pe(L,"bpmn:BoundaryEvent")?r.unshift(function(){B(L,x)}):Pe(L,"bpmn:FlowNode")?B(L,x):Pe(L,"bpmn:DataObject")||(Pe(L,"bpmn:DataStoreReference")||Pe(L,"bpmn:DataObjectReference")?N(L,x):g(`unrecognized flowElement ${me(L)} in context ${me(x&&x.businessObject)}`,{element:L,context:x}))})}function He(E,x){var L=d(E,x),ee=E.processRef;ee&&q(ee,L||x)}function le(E,x){R(E.participants,i(He,x)),r.push(function(){P(E.messageFlows,x)}),v(E.artifacts,x)}function je(E){R(E.flowNodeRef,function(x){var L=x.get("lanes");L&&L.push(E)})}}function yo(e,t,r){var n,i,o,u,l=[];function f(d,g){var A={root:function(V,q){return n.add(V,q)},element:function(V,q,Y){return n.add(V,q,Y)},error:function(V,q){l.push({message:V,context:q})}},j=new An(A);g=g||d.diagrams&&d.diagrams[0];var $=Uu(d,g);if(!$)throw new Error("no diagram to display");R($,function(V){j.handleDefinitions(d,V)});var ne=g.plane.bpmnElement.id;o.setRootElement(o.findRoot(ne+"_plane")||o.findRoot(ne))}return new Promise(function(d,g){try{return n=e.get("bpmnImporter"),i=e.get("eventBus"),o=e.get("canvas"),i.fire("import.render.start",{definitions:t}),f(t,r),i.fire("import.render.complete",{error:u,warnings:l}),d({warnings:l})}catch(A){return A.warnings=l,g(A)}})}function Uu(e,t){if(!(!t||!t.plane)){var r=t.plane.bpmnElement,n=r;!D(r,"bpmn:Process")&&!D(r,"bpmn:Collaboration")&&(n=qu(r));var i;D(n,"bpmn:Collaboration")?i=n:i=he(e.rootElements,function(d){if(D(d,"bpmn:Collaboration"))return he(d.participants,function(g){return g.processRef===n})});var o=[n];i&&(o=Tn(i.participants,function(d){return d.processRef}),o.push(i));var u=go(o),l=[t],f=[r];return R(e.diagrams,function(d){if(d.plane){var g=d.plane.bpmnElement;u.indexOf(g)!==-1&&f.indexOf(g)===-1&&(l.push(d),f.push(g))}}),l}}function go(e){var t=[];return R(e,function(r){r&&(t.push(r),t=t.concat(go(r.flowElements)))}),t}function qu(e){for(var t=e;t;){if(D(t,"bpmn:Process"))return t;t=t.$parent}}var Ku='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>',Sn=Ku,Rn={verticalAlign:"middle"},Cn={color:"#404040"},Yu={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},Gu={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},Xu={position:"absolute",left:"50%",top:"40%",transform:"translate(-50%)",width:"260px",padding:"10px",background:"white",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"14px",display:"flex",lineHeight:"1.3"},Zu='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+Sn+'</a><span>Web-based tooling for BPMN, DMN and forms powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>',nt;function Qu(){nt=xe(Zu),we(nt,Yu),we(Le("svg",nt),Rn),we(Le(".backdrop",nt),Gu),we(Le(".notice",nt),Xu),we(Le(".link",nt),Cn,{margin:"15px 20px 15px 10px",alignSelf:"center"})}function vo(){nt||(Qu(),Wt.bind(nt,".backdrop","click",function(e){document.body.removeChild(nt)})),document.body.appendChild(nt)}function se(e){e=k({},el,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),this._init(this._container,this._moddle,e),rl(this._container)}Ee(se,tt);se.prototype.importXML=async function(t,r){let n=this;function i(u){return n.get("eventBus").createEvent(u)}let o=[];try{t=this._emit("import.parse.start",{xml:t})||t;let u;try{u=await this._moddle.fromXML(t,"bpmn:Definitions")}catch(j){throw this._emit("import.parse.complete",{error:j}),j}let l=u.rootElement,f=u.references,d=u.warnings,g=u.elementsById;o=o.concat(d),l=this._emit("import.parse.complete",i({error:null,definitions:l,elementsById:g,references:f,warnings:o}))||l;let A=await this.importDefinitions(l,r);return o=o.concat(A.warnings),this._emit("import.done",{error:null,warnings:o}),{warnings:o}}catch(u){let l=u;throw o=o.concat(l.warnings||[]),Fr(l,o),l=Ju(l),this._emit("import.done",{error:l,warnings:l.warnings}),l}};se.prototype.importDefinitions=async function(t,r){return this._setDefinitions(t),{warnings:(await this.open(r)).warnings}};se.prototype.open=async function(t){let r=this._definitions,n=t;if(!r){let o=new Error("no XML imported");throw Fr(o,[]),o}if(typeof t=="string"&&(n=tl(r,t),!n)){let o=new Error("BPMNDiagram <"+t+"> not found");throw Fr(o,[]),o}try{this.clear()}catch(o){throw Fr(o,[]),o}let{warnings:i}=await yo(this,r,n);return{warnings:i}};se.prototype.saveXML=async function(t){t=t||{};let r=this._definitions,n,i;try{if(!r)throw new Error("no definitions loaded");r=this._emit("saveXML.start",{definitions:r})||r,i=(await this._moddle.toXML(r,t)).xml,i=this._emit("saveXML.serialized",{xml:i})||i}catch(u){n=u}let o=n?{error:n}:{xml:i};if(this._emit("saveXML.done",o),n)throw n;return o};se.prototype.saveSVG=async function(){this._emit("saveSVG.start");let t,r;try{let n=this.get("canvas"),i=n.getActiveLayer(),o=Le(":scope > defs",n._svg),u=Xr(i),l=o?"<defs>"+Xr(o)+"</defs>":"",f=i.getBBox();t=`<?xml version="1.0" encoding="utf-8"?>
8<!-- created with bpmn-js / http://bpmn.io -->
9<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
10<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="`+f.width+'" height="'+f.height+'" viewBox="'+f.x+" "+f.y+" "+f.width+" "+f.height+'" version="1.1">'+l+u+"</svg>"}catch(n){r=n}if(this._emit("saveSVG.done",{error:r,svg:t}),r)throw r;return{svg:t}};se.prototype._setDefinitions=function(e){this._definitions=e};se.prototype.getModules=function(){return this._modules};se.prototype.clear=function(){this.getDefinitions()&&tt.prototype.clear.call(this)};se.prototype.destroy=function(){tt.prototype.destroy.call(this),Dt(this._container)};se.prototype.on=function(e,t,r,n){return this.get("eventBus").on(e,t,r,n)};se.prototype.off=function(e,t){this.get("eventBus").off(e,t)};se.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),typeof e=="string"&&(e=Le(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()};se.prototype.getDefinitions=function(){return this._definitions};se.prototype.detach=function(){let e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))};se.prototype._init=function(e,t,r){let n=r.modules||this.getModules(r),i=r.additionalModules||[],o=[{bpmnjs:["value",this],moddle:["value",t]}],u=[].concat(o,n,i),l=k(Nn(r,["additionalModules"]),{canvas:k({},r.canvas,{container:e}),modules:u});tt.call(this,l),r&&r.container&&this.attachTo(r.container)};se.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)};se.prototype._createContainer=function(e){let t=xe('<div class="bjs-container"></div>');return we(t,{width:Eo(e.width),height:Eo(e.height),position:e.position}),t};se.prototype._createModdle=function(e){let t=k({},this._moddleExtensions,e.moddleExtensions);return new ho(t)};se.prototype._modules=[];function Fr(e,t){return e.warnings=t,e}function Ju(e){let r=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);return r&&(e.message="unparsable content <"+r[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+r[2]),e}var el={width:"100%",height:"100%",position:"relative"};function Eo(e){return e+(Te(e)?"px":"")}function tl(e,t){return t&&he(e.diagrams,function(r){return r.id===t})||null}function rl(e){let r='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+Sn+"</a>",n=xe(r);we(Le("svg",n),Rn),we(n,Cn,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(n),sr.bind(n,"click",function(i){vo(),i.preventDefault()})}function vt(e){se.call(this,e)}Ee(vt,se);vt.prototype._modules=[pi,xi,xr,Pi,hr];vt.prototype._moddleExtensions={};var xo=globalThis;xo.BpmnJS=vt;xo.BpmnJS.Viewer=vt;var Lh=vt;})();
11