/*! bpmn-js - bpmn-navigated-viewer v0.25.0 | (c) 2014, 2017 camunda Services GmbH | bpmn.io/license */ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).BpmnJS=e()}}(function(){function e(e){return e&&e.businessObject||e}function t(e,t){var n=this;t=t||un,e.on(["render.shape","render.connection"],t,function(e,t){var i=e.type,r=t.element,o=t.gfx;if(n.canRender(r))return"render.shape"===i?n.drawShape(o,r):n.drawConnection(o,r)}),e.on(["render.getShapePath","render.getConnectionPath"],t,function(e,t){if(n.canRender(t))return"render.getShapePath"===e.type?n.getShapePath(t):n.getConnectionPath(t)})}function n(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=dn[i];r?(r===mn&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function i(e,t,i){if("string"==typeof t){if(void 0===i)return function(e,t){return dn[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);n(e,t,i)}else!function(e,t){var i,r,o=Object.keys(t);for(i=0,r;r=o[i];i++)n(e,r,t[r])}(e,t);return e}function r(e){return""+e+"",function(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}(e)}function o(e){for(var t,n="",i=0;t=e[i];i++)n+=t.x+","+t.y+" ";return n}function a(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}function s(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function l(e,t){var n=e.transform.baseVal;if(1===arguments.length)return n.consolidate();t.length?function(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(s(e,i));e.consolidate()}(n,t):n.initialize(s(n,t))}function p(e,t,n,i,r,o){return e===t||(null==e||null==t||!_t(e)&&!Rt(t)?e!=e&&t!=t:Un(e,t,p,n,i,r,o))}function c(e,t,n,i,r){if(!_t(e))return e;var o=Wt(t)&&(Xt(t)||Vn(t)),a=o?void 0:nn(t);return Et(a||t,function(s,l){if(a&&(s=t[l=s]),Rt(s))i||(i=[]),r||(r=[]),Di(e,t,l,c,n,i,r);else{var p=e[l],u=n?n(p,s,l,e,t):void 0,f=void 0===u;f&&(u=s),void 0===u&&(!o||l in e)||!f&&(u==u?u===p:p!=p)||(e[l]=u)}}),e}function u(e,t,n,i){i||(i=[]);for(var r=-1,o=e.length;++r1)for(;n=i.shift();){if(!(n.length+o already defined")}function H(e){this.properties=new ko(this),this.factory=new Co(this,this.properties),this.registry=new Lo(e,this.properties),this.typeCache={}}function U(e,t,n,i){return i?Go.call(Ko,i)?Ko[i]:"&"+i+";":zo(t?t:parseInt(n,16))}function Y(e){return new Error(e)}function q(e){return"missing namespace for prefix <"+e+">"}function X(e){return{get:e,enumerable:!0}}function Z(e){var t,n={};for(t in e)n[t]=e[t];return n}function J(e){return e+"$uri"}function Q(){return{line:0,column:0}}function ee(e){throw e}function te(e){function t(e){e instanceof Error||(e=Y(e)),v=e,m(e,d)}function n(e){l&&(e instanceof Error||(e=Y(e)),l(e,d))}function i(e){function i(){if(null!==R)return R;for(var e,t,i,r,o,a,s,l,p,c,u=g&&M.xmlns,h=g&&y?[]:null,m=I,d=B,v=d.length,b={};m8)){if((p<65||p>122||p>90&&p<97)&&95!==p&&58!==p)return n("illegal first char attribute name"),R=!1;for(c=m+1;c96&&p<123||p>64&&p<91||p>47&&p<59||45===p||95===p)){if(61!==p)return n("missing attribute value"),R=!1;break}if("xmlns:xmlns"===(l=d.substring(m,c)))return n("illegal declaration of xmlns"),R=!1;if(34===(p=d.charCodeAt(c+1)))c=d.indexOf('"',m=c+2);else{if(39!==p)return n("missing attribute value quotes"),R=!1;c=d.indexOf("'",m=c+2)}if(-1===c)return n("attribute value quote missmatch"),R=!1;if(c+132||p<9||p<32&&p>13))return n("illegal character after attribute end"),R=!1;if(a=d.substring(m,c),m=c+1,g)if(y){if(null!==(o="xmlns"===l?"xmlns":120===l.charCodeAt(0)&&"xmlns:"===l.substr(0,6)?l.substr(6):null)){if(e=Wo(a),t=J(o),!(s=f[e])){if("xmlns"===o||t in M&&M[t]!==e)do{s="ns"+P++}while(void 0!==M[s]);else s=o;f[e]=s}M[o]!==s&&(r||(M=Z(M),r=!0),M[o]=s,"xmlns"===o&&(M[J(s)]=e,u=s),M[t]=e),b[l]=a;continue}h.push(l,a)}else-1!==(p=l.indexOf(":"))?(i=M[l.substring(0,p)])?((l=u===i?l.substr(p+1):i+l.substr(p))===qo&&(-1!==(p=a.indexOf(":"))?(i=a.substring(0,p),a=(i=M[i]||i)+a.substring(p)):a=u+":"+a),b[l]=a):n(q(l.substring(0,p))):b[l]=a;else b[l]=a}if(y)for(m=0,v=h.length;m=a&&(t=i.exec(e))&&!((s=t[0].length+t.index)>D);)r+=1,a=s;return-1==D?(o=s,n=""):(o=D-a,n=-1==N?e.substring(D):e.substring(D,N+1)),{data:n,line:r,column:o}},h&&(S=Object.create({},{name:X(function(){return _}),originalName:X(function(){return A}),attrs:X(i),ns:X(function(){return M})}));-1!==N;){if(-1===(D=60===e.charCodeAt(N)?N:e.indexOf("<",N))){if(k.length)return t("unexpected end of file");if(0===N)return t("missing start tag");return}if(N!==D&&r&&(r(e.substring(N,D),Wo),b))return;if(33!==(w=e.charCodeAt(D+1)))if(63!==w){if(-1==(N=e.indexOf(">",D+1)))return t("unclosed tag");if(R={},47===w){if(T=!1,O=!0,!k.length)return t("missing open tag");if(m=_=k.pop(),x=D+2+m.length,e.substring(D+2,x)!==m)return t("closing tag mismatch");for(;x8&&w<14))return t("close tag")}else{if(47===e.charCodeAt(N-1)?(m=_=e.substring(D+1,N-1),T=!0,O=!0):(m=_=e.substring(D+1,N),T=!0,O=!1),!(w>96&&w<123||w>64&&w<91||95===w||58===w))return t("illegal first char nodeName");for(x=1,v=m.length;x96&&w<123||w>64&&w<91||w>47&&w<59||45===w||95===w)){if(32===w||w<14&&w>8){_=m.substring(0,x),R=null;break}return t("invalid nodeName")}O||k.push(_)}if(g){if(l=M,T&&(O||C.push(l),null===R&&(y=-1!==m.indexOf("xmlns",x))&&(I=x,B=m,i(),y=!1)),A=_,-1!==(w=_.indexOf(":"))){if(!(E=M[_.substring(0,w)]))return t("missing namespace on <"+A+">");_=_.substr(w+1)}else E=M.xmlns;E&&(_=E+":"+_)}if(T&&(I=x,B=m,o&&(h?o(S,Wo,O,d):o(_,i,Wo,O,d),b)))return;if(O){if(a&&(a(h?S:_,Wo,T,d),b))return;g&&(M=T?l:C.pop())}N+=1}else{if(-1===(N=e.indexOf("?>",D)))return t("unclosed question");if(c&&(c(e.substring(D,N+2)),b))return;N+=2}else{if(91===(w=e.charCodeAt(D+2))&&"CDATA["===e.substr(D+3,6)){if(-1===(N=e.indexOf("]]>",D)))return t("unclosed cdata");if(s&&(s(e.substring(D+9,N)),b))return;N+=3;continue}if(45===w&&45===e.charCodeAt(D+3)){if(-1===(N=e.indexOf("--\x3e",D)))return t("unclosed comment");if(p&&(p(e.substring(D+4,N),Wo),b))return;N+=3;continue}if(-1===(N=e.indexOf(">",D+1)))return t("unclosed tag");if(u&&(u(e.substring(D,N+1),Wo),b))return;N+=1}}}if(!this)return new te(e);var r,o,a,s,l,p,c,u,f,h=e&&e.proxy,m=ee,d=Q,y=!1,g=!1,v=null,b=!1;this.on=function(e,t){if("function"!=typeof t)throw Y("required args ");switch(e){case"openTag":o=t;break;case"text":r=t;break;case"closeTag":a=t;break;case"error":m=t;break;case"warn":l=t;break;case"cdata":s=t;break;case"attention":u=t;break;case"question":c=t;break;case"comment":p=t;break;default:throw Y("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw Y("required args ");var t,n={};for(t in e)n[t]=e[t];return n[Uo]=Yo,g=!0,f=n,this},this.parse=function(e){if("string"!=typeof e)throw Y("required args ");return v=null,i(e),d=Q,b=!1,v},this.stop=function(){b=!0}}function ne(e,t){return ia(t)?e.prefix+":"+function(e){return e.charAt(0).toUpperCase()+e.slice(1)}(e.localName):e.name}function ie(e){return new Error(e)}function re(e){return e.$descriptor}function oe(){}function ae(){}function se(){}function le(e,t){this.property=e,this.context=t}function pe(e,t){this.element=t,this.propertyDesc=e}function ce(){}function ue(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function fe(e,t,n){ue.call(this,e,t,n)}function he(e,t,n){this.model=e,this.context=n}function me(e){e instanceof Vo&&(e={model:e}),Ai(this,{lax:!1},e)}function de(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function ye(e){return xo(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function ge(e,t){return t.isGeneric?Ai({localName:t.ns.localName},e):Ai({localName:function(e,t){return oa(t)?function(e){return e.charAt(0).toLowerCase()+e.slice(1)}(e):e}(t.ns.localName,t.$pkg)},e)}function ve(e){return(e=xo(e)?e:""+e).replace(pa,function(e){return"&#"+fa[e]+";"})}function be(e,t){this.ns=t}function xe(){}function we(e){this.ns=e}function Ee(e,t){this.body=[],this.attrs=[],this.parent=e,this.ns=t}function _e(e,t){Ee.call(this,e,t)}function Ae(e,t){Vo.call(this,e,t)}function Se(e,t){t=!!t,Xt(e)||(e=[e]);var n,i,r,o;return sn(e,function(e){var a=e;e.waypoints&&!t&&(a=Se(e.waypoints,!0));var s=a.x,l=a.y,p=a.height||0,c=a.width||0;(sr||void 0===r)&&(r=s+c),(l+p>o||void 0===o)&&(o=l+p)}),{x:n,y:i,height:o-i,width:r-n}}function Re(e,t){return Math.round(e*t)/t}function Ce(e){return Ea(e)?e+"px":e}function Me(e,t,n){var i=bn("g");rr(i).add(t);var r=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]),i}function ke(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._init(e||{})}function Pe(e,t){var n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}function Te(){Object.defineProperty(this,"businessObject",{writable:!0}),Oa.bind(this,"parent"),Da.bind(this,"label"),Ba.bind(this,"outgoing"),Ia.bind(this,"incoming")}function Oe(){Te.call(this),Oa.bind(this,"children"),Na.bind(this,"host"),Na.bind(this,"attachers")}function De(){Oe.call(this)}function Ne(){Oe.call(this),Da.bind(this,"labelTarget")}function Be(){Te.call(this),Ba.bind(this,"source"),Ia.bind(this,"target")}function Ie(){this._uid=12}function Le(e){this._elements={},this._eventBus=e}function je(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Za,this.__views__=[]}function Fe(e,t,n){this.__wrapped__=e,this.__actions__=n||[],this.__chain__=!!t}function Ve(e){if(Rt(e)&&!Xt(e)&&!(e instanceof Ja)){if(e instanceof Qa)return e;if(ts.call(e,"__chain__")&&ts.call(e,"__wrapped__"))return es(e)}return new Qa(e)}function We(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function ze(){}function Ge(e,t){this._eventBus=e,this._elementRegistry=t}function $e(e,t){fn.call(this,e,Fs),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2})}function Ke(e){function t(e){return i.indexOf(e)>=0}function n(e){t(e)||((e.__depends__||[]).forEach(n),t(e)||(!function(e){i.push(e)}(e),(e.__init__||[]).forEach(function(e){r.push(e)})))}var i=[],r=[];e.forEach(n);var o=new Xs.Injector(i);return r.forEach(function(e){try{o["string"==typeof e?"get":"invoke"](e)}catch(e){throw console.error("Failed to instantiate component"),console.error(e.stack),e}}),o}function He(e,t){this.injector=t=t||function(e){return Ke([{config:["value",e=e||{}]},Vs].concat(e.modules||[]))}(e),this.get=t.get,this.invoke=t.invoke,this.get("eventBus").fire("diagram.init")}function Ue(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}function Ye(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function qe(e,t,n){Ai(e.style,{left:t+"px",top:n+"px"})}function Xe(e,t){e.style.display=!1===t?"none":""}function Ze(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}function Je(e){return void 0!==e}function Qe(e,t,n,i){this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=al,this._overlayDefaults=Ai({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=function(e){var t=ho('
');return e.insertBefore(t,e.firstChild),t}(n.getContainer()),this._init()}function et(e){return e&&e.preventDefault()}function tt(e,t){e&&(e.stopPropagation&&e.stopPropagation(),t&&e.stopImmediatePropagation&&e.stopImmediatePropagation())}function nt(e){return e.originalEvent||e.srcEvent}function it(e){et(e),et(nt(e))}function rt(e,t){tt(e,t),tt(nt(e),t)}function ot(e){return!(fl(e)||e).button}function at(e,t,n){function i(n,i,r){if(ml(i)){var o,a;r?a=t.getGraphics(r):(o=i.delegateTarget||i.target)&&(a=o,r=t.get(a)),a&&r&&!1===e.fire(n,{element:r,gfx:a,originalEvent:i})&&(i.stopPropagation(),i.preventDefault())}}function r(e){var t=l[e];return t||(t=l[e]=function(t){i(e,t)}),t}function o(e,t,n){var i=r(n);i.$delegate=lo.bind(e,c,t,i)}function a(e,t,n){lo.unbind(e,t,r(n).$delegate)}var s=n.cls("djs-hit",["no-fill","no-border"],{stroke:"white",strokeWidth:15}),l={},p={mouseover:"element.hover",mouseout:"element.out",click:"element.click",dblclick:"element.dblclick",mousedown:"element.mousedown",mouseup:"element.mouseup"},c="svg, .djs-element";e.on("canvas.destroy",function(e){!function(e){sn(p,function(t,n){a(e,n,t)})}(e.svg)}),e.on("canvas.init",function(e){!function(e){sn(p,function(t,n){o(e,n,t)})}(e.svg)}),e.on(["shape.added","connection.added"],function(e){var t,n=e.element,i=e.gfx;n.waypoints?t=dl(n.waypoints):(t=bn("rect"),hn(t,{x:0,y:0,width:n.width,height:n.height})),hn(t,s),zi(i,t)}),e.on("shape.changed",gl,function(e){var t=e.element,n=e.gfx,i=ir(".djs-hit",n);hn(i,{width:t.width,height:t.height})}),e.on("connection.changed",function(e){var t=e.element,n=e.gfx,i=ir(".djs-hit",n);yl(i,t.waypoints)}),this.fire=i,this.triggerMouseEvent=function(e,t,n){var r=p[e];if(!r)throw new Error("unmapped DOM event name <"+e+">");return i(r,t,n)},this.mouseHandler=r,this.registerEvent=o,this.unregisterEvent=a}function st(e,t,n){function i(e,t){var n=bn("rect");return hn(n,Ai({x:10,y:10,width:100,height:100},r)),zi(e,n),n}this.offset=6;var r=t.cls("djs-outline",["no-fill"]),o=this;e.on(["shape.added","shape.changed"],xl,function(e){var t=e.element,n=e.gfx,r=ir(".djs-outline",n);r||(r=i(n)),o.updateShapeOutline(r,t)}),e.on(["connection.added","connection.changed"],function(e){var t=e.element,n=e.gfx,r=ir(".djs-outline",n);r||(r=i(n)),o.updateConnectionOutline(r,t)})}function lt(e){this._eventBus=e,this._selectedElements=[];var t=this;e.on(["shape.remove","connection.remove"],function(e){var n=e.element;t.deselect(n)}),e.on(["diagram.clear"],function(e){t.select(null)})}function pt(e,t,n,i){e.on("create.end",500,function(e){e.context.canExecute&&t.select(e.context.shape)}),e.on("connect.end",500,function(e){e.context.canExecute&&e.context.target&&t.select(e.context.target)}),e.on("shape.move.end",500,function(e){var n=e.previousSelection||[],r=i.get(e.context.shape.id);Kr(n,function(e){return r.id===e.id})||t.select(r)}),e.on("element.click",function(e){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,a=_l(e);if(r&&o)return a?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,a)})}function ct(e,t,n,i){function r(e,n){t.addMarker(e,n)}function o(e,n){t.removeMarker(e,n)}this._multiSelectionBox=null,e.on("element.hover",function(e){r(e.element,Sl)}),e.on("element.out",function(e){o(e.element,Sl)}),e.on("selection.changed",function(e){var t=e.oldSelection,n=e.newSelection;sn(t,function(e){-1===n.indexOf(e)&&function(e){o(e,Rl)}(e)}),sn(n,function(e){-1===t.indexOf(e)&&function(e){r(e,Rl)}(e)})})}function ut(e,t){return e.replace(t,function(e,t){return zl[t]||t})}function ft(e,t){var n,i,r,o,a;switch(e.nodeType){case 3:t.push(ut(e.textContent,Vl));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n"),n=0,i=(a=e.childNodes).length;n")}else t.push("/>");break;case 8:t.push("\x3c!--",ut(e.nodeValue,Vl),"--\x3e");break;case 4:t.push("");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function ht(e,t){if(void 0!==t){try{!function(e,t){var n,i=gn(t).documentElement;if(jl(e),t)for(n=i.firstChild;n;)Wi(n,e),n=n.nextSibling}(e,t)}catch(e){throw new Error("error parsing SVG: "+e.message)}return e}return function(e){for(var t=e.firstChild,n=[];t;)Fl(t,n),t=t.nextSibling;return n.join("")}(e)}function mt(e){return e+(Ea(e)?"px":"")}function dt(e){e=Ai({},$l,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),function(e){var t=mo.BPMNIO_LOGO,n=ho('');e.appendChild(n),Ll.bind(n,"click",function(e){mo.open(),e.preventDefault()})}(this._container),this._init(this._container,this._moddle,e)}function yt(e){Ul(e),gt(!1)}function gt(e){Ll[e?"bind":"unbind"](document.body,"click",yt,!0)}function vt(e,t){function n(e){var n=r.start,i=pl.toPoint(e),o=Jl(i,n);if(!r.dragging&&function(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}(o)>Ql&&(r.dragging=!0,Hl.install(),Yl.set("grab")),r.dragging){var a=r.last||r.start;o=Jl(i,a),t.scroll({dx:o.x,dy:o.y}),r.last=i}e.preventDefault()}function i(e){Ll.unbind(document,"mousemove",n),Ll.unbind(document,"mouseup",i),r=null,Yl.unset()}var r,o=t._container;Ll.bind(o,"mousedown",function(e){Zl(e.target,".djs-draggable")||e.button||e.ctrlKey||e.shiftKey||e.altKey||(r={start:pl.toPoint(e)},Ll.bind(document,"mousemove",n),Ll.bind(document,"mouseup",i))})}function bt(e,t,n){this._enabled=!1,this._canvas=t,this._container=t._container,this._handleWheel=Ps(this._handleWheel,this);var i=!n||!1!==n.enabled;this.totalDelta=0;var r=this;e.on("canvas.init",function(e){r._init(i)})}function xt(e){Kl.call(this,e)}var wt={};wt.is=function(t,n){var i=e(t);return i&&"function"==typeof i.$instanceOf&&i.$instanceOf(n)},wt.getBusinessObject=e;var Et=function(e,t){for(var n=-1,i=e.length;++n-1&&e%1==0&&e<=Ft},Wt=function(e){return null!=e&&Vt(jt(e))},zt=/^\d+$/,Gt=9007199254740991,$t=function(e,t){return e="number"==typeof e||zt.test(e)?+e:-1,t=null==t?Gt:t,e>-1&&e%1==0&&e0;++il))return!1;for(;++sr?0:r+t),(n=void 0===n||n>r?r:+n||0)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(r);++i2?n[r-2]:void 0,a=r>2?n[2]:void 0,s=r>1?n[r-1]:void 0;for("function"==typeof o?(o=an(o,s,5),r-=2):r-=(o="function"==typeof s?s:void 0)?1:0,a&&Ei(n[0],n[1],a)&&(o=r<3?void 0:o,r=1);++ie?t.width:e},0);switch(r.vertical){case"middle":f=(n.height-d)/2-l[0].height/4;break;default:f=o.top}var g=bn("text");hn(g,i),sn(l,function(e){switch(f+=e.height,r.horizontal){case"left":m=o.left;break;case"right":m=(a?y:p)-o.right-e.width;break;default:m=Math.max(((a?y:p)-e.width)/2+o.left,0)}var t=bn("tspan");hn(t,{x:m,y:f}),t.textContent=e.text,zi(g,t)}),Gi(c);return{dimensions:{width:y,height:d},element:g}};var Hi=m,Ui={},Yi=Ui=function(e,t){if(t||(t=16),void 0===e&&(e=128),e<=0)return"0";for(var n=Math.log(Math.pow(2,e))/Math.log(t),i=2;n===1/0;i*=2)n=Math.log(Math.pow(2,e/i))/Math.log(t)*i;for(var r=n-Math.floor(n),o="",i=0;i=Math.pow(2,e)?Yi(e,t):o};Yi.rack=function(e,t,n){var i=function(i){var o=0;do{if(o++>10){if(!n)throw new Error("too many ID collisions, use more bits");e+=n}var a=Yi(e,t)}while(Object.hasOwnProperty.call(r,a));return r[a]=i,a},r=i.hats={};return i.get=function(e){return i.hats[e]},i.set=function(e,t){return i.hats[e]=t,i},i.bits=e||128,i.base=t||16,i};var qi=d;d.prototype.next=function(e){return this._seed(e||!0)},d.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},d.prototype.claim=function(e,t){this._seed.set(e,t||!0)},d.prototype.assigned=function(e){return this._seed.get(e)||!1},d.prototype.unclaim=function(e){delete this._seed.hats[e]},d.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};var Xi={};Xi="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};var Zi=function(e,t){for(var n=-1,i=e.length;++n':""};var Ar={},Sr=wt.is,Rr={width:90,height:20},Cr=15;Ar.hasExternalLabel=function(e){return Sr(e,"bpmn:Event")||Sr(e,"bpmn:Gateway")||Sr(e,"bpmn:DataStoreReference")||Sr(e,"bpmn:DataObjectReference")||Sr(e,"bpmn:SequenceFlow")||Sr(e,"bpmn:MessageFlow")},Ar.getExternalLabelBounds=function(e,t){var n,i,r,o=e.di.label;return o&&o.bounds?(r=o.bounds,i={width:Math.max(Rr.width,r.width),height:r.height},n={x:r.x+r.width/2,y:r.y+r.height/2}):(n=M(t),i=Rr),Ai({x:n.x-i.width/2,y:n.y-i.height/2},i)};var Mr=function(e,t){for(var n=-1,i=e.length,r=Array(i);++n-1?n[o]:void 0}return Gr(n,i,e)}}(rn),Hr={};Hr.extend=function(e,t,n,i){var r=n.inverse;return Object.defineProperty(e,"remove",{value:function(e){var n=this.indexOf(e);return-1!==n&&(this.splice(n,1),t.unset(e,r,i)),e}}),Object.defineProperty(e,"contains",{value:function(e){return-1!==this.indexOf(e)}}),Object.defineProperty(e,"add",{value:function(e){this.contains(e)||(this.push(e),t.set(e,r,i))}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e},Hr.isExtended=function(e){return!0===e.__refs_collection},D.prototype.bind=function(e,t){if("string"==typeof t){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?O(this,t,e):function(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var o=r;r=null,o&&e.unset(o,i,n),r=t,e.set(r,i,n)}}})}(this,t,e)},D.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return Hr.isExtended(n)||O(this,t,e),n},D.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},D.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},D.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Ur={};(Ur=D).Collection=Hr;var Yr=_r.elementToString,qr=new Ur({name:"bpmnElement",enumerable:!0},{name:"di"}),Xr=B,Zr={};Zr.importBpmnDiagram=I;var Jr=Element.prototype,Qr=Jr.matches||Jr.webkitMatchesSelector||Jr.mozMatchesSelector||Jr.msMatchesSelector||Jr.oMatchesSelector,eo=function(e,t){if(!e||1!==e.nodeType)return!1;if(Qr)return Qr.call(e,t);for(var n=nr.all(t,e.parentNode),i=0;i
a',co=!so.getElementsByTagName("link").length,so=void 0);var uo={legend:[1,"
","
"],tr:[2,"","
"],col:[2,"","
"],_default:co?[1,"X
","
"]:[0,"",""]};uo.td=uo.th=[3,"","
"],uo.option=uo.optgroup=[1,'"],uo.thead=uo.tbody=uo.colgroup=uo.caption=uo.tfoot=[1,"","
"],uo.polyline=uo.ellipse=uo.polygon=uo.circle=uo.text=uo.line=uo.path=uo.rect=uo.g=[1,'',""];var fo,ho=po,mo={},yo=mo.BPMNIO_LOGO="iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAMAAADypuvZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRFiMte9PrwldFwfcZPqtqN0+zEyOe1XLgjvuKncsJAZ70y6fXh3vDT////UrQV////G2zN+AAAABB0Uk5T////////////////////AOAjXRkAAAHDSURBVHjavJZJkoUgDEBJmAX8979tM8u3E6x20VlYJfFFMoL4vBDxATxZcakIOJTWSmxvKWVIkJ8jHvlRv1F2LFrVISCZI+tCtQx+XfewgVTfyY3plPiQEAzI3zWy+kR6NBhFBYeBuscJLOUuA2WVLpCjVIaFzrNQZArxAZKUQm6gsj37L9Cb7dnIBUKxENaaMJQqMpDXvSL+ktxdGRm2IsKgJGGPg7atwUG5CcFUEuSv+CwQqizTrvDTNXdMU2bMiDWZd8d7QIySWVRsb2vBBioxOFt4OinPBapL+neAb5KL5IJ8szOza2/DYoipUCx+CjO0Bpsv0V6mktNZ+k8rlABlWG0FrOpKYVo8DT3dBeLEjUBAj7moDogVii7nSS9QzZnFcOVBp1g2PyBQ3Vr5aIapN91VJy33HTJLC1iX2FY6F8gRdaAeIEfVONgtFCzZTmoLEdOjBDfsIOA6128gw3eu1shAajdZNAORxuQDJN5A5PbEG6gNIu24QJD5iNyRMZIr6bsHbCtCU/OaOaSvgkUyDMdDa1BXGf5HJ1To+/Ym6mCKT02Y+/Sa126ZKyd3jxhzpc1r8zVL6YM1Qy/kR4ABAFJ6iQUnivhAAAAAAElFTkSuQmCC",go='
Web-based tooling for BPMN, DMN and CMMN diagrams powered by bpmn.io.
';mo.open=function(){fo||(fo=ho(go),lo.bind(fo,".backdrop","click",function(e){document.body.removeChild(fo)})),document.body.appendChild(fo)};var vo="[object String]",bo=Object.prototype.toString,xo=function(e){return"string"==typeof e||Rt(e)&&bo.call(e)==vo},wo="Expected a function",Eo=function(e,t,n){if("function"!=typeof e)throw new TypeError(wo);return setTimeout(function(){e.apply(void 0,n)},t)},_o=wi(function(e,t){return Eo(e,1,t)}),Ao={};Ao.hasLowerCaseAlias=function(e){return e.xml&&"lowerCase"===e.xml.tagAlias},Ao.DEFAULT_NS_MAP={xsi:"http://www.w3.org/2001/XMLSchema-instance"};var So=Ao.XSI_TYPE="xsi:type";Ao.serializeAsType=function(e){return j(e)===So},Ao.serializeAsProperty=function(e){return"property"===j(e)},F.prototype.get=function(e){return this.$model.properties.get(this,e)},F.prototype.set=function(e,t){this.$model.properties.set(this,e,t)};var Ro=F,Co=V;V.prototype.createType=function(e){function t(e){i.define(this,"$type",{value:o,enumerable:!0}),i.define(this,"$attrs",{value:{}}),i.define(this,"$parent",{writable:!0}),sn(e,function(e,t){this.set(t,e)},this)}var n=this.model,i=this.properties,r=Object.create(Ro.prototype);sn(e.properties,function(e){e.isMany||void 0===e.default||(r[e.name]=e.default)}),i.defineModel(r,n),i.defineDescriptor(r,e);var o=e.ns.name;return t.prototype=r,t.hasType=r.$instanceOf=this.model.hasType,i.defineModel(t,n),i.defineDescriptor(t,e),t};var Mo={};Mo.parseName=function(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected or , got "+e);n=r[1],i=r[0]}return e=(i?i+":":"")+n,{name:e,prefix:i,localName:n}};var ko=W;W.prototype.set=function(e,t,n){var i=this.model.getPropertyDescriptor(e,t),r=i&&i.name;!function(e){return void 0===e}(n)?i?r in e?e[r]=n:z(e,i,n):e.$attrs[t]=n:i?delete e[r]:delete e.$attrs[t]},W.prototype.get=function(e,t){var n=this.model.getPropertyDescriptor(e,t);if(!n)return e.$attrs[t];var i=n.name;return!e[i]&&n.isMany&&z(e,n,[]),e[i]},W.prototype.define=function(e,t,n){Object.defineProperty(e,t,n)},W.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},W.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})};var Po=Mo.parseName,To=G;G.prototype.build=function(){return Fi(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},G.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},G.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,o=this.propertiesByName,a=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=r.indexOf(e);if(-1===s)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,a),o[i.name]=o[i.localName]=t},G.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=Po(r[0],i),a=Po(r[1],o.prefix).name,s=this.propertiesByName[a];if(!s)throw new Error("refined property <"+a+"> not found");this.replaceProperty(s,e,n),delete e.redefines},G.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},G.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},G.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},G.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},G.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},G.prototype.hasProperty=function(e){return this.propertiesByName[e]},G.prototype.addTrait=function(e,t){var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(sn(e.properties,function(n){n=Ai({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var i=n.replaces,r=n.redefines;i||r?this.redefineProperty(n,i||r,i):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))},this),i.push(e),n[r]=e)};var Oo={},Do={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},No={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e,10)}};Oo.coerceType=function(e,t){var n=No[e];return n?n(t):t},Oo.isBuiltIn=function(e){return!!Do[e]},Oo.isSimple=function(e){return!!No[e]};var Bo=Mo.parseName,Io=Oo.isBuiltIn,Lo=$;$.prototype.getPackage=function(e){return this.packageMap[e]},$.prototype.getPackages=function(){return this.packages},$.prototype.registerPackage=function(e){e=Ai({},e);var t=this.packageMap;K(t,e,"prefix"),K(t,e,"uri"),sn(e.types,function(t){this.registerType(t,e)},this),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},$.prototype.registerType=function(e,t){e=Ai({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:Ai(e.meta||{})});var n=Bo(e.name,t.prefix),i=n.name,r={};sn(e.properties,function(e){var t=Bo(e.name,n.prefix),i=t.name;Io(e.type)||(e.type=Bo(e.type,t.prefix).name),Ai(e,{ns:t,name:i}),r[i]=e}),Ai(e,{ns:n,name:i,propertiesByName:r}),sn(e.extends,function(e){var t=this.typeMap[e];t.traits=t.traits||[],t.traits.push(i)},this),this.definePackage(e,t),this.typeMap[i]=e},$.prototype.mapTypes=function(e,t,n){function i(e){return r(e,!0)}function r(n,i){var r=Bo(n,Io(n)?"":e.prefix);a.mapTypes(r,t,i)}var o=Io(e.name)?{name:e.name}:this.typeMap[e.name],a=this;if(!o)throw new Error("unknown type <"+e.name+">");sn(o.superClass,n?i:r),t(o,!n),sn(o.traits,i)},$.prototype.getEffectiveDescriptor=function(e){var t=Bo(e),n=new To(t);this.mapTypes(t,function(e,t){n.addTrait(e,t)});var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},$.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};var jo=Mo.parseName,Fo=H;H.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},H.prototype.getType=function(e){var t=this.typeCache,n=xo(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},H.prototype.createAny=function(e,t,n){var i=jo(e),r={$type:e,$instanceOf:function(e){return e===this.$type}},o={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};return this.properties.defineDescriptor(r,o),this.properties.defineModel(r,this),this.properties.define(r,"$parent",{enumerable:!1,writable:!0}),sn(n,function(e,t){_t(e)&&void 0!==e.value?r[e.name]=e.value:r[t]=e}),r},H.prototype.getPackage=function(e){return this.registry.getPackage(e)},H.prototype.getPackages=function(){return this.registry.getPackages()},H.prototype.getElementDescriptor=function(e){return e.$descriptor},H.prototype.hasType=function(e,t){void 0===t&&(t=e,e=this);return t in e.$model.getElementDescriptor(e).allTypesByName},H.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},H.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var Vo=Fo,Wo=function(e){return e.length>3&&-1!==e.indexOf("&")?e.replace($o,U):e},zo=String.fromCharCode,Go=Object.prototype.hasOwnProperty,$o=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,Ko={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(Ko).forEach(function(e){Ko[e.toUpperCase()]=Ko[e]});var Ho=te,Uo="http://www.w3.org/2001/XMLSchema-instance",Yo="xsi",qo="xsi:type",Xo={};!function(e){"use strict";function t(){this.data=[null],this.top=0}function n(){return new t}t.prototype.clear=function(){return this.data=[null],this.top=0,this},t.prototype.length=function(){return this.top},t.prototype.peek=function(){return this.data[this.top]},t.prototype.pop=function(){return this.top>0?(this.top--,this.data.pop()):void 0},t.prototype.push=function(e){return this.data[++this.top]=e,this},void 0!==Xo?Xo=n:e.stack=n}(this);var Zo={},Jo=Mo.parseName,Qo=Oo.coerceType,ea=Oo.isSimple,ta=Ao.XSI_TYPE,na=Ao.serializeAsType,ia=Ao.hasLowerCaseAlias;oe.prototype.handleEnd=function(){},oe.prototype.handleText=function(){},oe.prototype.handleNode=function(){},(ae.prototype=Object.create(oe.prototype)).handleNode=function(){return this},(se.prototype=Object.create(oe.prototype)).handleText=function(e){this.body=(this.body||"")+e},(le.prototype=Object.create(se.prototype)).handleNode=function(e){if(this.element)throw ie("expected no sub nodes");return this.element=this.createReference(e),this},le.prototype.handleEnd=function(){this.element.id=this.body},le.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},(pe.prototype=Object.create(se.prototype)).handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=Qo(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},(ce.prototype=Object.create(se.prototype)).handleNode=function(e){var t=this,n=this.element;return n?t=this.handleChild(e):(n=this.element=this.createElement(e),this.context.addElement(n)),t},(ue.prototype=Object.create(ce.prototype)).addReference=function(e){this.context.addReference(e)},ue.prototype.handleEnd=function(){var e=this.body,t=this.element,n=re(t).bodyProperty;n&&void 0!==e&&(e=Qo(n.type,e),t.set(n.name,e))},ue.prototype.createElement=function(e){var t=e.attributes,n=this.type,i=re(n),r=this.context,o=new n({});return sn(t,function(e,t){var n,a=i.propertiesByName[t];a&&a.isReference?a.isMany?(n=e.split(" "),sn(n,function(e){r.addReference({element:o,property:a.ns.name,id:e})})):r.addReference({element:o,property:a.ns.name,id:e}):(a&&(e=Qo(a.type,e)),o.set(t,e))}),o},ue.prototype.getPropertyForNode=function(e){var t,n,i=e.name,r=Jo(i),o=this.type,a=this.model,s=re(o),l=r.name,p=s.propertiesByName[l];if(p)return na(p)&&(t=e.attributes[ta])?(t=function(e,t){var n=Jo(e);return function(e,t){var n=e.name,i=e.localName,r=t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(n,t.getPackage(n.prefix))}(t,a),n=a.getType(t),Ai({},p,{effectiveType:re(n).name})):p;var c=a.getPackage(r.prefix);if(c){if(t=ne(r,c),n=a.getType(t),p=Kr(s.properties,function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)}))return Ai({},p,{effectiveType:re(n).name})}else if(p=Kr(s.properties,function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type}))return p;throw ie("unrecognized element <"+r.name+">")},ue.prototype.toString=function(){return"ElementDescriptor["+re(this.type).name+"]"},ue.prototype.valueHandler=function(e,t){return new pe(e,t)},ue.prototype.referenceHandler=function(e){return new le(e,this.context)},ue.prototype.handler=function(e){return"Element"===e?new he(this.model,e,this.context):new ue(this.model,e,this.context)},ue.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,n=t.effectiveType||t.type,ea(n))return this.valueHandler(t,i);var o=(r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==o&&(t.isMany?i.get(t.name).push(o):i.set(t.name,o),t.isReference?(Ai(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},(fe.prototype=Object.create(ue.prototype)).createElement=function(e){var t=e.name,n=Jo(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),a=o&&ne(n,o)||t;if(!r.hasType(a))throw ie("unexpected element <"+e.originalName+">");return ue.prototype.createElement.call(this,e)},(he.prototype=Object.create(ce.prototype)).createElement=function(e){var t=e.name,n=Jo(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},he.prototype.handleChild=function(e){var t=new he(this.model,"Element",this.context).handleNode(e),n=this.element,i=t.element;return void 0!==i&&((n.$children=n.$children||[]).push(i),i.$parent=n),t},he.prototype.handleText=function(e){this.body=this.body||""+e},he.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},me.prototype.fromXML=function(e,t,n){function i(e,t,n){var i=t(),r=i.line,o=i.column,a=i.data;"<"===a.charAt(0)&&-1!==a.indexOf(" ")&&(a=a.slice(0,a.indexOf(" "))+">");var l="unparsable content "+(a?a+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return s.addWarning({message:l,error:e}),console.warn("could not parse node"),console.warn(e),!0;throw console.error("could not parse document"),console.error(e),ie(l)}var r=t.rootHandler;t instanceof ue?(r=t,t={}):"string"==typeof t?(r=this.handler(t),t={}):"string"==typeof r&&(r=this.handler(r));var o=this.model,a=this.lax,s=new function(e){Ai(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw ie("expected element");var t,n=this.elementsById,i=re(e).idProperty;if(i&&(t=e.get(i.name))){if(n[t])throw ie("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}(Ai({},t,{rootHandler:r})),l=new Ho({proxy:!0}),p=new Xo;r.context=s,p.push(r);var c=o.getPackages().reduce(function(e,t){return e[t.uri]=t.prefix,e},{});l.ns(c).on("openTag",function(e,t,n,r){var o=e.attrs||{},s=Object.keys(o).reduce(function(e,n){var i=t(o[n]);return e[n]=i,e},{});!function(e,t){var n=p.peek();try{p.push(n.handleNode(e))}catch(e){i(e,t,a)&&p.push(new ae)}}({name:e.name,originalName:e.originalName,attributes:s,ns:e.ns},r)}).on("closeTag",function(){p.pop().handleEnd()}).on("cdata",function(e){p.peek().handleText(e)}).on("text",function(e){(e=e.trim())&&p.peek().handleText(e)}).on("error",i).on("warn",function(e,t){return i(e,t,!0)}),_o(function(){var t;try{l.parse(e),function(){var e,t,n=s.elementsById,i=s.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],a=re(r).propertiesByName[t.property];if(o||s.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),a.isMany){var l=r.get(a.name),p=l.indexOf(t);-1===p&&(p=l.length),o?l[p]=o:l.splice(p,1)}else r.set(a.name,o)}}()}catch(e){t=e}var i=r.element;t||i||(t=ie("failed to parse document as <"+r.type.$descriptor.name+">")),n(t,t?void 0:i,s)})},me.prototype.handler=function(e){return new fe(this.model,e)},(Zo=me).ElementHandler=ue;var ra=Mo.parseName,oa=Ao.hasLowerCaseAlias,aa=Ao.serializeAsType,sa=Ao.serializeAsProperty,la='\n',pa=/(<|>|'|"|&|\n\r|\n)/g,ca=Ao.DEFAULT_NS_MAP,ua=Ao.XSI_TYPE,fa={"\n":"10","\n\r":"10",'"':"34","'":"39","<":"60",">":"62","&":"38"};be.prototype.build=function(e){return this.element=e,this},be.prototype.serializeTo=function(e){e.appendIndent().append("<"+ye(this.ns)+">"+this.element.id+"").appendNewLine()},xe.prototype.serializeValue=xe.prototype.serializeTo=function(e){var t=this.escape;t&&e.append("")},xe.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(pa)&&(this.escape=!0),this},de(we,xe),we.prototype.serializeTo=function(e){e.appendIndent().append("<"+ye(this.ns)+">"),this.serializeValue(e),e.append("").appendNewLine()},Ee.prototype.build=function(e){this.element=e;var t=this.parseNsAttributes(e);if(this.ns||(this.ns=this.nsTagName(e.$descriptor)),e.$descriptor.isGeneric)this.parseGeneric(e);else{var n=function(e){var t=e.$descriptor;return zr(t.properties,function(t){var n=t.name;if(t.isVirtual)return!1;if(!e.hasOwnProperty(n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)})}(e);this.parseAttributes(function(e){return zr(e,function(e){return e.isAttr})}(n)),this.parseContainments(function(e){return zr(e,function(e){return!e.isAttr})}(n)),this.parseGenericAttributes(e,t)}return this},Ee.prototype.nsTagName=function(e){return ge(this.logNamespaceUsed(e.ns),e)},Ee.prototype.nsPropertyTagName=function(e){return function(e,t){return Ai({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},Ee.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},Ee.prototype.nsAttributeName=function(e){var t;if(t=xo(e)?ra(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.isLocalNs(n)?{localName:t.localName}:Ai({localName:t.localName},n)},Ee.prototype.parseGeneric=function(e){var t=this,n=this.body,i=this.attrs;sn(e,function(e,r){"$body"===r?n.push((new xe).build({type:"String"},e)):"$children"===r?sn(e,function(e){n.push(new Ee(t).build(e))}):0!==r.indexOf("$")&&i.push({name:r,value:ve(e)})})},Ee.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,i=e.$model,r=[];return sn(n,function(e,n){var o,a=ra(n);"xmlns"===a.prefix&&(o={prefix:a.localName,uri:e}),a.prefix||"xmlns"!==a.localName||(o={uri:e}),o?i.getPackage(e)?t.logNamespace(o,!0):t.logNamespaceUsed(o):r.push({name:n,value:e})}),r},Ee.prototype.parseGenericAttributes=function(e,t){var n=this;sn(t,function(t){if(t.name!==ua)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,n)}})},Ee.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;sn(e,function(e){var r=i.get(e.name),o=e.isReference,a=e.isMany,s=t.nsPropertyTagName(e);if(a||(r=[r]),e.isBody)n.push((new xe).build(e,r[0]));else if(Oo.isSimple(e.type))sn(r,function(t){n.push(new we(s).build(e,t))});else if(o)sn(r,function(e){n.push(new be(t,s).build(e))});else{var l=aa(e),p=sa(e);sn(r,function(e){var i;i=l?new _e(t,s):p?new Ee(t,s):new Ee(t),n.push(i.build(e))})}})},Ee.prototype.getNamespaces=function(){var e=this.namespaces,t=this.parent;return e||(e=this.namespaces=t?t.getNamespaces():{prefixMap:{},uriMap:{},used:{},wellknown:[],custom:[]}),e},Ee.prototype.logNamespace=function(e,t){var n=this.getNamespaces(),i=e.uri;return n.uriMap[i]||(n.uriMap[i]=e,t?n.wellknown.push(e):n.custom.push(e)),n.prefixMap[e.prefix]=i,e},Ee.prototype.logNamespaceUsed=function(e){var t,n,i,r=this.element.$model,o=this.getNamespaces(),a=e.prefix,s=e.uri;if(!a&&!s)return{localName:e.localName};if(i=ca[a]||r&&(r.getPackage(a)||{}).uri,!(s=s||i||o.prefixMap[a]))throw new Error("no namespace uri given for prefix <"+a+">");if(!(e=o.uriMap[s])){for(t=a,n=1;o.prefixMap[t];)t=a+"_"+n++;e=this.logNamespace({prefix:t,uri:s},i===s)}return o.used[e.uri]||(o.used[e.uri]=e),e},Ee.prototype.parseAttributes=function(e){var t=this,n=this.element;sn(e,function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];sn(i,function(e){r.push(e.id)}),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)})},Ee.prototype.addAttribute=function(e,t){var n=this.attrs;xo(t)&&(t=ve(t)),n.push({name:e,value:t})},Ee.prototype.serializeAttributes=function(e){var t=this.attrs;!this.parent&&(t=function(e){var t=[].concat(e.wellknown,e.custom);return Pr(zr(t,function(t){return e.used[t.uri]}),function(e){return{name:"xmlns"+(e.prefix?":"+e.prefix:""),value:e.uri}})}(this.namespaces).concat(t)),sn(t,function(t){e.append(" ").append(ye(t.name)).append('="').append(t.value).append('"')})},Ee.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==xe;e.appendIndent().append("<"+ye(this.ns)),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),sn(this.body,function(t){t.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append("")),e.appendNewLine()},de(_e,Ee),_e.prototype.build=function(e){var t=e.$descriptor;this.element=e,this.typeNs=this.nsTagName(t);var n=this.typeNs,i=e.$model.getPackage(n.uri),r=i.xml&&i.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(ua),(n.prefix?n.prefix+":":"")+r+t.ns.localName),Ee.prototype.build.call(this,e)},_e.prototype.isLocalNs=function(e){return e.uri===this.typeNs.uri};var ha=function(e){return e=Ai({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new function(){this.value="",this.write=function(e){this.value+=e}},r=new function(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}(i,e.format);if(e.preamble&&r.append(la),(new Ee).build(t).serializeTo(r),!n)return i.value}}},ma=Ae;(Ae.prototype=Object.create(Vo.prototype)).fromXML=function(e,t,n,i){xo(t)||(i=n,n=t,t="bpmn:Definitions"),kt(n)&&(i=n,n={});var r=new Zo(Ai({model:this,lax:!0},n)),o=r.handler(t);r.fromXML(e,o,i)},Ae.prototype.toXML=function(e,t,n){kt(t)&&(n=t,t={});var i=new ha(t);try{n(null,i.toXML(e))}catch(e){n(e)}};var da={bpmn:{name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",type:"String",isAttr:!0}]},{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",type:"String",isAttr:!0}]},{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",type:"LaneSet",isMany:!0,replaces:"FlowElementsContainer#laneSets"},{name:"flowElements",type:"FlowElement",isMany:!0,replaces:"FlowElementsContainer#flowElements"},{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"},{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",isAttr:!0,isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"assignment",type:"Assignment",isMany:!0},{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isVirtual:!0,isMany:!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",isVirtual:!0,isMany:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isVirtual:!0,isMany:!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:"participantRefs",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",type:"String",isBody:!0}]},{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",type:"String",isAttr:!0},{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",isVirtual:!0,isMany:!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",isVirtual:!0,isMany:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isVirtual:!0,isMany:!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"}]},{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:"participantRefs",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:["FlowElementsContainer","Collaboration"]},{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",isVirtual:!0,isMany:!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:"Expression",xml:{serialize:"xsi:type"}}]},{name:"CallActivity",superClass:["Activity"],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}]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],enumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],prefix:"bpmn",xml:{tagAlias:"lowerCase",typePrefix:"t"}},bpmndi:{name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],enumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[],prefix:"bpmndi"},dc:{name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],prefix:"dc",associations:[]},di:{name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0},{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,isVirtual:!0,isMany:!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",type:"String",isAttr:!0,isId:!0},{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,isVirtual:!0,isMany:!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",isVirtual:!0,isMany:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isVirtual:!0,isMany:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0}]},{name:"Extension",properties:[{name:"values",type:"Element",isMany:!0}]}],associations:[],prefix:"di",xml:{tagAlias:"lowerCase"}},bioc:{name:"bpmn.io colors for BPMN",uri:"http://bpmn.io/schema/bpmn/biocolor/1.0",prefix:"bioc",types:[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]}},ya=function(e,t){return new ma(Ai({},da,e),t)},ga={};ga.remove=function(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return-1!==n&&e.splice(n,1),n},ga.add=function(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}};var va=function(e,t){return function(n,i,r){var o=t?t():{};if(i=hi(i,r,3),Xt(n))for(var a=-1,s=n.length;++at?i(h,l):f=setTimeout(r,e)}function o(){i(y,f)}function a(){if(s=arguments,c=Aa(),u=this,h=y&&(f||!g),!1===d)var n=g&&!f;else{l||g||(m=c);var i=d-(c-m),a=i<=0||i>d;a?(l&&(l=clearTimeout(l)),m=c,p=e.apply(u,s)):l||(l=setTimeout(o,i))}return a&&f?f=clearTimeout(f):f||t===d||(f=setTimeout(r,t)),n&&(a=!0,p=e.apply(u,s)),!a||f||l||(s=u=void 0),p}var s,l,p,c,u,f,h,m=0,d=!1,y=!0;if("function"!=typeof e)throw new TypeError(Sa);if(t=t<0?0:+t||0,!0===n){var g=!0;y=!1}else _t(n)&&(g=!!n.leading,d="maxWait"in n&&Ra(+n.maxWait||0,t),y="trailing"in n?!!n.trailing:y);return a.cancel=function(){f&&clearTimeout(f),l&&clearTimeout(l),m=0,l=f=h=void 0},a},Ma=wn.createMatrix,ka={shape:["x","y","width","height"],connection:["waypoints"]};ke.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"];var Pa=ke;ke.prototype._init=function(e){var t=this._eventBus,n=this._container=function(e){var t=(e=Ai({},{width:"100%",height:"100%"},e)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container"),Ai(n.style,{position:"relative",overflow:"hidden",width:Ce(e.width),height:Ce(e.height)}),t.appendChild(n),n}(e),i=this._svg=bn("svg");hn(i,{width:"100%",height:"100%"}),zi(n,i);var r=this._viewport=Me(i,"viewport");this._layers={},!1!==e.deferUpdate&&(this._viewboxChanged=Ca(this._viewboxChanged,300)),t.on("diagram.init",function(){t.fire("canvas.init",{svg:i,viewport:r}),this.resized()},this),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)},ke.prototype._destroy=function(e){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});var t=this._container.parentNode;t&&t.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._rootElement,delete this._viewport},ke.prototype._clear=function(){var e=this;this._elementRegistry.getAll().forEach(function(t){var n=_a.getType(t);"root"===n?e.setRootElement(null,!0):e._removeElement(t,n)}),delete this._cachedViewbox},ke.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},ke.prototype.getLayer=function(e,t){if(!e)throw new Error("must specify a name");var n=this._layers[e];if(n||(n=this._layers[e]=this._createLayer(e,t)),void 0!==t&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group},ke.prototype._createLayer=function(e,t){t||(t=0);var n=di(this._layers,function(e,n){return t>=n.index&&e++,e},0);return{group:Me(this._viewport,"layer-"+e,n),index:t}},ke.prototype.getContainer=function(){return this._container},ke.prototype._updateMarker=function(e,t,n){var i;e.id||(e=this._elementRegistry.get(e)),(i=this._elementRegistry._elements[e.id])&&(sn([i.gfx,i.secondaryGfx],function(e){e&&(n?rr(e).add(t):rr(e).remove(t))}),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},ke.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},ke.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},ke.prototype.hasMarker=function(e,t){e.id||(e=this._elementRegistry.get(e));var n=this.getGraphics(e);return rr(n).has(t)},ke.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},ke.prototype.getRootElement=function(){return this._rootElement||this.setRootElement({id:"__implicitroot",children:[]}),this._rootElement},ke.prototype.setRootElement=function(e,t){e&&this._ensureValid("root",e);var n=this._rootElement,i=this._elementRegistry,r=this._eventBus;if(n){if(!t)throw new Error("rootElement already set, need to specify override");r.fire("root.remove",{element:n}),r.fire("root.removed",{element:n}),i.remove(n)}if(e){var o=this.getDefaultLayer();r.fire("root.add",{element:e}),i.add(e,o,this._svg),r.fire("root.added",{element:e,gfx:o})}return this._rootElement=e,e},ke.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 with id "+t.id+" already exists");var n=ka[e];if(!Qi(n,function(e){return void 0!==t[e]}))throw new Error("must supply { "+n.join(", ")+" } with "+e)},ke.prototype._setParent=function(e,t,n){ga.add(t.children,e,n),e.parent=t},ke.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();var r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),r.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);var a=o.create(e,t);return this._elementRegistry.add(t,a),o.update(e,t,a),r.fire(e+".added",{element:t,gfx:a}),t},ke.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},ke.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},ke.prototype._removeElement=function(e,t){var n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(e=n.get(e.id||e))return r.fire(t+".remove",{element:e}),i.remove(e),ga.remove(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},ke.prototype.removeShape=function(e){return this._removeElement(e,"shape")},ke.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},ke.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},ke.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},ke.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},ke.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return this._cachedViewbox;var t,n,i,r,o,a=this._viewport,s=this.getSize();if(!e){t=this.getDefaultLayer().getBBox();var l=_n(a);return n=l?l.matrix:Ma(),i=Re(n.a,1e3),r=Re(-n.e||0,1e3),o=Re(-n.f||0,1e3),e=this._cachedViewbox={x:r?r/i:0,y:o?o/i:0,width:s.width/i,height:s.height/i,scale:i,inner:{width:t.width,height:t.height,x:t.x,y:t.y},outer:s}}return this._changeViewbox(function(){i=Math.min(s.width/e.width,s.height/e.height);var t=this._svg.createSVGMatrix().scale(i).translate(-e.x,-e.y);_n(a,t)}),e},ke.prototype.scroll=function(e){var t=this._viewport,n=t.getCTM();return e&&this._changeViewbox(function(){e=Ai({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),Pe(t,n)}),{x:n.e,y:n.f}},ke.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if("fit-viewport"===e)return this._fitViewport(t);var n,i;return this._changeViewbox(function(){"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)}),Re(i.a,1e3)},ke.prototype._fitViewport=function(e){var t,n,i=this.viewbox(),r=i.outer,o=i.inner;return o.x>=0&&o.y>=0&&o.x+o.width<=r.width&&o.y+o.height<=r.height&&!e?n={x:0,y:0,width:Math.max(o.width+o.x,r.width),height:Math.max(o.height+o.y,r.height)}:(t=Math.min(1,r.width/o.width,r.height/o.height),n={x:o.x+(e?o.width/2-r.width/t/2:0),y:o.y+(e?o.height/2-r.height/t/2:0),width:r.width/t,height:r.height/t}),this.viewbox(n),this.viewbox(!1).scale},ke.prototype._setZoom=function(e,t){var n,i,r,o,a=this._svg,s=this._viewport,l=a.createSVGMatrix(),p=a.createSVGPoint(),c=(i=s.getCTM()).a;return t?(n=Ai(p,t).matrixTransform(i.inverse()),r=l.translate(n.x,n.y).scale(1/c*e).translate(-n.x,-n.y),o=i.multiply(r)):o=l.scale(e),Pe(this._viewport,o),o},ke.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},ke.prototype.getAbsoluteBBox=function(e){var t,n=this.viewbox();if(e.waypoints){t=this.getGraphics(e).getBBox()}else t=e;return{x:t.x*n.scale-n.x*n.scale,y:t.y*n.scale-n.y*n.scale,width:t.width*n.scale,height:t.height*n.scale}},ke.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Ta={},Oa=new Ur({name:"children",enumerable:!0,collection:!0},{name:"parent"}),Da=new Ur({name:"label",enumerable:!0},{name:"labelTarget"}),Na=new Ur({name:"attachers",collection:!0},{name:"host"}),Ba=new Ur({name:"outgoing",collection:!0},{name:"source"}),Ia=new Ur({name:"incoming",collection:!0},{name:"target"});Xi(Oe,Te),Xi(De,Oe),Xi(Ne,Oe),Xi(Be,Te);var La={connection:Be,shape:Oe,label:Ne,root:De};Ta.create=function(e,t){var n=La[e];if(!n)throw new Error("unknown type: <"+e+">");return Ai(new n,t)};var ja=Ie;Ie.prototype.createRoot=function(e){return this.create("root",e)},Ie.prototype.createLabel=function(e){return this.create("label",e)},Ie.prototype.createShape=function(e){return this.create("shape",e)},Ie.prototype.createConnection=function(e){return this.create("connection",e)},Ie.prototype.create=function(e,t){return(t=Ai({},t||{})).id||(t.id=e+"_"+this._uid++),Ta.create(e,t)};var Fa="data-element-id";Le.$inject=["eventBus"];var Va=Le;Le.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),hn(t,Fa,i),n&&hn(n,Fa,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},Le.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(hn(i.gfx,Fa,""),i.secondaryGfx&&hn(i.secondaryGfx,Fa,""),delete t[n])},Le.prototype.updateId=function(e,t){this._validateId(t),"string"==typeof e&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t});var n=this.getGraphics(e),i=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,i)},Le.prototype.get=function(e){var t;t="string"==typeof e?e:e&&hn(e,Fa);var n=this._elements[t];return n&&n.element},Le.prototype.filter=function(e){var t=[];return this.forEach(function(n,i){e(n,i)&&t.push(n)}),t},Le.prototype.getAll=function(){return this.filter(function(e){return e})},Le.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach(function(n){var i=t[n],r=i.element,o=i.gfx;return e(r,o)})},Le.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},Le.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")};var Wa={};(function(e){var t=It(e,"WeakMap"),n=t&&new t;Wa=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var za=Wa?function(e,t){return Wa.set(e,t),e}:on,Ga=function(){function e(){}return function(t){if(_t(t)){e.prototype=t;var n=new e;e.prototype=void 0}return n||{}}}(),$a=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Ga(e.prototype),i=e.apply(n,t);return _t(i)?i:n}},Ka={};(function(e){Ka=function(t,n){function i(){return(this&&this!==e&&this instanceof i?r:t).apply(n,arguments)}var r=$a(t);return i}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var Ha=Math.max,Ua=function(e,t,n){for(var i=n.length,r=-1,o=Ha(e.length-i,0),a=-1,s=t.length,l=Array(s+o);++a0){if(++e>=150)return n}else e=0;return za(n,i)}}(),fs={};(function(e){function t(u,f,h,m,d,y,g,v,b,x){function w(){for(var r=arguments.length,o=r,a=Array(r);o--;)a[o]=arguments[o];if(m&&(a=Ua(a,m,d)),y&&(a=qa(a,y,g)),S||C){var p=w.placeholder,k=cs(a,p);if((r-=k.length) ");return n.length=0,new Error(t?e+" (Resolving: "+t+")":e)},s=function(e,o){if(!i[e]&&-1!==e.indexOf(".")){for(var l=e.split("."),p=s(l.shift());l.length;)p=p[l.shift()];return p}if(Object.hasOwnProperty.call(r,e))return r[e];if(Object.hasOwnProperty.call(i,e)){if(-1!==n.indexOf(e))throw n.push(e),a("Cannot resolve circular dependency!");return n.push(e),r[e]=i[e][0](i[e][1]),n.pop(),r[e]}return t.get(e,o)},l=function(e){var t=Object.create(e.prototype),n=p(e,t);return"object"==typeof n?n:t},p=function(e,t){if("function"!=typeof e){if(!Ys(e))throw new Error('Cannot invoke "'+e+'". Expected a function!');e=Us(e.slice())}var n=(e.$inject&&e.$inject||Hs(e)).map(function(e){return s(e)});return e.apply(t,n)},c=function(e){return Us(function(t){return e.get(t)})},u={factory:p,type:l,value:function(e){return e}};e.forEach(function(e){function t(e,t){return"value"!==e&&Ys(t)&&(t=Us(t.slice())),t}if(e instanceof Ks)e.forEach(function(e){var n=e[0],r=e[1],o=e[2];i[n]=[u[r],t(r,o),r]});else if("object"==typeof e)if(e.__exports__){var n=Object.keys(e).reduce(function(t,n){return"__"!==n.substring(0,2)&&(t[n]=e[n]),t},Object.create(null)),r=new qs((e.__modules__||[]).concat([n]),o),a=Us(function(e){return r.get(e)});e.__exports__.forEach(function(e){i[e]=[a,e,"private",r]})}else Object.keys(e).forEach(function(n){if("private"!==e[n][2]){var r=e[n][0],o=e[n][1];i[n]=[u[r],t(r,o),r]}else i[n]=e[n]})}),this.get=s,this.invoke=p,this.instantiate=l,this.createChild=function(e,t){if(t&&t.length){var n,r,a,s,l=Object.create(null),p=Object.create(null),u=[],f=[],h=[];for(var m in i)n=i[m],-1!==t.indexOf(m)&&("private"===n[2]?-1===(r=u.indexOf(n[3]))?(a=n[3].createChild([],t),s=c(a),u.push(n[3]),f.push(a),h.push(s),l[m]=[s,m,"private",a]):l[m]=[h[r],m,"private",f[r]]:l[m]=[n[2],n[1]],p[m]=!0),"factory"!==n[2]&&"type"!==n[2]||!n[1].$scope||t.forEach(function(e){-1!==n[1].$scope.indexOf(e)&&(l[m]=[n[2],n[1]],p[e]=!0)});t.forEach(function(e){if(!p[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')}),e.unshift(l)}return new qs(e,o)}},Xs={Injector:qs},Zs=He;He.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},He.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};var Js=Zs,Qs=Ue;Ue.prototype.next=function(){return this._prefix+ ++this._counter};var el=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n');this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Qe.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Ze(this._overlayRoot,n)},Qe.prototype._getOverlayContainer=function(e,t){var n=Kr(this._overlayContainers,function(t){return t.element===e});return n||t?n:this._createOverlayContainer(e)},Qe.prototype._addOverlay=function(e){var t,n,i=e.id,r=e.element,o=e.html;o.get&&o.constructor.prototype.jquery&&(o=o.get(0)),xo(o)&&(o=ho(o)),n=this._getOverlayContainer(r),(t=ho('
')).appendChild(o),e.type&&il(t).add("djs-overlay-"+e.type),e.htmlContainer=t,n.overlays.push(e),n.html.appendChild(t),this._overlays[i]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Qe.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,i=n&&n.minZoom,r=n&&n.maxZoom,o=e.htmlContainer,a=!0;n&&((Je(i)&&i>t.scale||Je(r)&&ri&&(r=(1/t.scale||1)*i)),Je(r)&&(s="scale("+r+","+r+")"),Ze(a,s)},Qe.prototype._updateOverlaysVisibilty=function(e){var t=this;sn(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})},Qe.prototype._init=function(){var e=this._eventBus,t=this;e.on("canvas.viewbox.changing",function(e){t.hide()}),e.on("canvas.viewbox.changed",function(e){!function(e){t._updateRoot(e),t._updateOverlaysVisibilty(e),t.show()}(e.viewbox)}),e.on(["shape.remove","connection.remove"],function(e){var n=e.element,i=t.get({element:n});sn(i,function(e){t.remove(e.id)});var r=t._getOverlayContainer(n);if(r){rl(r.html);var o=t._overlayContainers.indexOf(r);-1!==o&&t._overlayContainers.splice(o,1)}}),e.on("element.changed",500,function(e){var n=e.element,i=t._getOverlayContainer(n,!0);i&&(sn(i.overlays,function(e){t._updateOverlay(e)}),t._updateOverlayContainer(i))}),e.on("element.marker.update",function(e){var n=t._getOverlayContainer(e.element,!0);n&&il(n.html)[e.add?"add":"remove"](e.marker)}),e.on("diagram.clear",this.clear,this)};var ll={__init__:["overlays"],overlays:["type",sl]},pl={};pl.getOriginal=nt,pl.stopEvent=function(e,t){rt(e,t),it(e)},pl.toPoint=function(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null};var cl={};cl.isMac=function(){return/mac/i.test(navigator.platform)};var ul={},fl=pl.getOriginal,hl=cl.isMac;ul.isPrimaryButton=ot,ul.hasPrimaryModifier=function(e){var t=fl(e)||e;return!!ot(e)&&(hl()?t.metaKey:t.ctrlKey)},ul.hasSecondaryModifier=function(e){var t=fl(e)||e;return ot(e)&&t.shiftKey};var ml=ul.isPrimaryButton,dl=xn.createLine,yl=xn.updateLine,gl=500;at.$inject=["eventBus","elementRegistry","styles"];var vl={__init__:["interactionEvents"],interactionEvents:["type",at]},bl=_a.getBBox,xl=500;st.prototype.updateShapeOutline=function(e,t){hn(e,{x:-this.offset,y:-this.offset,width:t.width+2*this.offset,height:t.height+2*this.offset})},st.prototype.updateConnectionOutline=function(e,t){var n=bl(t);hn(e,{x:n.x-this.offset,y:n.y-this.offset,width:n.width+2*this.offset,height:n.height+2*this.offset})},st.$inject=["eventBus","styles","elementRegistry"];var wl={__init__:["outline"],outline:["type",st]};lt.$inject=["eventBus"];var El=lt;lt.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(-1!==n){var i=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:t})}},lt.prototype.get=function(){return this._selectedElements},lt.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},lt.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();Xt(e)||(e=e?[e]:[]),t?sn(e,function(e){-1===n.indexOf(e)&&n.push(e)}):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:n})};var _l=ul.hasPrimaryModifier;pt.$inject=["eventBus","selection","canvas","elementRegistry"];var Al=pt,Sl="hover",Rl="selected";ct.$inject=["eventBus","canvas","selection","styles"];var Cl={__init__:["selectionVisuals","selectionBehavior"],__depends__:[vl,wl],selection:["type",El],selectionVisuals:["type",ct],selectionBehavior:["type",Al]},Ml=function(e,t,n){for(var i=e.length,r=t+(n?0:-1);n?r--:++r=Nl?Dl(t):null,l=t.length;s&&(o=Pl,a=!1,t=s);e:for(;++r]{1})/g,Wl=/([\n\r"]{1})/g,zl={"&":"&","<":"<",">":">",'"':"'"},Gl=ht,$l={width:"100%",height:"100%",position:"relative"};Xi(dt,Js);var Kl=dt;dt.prototype.importXML=function(e,t){t=t||function(){};var n=this;e=this._emit("import.parse.start",{xml:e})||e,this._moddle.fromXML(e,"bpmn:Definitions",function(e,i,r){i=n._emit("import.parse.complete",{error:e,definitions:i,context:r})||i;var o=r.warnings;if(e)return e=function(e){var t=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);return t&&(e.message="unparsable content <"+t[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+t[2]),e}(e),n._emit("import.done",{error:e,warnings:o}),t(e,o);n.importDefinitions(i,function(e,i){var r=[].concat(o,i||[]);n._emit("import.done",{error:e,warnings:r}),t(e,r)})})},dt.prototype.saveXML=function(e,t){t||(t=e,e={});var n=this._definitions;if(!n)return t(new Error("no definitions loaded"));this._moddle.toXML(n,e,t)},dt.prototype.saveSVG=function(e,t){t||(t=e,e={});var n=this.get("canvas"),i=n.getDefaultLayer(),r=ir("defs",n._svg),o=Gl(i),a=r?""+Gl(r)+"":"",s=i.getBBox();t(null,'\n\x3c!-- created with bpmn-js / http://bpmn.io --\x3e\n\n'+a+o+"")},dt.prototype.importDefinitions=function(e,t){try{this._definitions&&this.clear(),this._definitions=e,Zr.importBpmnDiagram(this,e,t)}catch(e){t(e)}},dt.prototype.getModules=function(){return this._modules},dt.prototype.destroy=function(){Js.prototype.destroy.call(this),rl(this._container)},dt.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},dt.prototype.off=function(e,t){this.get("eventBus").off(e,t)},dt.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),"string"==typeof e&&(e=ir(e)),e.appendChild(this._container),this._emit("attach",{})},dt.prototype.detach=function(){var e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},dt.prototype._init=function(e,t,n){var i=n.modules||this.getModules(),r=n.additionalModules||[],o=[].concat([{bpmnjs:["value",this],moddle:["value",t]}],i,r),a=Ai(Il(n,"additionalModules"),{canvas:Ai({},n.canvas,{container:e}),modules:o});Js.call(this,a),n&&n.container&&this.attachTo(n.container)},dt.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},dt.prototype._createContainer=function(e){var t=ho('
');return Ai(t.style,{width:mt(e.width),height:mt(e.height),position:e.position}),t},dt.prototype._createModdle=function(e){var t=Ai({},this._moddleExtensions,e.moddleExtensions);return new ya(t)},dt.prototype._modules=[Fr,jr,Cl,ll],dt.prototype._moddleExtensions={};var Hl={},Ul=pl.stopEvent;Hl.install=function(){return gt(!0),function(){gt(!1)}};var Yl={},ql=/^djs-cursor-.*$/;Yl.set=function(e){var t=il(document.body);t.removeMatching(ql),e&&t.add("djs-cursor-"+e)},Yl.unset=function(){this.set(null)};var Xl={};Xl.log10=function(e){return Math.log(e)/Math.log(10)},Xl.substract=function(e,t){return{x:e.x-t.x,y:e.y-t.y}};var Zl=to,Jl=Xl.substract,Ql=15;vt.$inject=["eventBus","canvas"];var ep={__init__:["moveCanvas"],moveCanvas:["type",vt]},tp={},np=Xl.log10;tp.getStepSize=function(e,t){var n=np(e.min),i=np(e.max);return(Math.abs(n)+Math.abs(i))/t},tp.cap=function(e,t){return Math.max(e.min,Math.min(e.max,t))};var ip=ul.hasPrimaryModifier,rp=ul.hasSecondaryModifier,op=cl.isMac,ap=tp.getStepSize,sp=tp.cap,lp=Xl.log10,pp={min:.2,max:4};bt.$inject=["eventBus","canvas","config.zoomScroll"];var cp=bt;bt.prototype.scroll=function(e){this._canvas.scroll(e)},bt.prototype.reset=function(){this._canvas.zoom("fit-viewport")},bt.prototype.zoom=function(e,t){var n=ap(pp,20);this.totalDelta+=e,Math.abs(this.totalDelta)>.1&&(this._zoom(e,t,n),this.totalDelta=0)},bt.prototype._handleWheel=function(e){if(!Zl(e.target,".djs-scrollable",!0)){var t=this._container;e.preventDefault();var n,i=ip(e),r=rp(e);if(i||r){n=op?0===e.deltaMode?1.25:50:0===e.deltaMode?.025:.5;var o={};r?o.dx=n*(e.deltaX||e.deltaY):o.dy=n*e.deltaY,this.scroll(o)}else{n=0===e.deltaMode?.025:.5;var a=t.getBoundingClientRect(),s={x:e.clientX-a.left,y:e.clientY-a.top};this.zoom(e.deltaY*n/-5,s)}}},bt.prototype.stepZoom=function(e,t){var n=ap(pp,10);this._zoom(e,t,n)},bt.prototype._zoom=function(e,t,n){var i=this._canvas,r=e>0?1:-1,o=lp(i.zoom()),a=Math.round(o/n)*n;a+=n*r;var s=Math.pow(10,a);i.zoom(sp(pp,s),t)},bt.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,i=this._enabled;return void 0===e&&(e=!i),i!==e&&Ll[e?"bind":"unbind"](t,"wheel",n,!1),this._enabled=e,e},bt.prototype._init=function(e){this.toggle(e)};var up={__init__:["zoomScroll"],zoomScroll:["type",cp]};Xi(xt,Kl);var fp=xt;return xt.prototype._navigationModules=[up,ep],xt.prototype._modules=[].concat(xt.prototype._modules,xt.prototype._navigationModules),fp});