camunda-bpmn-js 0.12.1 → 0.13.0-drilldown.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/assets/base-modeler.css +2 -1
  3. package/dist/assets/bpmn-js.css +113 -0
  4. package/dist/assets/camunda-platform-modeler.css +2 -1
  5. package/dist/assets/diagram-js.css +82 -78
  6. package/dist/assets/element-templates.css +75 -0
  7. package/dist/assets/properties-panel.css +115 -18
  8. package/dist/base-modeler.development.js +37641 -40582
  9. package/dist/base-modeler.production.min.js +8 -3
  10. package/dist/camunda-cloud-modeler.development.js +41845 -42826
  11. package/dist/camunda-cloud-modeler.production.min.js +8 -3
  12. package/dist/camunda-platform-modeler.development.js +51089 -53714
  13. package/dist/camunda-platform-modeler.production.min.js +8 -3
  14. package/lib/base/Modeler.js +5 -9
  15. package/lib/camunda-cloud/Modeler.js +16 -3
  16. package/lib/camunda-cloud/features/drilldown/index.js +3 -0
  17. package/lib/camunda-cloud/features/modeling/behavior/CleanUpAssignmentDefinitionBehavior.js +78 -0
  18. package/lib/camunda-cloud/features/modeling/behavior/CreateZeebeCallActivityBehavior.js +2 -2
  19. package/lib/camunda-cloud/features/modeling/behavior/FormDefinitionBehavior.js +2 -2
  20. package/lib/camunda-cloud/features/modeling/behavior/index.js +3 -0
  21. package/lib/camunda-cloud/helper/CalledElementHelper.js +1 -1
  22. package/lib/camunda-cloud/helper/ElementHelper.js +18 -0
  23. package/lib/camunda-cloud/helper/ExtensionElementsHelper.js +17 -0
  24. package/lib/camunda-cloud/helper/FormsHelper.js +5 -5
  25. package/lib/camunda-cloud/helper/InputOutputHelper.js +2 -6
  26. package/lib/camunda-cloud/helper/Utils.js +10 -0
  27. package/lib/camunda-cloud/helper/ZeebeServiceTaskHelper.js +22 -5
  28. package/lib/camunda-platform/Modeler.js +7 -3
  29. package/package.json +11 -10
  30. package/styles/base-modeler.css +2 -1
  31. package/styles/camunda-platform-modeler.css +2 -1
  32. package/lib/camunda-cloud/features/properties-provider/ZeebePropertiesProvider.js +0 -201
  33. package/lib/camunda-cloud/features/properties-provider/index.js +0 -11
  34. package/lib/camunda-cloud/features/properties-provider/parts/CallActivityProps.js +0 -90
  35. package/lib/camunda-cloud/features/properties-provider/parts/ErrorProps.js +0 -13
  36. package/lib/camunda-cloud/features/properties-provider/parts/FormProps.js +0 -14
  37. package/lib/camunda-cloud/features/properties-provider/parts/HeadersProps.js +0 -52
  38. package/lib/camunda-cloud/features/properties-provider/parts/InputOutputProps.js +0 -8
  39. package/lib/camunda-cloud/features/properties-provider/parts/MessageProps.js +0 -51
  40. package/lib/camunda-cloud/features/properties-provider/parts/MultiInstanceProps.js +0 -25
  41. package/lib/camunda-cloud/features/properties-provider/parts/SequenceFlowProps.js +0 -149
  42. package/lib/camunda-cloud/features/properties-provider/parts/TaskDefinitionProps.js +0 -135
  43. package/lib/camunda-cloud/features/properties-provider/parts/TimerEventProps.js +0 -77
  44. package/lib/camunda-cloud/features/properties-provider/parts/implementation/ElementReferenceExtensionElementProperty.js +0 -110
  45. package/lib/camunda-cloud/features/properties-provider/parts/implementation/FormDefinition.js +0 -207
  46. package/lib/camunda-cloud/features/properties-provider/parts/implementation/Headers.js +0 -208
  47. package/lib/camunda-cloud/features/properties-provider/parts/implementation/InputOutput.js +0 -274
  48. package/lib/camunda-cloud/features/properties-provider/parts/implementation/InputOutputParameter.js +0 -147
  49. package/lib/camunda-cloud/features/properties-provider/parts/implementation/MultiInstanceLoopCharacteristics.js +0 -176
  50. package/lib/camunda-cloud/features/properties-provider/parts/implementation/OutputParameterToggle.js +0 -97
  51. package/lib/camunda-cloud/features/properties-provider/parts/implementation/TimerDurationDefinition.js +0 -69
  52. package/lib/camunda-cloud/features/properties-provider/parts/implementation/TimerEventDefinition.js +0 -132
@@ -1,8 +1,13 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).BpmnModeler=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})})),t}function n(e){var t={exports:{}};return e(t,t.exports),t.exports}var i=n((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}}));var r=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var t=e.exports=function(e,n){if(n||(n=16),void 0===e&&(e=128),e<=0)return"0";for(var i=Math.log(Math.pow(2,e))/Math.log(n),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,e/r))/Math.log(n)*r;var o=i-Math.floor(i),a="";for(r=0;r<Math.floor(i);r++){a=Math.floor(Math.random()*n).toString(n)+a}if(o){var s=Math.pow(n,o);a=Math.floor(Math.random()*s).toString(n)+a}var c=parseInt(a,n);return c!==1/0&&c>=Math.pow(2,e)?t(e,n):a};t.rack=function(e,n,i){var r=function(r){var a=0;do{if(a++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var s=t(e,n)}while(Object.hasOwnProperty.call(o,s));return o[s]=r,s},o=r.hats={};return r.get=function(e){return r.hats[e]},r.set=function(e,t){return r.hats[e]=t,r},r.bits=e||128,r.base=n||16,r}}));function o(e){if(!(this instanceof o))return new o(e);e=e||[128,36,1],this._seed=e.length?r.rack(e[0],e[1],e[2]):e}o.prototype.next=function(e){return this._seed(e||!0)},o.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},o.prototype.claim=function(e,t){this._seed.set(e,t||!0)},o.prototype.assigned=function(e){return this._seed.get(e)||!1},o.prototype.unclaim=function(e){delete this._seed.hats[e]},o.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};var a=Object.freeze({__proto__:null,default:o});function s(e){return Array.prototype.concat.apply([],e)}var c=Object.prototype.toString,p=Object.prototype.hasOwnProperty;function u(e){return void 0===e}function l(e){return void 0!==e}function d(e){return null==e}function h(e){return"[object Array]"===c.call(e)}function f(e){return"[object Object]"===c.call(e)}function m(e){return"[object Number]"===c.call(e)}function v(e){var t=c.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function g(e){return"[object String]"===c.call(e)}function y(e){if(!h(e))throw new Error("must supply array")}function b(e,t){return p.call(e,t)}function x(e,t){var n;return t=I(t),E(e,(function(e,i){if(t(e,i))return n=e,!1})),n}function _(e,t){t=I(t);var n=h(e)?-1:void 0;return E(e,(function(e,i){if(t(e,i))return n=i,!1})),n}function w(e,t){var n=[];return E(e,(function(e,i){t(e,i)&&n.push(e)})),n}function E(e,t){var n;if(!u(e)){var i=h(e)?F:z;for(var r in e)if(b(e,r)&&!1===t(n=e[r],i(r)))return n}}function S(e,t){return u(e)?[]:(y(e),t=I(t),e.filter((function(e,n){return!t(e,n)})))}function C(e,t,n){return E(e,(function(e,i){n=t(n,e,i)})),n}function P(e,t){return!!C(e,(function(e,n,i){return e&&t(n,i)}),!0)}function T(e,t){return!!x(e,t)}function R(e,t){var n=[];return E(e,(function(e,i){n.push(t(e,i))})),n}function A(e){return e&&Object.keys(e)||[]}function k(e){return A(e).length}function M(e){return R(e,(function(e){return e}))}function D(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=L(t),E(e,(function(e){var i=t(e)||"_",r=n[i];r||(r=n[i]=[]),r.push(e)})),n}function B(e){e=L(e);for(var t={},n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];E(i,(function(n){return D(n,e,t)}));var o=R(t,(function(e,t){return e[0]}));return o}var j=B;function O(e,t){t=L(t);var n=[];return E(e,(function(e,i){for(var r=t(e,i),o={d:r,v:e},a=0;a<n.length;a++){if(r<n[a].d)return void n.splice(a,0,o)}n.push(o)})),R(n,(function(e){return e.v}))}function N(e){return function(t){return P(e,(function(e,n){return t[n]===e}))}}function L(e){return v(e)?e:function(t){return t[e]}}function I(e){return v(e)?e:function(t){return t===e}}function z(e){return e}function F(e){return Number(e)}function $(e,t){var n,i,r,o;function a(){var a=Date.now(),c=o+t-a;if(c>0)return s(c);e.apply(r,i),n=o=i=r=void 0}function s(e){n=setTimeout(a,e)}return function(){o=Date.now();for(var e=arguments.length,a=new Array(e),c=0;c<e;c++)a[c]=arguments[c];i=a,r=this,n||s(t)}}function V(e,t){return e.bind(t)}function H(){return(H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function G(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return H.apply(void 0,[e].concat(n))}function W(e,t){var n={},i=Object(e);return E(t,(function(t){t in i&&(n[t]=e[t])})),n}function q(e,t){var n={};return E(Object(e),(function(e,i){-1===t.indexOf(i)&&(n[i]=e)})),n}var U=Object.freeze({__proto__:null,assign:G,bind:V,debounce:$,ensureArray:y,every:P,filter:w,find:x,findIndex:_,flatten:s,forEach:E,get:function(e,t,n){var i=e;return E(t,(function(e){if(d(i))return i=void 0,!1;i=i[e]})),u(i)?n:i},groupBy:D,has:b,isArray:h,isDefined:l,isFunction:v,isNil:d,isNumber:m,isObject:f,isString:g,isUndefined:u,keys:A,map:R,matchPattern:N,merge:function e(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.length?(E(i,(function(n){n&&f(n)&&E(n,(function(n,i){if("__proto__"!==i){var r=t[i];f(n)?(f(r)||(r={}),t[i]=e(r,n)):t[i]=n}}))})),t):t},omit:q,pick:W,reduce:C,set:function(e,t,n){var i=e;return E(t,(function(e,r){if("__proto__"===e)throw new Error("illegal key: __proto__");var o=t[r+1],a=i[e];l(o)&&d(a)&&(a=i[e]=isNaN(+o)?{}:[]),u(o)?u(n)?delete i[e]:i[e]=n:i=a})),e},size:k,some:T,sortBy:O,throttle:function(e,t){var n=!1;return function(){n||(e.apply(void 0,arguments),n=!0,setTimeout((function(){n=!1}),t))}},unionBy:j,uniqueBy:B,values:M,without:S});function Y(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}var K=[].indexOf,X=function(e,t){if(K)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1},Z=/\s+/,Q=Object.prototype.toString;function J(e){return new ee(e)}function ee(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function te(e){for(var t;e.childNodes.length;)t=e.childNodes[0],e.removeChild(t);return e}ee.prototype.add=function(e){if(this.list)return this.list.add(e),this;var t=this.array();return~X(t,e)||t.push(e),this.el.className=t.join(" "),this},ee.prototype.remove=function(e){if("[object RegExp]"==Q.call(e))return this.removeMatching(e);if(this.list)return this.list.remove(e),this;var t=this.array(),n=X(t,e);return~n&&t.splice(n,1),this.el.className=t.join(" "),this},ee.prototype.removeMatching=function(e){for(var t=this.array(),n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},ee.prototype.toggle=function(e,t){return this.list?(void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this):(void 0!==t?t?this.add(e):this.remove(e):this.has(e)?this.remove(e):this.add(e),this)},ee.prototype.array=function(){var e=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(Z);return""===e[0]&&e.shift(),e},ee.prototype.has=ee.prototype.contains=function(e){return this.list?this.list.contains(e):!!~X(this.array(),e)};var ne="undefined"!=typeof Element?Element.prototype:{},ie=ne.matches||ne.matchesSelector||ne.webkitMatchesSelector||ne.mozMatchesSelector||ne.msMatchesSelector||ne.oMatchesSelector,re=function(e,t){if(!e||1!==e.nodeType)return!1;if(ie)return ie.call(e,t);for(var n=e.parentNode.querySelectorAll(t),i=0;i<n.length;i++)if(n[i]==e)return!0;return!1};function oe(e,t,n){for(var i=n?e:e.parentNode;i&&i.nodeType!==document.DOCUMENT_NODE&&i.nodeType!==document.DOCUMENT_FRAGMENT_NODE;){if(re(i,t))return i;i=i.parentNode}return re(i,t)?i:null}var ae=window.addEventListener?"addEventListener":"attachEvent",se=window.removeEventListener?"removeEventListener":"detachEvent",ce="addEventListener"!==ae?"on":"",pe={bind:function(e,t,n,i){return e[ae](ce+t,n,i||!1),n},unbind:function(e,t,n,i){return e[se](ce+t,n,i||!1),n}},ue=["focus","blur"];var le,de={bind:function(e,t,n,i,r){return-1!==ue.indexOf(n)&&(r=!0),pe.bind(e,n,(function(n){var r=n.target||n.srcElement;n.delegateTarget=oe(r,t,!0),n.delegateTarget&&i.call(e,n)}),r)},unbind:function(e,t,n,i){return-1!==ue.indexOf(t)&&(i=!0),pe.unbind(e,t,n,i)}},he=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var i=n[1];if("body"==i){return(r=t.createElement("html")).innerHTML=e,r.removeChild(r.lastChild)}var r,o=me[i]||me._default,a=o[0],s=o[1],c=o[2];(r=t.createElement("div")).innerHTML=s+e+c;for(;a--;)r=r.lastChild;if(r.firstChild==r.lastChild)return r.removeChild(r.firstChild);var p=t.createDocumentFragment();for(;r.firstChild;)p.appendChild(r.removeChild(r.firstChild));return p},fe=!1;"undefined"!=typeof document&&((le=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',fe=!le.getElementsByTagName("link").length,le=void 0);var me={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:fe?[1,"X<div>","</div>"]:[0,"",""]};function ve(e,t){return(t=t||document).querySelector(e)}function ge(e,t){return(t=t||document).querySelectorAll(e)}function ye(e){e.parentNode&&e.parentNode.removeChild(e)}me.td=me.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],me.option=me.optgroup=[1,'<select multiple="multiple">',"</select>"],me.thead=me.tbody=me.colgroup=me.caption=me.tfoot=[1,"<table>","</table>"],me.polyline=me.ellipse=me.polygon=me.circle=me.text=me.line=me.path=me.rect=me.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var be=Object.freeze({__proto__:null,attr:Y,classes:J,clear:te,closest:oe,delegate:de,domify:he,event:pe,matches:re,query:ve,queryAll:ge,remove:ye});function xe(e,t){return t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}(e,t))}function _e(e,t){return xe(t,e),e}var we={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":2,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":2,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function Ee(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=we[i];r?(2===r&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function Se(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return we[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);Ee(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)Ee(e,i,t[i])}(e,t);return e}function Ce(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}var Pe=/\s+/,Te=Object.prototype.toString;function Re(e){return void 0!==e}function Ae(e){return new ke(e)}function ke(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Me(e){var t=e.parentNode;return t&&t.removeChild(e),e}function De(e){for(var t;t=e.firstChild;)Me(t);return e}function Be(e){return e.cloneNode(!0)}ke.prototype.add=function(e){if(this.list)return this.list.add(e),this;var t=this.array();return~Ce(t,e)||t.push(e),Re(this.el.className.baseVal)?this.el.className.baseVal=t.join(" "):this.el.className=t.join(" "),this},ke.prototype.remove=function(e){if("[object RegExp]"===Te.call(e))return this.removeMatching(e);if(this.list)return this.list.remove(e),this;var t=this.array(),n=Ce(t,e);return~n&&t.splice(n,1),this.el.className.baseVal=t.join(" "),this},ke.prototype.removeMatching=function(e){for(var t=this.array(),n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},ke.prototype.toggle=function(e,t){return this.list?(Re(t)?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this):(Re(t)?t?this.add(e):this.remove(e):this.has(e)?this.remove(e):this.add(e),this)},ke.prototype.array=function(){var e=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(Pe);return""===e[0]&&e.shift(),e},ke.prototype.has=ke.prototype.contains=function(e){return this.list?this.list.contains(e):!!~Ce(this.array(),e)};var je="http://www.w3.org/2000/svg",Oe='<svg xmlns="'+je+'"';function Ne(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(je)&&(e=Oe+e.substring(4)):(e=Oe+">"+e+"</svg>",t=!0);var n=function(e){var t;return(t=new DOMParser).async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function Le(e,t){var n;return"<"===e.charAt(0)?(n=Ne(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(je,e),t&&Se(n,t),n}var Ie=Le("svg");function ze(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}function Fe(e){return e?Ie.createSVGTransformFromMatrix(e):Ie.createSVGTransform()}var $e=/([&<>]{1})/g,Ve=/([\n\r"]{1})/g,He={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function Ge(e,t){return e.replace(t,(function(e,t){return He[t]||t}))}function We(e,t){var n,i,r,o,a;switch(e.nodeType){case 3:t.push(Ge(e.textContent,$e));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n<i;++n)o=r.item(n),t.push(" ",o.name,'="',Ge(o.value,Ve),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,i=(a=e.childNodes).length;n<i;++n)We(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",Ge(e.nodeValue,$e),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function qe(e,t){var n=Ne(t);if(De(e),t){(function(e){return"#document-fragment"===e.nodeName})(n)||(n=n.documentElement);for(var i,r=(i=n.childNodes,Array.prototype.slice.call(i)),o=0;o<r.length;o++)xe(r[o],e)}}function Ue(e,t){if(void 0!==t){try{qe(e,t)}catch(e){throw new Error("error parsing SVG: "+e.message)}return e}return function(e){for(var t=e.firstChild,n=[];t;)We(t,n),t=t.nextSibling;return n.join("")}(e)}function Ye(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function Ke(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(Ye(e,i))}(n,t)),n.consolidate()}var Xe=/^class /;function Ze(e){return"[object Array]"===Object.prototype.toString.call(e)}function Qe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Je(){var e=Array.prototype.slice.call(arguments);1===e.length&&Ze(e[0])&&(e=e[0]);var t=e.pop();return t.$inject=e,t}var et=/constructor\s*[^(]*\(\s*([^)]*)\)/m,tt=/^(?:async )?(?:function\s*)?[^(]*\(\s*([^)]*)\)/m,nt=/\/\*([^*]*)\*\//m;function it(e){if("function"!=typeof e)throw new Error('Cannot annotate "'+e+'". Expected a function!');var t=e.toString().match(function(e){return Xe.test(e.toString())}(e)?et:tt);return t&&t[1]&&t[1].split(",").map((function(e){return(t=e.match(nt))?t[1].trim():e.trim()}))||[]}function rt(){var e=[];this.factory=function(t,n){return e.push([t,"factory",n]),this},this.value=function(t,n){return e.push([t,"value",n]),this},this.type=function(t,n){return e.push([t,"type",n]),this},this.forEach=function(t){e.forEach(t)}}function ot(e,t){t=t||{get:function(e,t){if(n.push(e),!1===t)return null;throw a('No provider for "'+e+'"!')}};var n=[],i=this._providers=Object.create(t._providers||null),r=this._instances=Object.create(null),o=r.injector=this,a=function(e){var t=n.join(" -> ");return n.length=0,new Error(t?e+" (Resolving: "+t+")":e)},s=function(e,o){if(!i[e]&&-1!==e.indexOf(".")){for(var c=e.split("."),p=s(c.shift());c.length;)p=p[c.shift()];return p}if(Qe(r,e))return r[e];if(Qe(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)},c=function(e,t){if(void 0===t&&(t={}),"function"!=typeof e){if(!Ze(e))throw new Error('Cannot invoke "'+e+'". Expected a function!');e=Je(e.slice())}return{fn:e,dependencies:(e.$inject||it(e)).map((function(e){return Qe(t,e)?t[e]:s(e)}))}},p=function(e){var t=c(e),n=t.fn,i=t.dependencies;return new(Function.prototype.bind.apply(n,[null].concat(i)))},u=function(e,t,n){var i=c(e,n),r=i.fn,o=i.dependencies;return r.apply(t,o)},l=function(e){return Je((function(t){return e.get(t)}))},d={factory:u,type:p,value:function(e){return e}};e.forEach((function(e){function t(e,t){return"value"!==e&&Ze(t)&&(t=Je(t.slice())),t}if(e instanceof rt)e.forEach((function(e){var n=e[0],r=e[1],o=e[2];i[n]=[d[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 ot((e.__modules__||[]).concat([n]),o),a=Je((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]=[d[r],t(r,o),r]}else i[n]=e[n]}))})),this.get=s,this.invoke=u,this.instantiate=p,this.createChild=function(e,t){if(t&&t.length){var n,r,a,s,c=Object.create(null),p=Object.create(null),u=[],d=[],h=[];for(var f in i)n=i[f],-1!==t.indexOf(f)&&("private"===n[2]?-1===(r=u.indexOf(n[3]))?(a=n[3].createChild([],t),s=l(a),u.push(n[3]),d.push(a),h.push(s),c[f]=[s,f,"private",a]):c[f]=[h[r],f,"private",d[r]]:c[f]=[n[2],n[1]],p[f]=!0),"factory"!==n[2]&&"type"!==n[2]||!n[1].$scope||t.forEach((function(e){-1!==n[1].$scope.indexOf(e)&&(c[f]=[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(c)}return new ot(e,o)}}function at(e,t){var n=this;t=t||1e3,e.on(["render.shape","render.connection"],t,(function(e,t){var i=e.type,r=t.element,o=t.gfx;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 st(e){return e.join(",").replace(/,?([A-z]),?/g,"$1")}function ct(e){for(var t,n="",i=0;t=e[i];i++)n+=t.x+","+t.y+" ";return n}function pt(e,t){var n=Le("polyline");return Se(n,{points:ct(e)}),t&&Se(n,t),n}function ut(e){return w(e,(function(t){return!x(e,(function(e){return e!==t&&lt(t,e)}))}))}function lt(e,t){if(t){if(e===t)return t;if(e.parent)return lt(e.parent,t)}}function dt(e,t,n){var i=!n||-1===e.indexOf(t);return i&&e.push(t),i}function ht(e,t,n){n=n||0,h(e)||(e=[e]),E(e,(function(e,i){var r=t(e,i,n);h(r)&&r.length&&ht(r,t,n+1)}))}function ft(e,t){return function(e,t,n){var i=[],r=[];return ht(e,(function(e,o,a){dt(i,e,t);var s=e.children;if((-1===n||a<n)&&s&&dt(r,s,t))return s})),i}(e,!t,-1)}function mt(e,t){var n,i,r,o;return t=!!t,h(e)||(e=[e]),E(e,(function(e){var a=e;e.waypoints&&!t&&(a=mt(e.waypoints,!0));var s=a.x,c=a.y,p=a.height||0,u=a.width||0;(s<n||void 0===n)&&(n=s),(c<i||void 0===i)&&(i=c),(s+u>r||void 0===r)&&(r=s+u),(c+p>o||void 0===o)&&(o=c+p)})),{x:n,y:i,height:o-i,width:r-n}}function vt(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function gt(e){return!(!e||!e.isFrame)}function yt(e,t){return G({},e||{},t||{})}at.prototype.canRender=function(){},at.prototype.drawShape=function(){},at.prototype.drawConnection=function(){},at.prototype.getShapePath=function(){},at.prototype.getConnectionPath=function(){};function bt(e,t){at.call(this,e,1),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=t.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}i(bt,at),bt.prototype.canRender=function(){return!0},bt.prototype.drawShape=function(e,t){var n=Le("rect");return Se(n,{x:0,y:0,width:t.width||0,height:t.height||0}),gt(t)?Se(n,this.FRAME_STYLE):Se(n,this.SHAPE_STYLE),_e(e,n),n},bt.prototype.drawConnection=function(e,t){var n=pt(t.waypoints,this.CONNECTION_STYLE);return _e(e,n),n},bt.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width;return st([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])},bt.prototype.getConnectionPath=function(e){var t,n,i=e.waypoints,r=[];for(t=0;n=i[t];t++)n=n.original||n,r.push([0===t?"M":"L",n.x,n.y]);return st(r)},bt.$inject=["eventBus","styles"];var xt={__init__:["defaultRenderer"],defaultRenderer:["type",bt],styles:["type",function(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(e,t,n){return G(this.style(t,n),{class:e})},this.style=function(t,n){h(t)||n||(n=t,t=[]);var i=C(t,(function(t,n){return G(t,e[n]||{})}),{});return n?G(i,n):i},this.computeStyle=function(e,n,i){return h(n)||(i=n,n=[]),t.style(n||[],G({},i,e||{}))}}]};function _t(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return-1!==n&&e.splice(n,1),n}function wt(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}function Et(e,t){return e&&t?e.indexOf(t):-1}var St=Object.freeze({__proto__:null,remove:_t,add:wt,indexOf:Et});function Ct(e,t){return e&&t?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):-1}function Pt(e,t,n,i){if(void 0===i&&(i=5),!e||!t||!n)return!1;var r=(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),o=Ct(e,t);return Math.abs(r/o)<=i}function Tt(e,t){var n;return function(e,t){var n;n=h(e)?e:[e,t];var i=n.slice().shift();return P(n,(function(e){return Math.abs(i.y-e.y)<=2}))}(n=h(e)?e:[e,t])?"h":!!function(e,t){var n;n=h(e)?e:[e,t];var i=n.slice().shift();return P(n,(function(e){return Math.abs(i.x-e.x)<=2}))}(n)&&"v"}function Rt(e,t,n){return n=n||0,e.x>t.x-n&&e.y>t.y-n&&e.x<t.x+t.width+n&&e.y<t.y+t.height+n}function At(e,t){return{x:Math.round(e.x+(t.x-e.x)/2),y:Math.round(e.y+(t.y-e.y)/2)}}var kt=/,?([a-z]),?/gi,Mt=parseFloat,Dt=Math,Bt=Dt.PI,jt=Dt.min,Ot=Dt.max,Nt=Dt.pow,Lt=Dt.abs,It=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/gi,zt=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/gi,Ft=Array.isArray||function(e){return e instanceof Array};function $t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Vt(e){if("function"==typeof e||Object(e)!==e)return e;var t=new e.constructor;for(var n in e)$t(e,n)&&(t[n]=Vt(e[n]));return t}function Ht(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}function Gt(e){var t=Gt.ps=Gt.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout((function(){for(var n in t)$t(t,n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])})),t[e]}function Wt(e,t,n,i){return 1===arguments.length&&(t=e.y,n=e.width,i=e.height,e=e.x),{x:e,y:t,width:n,height:i,x2:e+n,y2:t+i}}function qt(){return this.join(",").replace(kt,"$1")}function Ut(e){var t=Vt(e);return t.toString=qt,t}function Yt(e,t,n,i,r,o,a,s,c){var p=1-c,u=Nt(p,3),l=Nt(p,2),d=c*c*c,h=u*t+3*l*c*i+3*p*c*c*o+d*s;return{x:en(u*e+3*l*c*n+3*p*c*c*r+d*a),y:en(h)}}function Kt(e){var t=cn.apply(null,e);return Wt(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function Xt(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function Zt(e,t,n,i,r){return e*(e*(-3*t+9*n-9*i+3*r)+6*t-12*n+6*i)-3*t+3*n}function Qt(e,t,n,i,r,o,a,s,c){null==c&&(c=1);for(var p=(c=c>1?1:c<0?0:c)/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],l=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,h=0;h<12;h++){var f=p*u[h]+p,m=Zt(f,e,n,r,a),v=Zt(f,t,i,o,s),g=m*m+v*v;d+=l[h]*Dt.sqrt(g)}return p*d}function Jt(e,t,n,i,r,o,a,s){if(!(Ot(e,n)<jt(r,a)||jt(e,n)>Ot(r,a)||Ot(t,i)<jt(o,s)||jt(t,i)>Ot(o,s))){var c=(e*i-t*n)*(o-s)-(t-i)*(r*s-o*a),p=(e-n)*(o-s)-(t-i)*(r-a);if(p){var u=en(((e*i-t*n)*(r-a)-(e-n)*(r*s-o*a))/p),l=en(c/p),d=+u.toFixed(2),h=+l.toFixed(2);if(!(d<+jt(e,n).toFixed(2)||d>+Ot(e,n).toFixed(2)||d<+jt(r,a).toFixed(2)||d>+Ot(r,a).toFixed(2)||h<+jt(t,i).toFixed(2)||h>+Ot(t,i).toFixed(2)||h<+jt(o,s).toFixed(2)||h>+Ot(o,s).toFixed(2)))return{x:u,y:l}}}}function en(e){return Math.round(1e11*e)/1e11}function tn(e,t,n){if(!function(e,t){return e=Wt(e),Xt(t=Wt(t),e.x,e.y)||Xt(t,e.x2,e.y)||Xt(t,e.x,e.y2)||Xt(t,e.x2,e.y2)||Xt(e,t.x,t.y)||Xt(e,t.x2,t.y)||Xt(e,t.x,t.y2)||Xt(e,t.x2,t.y2)||(e.x<t.x2&&e.x>t.x||t.x<e.x2&&t.x>e.x)&&(e.y<t.y2&&e.y>t.y||t.y<e.y2&&t.y>e.y)}(Kt(e),Kt(t)))return n?0:[];for(var i=Qt.apply(0,e),r=Qt.apply(0,t),o=rn(e)?1:~~(i/5)||1,a=rn(t)?1:~~(r/5)||1,s=[],c=[],p={},u=n?0:[],l=0;l<o+1;l++){var d=Yt.apply(0,e.concat(l/o));s.push({x:d.x,y:d.y,t:l/o})}for(l=0;l<a+1;l++)d=Yt.apply(0,t.concat(l/a)),c.push({x:d.x,y:d.y,t:l/a});for(l=0;l<o;l++)for(var h=0;h<a;h++){var f,m=s[l],v=s[l+1],g=c[h],y=c[h+1],b=Lt(v.x-m.x)<.01?"y":"x",x=Lt(y.x-g.x)<.01?"y":"x",_=Jt(m.x,m.y,v.x,v.y,g.x,g.y,y.x,y.y);if(_){if(p[f=_.x.toFixed(9)+"#"+_.y.toFixed(9)])continue;p[f]=!0;var w=m.t+Lt((_[b]-m[b])/(v[b]-m[b]))*(v.t-m.t),E=g.t+Lt((_[x]-g[x])/(y[x]-g[x]))*(y.t-g.t);w>=0&&w<=1&&E>=0&&E<=1&&(n?u++:u.push({x:_.x,y:_.y,t1:w,t2:E}))}}return u}function nn(e){var t=Gt(e);if(t.abs)return Ut(t.abs);if(Ft(e)&&Ft(e&&e[0])||(e=function(e){if(!e)return null;var t=Gt(e);if(t.arr)return Vt(t.arr);var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=[];return Ft(e)&&Ft(e[0])&&(i=Vt(e)),i.length||String(e).replace(It,(function(e,t,r){var o=[],a=t.toLowerCase();for(r.replace(zt,(function(e,t){t&&o.push(+t)})),"m"==a&&o.length>2&&(i.push([t].concat(o.splice(0,2))),a="l",t="m"==t?"l":"L");o.length>=n[a]&&(i.push([t].concat(o.splice(0,n[a]))),n[a]););})),i.toString=Gt.toString,t.arr=Vt(i),i}(e)),!e||!e.length)return[["M",0,0]];var n,i=[],r=0,o=0,a=0,s=0,c=0;"M"==e[0][0]&&(a=r=+e[0][1],s=o=+e[0][2],c++,i[0]=["M",r,o]);for(var p,u,l=c,d=e.length;l<d;l++){if(i.push(p=[]),(n=(u=e[l])[0])!=n.toUpperCase())switch(p[0]=n.toUpperCase(),p[0]){case"A":p[1]=u[1],p[2]=u[2],p[3]=u[3],p[4]=u[4],p[5]=u[5],p[6]=+u[6]+r,p[7]=+u[7]+o;break;case"V":p[1]=+u[1]+o;break;case"H":p[1]=+u[1]+r;break;case"M":a=+u[1]+r,s=+u[2]+o;default:for(var h=1,f=u.length;h<f;h++)p[h]=+u[h]+(h%2?r:o)}else for(var m=0,v=u.length;m<v;m++)p[m]=u[m];switch(n=n.toUpperCase(),p[0]){case"Z":r=+a,o=+s;break;case"H":r=p[1];break;case"V":o=p[1];break;case"M":a=p[p.length-2],s=p[p.length-1];default:r=p[p.length-2],o=p[p.length-1]}}return i.toString=qt,t.abs=Ut(i),i}function rn(e){return e[0]===e[2]&&e[1]===e[3]&&e[4]===e[6]&&e[5]===e[7]}function on(e,t,n,i){return[e,t,n,i,n,i]}function an(e,t,n,i,r,o){var a=1/3,s=2/3;return[a*e+s*n,a*t+s*i,a*r+s*n,a*o+s*i,r,o]}function sn(e,t,n,i,r,o,a,s,c,p){var u,l,d=120*Bt/180,h=Bt/180*(+r||0),f=[],m=(l=function(e,t,n){return{x:e*Dt.cos(n)-t*Dt.sin(n),y:e*Dt.sin(n)+t*Dt.cos(n)}},function e(){var t=Array.prototype.slice.call(arguments,0),n=t.join("␀"),i=e.cache=e.cache||{},r=e.count=e.count||[];return $t(i,n)?(Ht(r,n),i[n]):(r.length>=1e3&&delete i[r.shift()],r.push(n),i[n]=l.apply(0,t),i[n])});if(p)S=p[0],C=p[1],w=p[2],E=p[3];else{e=(u=m(e,t,-h)).x,t=u.y;var v=(e-(s=(u=m(s,c,-h)).x))/2,g=(t-(c=u.y))/2,y=v*v/(n*n)+g*g/(i*i);y>1&&(n*=y=Dt.sqrt(y),i*=y);var b=n*n,x=i*i,_=(o==a?-1:1)*Dt.sqrt(Lt((b*x-b*g*g-x*v*v)/(b*g*g+x*v*v))),w=_*n*g/i+(e+s)/2,E=_*-i*v/n+(t+c)/2,S=Dt.asin(((t-E)/i).toFixed(9)),C=Dt.asin(((c-E)/i).toFixed(9));(S=e<w?Bt-S:S)<0&&(S=2*Bt+S),(C=s<w?Bt-C:C)<0&&(C=2*Bt+C),a&&S>C&&(S-=2*Bt),!a&&C>S&&(C-=2*Bt)}var P=C-S;if(Lt(P)>d){var T=C,R=s,A=c;C=S+d*(a&&C>S?1:-1),f=sn(s=w+n*Dt.cos(C),c=E+i*Dt.sin(C),n,i,r,0,a,R,A,[C,T,w,E])}P=C-S;var k=Dt.cos(S),M=Dt.sin(S),D=Dt.cos(C),B=Dt.sin(C),j=Dt.tan(P/4),O=4/3*n*j,N=4/3*i*j,L=[e,t],I=[e+O*M,t-N*k],z=[s+O*B,c-N*D],F=[s,c];if(I[0]=2*L[0]-I[0],I[1]=2*L[1]-I[1],p)return[I,z,F].concat(f);for(var $=[],V=0,H=(f=[I,z,F].concat(f).join().split(",")).length;V<H;V++)$[V]=V%2?m(f[V-1],f[V],h).y:m(f[V],f[V+1],h).x;return $}function cn(e,t,n,i,r,o,a,s){for(var c,p,u,l,d,h,f,m,v=[],g=[[],[]],y=0;y<2;++y)if(0==y?(p=6*e-12*n+6*r,c=-3*e+9*n-9*r+3*a,u=3*n-3*e):(p=6*t-12*i+6*o,c=-3*t+9*i-9*o+3*s,u=3*i-3*t),Lt(c)<1e-12){if(Lt(p)<1e-12)continue;0<(l=-u/p)&&l<1&&v.push(l)}else f=p*p-4*u*c,m=Dt.sqrt(f),f<0||(0<(d=(-p+m)/(2*c))&&d<1&&v.push(d),0<(h=(-p-m)/(2*c))&&h<1&&v.push(h));for(var b,x=v.length,_=x;x--;)b=1-(l=v[x]),g[0][x]=b*b*b*e+3*b*b*l*n+3*b*l*l*r+l*l*l*a,g[1][x]=b*b*b*t+3*b*b*l*i+3*b*l*l*o+l*l*l*s;return g[0][_]=e,g[1][_]=t,g[0][_+1]=a,g[1][_+1]=s,g[0].length=g[1].length=_+2,{x0:jt.apply(0,g[0]),y0:jt.apply(0,g[1]),x1:Ot.apply(0,g[0]),y1:Ot.apply(0,g[1])}}function pn(e){var t=Gt(e);if(t.curve)return Ut(t.curve);for(var n=nn(e),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},r=function(e,t,n){var i,r;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];switch(!(e[0]in{T:1,Q:1})&&(t.qx=t.qy=null),e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=["C"].concat(sn.apply(0,[t.x,t.y].concat(e.slice(1))));break;case"S":"C"==n||"S"==n?(i=2*t.x-t.bx,r=2*t.y-t.by):(i=t.x,r=t.y),e=["C",i,r].concat(e.slice(1));break;case"T":"Q"==n||"T"==n?(t.qx=2*t.x-t.qx,t.qy=2*t.y-t.qy):(t.qx=t.x,t.qy=t.y),e=["C"].concat(an(t.x,t.y,t.qx,t.qy,e[1],e[2]));break;case"Q":t.qx=e[1],t.qy=e[2],e=["C"].concat(an(t.x,t.y,e[1],e[2],e[3],e[4]));break;case"L":e=["C"].concat(on(t.x,t.y,e[1],e[2]));break;case"H":e=["C"].concat(on(t.x,t.y,e[1],t.y));break;case"V":e=["C"].concat(on(t.x,t.y,t.x,e[1]));break;case"Z":e=["C"].concat(on(t.x,t.y,t.X,t.Y))}return e},o=function(e,t){if(e[t].length>7){e[t].shift();for(var i=e[t];i.length;)a[t]="A",e.splice(t++,0,["C"].concat(i.splice(0,6)));e.splice(t,1),u=n.length}},a=[],s="",c="",p=0,u=n.length;p<u;p++){n[p]&&(s=n[p][0]),"C"!=s&&(a[p]=s,p&&(c=a[p-1])),n[p]=r(n[p],i,c),"A"!=a[p]&&"C"==s&&(a[p]="C"),o(n,p);var l=n[p],d=l.length;i.x=l[d-2],i.y=l[d-1],i.bx=Mt(l[d-4])||i.x,i.by=Mt(l[d-3])||i.y}return t.curve=Ut(n),n}var un=function(e,t,n){e=pn(e),t=pn(t);for(var i,r,o,a,s,c,p,u,l,d,h=n?0:[],f=0,m=e.length;f<m;f++){var v=e[f];if("M"==v[0])i=s=v[1],r=c=v[2];else{"C"==v[0]?(l=[i,r].concat(v.slice(1)),i=l[6],r=l[7]):(l=[i,r,i,r,s,c,s,c],i=s,r=c);for(var g=0,y=t.length;g<y;g++){var b=t[g];if("M"==b[0])o=p=b[1],a=u=b[2];else{"C"==b[0]?(d=[o,a].concat(b.slice(1)),o=d[6],a=d[7]):(d=[o,a,o,a,p,u,p,u],o=p,a=u);var x=tn(l,d,n);if(n)h+=x;else{for(var _=0,w=x.length;_<w;_++)x[_].segment1=f,x[_].segment2=g,x[_].bez1=l,x[_].bez2=d;h=h.concat(x)}}}}}return h};function ln(e){return{x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height)}}function dn(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function hn(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function fn(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function mn(e){return dn({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function vn(e,t,n){f(n=n||0)||(n={x:n,y:n});var i=hn(e),r=hn(t),o=i.bottom+n.y<=r.top,a=i.left-n.x>=r.right,s=i.top-n.y>=r.bottom,c=o?"top":s?"bottom":null,p=i.right+n.x<=r.left?"left":a?"right":null;return p&&c?c+"-"+p:p||c||"intersect"}function gn(e,t,n){var i=un(e,t);return 1===i.length||2===i.length&&Ct(i[0],i[1])<1?dn(i[0]):i.length>1?dn((i=O(i,(function(e){var t=Math.floor(100*e.t2)||1;return t=((t=100-t)<10?"0":"")+t,e.segment2+"#"+t})))[n?0:i.length-1]):null}function yn(e,t){return Math.round(e*t)/t}function bn(e){return m(e)?e+"px":e}function xn(e,t,n){var i=Le("g");Ae(i).add(t);var r=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]||null),i}var _n="base",wn="djs-element-hidden",En={shape:["x","y","width","height"],connection:["waypoints"]};function Sn(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._init(e||{})}function Cn(e,t){var n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}Sn.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],Sn.prototype._init=function(e){var t=this._eventBus,n=this._container=function(e){var t=(e=G({},{width:"100%",height:"100%"},e)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container"),G(n.style,{position:"relative",overflow:"hidden",width:bn(e.width),height:bn(e.height)}),t.appendChild(n),n}(e),i=this._svg=Le("svg");Se(i,{width:"100%",height:"100%"}),_e(n,i);var r=this._viewport=xn(i,"viewport");this._layers={},this._planes={},!1!==e.deferUpdate&&(this._viewboxChanged=$(V(this._viewboxChanged,this),300)),t.on("diagram.init",(function(){t.fire("canvas.init",{svg:i,viewport:r})}),this),t.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed"],(function(){delete this._cachedViewbox}),this),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)},Sn.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._planes,delete this._activePlane,delete this._viewport},Sn.prototype._clear=function(){var e=this;this._elementRegistry.getAll().forEach((function(t){var n=vt(t);"root"===n?e.setRootElementForPlane(null,e.findPlane(t),!0):e._removeElement(t,n)})),this._activePlane=null,this._planes={},delete this._cachedViewbox},Sn.prototype.getDefaultLayer=function(){return this.getLayer(_n)},Sn.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},Sn.prototype._createLayer=function(e,t){t||(t=0);var n=C(this._layers,(function(e,n){return t>=n.index&&e++,e}),0);return{group:xn(this._viewport,"layer-"+e,n),index:t}},Sn.prototype.getPlane=function(e){if(!e)throw new Error("must specify a name");return this._planes[e]},Sn.prototype.createPlane=function(e,t){if(!e)throw new Error("must specify a name");if(this._planes[e])throw new Error("plane "+e+" already exists");t||(t={id:"__implicitroot"+e,children:[],isImplicit:!0});var n=this.getLayer(e);Ae(n).add(wn);var i=this._planes[e]={layer:n,name:e,rootElement:null};return this.setRootElementForPlane(t,i),i},Sn.prototype.setActivePlane=function(e){if(!e)throw new Error("must specify a plane");return"string"==typeof e&&(e=this.getPlane(e)),this._activePlane&&Ae(this._activePlane.layer).add(wn),this._activePlane=e,Ae(e.layer).remove(wn),e.rootElement&&this._elementRegistry.updateGraphics(e.rootElement,this._svg,!0),this._eventBus.fire("plane.set",{plane:e}),e},Sn.prototype.getActiveLayer=function(){return this.getActivePlane().layer},Sn.prototype.getActivePlane=function(){var e=this._activePlane;return e||(e=this.createPlane(_n),this.setActivePlane(_n)),e},Sn.prototype.findPlane=function(e){"string"==typeof e&&(e=this._elementRegistry.get(e));var t=function(e){for(;e.parent;)e=e.parent;return e}(e);return x(this._planes,(function(e){return e.rootElement===t}))},Sn.prototype.getContainer=function(){return this._container},Sn.prototype._updateMarker=function(e,t,n){var i;e.id||(e=this._elementRegistry.get(e)),(i=this._elementRegistry._elements[e.id])&&(E([i.gfx,i.secondaryGfx],(function(e){e&&(n?Ae(e).add(t):Ae(e).remove(t))})),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},Sn.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},Sn.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},Sn.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),Ae(this.getGraphics(e)).has(t)},Sn.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},Sn.prototype.getRootElement=function(){return this.getActivePlane().rootElement},Sn.prototype.setRootElement=function(e,t){var n=this._activePlane;if(n)return this.setRootElementForPlane(e,n,t);var i=this.createPlane(_n,e);return this.setActivePlane(i),i.rootElement},Sn.prototype.setRootElementForPlane=function(e,t,n){"string"==typeof t&&(t=this.getPlane(t)),e&&this._ensureValid("root",e);var i=t.rootElement,r=this._elementRegistry,o=this._eventBus;if(i){if(!n)throw new Error("rootElement already set, need to specify override");o.fire("root.remove",{element:i}),o.fire("root.removed",{element:i}),r.remove(i)}if(e){var a=t.layer;o.fire("root.add",{element:e}),r.add(e,a),o.fire("root.added",{element:e,gfx:a}),t===this._activePlane&&this._elementRegistry.updateGraphics(e,this._svg,!0)}return t.rootElement=e,e},Sn.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=En[e];if(!P(n,(function(e){return void 0!==t[e]})))throw new Error("must supply { "+n.join(", ")+" } with "+e)},Sn.prototype._setParent=function(e,t,n){wt(t.children,e,n),e.parent=t},Sn.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,i);return this._elementRegistry.add(t,a),o.update(e,t,a),r.fire(e+".added",{element:t,gfx:a}),t},Sn.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},Sn.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},Sn.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),_t(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},Sn.prototype.removeShape=function(e){return this._removeElement(e,"shape")},Sn.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},Sn.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},Sn.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},Sn.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},Sn.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return this._cachedViewbox;var t,n,i,r,o,a,s=this._viewport,c=this.getSize();return e?(this._changeViewbox((function(){r=Math.min(c.width/e.width,c.height/e.height);var t=this._svg.createSVGMatrix().scale(r).translate(-e.x,-e.y);Ke(s,t)})),e):(t=this.getDefaultLayer().getBBox(),n=(i=Ke(s))?i.matrix:function(e,t,n,i,r,o){var a=Ie.createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return ze(a,e);case 6:return ze(a,{a:e,b:t,c:n,d:i,e:r,f:o})}}(),r=yn(n.a,1e3),o=yn(-n.e||0,1e3),a=yn(-n.f||0,1e3),e=this._cachedViewbox={x:o?o/r:0,y:a?a/r:0,width:c.width/r,height:c.height/r,scale:r,inner:{width:t.width,height:t.height,x:t.x,y:t.y},outer:c})},Sn.prototype.scroll=function(e){var t=this._viewport,n=t.getCTM();return e&&this._changeViewbox((function(){e=G({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),Cn(t,n)})),{x:n.e,y:n.f}},Sn.prototype.scrollToElement=function(e,t){var n=100,i=this.findPlane(e);i!==this._activePlane&&this.setActivePlane(i),t||(t={}),"number"==typeof t&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};var r,o,a=mt(e),s=hn(a),c=this.viewbox(),p=this.zoom();c.y+=t.top/p,c.x+=t.left/p,c.width-=(t.right+t.left)/p,c.height-=(t.bottom+t.top)/p;var u=hn(c);if(a.width<c.width&&a.height<c.height){var l=Math.max(0,s.right-u.right),d=Math.min(0,s.left-u.left),h=Math.max(0,s.bottom-u.bottom),f=Math.min(0,s.top-u.top);r=l||d,o=h||f}else r=a.x-c.x,o=a.y-c.y;this.scroll({dx:-r*p,dy:-o*p})},Sn.prototype.zoom=function(e,t){return e?"fit-viewport"===e?this._fitViewport(t):(this._changeViewbox((function(){"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)})),yn(i.a,1e3)):this.viewbox(e).scale;var n,i},Sn.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},Sn.prototype._setZoom=function(e,t){var n,i,r,o,a=this._svg,s=this._viewport,c=a.createSVGMatrix(),p=a.createSVGPoint(),u=(i=s.getCTM()).a;return t?(n=G(p,t).matrixTransform(i.inverse()),r=c.translate(n.x,n.y).scale(1/u*e).translate(-n.x,-n.y),o=i.multiply(r)):o=c.scale(e),Cn(this._viewport,o),o},Sn.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},Sn.prototype.getAbsoluteBBox=function(e){var t,n=this.viewbox();e.waypoints?t=this.getGraphics(e).getBBox():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}},Sn.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Pn="data-element-id";function Tn(e){this._elements={},this._eventBus=e}Tn.$inject=["eventBus"],Tn.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),Se(t,Pn,i),n&&Se(n,Pn,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},Tn.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(Se(i.gfx,Pn,""),i.secondaryGfx&&Se(i.secondaryGfx,Pn,""),delete t[n])},Tn.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)},Tn.prototype.updateGraphics=function(e,t,n){var i=e.id||e,r=this._elements[i];return n?r.secondaryGfx=t:r.gfx=t,Se(t,Pn,i),t},Tn.prototype.get=function(e){var t;t="string"==typeof e?e:e&&Se(e,Pn);var n=this._elements[t];return n&&n.element},Tn.prototype.filter=function(e){var t=[];return this.forEach((function(n,i){e(n,i)&&t.push(n)})),t},Tn.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),i=0;i<n.length;i++){var r=t[n[i]],o=r.element;if(e(o,r.gfx))return o}},Tn.prototype.getAll=function(){return this.filter((function(e){return e}))},Tn.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)}))},Tn.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},Tn.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 Rn={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,n){var o=this.indexOf(e);if(void 0===n){if(-1!==o)return;n=this.length}-1!==o&&this.splice(o,1),this.splice(n,0,e),-1===o&&t.set(e,r,i)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e},isExtended:function(e){return!0===e.__refs_collection}};function An(e,t,n){var i=Rn.extend(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:i}),i.length&&i.forEach((function(i){e.set(i,t.inverse,n)}))}function kn(e,t){if(!(this instanceof kn))return new kn(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}kn.prototype.bind=function(e,t){if("string"==typeof t){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?An(this,t,e):function(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var o=r;r=null,o&&e.unset(o,i,n),r=t,e.set(r,i,n)}}})}(this,t,e)},kn.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return Rn.isExtended(n)||An(this,t,e),n},kn.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},kn.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},kn.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Mn=kn,Dn=Rn;Mn.Collection=Dn;var Bn=new Mn({name:"children",enumerable:!0,collection:!0},{name:"parent"}),jn=new Mn({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),On=new Mn({name:"attachers",collection:!0},{name:"host"}),Nn=new Mn({name:"outgoing",collection:!0},{name:"source"}),Ln=new Mn({name:"incoming",collection:!0},{name:"target"});function In(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(e){var t=this.label,n=this.labels;!e&&t?n.remove(t):n.add(e,0)}}),Bn.bind(this,"parent"),jn.bind(this,"labels"),Nn.bind(this,"outgoing"),Ln.bind(this,"incoming")}function zn(){In.call(this),Bn.bind(this,"children"),On.bind(this,"host"),On.bind(this,"attachers")}function Fn(){zn.call(this)}function $n(){zn.call(this),jn.bind(this,"labelTarget")}function Vn(){In.call(this),Nn.bind(this,"source"),Ln.bind(this,"target")}i(zn,In),i(Fn,zn),i($n,zn),i(Vn,In);var Hn={connection:Vn,shape:zn,label:$n,root:Fn};function Gn(){this._uid=12}Gn.prototype.createRoot=function(e){return this.create("root",e)},Gn.prototype.createLabel=function(e){return this.create("label",e)},Gn.prototype.createShape=function(e){return this.create("shape",e)},Gn.prototype.createConnection=function(e){return this.create("connection",e)},Gn.prototype.create=function(e,t){return(t=G({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=Hn[e];if(!n)throw new Error("unknown type: <"+e+">");return G(new n,t)}(e,t)};var Wn=Array.prototype.slice;function qn(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function Un(){}function Yn(e){return e.childNodes[0]}function Kn(e,t,n,i,r){var o=Fe();o.setTranslate(t,n);var a=Fe();a.setRotate(i||0,0,0);var s=Fe();s.setScale(r||1,r||1),Ke(e,[o,a,s])}function Xn(e,t,n){var i=Fe();i.setTranslate(t,n),Ke(e,i)}function Zn(e,t){var n=Fe();n.setRotate(t,0,0),Ke(e,n)}function Qn(e,t){this._eventBus=e,this._elementRegistry=t}function Jn(e,t,n){var i=n||t.firstChild;e!==i&&t.insertBefore(e,i)}qn.prototype.on=function(e,t,n,i){if(e=h(e)?e:[e],v(t)&&(i=n,n=t,t=1e3),!m(t))throw new Error("priority must be a number");var r=n;i&&((r=V(n,i)).__fn=n.__fn||n);var o=this;e.forEach((function(e){o._addListener(e,{priority:t,callback:r,next:null})}))},qn.prototype.once=function(e,t,n,i){var r=this;if(v(t)&&(i=n,n=t,t=1e3),!m(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var t=n.apply(i,arguments);return r.off(e,o),t}o.__fn=n,this.on(e,t,o)},qn.prototype.off=function(e,t){e=h(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},qn.prototype.createEvent=function(e){var t=new Un;return t.init(e),t},qn.prototype.fire=function(e,t){var n,i,r,o;if(o=Wn.call(arguments),"object"==typeof e&&(e=(t=e).type),!e)throw new Error("no event type specified");if(i=this._listeners[e]){n=t instanceof Un?t:this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{r=this._invokeListeners(n,o,i)}finally{e!==a&&(n.type=a)}return void 0===r&&n.defaultPrevented&&(r=!1),r}},qn.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},qn.prototype._destroy=function(){this._listeners={}},qn.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},qn.prototype._invokeListener=function(e,t,n){var i;if(n.callback.__isTomb)return i;try{void 0!==(i=function(e,t){return e.apply(null,t)}(n.callback,t))&&(e.returnValue=i,e.stopPropagation()),!1===i&&e.preventDefault()}catch(e){if(!this.handleError(e))throw console.error("unhandled error in event listener",e),e}return i},qn.prototype._addListener=function(e,t){var n,i=this._getListeners(e);if(i){for(;i;){if(i.priority<t.priority)return t.next=i,void(n?n.next=t:this._setListeners(e,t));n=i,i=i.next}n.next=t}else this._setListeners(e,t)},qn.prototype._getListeners=function(e){return this._listeners[e]},qn.prototype._setListeners=function(e,t){this._listeners[e]=t},qn.prototype._removeListener=function(e,t){var n,i,r,o=this._getListeners(e);if(t)for(;o;)n=o.next,(r=o.callback)!==t&&r.__fn!==t||(i?i.next=n:this._setListeners(e,n)),i=o,o=n;else this._setListeners(e,null)},Un.prototype.stopPropagation=function(){this.cancelBubble=!0},Un.prototype.preventDefault=function(){this.defaultPrevented=!0},Un.prototype.init=function(e){G(this,e||{})},Qn.$inject=["eventBus","elementRegistry"],Qn.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=function(e){return e.parentNode.childNodes[1]}(n))||(Ae(t=Le("g")).add("djs-children"),_e(n.parentNode,t)):t=n,t},Qn.prototype._clear=function(e){var t=Yn(e);return te(t),t},Qn.prototype._createContainer=function(e,t,n,i){var r=Le("g");Ae(r).add("djs-group"),void 0!==n?Jn(r,t,t.childNodes[n]):_e(t,r);var o=Le("g");Ae(o).add("djs-element"),Ae(o).add("djs-"+e),i&&Ae(o).add("djs-frame"),_e(r,o);var a=Le("g");return Ae(a).add("djs-visual"),_e(o,a),o},Qn.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,gt(t))},Qn.prototype.updateContainments=function(e){var t=this,n=this._elementRegistry;E(C(e,(function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e}),{}),(function(e){var i=e.children;if(i){var r=t._getChildrenContainer(e);E(i.slice().reverse(),(function(e){Jn(n.getGraphics(e).parentNode,r)}))}}))},Qn.prototype.drawShape=function(e,t){return this._eventBus.fire("render.shape",{gfx:e,element:t})},Qn.prototype.getShapePath=function(e){return this._eventBus.fire("render.getShapePath",e)},Qn.prototype.drawConnection=function(e,t){return this._eventBus.fire("render.connection",{gfx:e,element:t})},Qn.prototype.getConnectionPath=function(e){return this._eventBus.fire("render.getConnectionPath",e)},Qn.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if("shape"===e)this.drawShape(i,t),Xn(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(i,t)}t.hidden?Se(n,"display","none"):Se(n,"display","block")}},Qn.prototype.remove=function(e){Me(this._elementRegistry.getGraphics(e).parentNode)};var ei={__depends__:[xt],__init__:["canvas"],canvas:["type",Sn],elementRegistry:["type",Tn],elementFactory:["type",Gn],eventBus:["type",qn],graphicsFactory:["type",Qn]};function ti(e){var t=[],n=[];function i(e){return t.indexOf(e)>=0}e.forEach((function e(r){i(r)||((r.__depends__||[]).forEach(e),i(r)||(!function(e){t.push(e)}(r),(r.__init__||[]).forEach((function(e){n.push(e)}))))}));var r=new ot(t);return n.forEach((function(e){try{r["string"==typeof e?"get":"invoke"](e)}catch(e){throw console.error("Failed to instantiate component"),console.error(e.stack),e}})),r}function ni(e,t){this.injector=t=t||function(e){return ti([{config:["value",e=e||{}]},ei].concat(e.modules||[]))}(e),this.get=t.get,this.invoke=t.invoke,this.get("eventBus").fire("diagram.init")}function ii(){}function ri(e,t){this.model=e,this.properties=t}ni.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},ni.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")},ii.prototype.get=function(e){return this.$model.properties.get(this,e)},ii.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},ri.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(ii.prototype);E(e.properties,(function(e){e.isMany||void 0===e.default||(i[e.name]=e.default)})),n.defineModel(i,t),n.defineDescriptor(i,e);var r=e.ns.name;function o(e){n.define(this,"$type",{value:r,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),E(e,V((function(e,t){this.set(t,e)}),this))}return o.prototype=i,o.hasType=i.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var oi={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},ai={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function si(e,t){var n=ai[e];return n?n(t):t}function ci(e){return!!oi[e]}function pi(e){return!!ai[e]}function ui(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function li(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function di(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,E(e,V(this.registerPackage,this))}function hi(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function fi(e){this.model=e}function mi(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function vi(e){this.properties=new fi(this),this.factory=new ri(this,this.properties),this.registry=new di(e,this.properties),this.typeCache={}}li.prototype.build=function(){return W(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},li.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)},li.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},li.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=ui(r[0],i),a=ui(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},li.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},li.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},li.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},li.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},li.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")},li.prototype.hasProperty=function(e){return this.propertiesByName[e]},li.prototype.addTrait=function(e,t){var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(E(e.properties,V((function(n){n=G({},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)},di.prototype.getPackage=function(e){return this.packageMap[e]},di.prototype.getPackages=function(){return this.packages},di.prototype.registerPackage=function(e){e=G({},e);var t=this.packageMap;hi(t,e,"prefix"),hi(t,e,"uri"),E(e.types,V((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},di.prototype.registerType=function(e,t){var n=ui((e=G({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:G(e.meta||{})})).name,t.prefix),i=n.name,r={};E(e.properties,V((function(e){var t=ui(e.name,n.prefix),i=t.name;ci(e.type)||(e.type=ui(e.type,t.prefix).name),G(e,{ns:t,name:i}),r[i]=e}),this)),G(e,{ns:n,name:i,propertiesByName:r}),E(e.extends,V((function(e){var t=this.typeMap[e];t.traits=t.traits||[],t.traits.push(i)}),this)),this.definePackage(e,t),this.typeMap[i]=e},di.prototype.mapTypes=function(e,t,n){var i=ci(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(e){return a(e,!0)}function a(n,i){var o=ui(n,ci(n)?"":e.prefix);r.mapTypes(o,t,i)}if(!i)throw new Error("unknown type <"+e.name+">");E(i.superClass,n?o:a),t(i,!n),E(i.traits,o)},di.prototype.getEffectiveDescriptor=function(e){var t=ui(e),n=new li(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},di.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},fi.prototype.set=function(e,t,n){var i=this.model.getPropertyDescriptor(e,t),r=i&&i.name;void 0===n?i?delete e[r]:delete e.$attrs[t]:i?r in e?e[r]=n:mi(e,i,n):e.$attrs[t]=n},fi.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&&mi(e,n,[]),e[i]},fi.prototype.define=function(e,t,n){Object.defineProperty(e,t,n)},fi.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},fi.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},vi.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},vi.prototype.getType=function(e){var t=this.typeCache,n=g(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},vi.prototype.createAny=function(e,t,n){var i=ui(e),r={$type:e,$instanceOf:function(e){return e===this.$type}},o={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};return this.properties.defineDescriptor(r,o),this.properties.defineModel(r,this),this.properties.define(r,"$parent",{enumerable:!1,writable:!0}),this.properties.define(r,"$instanceOf",{enumerable:!1,writable:!0}),E(n,(function(e,t){f(e)&&void 0!==e.value?r[e.name]=e.value:r[t]=e})),r},vi.prototype.getPackage=function(e){return this.registry.getPackage(e)},vi.prototype.getPackages=function(){return this.registry.getPackages()},vi.prototype.getElementDescriptor=function(e){return e.$descriptor},vi.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},vi.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},vi.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var gi=String.fromCharCode,yi=Object.prototype.hasOwnProperty,bi=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,xi={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function _i(e,t,n,i){return i?yi.call(xi,i)?xi[i]:"&"+i+";":gi(t||parseInt(n,16))}function wi(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(bi,_i):e}Object.keys(xi).forEach((function(e){xi[e.toUpperCase()]=xi[e]}));var Ei="xsi:type",Si="non-whitespace outside of root node";function Ci(e){return new Error(e)}function Pi(e){return"missing namespace for prefix <"+e+">"}function Ti(e){return{get:e,enumerable:!0}}function Ri(e){var t,n={};for(t in e)n[t]=e[t];return n}function Ai(e){return e+"$uri"}function ki(){return{line:0,column:0}}function Mi(e){throw e}function Di(e){if(!this)return new Di(e);var t,n,i,r,o,a,s,c,p,u=e&&e.proxy,l=Mi,d=ki,h=!1,f=!1,m=null,v=!1;function g(e){e instanceof Error||(e=Ci(e)),m=e,l(e,d)}function y(e){o&&(e instanceof Error||(e=Ci(e)),o(e,d))}this.on=function(e,p){if("function"!=typeof p)throw Ci("required args <name, cb>");switch(e){case"openTag":n=p;break;case"text":t=p;break;case"closeTag":i=p;break;case"error":l=p;break;case"warn":o=p;break;case"cdata":r=p;break;case"attention":c=p;break;case"question":s=p;break;case"comment":a=p;break;default:throw Ci("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw Ci("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return n["http://www.w3.org/2001/XMLSchema-instance"]="xsi",f=!0,p=n,this},this.parse=function(e){if("string"!=typeof e)throw Ci("required args <xml=string>");return m=null,function(e){var o,l,m,b,x,_,w,E,S,C,P,T=f?[]:null,R=f?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[Ai(n)]=t;return i}(p):null,A=[],k=0,M=!1,D=!1,B=0,j=0,O="",N=0;function L(){if(null!==P)return P;var e,t,n,i,r,o,a,s,c,u,l,d=f&&R.xmlns,m=f&&h?[]:null,v=N,g=O,b=g.length,x={},_={};e:for(;v<b;v++)if(c=!1,!(32===(u=g.charCodeAt(v))||u<14&&u>8)){for((u<65||u>122||u>90&&u<97)&&95!==u&&58!==u&&(y("illegal first char attribute name"),c=!0),l=v+1;l<b;l++)if(!((u=g.charCodeAt(l))>96&&u<123||u>64&&u<91||u>47&&u<59||46===u||45===u||95===u)){if(32===u||u<14&&u>8){y("missing attribute value"),v=l;continue e}if(61===u)break;y("illegal attribute name char"),c=!0}if("xmlns:xmlns"===(s=g.substring(v,l))&&(y("illegal declaration of xmlns"),c=!0),34===(u=g.charCodeAt(l+1)))-1===(l=g.indexOf('"',v=l+2))&&-1!==(l=g.indexOf("'",v))&&(y("attribute value quote missmatch"),c=!0);else if(39===u)-1===(l=g.indexOf("'",v=l+2))&&-1!==(l=g.indexOf('"',v))&&(y("attribute value quote missmatch"),c=!0);else for(y("missing attribute value quotes"),c=!0,l+=1;l<b&&!(32===(u=g.charCodeAt(l+1))||u<14&&u>8);l++);for(-1===l&&(y("missing closing quotes"),l=b,c=!0),c||(o=g.substring(v,l)),v=l;l+1<b&&!(32===(u=g.charCodeAt(l+1))||u<14&&u>8);l++)v===l&&(y("illegal character after attribute end"),c=!0);if(v=l+1,!c)if(s in _)y("attribute <"+s+"> already defined");else if(_[s]=!0,f)if(h){if(null!==(r="xmlns"===s?"xmlns":120===s.charCodeAt(0)&&"xmlns:"===s.substr(0,6)?s.substr(6):null)){if(e=wi(o),t=Ai(r),!(a=p[e])){if("xmlns"===r||t in R&&R[t]!==e)do{a="ns"+k++}while(void 0!==R[a]);else a=r;p[e]=a}R[r]!==a&&(i||(R=Ri(R),i=!0),R[r]=a,"xmlns"===r&&(R[Ai(a)]=e,d=a),R[t]=e),x[s]=o;continue}m.push(s,o)}else-1!==(u=s.indexOf(":"))?(n=R[s.substring(0,u)])?((s=d===n?s.substr(u+1):n+s.substr(u))===Ei&&(-1!==(u=o.indexOf(":"))?(n=o.substring(0,u),o=(n=R[n]||n)+o.substring(u)):o=d+":"+o),x[s]=o):y(Pi(s.substring(0,u))):x[s]=o;else x[s]=o}if(h)for(v=0,b=m.length;v<b;v++){if(s=m[v++],o=m[v],-1!==(u=s.indexOf(":"))){if(!(n=R[s.substring(0,u)])){y(Pi(s.substring(0,u)));continue}(s=d===n?s.substr(u+1):n+s.substr(u))===Ei&&(-1!==(u=o.indexOf(":"))?(n=o.substring(0,u),o=(n=R[n]||n)+o.substring(u)):o=d+":"+o)}x[s]=o}return P=x}function I(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,o=0,a=0,s=j;B>=a&&(t=i.exec(e))&&!((s=t[0].length+t.index)>B);)r+=1,a=s;return-1==B?(o=s,n=e.substring(j)):0===j?n=e.substring(j,B):(o=B-a,n=-1==j?e.substring(B):e.substring(B,j+1)),{data:n,line:r,column:o}}d=I,u&&(C=Object.create({},{name:Ti((function(){return E})),originalName:Ti((function(){return S})),attrs:Ti(L),ns:Ti((function(){return R}))}));for(;-1!==j;){if(-1===(B=60===e.charCodeAt(j)?j:e.indexOf("<",j)))return A.length?g("unexpected end of file"):0===j?g("missing start tag"):void(j<e.length&&e.substring(j).trim()&&y(Si));if(j!==B)if(A.length){if(t&&(t(e.substring(j,B),wi,d),v))return}else if(e.substring(j,B).trim()&&(y(Si),v))return;if(33===(x=e.charCodeAt(B+1))){if(91===(b=e.charCodeAt(B+2))&&"CDATA["===e.substr(B+3,6)){if(-1===(j=e.indexOf("]]>",B)))return g("unclosed cdata");if(r&&(r(e.substring(B+9,j),d),v))return;j+=3;continue}if(45===b&&45===e.charCodeAt(B+3)){if(-1===(j=e.indexOf("--\x3e",B)))return g("unclosed comment");if(a&&(a(e.substring(B+4,j),wi,d),v))return;j+=3;continue}}if(63!==x){for(l=B+1;;l++){if(_=e.charCodeAt(l),isNaN(_))return j=-1,g("unclosed tag");if(34===_)l=-1!==(b=e.indexOf('"',l+1))?b:l;else if(39===_)l=-1!==(b=e.indexOf("'",l+1))?b:l;else if(62===_){j=l;break}}if(33!==x){if(P={},47===x){if(M=!1,D=!0,!A.length)return g("missing open tag");if(l=E=A.pop(),b=B+2+l.length,e.substring(B+2,b)!==l)return g("closing tag mismatch");for(;b<j;b++)if(!(32===(x=e.charCodeAt(b))||x>8&&x<14))return g("close tag")}else{if(47===e.charCodeAt(j-1)?(l=E=e.substring(B+1,j-1),M=!0,D=!0):(l=E=e.substring(B+1,j),M=!0,D=!1),!(x>96&&x<123||x>64&&x<91||95===x||58===x))return g("illegal first char nodeName");for(b=1,m=l.length;b<m;b++)if(!((x=l.charCodeAt(b))>96&&x<123||x>64&&x<91||x>47&&x<59||45===x||95===x||46==x)){if(32===x||x<14&&x>8){E=l.substring(0,b),P=null;break}return g("invalid nodeName")}D||A.push(E)}if(f){if(o=R,M&&(D||T.push(o),null===P&&(h=-1!==l.indexOf("xmlns",b))&&(N=b,O=l,L(),h=!1)),S=E,-1!==(x=E.indexOf(":"))){if(!(w=R[E.substring(0,x)]))return g("missing namespace on <"+S+">");E=E.substr(x+1)}else w=R.xmlns;w&&(E=w+":"+E)}if(M&&(N=b,O=l,n&&(u?n(C,wi,D,d):n(E,L,wi,D,d),v)))return;if(D){if(i&&(i(u?C:E,wi,M,d),v))return;f&&(R=M?o:T.pop())}j+=1}else{if(c&&(c(e.substring(B,j+1),wi,d),v))return;j+=1}}else{if(-1===(j=e.indexOf("?>",B)))return g("unclosed question");if(s&&(s(e.substring(B,j+2),d),v))return;j+=2}}}(e),d=ki,v=!1,m},this.stop=function(){v=!0}}function Bi(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var ji={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},Oi="xsi:type";function Ni(e){return e.xml&&e.xml.serialize}function Li(e){return Ni(e)===Oi}function Ii(e,t){return Bi(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function zi(e){return new Error(e)}function Fi(e){return e.$descriptor}function $i(e){G(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw zi("expected element");var t,n=this.elementsById,i=Fi(e).idProperty;if(i&&(t=e.get(i.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw zi("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function Vi(){}function Hi(){}function Gi(){}function Wi(e,t){this.property=e,this.context=t}function qi(e,t){this.element=t,this.propertyDesc=e}function Ui(){}function Yi(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function Ki(e,t,n){Yi.call(this,e,t,n)}function Xi(e,t,n){this.model=e,this.context=n}function Zi(e){e instanceof vi&&(e={model:e}),G(this,{lax:!1},e)}Vi.prototype.handleEnd=function(){},Vi.prototype.handleText=function(){},Vi.prototype.handleNode=function(){},Hi.prototype=Object.create(Vi.prototype),Hi.prototype.handleNode=function(){return this},Gi.prototype=Object.create(Vi.prototype),Gi.prototype.handleText=function(e){this.body=(this.body||"")+e},Wi.prototype=Object.create(Gi.prototype),Wi.prototype.handleNode=function(e){if(this.element)throw zi("expected no sub nodes");return this.element=this.createReference(e),this},Wi.prototype.handleEnd=function(){this.element.id=this.body},Wi.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},qi.prototype=Object.create(Gi.prototype),qi.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=si(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},Ui.prototype=Object.create(Gi.prototype),Ui.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},Yi.prototype=Object.create(Ui.prototype),Yi.prototype.addReference=function(e){this.context.addReference(e)},Yi.prototype.handleText=function(e){if(!Fi(this.element).bodyProperty)throw zi("unexpected body text <"+e+">");Gi.prototype.handleText.call(this,e)},Yi.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Fi(t).bodyProperty;n&&void 0!==e&&(e=si(n.type,e),t.set(n.name,e))},Yi.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=Fi(i),o=this.context,a=new i({}),s=this.model;return E(n,(function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?E(e.split(" "),(function(e){o.addReference({element:a,property:i.ns.name,id:e})})):o.addReference({element:a,property:i.ns.name,id:e}):(i?e=si(i.type,e):"xmlns"!==n&&(t=ui(n,r.ns.prefix),s.getPackage(t.prefix)&&o.addWarning({message:"unknown attribute <"+n+">",element:a,property:n,value:e})),a.set(n,e))})),a},Yi.prototype.getPropertyForNode=function(e){var t,n,i=ui(e.name),r=this.type,o=this.model,a=Fi(r),s=i.name,c=a.propertiesByName[s];if(c&&!c.isAttr)return Li(c)&&(t=e.attributes[Oi])?(t=function(e,t){var n=ui(e);return function(e,t){var n=e.name,i=e.localName,r=t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(n,t.getPackage(n.prefix))}(t,o),G({},c,{effectiveType:Fi(n=o.getType(t)).name})):c;var p=o.getPackage(i.prefix);if(p){if(t=Ii(i,p),n=o.getType(t),c=x(a.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})))return G({},c,{effectiveType:Fi(n).name})}else if(c=x(a.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})))return c;throw zi("unrecognized element <"+i.name+">")},Yi.prototype.toString=function(){return"ElementDescriptor["+Fi(this.type).name+"]"},Yi.prototype.valueHandler=function(e,t){return new qi(e,t)},Yi.prototype.referenceHandler=function(e){return new Wi(e,this.context)},Yi.prototype.handler=function(e){return"Element"===e?new Xi(this.model,e,this.context):new Yi(this.model,e,this.context)},Yi.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,pi(n=t.effectiveType||t.type))return this.valueHandler(t,i);var o=(r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==o&&(t.isMany?i.get(t.name).push(o):i.set(t.name,o),t.isReference?(G(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},Ki.prototype=Object.create(Yi.prototype),Ki.prototype.createElement=function(e){var t=e.name,n=ui(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),a=o&&Ii(n,o)||t;if(!r.hasType(a))throw zi("unexpected element <"+e.originalName+">");return Yi.prototype.createElement.call(this,e)},Xi.prototype=Object.create(Ui.prototype),Xi.prototype.createElement=function(e){var t=e.name,n=ui(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},Xi.prototype.handleChild=function(e){var t=new Xi(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},Xi.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},Zi.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof Yi?(i=t,t={}):"string"==typeof t?(i=this.handler(t),t={}):"string"==typeof i&&(i=this.handler(i));var r=this.model,o=this.lax,a=new $i(G({},t,{rootHandler:i})),s=new Di({proxy:!0}),c=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function p(e,t,n){var i=t(),r=i.line,o=i.column,s=i.data;"<"===s.charAt(0)&&-1!==s.indexOf(" ")&&(s=s.slice(0,s.indexOf(" "))+">");var c="unparsable content "+(s?s+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return a.addWarning({message:c,error:e}),!0;throw zi(c)}function u(e,t){return p(e,t,!0)}i.context=a,c.push(i);var l=/^<\?xml /i,d=/ encoding="([^"]+)"/i,h=/^utf-8$/i;function f(e,t){try{c.peek().handleText(e)}catch(e){u(e,t)}}var m=r.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),{"http://www.w3.org/XML/1998/namespace":"xml"});return s.ns(m).on("openTag",(function(e,t,n,i){var r=e.attrs||{},a=Object.keys(r).reduce((function(e,n){var i=t(r[n]);return e[n]=i,e}),{});!function(e,t){var n=c.peek();try{c.push(n.handleNode(e))}catch(e){p(e,t,o)&&c.push(new Hi)}}({name:e.name,originalName:e.originalName,attributes:a,ns:e.ns},i)})).on("question",(function(e){if(l.test(e)){var t=d.exec(e),n=t&&t[1];n&&!h.test(n)&&a.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}})).on("closeTag",(function(){c.pop().handleEnd()})).on("cdata",f).on("text",(function(e,t,n){!function(e,t){e.trim()&&f(e,t)}(t(e),n)})).on("error",p).on("warn",u),new Promise((function(t,n){var r;try{s.parse(e),function(){var e,t,n=a.elementsById,i=a.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],s=Fi(r).propertiesByName[t.property];if(o||a.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),s.isMany){var c=r.get(s.name),p=c.indexOf(t);-1===p&&(p=c.length),o?c[p]=o:c.splice(p,1)}else r.set(s.name,o)}}()}catch(e){r=e}var o=i.element;r||o||(r=zi("failed to parse document as <"+i.type.$descriptor.name+">"));var c=a.warnings,p=a.references,u=a.elementsById;return r?(r.warnings=c,n(r)):t({rootElement:o,elementsById:u,references:p,warnings:c})}))},Zi.prototype.handler=function(e){return new Ki(this.model,e)};var Qi=/<|>|'|"|&|\n\r|\n/g,Ji=/<|>|&/g;function er(e){var t={},n={},i={},r=[],o=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?r.push(e):o.push(e),this.mapPrefix(e.prefix,e.uri)},this.uriByPrefix=function(e){return t[e||"xmlns"]},this.mapPrefix=function(e,n){t[e||"xmlns"]=n},this.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},this.logUsed=function(t){var n=t.uri,r=this.getNSKey(t);i[r]=this.byUri(n),e&&e.logUsed(t)},this.getUsed=function(e){var t=this;return[].concat(r,o).filter((function(e){var n=t.getNSKey(e);return i[n]}))}}function tr(e,t){return Bi(t)?(n=e).charAt(0).toLowerCase()+n.slice(1):e;var n}function nr(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function ir(e){return g(e)?e:(e.prefix?e.prefix+":":"")+e.localName}var rr={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},or={"<":"lt",">":"gt","&":"amp"};function ar(e,t,n){return(e=g(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function sr(e){this.tagName=e}function cr(){}function pr(e){this.tagName=e}function ur(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function lr(e,t){ur.call(this,e,t)}function dr(){this.value="",this.write=function(e){this.value+=e}}function hr(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function fr(e){return e=G({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new dr,r=new hr(i,e.format);if(e.preamble&&r.append('<?xml version="1.0" encoding="UTF-8"?>\n'),(new ur).build(t).serializeTo(r),!n)return i.value}}}function mr(e,t){vi.call(this,e,t)}sr.prototype.build=function(e){return this.element=e,this},sr.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},cr.prototype.serializeValue=cr.prototype.serializeTo=function(e){e.append(this.escape?ar(this.value,Ji,or):this.value)},cr.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(Ji)&&(this.escape=!0),this},nr(pr,cr),pr.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},ur.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,o=i.isGeneric;return t=o?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),o||(n=function(e){return w(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!b(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)}))}(e),this.parseAttributes(w(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return w(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},ur.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?G({localName:t.ns.localName},e):G({localName:tr(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},ur.prototype.nsPropertyTagName=function(e){return function(e,t){return G({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},ur.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},ur.prototype.nsAttributeName=function(e){var t;if(t=g(e)?ui(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:G({localName:t.localName},n)},ur.prototype.parseGeneric=function(e){var t=this,n=this.body,i=[];return E(e,(function(r,o){"$body"===o?n.push((new cr).build({type:"String"},r)):"$children"===o?E(r,(function(e){n.push(new ur(t).build(e))})):0!==o.indexOf("$")&&t.parseNsAttribute(e,o,r)&&i.push({name:o,value:r})})),i},ur.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=ui(t);if("xmlns"===o.prefix&&(i={prefix:o.localName,uri:n}),o.prefix||"xmlns"!==o.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var a=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(a)}},ur.prototype.parseNsAttributes=function(e,t){var n=this,i=e.$attrs,r=[];return E(i,(function(t,i){var o=n.parseNsAttribute(e,i,t);o&&r.push(o)})),r},ur.prototype.parseGenericAttributes=function(e,t){var n=this;E(t,(function(t){if(t.name!==Oi)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,n)}}))},ur.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;E(e,(function(e){var r=i.get(e.name),o=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new cr).build(e,r[0]));else if(pi(e.type))E(r,(function(i){n.push(new pr(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(o)E(r,(function(i){n.push(new sr(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var a=Li(e),s=function(e){return"property"===Ni(e)}(e);E(r,(function(i){var r;r=a?new lr(t,e):s?new ur(t,e):new ur(t),n.push(r.build(i))}))}}))},ur.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new er(t):n=t),n},ur.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,o=e.prefix;return i.byUri(r)&&!n||i.add(e,t),i.mapPrefix(o,r),e},ur.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.element.$model,a=this.getNamespaces(t),s=e.prefix,c=e.uri;if(!s&&!c)return{localName:e.localName};if(r=ji[s]||o&&(o.getPackage(s)||{}).uri,!(c=c||r||a.uriByPrefix(s)))throw new Error("no namespace uri given for prefix <"+s+">");if(!(e=a.byUri(c))){for(n=s,i=1;a.uriByPrefix(n);)n=s+"_"+i++;e=this.logNamespace({prefix:n,uri:c},r===c)}return s&&a.mapPrefix(s,c),e},ur.prototype.parseAttributes=function(e){var t=this,n=this.element;E(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];E(i,(function(e){r.push(e.id)})),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},ur.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),ir(e)},ur.prototype.addAttribute=function(e,t){var n=this.attrs;g(t)&&(t=ar(t,Qi,rr)),n.push({name:e,value:t})},ur.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=function(e){return e.getUsed().filter((function(e){return"xml"!==e.prefix})).map((function(e){return{name:"xmlns"+(e.prefix?":"+e.prefix:""),value:e.uri}}))}(n).concat(t)),E(t,(function(t){e.append(" ").append(ir(t.name)).append('="').append(t.value).append('"')}))},ur.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==cr;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),E(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},nr(lr,ur),lr.prototype.parseNsAttributes=function(e){var t=ur.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),o=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(Oi),(i.prefix?i.prefix+":":"")+o+n.ns.localName),t},lr.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},mr.prototype=Object.create(vi.prototype),mr.prototype.fromXML=function(e,t,n){g(t)||(n=t,t="bpmn:Definitions");var i=new Zi(G({model:this,lax:!0},n)),r=i.handler(t);return i.fromXML(e,r)},mr.prototype.toXML=function(e,t){var n=new fr(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(e){return i(e)}}))};var vr={bpmn:{name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",prefix:"bpmn",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",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:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],enumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],xml:{tagAlias:"lowerCase",typePrefix:"t"}},bpmndi:{name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",prefix:"bpmndi",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],enumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[]},dc:{name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",prefix:"dc",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],associations:[]},di:{name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",prefix:"di",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],associations:[],xml:{tagAlias:"lowerCase"}},bioc:{name:"bpmn.io colors for BPMN",uri:"http://bpmn.io/schema/bpmn/biocolor/1.0",prefix:"bioc",types:[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]},color:{name:"BPMN in Color",uri:"http://www.omg.org/spec/BPMN/non-normative/color/1.0",prefix:"color",types:[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]}};function gr(e,t){return new mr(G({},vr,e),t)}function yr(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}var br=new Mn({name:"bpmnElement",enumerable:!0},{name:"di",configurable:!0});function xr(e,t){return e.$instanceOf(t)}function _r(e,t){var n={},i=[];function r(e,t){return function(n){e(n,t)}}function o(e){n[e.id]=e}function a(n,i){try{var r=n.di&&function(n,i){if(n.gfx)throw new Error(t("already rendered {element}",{element:yr(n)}));return e.element(n,i)}(n,i);return o(n),r}catch(e){s(e.message,{element:n,error:e}),console.error(t("failed to import {element}",{element:yr(n)})),console.error(e)}}function s(t,n){e.error(t,n)}function c(e){var n=e.bpmnElement;n?n.di?s(t("multiple DI elements defined for {element}",{element:yr(n)}),{element:n}):(br.bind(n,"di"),n.di=e):s(t("no bpmnElement referenced in {element}",{element:yr(e)}),{element:e})}function p(e){var t;c(t=e.plane),E(t.planeElement,u)}function u(e){c(e)}function l(){for(;i.length;)i.shift()()}function d(e,t){R(e,t),b(e.ioSpecification,t),y(e.artifacts,t),o(e)}function h(e,t){a(e,t)}function f(e,t){a(e,t)}function m(e,t){a(e,t)}function v(e,t){a(e,t)}function g(e,t){a(e,t)}function y(e,t){E(e,(function(e){xr(e,"bpmn:Association")?i.push((function(){g(e,t)})):g(e,t)}))}function b(e,t){e&&(E(e.dataInputs,r(m,t)),E(e.dataOutputs,r(v,t)))}function _(e,t){R(e,t),y(e.artifacts,t)}function S(e,t){var n=a(e,t);xr(e,"bpmn:SubProcess")&&_(e,n||t),xr(e,"bpmn:Activity")&&b(e.ioSpecification,t),i.push((function(){E(e.dataInputAssociations,r(f,t)),E(e.dataOutputAssociations,r(f,t))}))}function C(e,t){a(e,t)}function P(e,t){i.push((function(){var n=a(e,t);e.childLaneSet&&T(e.childLaneSet,n||t),function(e){E(e.flowNodeRef,(function(t){var n=t.get("lanes");n&&n.push(e)}))}(e)}))}function T(e,t){E(e.lanes,r(P,t))}function R(e,n){!function(e,n){E(e,(function(e){xr(e,"bpmn:SequenceFlow")?i.push((function(){!function(e,t){a(e,t)}(e,n)})):xr(e,"bpmn:BoundaryEvent")?i.unshift((function(){S(e,n)})):xr(e,"bpmn:FlowNode")?S(e,n):xr(e,"bpmn:DataObject")||(xr(e,"bpmn:DataStoreReference")||xr(e,"bpmn:DataObjectReference")?C(e,n):s(t("unrecognized flowElement {element} in context {context}",{element:yr(e),context:n?yr(n.businessObject):"null"}),{element:e,context:n}))}))}(e.flowElements,n),e.laneSets&&function(e,t){E(e,r(T,t))}(e.laneSets,n)}function A(e,t){var n=a(e,t),i=e.processRef;i&&d(i,n||t)}return{handleDeferred:l,handleDefinitions:function(o,a){var u=o.diagrams;if(a&&-1===u.indexOf(a))throw new Error(t("diagram not part of bpmn:Definitions"));if(!a&&u&&u.length&&(a=u[0]),!a)throw new Error(t("no diagram to display"));p(a);var f=a.plane;if(!f)throw new Error(t("no plane for {element}",{element:yr(a)}));var m=f.bpmnElement;if(!m){if(!(m=function(e){return x(e.rootElements,(function(e){return xr(e,"bpmn:Process")||xr(e,"bpmn:Collaboration")}))}(o)))throw new Error(t("no process or collaboration to display"));s(t("correcting missing bpmnElement on {plane} to {rootElement}",{plane:yr(f),rootElement:yr(m)})),f.bpmnElement=m,c(f)}var v,g=function(t,n){return e.root(t,n)}(m,f);if(xr(m,"bpmn:Process"))d(m,g);else{if(!xr(m,"bpmn:Collaboration"))throw new Error(t("unsupported bpmnElement for {plane}: {rootElement}",{plane:yr(f),rootElement:yr(m)}));E((v=m).participants,r(A)),y(v.artifacts),i.push((function(){var e;E(v.messageFlows,r(h,e))})),function(e,t){w(e,(function(e){return!n[e.id]&&xr(e,"bpmn:Process")&&e.laneSets})).forEach(r(d,t))}(o.rootElements,g)}l()},handleSubProcess:_,registerDi:c}}function wr(e,t,n){var i,r,o,a=[];return new Promise((function(s,c){try{return i=e.get("bpmnImporter"),r=e.get("eventBus"),o=e.get("translate"),r.fire("import.render.start",{definitions:t}),function(e,t){new _r({root:function(e){return i.add(e)},element:function(e,t){return i.add(e,t)},error:function(e,t){a.push({message:e,context:t})}},o).handleDefinitions(e,t)}(t,n),r.fire("import.render.complete",{error:undefined,warnings:a}),s({warnings:a})}catch(e){return e.warnings=a,c(e)}}))}function Er(e){return function(){if(!window.Promise)throw new Error("Promises is not supported in this environment. Please polyfill Promise.");var t=arguments.length;if(!(t>=1&&v(arguments[t-1])))return e.apply(this,arguments);var n=arguments[t-1];console.warn(new Error("Passing callbacks to "+e.name+" is deprecated and will be removed in a future major release. Please switch to promises: https://bpmn.io/l/moving-to-promises.html"));var i=Array.prototype.slice.call(arguments,0,-1);e.apply(this,i).then((function(e){var t=Object.keys(e)[0];return n(null,e[t])}),(function(e){return n(e,e.warnings)}))}}var Sr='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21" style="vertical-align:middle"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>';function Cr(e){return e.join(";")}var Pr,Tr=Cr(["color: #404040"]),Rr='<div class="bjs-powered-by-lightbox" style="'+Cr(["z-index: 1001","position: fixed","top: 0","left: 0","right: 0","bottom: 0"])+'"><div class="backdrop" style="'+Cr(["width: 100%","height: 100%","background: rgba(40,40,40,0.2)"])+'"></div><div class="notice" style="'+Cr(["position: absolute","left: 50%","top: 40%","transform: translate(-50%)","width: 260px","padding: 10px","background: white","box-shadow: 0 1px 4px rgba(0,0,0,0.3)","font-family: Helvetica, Arial, sans-serif","font-size: 14px","display: flex","line-height: 1.3"])+'"><a href="https://bpmn.io" target="_blank" rel="noopener" style="margin: 15px 20px 15px 10px; align-self: center;'+Tr+'">'+Sr+'</a><span>Web-based tooling for BPMN, DMN and CMMN diagrams powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>';function Ar(e){var t,n;e=G({},Mr,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),t=this._container,n=he('<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" style="position: absolute; bottom: 15px; right: 15px; z-index: 100; '+Tr+'">'+Sr+"</a>"),t.appendChild(n),pe.bind(n,"click",(function(e){Pr||(Pr=he(Rr),de.bind(Pr,".backdrop","click",(function(e){document.body.removeChild(Pr)}))),document.body.appendChild(Pr),e.preventDefault()})),this._init(this._container,this._moddle,e)}function kr(e,t){return e.warnings=t,e}i(Ar,ni),Ar.prototype.importXML=Er((function(e,t){var n=this;return new Promise((function(i,r){e=n._emit("import.parse.start",{xml:e})||e,n._moddle.fromXML(e,"bpmn:Definitions").then((function(e){var o,a,s=e.rootElement,c=e.references,p=e.warnings,u=e.elementsById;s=n._emit("import.parse.complete",(o={error:null,definitions:s,elementsById:u,references:c,warnings:p},a=n.get("eventBus").createEvent(o),Object.defineProperty(a,"context",{enumerable:!0,get:function(){return console.warn(new Error("import.parse.complete <context> is deprecated and will be removed in future library versions")),{warnings:o.warnings,references:o.references,elementsById:o.elementsById}}}),a))||s,n.importDefinitions(s,t).then((function(e){var t=[].concat(p,e.warnings||[]);return n._emit("import.done",{error:null,warnings:t}),i({warnings:t})})).catch((function(e){var t=[].concat(p,e.warnings||[]);return n._emit("import.done",{error:e,warnings:t}),r(kr(e,t))}))})).catch((function(e){return n._emit("import.parse.complete",{error:e}),e=function(e){var t=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);t&&(e.message="unparsable content <"+t[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+t[2]);return e}(e),n._emit("import.done",{error:e,warnings:e.warnings}),r(e)}))}))})),Ar.prototype.importDefinitions=Er((function(e,t){var n=this;return new Promise((function(i,r){n._setDefinitions(e),n.open(t).then((function(e){var t=e.warnings;return i({warnings:t})})).catch((function(e){return r(e)}))}))})),Ar.prototype.open=Er((function(e){var t=this._definitions,n=e,i=this;return new Promise((function(r,o){if(!t){var a=new Error("no XML imported");return o(kr(a,[]))}if("string"==typeof e&&!(n=function(e,t){if(!t)return null;return x(e.diagrams,(function(e){return e.id===t}))||null}(t,e))){var s=new Error("BPMNDiagram <"+e+"> not found");return o(kr(s,[]))}try{i.clear()}catch(e){return o(kr(e,[]))}wr(i,t,n).then((function(e){var t=e.warnings;return r({warnings:t})})).catch((function(e){return o(e)}))}))})),Ar.prototype.saveXML=Er((function(e){e=e||{};var t=this,n=this._definitions;return new Promise((function(i){if(!n)return i({error:new Error("no definitions loaded")});n=t._emit("saveXML.start",{definitions:n})||n,t._moddle.toXML(n,e).then((function(e){var n=e.xml;return n=t._emit("saveXML.serialized",{xml:n})||n,i({xml:n})}))})).catch((function(e){return{error:e}})).then((function(e){t._emit("saveXML.done",e);var n=e.error;return n?Promise.reject(n):e}))})),Ar.prototype.saveSVG=Er((function(e){var t=this;return new Promise((function(e,n){var i,r;t._emit("saveSVG.start");try{var o=t.get("canvas"),a=o.getDefaultLayer(),s=ve("defs",o._svg),c=Ue(a),p=s?"<defs>"+Ue(s)+"</defs>":"",u=a.getBBox();i='<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- created with bpmn-js / http://bpmn.io --\x3e\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+u.width+'" height="'+u.height+'" viewBox="'+u.x+" "+u.y+" "+u.width+" "+u.height+'" version="1.1">'+p+c+"</svg>"}catch(e){r=e}return t._emit("saveSVG.done",{error:r,svg:i}),r?n(r):e({svg:i})}))})),Ar.prototype._setDefinitions=function(e){this._definitions=e},Ar.prototype.getModules=function(){return this._modules},Ar.prototype.clear=function(){this.getDefinitions()&&(this.get("elementRegistry").forEach((function(e){var t=e.businessObject;t&&t.di&&delete t.di})),ni.prototype.clear.call(this))},Ar.prototype.destroy=function(){ni.prototype.destroy.call(this),ye(this._container)},Ar.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},Ar.prototype.off=function(e,t){this.get("eventBus").off(e,t)},Ar.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=ve(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},Ar.prototype.getDefinitions=function(){return this._definitions},Ar.prototype.detach=function(){var e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},Ar.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=G(q(n,["additionalModules"]),{canvas:G({},n.canvas,{container:e}),modules:o});ni.call(this,a),n&&n.container&&this.attachTo(n.container)},Ar.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},Ar.prototype._createContainer=function(e){var t=he('<div class="bjs-container"></div>');return G(t.style,{width:Dr(e.width),height:Dr(e.height),position:e.position}),t},Ar.prototype._createModdle=function(e){return new gr(G({},this._moddleExtensions,e.moddleExtensions))},Ar.prototype._modules=[];var Mr={width:"100%",height:"100%",position:"relative"};function Dr(e){return e+(m(e)?"px":"")}function Br(e){Ar.call(this,e),this.on("import.parse.complete",(function(e){e.error||this._collectIds(e.definitions,e.elementsById)}),this),this.on("diagram.destroy",(function(){this.get("moddle").ids.clear()}),this)}function jr(e,t){var n=Or(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function Or(e){return e&&e.businessObject||e}i(Br,Ar),Br.prototype._createModdle=function(e){var t=Ar.prototype._createModdle.call(this,e);return t.ids=new o([32,36,1]),t},Br.prototype._collectIds=function(e,t){var n,i=e.$model.ids;for(n in i.clear(),t)i.claim(n,t[n])};var Nr=Object.freeze({__proto__:null,is:jr,getBusinessObject:Or});function Lr(e){return!jr(e,"bpmn:CallActivity")&&(jr(e,"bpmn:SubProcess")?Or(e).di&&!!Or(e).di.isExpanded:!jr(e,"bpmn:Participant")||!!Or(e).processRef)}function Ir(e){return e&&!1!==Or(e).isInterrupting}function zr(e){return e&&!!Or(e).triggeredByEvent}function Fr(e,t){var n=Or(e),i=!1;return n.eventDefinitions&&E(n.eventDefinitions,(function(e){jr(e,t)&&(i=!0)})),i}function $r(e){return Fr(e,"bpmn:ErrorEventDefinition")}function Vr(e){return Fr(e,"bpmn:EscalationEventDefinition")}function Hr(e){return Fr(e,"bpmn:CompensateEventDefinition")}var Gr=Object.freeze({__proto__:null,isExpanded:Lr,isInterrupting:Ir,isEventSubProcess:zr,hasEventDefinition:Fr,hasErrorEventDefinition:$r,hasEscalationEventDefinition:Vr,hasCompensateEventDefinition:Hr});function Wr(e){return jr(e,"bpmn:FlowElement")||jr(e,"bpmn:Participant")||jr(e,"bpmn:Lane")||jr(e,"bpmn:SequenceFlow")||jr(e,"bpmn:MessageFlow")||jr(e,"bpmn:DataInput")||jr(e,"bpmn:DataOutput")?"name":jr(e,"bpmn:TextAnnotation")?"text":jr(e,"bpmn:Group")?"categoryValueRef":void 0}function qr(e){var t=e.businessObject,n=Wr(t);if(n)return"categoryValueRef"===n?function(e){var t=e.categoryValueRef;return t&&t.value||""}(t):t[n]||""}function Ur(e,t,n){return T(e.eventDefinitions,(function(i){return i.$type===t&&function(e,t){return P(t,(function(t,n){return e[n]==t}))}(e,n)}))}function Yr(e){return e.businessObject.di}function Kr(e){return e.businessObject}function Xr(e,t){var n=Yr(e);return n.get("color:background-color")||n.get("bioc:fill")||t||"white"}function Zr(e,t){var n=Yr(e);return n.get("color:border-color")||n.get("bioc:stroke")||t||"black"}function Qr(e,t,n){var i=Yr(e).get("label");return i&&i.get("color:color")||t||Zr(e,n)}var Jr=new o,eo=.95;function to(e,t,n,i,r,o,a){at.call(this,t,a);var s=e&&e.defaultFillColor,c=e&&e.defaultStrokeColor,p=e&&e.defaultLabelColor,u=Jr.next(),l={},d=n.computeStyle;function h(e,t){var n=G({fill:"black",strokeWidth:1,strokeLinecap:"round",strokeDasharray:"none"},t.attrs),i=t.ref||{x:0,y:0},o=t.scale||1;"none"===n.strokeDasharray&&(n.strokeDasharray=[1e4,1]);var a=Le("marker");Se(t.element,n),_e(a,t.element),Se(a,{id:e,viewBox:"0 0 20 20",refX:i.x,refY:i.y,markerWidth:20*o,markerHeight:20*o,orient:"auto"});var s=ve("defs",r._svg);s||(s=Le("defs"),_e(r._svg,s)),_e(s,a),l[e]=a}function m(e){return e.replace(/[^0-9a-zA-z]+/g,"_")}function v(e,t,n){var i=e+"-"+m(t)+"-"+m(n)+"-"+u;return l[i]||function(e,t,n,i){if("sequenceflow-end"===t){var r=Le("path");Se(r,{d:"M 1 5 L 11 10 L 1 15 Z"}),h(e,{element:r,ref:{x:11,y:10},scale:.5,attrs:{fill:i,stroke:i}})}if("messageflow-start"===t){var o=Le("circle");Se(o,{cx:6,cy:6,r:3.5}),h(e,{element:o,attrs:{fill:n,stroke:i},ref:{x:6,y:6}})}if("messageflow-end"===t){var a=Le("path");Se(a,{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z"}),h(e,{element:a,attrs:{fill:n,stroke:i,strokeLinecap:"butt"},ref:{x:8.5,y:5}})}if("association-start"===t){var s=Le("path");Se(s,{d:"M 11 5 L 1 10 L 11 15"}),h(e,{element:s,attrs:{fill:"none",stroke:i,strokeWidth:1.5},ref:{x:1,y:10},scale:.5})}if("association-end"===t){var c=Le("path");Se(c,{d:"M 1 5 L 11 10 L 1 15"}),h(e,{element:c,attrs:{fill:"none",stroke:i,strokeWidth:1.5},ref:{x:12,y:10},scale:.5})}if("conditional-flow-marker"===t){var p=Le("path");Se(p,{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z"}),h(e,{element:p,attrs:{fill:n,stroke:i},ref:{x:-1,y:10},scale:.5})}if("conditional-default-flow-marker"===t){var u=Le("path");Se(u,{d:"M 6 4 L 10 16"}),h(e,{element:u,attrs:{stroke:i},ref:{x:0,y:10},scale:.5})}}(i,e,t,n),"url(#"+i+")"}function g(e,t,n,i,r){f(i)&&(r=i,i=0),i=i||0,"none"===(r=d(r,{stroke:"black",strokeWidth:2,fill:"white"})).fill&&delete r.fillOpacity;var o=t/2,a=n/2,s=Le("circle");return Se(s,{cx:o,cy:a,r:Math.round((t+n)/4-i)}),Se(s,r),_e(e,s),s}function y(e,t,n,i,r,o){f(r)&&(o=r,r=0),r=r||0,o=d(o,{stroke:"black",strokeWidth:2,fill:"white"});var a=Le("rect");return Se(a,{x:r,y:r,width:t-2*r,height:n-2*r,rx:i,ry:i}),Se(a,o),_e(e,a),a}function b(e,t,n){var i=pt(t,n=d(n,["no-fill"],{stroke:"black",strokeWidth:2,fill:"none"}));return _e(e,i),i}function x(e,t,n){n=d(n,["no-fill"],{strokeWidth:2,stroke:"black"});var i=Le("path");return Se(i,{d:t}),Se(i,n),_e(e,i),i}function _(e,t,n,i){return x(t,n,G({"data-marker":e},i))}function w(e){return function(t,n){return k[e](t,n)}}function S(e){return k[e]}function C(e,t){var n=Kr(e),i=function(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}(n);return n.eventDefinitions&&n.eventDefinitions.length>1?n.parallelMultiple?S("bpmn:ParallelMultipleEventDefinition")(t,e,i):S("bpmn:MultipleEventDefinition")(t,e,i):Ur(n,"bpmn:MessageEventDefinition")?S("bpmn:MessageEventDefinition")(t,e,i):Ur(n,"bpmn:TimerEventDefinition")?S("bpmn:TimerEventDefinition")(t,e,i):Ur(n,"bpmn:ConditionalEventDefinition")?S("bpmn:ConditionalEventDefinition")(t,e):Ur(n,"bpmn:SignalEventDefinition")?S("bpmn:SignalEventDefinition")(t,e,i):Ur(n,"bpmn:EscalationEventDefinition")?S("bpmn:EscalationEventDefinition")(t,e,i):Ur(n,"bpmn:LinkEventDefinition")?S("bpmn:LinkEventDefinition")(t,e,i):Ur(n,"bpmn:ErrorEventDefinition")?S("bpmn:ErrorEventDefinition")(t,e,i):Ur(n,"bpmn:CancelEventDefinition")?S("bpmn:CancelEventDefinition")(t,e,i):Ur(n,"bpmn:CompensateEventDefinition")?S("bpmn:CompensateEventDefinition")(t,e,i):Ur(n,"bpmn:TerminateEventDefinition")?S("bpmn:TerminateEventDefinition")(t,e,i):null}function P(e,t,n){n=G({size:{width:100}},n);var i=o.createText(t||"",n);return Ae(i).add("djs-label"),_e(e,i),i}function T(e,t,n){return P(e,Kr(t).name,{box:t,align:n,padding:5,style:{fill:Qr(t,p,c)}})}function R(e,t,n){Kn(P(e,t,{box:{height:30,width:n.height},align:"center-middle",style:{fill:Qr(n,p,c)}}),0,-(-1*n.height),270)}function A(e){for(var t=e.waypoints,n="m "+t[0].x+","+t[0].y,i=1;i<t.length;i++)n+="L"+t[i].x+","+t[i].y+" ";return n}var k=this.handlers={"bpmn:Event":function(e,t,n){return"fillOpacity"in n||(n.fillOpacity=eo),g(e,t.width,t.height,n)},"bpmn:StartEvent":function(e,t){var n={fill:Xr(t,s),stroke:Zr(t,c)};Kr(t).isInterrupting||(n={strokeDasharray:"6",strokeLinecap:"round",fill:Xr(t,s),stroke:Zr(t,c)});var i=S("bpmn:Event")(e,t,n);return C(t,e),i},"bpmn:MessageEventDefinition":function(e,t,n){return x(e,i.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),{strokeWidth:1,fill:n?Zr(t,c):Xr(t,s),stroke:n?Xr(t,s):Zr(t,c)})},"bpmn:TimerEventDefinition":function(e,t){var n=g(e,t.width,t.height,.2*t.height,{strokeWidth:2,fill:Xr(t,s),stroke:Zr(t,c)});x(e,i.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),{strokeWidth:2,strokeLinecap:"square",stroke:Zr(t,c)});for(var r=0;r<12;r++){var o=i.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),a=t.width/2;x(e,o,{strokeWidth:1,strokeLinecap:"square",transform:"rotate("+30*r+","+t.height/2+","+a+")",stroke:Zr(t,c)})}return n},"bpmn:EscalationEventDefinition":function(e,t,n){return x(e,i.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:n?Zr(t,c):"none",stroke:Zr(t,c)})},"bpmn:ConditionalEventDefinition":function(e,t){return x(e,i.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}}),{strokeWidth:1,stroke:Zr(t,c)})},"bpmn:LinkEventDefinition":function(e,t,n){return x(e,i.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{strokeWidth:1,fill:n?Zr(t,c):"none",stroke:Zr(t,c)})},"bpmn:ErrorEventDefinition":function(e,t,n){return x(e,i.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),{strokeWidth:1,fill:n?Zr(t,c):"none",stroke:Zr(t,c)})},"bpmn:CancelEventDefinition":function(e,t,n){var r=x(e,i.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{strokeWidth:1,fill:n?Zr(t,c):"none",stroke:Zr(t,c)});return Zn(r,45),r},"bpmn:CompensateEventDefinition":function(e,t,n){return x(e,i.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.22,my:.5}}),{strokeWidth:1,fill:n?Zr(t,c):"none",stroke:Zr(t,c)})},"bpmn:SignalEventDefinition":function(e,t,n){return x(e,i.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:n?Zr(t,c):"none",stroke:Zr(t,c)})},"bpmn:MultipleEventDefinition":function(e,t,n){return x(e,i.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),{strokeWidth:1,fill:n?Zr(t,c):"none"})},"bpmn:ParallelMultipleEventDefinition":function(e,t){return x(e,i.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}}),{strokeWidth:1,fill:Zr(t,c),stroke:Zr(t,c)})},"bpmn:EndEvent":function(e,t){var n=S("bpmn:Event")(e,t,{strokeWidth:4,fill:Xr(t,s),stroke:Zr(t,c)});return C(t,e),n},"bpmn:TerminateEventDefinition":function(e,t){return g(e,t.width,t.height,8,{strokeWidth:4,fill:Zr(t,c),stroke:Zr(t,c)})},"bpmn:IntermediateEvent":function(e,t){var n=S("bpmn:Event")(e,t,{strokeWidth:1,fill:Xr(t,s),stroke:Zr(t,c)});return g(e,t.width,t.height,3,{strokeWidth:1,fill:Xr(t,"none"),stroke:Zr(t,c)}),C(t,e),n},"bpmn:IntermediateCatchEvent":w("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":w("bpmn:IntermediateEvent"),"bpmn:Activity":function(e,t,n){return"fillOpacity"in(n=n||{})||(n.fillOpacity=eo),y(e,t.width,t.height,10,n)},"bpmn:Task":function(e,t){var n={fill:Xr(t,s),stroke:Zr(t,c)},i=S("bpmn:Activity")(e,t,n);return T(e,t,"center-middle"),M(e,t),i},"bpmn:ServiceTask":function(e,t){var n=S("bpmn:Task")(e,t);return x(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{strokeWidth:1,fill:Xr(t,s),stroke:Zr(t,c)}),x(e,i.getScaledPath("TASK_TYPE_SERVICE_FILL",{abspos:{x:17.2,y:18}}),{strokeWidth:0,fill:Xr(t,s)}),x(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{strokeWidth:1,fill:Xr(t,s),stroke:Zr(t,c)}),n},"bpmn:UserTask":function(e,t){var n=S("bpmn:Task")(e,t);return x(e,i.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{strokeWidth:.5,fill:Xr(t,s),stroke:Zr(t,c)}),x(e,i.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{strokeWidth:.5,fill:Xr(t,s),stroke:Zr(t,c)}),x(e,i.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{strokeWidth:.5,fill:Zr(t,c),stroke:Zr(t,c)}),n},"bpmn:ManualTask":function(e,t){var n=S("bpmn:Task")(e,t);return x(e,i.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{strokeWidth:.5,fill:Xr(t,s),stroke:Zr(t,c)}),n},"bpmn:SendTask":function(e,t){var n=S("bpmn:Task")(e,t);return x(e,i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{strokeWidth:1,fill:Zr(t,c),stroke:Xr(t,s)}),n},"bpmn:ReceiveTask":function(e,t){var n,r=Kr(t),o=S("bpmn:Task")(e,t);return r.instantiate?(g(e,28,28,4.4,{strokeWidth:1}),n=i.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):n=i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),x(e,n,{strokeWidth:1,fill:Xr(t,s),stroke:Zr(t,c)}),o},"bpmn:ScriptTask":function(e,t){var n=S("bpmn:Task")(e,t);return x(e,i.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{strokeWidth:1,stroke:Zr(t,c)}),n},"bpmn:BusinessRuleTask":function(e,t){var n=S("bpmn:Task")(e,t);return Se(x(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}})),{strokeWidth:1,fill:Xr(t,"#aaaaaa"),stroke:Zr(t,c)}),Se(x(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}})),{strokeWidth:1,stroke:Zr(t,c)}),n},"bpmn:SubProcess":function(e,t,n){n=G({fill:Xr(t,s),stroke:Zr(t,c)},n);var i=S("bpmn:Activity")(e,t,n),r=Lr(t);return zr(t)&&Se(i,{strokeDasharray:"1,2"}),T(e,t,r?"center-top":"center-middle"),r?M(e,t):M(e,t,["SubProcessMarker"]),i},"bpmn:AdHocSubProcess":function(e,t){return S("bpmn:SubProcess")(e,t)},"bpmn:Transaction":function(e,t){var i=S("bpmn:SubProcess")(e,t),r=n.style(["no-fill","no-events"],{stroke:Zr(t,c)});return y(e,t.width,t.height,8,3,r),i},"bpmn:CallActivity":function(e,t){return S("bpmn:SubProcess")(e,t,{strokeWidth:5})},"bpmn:Participant":function(e,t){var n={fillOpacity:eo,fill:Xr(t,s),stroke:Zr(t,c)},i=S("bpmn:Lane")(e,t,n);Lr(t)?(b(e,[{x:30,y:0},{x:30,y:t.height}],{stroke:Zr(t,c)}),R(e,Kr(t).name,t)):P(e,Kr(t).name,{box:t,align:"center-middle",style:{fill:Qr(t,p,c)}});return!!Kr(t).participantMultiplicity&&S("ParticipantMultiplicityMarker")(e,t),i},"bpmn:Lane":function(e,t,n){var i=y(e,t.width,t.height,0,G({fill:Xr(t,s),fillOpacity:.35,stroke:Zr(t,c)},n)),r=Kr(t);"bpmn:Lane"===r.$type&&R(e,r.name,t);return i},"bpmn:InclusiveGateway":function(e,t){var n=S("bpmn:Gateway")(e,t);return g(e,t.width,t.height,.24*t.height,{strokeWidth:2.5,fill:Xr(t,s),stroke:Zr(t,c)}),n},"bpmn:ExclusiveGateway":function(e,t){var n=S("bpmn:Gateway")(e,t),r=i.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return Yr(t).isMarkerVisible&&x(e,r,{strokeWidth:1,fill:Zr(t,c),stroke:Zr(t,c)}),n},"bpmn:ComplexGateway":function(e,t){var n=S("bpmn:Gateway")(e,t);return x(e,i.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{strokeWidth:1,fill:Zr(t,c),stroke:Zr(t,c)}),n},"bpmn:ParallelGateway":function(e,t){var n=S("bpmn:Gateway")(e,t);return x(e,i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{strokeWidth:1,fill:Zr(t,c),stroke:Zr(t,c)}),n},"bpmn:EventBasedGateway":function(e,t){var n=Kr(t),r=S("bpmn:Gateway")(e,t);g(e,t.width,t.height,.2*t.height,{strokeWidth:1,fill:"none",stroke:Zr(t,c)});var o=n.eventGatewayType,a=!!n.instantiate;if("Parallel"===o){var s=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}});Se(x(e,s),{strokeWidth:1,fill:"none"})}else if("Exclusive"===o){if(!a)Se(g(e,t.width,t.height,.26*t.height),{strokeWidth:1,fill:"none",stroke:Zr(t,c)});!function(){var n=i.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}}),r={strokeWidth:2,fill:Xr(t,"none"),stroke:Zr(t,c)};x(e,n,r)}()}return r},"bpmn:Gateway":function(e,t){var n={fill:Xr(t,s),fillOpacity:eo,stroke:Zr(t,c)};return function(e,t,n,i){var r=t/2,o=n/2,a=[{x:r,y:0},{x:t,y:o},{x:r,y:n},{x:0,y:o}].map((function(e){return e.x+","+e.y})).join(" ");i=d(i,{stroke:"black",strokeWidth:2,fill:"white"});var s=Le("polygon");return Se(s,{points:a}),Se(s,i),_e(e,s),s}(e,t.width,t.height,n)},"bpmn:SequenceFlow":function(e,t){var n,i=A(t),r=Xr(t,s),o=Zr(t,c),a=x(e,i,{strokeLinejoin:"round",markerEnd:v("sequenceflow-end",r,o),stroke:Zr(t,c)}),p=Kr(t);return t.source&&(n=t.source.businessObject,p.conditionExpression&&n.$instanceOf("bpmn:Activity")&&Se(a,{markerStart:v("conditional-flow-marker",r,o)}),n.default&&(n.$instanceOf("bpmn:Gateway")||n.$instanceOf("bpmn:Activity"))&&n.default===p&&Se(a,{markerStart:v("conditional-default-flow-marker",r,o)})),a},"bpmn:Association":function(e,t,n){var i=Kr(t),r=Xr(t,s),o=Zr(t,c);return n=G({strokeDasharray:"0.5, 5",strokeLinecap:"round",strokeLinejoin:"round",stroke:Zr(t,c)},n||{}),"One"!==i.associationDirection&&"Both"!==i.associationDirection||(n.markerEnd=v("association-end",r,o)),"Both"===i.associationDirection&&(n.markerStart=v("association-start",r,o)),b(e,t.waypoints,n)},"bpmn:DataInputAssociation":function(e,t){var n=Xr(t,s),i=Zr(t,c);return S("bpmn:Association")(e,t,{markerEnd:v("association-end",n,i)})},"bpmn:DataOutputAssociation":function(e,t){var n=Xr(t,s),i=Zr(t,c);return S("bpmn:Association")(e,t,{markerEnd:v("association-end",n,i)})},"bpmn:MessageFlow":function(e,t){var n=Kr(t),r=Yr(t),o=Xr(t,s),a=Zr(t,c),u=x(e,A(t),{markerEnd:v("messageflow-end",o,a),markerStart:v("messageflow-start",o,a),strokeDasharray:"10, 12",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5px",stroke:Zr(t,c)});if(n.messageRef){var l=u.getPointAtLength(u.getTotalLength()/2),d=i.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:l.x,y:l.y}}),h={strokeWidth:1};"initiating"===r.messageVisibleKind?(h.fill="white",h.stroke="black"):(h.fill="#888",h.stroke="white");var f=x(e,d,h),m=P(e,n.messageRef.name,{align:"center-top",fitBox:!0,style:{fill:Zr(t,p)}}),g=f.getBBox(),y=m.getBBox();Kn(m,l.x-y.width/2,l.y+g.height/2+10,0)}return u},"bpmn:DataObject":function(e,t){var n=x(e,i.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:Xr(t,s),fillOpacity:eo,stroke:Zr(t,c)});return function(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}(Kr(t))&&function(e,t){var n=(t.height-18)/t.height,r=i.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.33,my:n}});x(e,r,{strokeWidth:2})}(e,t),n},"bpmn:DataObjectReference":w("bpmn:DataObject"),"bpmn:DataInput":function(e,t){var n=i.getRawPath("DATA_ARROW"),r=S("bpmn:DataObject")(e,t);return x(e,n,{strokeWidth:1}),r},"bpmn:DataOutput":function(e,t){var n=i.getRawPath("DATA_ARROW"),r=S("bpmn:DataObject")(e,t);return x(e,n,{strokeWidth:1,fill:"black"}),r},"bpmn:DataStoreReference":function(e,t){return x(e,i.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{strokeWidth:2,fill:Xr(t,s),fillOpacity:eo,stroke:Zr(t,c)})},"bpmn:BoundaryEvent":function(e,t){var n=Kr(t).cancelActivity,i={strokeWidth:1,fill:Xr(t,s),stroke:Zr(t,c)};n||(i.strokeDasharray="6",i.strokeLinecap="round");var r=G({},i,{fillOpacity:1}),o=G({},i,{fill:"none"}),a=S("bpmn:Event")(e,t,r);return g(e,t.width,t.height,3,o),C(t,e),a},"bpmn:Group":function(e,t){return y(e,t.width,t.height,10,{stroke:Zr(t,c),strokeWidth:1,strokeDasharray:"8,3,1,3",fill:"none",pointerEvents:"none"})},label:function(e,t){return function(e,t){var n={width:90,height:30,x:t.width/2+t.x,y:t.height/2+t.y};return P(e,qr(t),{box:n,fitBox:!0,style:G({},o.getExternalStyle(),{fill:Qr(t,p,c)})})}(e,t)},"bpmn:TextAnnotation":function(e,t){var n=y(e,t.width,t.height,0,0,{fill:"none",stroke:"none"});return x(e,i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:0}}),{stroke:Zr(t,c)}),P(e,Kr(t).text||"",{box:t,align:"left-top",padding:5,style:{fill:Qr(t,p,c)}}),n},ParticipantMultiplicityMarker:function(e,t){_("participant-multiplicity",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:t.width/2/t.width,my:(t.height-15)/t.height}}),{strokeWidth:2,fill:Xr(t,s),stroke:Zr(t,c)})},SubProcessMarker:function(e,t){Xn(y(e,14,14,0,{strokeWidth:1,fill:Xr(t,s),stroke:Zr(t,c)}),t.width/2-7.5,t.height-20),_("sub-process",e,i.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2-7.5)/t.width,my:(t.height-20)/t.height}}),{fill:Xr(t,s),stroke:Zr(t,c)})},ParallelMarker:function(e,t,n){_("parallel",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.parallel)/t.width,my:(t.height-20)/t.height}}),{fill:Xr(t,s),stroke:Zr(t,c)})},SequentialMarker:function(e,t,n){_("sequential",e,i.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.seq)/t.width,my:(t.height-19)/t.height}}),{fill:Xr(t,s),stroke:Zr(t,c)})},CompensationMarker:function(e,t,n){_("compensation",e,i.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.compensation)/t.width,my:(t.height-13)/t.height}}),{strokeWidth:1,fill:Xr(t,s),stroke:Zr(t,c)})},LoopMarker:function(e,t,n){_("loop",e,i.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.loop)/t.width,my:(t.height-7)/t.height}}),{strokeWidth:1,fill:Xr(t,s),stroke:Zr(t,c),strokeLinecap:"round",strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){_("adhoc",e,i.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.adhoc)/t.width,my:(t.height-15)/t.height}}),{strokeWidth:1,fill:Zr(t,c),stroke:Zr(t,c)})}};function M(e,t,n){var i,r=Kr(t),o=n&&-1!==n.indexOf("SubProcessMarker");i=o?{seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{seq:-3,parallel:-6,compensation:-27,loop:0,adhoc:10},E(n,(function(n){S(n)(e,t,i)})),r.isForCompensation&&S("CompensationMarker")(e,t,i),"bpmn:AdHocSubProcess"===r.$type&&S("AdhocMarker")(e,t,i);var a=r.loopCharacteristics,s=a&&a.isSequential;a&&(void 0===s&&S("LoopMarker")(e,t,i),!1===s&&S("ParallelMarker")(e,t,i),!0===s&&S("SequentialMarker")(e,t,i))}this._drawPath=x}i(to,at),to.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],to.prototype.canRender=function(e){return jr(e,"bpmn:BaseElement")},to.prototype.drawShape=function(e,t){var n=t.type;return(0,this.handlers[n])(e,t)},to.prototype.drawConnection=function(e,t){var n=t.type;return(0,this.handlers[n])(e,t)},to.prototype.getShapePath=function(e){return jr(e,"bpmn:Event")?(n=(t=e).x+t.width/2,i=t.y+t.height/2,r=t.width/2,st([["M",n,i],["m",0,-r],["a",r,r,0,1,1,0,2*r],["a",r,r,0,1,1,0,-2*r],["z"]])):jr(e,"bpmn:Activity")?function(e,t){var n=e.x,i=e.y,r=e.width,o=e.height;return st([["M",n+t,i],["l",r-2*t,0],["a",t,t,0,0,1,t,t],["l",0,o-2*t],["a",t,t,0,0,1,-t,t],["l",2*t-r,0],["a",t,t,0,0,1,-t,-t],["l",0,2*t-o],["a",t,t,0,0,1,t,-t],["z"]])}(e,10):jr(e,"bpmn:Gateway")?function(e){var t=e.width/2,n=e.height/2;return st([["M",e.x+t,e.y],["l",t,n],["l",-t,n],["l",-t,-n],["z"]])}(e):function(e){var t=e.x,n=e.y,i=e.width;return st([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])}(e);var t,n,i,r};var no={width:150,height:50};function io(e,t){var n;t.textContent=e;try{var i,r=""===e;return t.textContent=r?"dummy":e,i={width:(n=t.getBBox()).width+2*n.x,height:n.height},r&&(i.width=0),i}catch(e){return{width:0,height:0}}}function ro(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=io(o,n)).width=o?i.width:0," "===o||""===o||i.width<Math.round(t)||o.length<2)return oo(e,o,r,i);o=ao(o,i.width,t)}}function oo(e,t,n,i){if(t.length<n.length){var r=n.slice(t.length).trim();e.unshift(r)}return{width:i.width,height:i.height,text:t}}function ao(e,t,n){var i=Math.max(e.length*(n/t),1),r=function(e,t){var n,i=e.split(/(\s|-|\u00AD)/g),r=[],o=0;if(i.length>1)for(;n=i.shift();){if(!(n.length+o<t)){"-"!==n&&"­"!==n||r.pop();break}r.push(n),o+=n.length}var a=r[r.length-1];return a&&"­"===a&&(r[r.length-1]="-"),r.join("")}(e,i);return r||(r=e.slice(0,Math.max(Math.round(i-1),1))),r}function so(e){this._config=G({},{size:no,padding:0,style:{},align:"center-top"},e||{})}so.prototype.createText=function(e,t){return this.layoutText(e,t).element},so.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},so.prototype.layoutText=function(e,t){var n=G({},this._config.size,t.box),i=G({},this._config.style,t.style),r=function(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}(t.align||this._config.align),o=function(e){return f(e)?G({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}(void 0!==t.padding?t.padding:this._config.padding),a=t.fitBox||!1,s=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(i),c=e.split(/\u00AD?\r?\n/),p=[],u=n.width-o.left-o.right,l=Le("text");for(Se(l,{x:0,y:0}),Se(l,i),_e(function(){var e=document.getElementById("helper-svg");return e||(Se(e=Le("svg"),{id:"helper-svg",width:0,height:0,style:"visibility: hidden; position: fixed"}),document.body.appendChild(e)),e}(),l);c.length;)p.push(ro(c,u,l));"middle"===r.vertical&&(o.top=o.bottom=0);var d=C(p,(function(e,t,n){return e+(s||t.height)}),0)+o.top+o.bottom,h=C(p,(function(e,t,n){return t.width>e?t.width:e}),0),m=o.top;"middle"===r.vertical&&(m+=(n.height-d)/2),m-=(s||p[0].height)/4;var v=Le("text");return Se(v,i),E(p,(function(e){var t;switch(m+=s||e.height,r.horizontal){case"left":t=o.left;break;case"right":t=(a?h:u)-o.right-e.width;break;default:t=Math.max(((a?h:u)-e.width)/2+o.left,0)}var n=Le("tspan");Se(n,{x:t,y:m}),n.textContent=e.text,_e(v,n)})),Me(l),{dimensions:{width:h,height:d},element:v}};function co(e){var t=G({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=G({},t,{fontSize:n},e&&e.externalStyle||{}),r=new so({style:t});this.getExternalLabelBounds=function(e,t){var n=r.getDimensions(t,{box:{width:90,height:30,x:e.width/2+e.x,y:e.height/2+e.y},style:i});return{x:Math.round(e.x+e.width/2-n.width/2),y:Math.round(e.y),width:Math.ceil(n.width),height:Math.ceil(n.height)}},this.getTextAnnotationBounds=function(e,n){var i=r.getDimensions(n,{box:e,style:t,align:"left-top",padding:5});return{x:e.x,y:e.y,width:e.width,height:Math.max(30,Math.round(i.height))}},this.createText=function(e,t){return r.createText(e,t||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return i}}co.$inject=["config.textRenderer"];var po=/\{([^{}]+)\}/g,uo=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var lo={__init__:["bpmnRenderer"],bpmnRenderer:["type",to],textRenderer:["type",co],pathMap:["type",function(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var n,i,r=this.pathMap[e];t.abspos?(n=t.abspos.x,i=t.abspos.y):(n=t.containerWidth*t.position.mx,i=t.containerHeight*t.position.my);var o,a,s={};if(t.position){for(var c=t.containerHeight/r.height*t.yScaleFactor,p=t.containerWidth/r.width*t.xScaleFactor,u=0;u<r.heightElements.length;u++)s["y"+u]=r.heightElements[u]*c;for(var l=0;l<r.widthElements.length;l++)s["x"+l]=r.widthElements[l]*p}return o=r.d,a={mx:n,my:i,e:s},String(o).replace(po,(function(e,t){return function(e,t,n){var i=n;return t.replace(uo,(function(e,t,n,r,o){t=t||r,i&&(t in i&&(i=i[t]),"function"==typeof i&&o&&(i=i()))})),i=(null==i||i==n?e:i)+""}(e,t,a)}))}}]};var ho={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]},fo=Object.freeze({__proto__:null,default:ho}),mo={width:90,height:20};function vo(e){return jr(e,"bpmn:Event")||jr(e,"bpmn:Gateway")||jr(e,"bpmn:DataStoreReference")||jr(e,"bpmn:DataObjectReference")||jr(e,"bpmn:DataInput")||jr(e,"bpmn:DataOutput")||jr(e,"bpmn:SequenceFlow")||jr(e,"bpmn:MessageFlow")||jr(e,"bpmn:Group")}function go(e){return xo(e.label)}function yo(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)],r=function(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)];return{x:n.x+(i.x-n.x)/2,y:n.y+(i.y-n.y)/2}}(e),o=Math.atan((i.y-n.y)/(i.x-n.x)),a=r.x,s=r.y;return Math.abs(o)<Math.PI/2?s-=15:a+=15,{x:a,y:s}}function bo(e){return e.waypoints?yo(e.waypoints):jr(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+mo.height/2}:{x:e.x+e.width/2,y:e.y+e.height+mo.height/2}}function xo(e){return e&&!!e.labelTarget}function _o(e,t){return G({id:e.id,type:e.$type,businessObject:e},t)}function wo(e,t,n){var i=e.di.waypoint;return!i||i.length<2?[mn(t),mn(n)]:i.map((function(e){return{x:e.x,y:e.y}}))}function Eo(e,t,n,i){return new Error(e("element {element} referenced by {referenced}#{property} not yet drawn",{element:yr(n),referenced:yr(t),property:i}))}function So(e,t,n,i,r,o){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._translate=r,this._textRenderer=o}So.$inject=["eventBus","canvas","elementFactory","elementRegistry","translate","textRenderer"],So.prototype.add=function(e,t){var n,i,r,o,a,s,c,p=e.di,u=this._translate;if(jr(p,"bpmndi:BPMNPlane"))n=this._elementFactory.createRoot(_o(e)),this._canvas.setRootElement(n);else if(jr(p,"bpmndi:BPMNShape")){var l=!Lr(e),d=function(e){return jr(e,"bpmn:Group")}(e);i=t&&(t.hidden||t.collapsed);var h=e.di.bounds;n=this._elementFactory.createShape(_o(e,{collapsed:l,hidden:i,x:Math.round(h.x),y:Math.round(h.y),width:Math.round(h.width),height:Math.round(h.height),isFrame:d})),jr(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,n),jr(e,"bpmn:Lane")&&(r=0),jr(e,"bpmn:DataStoreReference")&&(o=t,a=mn(h),s=a.x,c=a.y,s>=o.x&&s<=o.x+o.width&&c>=o.y&&c<=o.y+o.height||(t=this._canvas.getRootElement())),this._canvas.addShape(n,t,r)}else{if(!jr(p,"bpmndi:BPMNEdge"))throw new Error(u("unknown di {di} for element {semantic}",{di:yr(p),semantic:yr(e)}));var f=this._getSource(e),m=this._getTarget(e);i=t&&(t.hidden||t.collapsed),n=this._elementFactory.createConnection(_o(e,{hidden:i,source:f,target:m,waypoints:wo(e,f,m)})),jr(e,"bpmn:DataAssociation")&&(t=null),jr(e,"bpmn:SequenceFlow")&&(r=0),this._canvas.addConnection(n,t,r)}return vo(e)&&qr(n)&&this.addLabel(e,n),this._eventBus.fire("bpmnElement.added",{element:n}),n},So.prototype._attachBoundary=function(e,t){var n=this._translate,i=e.attachedToRef;if(!i)throw new Error(n("missing {semantic}#attachedToRef",{semantic:yr(e)}));var r=this._elementRegistry.get(i.id),o=r&&r.attachers;if(!r)throw Eo(n,e,i,"attachedToRef");t.host=r,o||(r.attachers=o=[]),-1===o.indexOf(t)&&o.push(t)},So.prototype.addLabel=function(e,t){var n,i,r;return n=function(e,t){var n,i,r,o=e.di.label;return o&&o.bounds?(r=o.bounds,i={width:Math.max(mo.width,r.width),height:r.height},n={x:r.x+r.width/2,y:r.y+r.height/2}):(n=bo(t),i=mo),G({x:n.x-i.width/2,y:n.y-i.height/2},i)}(e,t),(i=qr(t))&&(n=this._textRenderer.getExternalLabelBounds(n,i)),r=this._elementFactory.createLabel(_o(e,{id:e.id+"_label",labelTarget:t,type:"label",hidden:t.hidden||!qr(t),x:Math.round(n.x),y:Math.round(n.y),width:Math.round(n.width),height:Math.round(n.height)})),this._canvas.addShape(r,t.parent)},So.prototype._getEnd=function(e,t){var n,i,r=e.$type,o=this._translate;if(i=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===r&&(i=i&&i[0]),("source"===t&&"bpmn:DataOutputAssociation"===r||"target"===t&&"bpmn:DataInputAssociation"===r)&&(i=e.$parent),n=i&&this._getElement(i))return n;throw i?Eo(o,e,i,t+"Ref"):new Error(o("{semantic}#{side} Ref not specified",{semantic:yr(e),side:t}))},So.prototype._getSource=function(e){return this._getEnd(e,"source")},So.prototype._getTarget=function(e){return this._getEnd(e,"target")},So.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};var Co={__depends__:[lo,{__depends__:[ho],bpmnImporter:["type",So]}]};function Po(e){e&&"function"==typeof e.stopPropagation&&e.stopPropagation()}function To(e){return e.originalEvent||e.srcEvent}function Ro(e,t){Po(e),Po(To(e))}function Ao(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function ko(e,t){return(To(e)||e).button===t}function Mo(e){return ko(e,0)}function Do(e){var t=To(e)||e;return!!Mo(e)&&(/mac/i.test(navigator.platform)?t.metaKey:t.ctrlKey)}function Bo(e){var t=To(e)||e;return Mo(e)&&t.shiftKey}function jo(e){return!0}function Oo(e){return Mo(e)||function(e){return ko(e,1)}(e)}function No(e,t,n){var i=this;function r(n,i,r){var o,a;(function(e,t){return!(c[e]||Mo)(t)})(n,i)||(r?a=t.getGraphics(r):(o=i.delegateTarget||i.target)&&(a=o,r=t.get(a)),a&&r&&!1===e.fire(n,{element:r,gfx:a,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var o={};function a(e){return o[e]}var s={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},c={"element.contextmenu":jo,"element.mousedown":Oo,"element.mouseup":Oo,"element.click":Oo,"element.dblclick":Oo};function p(e,t,n,i){var a=o[n]=function(e){r(n,e)};i&&(c[n]=i),a.$delegate=de.bind(e,"svg, .djs-element",t,a)}function u(e,t,n){var i=a(n);i&&de.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){var t;t=e.svg,E(s,(function(e,n){u(t,n,e)}))})),e.on("canvas.init",(function(e){var t;t=e.svg,E(s,(function(e,n){p(t,n,e)}))})),e.on(["shape.added","connection.added"],(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.createHit",{element:n,gfx:i})})),e.on(["shape.changed","connection.changed"],500,(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.updateHit",{element:n,gfx:i})})),e.on("interactionEvents.createHit",500,(function(e){var t=e.element,n=e.gfx;i.createDefaultHit(t,n)})),e.on("interactionEvents.updateHit",(function(e){var t=e.element,n=e.gfx;i.updateDefaultHit(t,n)}));var l=f("djs-hit djs-hit-stroke"),d=f("djs-hit djs-hit-click-stroke"),h={all:f("djs-hit djs-hit-all"),"click-stroke":d,stroke:l};function f(e,t){return t=G({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function m(e,t){var n=h[t];if(!n)throw new Error("invalid hit type <"+t+">");return Se(e,n),e}function v(e,t){_e(e,t)}this.removeHits=function(e){E(ge(".djs-hit",e),Me)},this.createDefaultHit=function(e,t){var n,i=e.waypoints,r=e.isFrame;return i?this.createWaypointsHit(t,i):(n=r?"stroke":"all",this.createBoxHit(t,n,{width:e.width,height:e.height}))},this.createWaypointsHit=function(e,t){var n=pt(t);return m(n,"stroke"),v(e,n),n},this.createBoxHit=function(e,t,n){n=G({x:0,y:0},n);var i=Le("rect");return m(i,t),Se(i,n),v(e,i),i},this.updateDefaultHit=function(e,t){var n=ve(".djs-hit",t);if(n)return e.waypoints?function(e,t){Se(e,{points:ct(t)})}(n,e.waypoints):Se(n,{width:e.width,height:e.height}),n},this.fire=r,this.triggerMouseEvent=function(e,t,n){var i=s[e];if(!i)throw new Error("unmapped DOM event name <"+e+">");return r(i,t,n)},this.mouseHandler=a,this.registerEvent=p,this.unregisterEvent=u}No.$inject=["eventBus","elementRegistry","styles"];var Lo={__init__:["interactionEvents"],interactionEvents:["type",No]};function Io(e,t,n){this.offset=6;var i=t.cls("djs-outline",["no-fill"]),r=this;function o(e,t){var n=Le("rect");return Se(n,G({x:10,y:10,width:100,height:100},i)),_e(e,n),n}e.on(["shape.added","shape.changed"],500,(function(e){var t=e.element,n=e.gfx,i=ve(".djs-outline",n);i||(i=o(n)),r.updateShapeOutline(i,t)})),e.on(["connection.added","connection.changed"],(function(e){var t=e.element,n=e.gfx,i=ve(".djs-outline",n);i||(i=o(n)),r.updateConnectionOutline(i,t)}))}Io.prototype.updateShapeOutline=function(e,t){Se(e,{x:-this.offset,y:-this.offset,width:t.width+2*this.offset,height:t.height+2*this.offset})},Io.prototype.updateConnectionOutline=function(e,t){var n=mt(t);Se(e,{x:n.x-this.offset,y:n.y-this.offset,width:n.width+2*this.offset,height:n.height+2*this.offset})},Io.$inject=["eventBus","styles","elementRegistry"];var zo={__init__:["outline"],outline:["type",Io]};function Fo(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=[];var n=this;e.on(["shape.remove","connection.remove"],(function(e){var t=e.element;n.deselect(t)})),e.on(["diagram.clear","plane.set"],(function(e){n.select(null)}))}Fo.$inject=["eventBus","canvas"],Fo.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})}},Fo.prototype.get=function(){return this._selectedElements},Fo.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},Fo.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();h(e)||(e=e?[e]:[]);var r=this._canvas;e=e.filter((function(e){return r.findPlane(e)===r.getActivePlane()})),t?E(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 $o="hover",Vo="selected";function Ho(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,$o)})),e.on("element.out",(function(e){o(e.element,$o)})),e.on("selection.changed",(function(e){var t=e.oldSelection,n=e.newSelection;E(t,(function(e){-1===n.indexOf(e)&&o(e,Vo)})),E(n,(function(e){-1===t.indexOf(e)&&r(e,Vo)}))}))}function Go(e,t,n,i){e.on("create.end",500,(function(e){var n=e.context,i=n.canExecute,r=n.elements,o=(n.hints||{}).autoSelect;if(i){if(!1===o)return;h(o)?t.select(o):t.select(r.filter(Wo))}})),e.on("connect.end",500,(function(e){var n=e.context,i=n.canExecute,r=n.hover;i&&r&&t.select(r)})),e.on("shape.move.end",500,(function(e){var n=e.previousSelection||[],r=i.get(e.context.shape.id);x(n,(function(e){return r.id===e.id}))||t.select(r)})),e.on("element.click",(function(e){if(Mo(e)){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,a=Do(e)||Bo(e);if(r&&o)return a?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,a)}}))}function Wo(e){return!e.hidden}Ho.$inject=["eventBus","canvas","selection","styles"],Go.$inject=["eventBus","selection","canvas","elementRegistry"];var qo={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Lo,zo],selection:["type",Fo],selectionVisuals:["type",Ho],selectionBehavior:["type",Go]};function Uo(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}Uo.prototype.next=function(){return this._prefix+ ++this._counter};var Yo=new Uo("ov");function Ko(e,t,n,i){this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=Yo,this._overlayDefaults=G({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=function(e){var t=he('<div class="djs-overlay-container" style="position: absolute; width: 0; height: 0;" />');return e.insertBefore(t,e.firstChild),t}(n.getContainer()),this._init()}function Xo(e,t,n){G(e.style,{left:t+"px",top:n+"px"})}function Zo(e,t){e.style.display=!1===t?"none":""}function Qo(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}Ko.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Ko.prototype.get=function(e){if(g(e)&&(e={id:e}),g(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?w(t.overlays,N({type:e.type})):t.overlays.slice():[]}return e.type?w(this._overlays,N({type:e.type})):e.id?this._overlays[e.id]:null},Ko.prototype.add=function(e,t,n){if(f(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var i=this._ids.next();return n=G({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},Ko.prototype.remove=function(e){var t=this.get(e)||[];h(t)||(t=[t]);var n=this;E(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(ye(e.html),ye(e.htmlContainer),delete e.htmlContainer,delete e.element,delete n._overlays[e.id]),t){var i=t.overlays.indexOf(e);-1!==i&&t.overlays.splice(i,1)}}))},Ko.prototype.show=function(){Zo(this._overlayRoot)},Ko.prototype.hide=function(){Zo(this._overlayRoot,!1)},Ko.prototype.clear=function(){this._overlays={},this._overlayContainers=[],te(this._overlayRoot)},Ko.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var o=mt(t);i=o.x,r=o.y}Xo(n,i,r),Y(e.html,"data-container-id",t.id)},Ko.prototype._updateOverlay=function(e){var t,n,i=e.position,r=e.htmlContainer,o=e.element,a=i.left,s=i.top;void 0!==i.right&&(t=o.waypoints?mt(o).width:o.width,a=-1*i.right+t);void 0!==i.bottom&&(n=o.waypoints?mt(o).height:o.height,s=-1*i.bottom+n);Xo(r,a||0,s||0)},Ko.prototype._createOverlayContainer=function(e){var t=he('<div class="djs-overlays" style="position: absolute" />');this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Ko.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Qo(this._overlayRoot,n)},Ko.prototype._getOverlayContainer=function(e,t){var n=x(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},Ko.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)),g(o)&&(o=he(o)),n=this._getOverlayContainer(r),(t=he('<div class="djs-overlay" data-overlay-id="'+i+'" style="position: absolute">')).appendChild(o),e.type&&J(t).add("djs-overlay-"+e.type);var a=this._canvas.findPlane(r),s=this._canvas.getActivePlane();e.plane=a,a!==s&&Zo(t,!1),e.htmlContainer=t,n.overlays.push(e),n.html.appendChild(t),this._overlays[i]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Ko.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,i=n&&n.minZoom,r=n&&n.maxZoom,o=e.htmlContainer,a=!0;n&&((l(i)&&i>t.scale||l(r)&&r<t.scale)&&(a=!1),Zo(o,a)),this._updateOverlayScale(e,t)},Ko.prototype._updateOverlayScale=function(e,t){var n,i,r,o=e.scale,a=e.htmlContainer,s="";!0!==o&&(!1===o?(n=1,i=1):(n=o.min,i=o.max),l(n)&&t.scale<n&&(r=(1/t.scale||1)*n),l(i)&&t.scale>i&&(r=(1/t.scale||1)*i)),l(r)&&(s="scale("+r+","+r+")"),Qo(a,s)},Ko.prototype._updateOverlaysVisibilty=function(e){var t=this;E(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},Ko.prototype._init=function(){var e=this._eventBus,t=this;e.on("canvas.viewbox.changing",(function(e){t.hide()})),e.on("canvas.viewbox.changed",(function(e){var n;n=e.viewbox,t._updateRoot(n),t._updateOverlaysVisibilty(n),t.show()})),e.on(["shape.remove","connection.remove"],(function(e){var n=e.element;E(t.get({element:n}),(function(e){t.remove(e.id)}));var i=t._getOverlayContainer(n);if(i){ye(i.html);var r=t._overlayContainers.indexOf(i);-1!==r&&t._overlayContainers.splice(r,1)}})),e.on("element.changed",500,(function(e){var n=e.element,i=t._getOverlayContainer(n,!0);i&&(E(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&&J(n.html)[e.add?"add":"remove"](e.marker)})),e.on("plane.set",(function(e){E(t._overlays,(function(t){Zo(t.htmlContainer,t.plane===e.plane)}))})),e.on("diagram.clear",this.clear,this)};var Jo={__init__:["overlays"],overlays:["type",Ko]};function ea(e){Ar.call(this,e)}function ta(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function na(e,t){return-1!==(e=h(e)?e:[e]).indexOf(t.key)||-1!==e.indexOf(t.keyCode)}function ia(e){return e.shiftKey}i(ea,Ar),ea.prototype._modules=[Co,ho,qo,Jo],ea.prototype._moddleExtensions={};var ra="keyboard.keydown",oa="input-handle-modified-keys";function aa(e,t){var n=this;this._config=e||{},this._eventBus=t,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),t.on("diagram.destroy",(function(){n._fire("destroy"),n.unbind()})),t.on("diagram.init",(function(){n._fire("init")})),t.on("attach",(function(){e&&e.bindTo&&n.bind(e.bindTo)})),t.on("detach",(function(){n.unbind()}))}aa.$inject=["config.keyboard","eventBus"],aa.prototype._keydownHandler=function(e){this._keyHandler(e,ra)},aa.prototype._keyupHandler=function(e){this._keyHandler(e,"keyboard.keyup")},aa.prototype._keyHandler=function(e,t){if(!this._isEventIgnored(e)){var n={keyEvent:e};this._eventBus.fire(t||ra,n)&&e.preventDefault()}},aa.prototype._isEventIgnored=function(e){return(t=e.target)&&(re(t,"input, textarea")||"true"===t.contentEditable)&&this._isModifiedKeyIgnored(e);var t},aa.prototype._isModifiedKeyIgnored=function(e){return!ta(e)||!this._getAllowedModifiers(e.target).includes(e.key)},aa.prototype._getAllowedModifiers=function(e){var t=oe(e,"[input-handle-modified-keys]",!0);return!t||this._node&&!this._node.contains(t)?[]:t.getAttribute(oa).split(",")},aa.prototype.bind=function(e){this.unbind(),this._node=e,pe.bind(e,"keydown",this._keydownHandler,!0),pe.bind(e,"keyup",this._keyupHandler,!0),this._fire("bind")},aa.prototype.getBinding=function(){return this._node},aa.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),pe.unbind(e,"keydown",this._keydownHandler,!0),pe.unbind(e,"keyup",this._keyupHandler,!0)),this._node=null},aa.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})},aa.prototype.addListener=function(e,t,n){v(e)&&(n=t,t=e,e=1e3),this._eventBus.on(n||ra,e,t)},aa.prototype.removeListener=function(e,t){this._eventBus.off(t||ra,e)},aa.prototype.hasModifier=function(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey},aa.prototype.isCmd=ta,aa.prototype.isShift=ia,aa.prototype.isKey=na;var sa=["c","C",67],ca=["v","V",86],pa=["y","Y",89],ua=["z","Z",90];function la(e,t){var n=this;e.on("editorActions.init",500,(function(e){var i=e.editorActions;n.registerBindings(t,i)}))}la.$inject=["eventBus","keyboard"],la.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}n("undo",(function(e){var n=e.keyEvent;if(ta(n)&&!ia(n)&&na(ua,n))return t.trigger("undo"),!0})),n("redo",(function(e){var n=e.keyEvent;if(ta(n)&&(na(pa,n)||na(ua,n)&&ia(n)))return t.trigger("redo"),!0})),n("copy",(function(e){var n=e.keyEvent;if(ta(n)&&na(sa,n))return t.trigger("copy"),!0})),n("paste",(function(e){var n=e.keyEvent;if(ta(n)&&na(ca,n))return t.trigger("paste"),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(na(["+","Add","="],n)&&ta(n))return t.trigger("stepZoom",{value:1}),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(na(["-","Subtract"],n)&&ta(n))return t.trigger("stepZoom",{value:-1}),!0})),n("zoom",(function(e){var n=e.keyEvent;if(na("0",n)&&ta(n))return t.trigger("zoom",{value:1}),!0})),n("removeSelection",(function(e){if(na(["Backspace","Delete","Del"],e.keyEvent))return t.trigger("removeSelection"),!0}))};var da={__init__:["keyboard","keyboardBindings"],keyboard:["type",aa],keyboardBindings:["type",la]},ha={moveSpeed:50,moveSpeedAccelerated:200};function fa(e,t,n){var i=this;this._config=G({},ha,e||{}),t.addListener((function(e){var n=e.keyEvent,r=i._config;if(!t.isCmd(n))return;if(t.isKey(["ArrowLeft","Left","ArrowUp","Up","ArrowDown","Down","ArrowRight","Right"],n)){var o,a=t.isShift(n)?r.moveSpeedAccelerated:r.moveSpeed;switch(n.key){case"ArrowLeft":case"Left":o="left";break;case"ArrowUp":case"Up":o="up";break;case"ArrowRight":case"Right":o="right";break;case"ArrowDown":case"Down":o="down"}return i.moveCanvas({speed:a,direction:o}),!0}})),this.moveCanvas=function(e){var t=0,i=0,r=e.speed/Math.min(Math.sqrt(n.viewbox().scale),1);switch(e.direction){case"left":t=r;break;case"up":i=r;break;case"right":t=-r;break;case"down":i=-r}n.scroll({dx:t,dy:i})}}fa.$inject=["config.keyboardMove","keyboard","canvas"];var ma={__depends__:[da],__init__:["keyboardMove"],keyboardMove:["type",fa]},va=/^djs-cursor-.*$/;function ga(e){var t=J(document.body);t.removeMatching(va),e&&t.add("djs-cursor-"+e)}function ya(){ga(null)}function ba(e,t){function n(){return!1}return t=t||"element.click",e.once(t,5e3,n),function(){e.off(t,n)}}function xa(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function _a(e,t){return{x:e.x-t.x,y:e.y-t.y}}function wa(e,t){var n;function i(i){var r,o=n.start,a=n.button,s=Ao(i),c=_a(s,o);(!n.dragging&&(r=c,Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2))>15)&&(n.dragging=!0,0===a&&ba(e),ga("grab")),n.dragging)&&(c=_a(s,n.last||n.start),t.scroll({dx:c.x,dy:c.y}),n.last=s);i.preventDefault()}function r(e){pe.unbind(document,"mousemove",i),pe.unbind(document,"mouseup",r),n=null,ya()}e.on("element.mousedown",500,(function(e){return function(e){if(oe(e.target,".djs-draggable"))return;var t=e.button;if(t>=2||e.ctrlKey||e.shiftKey||e.altKey)return;return n={button:t,start:Ao(e)},pe.bind(document,"mousemove",i),pe.bind(document,"mouseup",r),!0}(e.originalEvent)})),this.isActive=function(){return!!n}}wa.$inject=["eventBus","canvas"];var Ea={__init__:["moveCanvas"],moveCanvas:["type",wa]};function Sa(e){return Math.log(e)/Math.log(10)}function Ca(e,t){var n=Sa(e.min),i=Sa(e.max);return(Math.abs(n)+Math.abs(i))/t}var Pa=Math.sign||function(e){return e>=0?1:-1},Ta={min:.2,max:4};function Ra(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=V(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||.75;var i=this;t.on("canvas.init",(function(t){i._init(!1!==e.enabled)}))}Ra.$inject=["config.zoomScroll","eventBus","canvas"],Ra.prototype.scroll=function(e){this._canvas.scroll(e)},Ra.prototype.reset=function(){this._canvas.zoom("fit-viewport")},Ra.prototype.zoom=function(e,t){var n=Ca(Ta,20);this._totalDelta+=e,Math.abs(this._totalDelta)>.1&&(this._zoom(e,t,n),this._totalDelta=0)},Ra.prototype._handleWheel=function(e){if(!oe(e.target,".djs-scrollable",!0)){var t=this._container;e.preventDefault();var n,i=e.ctrlKey,r=e.shiftKey,o=-1*this._scale;if(o*=i?0===e.deltaMode?.02:.32:0===e.deltaMode?1:16,i){var a=t.getBoundingClientRect(),s={x:e.clientX-a.left,y:e.clientY-a.top};n=Math.sqrt(Math.pow(e.deltaY,2)+Math.pow(e.deltaX,2))*Pa(e.deltaY)*o,this.zoom(n,s)}else n=r?{dx:o*e.deltaY,dy:0}:{dx:o*e.deltaX,dy:o*e.deltaY},this.scroll(n)}},Ra.prototype.stepZoom=function(e,t){var n=Ca(Ta,10);this._zoom(e,t,n)},Ra.prototype._zoom=function(e,t,n){var i=this._canvas,r=e>0?1:-1,o=Sa(i.zoom()),a=Math.round(o/n)*n;a+=n*r;var s=Math.pow(10,a);i.zoom(function(e,t){return Math.max(e.min,Math.min(e.max,t))}(Ta,s),t)},Ra.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,i=this._enabled;return void 0===e&&(e=!i),i!==e&&pe[e?"bind":"unbind"](t,"wheel",n,!1),this._enabled=e,e},Ra.prototype._init=function(e){this.toggle(e)};var Aa={__init__:["zoomScroll"],zoomScroll:["type",Ra]};function ka(e){ea.call(this,e)}i(ka,ea),ka.prototype._navigationModules=[ma,Ea,Aa],ka.prototype._modules=[].concat(ea.prototype._modules,ka.prototype._navigationModules);
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).BpmnModeler=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){var t={exports:{}};return e(t,t.exports),t.exports}var n=t((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}}));var i=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var t=e.exports=function(e,n){if(n||(n=16),void 0===e&&(e=128),e<=0)return"0";for(var i=Math.log(Math.pow(2,e))/Math.log(n),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,e/r))/Math.log(n)*r;var o=i-Math.floor(i),a="";for(r=0;r<Math.floor(i);r++){a=Math.floor(Math.random()*n).toString(n)+a}if(o){var s=Math.pow(n,o);a=Math.floor(Math.random()*s).toString(n)+a}var c=parseInt(a,n);return c!==1/0&&c>=Math.pow(2,e)?t(e,n):a};t.rack=function(e,n,i){var r=function(r){var a=0;do{if(a++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var s=t(e,n)}while(Object.hasOwnProperty.call(o,s));return o[s]=r,s},o=r.hats={};return r.get=function(e){return r.hats[e]},r.set=function(e,t){return r.hats[e]=t,r},r.bits=e||128,r.base=n||16,r}}));function r(e){if(!(this instanceof r))return new r(e);e=e||[128,36,1],this._seed=e.length?i.rack(e[0],e[1],e[2]):e}function o(e){return Array.prototype.concat.apply([],e)}r.prototype.next=function(e){return this._seed(e||!0)},r.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},r.prototype.claim=function(e,t){this._seed.set(e,t||!0)},r.prototype.assigned=function(e){return this._seed.get(e)||!1},r.prototype.unclaim=function(e){delete this._seed.hats[e]},r.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};var a=Object.prototype.toString,s=Object.prototype.hasOwnProperty;function c(e){return void 0===e}function l(e){return void 0!==e}function p(e){return null==e}function u(e){return"[object Array]"===a.call(e)}function h(e){return"[object Object]"===a.call(e)}function d(e){return"[object Number]"===a.call(e)}function m(e){var t=a.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function f(e){return"[object String]"===a.call(e)}function v(e,t){return s.call(e,t)}function g(e,t){var n;return t=z(t),b(e,(function(e,i){if(t(e,i))return n=e,!1})),n}function y(e,t){var n=[];return b(e,(function(e,i){t(e,i)&&n.push(e)})),n}function b(e,t){var n;if(!c(e)){var i=u(e)?B:N;for(var r in e)if(v(e,r)&&!1===t(n=e[r],i(r)))return n}}function _(e,t){return c(e)?[]:(function(e){if(!u(e))throw new Error("must supply array")}(e),t=z(t),e.filter((function(e,n){return!t(e,n)})))}function x(e,t,n){return b(e,(function(e,i){n=t(n,e,i)})),n}function w(e,t){return!!x(e,(function(e,n,i){return e&&t(n,i)}),!0)}function E(e,t){return!!g(e,t)}function S(e,t){var n=[];return b(e,(function(e,i){n.push(t(e,i))})),n}function C(e){return e&&Object.keys(e)||[]}function R(e){return C(e).length}function P(e){return S(e,(function(e){return e}))}function M(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=D(t),b(e,(function(e){var i=t(e)||"_",r=n[i];r||(r=n[i]=[]),r.push(e)})),n}function T(e){e=D(e);for(var t={},n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];b(i,(function(n){return M(n,e,t)}));var o=S(t,(function(e,t){return e[0]}));return o}var A=T;function k(e,t){t=D(t);var n=[];return b(e,(function(e,i){for(var r=t(e,i),o={d:r,v:e},a=0;a<n.length;a++){if(r<n[a].d)return void n.splice(a,0,o)}n.push(o)})),S(n,(function(e){return e.v}))}function O(e){return function(t){return w(e,(function(e,n){return t[n]===e}))}}function D(e){return m(e)?e:function(t){return t[e]}}function z(e){return m(e)?e:function(t){return t===e}}function N(e){return e}function B(e){return Number(e)}function L(e,t){var n,i,r,o;function a(){var a=Date.now(),c=o+t-a;if(c>0)return s(c);e.apply(r,i),n=o=i=r=void 0}function s(e){n=setTimeout(a,e)}return function(){o=Date.now();for(var e=arguments.length,a=new Array(e),c=0;c<e;c++)a[c]=arguments[c];i=a,r=this,n||s(t)}}function j(e,t){return e.bind(t)}function I(){return(I=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function $(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return I.apply(void 0,[e].concat(n))}function F(e,t){var n={},i=Object(e);return b(t,(function(t){t in i&&(n[t]=e[t])})),n}function H(e,t){var n={};return b(Object(e),(function(e,i){-1===t.indexOf(i)&&(n[i]=e)})),n}function V(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}var G=[].indexOf,W=function(e,t){if(G)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1},U=/\s+/,q=Object.prototype.toString;function X(e){return new Y(e)}function Y(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function K(e){for(var t;e.childNodes.length;)t=e.childNodes[0],e.removeChild(t);return e}Y.prototype.add=function(e){if(this.list)return this.list.add(e),this;var t=this.array();return~W(t,e)||t.push(e),this.el.className=t.join(" "),this},Y.prototype.remove=function(e){if("[object RegExp]"==q.call(e))return this.removeMatching(e);if(this.list)return this.list.remove(e),this;var t=this.array(),n=W(t,e);return~n&&t.splice(n,1),this.el.className=t.join(" "),this},Y.prototype.removeMatching=function(e){for(var t=this.array(),n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Y.prototype.toggle=function(e,t){return this.list?(void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this):(void 0!==t?t?this.add(e):this.remove(e):this.has(e)?this.remove(e):this.add(e),this)},Y.prototype.array=function(){var e=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(U);return""===e[0]&&e.shift(),e},Y.prototype.has=Y.prototype.contains=function(e){return this.list?this.list.contains(e):!!~W(this.array(),e)};var Z="undefined"!=typeof Element?Element.prototype:{},Q=Z.matches||Z.matchesSelector||Z.webkitMatchesSelector||Z.mozMatchesSelector||Z.msMatchesSelector||Z.oMatchesSelector,J=function(e,t){if(!e||1!==e.nodeType)return!1;if(Q)return Q.call(e,t);for(var n=e.parentNode.querySelectorAll(t),i=0;i<n.length;i++)if(n[i]==e)return!0;return!1};function ee(e,t,n){for(var i=n?e:e.parentNode;i&&i.nodeType!==document.DOCUMENT_NODE&&i.nodeType!==document.DOCUMENT_FRAGMENT_NODE;){if(J(i,t))return i;i=i.parentNode}return J(i,t)?i:null}var te=window.addEventListener?"addEventListener":"attachEvent",ne=window.removeEventListener?"removeEventListener":"detachEvent",ie="addEventListener"!==te?"on":"",re={bind:function(e,t,n,i){return e[te](ie+t,n,i||!1),n},unbind:function(e,t,n,i){return e[ne](ie+t,n,i||!1),n}},oe=["focus","blur"];var ae,se={bind:function(e,t,n,i,r){return-1!==oe.indexOf(n)&&(r=!0),re.bind(e,n,(function(n){var r=n.target||n.srcElement;n.delegateTarget=ee(r,t,!0),n.delegateTarget&&i.call(e,n)}),r)},unbind:function(e,t,n,i){return-1!==oe.indexOf(t)&&(i=!0),re.unbind(e,t,n,i)}},ce=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var i=n[1];if("body"==i){return(r=t.createElement("html")).innerHTML=e,r.removeChild(r.lastChild)}var r,o=pe[i]||pe._default,a=o[0],s=o[1],c=o[2];(r=t.createElement("div")).innerHTML=s+e+c;for(;a--;)r=r.lastChild;if(r.firstChild==r.lastChild)return r.removeChild(r.firstChild);var l=t.createDocumentFragment();for(;r.firstChild;)l.appendChild(r.removeChild(r.firstChild));return l},le=!1;"undefined"!=typeof document&&((ae=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',le=!ae.getElementsByTagName("link").length,ae=void 0);var pe={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:le?[1,"X<div>","</div>"]:[0,"",""]};function ue(e,t){return(t=t||document).querySelector(e)}function he(e,t){return(t=t||document).querySelectorAll(e)}function de(e){e.parentNode&&e.parentNode.removeChild(e)}function me(e,t){return t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}(e,t))}function fe(e,t){return me(t,e),e}pe.td=pe.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],pe.option=pe.optgroup=[1,'<select multiple="multiple">',"</select>"],pe.thead=pe.tbody=pe.colgroup=pe.caption=pe.tfoot=[1,"<table>","</table>"],pe.polyline=pe.ellipse=pe.polygon=pe.circle=pe.text=pe.line=pe.path=pe.rect=pe.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var ve={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":2,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":2,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function ge(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=ve[i];r?(2===r&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function ye(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return ve[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);ge(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)ge(e,i,t[i])}(e,t);return e}function be(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}var _e=/\s+/,xe=Object.prototype.toString;function we(e){return void 0!==e}function Ee(e){return new Se(e)}function Se(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Ce(e){var t=e.parentNode;return t&&t.removeChild(e),e}function Re(e){for(var t;t=e.firstChild;)Ce(t);return e}function Pe(e){return e.cloneNode(!0)}Se.prototype.add=function(e){if(this.list)return this.list.add(e),this;var t=this.array();return~be(t,e)||t.push(e),we(this.el.className.baseVal)?this.el.className.baseVal=t.join(" "):this.el.className=t.join(" "),this},Se.prototype.remove=function(e){if("[object RegExp]"===xe.call(e))return this.removeMatching(e);if(this.list)return this.list.remove(e),this;var t=this.array(),n=be(t,e);return~n&&t.splice(n,1),this.el.className.baseVal=t.join(" "),this},Se.prototype.removeMatching=function(e){for(var t=this.array(),n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Se.prototype.toggle=function(e,t){return this.list?(we(t)?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this):(we(t)?t?this.add(e):this.remove(e):this.has(e)?this.remove(e):this.add(e),this)},Se.prototype.array=function(){var e=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(_e);return""===e[0]&&e.shift(),e},Se.prototype.has=Se.prototype.contains=function(e){return this.list?this.list.contains(e):!!~be(this.array(),e)};var Me="http://www.w3.org/2000/svg",Te='<svg xmlns="'+Me+'"';function Ae(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(Me)&&(e=Te+e.substring(4)):(e=Te+">"+e+"</svg>",t=!0);var n=function(e){var t;return(t=new DOMParser).async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function ke(e,t){var n;return"<"===e.charAt(0)?(n=Ae(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(Me,e),t&&ye(n,t),n}var Oe=ke("svg");function De(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}function ze(e){return e?Oe.createSVGTransformFromMatrix(e):Oe.createSVGTransform()}var Ne=/([&<>]{1})/g,Be=/([\n\r"]{1})/g,Le={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function je(e,t){return e.replace(t,(function(e,t){return Le[t]||t}))}function Ie(e,t){var n,i,r,o,a;switch(e.nodeType){case 3:t.push(je(e.textContent,Ne));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n<i;++n)o=r.item(n),t.push(" ",o.name,'="',je(o.value,Be),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,i=(a=e.childNodes).length;n<i;++n)Ie(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",je(e.nodeValue,Ne),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function $e(e,t){var n=Ae(t);if(Re(e),t){(function(e){return"#document-fragment"===e.nodeName})(n)||(n=n.documentElement);for(var i,r=(i=n.childNodes,Array.prototype.slice.call(i)),o=0;o<r.length;o++)me(r[o],e)}}function Fe(e,t){if(void 0!==t){try{$e(e,t)}catch(e){throw new Error("error parsing SVG: "+e.message)}return e}return function(e){for(var t=e.firstChild,n=[];t;)Ie(t,n),t=t.nextSibling;return n.join("")}(e)}function He(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function Ve(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(He(e,i))}(n,t)),n.consolidate()}var Ge=/^class /;function We(e){return"[object Array]"===Object.prototype.toString.call(e)}function Ue(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function qe(){var e=Array.prototype.slice.call(arguments);1===e.length&&We(e[0])&&(e=e[0]);var t=e.pop();return t.$inject=e,t}var Xe=/constructor\s*[^(]*\(\s*([^)]*)\)/m,Ye=/^(?:async )?(?:function\s*)?[^(]*\(\s*([^)]*)\)/m,Ke=/\/\*([^*]*)\*\//m;function Ze(e){if("function"!=typeof e)throw new Error('Cannot annotate "'+e+'". Expected a function!');var t=e.toString().match(function(e){return Ge.test(e.toString())}(e)?Xe:Ye);return t&&t[1]&&t[1].split(",").map((function(e){return(t=e.match(Ke))?t[1].trim():e.trim()}))||[]}function Qe(){var e=[];this.factory=function(t,n){return e.push([t,"factory",n]),this},this.value=function(t,n){return e.push([t,"value",n]),this},this.type=function(t,n){return e.push([t,"type",n]),this},this.forEach=function(t){e.forEach(t)}}function Je(e,t){t=t||{get:function(e,t){if(n.push(e),!1===t)return null;throw a('No provider for "'+e+'"!')}};var n=[],i=this._providers=Object.create(t._providers||null),r=this._instances=Object.create(null),o=r.injector=this,a=function(e){var t=n.join(" -> ");return n.length=0,new Error(t?e+" (Resolving: "+t+")":e)},s=function(e,o){if(!i[e]&&-1!==e.indexOf(".")){for(var c=e.split("."),l=s(c.shift());c.length;)l=l[c.shift()];return l}if(Ue(r,e))return r[e];if(Ue(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)},c=function(e,t){if(void 0===t&&(t={}),"function"!=typeof e){if(!We(e))throw new Error('Cannot invoke "'+e+'". Expected a function!');e=qe(e.slice())}return{fn:e,dependencies:(e.$inject||Ze(e)).map((function(e){return Ue(t,e)?t[e]:s(e)}))}},l=function(e){var t=c(e),n=t.fn,i=t.dependencies;return new(Function.prototype.bind.apply(n,[null].concat(i)))},p=function(e,t,n){var i=c(e,n),r=i.fn,o=i.dependencies;return r.apply(t,o)},u=function(e){return qe((function(t){return e.get(t)}))},h={factory:p,type:l,value:function(e){return e}};e.forEach((function(e){function t(e,t){return"value"!==e&&We(t)&&(t=qe(t.slice())),t}if(e instanceof Qe)e.forEach((function(e){var n=e[0],r=e[1],o=e[2];i[n]=[h[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 Je((e.__modules__||[]).concat([n]),o),a=qe((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]=[h[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,c=Object.create(null),l=Object.create(null),p=[],h=[],d=[];for(var m in i)n=i[m],-1!==t.indexOf(m)&&("private"===n[2]?-1===(r=p.indexOf(n[3]))?(a=n[3].createChild([],t),s=u(a),p.push(n[3]),h.push(a),d.push(s),c[m]=[s,m,"private",a]):c[m]=[d[r],m,"private",h[r]]:c[m]=[n[2],n[1]],l[m]=!0),"factory"!==n[2]&&"type"!==n[2]||!n[1].$scope||t.forEach((function(e){-1!==n[1].$scope.indexOf(e)&&(c[m]=[n[2],n[1]],l[e]=!0)}));t.forEach((function(e){if(!l[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')})),e.unshift(c)}return new Je(e,o)}}function et(e,t){var n=this;t=t||1e3,e.on(["render.shape","render.connection"],t,(function(e,t){var i=e.type,r=t.element,o=t.gfx,a=t.attrs;if(n.canRender(r))return"render.shape"===i?n.drawShape(o,r,a):n.drawConnection(o,r,a)})),e.on(["render.getShapePath","render.getConnectionPath"],t,(function(e,t){if(n.canRender(t))return"render.getShapePath"===e.type?n.getShapePath(t):n.getConnectionPath(t)}))}function tt(e){return e.join(",").replace(/,?([A-z]),?/g,"$1")}function nt(e){for(var t,n="",i=0;t=e[i];i++)n+=t.x+","+t.y+" ";return n}function it(e,t){var n=ke("polyline");return ye(n,{points:nt(e)}),t&&ye(n,t),n}function rt(e){return y(e,(function(t){return!g(e,(function(e){return e!==t&&ot(t,e)}))}))}function ot(e,t){if(t){if(e===t)return t;if(e.parent)return ot(e.parent,t)}}function at(e,t,n){var i=!n||-1===e.indexOf(t);return i&&e.push(t),i}function st(e,t,n){n=n||0,u(e)||(e=[e]),b(e,(function(e,i){var r=t(e,i,n);u(r)&&r.length&&st(r,t,n+1)}))}function ct(e,t){return function(e,t,n){var i=[],r=[];return st(e,(function(e,o,a){at(i,e,t);var s=e.children;if((-1===n||a<n)&&s&&at(r,s,t))return s})),i}(e,!t,-1)}function lt(e,t){var n,i,r,o;return t=!!t,u(e)||(e=[e]),b(e,(function(e){var a=e;e.waypoints&&!t&&(a=lt(e.waypoints,!0));var s=a.x,c=a.y,l=a.height||0,p=a.width||0;(s<n||void 0===n)&&(n=s),(c<i||void 0===i)&&(i=c),(s+p>r||void 0===r)&&(r=s+p),(c+l>o||void 0===o)&&(o=c+l)})),{x:n,y:i,height:o-i,width:r-n}}function pt(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function ut(e){return!(!e||!e.isFrame)}function ht(e,t){return $({},e||{},t||{})}et.prototype.canRender=function(){},et.prototype.drawShape=function(){},et.prototype.drawConnection=function(){},et.prototype.getShapePath=function(){},et.prototype.getConnectionPath=function(){};function dt(e,t){et.call(this,e,1),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=t.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}n(dt,et),dt.prototype.canRender=function(){return!0},dt.prototype.drawShape=function(e,t,n){var i=ke("rect");return ye(i,{x:0,y:0,width:t.width||0,height:t.height||0}),ut(t)?ye(i,$({},this.FRAME_STYLE,n||{})):ye(i,$({},this.SHAPE_STYLE,n||{})),fe(e,i),i},dt.prototype.drawConnection=function(e,t,n){var i=it(t.waypoints,$({},this.CONNECTION_STYLE,n||{}));return fe(e,i),i},dt.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width;return tt([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])},dt.prototype.getConnectionPath=function(e){var t,n,i=e.waypoints,r=[];for(t=0;n=i[t];t++)n=n.original||n,r.push([0===t?"M":"L",n.x,n.y]);return tt(r)},dt.$inject=["eventBus","styles"];var mt={__init__:["defaultRenderer"],defaultRenderer:["type",dt],styles:["type",function(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(e,t,n){return $(this.style(t,n),{class:e})},this.style=function(t,n){u(t)||n||(n=t,t=[]);var i=x(t,(function(t,n){return $(t,e[n]||{})}),{});return n?$(i,n):i},this.computeStyle=function(e,n,i){return u(n)||(i=n,n=[]),t.style(n||[],$({},i,e||{}))}}]};function ft(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return-1!==n&&e.splice(n,1),n}function vt(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}function gt(e,t){return e&&t?e.indexOf(t):-1}function yt(e,t){return e&&t?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):-1}function bt(e,t,n,i){if(void 0===i&&(i=5),!e||!t||!n)return!1;var r=(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),o=yt(e,t);return Math.abs(r/o)<=i}function _t(e,t){var n;return function(e,t){var n;n=u(e)?e:[e,t];var i=n.slice().shift();return w(n,(function(e){return Math.abs(i.y-e.y)<=2}))}(n=u(e)?e:[e,t])?"h":!!function(e,t){var n;n=u(e)?e:[e,t];var i=n.slice().shift();return w(n,(function(e){return Math.abs(i.x-e.x)<=2}))}(n)&&"v"}function xt(e,t,n){return n=n||0,e.x>t.x-n&&e.y>t.y-n&&e.x<t.x+t.width+n&&e.y<t.y+t.height+n}function wt(e,t){return{x:Math.round(e.x+(t.x-e.x)/2),y:Math.round(e.y+(t.y-e.y)/2)}}var Et=/,?([a-z]),?/gi,St=parseFloat,Ct=Math,Rt=Ct.PI,Pt=Ct.min,Mt=Ct.max,Tt=Ct.pow,At=Ct.abs,kt=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/gi,Ot=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/gi,Dt=Array.isArray||function(e){return e instanceof Array};function zt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Nt(e){if("function"==typeof e||Object(e)!==e)return e;var t=new e.constructor;for(var n in e)zt(e,n)&&(t[n]=Nt(e[n]));return t}function Bt(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}function Lt(e){var t=Lt.ps=Lt.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout((function(){for(var n in t)zt(t,n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])})),t[e]}function jt(e,t,n,i){return 1===arguments.length&&(t=e.y,n=e.width,i=e.height,e=e.x),{x:e,y:t,width:n,height:i,x2:e+n,y2:t+i}}function It(){return this.join(",").replace(Et,"$1")}function $t(e){var t=Nt(e);return t.toString=It,t}function Ft(e,t,n,i,r,o,a,s,c){var l=1-c,p=Tt(l,3),u=Tt(l,2),h=c*c*c,d=p*t+3*u*c*i+3*l*c*c*o+h*s;return{x:qt(p*e+3*u*c*n+3*l*c*c*r+h*a),y:qt(d)}}function Ht(e){var t=en.apply(null,e);return jt(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function Vt(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function Gt(e,t,n,i,r){return e*(e*(-3*t+9*n-9*i+3*r)+6*t-12*n+6*i)-3*t+3*n}function Wt(e,t,n,i,r,o,a,s,c){null==c&&(c=1);for(var l=(c=c>1?1:c<0?0:c)/2,p=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],u=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],h=0,d=0;d<12;d++){var m=l*p[d]+l,f=Gt(m,e,n,r,a),v=Gt(m,t,i,o,s),g=f*f+v*v;h+=u[d]*Ct.sqrt(g)}return l*h}function Ut(e,t,n,i,r,o,a,s){if(!(Mt(e,n)<Pt(r,a)||Pt(e,n)>Mt(r,a)||Mt(t,i)<Pt(o,s)||Pt(t,i)>Mt(o,s))){var c=(e*i-t*n)*(o-s)-(t-i)*(r*s-o*a),l=(e-n)*(o-s)-(t-i)*(r-a);if(l){var p=qt(((e*i-t*n)*(r-a)-(e-n)*(r*s-o*a))/l),u=qt(c/l),h=+p.toFixed(2),d=+u.toFixed(2);if(!(h<+Pt(e,n).toFixed(2)||h>+Mt(e,n).toFixed(2)||h<+Pt(r,a).toFixed(2)||h>+Mt(r,a).toFixed(2)||d<+Pt(t,i).toFixed(2)||d>+Mt(t,i).toFixed(2)||d<+Pt(o,s).toFixed(2)||d>+Mt(o,s).toFixed(2)))return{x:p,y:u}}}}function qt(e){return Math.round(1e11*e)/1e11}function Xt(e,t,n){if(!function(e,t){return e=jt(e),Vt(t=jt(t),e.x,e.y)||Vt(t,e.x2,e.y)||Vt(t,e.x,e.y2)||Vt(t,e.x2,e.y2)||Vt(e,t.x,t.y)||Vt(e,t.x2,t.y)||Vt(e,t.x,t.y2)||Vt(e,t.x2,t.y2)||(e.x<t.x2&&e.x>t.x||t.x<e.x2&&t.x>e.x)&&(e.y<t.y2&&e.y>t.y||t.y<e.y2&&t.y>e.y)}(Ht(e),Ht(t)))return n?0:[];for(var i=Wt.apply(0,e),r=Wt.apply(0,t),o=Kt(e)?1:~~(i/5)||1,a=Kt(t)?1:~~(r/5)||1,s=[],c=[],l={},p=n?0:[],u=0;u<o+1;u++){var h=Ft.apply(0,e.concat(u/o));s.push({x:h.x,y:h.y,t:u/o})}for(u=0;u<a+1;u++)h=Ft.apply(0,t.concat(u/a)),c.push({x:h.x,y:h.y,t:u/a});for(u=0;u<o;u++)for(var d=0;d<a;d++){var m,f=s[u],v=s[u+1],g=c[d],y=c[d+1],b=At(v.x-f.x)<.01?"y":"x",_=At(y.x-g.x)<.01?"y":"x",x=Ut(f.x,f.y,v.x,v.y,g.x,g.y,y.x,y.y);if(x){if(l[m=x.x.toFixed(9)+"#"+x.y.toFixed(9)])continue;l[m]=!0;var w=f.t+At((x[b]-f[b])/(v[b]-f[b]))*(v.t-f.t),E=g.t+At((x[_]-g[_])/(y[_]-g[_]))*(y.t-g.t);w>=0&&w<=1&&E>=0&&E<=1&&(n?p++:p.push({x:x.x,y:x.y,t1:w,t2:E}))}}return p}function Yt(e){var t=Lt(e);if(t.abs)return $t(t.abs);if(Dt(e)&&Dt(e&&e[0])||(e=function(e){if(!e)return null;var t=Lt(e);if(t.arr)return Nt(t.arr);var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=[];return Dt(e)&&Dt(e[0])&&(i=Nt(e)),i.length||String(e).replace(kt,(function(e,t,r){var o=[],a=t.toLowerCase();for(r.replace(Ot,(function(e,t){t&&o.push(+t)})),"m"==a&&o.length>2&&(i.push([t].concat(o.splice(0,2))),a="l",t="m"==t?"l":"L");o.length>=n[a]&&(i.push([t].concat(o.splice(0,n[a]))),n[a]););})),i.toString=Lt.toString,t.arr=Nt(i),i}(e)),!e||!e.length)return[["M",0,0]];var n,i=[],r=0,o=0,a=0,s=0,c=0;"M"==e[0][0]&&(a=r=+e[0][1],s=o=+e[0][2],c++,i[0]=["M",r,o]);for(var l,p,u=c,h=e.length;u<h;u++){if(i.push(l=[]),(n=(p=e[u])[0])!=n.toUpperCase())switch(l[0]=n.toUpperCase(),l[0]){case"A":l[1]=p[1],l[2]=p[2],l[3]=p[3],l[4]=p[4],l[5]=p[5],l[6]=+p[6]+r,l[7]=+p[7]+o;break;case"V":l[1]=+p[1]+o;break;case"H":l[1]=+p[1]+r;break;case"M":a=+p[1]+r,s=+p[2]+o;default:for(var d=1,m=p.length;d<m;d++)l[d]=+p[d]+(d%2?r:o)}else for(var f=0,v=p.length;f<v;f++)l[f]=p[f];switch(n=n.toUpperCase(),l[0]){case"Z":r=+a,o=+s;break;case"H":r=l[1];break;case"V":o=l[1];break;case"M":a=l[l.length-2],s=l[l.length-1];default:r=l[l.length-2],o=l[l.length-1]}}return i.toString=It,t.abs=$t(i),i}function Kt(e){return e[0]===e[2]&&e[1]===e[3]&&e[4]===e[6]&&e[5]===e[7]}function Zt(e,t,n,i){return[e,t,n,i,n,i]}function Qt(e,t,n,i,r,o){var a=1/3,s=2/3;return[a*e+s*n,a*t+s*i,a*r+s*n,a*o+s*i,r,o]}function Jt(e,t,n,i,r,o,a,s,c,l){var p,u=120*Rt/180,h=Rt/180*(+r||0),d=[],m=function(e){return function t(){var n=Array.prototype.slice.call(arguments,0),i=n.join("␀"),r=t.cache=t.cache||{},o=t.count=t.count||[];return zt(r,i)?(Bt(o,i),r[i]):(o.length>=1e3&&delete r[o.shift()],o.push(i),r[i]=e.apply(0,n),r[i])}}((function(e,t,n){return{x:e*Ct.cos(n)-t*Ct.sin(n),y:e*Ct.sin(n)+t*Ct.cos(n)}}));if(l)E=l[0],S=l[1],x=l[2],w=l[3];else{e=(p=m(e,t,-h)).x,t=p.y;var f=(e-(s=(p=m(s,c,-h)).x))/2,v=(t-(c=p.y))/2,g=f*f/(n*n)+v*v/(i*i);g>1&&(n*=g=Ct.sqrt(g),i*=g);var y=n*n,b=i*i,_=(o==a?-1:1)*Ct.sqrt(At((y*b-y*v*v-b*f*f)/(y*v*v+b*f*f))),x=_*n*v/i+(e+s)/2,w=_*-i*f/n+(t+c)/2,E=Ct.asin(((t-w)/i).toFixed(9)),S=Ct.asin(((c-w)/i).toFixed(9));(E=e<x?Rt-E:E)<0&&(E=2*Rt+E),(S=s<x?Rt-S:S)<0&&(S=2*Rt+S),a&&E>S&&(E-=2*Rt),!a&&S>E&&(S-=2*Rt)}var C=S-E;if(At(C)>u){var R=S,P=s,M=c;S=E+u*(a&&S>E?1:-1),d=Jt(s=x+n*Ct.cos(S),c=w+i*Ct.sin(S),n,i,r,0,a,P,M,[S,R,x,w])}C=S-E;var T=Ct.cos(E),A=Ct.sin(E),k=Ct.cos(S),O=Ct.sin(S),D=Ct.tan(C/4),z=4/3*n*D,N=4/3*i*D,B=[e,t],L=[e+z*A,t-N*T],j=[s+z*O,c-N*k],I=[s,c];if(L[0]=2*B[0]-L[0],L[1]=2*B[1]-L[1],l)return[L,j,I].concat(d);for(var $=[],F=0,H=(d=[L,j,I].concat(d).join().split(",")).length;F<H;F++)$[F]=F%2?m(d[F-1],d[F],h).y:m(d[F],d[F+1],h).x;return $}function en(e,t,n,i,r,o,a,s){for(var c,l,p,u,h,d,m,f,v=[],g=[[],[]],y=0;y<2;++y)if(0==y?(l=6*e-12*n+6*r,c=-3*e+9*n-9*r+3*a,p=3*n-3*e):(l=6*t-12*i+6*o,c=-3*t+9*i-9*o+3*s,p=3*i-3*t),At(c)<1e-12){if(At(l)<1e-12)continue;0<(u=-p/l)&&u<1&&v.push(u)}else m=l*l-4*p*c,f=Ct.sqrt(m),m<0||(0<(h=(-l+f)/(2*c))&&h<1&&v.push(h),0<(d=(-l-f)/(2*c))&&d<1&&v.push(d));for(var b,_=v.length,x=_;_--;)b=1-(u=v[_]),g[0][_]=b*b*b*e+3*b*b*u*n+3*b*u*u*r+u*u*u*a,g[1][_]=b*b*b*t+3*b*b*u*i+3*b*u*u*o+u*u*u*s;return g[0][x]=e,g[1][x]=t,g[0][x+1]=a,g[1][x+1]=s,g[0].length=g[1].length=x+2,{x0:Pt.apply(0,g[0]),y0:Pt.apply(0,g[1]),x1:Mt.apply(0,g[0]),y1:Mt.apply(0,g[1])}}function tn(e){var t=Lt(e);if(t.curve)return $t(t.curve);for(var n=Yt(e),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},r=function(e,t,n){var i,r;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];switch(!(e[0]in{T:1,Q:1})&&(t.qx=t.qy=null),e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=["C"].concat(Jt.apply(0,[t.x,t.y].concat(e.slice(1))));break;case"S":"C"==n||"S"==n?(i=2*t.x-t.bx,r=2*t.y-t.by):(i=t.x,r=t.y),e=["C",i,r].concat(e.slice(1));break;case"T":"Q"==n||"T"==n?(t.qx=2*t.x-t.qx,t.qy=2*t.y-t.qy):(t.qx=t.x,t.qy=t.y),e=["C"].concat(Qt(t.x,t.y,t.qx,t.qy,e[1],e[2]));break;case"Q":t.qx=e[1],t.qy=e[2],e=["C"].concat(Qt(t.x,t.y,e[1],e[2],e[3],e[4]));break;case"L":e=["C"].concat(Zt(t.x,t.y,e[1],e[2]));break;case"H":e=["C"].concat(Zt(t.x,t.y,e[1],t.y));break;case"V":e=["C"].concat(Zt(t.x,t.y,t.x,e[1]));break;case"Z":e=["C"].concat(Zt(t.x,t.y,t.X,t.Y))}return e},o=function(e,t){if(e[t].length>7){e[t].shift();for(var i=e[t];i.length;)a[t]="A",e.splice(t++,0,["C"].concat(i.splice(0,6)));e.splice(t,1),p=n.length}},a=[],s="",c="",l=0,p=n.length;l<p;l++){n[l]&&(s=n[l][0]),"C"!=s&&(a[l]=s,l&&(c=a[l-1])),n[l]=r(n[l],i,c),"A"!=a[l]&&"C"==s&&(a[l]="C"),o(n,l);var u=n[l],h=u.length;i.x=u[h-2],i.y=u[h-1],i.bx=St(u[h-4])||i.x,i.by=St(u[h-3])||i.y}return t.curve=$t(n),n}var nn=function(e,t,n){e=tn(e),t=tn(t);for(var i,r,o,a,s,c,l,p,u,h,d=n?0:[],m=0,f=e.length;m<f;m++){var v=e[m];if("M"==v[0])i=s=v[1],r=c=v[2];else{"C"==v[0]?(u=[i,r].concat(v.slice(1)),i=u[6],r=u[7]):(u=[i,r,i,r,s,c,s,c],i=s,r=c);for(var g=0,y=t.length;g<y;g++){var b=t[g];if("M"==b[0])o=l=b[1],a=p=b[2];else{"C"==b[0]?(h=[o,a].concat(b.slice(1)),o=h[6],a=h[7]):(h=[o,a,o,a,l,p,l,p],o=l,a=p);var _=Xt(u,h,n);if(n)d+=_;else{for(var x=0,w=_.length;x<w;x++)_[x].segment1=m,_[x].segment2=g,_[x].bez1=u,_[x].bez2=h;d=d.concat(_)}}}}}return d};function rn(e){return{x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height)}}function on(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function an(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function sn(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function cn(e){return on({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function ln(e,t,n){h(n=n||0)||(n={x:n,y:n});var i=an(e),r=an(t),o=i.bottom+n.y<=r.top,a=i.left-n.x>=r.right,s=i.top-n.y>=r.bottom,c=o?"top":s?"bottom":null,l=i.right+n.x<=r.left?"left":a?"right":null;return l&&c?c+"-"+l:l||c||"intersect"}function pn(e,t,n){var i=function(e,t){return nn(e,t)}(e,t);return 1===i.length||2===i.length&&yt(i[0],i[1])<1?on(i[0]):i.length>1?on((i=k(i,(function(e){var t=Math.floor(100*e.t2)||1;return t=((t=100-t)<10?"0":"")+t,e.segment2+"#"+t})))[n?0:i.length-1]):null}function un(e,t){return Math.round(e*t)/t}function hn(e){return d(e)?e+"px":e}function dn(e,t,n){var i=ke("g");Ee(i).add(t);var r=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]||null),i}var mn={shape:["x","y","width","height"],connection:["waypoints"]};function fn(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._init(e||{})}function vn(e,t){var n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}fn.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],fn.prototype._init=function(e){var t=this._eventBus,n=this._container=function(e){var t=(e=$({},{width:"100%",height:"100%"},e)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container"),$(n.style,{position:"relative",overflow:"hidden",width:hn(e.width),height:hn(e.height)}),t.appendChild(n),n}(e),i=this._svg=ke("svg");ye(i,{width:"100%",height:"100%"}),fe(n,i);var r=this._viewport=dn(i,"viewport");!1!==e.deferUpdate&&(this._viewboxChanged=L(j(this._viewboxChanged,this),300)),t.on("diagram.init",(function(){t.fire("canvas.init",{svg:i,viewport:r})}),this),t.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","root.set"],(function(){delete this._cachedViewbox}),this),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)},fn.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._planes,delete this._rootElement,delete this._viewport},fn.prototype._clear=function(){var e=this;this._elementRegistry.getAll().forEach((function(t){var n=pt(t);"root"===n?e.removeRootElement(t):e._removeElement(t,n)})),this._planes=[],this._rootElement=null,delete this._cachedViewbox},fn.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},fn.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},fn.prototype._createLayer=function(e,t){void 0===t&&(t=1);var n=x(this._layers,(function(e,n){return t>=n.index&&e++,e}),0);return{group:dn(this._viewport,"layer-"+e,n),index:t}},fn.prototype._removeLayer=function(e){var t=this._layers[e];t&&(delete this._layers[e],Ce(t.group))},fn.prototype.getActiveLayer=function(){return this._findPlaneForRoot(this.getRootElement()).layer},fn.prototype.findRoot=function(e){if("string"==typeof e&&(e=this._elementRegistry.get(e)),e)return(this._findPlaneForRoot(function(e){for(;e.parent;)e=e.parent;return e}(e))||{}).rootElement},fn.prototype.getRootElements=function(){return this._planes.map((function(e){return e.rootElement}))},fn.prototype._findPlaneForRoot=function(e){return g(this._planes,(function(t){return t.rootElement===e}))},fn.prototype.getContainer=function(){return this._container},fn.prototype._updateMarker=function(e,t,n){var i;e.id||(e=this._elementRegistry.get(e)),(i=this._elementRegistry._elements[e.id])&&(b([i.gfx,i.secondaryGfx],(function(e){e&&(n?Ee(e).add(t):Ee(e).remove(t))})),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},fn.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},fn.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},fn.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),Ee(this.getGraphics(e)).has(t)},fn.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},fn.prototype.getRootElement=function(){var e=this._rootElement;return e||this.setRootElement(this.addRootElement(null))},fn.prototype.addRootElement=function(e){var t=this._rootsIdx++;e||(e={id:"__implicitroot_"+t,children:[],isImplicit:!0});var n=e.layer="root-"+t;this._ensureValid("root",e);var i=this.getLayer(n,0);return ye(i,"display","none"),this._addRoot(e,i),this._planes.push({rootElement:e,layer:i}),e},fn.prototype.removeRootElement=function(e){if("string"==typeof e&&(e=this._elementRegistry.get(e)),this._findPlaneForRoot(e))return this._removeRoot(e),this._removeLayer(e.layer),this._planes=this._planes.filter((function(t){return t.rootElement!==e})),e},fn.prototype.setRootElement=function(e,t){if(l(t))throw new Error("override not supported");if(e!==this._rootElement){if(!e)throw new Error("rootElement required");return this._findPlaneForRoot(e)||(e=this.addRootElement(e)),this._setRoot(e),e}},fn.prototype._removeRoot=function(e){var t=this._elementRegistry,n=this._eventBus;n.fire("root.remove",{element:e}),n.fire("root.removed",{element:e}),t.remove(e)},fn.prototype._addRoot=function(e,t){var n=this._elementRegistry,i=this._eventBus;i.fire("root.add",{element:e}),n.add(e,t),i.fire("root.added",{element:e,gfx:t})},fn.prototype._setRoot=function(e,t){var n=this._rootElement;n&&(this._elementRegistry.updateGraphics(n,null,!0),ye(this._findPlaneForRoot(n).layer,"display","none")),e&&(t||(t=this._findPlaneForRoot(e).layer),this._elementRegistry.updateGraphics(e,this._svg,!0),ye(t,"display",null)),this._rootElement=e,this._eventBus.fire("root.set",{element:e})},fn.prototype._ensureValid=function(e,t){if(!t.id)throw new Error("element must have an id");if(this._elementRegistry.get(t.id))throw new Error("element <"+t.id+"> already exists");var n=mn[e];if(!w(n,(function(e){return void 0!==t[e]})))throw new Error("must supply { "+n.join(", ")+" } with "+e)},fn.prototype._setParent=function(e,t,n){vt(t.children,e,n),e.parent=t},fn.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,i);return this._elementRegistry.add(t,a),o.update(e,t,a),r.fire(e+".added",{element:t,gfx:a}),t},fn.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},fn.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},fn.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),ft(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},fn.prototype.removeShape=function(e){return this._removeElement(e,"shape")},fn.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},fn.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},fn.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},fn.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},fn.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return this._cachedViewbox;var t,n,i,r,o,a,s,c=this._viewport,l=this.getSize();return e?(this._changeViewbox((function(){o=Math.min(l.width/e.width,l.height/e.height);var t=this._svg.createSVGMatrix().scale(o).translate(-e.x,-e.y);Ve(c,t)})),e):(t=(i=this._rootElement?this.getActiveLayer():null)&&i.getBBox()||{},n=(r=Ve(c))?r.matrix:function(e,t,n,i,r,o){var a=Oe.createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return De(a,e);case 6:return De(a,{a:e,b:t,c:n,d:i,e:r,f:o})}}(),o=un(n.a,1e3),a=un(-n.e||0,1e3),s=un(-n.f||0,1e3),e=this._cachedViewbox={x:a?a/o:0,y:s?s/o:0,width:l.width/o,height:l.height/o,scale:o,inner:{width:t.width||0,height:t.height||0,x:t.x||0,y:t.y||0},outer:l})},fn.prototype.scroll=function(e){var t=this._viewport,n=t.getCTM();return e&&this._changeViewbox((function(){e=$({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),vn(t,n)})),{x:n.e,y:n.f}},fn.prototype.scrollToElement=function(e,t){var n=100;"string"==typeof e&&(e=this._elementRegistry.get(e));var i=this.findRoot(e);i!==this.getRootElement()&&this.setRootElement(i),t||(t={}),"number"==typeof t&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};var r,o,a=lt(e),s=an(a),c=this.viewbox(),l=this.zoom();c.y+=t.top/l,c.x+=t.left/l,c.width-=(t.right+t.left)/l,c.height-=(t.bottom+t.top)/l;var p=an(c);if(a.width<c.width&&a.height<c.height){var u=Math.max(0,s.right-p.right),h=Math.min(0,s.left-p.left),d=Math.max(0,s.bottom-p.bottom),m=Math.min(0,s.top-p.top);r=u||h,o=d||m}else r=a.x-c.x,o=a.y-c.y;this.scroll({dx:-r*l,dy:-o*l})},fn.prototype.zoom=function(e,t){return e?"fit-viewport"===e?this._fitViewport(t):(this._changeViewbox((function(){"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)})),un(i.a,1e3)):this.viewbox(e).scale;var n,i},fn.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},fn.prototype._setZoom=function(e,t){var n,i,r,o,a=this._svg,s=this._viewport,c=a.createSVGMatrix(),l=a.createSVGPoint(),p=(i=s.getCTM()).a;return t?(n=$(l,t).matrixTransform(i.inverse()),r=c.translate(n.x,n.y).scale(1/p*e).translate(-n.x,-n.y),o=i.multiply(r)):o=c.scale(e),vn(this._viewport,o),o},fn.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},fn.prototype.getAbsoluteBBox=function(e){var t,n=this.viewbox();e.waypoints?t=this.getGraphics(e).getBBox():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}},fn.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var gn="data-element-id";function yn(e){this._elements={},this._eventBus=e}yn.$inject=["eventBus"],yn.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),ye(t,gn,i),n&&ye(n,gn,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},yn.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(ye(i.gfx,gn,""),i.secondaryGfx&&ye(i.secondaryGfx,gn,""),delete t[n])},yn.prototype.updateId=function(e,t){this._validateId(t),"string"==typeof e&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t});var n=this.getGraphics(e),i=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,i)},yn.prototype.updateGraphics=function(e,t,n){var i=e.id||e,r=this._elements[i];return n?r.secondaryGfx=t:r.gfx=t,t&&ye(t,gn,i),t},yn.prototype.get=function(e){var t;t="string"==typeof e?e:e&&ye(e,gn);var n=this._elements[t];return n&&n.element},yn.prototype.filter=function(e){var t=[];return this.forEach((function(n,i){e(n,i)&&t.push(n)})),t},yn.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),i=0;i<n.length;i++){var r=t[n[i]],o=r.element;if(e(o,r.gfx))return o}},yn.prototype.getAll=function(){return this.filter((function(e){return e}))},yn.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach((function(n){var i=t[n],r=i.element,o=i.gfx;return e(r,o)}))},yn.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},yn.prototype._validateId=function(e){if(!e)throw new Error("element must have an id");if(this._elements[e])throw new Error("element with id "+e+" already added")};var bn={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,n){var o=this.indexOf(e);if(void 0===n){if(-1!==o)return;n=this.length}-1!==o&&this.splice(o,1),this.splice(n,0,e),-1===o&&t.set(e,r,i)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e},isExtended:function(e){return!0===e.__refs_collection}};function _n(e,t,n){var i=bn.extend(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:i}),i.length&&i.forEach((function(i){e.set(i,t.inverse,n)}))}function xn(e,t){if(!(this instanceof xn))return new xn(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}xn.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?_n(this,t,e):function(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var o=r;r=null,o&&e.unset(o,i,n),r=t,e.set(r,i,n)}}})}(this,t,e)},xn.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return bn.isExtended(n)||_n(this,t,e),n},xn.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},xn.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},xn.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var wn=xn,En=bn;wn.Collection=En;var Sn=new wn({name:"children",enumerable:!0,collection:!0},{name:"parent"}),Cn=new wn({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Rn=new wn({name:"attachers",collection:!0},{name:"host"}),Pn=new wn({name:"outgoing",collection:!0},{name:"source"}),Mn=new wn({name:"incoming",collection:!0},{name:"target"});function Tn(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(e){var t=this.label,n=this.labels;!e&&t?n.remove(t):n.add(e,0)}}),Sn.bind(this,"parent"),Cn.bind(this,"labels"),Pn.bind(this,"outgoing"),Mn.bind(this,"incoming")}function An(){Tn.call(this),Sn.bind(this,"children"),Rn.bind(this,"host"),Rn.bind(this,"attachers")}function kn(){An.call(this)}function On(){An.call(this),Cn.bind(this,"labelTarget")}function Dn(){Tn.call(this),Pn.bind(this,"source"),Mn.bind(this,"target")}n(An,Tn),n(kn,An),n(On,An),n(Dn,Tn);var zn={connection:Dn,shape:An,label:On,root:kn};function Nn(){this._uid=12}Nn.prototype.createRoot=function(e){return this.create("root",e)},Nn.prototype.createLabel=function(e){return this.create("label",e)},Nn.prototype.createShape=function(e){return this.create("shape",e)},Nn.prototype.createConnection=function(e){return this.create("connection",e)},Nn.prototype.create=function(e,t){return(t=$({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=zn[e];if(!n)throw new Error("unknown type: <"+e+">");return $(new n,t)}(e,t)};var Bn=Array.prototype.slice;function Ln(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function jn(){}function In(e){return e.childNodes[0]}function $n(e,t,n,i,r){var o=ze();o.setTranslate(t,n);var a=ze();a.setRotate(i||0,0,0);var s=ze();s.setScale(r||1,r||1),Ve(e,[o,a,s])}function Fn(e,t,n){var i=ze();i.setTranslate(t,n),Ve(e,i)}function Hn(e,t){var n=ze();n.setRotate(t,0,0),Ve(e,n)}function Vn(e,t){this._eventBus=e,this._elementRegistry=t}function Gn(e,t,n){var i=n||t.firstChild;e!==i&&t.insertBefore(e,i)}Ln.prototype.on=function(e,t,n,i){if(e=u(e)?e:[e],m(t)&&(i=n,n=t,t=1e3),!d(t))throw new Error("priority must be a number");var r=n;i&&((r=j(n,i)).__fn=n.__fn||n);var o=this;e.forEach((function(e){o._addListener(e,{priority:t,callback:r,next:null})}))},Ln.prototype.once=function(e,t,n,i){var r=this;if(m(t)&&(i=n,n=t,t=1e3),!d(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var t=n.apply(i,arguments);return r.off(e,o),t}o.__fn=n,this.on(e,t,o)},Ln.prototype.off=function(e,t){e=u(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},Ln.prototype.createEvent=function(e){var t=new jn;return t.init(e),t},Ln.prototype.fire=function(e,t){var n,i,r,o;if(o=Bn.call(arguments),"object"==typeof e&&(e=(t=e).type),!e)throw new Error("no event type specified");if(i=this._listeners[e]){n=t instanceof jn?t:this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{r=this._invokeListeners(n,o,i)}finally{e!==a&&(n.type=a)}return void 0===r&&n.defaultPrevented&&(r=!1),r}},Ln.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},Ln.prototype._destroy=function(){this._listeners={}},Ln.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},Ln.prototype._invokeListener=function(e,t,n){var i;if(n.callback.__isTomb)return i;try{void 0!==(i=function(e,t){return e.apply(null,t)}(n.callback,t))&&(e.returnValue=i,e.stopPropagation()),!1===i&&e.preventDefault()}catch(e){if(!this.handleError(e))throw console.error("unhandled error in event listener",e),e}return i},Ln.prototype._addListener=function(e,t){var n,i=this._getListeners(e);if(i){for(;i;){if(i.priority<t.priority)return t.next=i,void(n?n.next=t:this._setListeners(e,t));n=i,i=i.next}n.next=t}else this._setListeners(e,t)},Ln.prototype._getListeners=function(e){return this._listeners[e]},Ln.prototype._setListeners=function(e,t){this._listeners[e]=t},Ln.prototype._removeListener=function(e,t){var n,i,r,o=this._getListeners(e);if(t)for(;o;)n=o.next,(r=o.callback)!==t&&r.__fn!==t||(i?i.next=n:this._setListeners(e,n)),i=o,o=n;else this._setListeners(e,null)},jn.prototype.stopPropagation=function(){this.cancelBubble=!0},jn.prototype.preventDefault=function(){this.defaultPrevented=!0},jn.prototype.init=function(e){$(this,e||{})},Vn.$inject=["eventBus","elementRegistry"],Vn.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=function(e){return e.parentNode.childNodes[1]}(n))||(Ee(t=ke("g")).add("djs-children"),fe(n.parentNode,t)):t=n,t},Vn.prototype._clear=function(e){var t=In(e);return K(t),t},Vn.prototype._createContainer=function(e,t,n,i){var r=ke("g");Ee(r).add("djs-group"),void 0!==n?Gn(r,t,t.childNodes[n]):fe(t,r);var o=ke("g");Ee(o).add("djs-element"),Ee(o).add("djs-"+e),i&&Ee(o).add("djs-frame"),fe(r,o);var a=ke("g");return Ee(a).add("djs-visual"),fe(o,a),o},Vn.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,ut(t))},Vn.prototype.updateContainments=function(e){var t=this,n=this._elementRegistry;b(x(e,(function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e}),{}),(function(e){var i=e.children;if(i){var r=t._getChildrenContainer(e);b(i.slice().reverse(),(function(e){Gn(n.getGraphics(e).parentNode,r)}))}}))},Vn.prototype.drawShape=function(e,t){return this._eventBus.fire("render.shape",{gfx:e,element:t})},Vn.prototype.getShapePath=function(e){return this._eventBus.fire("render.getShapePath",e)},Vn.prototype.drawConnection=function(e,t){return this._eventBus.fire("render.connection",{gfx:e,element:t})},Vn.prototype.getConnectionPath=function(e){return this._eventBus.fire("render.getConnectionPath",e)},Vn.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if("shape"===e)this.drawShape(i,t),Fn(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(i,t)}t.hidden?ye(n,"display","none"):ye(n,"display","block")}},Vn.prototype.remove=function(e){Ce(this._elementRegistry.getGraphics(e).parentNode)};var Wn={__depends__:[mt],__init__:["canvas"],canvas:["type",fn],elementRegistry:["type",yn],elementFactory:["type",Nn],eventBus:["type",Ln],graphicsFactory:["type",Vn]};function Un(e){var t=[],n=[];function i(e){return t.indexOf(e)>=0}e.forEach((function e(r){i(r)||((r.__depends__||[]).forEach(e),i(r)||(!function(e){t.push(e)}(r),(r.__init__||[]).forEach((function(e){n.push(e)}))))}));var r=new Je(t);return n.forEach((function(e){try{r["string"==typeof e?"get":"invoke"](e)}catch(e){throw console.error("Failed to instantiate component"),console.error(e.stack),e}})),r}function qn(e,t){this.injector=t=t||function(e){return Un([{config:["value",e=e||{}]},Wn].concat(e.modules||[]))}(e),this.get=t.get,this.invoke=t.invoke,this.get("eventBus").fire("diagram.init")}function Xn(){}function Yn(e,t){this.model=e,this.properties=t}qn.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},qn.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")},Xn.prototype.get=function(e){return this.$model.properties.get(this,e)},Xn.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},Yn.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(Xn.prototype);b(e.properties,(function(e){e.isMany||void 0===e.default||(i[e.name]=e.default)})),n.defineModel(i,t),n.defineDescriptor(i,e);var r=e.ns.name;function o(e){n.define(this,"$type",{value:r,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),b(e,j((function(e,t){this.set(t,e)}),this))}return o.prototype=i,o.hasType=i.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var Kn={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},Zn={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function Qn(e,t){var n=Zn[e];return n?n(t):t}function Jn(e){return!!Kn[e]}function ei(e){return!!Zn[e]}function ti(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function ni(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function ii(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,b(e,j(this.registerPackage,this))}function ri(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function oi(e){this.model=e}function ai(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function si(e){this.properties=new oi(this),this.factory=new Yn(this,this.properties),this.registry=new ii(e,this.properties),this.typeCache={}}ni.prototype.build=function(){return F(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},ni.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)},ni.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},ni.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=ti(r[0],i),a=ti(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},ni.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},ni.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},ni.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},ni.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},ni.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")},ni.prototype.hasProperty=function(e){return this.propertiesByName[e]},ni.prototype.addTrait=function(e,t){var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(b(e.properties,j((function(n){n=$({},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)},ii.prototype.getPackage=function(e){return this.packageMap[e]},ii.prototype.getPackages=function(){return this.packages},ii.prototype.registerPackage=function(e){e=$({},e);var t=this.packageMap;ri(t,e,"prefix"),ri(t,e,"uri"),b(e.types,j((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},ii.prototype.registerType=function(e,t){var n=ti((e=$({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:$(e.meta||{})})).name,t.prefix),i=n.name,r={};b(e.properties,j((function(e){var t=ti(e.name,n.prefix),i=t.name;Jn(e.type)||(e.type=ti(e.type,t.prefix).name),$(e,{ns:t,name:i}),r[i]=e}),this)),$(e,{ns:n,name:i,propertiesByName:r}),b(e.extends,j((function(e){var t=this.typeMap[e];t.traits=t.traits||[],t.traits.push(i)}),this)),this.definePackage(e,t),this.typeMap[i]=e},ii.prototype.mapTypes=function(e,t,n){var i=Jn(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(e){return a(e,!0)}function a(n,i){var o=ti(n,Jn(n)?"":e.prefix);r.mapTypes(o,t,i)}if(!i)throw new Error("unknown type <"+e.name+">");b(i.superClass,n?o:a),t(i,!n),b(i.traits,o)},ii.prototype.getEffectiveDescriptor=function(e){var t=ti(e),n=new ni(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},ii.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},oi.prototype.set=function(e,t,n){var i=this.model.getPropertyDescriptor(e,t),r=i&&i.name;void 0===n?i?delete e[r]:delete e.$attrs[t]:i?r in e?e[r]=n:ai(e,i,n):e.$attrs[t]=n},oi.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&&ai(e,n,[]),e[i]},oi.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;delete(n=$({},n,{get:function(){return i}})).value}Object.defineProperty(e,t,n)},oi.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},oi.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},si.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},si.prototype.getType=function(e){var t=this.typeCache,n=f(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},si.prototype.createAny=function(e,t,n){var i=ti(e),r={$type:e,$instanceOf:function(e){return e===this.$type}},o={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};return this.properties.defineDescriptor(r,o),this.properties.defineModel(r,this),this.properties.define(r,"$parent",{enumerable:!1,writable:!0}),this.properties.define(r,"$instanceOf",{enumerable:!1,writable:!0}),b(n,(function(e,t){h(e)&&void 0!==e.value?r[e.name]=e.value:r[t]=e})),r},si.prototype.getPackage=function(e){return this.registry.getPackage(e)},si.prototype.getPackages=function(){return this.registry.getPackages()},si.prototype.getElementDescriptor=function(e){return e.$descriptor},si.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},si.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},si.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var ci=String.fromCharCode,li=Object.prototype.hasOwnProperty,pi=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,ui={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function hi(e,t,n,i){return i?li.call(ui,i)?ui[i]:"&"+i+";":ci(t||parseInt(n,16))}function di(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(pi,hi):e}Object.keys(ui).forEach((function(e){ui[e.toUpperCase()]=ui[e]}));var mi="xsi:type",fi="non-whitespace outside of root node";function vi(e){return new Error(e)}function gi(e){return"missing namespace for prefix <"+e+">"}function yi(e){return{get:e,enumerable:!0}}function bi(e){var t,n={};for(t in e)n[t]=e[t];return n}function _i(e){return e+"$uri"}function xi(){return{line:0,column:0}}function wi(e){throw e}function Ei(e){if(!this)return new Ei(e);var t,n,i,r,o,a,s,c,l,p=e&&e.proxy,u=wi,h=xi,d=!1,m=!1,f=null,v=!1;function g(e){e instanceof Error||(e=vi(e)),f=e,u(e,h)}function y(e){o&&(e instanceof Error||(e=vi(e)),o(e,h))}this.on=function(e,l){if("function"!=typeof l)throw vi("required args <name, cb>");switch(e){case"openTag":n=l;break;case"text":t=l;break;case"closeTag":i=l;break;case"error":u=l;break;case"warn":o=l;break;case"cdata":r=l;break;case"attention":c=l;break;case"question":s=l;break;case"comment":a=l;break;default:throw vi("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw vi("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return n["http://www.w3.org/2001/XMLSchema-instance"]="xsi",m=!0,l=n,this},this.parse=function(e){if("string"!=typeof e)throw vi("required args <xml=string>");return f=null,function(e){var o,u,f,b,_,x,w,E,S,C,R,P=m?[]:null,M=m?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[_i(n)]=t;return i}(l):null,T=[],A=0,k=!1,O=!1,D=0,z=0,N="",B=0;function L(){if(null!==R)return R;var e,t,n,i,r,o,a,s,c,p,u,h=m&&M.xmlns,f=m&&d?[]:null,v=B,g=N,b=g.length,_={},x={};e:for(;v<b;v++)if(c=!1,!(32===(p=g.charCodeAt(v))||p<14&&p>8)){for((p<65||p>122||p>90&&p<97)&&95!==p&&58!==p&&(y("illegal first char attribute name"),c=!0),u=v+1;u<b;u++)if(!((p=g.charCodeAt(u))>96&&p<123||p>64&&p<91||p>47&&p<59||46===p||45===p||95===p)){if(32===p||p<14&&p>8){y("missing attribute value"),v=u;continue e}if(61===p)break;y("illegal attribute name char"),c=!0}if("xmlns:xmlns"===(s=g.substring(v,u))&&(y("illegal declaration of xmlns"),c=!0),34===(p=g.charCodeAt(u+1)))-1===(u=g.indexOf('"',v=u+2))&&-1!==(u=g.indexOf("'",v))&&(y("attribute value quote missmatch"),c=!0);else if(39===p)-1===(u=g.indexOf("'",v=u+2))&&-1!==(u=g.indexOf('"',v))&&(y("attribute value quote missmatch"),c=!0);else for(y("missing attribute value quotes"),c=!0,u+=1;u<b&&!(32===(p=g.charCodeAt(u+1))||p<14&&p>8);u++);for(-1===u&&(y("missing closing quotes"),u=b,c=!0),c||(o=g.substring(v,u)),v=u;u+1<b&&!(32===(p=g.charCodeAt(u+1))||p<14&&p>8);u++)v===u&&(y("illegal character after attribute end"),c=!0);if(v=u+1,!c)if(s in x)y("attribute <"+s+"> already defined");else if(x[s]=!0,m)if(d){if(null!==(r="xmlns"===s?"xmlns":120===s.charCodeAt(0)&&"xmlns:"===s.substr(0,6)?s.substr(6):null)){if(e=di(o),t=_i(r),!(a=l[e])){if("xmlns"===r||t in M&&M[t]!==e)do{a="ns"+A++}while(void 0!==M[a]);else a=r;l[e]=a}M[r]!==a&&(i||(M=bi(M),i=!0),M[r]=a,"xmlns"===r&&(M[_i(a)]=e,h=a),M[t]=e),_[s]=o;continue}f.push(s,o)}else-1!==(p=s.indexOf(":"))?(n=M[s.substring(0,p)])?((s=h===n?s.substr(p+1):n+s.substr(p))===mi&&(-1!==(p=o.indexOf(":"))?(n=o.substring(0,p),o=(n=M[n]||n)+o.substring(p)):o=h+":"+o),_[s]=o):y(gi(s.substring(0,p))):_[s]=o;else _[s]=o}if(d)for(v=0,b=f.length;v<b;v++){if(s=f[v++],o=f[v],-1!==(p=s.indexOf(":"))){if(!(n=M[s.substring(0,p)])){y(gi(s.substring(0,p)));continue}(s=h===n?s.substr(p+1):n+s.substr(p))===mi&&(-1!==(p=o.indexOf(":"))?(n=o.substring(0,p),o=(n=M[n]||n)+o.substring(p)):o=h+":"+o)}_[s]=o}return R=_}function j(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,o=0,a=0,s=z;D>=a&&(t=i.exec(e))&&!((s=t[0].length+t.index)>D);)r+=1,a=s;return-1==D?(o=s,n=e.substring(z)):0===z?n=e.substring(z,D):(o=D-a,n=-1==z?e.substring(D):e.substring(D,z+1)),{data:n,line:r,column:o}}h=j,p&&(C=Object.create({},{name:yi((function(){return E})),originalName:yi((function(){return S})),attrs:yi(L),ns:yi((function(){return M}))}));for(;-1!==z;){if(-1===(D=60===e.charCodeAt(z)?z:e.indexOf("<",z)))return T.length?g("unexpected end of file"):0===z?g("missing start tag"):void(z<e.length&&e.substring(z).trim()&&y(fi));if(z!==D)if(T.length){if(t&&(t(e.substring(z,D),di,h),v))return}else if(e.substring(z,D).trim()&&(y(fi),v))return;if(33===(_=e.charCodeAt(D+1))){if(91===(b=e.charCodeAt(D+2))&&"CDATA["===e.substr(D+3,6)){if(-1===(z=e.indexOf("]]>",D)))return g("unclosed cdata");if(r&&(r(e.substring(D+9,z),h),v))return;z+=3;continue}if(45===b&&45===e.charCodeAt(D+3)){if(-1===(z=e.indexOf("--\x3e",D)))return g("unclosed comment");if(a&&(a(e.substring(D+4,z),di,h),v))return;z+=3;continue}}if(63!==_){for(u=D+1;;u++){if(x=e.charCodeAt(u),isNaN(x))return z=-1,g("unclosed tag");if(34===x)u=-1!==(b=e.indexOf('"',u+1))?b:u;else if(39===x)u=-1!==(b=e.indexOf("'",u+1))?b:u;else if(62===x){z=u;break}}if(33!==_){if(R={},47===_){if(k=!1,O=!0,!T.length)return g("missing open tag");if(u=E=T.pop(),b=D+2+u.length,e.substring(D+2,b)!==u)return g("closing tag mismatch");for(;b<z;b++)if(!(32===(_=e.charCodeAt(b))||_>8&&_<14))return g("close tag")}else{if(47===e.charCodeAt(z-1)?(u=E=e.substring(D+1,z-1),k=!0,O=!0):(u=E=e.substring(D+1,z),k=!0,O=!1),!(_>96&&_<123||_>64&&_<91||95===_||58===_))return g("illegal first char nodeName");for(b=1,f=u.length;b<f;b++)if(!((_=u.charCodeAt(b))>96&&_<123||_>64&&_<91||_>47&&_<59||45===_||95===_||46==_)){if(32===_||_<14&&_>8){E=u.substring(0,b),R=null;break}return g("invalid nodeName")}O||T.push(E)}if(m){if(o=M,k&&(O||P.push(o),null===R&&(d=-1!==u.indexOf("xmlns",b))&&(B=b,N=u,L(),d=!1)),S=E,-1!==(_=E.indexOf(":"))){if(!(w=M[E.substring(0,_)]))return g("missing namespace on <"+S+">");E=E.substr(_+1)}else w=M.xmlns;w&&(E=w+":"+E)}if(k&&(B=b,N=u,n&&(p?n(C,di,O,h):n(E,L,di,O,h),v)))return;if(O){if(i&&(i(p?C:E,di,k,h),v))return;m&&(M=k?o:P.pop())}z+=1}else{if(c&&(c(e.substring(D,z+1),di,h),v))return;z+=1}}else{if(-1===(z=e.indexOf("?>",D)))return g("unclosed question");if(s&&(s(e.substring(D,z+2),h),v))return;z+=2}}}(e),h=xi,v=!1,f},this.stop=function(){v=!0}}function Si(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var Ci={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},Ri="xsi:type";function Pi(e){return e.xml&&e.xml.serialize}function Mi(e){return Pi(e)===Ri}function Ti(e,t){return Si(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function Ai(e){return new Error(e)}function ki(e){return e.$descriptor}function Oi(e){$(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw Ai("expected element");var t,n=this.elementsById,i=ki(e).idProperty;if(i&&(t=e.get(i.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw Ai("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function Di(){}function zi(){}function Ni(){}function Bi(e,t){this.property=e,this.context=t}function Li(e,t){this.element=t,this.propertyDesc=e}function ji(){}function Ii(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function $i(e,t,n){Ii.call(this,e,t,n)}function Fi(e,t,n){this.model=e,this.context=n}function Hi(e){e instanceof si&&(e={model:e}),$(this,{lax:!1},e)}Di.prototype.handleEnd=function(){},Di.prototype.handleText=function(){},Di.prototype.handleNode=function(){},zi.prototype=Object.create(Di.prototype),zi.prototype.handleNode=function(){return this},Ni.prototype=Object.create(Di.prototype),Ni.prototype.handleText=function(e){this.body=(this.body||"")+e},Bi.prototype=Object.create(Ni.prototype),Bi.prototype.handleNode=function(e){if(this.element)throw Ai("expected no sub nodes");return this.element=this.createReference(e),this},Bi.prototype.handleEnd=function(){this.element.id=this.body},Bi.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},Li.prototype=Object.create(Ni.prototype),Li.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=Qn(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},ji.prototype=Object.create(Ni.prototype),ji.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},Ii.prototype=Object.create(ji.prototype),Ii.prototype.addReference=function(e){this.context.addReference(e)},Ii.prototype.handleText=function(e){if(!ki(this.element).bodyProperty)throw Ai("unexpected body text <"+e+">");Ni.prototype.handleText.call(this,e)},Ii.prototype.handleEnd=function(){var e=this.body,t=this.element,n=ki(t).bodyProperty;n&&void 0!==e&&(e=Qn(n.type,e),t.set(n.name,e))},Ii.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=ki(i),o=this.context,a=new i({}),s=this.model;return b(n,(function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?b(e.split(" "),(function(e){o.addReference({element:a,property:i.ns.name,id:e})})):o.addReference({element:a,property:i.ns.name,id:e}):(i?e=Qn(i.type,e):"xmlns"!==n&&(t=ti(n,r.ns.prefix),s.getPackage(t.prefix)&&o.addWarning({message:"unknown attribute <"+n+">",element:a,property:n,value:e})),a.set(n,e))})),a},Ii.prototype.getPropertyForNode=function(e){var t,n,i=ti(e.name),r=this.type,o=this.model,a=ki(r),s=i.name,c=a.propertiesByName[s];if(c&&!c.isAttr)return Mi(c)&&(t=e.attributes[Ri])?(t=function(e,t){var n=ti(e);return function(e,t){var n=e.name,i=e.localName,r=t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(n,t.getPackage(n.prefix))}(t,o),$({},c,{effectiveType:ki(n=o.getType(t)).name})):c;var l=o.getPackage(i.prefix);if(l){if(t=Ti(i,l),n=o.getType(t),c=g(a.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})))return $({},c,{effectiveType:ki(n).name})}else if(c=g(a.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})))return c;throw Ai("unrecognized element <"+i.name+">")},Ii.prototype.toString=function(){return"ElementDescriptor["+ki(this.type).name+"]"},Ii.prototype.valueHandler=function(e,t){return new Li(e,t)},Ii.prototype.referenceHandler=function(e){return new Bi(e,this.context)},Ii.prototype.handler=function(e){return"Element"===e?new Fi(this.model,e,this.context):new Ii(this.model,e,this.context)},Ii.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,ei(n=t.effectiveType||t.type))return this.valueHandler(t,i);var o=(r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==o&&(t.isMany?i.get(t.name).push(o):i.set(t.name,o),t.isReference?($(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},$i.prototype=Object.create(Ii.prototype),$i.prototype.createElement=function(e){var t=e.name,n=ti(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),a=o&&Ti(n,o)||t;if(!r.hasType(a))throw Ai("unexpected element <"+e.originalName+">");return Ii.prototype.createElement.call(this,e)},Fi.prototype=Object.create(ji.prototype),Fi.prototype.createElement=function(e){var t=e.name,n=ti(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},Fi.prototype.handleChild=function(e){var t=new Fi(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},Fi.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},Hi.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof Ii?(i=t,t={}):"string"==typeof t?(i=this.handler(t),t={}):"string"==typeof i&&(i=this.handler(i));var r=this.model,o=this.lax,a=new Oi($({},t,{rootHandler:i})),s=new Ei({proxy:!0}),c=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function l(e,t,n){var i=t(),r=i.line,o=i.column,s=i.data;"<"===s.charAt(0)&&-1!==s.indexOf(" ")&&(s=s.slice(0,s.indexOf(" "))+">");var c="unparsable content "+(s?s+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return a.addWarning({message:c,error:e}),!0;throw Ai(c)}function p(e,t){return l(e,t,!0)}i.context=a,c.push(i);var u=/^<\?xml /i,h=/ encoding="([^"]+)"/i,d=/^utf-8$/i;function m(e,t){try{c.peek().handleText(e)}catch(e){p(e,t)}}var f=r.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),{"http://www.w3.org/XML/1998/namespace":"xml"});return s.ns(f).on("openTag",(function(e,t,n,i){var r=e.attrs||{},a=Object.keys(r).reduce((function(e,n){var i=t(r[n]);return e[n]=i,e}),{});!function(e,t){var n=c.peek();try{c.push(n.handleNode(e))}catch(e){l(e,t,o)&&c.push(new zi)}}({name:e.name,originalName:e.originalName,attributes:a,ns:e.ns},i)})).on("question",(function(e){if(u.test(e)){var t=h.exec(e),n=t&&t[1];n&&!d.test(n)&&a.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}})).on("closeTag",(function(){c.pop().handleEnd()})).on("cdata",m).on("text",(function(e,t,n){!function(e,t){e.trim()&&m(e,t)}(t(e),n)})).on("error",l).on("warn",p),new Promise((function(t,n){var r;try{s.parse(e),function(){var e,t,n=a.elementsById,i=a.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],s=ki(r).propertiesByName[t.property];if(o||a.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),s.isMany){var c=r.get(s.name),l=c.indexOf(t);-1===l&&(l=c.length),o?c[l]=o:c.splice(l,1)}else r.set(s.name,o)}}()}catch(e){r=e}var o=i.element;r||o||(r=Ai("failed to parse document as <"+i.type.$descriptor.name+">"));var c=a.warnings,l=a.references,p=a.elementsById;return r?(r.warnings=c,n(r)):t({rootElement:o,elementsById:p,references:l,warnings:c})}))},Hi.prototype.handler=function(e){return new $i(this.model,e)};var Vi=/<|>|'|"|&|\n\r|\n/g,Gi=/<|>|&/g;function Wi(e){var t={},n={},i={},r=[],o=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?r.push(e):o.push(e),this.mapPrefix(e.prefix,e.uri)},this.uriByPrefix=function(e){return t[e||"xmlns"]},this.mapPrefix=function(e,n){t[e||"xmlns"]=n},this.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},this.logUsed=function(t){var n=t.uri,r=this.getNSKey(t);i[r]=this.byUri(n),e&&e.logUsed(t)},this.getUsed=function(e){var t=this;return[].concat(r,o).filter((function(e){var n=t.getNSKey(e);return i[n]}))}}function Ui(e,t){return Si(t)?(n=e).charAt(0).toLowerCase()+n.slice(1):e;var n}function qi(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function Xi(e){return f(e)?e:(e.prefix?e.prefix+":":"")+e.localName}var Yi={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Ki={"<":"lt",">":"gt","&":"amp"};function Zi(e,t,n){return(e=f(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function Qi(e){this.tagName=e}function Ji(){}function er(e){this.tagName=e}function tr(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function nr(e,t){tr.call(this,e,t)}function ir(){this.value="",this.write=function(e){this.value+=e}}function rr(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function or(e){return e=$({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new ir,r=new rr(i,e.format);if(e.preamble&&r.append('<?xml version="1.0" encoding="UTF-8"?>\n'),(new tr).build(t).serializeTo(r),!n)return i.value}}}function ar(e,t){si.call(this,e,t)}Qi.prototype.build=function(e){return this.element=e,this},Qi.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},Ji.prototype.serializeValue=Ji.prototype.serializeTo=function(e){e.append(this.escape?Zi(this.value,Gi,Ki):this.value)},Ji.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(Gi)&&(this.escape=!0),this},qi(er,Ji),er.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},tr.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,o=i.isGeneric;return t=o?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),o||(n=function(e){return y(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!v(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)}))}(e),this.parseAttributes(y(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return y(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},tr.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?$({localName:t.ns.localName},e):$({localName:Ui(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},tr.prototype.nsPropertyTagName=function(e){return function(e,t){return $({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},tr.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},tr.prototype.nsAttributeName=function(e){var t;if(t=f(e)?ti(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:$({localName:t.localName},n)},tr.prototype.parseGeneric=function(e){var t=this,n=this.body,i=[];return b(e,(function(r,o){"$body"===o?n.push((new Ji).build({type:"String"},r)):"$children"===o?b(r,(function(e){n.push(new tr(t).build(e))})):0!==o.indexOf("$")&&t.parseNsAttribute(e,o,r)&&i.push({name:o,value:r})})),i},tr.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=ti(t);if("xmlns"===o.prefix&&(i={prefix:o.localName,uri:n}),o.prefix||"xmlns"!==o.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var a=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(a)}},tr.prototype.parseNsAttributes=function(e,t){var n=this,i=e.$attrs,r=[];return b(i,(function(t,i){var o=n.parseNsAttribute(e,i,t);o&&r.push(o)})),r},tr.prototype.parseGenericAttributes=function(e,t){var n=this;b(t,(function(t){if(t.name!==Ri)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,n)}}))},tr.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;b(e,(function(e){var r=i.get(e.name),o=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new Ji).build(e,r[0]));else if(ei(e.type))b(r,(function(i){n.push(new er(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(o)b(r,(function(i){n.push(new Qi(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var a=Mi(e),s=function(e){return"property"===Pi(e)}(e);b(r,(function(i){var r;r=a?new nr(t,e):s?new tr(t,e):new tr(t),n.push(r.build(i))}))}}))},tr.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new Wi(t):n=t),n},tr.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,o=e.prefix;return i.byUri(r)&&!n||i.add(e,t),i.mapPrefix(o,r),e},tr.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.element.$model,a=this.getNamespaces(t),s=e.prefix,c=e.uri;if(!s&&!c)return{localName:e.localName};if(r=Ci[s]||o&&(o.getPackage(s)||{}).uri,!(c=c||r||a.uriByPrefix(s)))throw new Error("no namespace uri given for prefix <"+s+">");if(!(e=a.byUri(c))){for(n=s,i=1;a.uriByPrefix(n);)n=s+"_"+i++;e=this.logNamespace({prefix:n,uri:c},r===c)}return s&&a.mapPrefix(s,c),e},tr.prototype.parseAttributes=function(e){var t=this,n=this.element;b(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];b(i,(function(e){r.push(e.id)})),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},tr.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),Xi(e)},tr.prototype.addAttribute=function(e,t){var n=this.attrs;f(t)&&(t=Zi(t,Vi,Yi)),n.push({name:e,value:t})},tr.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=function(e){return e.getUsed().filter((function(e){return"xml"!==e.prefix})).map((function(e){return{name:"xmlns"+(e.prefix?":"+e.prefix:""),value:e.uri}}))}(n).concat(t)),b(t,(function(t){e.append(" ").append(Xi(t.name)).append('="').append(t.value).append('"')}))},tr.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==Ji;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),b(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},qi(nr,tr),nr.prototype.parseNsAttributes=function(e){var t=tr.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),o=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(Ri),(i.prefix?i.prefix+":":"")+o+n.ns.localName),t},nr.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},ar.prototype=Object.create(si.prototype),ar.prototype.fromXML=function(e,t,n){f(t)||(n=t,t="bpmn:Definitions");var i=new Hi($({model:this,lax:!0},n)),r=i.handler(t);return i.fromXML(e,r)},ar.prototype.toXML=function(e,t){var n=new or(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(e){return i(e)}}))};var sr={bpmn:{name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",prefix:"bpmn",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",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:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],enumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],xml:{tagAlias:"lowerCase",typePrefix:"t"}},bpmndi:{name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",prefix:"bpmndi",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],enumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[]},dc:{name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",prefix:"dc",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],associations:[]},di:{name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",prefix:"di",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],associations:[],xml:{tagAlias:"lowerCase"}},bioc:{name:"bpmn.io colors for BPMN",uri:"http://bpmn.io/schema/bpmn/biocolor/1.0",prefix:"bioc",types:[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]},color:{name:"BPMN in Color",uri:"http://www.omg.org/spec/BPMN/non-normative/color/1.0",prefix:"color",types:[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]}};function cr(e,t){return new ar($({},sr,e),t)}function lr(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function pr(e){return function(){if(!window.Promise)throw new Error("Promises is not supported in this environment. Please polyfill Promise.");var t=arguments.length;if(!(t>=1&&m(arguments[t-1])))return e.apply(this,arguments);var n=arguments[t-1];console.warn(new Error("Passing callbacks to "+e.name+" is deprecated and will be removed in a future major release. Please switch to promises: https://bpmn.io/l/moving-to-promises.html"));var i=Array.prototype.slice.call(arguments,0,-1);e.apply(this,i).then((function(e){var t=Object.keys(e)[0];return n(null,e[t])}),(function(e){return n(e,e.warnings)}))}}function ur(e){v(e,"di")||Object.defineProperty(e,"di",{get:function(){throw new Error("Tried to access di from the businessObject. The di is available through the diagram element only. For more information, see https://github.com/bpmn-io/bpmn-js/issues/1472")}})}function hr(e,t){return e.$instanceOf(t)}function dr(e,t){var n={},i=[],r={};function o(e,t){return function(n){e(n,t)}}function a(e){n[e.id]=e}function s(n,i){try{var o=r[n.id]&&function(n,i){if(n.gfx)throw new Error(t("already rendered {element}",{element:lr(n)}));return e.element(n,r[n.id],i)}(n,i);return a(n),o}catch(e){c(e.message,{element:n,error:e}),console.error(t("failed to import {element}",{element:lr(n)})),console.error(e)}}function c(t,n){e.error(t,n)}function l(e){var n=e.bpmnElement;n?r[n.id]?c(t("multiple DI elements defined for {element}",{element:lr(n)}),{element:n}):(r[n.id]=e,ur(n)):c(t("no bpmnElement referenced in {element}",{element:lr(e)}),{element:e})}function p(e){var t;l(t=e.plane),b(t.planeElement,u)}function u(e){l(e)}function h(){for(;i.length;)i.shift()()}function d(e,t){T(e,t),E(e.ioSpecification,t),w(e.artifacts,t),a(e)}function m(e,t){s(e,t)}function f(e,t){s(e,t)}function v(e,t){s(e,t)}function _(e,t){s(e,t)}function x(e,t){s(e,t)}function w(e,t){b(e,(function(e){hr(e,"bpmn:Association")?i.push((function(){x(e,t)})):x(e,t)}))}function E(e,t){e&&(b(e.dataInputs,o(v,t)),b(e.dataOutputs,o(_,t)))}function S(e,t){T(e,t),w(e.artifacts,t)}function C(e,t){var n=s(e,t);hr(e,"bpmn:SubProcess")&&S(e,n||t),hr(e,"bpmn:Activity")&&E(e.ioSpecification,t),i.push((function(){b(e.dataInputAssociations,o(f,t)),b(e.dataOutputAssociations,o(f,t))}))}function R(e,t){s(e,t)}function P(e,t){i.push((function(){var n=s(e,t);e.childLaneSet&&M(e.childLaneSet,n||t),function(e){b(e.flowNodeRef,(function(t){var n=t.get("lanes");n&&n.push(e)}))}(e)}))}function M(e,t){b(e.lanes,o(P,t))}function T(e,n){!function(e,n){b(e,(function(e){hr(e,"bpmn:SequenceFlow")?i.push((function(){!function(e,t){s(e,t)}(e,n)})):hr(e,"bpmn:BoundaryEvent")?i.unshift((function(){C(e,n)})):hr(e,"bpmn:FlowNode")?C(e,n):hr(e,"bpmn:DataObject")||(hr(e,"bpmn:DataStoreReference")||hr(e,"bpmn:DataObjectReference")?R(e,n):c(t("unrecognized flowElement {element} in context {context}",{element:lr(e),context:n?lr(n.businessObject):"null"}),{element:e,context:n}))}))}(e.flowElements,n),e.laneSets&&function(e,t){b(e,o(M,t))}(e.laneSets,n)}function A(e,t){var n=s(e,t),i=e.processRef;i&&d(i,n||t)}return{handleDeferred:h,handleDefinitions:function(a,s){var u=a.diagrams;if(s&&-1===u.indexOf(s))throw new Error(t("diagram not part of bpmn:Definitions"));if(!s&&u&&u.length&&(s=u[0]),!s)throw new Error(t("no diagram to display"));r={},p(s);var f=s.plane;if(!f)throw new Error(t("no plane for {element}",{element:lr(s)}));var v=f.bpmnElement;if(!v){if(!(v=function(e){return g(e.rootElements,(function(e){return hr(e,"bpmn:Process")||hr(e,"bpmn:Collaboration")}))}(a)))throw new Error(t("no process or collaboration to display"));c(t("correcting missing bpmnElement on {plane} to {rootElement}",{plane:lr(f),rootElement:lr(v)})),f.bpmnElement=v,l(f)}var _,x,E=function(t,n){return e.root(t,r[t.id],n)}(v,f);if(hr(v,"bpmn:Process")||hr(v,"bpmn:SubProcess"))d(v,E);else{if(!hr(v,"bpmn:Collaboration"))throw new Error(t("unsupported bpmnElement for {plane}: {rootElement}",{plane:lr(f),rootElement:lr(v)}));x=E,b((_=v).participants,o(A,x)),w(_.artifacts,x),i.push((function(){!function(e,t){b(e,o(m,t))}(_.messageFlows,x)})),function(e,t){y(e,(function(e){return!n[e.id]&&hr(e,"bpmn:Process")&&e.laneSets})).forEach(o(d,t))}(a.rootElements,E)}h()},handleSubProcess:S,registerDi:l}}function mr(e,t){var n=vr(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function fr(e,t){return E(t,(function(t){return mr(e,t)}))}function vr(e){return e&&e.businessObject||e}function gr(e){return e&&e.di}function yr(e,t,n){var i,r,o,a,s=[];function c(e,t){var n=new dr({root:function(e,t){return i.add(e,t)},element:function(e,t,n){return i.add(e,t,n)},error:function(e,t){s.push({message:e,context:t})}},o);t=t||e.diagrams&&e.diagrams[0];var r=function(e,t){if(!t)return;var n,i=t.plane.bpmnElement,r=i;mr(i,"bpmn:Process")||mr(i,"bpmn:Collaboration")||(r=function(e){var t=e;for(;t;){if(mr(t,"bpmn:Process"))return t;t=t.$parent}}(i));n=mr(r,"bpmn:Collaboration")?r:g(e.rootElements,(function(e){if(mr(e,"bpmn:Collaboration"))return g(e.participants,(function(e){return e.processRef===r}))}));var o=[r];n&&(o=S(n.participants,(function(e){return e.processRef}))).push(n);var a=br(o),s=[t],c=[i];return b(e.diagrams,(function(e){var t=e.plane.bpmnElement;-1!==a.indexOf(t)&&-1===c.indexOf(t)&&(s.push(e),c.push(t))})),s}(e,t);if(!r)throw new Error(o("no diagram to display"));b(r,(function(t){n.handleDefinitions(e,t)}));var c=t.plane.bpmnElement.id;a.setRootElement(a.findRoot(c+"_plane")||a.findRoot(c))}return new Promise((function(l,p){try{return i=e.get("bpmnImporter"),r=e.get("eventBus"),o=e.get("translate"),a=e.get("canvas"),r.fire("import.render.start",{definitions:t}),c(t,n),r.fire("import.render.complete",{error:undefined,warnings:s}),l({warnings:s})}catch(e){return e.warnings=s,p(e)}}))}function br(e){var t=[];return b(e,(function(e){e&&(t.push(e),t=t.concat(br(e.flowElements)))})),t}var _r='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21" style="vertical-align:middle"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>';function xr(e){return e.join(";")}var wr,Er=xr(["color: #404040"]),Sr='<div class="bjs-powered-by-lightbox" style="'+xr(["z-index: 1001","position: fixed","top: 0","left: 0","right: 0","bottom: 0"])+'"><div class="backdrop" style="'+xr(["width: 100%","height: 100%","background: rgba(40,40,40,0.2)"])+'"></div><div class="notice" style="'+xr(["position: absolute","left: 50%","top: 40%","transform: translate(-50%)","width: 260px","padding: 10px","background: white","box-shadow: 0 1px 4px rgba(0,0,0,0.3)","font-family: Helvetica, Arial, sans-serif","font-size: 14px","display: flex","line-height: 1.3"])+'"><a href="https://bpmn.io" target="_blank" rel="noopener" style="margin: 15px 20px 15px 10px; align-self: center;'+Er+'">'+_r+'</a><span>Web-based tooling for BPMN, DMN and CMMN diagrams powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>';function Cr(e){var t,n;e=$({},Pr,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),t=this._container,n=ce('<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" style="position: absolute; bottom: 15px; right: 15px; z-index: 100; '+Er+'">'+_r+"</a>"),t.appendChild(n),re.bind(n,"click",(function(e){wr||(wr=ce(Sr),se.bind(wr,".backdrop","click",(function(e){document.body.removeChild(wr)}))),document.body.appendChild(wr),e.preventDefault()})),this._init(this._container,this._moddle,e)}function Rr(e,t){return e.warnings=t,e}n(Cr,qn),Cr.prototype.importXML=pr((function(e,t){var n=this;return new Promise((function(i,r){e=n._emit("import.parse.start",{xml:e})||e,n._moddle.fromXML(e,"bpmn:Definitions").then((function(e){var o,a,s=e.rootElement,c=e.references,l=e.warnings,p=e.elementsById;s=n._emit("import.parse.complete",(o={error:null,definitions:s,elementsById:p,references:c,warnings:l},a=n.get("eventBus").createEvent(o),Object.defineProperty(a,"context",{enumerable:!0,get:function(){return console.warn(new Error("import.parse.complete <context> is deprecated and will be removed in future library versions")),{warnings:o.warnings,references:o.references,elementsById:o.elementsById}}}),a))||s,n.importDefinitions(s,t).then((function(e){var t=[].concat(l,e.warnings||[]);return n._emit("import.done",{error:null,warnings:t}),i({warnings:t})})).catch((function(e){var t=[].concat(l,e.warnings||[]);return n._emit("import.done",{error:e,warnings:t}),r(Rr(e,t))}))})).catch((function(e){return n._emit("import.parse.complete",{error:e}),e=function(e){var t=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);t&&(e.message="unparsable content <"+t[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+t[2]);return e}(e),n._emit("import.done",{error:e,warnings:e.warnings}),r(e)}))}))})),Cr.prototype.importDefinitions=pr((function(e,t){var n=this;return new Promise((function(i,r){n._setDefinitions(e),n.open(t).then((function(e){var t=e.warnings;return i({warnings:t})})).catch((function(e){return r(e)}))}))})),Cr.prototype.open=pr((function(e){var t=this._definitions,n=e,i=this;return new Promise((function(r,o){if(!t){var a=new Error("no XML imported");return o(Rr(a,[]))}if("string"==typeof e&&!(n=function(e,t){if(!t)return null;return g(e.diagrams,(function(e){return e.id===t}))||null}(t,e))){var s=new Error("BPMNDiagram <"+e+"> not found");return o(Rr(s,[]))}try{i.clear()}catch(e){return o(Rr(e,[]))}yr(i,t,n).then((function(e){var t=e.warnings;return r({warnings:t})})).catch((function(e){return o(e)}))}))})),Cr.prototype.saveXML=pr((function(e){e=e||{};var t=this,n=this._definitions;return new Promise((function(i){if(!n)return i({error:new Error("no definitions loaded")});n=t._emit("saveXML.start",{definitions:n})||n,t._moddle.toXML(n,e).then((function(e){var n=e.xml;return n=t._emit("saveXML.serialized",{xml:n})||n,i({xml:n})}))})).catch((function(e){return{error:e}})).then((function(e){t._emit("saveXML.done",e);var n=e.error;return n?Promise.reject(n):e}))})),Cr.prototype.saveSVG=pr((function(e){var t=this;return new Promise((function(e,n){var i,r;t._emit("saveSVG.start");try{var o=t.get("canvas"),a=o.getDefaultLayer(),s=ue("defs",o._svg),c=Fe(a),l=s?"<defs>"+Fe(s)+"</defs>":"",p=a.getBBox();i='<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- created with bpmn-js / http://bpmn.io --\x3e\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+p.width+'" height="'+p.height+'" viewBox="'+p.x+" "+p.y+" "+p.width+" "+p.height+'" version="1.1">'+l+c+"</svg>"}catch(e){r=e}return t._emit("saveSVG.done",{error:r,svg:i}),r?n(r):e({svg:i})}))})),Cr.prototype._setDefinitions=function(e){this._definitions=e},Cr.prototype.getModules=function(){return this._modules},Cr.prototype.clear=function(){this.getDefinitions()&&qn.prototype.clear.call(this)},Cr.prototype.destroy=function(){qn.prototype.destroy.call(this),de(this._container)},Cr.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},Cr.prototype.off=function(e,t){this.get("eventBus").off(e,t)},Cr.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=ue(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},Cr.prototype.getDefinitions=function(){return this._definitions},Cr.prototype.detach=function(){var e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},Cr.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=$(H(n,["additionalModules"]),{canvas:$({},n.canvas,{container:e}),modules:o});qn.call(this,a),n&&n.container&&this.attachTo(n.container)},Cr.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},Cr.prototype._createContainer=function(e){var t=ce('<div class="bjs-container"></div>');return $(t.style,{width:Mr(e.width),height:Mr(e.height),position:e.position}),t},Cr.prototype._createModdle=function(e){return new cr($({},this._moddleExtensions,e.moddleExtensions))},Cr.prototype._modules=[];var Pr={width:"100%",height:"100%",position:"relative"};function Mr(e){return e+(d(e)?"px":"")}function Tr(e){Cr.call(this,e),this.on("import.parse.complete",(function(e){e.error||this._collectIds(e.definitions,e.elementsById)}),this),this.on("diagram.destroy",(function(){this.get("moddle").ids.clear()}),this)}function Ar(e,t){return!mr(e,"bpmn:CallActivity")&&(mr(e,"bpmn:SubProcess")?!(!(t=t||gr(e))||!mr(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded:!mr(e,"bpmn:Participant")||!!vr(e).processRef)}function kr(e){return e&&!1!==vr(e).isInterrupting}function Or(e){return e&&!!vr(e).triggeredByEvent}function Dr(e,t){var n=vr(e),i=!1;return n.eventDefinitions&&b(n.eventDefinitions,(function(e){mr(e,t)&&(i=!0)})),i}function zr(e){return mr(e,"bpmn:FlowElement")||mr(e,"bpmn:Participant")||mr(e,"bpmn:Lane")||mr(e,"bpmn:SequenceFlow")||mr(e,"bpmn:MessageFlow")||mr(e,"bpmn:DataInput")||mr(e,"bpmn:DataOutput")?"name":mr(e,"bpmn:TextAnnotation")?"text":mr(e,"bpmn:Group")?"categoryValueRef":void 0}function Nr(e){var t=e.businessObject,n=zr(t);if(n)return"categoryValueRef"===n?function(e){var t=e.categoryValueRef;return t&&t.value||""}(t):t[n]||""}function Br(e,t,n){return E(e.eventDefinitions,(function(i){return i.$type===t&&function(e,t){return w(t,(function(t,n){return e[n]==t}))}(e,n)}))}function Lr(e){return e.businessObject}function jr(e,t){var n=gr(e);return n.get("color:background-color")||n.get("bioc:fill")||t||"white"}function Ir(e,t){var n=gr(e);return n.get("color:border-color")||n.get("bioc:stroke")||t||"black"}function $r(e,t,n){var i=gr(e).get("label");return i&&i.get("color:color")||t||Ir(e,n)}n(Tr,Cr),Tr.prototype._createModdle=function(e){var t=Cr.prototype._createModdle.call(this,e);return t.ids=new r([32,36,1]),t},Tr.prototype._collectIds=function(e,t){var n,i=e.$model.ids;for(n in i.clear(),t)i.claim(n,t[n])};var Fr=new r,Hr=.95;function Vr(e,t,n,i,r,o,a){et.call(this,t,a);var s=e&&e.defaultFillColor,c=e&&e.defaultStrokeColor,l=e&&e.defaultLabelColor,p=Fr.next(),u={},d=n.computeStyle;function m(e,t){var n=$({fill:"black",strokeWidth:1,strokeLinecap:"round",strokeDasharray:"none"},t.attrs),i=t.ref||{x:0,y:0},o=t.scale||1;"none"===n.strokeDasharray&&(n.strokeDasharray=[1e4,1]);var a=ke("marker");ye(t.element,n),fe(a,t.element),ye(a,{id:e,viewBox:"0 0 20 20",refX:i.x,refY:i.y,markerWidth:20*o,markerHeight:20*o,orient:"auto"});var s=ue("defs",r._svg);s||(s=ke("defs"),fe(r._svg,s)),fe(s,a),u[e]=a}function f(e){return e.replace(/[^0-9a-zA-z]+/g,"_")}function v(e,t,n){var i=e+"-"+f(t)+"-"+f(n)+"-"+p;return u[i]||function(e,t,n,i){if("sequenceflow-end"===t){var r=ke("path");ye(r,{d:"M 1 5 L 11 10 L 1 15 Z"}),m(e,{element:r,ref:{x:11,y:10},scale:.5,attrs:{fill:i,stroke:i}})}if("messageflow-start"===t){var o=ke("circle");ye(o,{cx:6,cy:6,r:3.5}),m(e,{element:o,attrs:{fill:n,stroke:i},ref:{x:6,y:6}})}if("messageflow-end"===t){var a=ke("path");ye(a,{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z"}),m(e,{element:a,attrs:{fill:n,stroke:i,strokeLinecap:"butt"},ref:{x:8.5,y:5}})}if("association-start"===t){var s=ke("path");ye(s,{d:"M 11 5 L 1 10 L 11 15"}),m(e,{element:s,attrs:{fill:"none",stroke:i,strokeWidth:1.5},ref:{x:1,y:10},scale:.5})}if("association-end"===t){var c=ke("path");ye(c,{d:"M 1 5 L 11 10 L 1 15"}),m(e,{element:c,attrs:{fill:"none",stroke:i,strokeWidth:1.5},ref:{x:12,y:10},scale:.5})}if("conditional-flow-marker"===t){var l=ke("path");ye(l,{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z"}),m(e,{element:l,attrs:{fill:n,stroke:i},ref:{x:-1,y:10},scale:.5})}if("conditional-default-flow-marker"===t){var p=ke("path");ye(p,{d:"M 6 4 L 10 16"}),m(e,{element:p,attrs:{stroke:i},ref:{x:0,y:10},scale:.5})}}(i,e,t,n),"url(#"+i+")"}function g(e,t,n,i,r){h(i)&&(r=i,i=0),i=i||0,"none"===(r=d(r,{stroke:"black",strokeWidth:2,fill:"white"})).fill&&delete r.fillOpacity;var o=t/2,a=n/2,s=ke("circle");return ye(s,{cx:o,cy:a,r:Math.round((t+n)/4-i)}),ye(s,r),fe(e,s),s}function y(e,t,n,i,r,o){h(r)&&(o=r,r=0),r=r||0,o=d(o,{stroke:"black",strokeWidth:2,fill:"white"});var a=ke("rect");return ye(a,{x:r,y:r,width:t-2*r,height:n-2*r,rx:i,ry:i}),ye(a,o),fe(e,a),a}function _(e,t,n){var i=it(t,n=d(n,["no-fill"],{stroke:"black",strokeWidth:2,fill:"none"}));return fe(e,i),i}function x(e,t,n){n=d(n,["no-fill"],{strokeWidth:2,stroke:"black"});var i=ke("path");return ye(i,{d:t}),ye(i,n),fe(e,i),i}function w(e,t,n,i){return x(t,n,$({"data-marker":e},i))}function E(e){return function(t,n){return A[e](t,n)}}function S(e){return A[e]}function C(e,t){var n=Lr(e),i=function(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}(n);return n.eventDefinitions&&n.eventDefinitions.length>1?n.parallelMultiple?S("bpmn:ParallelMultipleEventDefinition")(t,e,i):S("bpmn:MultipleEventDefinition")(t,e,i):Br(n,"bpmn:MessageEventDefinition")?S("bpmn:MessageEventDefinition")(t,e,i):Br(n,"bpmn:TimerEventDefinition")?S("bpmn:TimerEventDefinition")(t,e,i):Br(n,"bpmn:ConditionalEventDefinition")?S("bpmn:ConditionalEventDefinition")(t,e):Br(n,"bpmn:SignalEventDefinition")?S("bpmn:SignalEventDefinition")(t,e,i):Br(n,"bpmn:EscalationEventDefinition")?S("bpmn:EscalationEventDefinition")(t,e,i):Br(n,"bpmn:LinkEventDefinition")?S("bpmn:LinkEventDefinition")(t,e,i):Br(n,"bpmn:ErrorEventDefinition")?S("bpmn:ErrorEventDefinition")(t,e,i):Br(n,"bpmn:CancelEventDefinition")?S("bpmn:CancelEventDefinition")(t,e,i):Br(n,"bpmn:CompensateEventDefinition")?S("bpmn:CompensateEventDefinition")(t,e,i):Br(n,"bpmn:TerminateEventDefinition")?S("bpmn:TerminateEventDefinition")(t,e,i):null}function R(e,t,n){n=$({size:{width:100}},n);var i=o.createText(t||"",n);return Ee(i).add("djs-label"),fe(e,i),i}function P(e,t,n){return R(e,Lr(t).name,{box:t,align:n,padding:5,style:{fill:$r(t,l,c)}})}function M(e,t,n){$n(R(e,t,{box:{height:30,width:n.height},align:"center-middle",style:{fill:$r(n,l,c)}}),0,-(-1*n.height),270)}function T(e){for(var t=e.waypoints,n="m "+t[0].x+","+t[0].y,i=1;i<t.length;i++)n+="L"+t[i].x+","+t[i].y+" ";return n}var A=this.handlers={"bpmn:Event":function(e,t,n){return"fillOpacity"in n||(n.fillOpacity=Hr),g(e,t.width,t.height,n)},"bpmn:StartEvent":function(e,t){var n={fill:jr(t,s),stroke:Ir(t,c)};Lr(t).isInterrupting||(n={strokeDasharray:"6",strokeLinecap:"round",fill:jr(t,s),stroke:Ir(t,c)});var i=S("bpmn:Event")(e,t,n);return C(t,e),i},"bpmn:MessageEventDefinition":function(e,t,n){return x(e,i.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),{strokeWidth:1,fill:n?Ir(t,c):jr(t,s),stroke:n?jr(t,s):Ir(t,c)})},"bpmn:TimerEventDefinition":function(e,t){var n=g(e,t.width,t.height,.2*t.height,{strokeWidth:2,fill:jr(t,s),stroke:Ir(t,c)});x(e,i.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),{strokeWidth:2,strokeLinecap:"square",stroke:Ir(t,c)});for(var r=0;r<12;r++){var o=i.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),a=t.width/2;x(e,o,{strokeWidth:1,strokeLinecap:"square",transform:"rotate("+30*r+","+t.height/2+","+a+")",stroke:Ir(t,c)})}return n},"bpmn:EscalationEventDefinition":function(e,t,n){return x(e,i.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:n?Ir(t,c):"none",stroke:Ir(t,c)})},"bpmn:ConditionalEventDefinition":function(e,t){return x(e,i.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}}),{strokeWidth:1,stroke:Ir(t,c)})},"bpmn:LinkEventDefinition":function(e,t,n){return x(e,i.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{strokeWidth:1,fill:n?Ir(t,c):"none",stroke:Ir(t,c)})},"bpmn:ErrorEventDefinition":function(e,t,n){return x(e,i.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),{strokeWidth:1,fill:n?Ir(t,c):"none",stroke:Ir(t,c)})},"bpmn:CancelEventDefinition":function(e,t,n){var r=x(e,i.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{strokeWidth:1,fill:n?Ir(t,c):"none",stroke:Ir(t,c)});return Hn(r,45),r},"bpmn:CompensateEventDefinition":function(e,t,n){return x(e,i.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.22,my:.5}}),{strokeWidth:1,fill:n?Ir(t,c):"none",stroke:Ir(t,c)})},"bpmn:SignalEventDefinition":function(e,t,n){return x(e,i.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:n?Ir(t,c):"none",stroke:Ir(t,c)})},"bpmn:MultipleEventDefinition":function(e,t,n){return x(e,i.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),{strokeWidth:1,fill:n?Ir(t,c):"none"})},"bpmn:ParallelMultipleEventDefinition":function(e,t){return x(e,i.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}}),{strokeWidth:1,fill:Ir(t,c),stroke:Ir(t,c)})},"bpmn:EndEvent":function(e,t){var n=S("bpmn:Event")(e,t,{strokeWidth:4,fill:jr(t,s),stroke:Ir(t,c)});return C(t,e),n},"bpmn:TerminateEventDefinition":function(e,t){return g(e,t.width,t.height,8,{strokeWidth:4,fill:Ir(t,c),stroke:Ir(t,c)})},"bpmn:IntermediateEvent":function(e,t){var n=S("bpmn:Event")(e,t,{strokeWidth:1,fill:jr(t,s),stroke:Ir(t,c)});return g(e,t.width,t.height,3,{strokeWidth:1,fill:jr(t,"none"),stroke:Ir(t,c)}),C(t,e),n},"bpmn:IntermediateCatchEvent":E("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":E("bpmn:IntermediateEvent"),"bpmn:Activity":function(e,t,n){return"fillOpacity"in(n=n||{})||(n.fillOpacity=Hr),y(e,t.width,t.height,10,n)},"bpmn:Task":function(e,t){var n={fill:jr(t,s),stroke:Ir(t,c)},i=S("bpmn:Activity")(e,t,n);return P(e,t,"center-middle"),k(e,t),i},"bpmn:ServiceTask":function(e,t){var n=S("bpmn:Task")(e,t);return x(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{strokeWidth:1,fill:jr(t,s),stroke:Ir(t,c)}),x(e,i.getScaledPath("TASK_TYPE_SERVICE_FILL",{abspos:{x:17.2,y:18}}),{strokeWidth:0,fill:jr(t,s)}),x(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{strokeWidth:1,fill:jr(t,s),stroke:Ir(t,c)}),n},"bpmn:UserTask":function(e,t){var n=S("bpmn:Task")(e,t);return x(e,i.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{strokeWidth:.5,fill:jr(t,s),stroke:Ir(t,c)}),x(e,i.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{strokeWidth:.5,fill:jr(t,s),stroke:Ir(t,c)}),x(e,i.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{strokeWidth:.5,fill:Ir(t,c),stroke:Ir(t,c)}),n},"bpmn:ManualTask":function(e,t){var n=S("bpmn:Task")(e,t);return x(e,i.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{strokeWidth:.5,fill:jr(t,s),stroke:Ir(t,c)}),n},"bpmn:SendTask":function(e,t){var n=S("bpmn:Task")(e,t);return x(e,i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{strokeWidth:1,fill:Ir(t,c),stroke:jr(t,s)}),n},"bpmn:ReceiveTask":function(e,t){var n,r=Lr(t),o=S("bpmn:Task")(e,t);return r.instantiate?(g(e,28,28,4.4,{strokeWidth:1}),n=i.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):n=i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),x(e,n,{strokeWidth:1,fill:jr(t,s),stroke:Ir(t,c)}),o},"bpmn:ScriptTask":function(e,t){var n=S("bpmn:Task")(e,t);return x(e,i.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{strokeWidth:1,stroke:Ir(t,c)}),n},"bpmn:BusinessRuleTask":function(e,t){var n=S("bpmn:Task")(e,t);return ye(x(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}})),{strokeWidth:1,fill:jr(t,"#aaaaaa"),stroke:Ir(t,c)}),ye(x(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}})),{strokeWidth:1,stroke:Ir(t,c)}),n},"bpmn:SubProcess":function(e,t,n){n=$({fill:jr(t,s),stroke:Ir(t,c)},n);var i=S("bpmn:Activity")(e,t,n),r=Ar(t);return Or(t)&&ye(i,{strokeDasharray:"1,2"}),P(e,t,r?"center-top":"center-middle"),r?k(e,t):k(e,t,["SubProcessMarker"]),i},"bpmn:AdHocSubProcess":function(e,t){return S("bpmn:SubProcess")(e,t)},"bpmn:Transaction":function(e,t){var i=S("bpmn:SubProcess")(e,t),r=n.style(["no-fill","no-events"],{stroke:Ir(t,c)});return y(e,t.width,t.height,8,3,r),i},"bpmn:CallActivity":function(e,t){return S("bpmn:SubProcess")(e,t,{strokeWidth:5})},"bpmn:Participant":function(e,t){var n={fillOpacity:Hr,fill:jr(t,s),stroke:Ir(t,c)},i=S("bpmn:Lane")(e,t,n);Ar(t)?(_(e,[{x:30,y:0},{x:30,y:t.height}],{stroke:Ir(t,c)}),M(e,Lr(t).name,t)):R(e,Lr(t).name,{box:t,align:"center-middle",style:{fill:$r(t,l,c)}});return!!Lr(t).participantMultiplicity&&S("ParticipantMultiplicityMarker")(e,t),i},"bpmn:Lane":function(e,t,n){var i=y(e,t.width,t.height,0,$({fill:jr(t,s),fillOpacity:.35,stroke:Ir(t,c)},n)),r=Lr(t);"bpmn:Lane"===r.$type&&M(e,r.name,t);return i},"bpmn:InclusiveGateway":function(e,t){var n=S("bpmn:Gateway")(e,t);return g(e,t.width,t.height,.24*t.height,{strokeWidth:2.5,fill:jr(t,s),stroke:Ir(t,c)}),n},"bpmn:ExclusiveGateway":function(e,t){var n=S("bpmn:Gateway")(e,t),r=i.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return gr(t).isMarkerVisible&&x(e,r,{strokeWidth:1,fill:Ir(t,c),stroke:Ir(t,c)}),n},"bpmn:ComplexGateway":function(e,t){var n=S("bpmn:Gateway")(e,t);return x(e,i.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{strokeWidth:1,fill:Ir(t,c),stroke:Ir(t,c)}),n},"bpmn:ParallelGateway":function(e,t){var n=S("bpmn:Gateway")(e,t);return x(e,i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{strokeWidth:1,fill:Ir(t,c),stroke:Ir(t,c)}),n},"bpmn:EventBasedGateway":function(e,t){var n=Lr(t),r=S("bpmn:Gateway")(e,t);g(e,t.width,t.height,.2*t.height,{strokeWidth:1,fill:"none",stroke:Ir(t,c)});var o=n.eventGatewayType,a=!!n.instantiate;if("Parallel"===o){var s=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}});ye(x(e,s),{strokeWidth:1,fill:"none"})}else if("Exclusive"===o){if(!a)ye(g(e,t.width,t.height,.26*t.height),{strokeWidth:1,fill:"none",stroke:Ir(t,c)});!function(){var n=i.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}}),r={strokeWidth:2,fill:jr(t,"none"),stroke:Ir(t,c)};x(e,n,r)}()}return r},"bpmn:Gateway":function(e,t){var n={fill:jr(t,s),fillOpacity:Hr,stroke:Ir(t,c)};return function(e,t,n,i){var r=t/2,o=n/2,a=[{x:r,y:0},{x:t,y:o},{x:r,y:n},{x:0,y:o}].map((function(e){return e.x+","+e.y})).join(" ");i=d(i,{stroke:"black",strokeWidth:2,fill:"white"});var s=ke("polygon");return ye(s,{points:a}),ye(s,i),fe(e,s),s}(e,t.width,t.height,n)},"bpmn:SequenceFlow":function(e,t){var n,i=T(t),r=jr(t,s),o=Ir(t,c),a=x(e,i,{strokeLinejoin:"round",markerEnd:v("sequenceflow-end",r,o),stroke:Ir(t,c)}),l=Lr(t);return t.source&&(n=t.source.businessObject,l.conditionExpression&&n.$instanceOf("bpmn:Activity")&&ye(a,{markerStart:v("conditional-flow-marker",r,o)}),n.default&&(n.$instanceOf("bpmn:Gateway")||n.$instanceOf("bpmn:Activity"))&&n.default===l&&ye(a,{markerStart:v("conditional-default-flow-marker",r,o)})),a},"bpmn:Association":function(e,t,n){var i=Lr(t),r=jr(t,s),o=Ir(t,c);return n=$({strokeDasharray:"0.5, 5",strokeLinecap:"round",strokeLinejoin:"round",stroke:Ir(t,c)},n||{}),"One"!==i.associationDirection&&"Both"!==i.associationDirection||(n.markerEnd=v("association-end",r,o)),"Both"===i.associationDirection&&(n.markerStart=v("association-start",r,o)),_(e,t.waypoints,n)},"bpmn:DataInputAssociation":function(e,t){var n=jr(t,s),i=Ir(t,c);return S("bpmn:Association")(e,t,{markerEnd:v("association-end",n,i)})},"bpmn:DataOutputAssociation":function(e,t){var n=jr(t,s),i=Ir(t,c);return S("bpmn:Association")(e,t,{markerEnd:v("association-end",n,i)})},"bpmn:MessageFlow":function(e,t){var n=Lr(t),r=gr(t),o=jr(t,s),a=Ir(t,c),p=x(e,T(t),{markerEnd:v("messageflow-end",o,a),markerStart:v("messageflow-start",o,a),strokeDasharray:"10, 12",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5px",stroke:Ir(t,c)});if(n.messageRef){var u=p.getPointAtLength(p.getTotalLength()/2),h=i.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:u.x,y:u.y}}),d={strokeWidth:1};"initiating"===r.messageVisibleKind?(d.fill="white",d.stroke="black"):(d.fill="#888",d.stroke="white");var m=x(e,h,d),f=R(e,n.messageRef.name,{align:"center-top",fitBox:!0,style:{fill:Ir(t,l)}}),g=m.getBBox(),y=f.getBBox();$n(f,u.x-y.width/2,u.y+g.height/2+10,0)}return p},"bpmn:DataObject":function(e,t){var n=x(e,i.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:jr(t,s),fillOpacity:Hr,stroke:Ir(t,c)});return function(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}(Lr(t))&&function(e,t){var n=(t.height-18)/t.height,r=i.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.33,my:n}});x(e,r,{strokeWidth:2})}(e,t),n},"bpmn:DataObjectReference":E("bpmn:DataObject"),"bpmn:DataInput":function(e,t){var n=i.getRawPath("DATA_ARROW"),r=S("bpmn:DataObject")(e,t);return x(e,n,{strokeWidth:1}),r},"bpmn:DataOutput":function(e,t){var n=i.getRawPath("DATA_ARROW"),r=S("bpmn:DataObject")(e,t);return x(e,n,{strokeWidth:1,fill:"black"}),r},"bpmn:DataStoreReference":function(e,t){return x(e,i.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{strokeWidth:2,fill:jr(t,s),fillOpacity:Hr,stroke:Ir(t,c)})},"bpmn:BoundaryEvent":function(e,t){var n=Lr(t).cancelActivity,i={strokeWidth:1,fill:jr(t,s),stroke:Ir(t,c)};n||(i.strokeDasharray="6",i.strokeLinecap="round");var r=$({},i,{fillOpacity:1}),o=$({},i,{fill:"none"}),a=S("bpmn:Event")(e,t,r);return g(e,t.width,t.height,3,o),C(t,e),a},"bpmn:Group":function(e,t){return y(e,t.width,t.height,10,{stroke:Ir(t,c),strokeWidth:1,strokeDasharray:"8,3,1,3",fill:"none",pointerEvents:"none"})},label:function(e,t){return function(e,t){var n={width:90,height:30,x:t.width/2+t.x,y:t.height/2+t.y};return R(e,Nr(t),{box:n,fitBox:!0,style:$({},o.getExternalStyle(),{fill:$r(t,l,c)})})}(e,t)},"bpmn:TextAnnotation":function(e,t){var n=y(e,t.width,t.height,0,0,{fill:"none",stroke:"none"});return x(e,i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:0}}),{stroke:Ir(t,c)}),R(e,Lr(t).text||"",{box:t,align:"left-top",padding:5,style:{fill:$r(t,l,c)}}),n},ParticipantMultiplicityMarker:function(e,t){w("participant-multiplicity",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:t.width/2/t.width,my:(t.height-15)/t.height}}),{strokeWidth:2,fill:jr(t,s),stroke:Ir(t,c)})},SubProcessMarker:function(e,t){Fn(y(e,14,14,0,{strokeWidth:1,fill:jr(t,s),stroke:Ir(t,c)}),t.width/2-7.5,t.height-20),w("sub-process",e,i.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2-7.5)/t.width,my:(t.height-20)/t.height}}),{fill:jr(t,s),stroke:Ir(t,c)})},ParallelMarker:function(e,t,n){w("parallel",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.parallel)/t.width,my:(t.height-20)/t.height}}),{fill:jr(t,s),stroke:Ir(t,c)})},SequentialMarker:function(e,t,n){w("sequential",e,i.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.seq)/t.width,my:(t.height-19)/t.height}}),{fill:jr(t,s),stroke:Ir(t,c)})},CompensationMarker:function(e,t,n){w("compensation",e,i.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.compensation)/t.width,my:(t.height-13)/t.height}}),{strokeWidth:1,fill:jr(t,s),stroke:Ir(t,c)})},LoopMarker:function(e,t,n){w("loop",e,i.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.loop)/t.width,my:(t.height-7)/t.height}}),{strokeWidth:1,fill:jr(t,s),stroke:Ir(t,c),strokeLinecap:"round",strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){w("adhoc",e,i.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.adhoc)/t.width,my:(t.height-15)/t.height}}),{strokeWidth:1,fill:Ir(t,c),stroke:Ir(t,c)})}};function k(e,t,n){var i,r=Lr(t),o=n&&-1!==n.indexOf("SubProcessMarker");i=o?{seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{seq:-3,parallel:-6,compensation:-27,loop:0,adhoc:10},b(n,(function(n){S(n)(e,t,i)})),r.isForCompensation&&S("CompensationMarker")(e,t,i),"bpmn:AdHocSubProcess"===r.$type&&S("AdhocMarker")(e,t,i);var a=r.loopCharacteristics,s=a&&a.isSequential;a&&(void 0===s&&S("LoopMarker")(e,t,i),!1===s&&S("ParallelMarker")(e,t,i),!0===s&&S("SequentialMarker")(e,t,i))}this._drawPath=x}n(Vr,et),Vr.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Vr.prototype.canRender=function(e){return mr(e,"bpmn:BaseElement")},Vr.prototype.drawShape=function(e,t){var n=t.type;return(0,this.handlers[n])(e,t)},Vr.prototype.drawConnection=function(e,t){var n=t.type;return(0,this.handlers[n])(e,t)},Vr.prototype.getShapePath=function(e){return mr(e,"bpmn:Event")?(n=(t=e).x+t.width/2,i=t.y+t.height/2,r=t.width/2,tt([["M",n,i],["m",0,-r],["a",r,r,0,1,1,0,2*r],["a",r,r,0,1,1,0,-2*r],["z"]])):mr(e,"bpmn:Activity")?function(e,t){var n=e.x,i=e.y,r=e.width,o=e.height;return tt([["M",n+t,i],["l",r-2*t,0],["a",t,t,0,0,1,t,t],["l",0,o-2*t],["a",t,t,0,0,1,-t,t],["l",2*t-r,0],["a",t,t,0,0,1,-t,-t],["l",0,2*t-o],["a",t,t,0,0,1,t,-t],["z"]])}(e,10):mr(e,"bpmn:Gateway")?function(e){var t=e.width/2,n=e.height/2;return tt([["M",e.x+t,e.y],["l",t,n],["l",-t,n],["l",-t,-n],["z"]])}(e):function(e){var t=e.x,n=e.y,i=e.width;return tt([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])}(e);var t,n,i,r};var Gr={width:150,height:50};function Wr(e,t){var n;t.textContent=e;try{var i,r=""===e;return t.textContent=r?"dummy":e,i={width:(n=t.getBBox()).width+2*n.x,height:n.height},r&&(i.width=0),i}catch(e){return{width:0,height:0}}}function Ur(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=Wr(o,n)).width=o?i.width:0," "===o||""===o||i.width<Math.round(t)||o.length<2)return qr(e,o,r,i);o=Xr(o,i.width,t)}}function qr(e,t,n,i){if(t.length<n.length){var r=n.slice(t.length).trim();e.unshift(r)}return{width:i.width,height:i.height,text:t}}function Xr(e,t,n){var i=Math.max(e.length*(n/t),1),r=function(e,t){var n,i=e.split(/(\s|-|\u00AD)/g),r=[],o=0;if(i.length>1)for(;n=i.shift();){if(!(n.length+o<t)){"-"!==n&&"­"!==n||r.pop();break}r.push(n),o+=n.length}var a=r[r.length-1];return a&&"­"===a&&(r[r.length-1]="-"),r.join("")}(e,i);return r||(r=e.slice(0,Math.max(Math.round(i-1),1))),r}function Yr(e){this._config=$({},{size:Gr,padding:0,style:{},align:"center-top"},e||{})}Yr.prototype.createText=function(e,t){return this.layoutText(e,t).element},Yr.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},Yr.prototype.layoutText=function(e,t){var n=$({},this._config.size,t.box),i=$({},this._config.style,t.style),r=function(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}(t.align||this._config.align),o=function(e){return h(e)?$({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}(void 0!==t.padding?t.padding:this._config.padding),a=t.fitBox||!1,s=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(i),c=e.split(/\u00AD?\r?\n/),l=[],p=n.width-o.left-o.right,u=ke("text");for(ye(u,{x:0,y:0}),ye(u,i),fe(function(){var e=document.getElementById("helper-svg");return e||(ye(e=ke("svg"),{id:"helper-svg",width:0,height:0,style:"visibility: hidden; position: fixed"}),document.body.appendChild(e)),e}(),u);c.length;)l.push(Ur(c,p,u));"middle"===r.vertical&&(o.top=o.bottom=0);var d=x(l,(function(e,t,n){return e+(s||t.height)}),0)+o.top+o.bottom,m=x(l,(function(e,t,n){return t.width>e?t.width:e}),0),f=o.top;"middle"===r.vertical&&(f+=(n.height-d)/2),f-=(s||l[0].height)/4;var v=ke("text");return ye(v,i),b(l,(function(e){var t;switch(f+=s||e.height,r.horizontal){case"left":t=o.left;break;case"right":t=(a?m:p)-o.right-e.width;break;default:t=Math.max(((a?m:p)-e.width)/2+o.left,0)}var n=ke("tspan");ye(n,{x:t,y:f}),n.textContent=e.text,fe(v,n)})),Ce(u),{dimensions:{width:m,height:d},element:v}};function Kr(e){var t=$({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=$({},t,{fontSize:n},e&&e.externalStyle||{}),r=new Yr({style:t});this.getExternalLabelBounds=function(e,t){var n=r.getDimensions(t,{box:{width:90,height:30,x:e.width/2+e.x,y:e.height/2+e.y},style:i});return{x:Math.round(e.x+e.width/2-n.width/2),y:Math.round(e.y),width:Math.ceil(n.width),height:Math.ceil(n.height)}},this.getTextAnnotationBounds=function(e,n){var i=r.getDimensions(n,{box:e,style:t,align:"left-top",padding:5});return{x:e.x,y:e.y,width:e.width,height:Math.max(30,Math.round(i.height))}},this.createText=function(e,t){return r.createText(e,t||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return i}}Kr.$inject=["config.textRenderer"];var Zr=/\{([^{}]+)\}/g,Qr=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var Jr={__init__:["bpmnRenderer"],bpmnRenderer:["type",Vr],textRenderer:["type",Kr],pathMap:["type",function(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var n,i,r=this.pathMap[e];t.abspos?(n=t.abspos.x,i=t.abspos.y):(n=t.containerWidth*t.position.mx,i=t.containerHeight*t.position.my);var o,a,s={};if(t.position){for(var c=t.containerHeight/r.height*t.yScaleFactor,l=t.containerWidth/r.width*t.xScaleFactor,p=0;p<r.heightElements.length;p++)s["y"+p]=r.heightElements[p]*c;for(var u=0;u<r.widthElements.length;u++)s["x"+u]=r.widthElements[u]*l}return o=r.d,a={mx:n,my:i,e:s},String(o).replace(Zr,(function(e,t){return function(e,t,n){var i=n;return t.replace(Qr,(function(e,t,n,r,o){t=t||r,i&&(t in i&&(i=i[t]),"function"==typeof i&&o&&(i=i()))})),i=(null==i||i==n?e:i)+""}(e,t,a)}))}}]};var eo={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]},to={width:90,height:20};function no(e){return mr(e,"bpmn:Event")||mr(e,"bpmn:Gateway")||mr(e,"bpmn:DataStoreReference")||mr(e,"bpmn:DataObjectReference")||mr(e,"bpmn:DataInput")||mr(e,"bpmn:DataOutput")||mr(e,"bpmn:SequenceFlow")||mr(e,"bpmn:MessageFlow")||mr(e,"bpmn:Group")}function io(e){return ao(e.label)}function ro(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)],r=function(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)];return{x:n.x+(i.x-n.x)/2,y:n.y+(i.y-n.y)/2}}(e),o=Math.atan((i.y-n.y)/(i.x-n.x)),a=r.x,s=r.y;return Math.abs(o)<Math.PI/2?s-=15:a+=15,{x:a,y:s}}function oo(e){return e.waypoints?ro(e.waypoints):mr(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+to.height/2}:{x:e.x+e.width/2,y:e.y+e.height+to.height/2}}function ao(e){return e&&!!e.labelTarget}function so(e,t,n){return $({id:e.id,type:e.$type,businessObject:e,di:t},n)}function co(e,t,n){var i=e.waypoint;return!i||i.length<2?[cn(t),cn(n)]:i.map((function(e){return{x:e.x,y:e.y}}))}function lo(e,t,n,i){return new Error(e("element {element} referenced by {referenced}#{property} not yet drawn",{element:lr(n),referenced:lr(t),property:i}))}function po(e,t,n,i,r,o){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._translate=r,this._textRenderer=o}po.$inject=["eventBus","canvas","elementFactory","elementRegistry","translate","textRenderer"],po.prototype.add=function(e,t,n){var i,r,o,a=this._translate;if(mr(t,"bpmndi:BPMNPlane")){var s=mr(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};i=this._elementFactory.createRoot(so(e,t,s)),this._canvas.addRootElement(i)}else if(mr(t,"bpmndi:BPMNShape")){var c=!Ar(e,t),l=function(e){return mr(e,"bpmn:Group")}(e);r=n&&(n.hidden||n.collapsed);var p=t.bounds;i=this._elementFactory.createShape(so(e,t,{collapsed:c,hidden:r,x:Math.round(p.x),y:Math.round(p.y),width:Math.round(p.width),height:Math.round(p.height),isFrame:l})),mr(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,i),mr(e,"bpmn:Lane")&&(o=0),mr(e,"bpmn:DataStoreReference")&&(function(e,t){var n=t.x,i=t.y;return n>=e.x&&n<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}(n,cn(p))||(n=this._canvas.findRoot(n))),this._canvas.addShape(i,n,o)}else{if(!mr(t,"bpmndi:BPMNEdge"))throw new Error(a("unknown di {di} for element {semantic}",{di:lr(t),semantic:lr(e)}));var u=this._getSource(e),h=this._getTarget(e);r=n&&(n.hidden||n.collapsed),i=this._elementFactory.createConnection(so(e,t,{hidden:r,source:u,target:h,waypoints:co(t,u,h)})),mr(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),mr(e,"bpmn:SequenceFlow")&&(o=0),this._canvas.addConnection(i,n,o)}return no(e)&&Nr(i)&&this.addLabel(e,t,i),this._eventBus.fire("bpmnElement.added",{element:i}),i},po.prototype._attachBoundary=function(e,t){var n=this._translate,i=e.attachedToRef;if(!i)throw new Error(n("missing {semantic}#attachedToRef",{semantic:lr(e)}));var r=this._elementRegistry.get(i.id),o=r&&r.attachers;if(!r)throw lo(n,e,i,"attachedToRef");t.host=r,o||(r.attachers=o=[]),-1===o.indexOf(t)&&o.push(t)},po.prototype.addLabel=function(e,t,n){var i,r,o;return i=function(e,t){var n,i,r,o=e.label;return o&&o.bounds?(r=o.bounds,i={width:Math.max(to.width,r.width),height:r.height},n={x:r.x+r.width/2,y:r.y+r.height/2}):(n=oo(t),i=to),$({x:n.x-i.width/2,y:n.y-i.height/2},i)}(t,n),(r=Nr(n))&&(i=this._textRenderer.getExternalLabelBounds(i,r)),o=this._elementFactory.createLabel(so(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!Nr(n),x:Math.round(i.x),y:Math.round(i.y),width:Math.round(i.width),height:Math.round(i.height)})),this._canvas.addShape(o,n.parent)},po.prototype._getEnd=function(e,t){var n,i,r=e.$type,o=this._translate;if(i=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===r&&(i=i&&i[0]),("source"===t&&"bpmn:DataOutputAssociation"===r||"target"===t&&"bpmn:DataInputAssociation"===r)&&(i=e.$parent),n=i&&this._getElement(i))return n;throw i?lo(o,e,i,t+"Ref"):new Error(o("{semantic}#{side} Ref not specified",{semantic:lr(e),side:t}))},po.prototype._getSource=function(e){return this._getEnd(e,"source")},po.prototype._getTarget=function(e){return this._getEnd(e,"target")},po.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};var uo={__depends__:[Jr,{__depends__:[eo],bpmnImporter:["type",po]}]};function ho(e){e&&"function"==typeof e.stopPropagation&&e.stopPropagation()}function mo(e){return e.originalEvent||e.srcEvent}function fo(e,t){ho(e),ho(mo(e))}function vo(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function go(e,t){return(mo(e)||e).button===t}function yo(e){return go(e,0)}function bo(e){var t=mo(e)||e;return!!yo(e)&&(/mac/i.test(navigator.platform)?t.metaKey:t.ctrlKey)}function _o(e){var t=mo(e)||e;return yo(e)&&t.shiftKey}function xo(e){return!0}function wo(e){return yo(e)||function(e){return go(e,1)}(e)}function Eo(e,t,n){var i=this;function r(n,i,r){var o,a;(function(e,t){return!(c[e]||yo)(t)})(n,i)||(r?a=t.getGraphics(r):(o=i.delegateTarget||i.target)&&(a=o,r=t.get(a)),a&&r&&!1===e.fire(n,{element:r,gfx:a,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var o={};function a(e){return o[e]}var s={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},c={"element.contextmenu":xo,"element.mousedown":wo,"element.mouseup":wo,"element.click":wo,"element.dblclick":wo};function l(e,t,n,i){var a=o[n]=function(e){r(n,e)};i&&(c[n]=i),a.$delegate=se.bind(e,"svg, .djs-element",t,a)}function p(e,t,n){var i=a(n);i&&se.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){var t;t=e.svg,b(s,(function(e,n){p(t,n,e)}))})),e.on("canvas.init",(function(e){var t;t=e.svg,b(s,(function(e,n){l(t,n,e)}))})),e.on(["shape.added","connection.added"],(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.createHit",{element:n,gfx:i})})),e.on(["shape.changed","connection.changed"],500,(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.updateHit",{element:n,gfx:i})})),e.on("interactionEvents.createHit",500,(function(e){var t=e.element,n=e.gfx;i.createDefaultHit(t,n)})),e.on("interactionEvents.updateHit",(function(e){var t=e.element,n=e.gfx;i.updateDefaultHit(t,n)}));var u=m("djs-hit djs-hit-stroke"),h=m("djs-hit djs-hit-click-stroke"),d={all:m("djs-hit djs-hit-all"),"click-stroke":h,stroke:u};function m(e,t){return t=$({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function f(e,t){var n=d[t];if(!n)throw new Error("invalid hit type <"+t+">");return ye(e,n),e}function v(e,t){fe(e,t)}this.removeHits=function(e){b(he(".djs-hit",e),Ce)},this.createDefaultHit=function(e,t){var n,i=e.waypoints,r=e.isFrame;return i?this.createWaypointsHit(t,i):(n=r?"stroke":"all",this.createBoxHit(t,n,{width:e.width,height:e.height}))},this.createWaypointsHit=function(e,t){var n=it(t);return f(n,"stroke"),v(e,n),n},this.createBoxHit=function(e,t,n){n=$({x:0,y:0},n);var i=ke("rect");return f(i,t),ye(i,n),v(e,i),i},this.updateDefaultHit=function(e,t){var n=ue(".djs-hit",t);if(n)return e.waypoints?function(e,t){ye(e,{points:nt(t)})}(n,e.waypoints):ye(n,{width:e.width,height:e.height}),n},this.fire=r,this.triggerMouseEvent=function(e,t,n){var i=s[e];if(!i)throw new Error("unmapped DOM event name <"+e+">");return r(i,t,n)},this.mouseHandler=a,this.registerEvent=l,this.unregisterEvent=p}Eo.$inject=["eventBus","elementRegistry","styles"];var So={__init__:["interactionEvents"],interactionEvents:["type",Eo]};function Co(e,t,n){this.offset=6;var i=t.cls("djs-outline",["no-fill"]),r=this;function o(e,t){var n=ke("rect");return ye(n,$({x:10,y:10,width:100,height:100},i)),fe(e,n),n}e.on(["shape.added","shape.changed"],500,(function(e){var t=e.element,n=e.gfx,i=ue(".djs-outline",n);i||(i=o(n)),r.updateShapeOutline(i,t)})),e.on(["connection.added","connection.changed"],(function(e){var t=e.element,n=e.gfx,i=ue(".djs-outline",n);i||(i=o(n)),r.updateConnectionOutline(i,t)}))}Co.prototype.updateShapeOutline=function(e,t){ye(e,{x:-this.offset,y:-this.offset,width:t.width+2*this.offset,height:t.height+2*this.offset})},Co.prototype.updateConnectionOutline=function(e,t){var n=lt(t);ye(e,{x:n.x-this.offset,y:n.y-this.offset,width:n.width+2*this.offset,height:n.height+2*this.offset})},Co.$inject=["eventBus","styles","elementRegistry"];var Ro={__init__:["outline"],outline:["type",Co]};function Po(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=[];var n=this;e.on(["shape.remove","connection.remove"],(function(e){var t=e.element;n.deselect(t)})),e.on(["diagram.clear","root.set"],(function(e){n.select(null)}))}Po.$inject=["eventBus","canvas"],Po.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})}},Po.prototype.get=function(){return this._selectedElements},Po.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},Po.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();u(e)||(e=e?[e]:[]);var r=this._canvas,o=r.getRootElement();e=e.filter((function(e){var t=r.findRoot(e);return o===t})),t?b(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 Mo="hover",To="selected";function Ao(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,Mo)})),e.on("element.out",(function(e){o(e.element,Mo)})),e.on("selection.changed",(function(e){var t=e.oldSelection,n=e.newSelection;b(t,(function(e){-1===n.indexOf(e)&&function(e){o(e,To)}(e)})),b(n,(function(e){-1===t.indexOf(e)&&function(e){r(e,To)}(e)}))}))}function ko(e,t,n,i){e.on("create.end",500,(function(e){var n=e.context,i=n.canExecute,r=n.elements,o=(n.hints||{}).autoSelect;if(i){if(!1===o)return;u(o)?t.select(o):t.select(r.filter(Oo))}})),e.on("connect.end",500,(function(e){var n=e.context,i=n.canExecute,r=n.hover;i&&r&&t.select(r)})),e.on("shape.move.end",500,(function(e){var n=e.previousSelection||[],r=i.get(e.context.shape.id);g(n,(function(e){return r.id===e.id}))||t.select(r)})),e.on("element.click",(function(e){if(yo(e)){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,a=bo(e)||_o(e);if(r&&o)return a?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,a)}}))}function Oo(e){return!e.hidden}Ao.$inject=["eventBus","canvas","selection","styles"],ko.$inject=["eventBus","selection","canvas","elementRegistry"];var Do={__init__:["selectionVisuals","selectionBehavior"],__depends__:[So,Ro],selection:["type",Po],selectionVisuals:["type",Ao],selectionBehavior:["type",ko]};function zo(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}zo.prototype.next=function(){return this._prefix+ ++this._counter};var No=new zo("ov");function Bo(e,t,n,i){var r,o;this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=No,this._overlayDefaults=$({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(r=n.getContainer(),o=ce('<div class="djs-overlay-container" style="position: absolute; width: 0; height: 0;" />'),r.insertBefore(o,r.firstChild),o),this._init()}function Lo(e,t,n){$(e.style,{left:t+"px",top:n+"px"})}function jo(e,t){e.style.display=!1===t?"none":""}function Io(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}Bo.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Bo.prototype.get=function(e){if(f(e)&&(e={id:e}),f(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?y(t.overlays,O({type:e.type})):t.overlays.slice():[]}return e.type?y(this._overlays,O({type:e.type})):e.id?this._overlays[e.id]:null},Bo.prototype.add=function(e,t,n){if(h(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var i=this._ids.next();return n=$({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},Bo.prototype.remove=function(e){var t=this.get(e)||[];u(t)||(t=[t]);var n=this;b(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(de(e.html),de(e.htmlContainer),delete e.htmlContainer,delete e.element,delete n._overlays[e.id]),t){var i=t.overlays.indexOf(e);-1!==i&&t.overlays.splice(i,1)}}))},Bo.prototype.show=function(){jo(this._overlayRoot)},Bo.prototype.hide=function(){jo(this._overlayRoot,!1)},Bo.prototype.clear=function(){this._overlays={},this._overlayContainers=[],K(this._overlayRoot)},Bo.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var o=lt(t);i=o.x,r=o.y}Lo(n,i,r),V(e.html,"data-container-id",t.id)},Bo.prototype._updateOverlay=function(e){var t,n,i=e.position,r=e.htmlContainer,o=e.element,a=i.left,s=i.top;void 0!==i.right&&(t=o.waypoints?lt(o).width:o.width,a=-1*i.right+t);void 0!==i.bottom&&(n=o.waypoints?lt(o).height:o.height,s=-1*i.bottom+n);Lo(r,a||0,s||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Bo.prototype._createOverlayContainer=function(e){var t=ce('<div class="djs-overlays" style="position: absolute" />');this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Bo.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Io(this._overlayRoot,n)},Bo.prototype._getOverlayContainer=function(e,t){var n=g(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},Bo.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)),f(o)&&(o=ce(o)),n=this._getOverlayContainer(r),(t=ce('<div class="djs-overlay" data-overlay-id="'+i+'" style="position: absolute">')).appendChild(o),e.type&&X(t).add("djs-overlay-"+e.type),jo(t,this._canvas.findRoot(r)===this._canvas.getRootElement()),e.htmlContainer=t,n.overlays.push(e),n.html.appendChild(t),this._overlays[i]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Bo.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,i=this._canvas.findRoot(e.element),r=n&&n.minZoom,o=n&&n.maxZoom,a=e.htmlContainer,s=!0;(i!==this._canvas.getRootElement()||n&&(l(r)&&r>t.scale||l(o)&&o<t.scale))&&(s=!1),jo(a,s),this._updateOverlayScale(e,t)},Bo.prototype._updateOverlayScale=function(e,t){var n,i,r,o=e.scale,a=e.htmlContainer,s="";!0!==o&&(!1===o?(n=1,i=1):(n=o.min,i=o.max),l(n)&&t.scale<n&&(r=(1/t.scale||1)*n),l(i)&&t.scale>i&&(r=(1/t.scale||1)*i)),l(r)&&(s="scale("+r+","+r+")"),Io(a,s)},Bo.prototype._updateOverlaysVisibilty=function(e){var t=this;b(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},Bo.prototype._init=function(){var e=this._eventBus,t=this;e.on("canvas.viewbox.changing",(function(e){t.hide()})),e.on("canvas.viewbox.changed",(function(e){var n;n=e.viewbox,t._updateRoot(n),t._updateOverlaysVisibilty(n),t.show()})),e.on(["shape.remove","connection.remove"],(function(e){var n=e.element;b(t.get({element:n}),(function(e){t.remove(e.id)}));var i=t._getOverlayContainer(n);if(i){de(i.html);var r=t._overlayContainers.indexOf(i);-1!==r&&t._overlayContainers.splice(r,1)}})),e.on("element.changed",500,(function(e){var n=e.element,i=t._getOverlayContainer(n,!0);i&&(b(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&&X(n.html)[e.add?"add":"remove"](e.marker)})),e.on("root.set",(function(){t._updateOverlaysVisibilty()})),e.on("diagram.clear",this.clear,this)};var $o={__init__:["overlays"],overlays:["type",Bo]};function Fo(e,t,n,i){e.on("element.changed",(function(i){var r=i.element;(r.parent||r===t.getRootElement())&&(i.gfx=n.getGraphics(r)),i.gfx&&e.fire(pt(r)+".changed",i)})),e.on("elements.changed",(function(t){var n=t.elements;n.forEach((function(t){e.fire("element.changed",{element:t})})),i.updateContainments(n)})),e.on("shape.changed",(function(e){i.update("shape",e.element,e.gfx)})),e.on("connection.changed",(function(e){i.update("connection",e.element,e.gfx)}))}Fo.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var Ho={__init__:["changeSupport"],changeSupport:["type",Fo]};function Vo(e){this._eventBus=e}Vo.$inject=["eventBus"],Vo.prototype.on=function(e,t,n,i,r,o){if((m(t)||d(t))&&(o=r,r=i,i=n,n=t,t=null),m(n)&&(o=r,r=i,i=n,n=1e3),h(r)&&(o=r,r=!1),!m(i))throw new Error("handlerFn must be a function");u(e)||(e=[e]);var a=this._eventBus;b(e,(function(e){var s=["commandStack",e,t].filter((function(e){return e})).join(".");a.on(s,n,r?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(i,o):i,o)}))};function Go(e,t){t.invoke(Vo,this),this.executed((function(t){var n=t.context;n.rootElement?e.setRootElement(n.rootElement):n.rootElement=e.getRootElement()})),this.revert((function(t){var n=t.context;n.rootElement&&e.setRootElement(n.rootElement)}))}b(["canExecute","preExecute","preExecuted","execute","executed","postExecute","postExecuted","revert","reverted"],(function(e){Vo.prototype[e]=function(t,n,i,r,o){(m(t)||d(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}})),n(Go,Vo),Go.$inject=["canvas","injector"];var Wo={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",Go]},Uo=t((function(t,n){var i;i=e,t.exports=function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var t=function(e){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var t,n=String(e),i=n.length,r=-1,o="",a=n.charCodeAt(0);++r<i;)0!=(t=n.charCodeAt(r))?o+=t>=1&&t<=31||127==t||0==r&&t>=48&&t<=57||1==r&&t>=48&&t<=57&&45==a?"\\"+t.toString(16)+" ":0==r&&1==i&&45==t||!(t>=128||45==t||95==t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122)?"\\"+n.charAt(r):n.charAt(r):o+="�";return o};return e.CSS||(e.CSS={}),e.CSS.escape=t,t}(i)})),qo={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};
2
+ /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */function Xo(e){return(e=""+e)&&e.replace(/[&<>"']/g,(function(e){return qo[e]}))}var Yo="_plane";function Ko(e){return function(e){return e.replace(new RegExp("_plane$"),"")}(e.id)}function Zo(e){var t=e.id;return mr(e,"bpmn:SubProcess")?ea(t):t}function Qo(e){return ea(e)}function Jo(e){return mr(gr(e),"bpmndi:BPMNPlane")}function ea(e){return e+Yo}function ta(e,t,n,i){var r=ce('<ul class="bjs-breadcrumbs"></ul>'),o=i.getContainer(),a=X(o);o.appendChild(r);var s=[];function c(e){e&&(s=function(e){for(var t=vr(e),n=[],i=t;i;i=i.$parent)(mr(i,"bpmn:SubProcess")||mr(i,"bpmn:Process"))&&n.push(i);return n.reverse()}(e));var n=s.map((function(e){var n=Xo(e.name||e.id),r=ce('<li><span class="bjs-crumb"><a title="'+n+'">'+n+"</a></span></li>"),o=i.findRoot(Zo(e))||i.findRoot(e.id);if(!o&&mr(e,"bpmn:Process")){var a=t.find((function(t){var n=vr(t);return n&&n.processRef&&n.processRef===e}));o=i.findRoot(a.id)}return r.addEventListener("click",(function(){i.setRootElement(o)})),r}));r.innerHTML="";var o=n.length>1;a.toggle("bjs-breadcrumbs-shown",o),n.forEach((function(e){r.appendChild(e)}))}e.on("element.changed",(function(n){var i=n.element;if(Jo(i)){var r=t.get(Ko(i));r&&e.fire("element.changed",{element:r})}})),e.on("element.changed",(function(e){var t=vr(e.element);g(s,(function(e){return e===t}))&&c()})),e.on("root.set",(function(e){c(e.element)}))}function na(e,t){var n=null,i=new ia;e.on("root.set",(function(e){var r=e.element,o=t.viewbox(),a=i.get(r);if(i.set(n,{x:o.x,y:o.y,zoom:o.scale}),n=r,!mr(r,"bpmn:Collaboration")||a){a=a||{x:0,y:0,zoom:1};var s=(o.x-a.x)*o.scale,c=(o.y-a.y)*o.scale;0===s&&0===c||t.scroll({dx:s,dy:c}),a.zoom!==o.scale&&t.zoom(a.zoom,{x:0,y:0})}})),e.on("diagram.clear",(function(){i.clear(),n=null}))}function ia(){this._entries=[],this.set=function(e,t){var n=!1;for(var i in this._entries)if(this._entries[i][0]===e){this._entries[i][1]=t,n=!0;break}n||this._entries.push([e,t])},this.get=function(e){for(var t in this._entries)if(this._entries[t][0]===e)return this._entries[t][1];return null},this.clear=function(){this._entries.length=0},this.remove=function(e){var t=-1;for(var n in this._entries)if(this._entries[n][0]===e){t=n;break}-1!==t&&this._entries.splice(t,1)}}ta.$inject=["eventBus","elementRegistry","overlays","canvas"],na.$inject=["eventBus","canvas"];var ra=180,oa=160;function aa(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,(function(e,t){n.handleImport(t.definitions)}))}function sa(e){return mr(e,"bpmndi:BPMNDiagram")?e:sa(e.$parent)}aa.prototype.handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach((function(e){e.plane&&e.plane.bpmnElement&&(t._processToDiagramMap[e.plane.bpmnElement.id]=e)}));var n=[];e.diagrams.forEach((function(e){var i=t.createNewDiagrams(e.plane);Array.prototype.push.apply(n,i)})),n.forEach((function(e){t.movePlaneElementsToOrigin(e.plane)}))}},aa.prototype.createNewDiagrams=function(e){var t=this,n=[],i=[];e.get("planeElement").forEach((function(t){var r=t.bpmnElement,o=r.$parent;mr(r,"bpmn:SubProcess")&&!t.isExpanded&&n.push(r),mr(o,"bpmn:SubProcess")&&o!==e.bpmnElement&&i.push({diElement:t,parent:o})}));var r=[];return n.forEach((function(e){if(!t._processToDiagramMap[e.id]){var n=t.createDiagram(e);t._processToDiagramMap[e.id]=n,r.push(n)}})),i.forEach((function(e){for(var i=e.diElement,r=e.parent;r&&!n.includes(r);)r=r.$parent;if(r){var o=t._processToDiagramMap[r.id];t.moveToDiPlane(i,o.plane)}})),r},aa.prototype.movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=function(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach((function(e){if(e.bounds){var n=an(e.bounds);t.top=Math.min(n.top,t.top),t.left=Math.min(n.left,t.left)}})),sn(t)}(e),i=n.x-ra,r=n.y-oa;t.forEach((function(e){e.waypoint?e.waypoint.forEach((function(e){e.x=e.x-i,e.y=e.y-r})):e.bounds&&(e.bounds.x=e.bounds.x-i,e.bounds.y=e.bounds.y-r)}))},aa.prototype.moveToDiPlane=function(e,t){var n=sa(e).plane.get("planeElement");n.splice(n.indexOf(e),1),t.get("planeElement").push(e)},aa.prototype.createDiagram=function(e){var t=this._moddle.create("bpmndi:BPMNPlane",{bpmnElement:e}),n=this._moddle.create("bpmndi:BPMNDiagram",{plane:t});return t.$parent=n,t.bpmnElement=e,n.$parent=this._definitions,this._definitions.diagrams.push(n),n},aa.$inject=["eventBus","moddle"];var ca=250;function la(e,t,n,i){Vo.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=i;var r=this;this.executed("shape.toggleCollapse",ca,(function(e){var t=e.shape;r.canDrillDown(t)?r.addOverlay(t):r.removeOverlay(t)}),!0),this.reverted("shape.toggleCollapse",ca,(function(e){var t=e.shape;r.canDrillDown(t)?r.addOverlay(t):r.removeOverlay(t)}),!0),this.executed(["shape.create","shape.move","shape.delete"],ca,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;r.canDrillDown(i)&&r.addOverlay(i),r.updateDrilldownOverlay(t),r.updateDrilldownOverlay(n),r.updateDrilldownOverlay(i)}),!0),this.reverted(["shape.create","shape.move","shape.delete"],ca,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;r.canDrillDown(i)&&r.addOverlay(i),r.updateDrilldownOverlay(t),r.updateDrilldownOverlay(n),r.updateDrilldownOverlay(i)}),!0),t.on("import.done",(function(){n.filter((function(e){return r.canDrillDown(e)})).map((function(e){r.addOverlay(e)}))}))}n(la,Vo),la.prototype.updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this.updateOverlayVisibility(n)}},la.prototype.canDrillDown=function(e){var t=this._canvas;return mr(e,"bpmn:SubProcess")&&t.findRoot(Zo(e))},la.prototype.updateOverlayVisibility=function(e){var t=this._overlays,n=e.businessObject,i=t.get({element:n.id,type:"drilldown"})[0];if(i){var r=n&&n.flowElements&&n.flowElements.length;X(i.html).toggle("bjs-drilldown-empty",!r)}},la.prototype.addOverlay=function(e){var t=this._canvas,n=this._overlays;n.get({element:e,type:"drilldown"}).length&&this.removeOverlay(e);var i=ce('<button class="bjs-drilldown"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg></button>');i.addEventListener("click",(function(){t.setRootElement(t.findRoot(Zo(e)))})),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:i}),this.updateOverlayVisibility(e)},la.prototype.removeOverlay=function(e){this._overlays.remove({element:e,type:"drilldown"})},la.$inject=["canvas","eventBus","elementRegistry","overlays"];var pa={__depends__:[$o,Ho,Wo],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",ta],drilldownCentering:["type",na],drilldownOverlayBehavior:["type",la],subprocessCompatibility:["type",aa]};function ua(e){Cr.call(this,e)}function ha(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function da(e,t){return-1!==(e=u(e)?e:[e]).indexOf(t.key)||-1!==e.indexOf(t.keyCode)}function ma(e){return e.shiftKey}n(ua,Cr),ua.prototype._modules=[uo,eo,Do,$o,pa],ua.prototype._moddleExtensions={};var fa="keyboard.keydown",va="input-handle-modified-keys";function ga(e,t){var n=this;this._config=e||{},this._eventBus=t,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),t.on("diagram.destroy",(function(){n._fire("destroy"),n.unbind()})),t.on("diagram.init",(function(){n._fire("init")})),t.on("attach",(function(){e&&e.bindTo&&n.bind(e.bindTo)})),t.on("detach",(function(){n.unbind()}))}ga.$inject=["config.keyboard","eventBus"],ga.prototype._keydownHandler=function(e){this._keyHandler(e,fa)},ga.prototype._keyupHandler=function(e){this._keyHandler(e,"keyboard.keyup")},ga.prototype._keyHandler=function(e,t){if(!this._isEventIgnored(e)){var n={keyEvent:e};this._eventBus.fire(t||fa,n)&&e.preventDefault()}},ga.prototype._isEventIgnored=function(e){return(t=e.target)&&(J(t,"input, textarea")||"true"===t.contentEditable)&&this._isModifiedKeyIgnored(e);var t},ga.prototype._isModifiedKeyIgnored=function(e){return!ha(e)||!this._getAllowedModifiers(e.target).includes(e.key)},ga.prototype._getAllowedModifiers=function(e){var t=ee(e,"[input-handle-modified-keys]",!0);return!t||this._node&&!this._node.contains(t)?[]:t.getAttribute(va).split(",")},ga.prototype.bind=function(e){this.unbind(),this._node=e,re.bind(e,"keydown",this._keydownHandler,!0),re.bind(e,"keyup",this._keyupHandler,!0),this._fire("bind")},ga.prototype.getBinding=function(){return this._node},ga.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),re.unbind(e,"keydown",this._keydownHandler,!0),re.unbind(e,"keyup",this._keyupHandler,!0)),this._node=null},ga.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})},ga.prototype.addListener=function(e,t,n){m(e)&&(n=t,t=e,e=1e3),this._eventBus.on(n||fa,e,t)},ga.prototype.removeListener=function(e,t){this._eventBus.off(t||fa,e)},ga.prototype.hasModifier=function(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey},ga.prototype.isCmd=ha,ga.prototype.isShift=ma,ga.prototype.isKey=da;var ya=["c","C",67],ba=["v","V",86],_a=["y","Y",89],xa=["z","Z",90];function wa(e,t){var n=this;e.on("editorActions.init",500,(function(e){var i=e.editorActions;n.registerBindings(t,i)}))}wa.$inject=["eventBus","keyboard"],wa.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}n("undo",(function(e){var n=e.keyEvent;if(ha(n)&&!ma(n)&&da(xa,n))return t.trigger("undo"),!0})),n("redo",(function(e){var n=e.keyEvent;if(ha(n)&&(da(_a,n)||da(xa,n)&&ma(n)))return t.trigger("redo"),!0})),n("copy",(function(e){var n=e.keyEvent;if(ha(n)&&da(ya,n))return t.trigger("copy"),!0})),n("paste",(function(e){var n=e.keyEvent;if(ha(n)&&da(ba,n))return t.trigger("paste"),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(da(["+","Add","="],n)&&ha(n))return t.trigger("stepZoom",{value:1}),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(da(["-","Subtract"],n)&&ha(n))return t.trigger("stepZoom",{value:-1}),!0})),n("zoom",(function(e){var n=e.keyEvent;if(da("0",n)&&ha(n))return t.trigger("zoom",{value:1}),!0})),n("removeSelection",(function(e){if(da(["Backspace","Delete","Del"],e.keyEvent))return t.trigger("removeSelection"),!0}))};var Ea={__init__:["keyboard","keyboardBindings"],keyboard:["type",ga],keyboardBindings:["type",wa]},Sa={moveSpeed:50,moveSpeedAccelerated:200};function Ca(e,t,n){var i=this;this._config=$({},Sa,e||{}),t.addListener((function(e){var n=e.keyEvent,r=i._config;if(!t.isCmd(n))return;if(t.isKey(["ArrowLeft","Left","ArrowUp","Up","ArrowDown","Down","ArrowRight","Right"],n)){var o,a=t.isShift(n)?r.moveSpeedAccelerated:r.moveSpeed;switch(n.key){case"ArrowLeft":case"Left":o="left";break;case"ArrowUp":case"Up":o="up";break;case"ArrowRight":case"Right":o="right";break;case"ArrowDown":case"Down":o="down"}return i.moveCanvas({speed:a,direction:o}),!0}})),this.moveCanvas=function(e){var t=0,i=0,r=e.speed/Math.min(Math.sqrt(n.viewbox().scale),1);switch(e.direction){case"left":t=r;break;case"up":i=r;break;case"right":t=-r;break;case"down":i=-r}n.scroll({dx:t,dy:i})}}Ca.$inject=["config.keyboardMove","keyboard","canvas"];var Ra={__depends__:[Ea],__init__:["keyboardMove"],keyboardMove:["type",Ca]},Pa=/^djs-cursor-.*$/;function Ma(e){var t=X(document.body);t.removeMatching(Pa),e&&t.add("djs-cursor-"+e)}function Ta(){Ma(null)}function Aa(e,t){function n(){return!1}return t=t||"element.click",e.once(t,5e3,n),function(){e.off(t,n)}}function ka(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Oa(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Da(e,t){var n;function i(i){var r,o=n.start,a=n.button,s=vo(i),c=Oa(s,o);(!n.dragging&&(r=c,Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2))>15)&&(n.dragging=!0,0===a&&Aa(e),Ma("grab")),n.dragging)&&(c=Oa(s,n.last||n.start),t.scroll({dx:c.x,dy:c.y}),n.last=s);i.preventDefault()}function r(e){re.unbind(document,"mousemove",i),re.unbind(document,"mouseup",r),n=null,Ta()}e.on("element.mousedown",500,(function(e){return function(e){if(ee(e.target,".djs-draggable"))return;var t=e.button;if(t>=2||e.ctrlKey||e.shiftKey||e.altKey)return;return n={button:t,start:vo(e)},re.bind(document,"mousemove",i),re.bind(document,"mouseup",r),!0}(e.originalEvent)})),this.isActive=function(){return!!n}}Da.$inject=["eventBus","canvas"];var za={__init__:["moveCanvas"],moveCanvas:["type",Da]};function Na(e){return Math.log(e)/Math.log(10)}function Ba(e,t){var n=Na(e.min),i=Na(e.max);return(Math.abs(n)+Math.abs(i))/t}var La=Math.sign||function(e){return e>=0?1:-1},ja={min:.2,max:4};function Ia(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=j(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||.75;var i=this;t.on("canvas.init",(function(t){i._init(!1!==e.enabled)}))}Ia.$inject=["config.zoomScroll","eventBus","canvas"],Ia.prototype.scroll=function(e){this._canvas.scroll(e)},Ia.prototype.reset=function(){this._canvas.zoom("fit-viewport")},Ia.prototype.zoom=function(e,t){var n=Ba(ja,20);this._totalDelta+=e,Math.abs(this._totalDelta)>.1&&(this._zoom(e,t,n),this._totalDelta=0)},Ia.prototype._handleWheel=function(e){if(!ee(e.target,".djs-scrollable",!0)){var t=this._container;e.preventDefault();var n,i=e.ctrlKey,r=e.shiftKey,o=-1*this._scale;if(o*=i?0===e.deltaMode?.02:.32:0===e.deltaMode?1:16,i){var a=t.getBoundingClientRect(),s={x:e.clientX-a.left,y:e.clientY-a.top};n=Math.sqrt(Math.pow(e.deltaY,2)+Math.pow(e.deltaX,2))*La(e.deltaY)*o,this.zoom(n,s)}else n=r?{dx:o*e.deltaY,dy:0}:{dx:o*e.deltaX,dy:o*e.deltaY},this.scroll(n)}},Ia.prototype.stepZoom=function(e,t){var n=Ba(ja,10);this._zoom(e,t,n)},Ia.prototype._zoom=function(e,t,n){var i=this._canvas,r=e>0?1:-1,o=Na(i.zoom()),a=Math.round(o/n)*n;a+=n*r;var s=Math.pow(10,a);i.zoom(function(e,t){return Math.max(e.min,Math.min(e.max,t))}(ja,s),t)},Ia.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,i=this._enabled;return void 0===e&&(e=!i),i!==e&&re[e?"bind":"unbind"](t,"wheel",n,!1),this._enabled=e,e},Ia.prototype._init=function(e){this.toggle(e)};var $a={__init__:["zoomScroll"],zoomScroll:["type",Ia]};function Fa(e){ua.call(this,e)}n(Fa,ua),Fa.prototype._navigationModules=[Ra,za,$a],Fa.prototype._modules=[].concat(ua.prototype._modules,Fa.prototype._navigationModules);
2
3
  /*! Hammer.JS - v2.0.7 - 2016-04-22
3
4
  * http://hammerjs.github.io/
4
5
  *
5
6
  * Copyright (c) 2016 Jorik Tangelder;
6
7
  * Licensed under the MIT license */
7
- var Ma=n((function(e){!function(t,n,i,r){var o,a=["","webkit","Moz","MS","ms","o"],s=n.createElement("div"),c=Math.round,p=Math.abs,u=Date.now;function l(e,t,n){return setTimeout(y(e,n),t)}function d(e,t,n){return!!Array.isArray(e)&&(h(e,n[t],n),!0)}function h(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==r)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function f(e,n,i){var r="DEPRECATED METHOD: "+n+"\n"+i+" AT \n";return function(){var n=new Error("get-stack-trace"),i=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=t.console&&(t.console.warn||t.console.log);return o&&o.call(t.console,r,i),e.apply(this,arguments)}}o="function"!=typeof Object.assign?function(e){if(e===r||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==r&&null!==i)for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o])}return t}:Object.assign;var m=f((function(e,t,n){for(var i=Object.keys(t),o=0;o<i.length;)(!n||n&&e[i[o]]===r)&&(e[i[o]]=t[i[o]]),o++;return e}),"extend","Use `assign`."),v=f((function(e,t){return m(e,t,!0)}),"merge","Use `assign`.");function g(e,t,n){var i,r=t.prototype;(i=e.prototype=Object.create(r)).constructor=e,i._super=r,n&&o(i,n)}function y(e,t){return function(){return e.apply(t,arguments)}}function b(e,t){return"function"==typeof e?e.apply(t&&t[0]||r,t):e}function x(e,t){return e===r?t:e}function _(e,t,n){h(C(t),(function(t){e.addEventListener(t,n,!1)}))}function w(e,t,n){h(C(t),(function(t){e.removeEventListener(t,n,!1)}))}function E(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function S(e,t){return e.indexOf(t)>-1}function C(e){return e.trim().split(/\s+/g)}function P(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}function T(e){return Array.prototype.slice.call(e,0)}function R(e,t,n){for(var i=[],r=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];P(r,a)<0&&i.push(e[o]),r[o]=a,o++}return n&&(i=t?i.sort((function(e,n){return e[t]>n[t]})):i.sort()),i}function A(e,t){for(var n,i,o=t[0].toUpperCase()+t.slice(1),s=0;s<a.length;){if((i=(n=a[s])?n+o:t)in e)return i;s++}return r}var k=1;function M(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}var D="ontouchstart"in t,B=A(t,"PointerEvent")!==r,j=D&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),O="touch",N="mouse",L=24,I=["x","y"],z=["clientX","clientY"];function F(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){b(e.options.enable,[e])&&n.handler(t)},this.init()}function $(e,t,n){var i=n.pointers.length,o=n.changedPointers.length,a=1&t&&i-o==0,s=12&t&&i-o==0;n.isFirst=!!a,n.isFinal=!!s,a&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,i=t.pointers,o=i.length;n.firstInput||(n.firstInput=V(t));o>1&&!n.firstMultiple?n.firstMultiple=V(t):1===o&&(n.firstMultiple=!1);var a=n.firstInput,s=n.firstMultiple,c=s?s.center:a.center,l=t.center=H(i);t.timeStamp=u(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=U(c,l),t.distance=q(c,l),function(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y});t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}(n,t),t.offsetDirection=W(t.deltaX,t.deltaY);var d=G(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=d.x,t.overallVelocityY=d.y,t.overallVelocity=p(d.x)>p(d.y)?d.x:d.y,t.scale=s?(h=s.pointers,f=i,q(f[0],f[1],z)/q(h[0],h[1],z)):1,t.rotation=s?function(e,t){return U(t[1],t[0],z)+U(e[1],e[0],z)}(s.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,i,o,a,s=e.lastInterval||t,c=t.timeStamp-s.timeStamp;if(8!=t.eventType&&(c>25||s.velocity===r)){var u=t.deltaX-s.deltaX,l=t.deltaY-s.deltaY,d=G(c,u,l);i=d.x,o=d.y,n=p(d.x)>p(d.y)?d.x:d.y,a=W(u,l),e.lastInterval=t}else n=s.velocity,i=s.velocityX,o=s.velocityY,a=s.direction;t.velocity=n,t.velocityX=i,t.velocityY=o,t.direction=a}(n,t);var h,f;var m=e.element;E(t.srcEvent.target,m)&&(m=t.srcEvent.target);t.target=m}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function V(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:c(e.pointers[n].clientX),clientY:c(e.pointers[n].clientY)},n++;return{timeStamp:u(),pointers:t,center:H(t),deltaX:e.deltaX,deltaY:e.deltaY}}function H(e){var t=e.length;if(1===t)return{x:c(e[0].clientX),y:c(e[0].clientY)};for(var n=0,i=0,r=0;r<t;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:c(n/t),y:c(i/t)}}function G(e,t,n){return{x:t/e||0,y:n/e||0}}function W(e,t){return e===t?1:p(e)>=p(t)?e<0?2:4:t<0?8:16}function q(e,t,n){n||(n=I);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(i*i+r*r)}function U(e,t,n){n||(n=I);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,i)/Math.PI}F.prototype={handler:function(){},init:function(){this.evEl&&_(this.element,this.evEl,this.domHandler),this.evTarget&&_(this.target,this.evTarget,this.domHandler),this.evWin&&_(M(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(M(this.element),this.evWin,this.domHandler)}};var Y={mousedown:1,mousemove:2,mouseup:4},K="mousedown",X="mousemove mouseup";function Z(){this.evEl=K,this.evWin=X,this.pressed=!1,F.apply(this,arguments)}g(Z,F,{handler:function(e){var t=Y[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:N,srcEvent:e}))}});var Q={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},J={2:O,3:"pen",4:N,5:"kinect"},ee="pointerdown",te="pointermove pointerup pointercancel";function ne(){this.evEl=ee,this.evWin=te,F.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(ee="MSPointerDown",te="MSPointerMove MSPointerUp MSPointerCancel"),g(ne,F,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=Q[i],o=J[e.pointerType]||e.pointerType,a=o==O,s=P(t,e.pointerId,"pointerId");1&r&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):12&r&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var ie={touchstart:1,touchmove:2,touchend:4,touchcancel:8},re="touchstart",oe="touchstart touchmove touchend touchcancel";function ae(){this.evTarget=re,this.evWin=oe,this.started=!1,F.apply(this,arguments)}function se(e,t){var n=T(e.touches),i=T(e.changedTouches);return 12&t&&(n=R(n.concat(i),"identifier",!0)),[n,i]}g(ae,F,{handler:function(e){var t=ie[e.type];if(1===t&&(this.started=!0),this.started){var n=se.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:O,srcEvent:e})}}});var ce={touchstart:1,touchmove:2,touchend:4,touchcancel:8},pe="touchstart touchmove touchend touchcancel";function ue(){this.evTarget=pe,this.targetIds={},F.apply(this,arguments)}function le(e,t){var n=T(e.touches),i=this.targetIds;if(3&t&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,a=T(e.changedTouches),s=[],c=this.target;if(o=n.filter((function(e){return E(e.target,c)})),1===t)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<a.length;)i[a[r].identifier]&&s.push(a[r]),12&t&&delete i[a[r].identifier],r++;return s.length?[R(o.concat(s),"identifier",!0),s]:void 0}g(ue,F,{handler:function(e){var t=ce[e.type],n=le.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:O,srcEvent:e})}});function de(){F.apply(this,arguments);var e=y(this.handler,this);this.touch=new ue(this.manager,e),this.mouse=new Z(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function he(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,fe.call(this,t)):12&e&&fe.call(this,t)}function fe(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout((function(){var e=i.indexOf(n);e>-1&&i.splice(e,1)}),2500)}}function me(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(t-r.x),a=Math.abs(n-r.y);if(o<=25&&a<=25)return!0}return!1}g(de,F,{handler:function(e,t,n){var i=n.pointerType==O,r=n.pointerType==N;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)he.call(this,t,n);else if(r&&me.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ve=A(s.style,"touchAction"),ge=ve!==r,ye="compute",be="auto",xe="manipulation",_e="none",we="pan-x",Ee="pan-y",Se=function(){if(!ge)return!1;var e={},n=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(i){e[i]=!n||t.CSS.supports("touch-action",i)})),e}();function Ce(e,t){this.manager=e,this.set(t)}Ce.prototype={set:function(e){e==ye&&(e=this.compute()),ge&&this.manager.element.style&&Se[e]&&(this.manager.element.style[ve]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return h(this.manager.recognizers,(function(t){b(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(S(e,_e))return _e;var t=S(e,we),n=S(e,Ee);if(t&&n)return _e;if(t||n)return t?we:Ee;if(S(e,xe))return xe;return be}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var i=this.actions,r=S(i,_e)&&!Se.none,o=S(i,Ee)&&!Se["pan-y"],a=S(i,we)&&!Se["pan-x"];if(r){var s=1===e.pointers.length,c=e.distance<2,p=e.deltaTime<250;if(s&&c&&p)return}if(!a||!o)return r||o&&6&n||a&&n&L?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var Pe=32;function Te(e){this.options=o({},this.defaults,e||{}),this.id=k++,this.manager=null,this.options.enable=x(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Re(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function Ae(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function ke(e,t){var n=t.manager;return n?n.get(e):e}function Me(){Te.apply(this,arguments)}function De(){Me.apply(this,arguments),this.pX=null,this.pY=null}function Be(){Me.apply(this,arguments)}function je(){Te.apply(this,arguments),this._timer=null,this._input=null}function Oe(){Me.apply(this,arguments)}function Ne(){Me.apply(this,arguments)}function Le(){Te.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Ie(e,t){return(t=t||{}).recognizers=x(t.recognizers,Ie.defaults.preset),new ze(e,t)}Te.prototype={defaults:{},set:function(e){return o(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(d(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=ke(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return d(e,"dropRecognizeWith",this)||(e=ke(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(d(e,"requireFailure",this))return this;var t=this.requireFail;return-1===P(t,e=ke(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(d(e,"dropRequireFailure",this))return this;e=ke(e,this);var t=P(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function i(n){t.manager.emit(n,e)}n<8&&i(t.options.event+Re(n)),i(t.options.event),e.additionalEvent&&i(e.additionalEvent),n>=8&&i(t.options.event+Re(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=Pe},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=o({},e);if(!b(this.options.enable,[this,t]))return this.reset(),void(this.state=Pe);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},g(Me,Te,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,i=6&t,r=this.attrTest(e);return i&&(8&n||!r)?16|t:i||r?4&n?8|t:2&t?4|t:2:Pe}}),g(De,Me,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(Ee),e&L&&t.push(we),t},directionTest:function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,a=e.deltaY;return r&t.direction||(6&t.direction?(r=0===o?1:o<0?2:4,n=o!=this.pX,i=Math.abs(e.deltaX)):(r=0===a?1:a<0?8:16,n=a!=this.pY,i=Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},attrTest:function(e){return Me.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Ae(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),g(Be,Me,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),g(je,Te,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[be]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime>t.time;if(this._input=e,!i||!n||12&e.eventType&&!r)this.reset();else if(1&e.eventType)this.reset(),this._timer=l((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return Pe},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}}),g(Oe,Me,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),g(Ne,Me,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return De.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:n&L&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&p(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=Ae(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),g(Le,Te,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[xe]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(i&&r&&n){if(4!=e.eventType)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||q(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&o?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=l((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return Pe},failTimeout:function(){return this._timer=l((function(){this.state=Pe}),this.options.interval,this),Pe},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Ie.VERSION="2.0.7",Ie.defaults={domEvents:!1,touchAction:ye,enable:!0,inputTarget:null,inputClass:null,preset:[[Oe,{enable:!1}],[Be,{enable:!1},["rotate"]],[Ne,{direction:6}],[De,{direction:6},["swipe"]],[Le],[Le,{event:"doubletap",taps:2},["tap"]],[je]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function ze(e,t){var n;this.options=o({},Ie.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(B?ne:j?ue:D?de:Z))(n,$),this.touchAction=new Ce(this,this.options.touchAction),Fe(this,!0),h(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function Fe(e,t){var n,i=e.element;i.style&&(h(e.options.cssProps,(function(r,o){n=A(i.style,o),t?(e.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}ze.prototype={set:function(e){return o(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var i=this.recognizers,r=t.curRecognizer;(!r||r&&8&r.state)&&(r=t.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===t.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&14&n.state&&(r=t.curRecognizer=n),o++}},get:function(e){if(e instanceof Te)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(d(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(d(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=P(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==r&&t!==r){var n=this.handlers;return h(C(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==r){var n=this.handlers;return h(C(e),(function(e){t?n[e]&&n[e].splice(P(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var i=n.createEvent("Event");i.initEvent(e,!0,!0),i.gesture=t,t.target.dispatchEvent(i)}(e,t);var i=this.handlers[e]&&this.handlers[e].slice();if(i&&i.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<i.length;)i[r](t),r++}},destroy:function(){this.element&&Fe(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},o(Ie,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:Pe,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:L,DIRECTION_ALL:30,Manager:ze,Input:F,TouchAction:Ce,TouchInput:ue,MouseInput:Z,PointerEventInput:ne,TouchMouseInput:de,SingleTouchInput:ae,Recognizer:Te,AttrRecognizer:Me,Tap:Le,Pan:De,Swipe:Ne,Pinch:Be,Rotate:Oe,Press:je,on:_,off:w,each:h,merge:v,extend:m,assign:o,inherit:g,bindFn:y,prefixed:A}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=Ie,e.exports?e.exports=Ie:t.Hammer=Ie}(window,document)})),Da=["mousedown","mouseup","mouseover","mouseout","click","dblclick"];function Ba(e,t){return t.get(e,!1)}function ja(e){e.preventDefault(),"function"==typeof e.stopPropagation?e.stopPropagation():e.srcEvent&&"function"==typeof e.srcEvent.stopPropagation&&e.srcEvent.stopPropagation(),"function"==typeof e.stopImmediatePropagation&&e.stopImmediatePropagation()}function Oa(e){function t(t){setTimeout((function(){E(Da,(function(t){pe.unbind(e,t,ja,!0)}))}),500)}pe.bind(e,"touchstart",(function(t){E(Da,(function(t){pe.bind(e,t,ja,!0)}))}),!0),pe.bind(e,"touchend",t,!0),pe.bind(e,"touchcancel",t,!0);var n=new Ma.Manager(e,{inputClass:Ma.TouchInput,recognizers:[],domEvents:!0}),i=new Ma.Tap,r=new Ma.Pan({threshold:10}),o=new Ma.Press,a=new Ma.Pinch,s=new Ma.Tap({event:"doubletap",taps:2});return a.requireFailure(r),a.requireFailure(o),n.add([r,o,a,s,i]),n.reset=function(e){var t=this.recognizers,i=this.session;i.stopped||(n.stop(e),setTimeout((function(){var e,n;for(e=0;n=t[e];e++)n.reset(),n.state=8;i.curRecognizer=null}),0))},n.on("hammer.input",(function(e){e.srcEvent.defaultPrevented&&n.reset(!0)})),n}function Na(e,t,n,i,r){var o,a=Ba("dragging",e),s=Ba("move",e),c=Ba("contextPad",e),p=Ba("palette",e);function u(e){return function(t){r.fire(e,t)}}function l(e){return oe(e,"svg, .djs-element",!0)}function d(e){function n(e){var n=l(e.target),r=n&&i.get(n);if(s&&t.getRootElement()!==r)return s.start(e,r,!0);!function(e){var n=0,i=0;function r(e){var r=e.deltaX-n,o=e.deltaY-i;t.scroll({dx:r,dy:o}),n=e.deltaX,i=e.deltaY}function a(e){o.off("panmove",r),o.off("panend",a),o.off("pancancel",a)}o.on("panmove",r),o.on("panend",a),o.on("pancancel",a)}()}(o=Oa(e)).on("doubletap",u("element.dblclick")),o.on("tap",u("element.click")),o.on("panstart",n),o.on("press",n),o.on("pinchstart",(function(e){var n=t.zoom(),i=e.center;function r(e){var r=1-(1-e.scale)/1.5,o=Math.max(.2,Math.min(4,r*n));t.zoom(o,i),ja(e)}function a(e){o.off("pinchmove",r),o.off("pinchend",a),o.off("pinchcancel",a),o.reset(!0)}o.on("pinchmove",r),o.on("pinchend",a),o.on("pinchcancel",a)}))}a&&n.on("drag.move",(function(e){var t=e.originalEvent;if(t&&!(t instanceof MouseEvent)){var n=Ao(t),r=l(document.elementFromPoint(n.x,n.y)),o=r&&i.get(r);o!==e.hover&&(e.hover&&a.out(e),o&&(a.hover({element:o,gfx:r}),e.hover=o,e.hoverGfx=r))}})),c&&n.on("contextPad.create",(function(e){var t=Oa(e.pad.html);t.on("panstart",(function(e){c.trigger("dragstart",e,!0)})),t.on("press",(function(e){c.trigger("dragstart",e,!0)})),t.on("tap",(function(e){c.trigger("click",e)}))})),p&&n.on("palette.create",(function(e){var t=Oa(e.container);t.on("panstart",(function(e){p.trigger("dragstart",e,!0)})),t.on("press",(function(e){p.trigger("dragstart",e,!0)})),t.on("tap",(function(e){p.trigger("click",e)}))})),n.on("canvas.init",(function(e){d(e.svg)}))}function La(e,t){var n=this;t.on("canvas.init",(function(e){n.addBBoxMarker(e.svg)}))}Na.$inject=["injector","canvas","eventBus","elementRegistry","interactionEvents","touchFix"],La.$inject=["canvas","eventBus"],La.prototype.addBBoxMarker=function(e){var t={fill:"none",class:"outer-bound-marker"},n=Le("rect");Se(n,{x:-1e4,y:1e4,width:10,height:10}),Se(n,t),_e(e,n);var i=Le("rect");Se(i,{x:1e4,y:1e4,width:10,height:10}),Se(i,t),_e(e,i)};var Ia={__depends__:[{__depends__:[Lo],__init__:["touchInteractionEvents"],touchInteractionEvents:["type",Na],touchFix:["type",La]}]};function za(e){return e&&e[e.length-1]}function Fa(e){return e.y}function $a(e){return e.x}var Va={left:$a,center:$a,right:function(e){return e.x+e.width},top:Fa,middle:Fa,bottom:function(e){return e.y+e.height}};function Ha(e){this._modeling=e}Ha.$inject=["modeling"],Ha.prototype._getOrientationDetails=function(e){var t="x",n="width";return-1!==["top","bottom","middle"].indexOf(e)&&(t="y",n="height"),{axis:t,dimension:n}},Ha.prototype._isType=function(e,t){return-1!==t.indexOf(e)},Ha.prototype._alignmentPosition=function(e,t){var n,i,r,o=this._getOrientationDetails(e),a=o.axis,s=o.dimension,c={},p={},u=!1;if(this._isType(e,["left","top"]))c[e]=t[0][a];else if(this._isType(e,["right","bottom"]))r=za(t),c[e]=r[a]+r[s];else if(this._isType(e,["center","middle"])){if(E(t,(function(e){var t=e[a]+Math.round(e[s]/2);p[t]?p[t].elements.push(e):p[t]={elements:[e],center:t}})),n=O(p,(function(e){return e.elements.length>1&&(u=!0),e.elements.length})),u)return c[e]=za(n).center,c;i=t[0],r=za(t=O(t,(function(e){return e[a]+e[s]}))),c[e]=function(e,t){return Math.round((e[a]+t[a]+t[s])/2)}(i,r)}return c},Ha.prototype.trigger=function(e,t){var n=this._modeling,i=w(e,(function(e){return!(e.waypoints||e.host||e.labelTarget)}));if(!(i.length<2)){var r=O(i,Va[t]),o=this._alignmentPosition(t,r);n.alignElements(r,o)}};var Ga={__init__:["alignElements"],alignElements:["type",Ha]};function Wa(e,t,n,i){for(var r;r=Ua(e,n,t);)n=i(t,n,r);return n}function qa(e){return function(t,n,i){var r={x:n.x,y:n.y};return["x","y"].forEach((function(o){var a=e[o];if(a){var s="x"===o?"width":"height",c=a.margin,p=a.minDistance;r[o]=c<0?Math.min(i[o]+c-t[s]/2,n[o]-p+c):Math.max(i[o]+i[s]+c+t[s]/2,n[o]+p+c)}})),r}}function Ua(e,t,n){var i={x:t.x-n.width/2,y:t.y-n.height/2,width:n.width,height:n.height};return x(function(e){var t=Ya(e);e.host&&(t=t.concat(Ya(e.host)));e.attachers&&(t=t.concat(e.attachers.reduce((function(e,t){return e.concat(Ya(t))}),[])));return t}(e),(function(e){return e!==n&&"intersect"===vn(e,i,10)}))}function Ya(e){return(t=e,t.outgoing.map((function(e){return e.target}))).concat(function(e){return e.incoming.map((function(e){return e.source}))}(e));var t}function Ka(){return!0}function Xa(e,t,n){e.on("autoPlace",100,(function(e){var t=e.shape;return function(e,t,n){n||(n={});var i=n.defaultDistance||50,r=mn(e);return{x:hn(e).right+i+t.width/2,y:r.y}}(e.source,t)})),e.on("autoPlace.end",(function(e){n.scrollToElement(e.shape)})),this.append=function(n,i,r){e.fire("autoPlace.start",{source:n,shape:i});var o=e.fire("autoPlace",{source:n,shape:i}),a=t.appendShape(n,i,o,n.parent,r);return e.fire("autoPlace.end",{source:n,shape:a}),a}}function Za(e,t){e.on("autoPlace.end",500,(function(e){t.select(e.shape)}))}Xa.$inject=["eventBus","modeling","canvas"],Za.$inject=["eventBus","selection"];var Qa={__init__:["autoPlaceSelectionBehavior"],autoPlace:["type",Xa],autoPlaceSelectionBehavior:["type",Za]};function Ja(e,t){return T(t,(function(t){return jr(e,t)}))}function es(e,t){for("string"==typeof t&&(t=[t]);e=e.parent;)if(Ja(e,t))return e;return null}var ts=Object.freeze({__proto__:null,isAny:Ja,getParent:es});function ns(e,t){return jr(t,"bpmn:TextAnnotation")?function(e,t){var n=hn(e),i={x:n.right+t.width/2,y:n.top-50-t.height/2};return Wa(e,t,i,qa({y:{margin:-30,minDistance:20}}))}(e,t):Ja(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])?function(e,t){var n=hn(e),i={x:n.right-10+t.width/2,y:n.bottom+40+t.width/2};return Wa(e,t,i,qa({x:{margin:30,minDistance:30}}))}(e,t):jr(t,"bpmn:FlowNode")?function(e,t){var n=hn(e),i=mn(e),r=function(e,t){t||(t={});var n=t.defaultDistance||50,i=t.direction||"e",r=t.filter,o=t.getWeight||function(t){return t.source===e?1:-1},a=t.maxDistance||250,s=t.reference||"start";function c(e,t){return"n"===i?"start"===s?hn(e).top-hn(t).bottom:"center"===s?hn(e).top-mn(t).y:hn(e).top-hn(t).top:"w"===i?"start"===s?hn(e).left-hn(t).right:"center"===s?hn(e).left-mn(t).x:hn(e).left-hn(t).left:"s"===i?"start"===s?hn(t).top-hn(e).bottom:"center"===s?mn(t).y-hn(e).bottom:hn(t).bottom-hn(e).bottom:"start"===s?hn(t).left-hn(e).right:"center"===s?mn(t).x-hn(e).right:hn(t).right-hn(e).right}r||(r=Ka);var p=e.incoming.filter(r).map((function(t){var n=o(t),i=n<0?c(t.source,e):c(e,t.source);return{id:t.source.id,distance:i,weight:n}})),u=e.outgoing.filter(r).map((function(t){var n=o(t),i=n>0?c(e,t.target):c(t.target,e);return{id:t.target.id,distance:i,weight:n}}));return C(p.concat(u).reduce((function(e,t){return e[t.id+"__weight_"+t.weight]=t,e}),{}),(function(e,t){var n=t.distance,i=t.weight;return n<0||n>a||(e[String(n)]||(e[String(n)]=0),e[String(n)]+=1*i,(!e.distance||e[e.distance]<e[String(n)])&&(e.distance=n)),e}),{}).distance||n}(e,{filter:function(e){return jr(e,"bpmn:SequenceFlow")}}),o=30,a=80,s="left";jr(e,"bpmn:BoundaryEvent")&&-1!==(s=vn(e,e.host,-25)).indexOf("top")&&(o*=-1);var c={x:n.right+r+t.width/2,y:i.y+is(s,a)};return Wa(e,t,c,qa({y:{margin:o,minDistance:a}}))}(e,t):void 0}function is(e,t){return-1!=e.indexOf("top")?-1*t:-1!=e.indexOf("bottom")?t:0}function rs(e){e.on("autoPlace",(function(e){var t=e.shape;return ns(e.source,t)}))}rs.$inject=["eventBus"];var os={__depends__:[Qa],__init__:["bpmnAutoPlace"],bpmnAutoPlace:["type",rs]};function as(e){this._eventBus=e}as.$inject=["eventBus"],as.prototype.on=function(e,t,n,i,r,o){if((v(t)||m(t))&&(o=r,r=i,i=n,n=t,t=null),v(n)&&(o=r,r=i,i=n,n=1e3),f(r)&&(o=r,r=!1),!v(i))throw new Error("handlerFn must be a function");h(e)||(e=[e]);var a=this._eventBus;E(e,(function(e){var s=["commandStack",e,t].filter((function(e){return e})).join(".");a.on(s,n,r?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(i,o):i,o)}))};function ss(e,t,n,i){as.call(this,e),this._elementRegistry=t,this._modeling=n,this._rules=i;var r=this;this.postExecuted(["shape.create"],(function(e){var t=e.context,n=t.hints||{},i=t.shape,o=t.parent||t.newParent;!1!==n.autoResize&&r._expand([i],o)})),this.postExecuted(["elements.move"],(function(e){var t=e.context,n=s(M(t.closure.topLevel)),i=t.hints,o=!i||i.autoResize;!1!==o&&E(D(n,(function(e){return e.parent.id})),(function(e,t){h(o)&&(e=e.filter((function(e){return x(o,N({id:e.id}))}))),r._expand(e,t)}))})),this.postExecuted(["shape.toggleCollapse"],(function(e){var t=e.context,n=t.hints,i=t.shape;n&&!1===n.autoResize||i.collapsed||r._expand(i.children||[],i)})),this.postExecuted(["shape.resize"],(function(e){var t=e.context,n=t.hints,i=t.shape,o=i.parent;n&&!1===n.autoResize||o&&r._expand([i],o)}))}function cs(e){e.invoke(ss,this)}function ps(e){as.call(this,e),this.init()}function us(e){ps.call(this,e);var t=this;this.addRule("element.autoResize",(function(e){return t.canResize(e.elements,e.target)}))}function ls(e,t){us.call(this,e),this._modeling=t}E(["canExecute","preExecute","preExecuted","execute","executed","postExecute","postExecuted","revert","reverted"],(function(e){as.prototype[e]=function(t,n,i,r,o){(v(t)||m(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}})),ss.$inject=["eventBus","elementRegistry","modeling","rules"],i(ss,as),ss.prototype._getOptimalBounds=function(e,t){var n=this.getOffset(t),i=this.getPadding(t),r=hn(mt(e)),o=hn(t),a={};return r.top-o.top<i.top&&(a.top=r.top-n.top),r.left-o.left<i.left&&(a.left=r.left-n.left),o.right-r.right<i.right&&(a.right=r.right+n.right),o.bottom-r.bottom<i.bottom&&(a.bottom=r.bottom+n.bottom),fn(G({},o,a))},ss.prototype._expand=function(e,t){if("string"==typeof t&&(t=this._elementRegistry.get(t)),this._rules.allowed("element.autoResize",{elements:e,target:t})){var n=this._getOptimalBounds(e,t);if(function(e,t){return e.x!==t.x||e.y!==t.y||e.width!==t.width||e.height!==t.height}(n,t)){var i=function(e,t){var n="";e=hn(e),t=hn(t),e.top>t.top&&(n=n.concat("n"));e.right<t.right&&(n=n.concat("w"));e.bottom<t.bottom&&(n=n.concat("s"));e.left>t.left&&(n=n.concat("e"));return n}(W(t,["x","y","width","height"]),n);this.resize(t,n,{autoResize:i});var r=t.parent;r&&this._expand([t],r)}}},ss.prototype.getOffset=function(e){return{top:60,bottom:60,left:100,right:100}},ss.prototype.getPadding=function(e){return{top:2,bottom:2,left:15,right:15}},ss.prototype.resize=function(e,t,n){this._modeling.resizeShape(e,t,null,n)},cs.$inject=["injector"],i(cs,ss),cs.prototype.resize=function(e,t,n){jr(e,"bpmn:Participant")?this._modeling.resizeLane(e,t,null,n):this._modeling.resizeShape(e,t,null,n)},ps.$inject=["eventBus"],i(ps,as),ps.prototype.addRule=function(e,t,n){var i=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){i.canExecute(e,t,(function(e,t,i){return n(e)}),!0)}))},ps.prototype.init=function(){},us.$inject=["eventBus"],i(us,ps),us.prototype.canResize=function(e,t){return!1},i(ls,us),ls.$inject=["eventBus","modeling"],ls.prototype.canResize=function(e,t){if(!jr(t,"bpmn:Participant")&&!jr(t,"bpmn:Lane")&&!jr(t,"bpmn:SubProcess"))return!1;var n=!0;return E(e,(function(e){(jr(e,"bpmn:Lane")||e.labelTarget)&&(n=!1)})),n};var ds={__init__:["bpmnAutoResize","bpmnAutoResizeProvider"],bpmnAutoResize:["type",cs],bpmnAutoResizeProvider:["type",ls]};function hs(e,t,n){var i,r,o=this,a=n.get("dragging",!1);a&&t.on("drag.start",(function(n){t.once("drag.move",1500,(function(t){!function(t){if(!t.hover){var n=t.originalEvent,i=o._findTargetGfx(n),r=i&&e.get(i);i&&r&&(t.stopPropagation(),a.hover({element:r,gfx:i}),a.move(n))}}(t)}))})),t.on("element.hover",(function(e){i=e.gfx,r=e.element})),t.on("element.hover",1500,(function(e){r&&t.fire("element.out",{element:r,gfx:i})})),t.on("element.out",(function(){i=null,r=null})),this._findTargetGfx=function(e){var t;if(e instanceof MouseEvent)return t=Ao(e),function(e){return oe(e,"svg, .djs-element",!0)}(document.elementFromPoint(t.x,t.y))}}hs.$inject=["elementRegistry","eventBus","injector"];var fs={__init__:["hoverFix"],hoverFix:["type",hs]},ms=Math.round,vs="djs-drag-active";function gs(e){e.preventDefault()}function ys(e,t,n,i){var r,o={threshold:5,trapClick:!0};function a(e){var n=t.viewbox(),i=t._container.getBoundingClientRect();return{x:n.x+(e.x-i.left)/n.scale,y:n.y+(e.y-i.top)/n.scale}}function s(t,n){n=n||r;var i=e.createEvent(G({},n.payload,n.data,{isTouch:n.isTouch}));return!1!==e.fire("drag."+t,i)&&e.fire(n.prefix+"."+t,i)}function c(e,i){var o,c=r.payload,p=r.displacement,u=r.globalStart,l=Ao(e),d=_a(l,u),h=r.localStart,f=a(l),v=_a(f,h);if(!r.active&&(i||(o=d,Math.sqrt(Math.pow(o.x,2)+Math.pow(o.y,2))>r.threshold))){if(G(c,{x:ms(h.x+p.x),y:ms(h.y+p.y),dx:0,dy:0},{originalEvent:e}),!1===s("start"))return m();r.active=!0,r.keepSelection||(c.previousSelection=n.get(),n.select(null)),r.cursor&&ga(r.cursor),t.addMarker(t.getRootElement(),vs)}Ro(e),r.active&&(G(c,{x:ms(f.x+p.x),y:ms(f.y+p.y),dx:ms(v.x),dy:ms(v.y)},{originalEvent:e}),s("move"))}function p(e){var t=!0;r.active&&(e&&(r.payload.originalEvent=e,Ro(e)),t=s("end")),!1===t&&s("rejected"),s("ended",v(!0!==t))}function u(e){27===e.which&&(gs(e),m())}function l(t){var n;r.active&&(n=ba(e),setTimeout(n,400),gs(t)),p(t)}function d(e){c(e)}function h(e){var t=r.payload;t.hoverGfx=e.gfx,t.hover=e.element,s("hover")}function f(e){s("out");var t=r.payload;t.hoverGfx=null,t.hover=null}function m(e){var t;if(r){var n=r.active;n&&s("cancel"),t=v(e),n&&s("canceled",t)}}function v(o){var a,v;s("cleanup"),ya(),v=r.trapClick?l:p,pe.unbind(document,"mousemove",c),pe.unbind(document,"dragstart",gs),pe.unbind(document,"selectstart",gs),pe.unbind(document,"mousedown",v,!0),pe.unbind(document,"mouseup",v,!0),pe.unbind(document,"keyup",u),pe.unbind(document,"touchstart",d,!0),pe.unbind(document,"touchcancel",m,!0),pe.unbind(document,"touchmove",c,!0),pe.unbind(document,"touchend",p,!0),e.off("element.hover",h),e.off("element.out",f),t.removeMarker(t.getRootElement(),vs);var g=r.payload.previousSelection;return!1!==o&&g&&!n.get().length&&function(e){var t=e.filter((function(e){return i.get(e.id)}));t.length&&n.select(t)}(g),a=r,r=null,a}e.on("diagram.destroy",m),this.init=function(t,n,i,v){r&&m(!1),"string"==typeof n&&(v=i,i=n,n=null);var g,y,b,x,_,w=(v=G({},o,v||{})).data||{};x=v.trapClick?l:p,t?(g=To(t)||t,y=Ao(t),Ro(t),"dragstart"===g.type&&gs(g)):(g=null,y={x:0,y:0}),b=a(y),n||(n=b),_=function(e){return"undefined"!=typeof TouchEvent&&e instanceof TouchEvent}(g),r=G({prefix:i,data:w,payload:{},globalStart:y,displacement:_a(n,b),localStart:b,isTouch:_},v),v.manual||(_?(pe.bind(document,"touchstart",d,!0),pe.bind(document,"touchcancel",m,!0),pe.bind(document,"touchmove",c,!0),pe.bind(document,"touchend",p,!0)):(pe.bind(document,"mousemove",c),pe.bind(document,"dragstart",gs),pe.bind(document,"selectstart",gs),pe.bind(document,"mousedown",x,!0),pe.bind(document,"mouseup",x,!0)),pe.bind(document,"keyup",u),e.on("element.hover",h),e.on("element.out",f)),s("init"),v.autoActivate&&c(t,!0)},this.move=c,this.hover=h,this.out=f,this.end=p,this.cancel=m,this.context=function(){return r},this.setOptions=function(e){G(o,e)}}ys.$inject=["eventBus","canvas","selection","elementRegistry"];var bs={__depends__:[fs,qo],dragging:["type",ys]};function xs(e,t,n){this._canvas=n,this._opts=G({scrollThresholdIn:[20,20,20,20],scrollThresholdOut:[0,0,0,0],scrollRepeatTimeout:15,scrollStep:10},e);var i=this;t.on("drag.move",(function(e){var t=i._toBorderPoint(e);i.startScroll(t)})),t.on(["drag.cleanup"],(function(){i.stopScroll()}))}function _s(e,t,n){return t<e&&e<n}xs.$inject=["config.autoScroll","eventBus","canvas"],xs.prototype.startScroll=function(e){var t=this._canvas,n=this._opts,i=this,r=t.getContainer().getBoundingClientRect(),o=[e.x,e.y,r.width-e.x,r.height-e.y];this.stopScroll();for(var a=0,s=0,c=0;c<4;c++)_s(o[c],n.scrollThresholdOut[c],n.scrollThresholdIn[c])&&(0===c?a=n.scrollStep:1==c?s=n.scrollStep:2==c?a=-n.scrollStep:3==c&&(s=-n.scrollStep));0===a&&0===s||(t.scroll({dx:a,dy:s}),this._scrolling=setTimeout((function(){i.startScroll(e)}),n.scrollRepeatTimeout))},xs.prototype.stopScroll=function(){clearTimeout(this._scrolling)},xs.prototype.setOptions=function(e){this._opts=G({},this._opts,e)},xs.prototype._toBorderPoint=function(e){var t=this._canvas._container.getBoundingClientRect(),n=Ao(e.originalEvent);return{x:n.x-t.left,y:n.y-t.top}};var ws={__depends__:[bs],__init__:["autoScroll"],autoScroll:["type",xs]};function Es(e){this._commandStack=e.get("commandStack",!1)}Es.$inject=["injector"],Es.prototype.allowed=function(e,t){var n=!0,i=this._commandStack;return i&&(n=i.canExecute(e,t)),void 0===n||n};var Ss={__init__:["rules"],rules:["type",Es]},Cs=Math.round,Ps=Math.max;function Ts(e,t){return function(e,t){var n,i;for(n=0;i=e[n];n++)if(Ct(i,t)<=10)return{point:e[n],bendpoint:!0,index:n};return null}(e,t)||function(e,t){var n,i,r=un(function(e,t){return[["M",e.x,e.y],["m",0,-t],["a",t,t,0,1,1,0,2*t],["a",t,t,0,1,1,0,-2*t],["z"]]}(t,10),(n=[],e.forEach((function(e,t){n.push([0===t?"M":"L",e.x,e.y])})),n)),o=r[0],a=r[r.length-1];return o?o!==a?o.segment2!==a.segment2?{point:e[i=Ps(o.segment2,a.segment2)-1],bendpoint:!0,index:i}:{point:{x:Cs(o.x+a.x)/2,y:Cs(o.y+a.y)/2},index:o.segment2}:{point:{x:Cs(o.x),y:Cs(o.y)},index:o.segment2}:null}(e,t)}var Rs="djs-bendpoint",As="djs-segment-dragger";function ks(e,t,n){return Ts(t,function(e,t){var n,i=Ao(t),r=e._container.getBoundingClientRect();n={x:r.left,y:r.top};var o=e.viewbox();return{x:o.x+(i.x-n.x)/o.scale,y:o.y+(i.y-n.y)/o.scale}}(e,n))}function Ms(e,t){var n=Le("g");Ae(n).add(Rs),_e(e,n);var i=Le("circle");Se(i,{cx:0,cy:0,r:4}),Ae(i).add("djs-visual"),_e(n,i);var r=Le("circle");return Se(r,{cx:0,cy:0,r:10}),Ae(r).add("djs-hit"),_e(n,r),t&&Ae(n).add(t),n}function Ds(e,t,n,i){var r=Le("g");_e(e,r);var o=function(e,t,n){var i=t.x-e.x,r=t.y-e.y;return js("h"===n?i:r)}
8
- /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */(t,n,i),a=Le("rect");Se(a,{x:-7,y:-1.5,width:14,height:3}),Ae(a).add("djs-visual"),_e(r,a);var s=Le("rect");return Se(s,{x:-o/2,y:-7,width:o,height:14}),Ae(s).add("djs-hit"),_e(r,s),Zn(r,"v"===i?90:0),r}function Bs(e,t,n){var i=Le("g"),r=At(t,n),o=Tt(t,n);return _e(e,i),Ds(i,t,n,o),Ae(i).add(As),Ae(i).add("h"===o?"horizontal":"vertical"),Xn(i,r.x,r.y),i}function js(e){return Math.abs(Math.round(2*e/3))}var Os=n((function(t,n){!function(e,n){t.exports=function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var t=function(e){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var t,n=String(e),i=n.length,r=-1,o="",a=n.charCodeAt(0);++r<i;)0!=(t=n.charCodeAt(r))?o+=t>=1&&t<=31||127==t||0==r&&t>=48&&t<=57||1==r&&t>=48&&t<=57&&45==a?"\\"+t.toString(16)+" ":(0!=r||1!=i||45!=t)&&(t>=128||45==t||95==t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122)?n.charAt(r):"\\"+n.charAt(r):o+="�";return o};e.CSS||(e.CSS={});return e.CSS.escape=t,t}(e)}(e)})),Ns={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ls(e){return(e=""+e)&&e.replace(/[&<>"']/g,(function(e){return Ns[e]}))}function Is(e,t,n,i,r){function o(e,n){var o=n.waypoints,a=ks(t,o,e);if(a)return!function(e,t,n){var i,r,o,a,s,c,p=e.index,u=e.point;return!(p<=0||e.bendpoint)&&(o=At(i=t[p-1],r=t[p]),a=Tt(i,r),s=Math.abs(u.x-o.x),c=Math.abs(u.y-o.y),a&&s<=n&&c<=n)}(a,o,function(e,t){var n,i,r=e.waypoints;return t.index<=0||t.bendpoint?null:(i=Tt((n={start:r[t.index-1],end:r[t.index]}).start,n.end))?js("h"===i?n.end.x-n.start.x:n.end.y-n.start.y)/2:null}(n,a))?i.start(e,n,a.index,!a.bendpoint):r.start(e,n,a.index),!0}function a(e,t,i){pe.bind(e,t,(function(e){n.triggerMouseEvent(t,e,i),e.stopPropagation()}))}function s(e,n){var i=t.getLayer("overlays"),r=ve('.djs-bendpoints[data-element-id="'+Os(e.id)+'"]',i);return!r&&n&&(Se(r=Le("g"),{"data-element-id":e.id}),Ae(r).add("djs-bendpoints"),_e(i,r),a(r,"mousedown",e),a(r,"click",e),a(r,"dblclick",e)),r}function c(e,t){return ve('.djs-segment-dragger[data-segment-idx="'+e+'"]',t)}function p(e,t){t.waypoints.forEach((function(t,n){var i=Ms(e);_e(e,i),Xn(i,t.x,t.y)})),Ms(e,"floating")}function u(e,t){for(var n,i,r,o=t.waypoints,s=1;s<o.length;s++)Tt(n=o[s-1],i=o[s])&&(Se(r=Bs(e,n,i),{"data-segment-idx":s}),a(r,"mousemove",t))}function l(e){var t=s(e);return t||(p(t=s(e,!0),e),u(t,e)),t}function d(e){var t=s(e);t&&(!function(e){E(ge(".djs-segment-dragger",e),(function(e){Me(e)}))}(t),function(e){E(ge(".djs-bendpoint",e),(function(e){Me(e)}))}(t),u(t,e),p(t,e))}function h(e,t,n){var i,r,o=c(t.index,e),a=n[t.index-1],s=n[t.index],p=t.point,u=At(a,s),l=Tt(a,s);o&&(i=function(e){return ve(".djs-visual",e)}(o),r={x:p.x-u.x,y:p.y-u.y},"v"===l&&(r={x:r.y,y:r.x}),Xn(i,r.x,r.y))}e.on("connection.changed",(function(e){d(e.element)})),e.on("connection.remove",(function(e){var t=s(e.element);t&&Me(t)})),e.on("element.marker.update",(function(e){var t,n=e.element;n.waypoints&&(t=l(n),e.add?Ae(t).add(e.marker):Ae(t).remove(e.marker))})),e.on("element.mousemove",(function(e){var n,i,r=e.element,o=r.waypoints;if(o){if(n=s(r,!0),!(i=ks(t,o,e.originalEvent)))return;!function(e,t){var n=ve(".floating",e),i=t.point;n&&Xn(n,i.x,i.y)}(n,i),i.bendpoint||h(n,i,o)}})),e.on("element.mousedown",(function(e){if(Mo(e)){var t=e.originalEvent,n=e.element;if(n.waypoints)return o(t,n)}})),e.on("selection.changed",(function(e){var t=e.newSelection[0];t&&t.waypoints&&l(t)})),e.on("element.hover",(function(e){var t=e.element;t.waypoints&&(l(t),n.registerEvent(e.gfx,"mousemove","element.mousemove"))})),e.on("element.out",(function(e){n.unregisterEvent(e.gfx,"mousemove","element.mousemove")})),e.on("element.updateId",(function(e){var t=e.element,n=e.newId;if(t.waypoints){var i=s(t);i&&Se(i,{"data-element-id":n})}})),this.addHandles=l,this.updateHandles=d,this.getBendpointsContainer=s,this.getSegmentDragger=c}Is.$inject=["eventBus","canvas","interactionEvents","bendpointMove","connectionSegmentMove"];var zs=Math.round,Fs="reconnectStart",$s="reconnectEnd",Vs="updateWaypoints";function Hs(e,t,n,i,r,o){this._injector=e,this.start=function(e,t,o,a){var s,c=n.getGraphics(t),p=t.source,u=t.target,l=t.waypoints,d=(s=a||0!==o?a||o!==l.length-1?Vs:$s:Fs)===Vs?"connection.updateWaypoints":"connection.reconnect",h=r.allowed(d,{connection:t,source:p,target:u});!1===h&&(h=r.allowed(d,{connection:t,source:u,target:p})),!1!==h&&i.init(e,"bendpoint.move",{data:{connection:t,connectionGfx:c,context:{allowed:h,bendpointIndex:o,connection:t,source:p,target:u,insert:a,type:s}}})},t.on("bendpoint.move.hover",(function(e){var t,n=e.context,i=n.connection,o=i.source,a=i.target,s=e.hover,c=n.type;if(n.hover=s,s){var p=c===Vs?"connection.updateWaypoints":"connection.reconnect";if(t=n.allowed=r.allowed(p,{connection:i,source:c===Fs?s:o,target:c===$s?s:a}))return n.source=c===Fs?s:o,void(n.target=c===$s?s:a);!1===t&&(t=n.allowed=r.allowed(p,{connection:i,source:c===$s?s:a,target:c===Fs?s:o})),t&&(n.source=c===$s?s:a,n.target=c===Fs?s:o)}})),t.on(["bendpoint.move.out","bendpoint.move.cleanup"],(function(e){var t=e.context,n=t.type;t.hover=null,t.source=null,t.target=null,n!==Vs&&(t.allowed=!1)})),t.on("bendpoint.move.end",(function(e){var t=e.context,n=t.allowed,i=t.bendpointIndex,r=t.connection,a=t.insert,s=r.waypoints.slice(),c=t.source,p=t.target,u=t.type,l=t.hints||{},d={x:zs(e.x),y:zs(e.y)};if(!n)return!1;u===Vs?(a?s.splice(i,0,d):s[i]=d,l.bendpointMove={insert:a,bendpointIndex:i},s=this.cropWaypoints(r,s),o.updateWaypoints(r,function(e){e=e.slice();for(var t,n,i,r=0;e[r];)t=e[r],n=e[r-1],0===Ct(t,i=e[r+1])||Pt(n,i,t)?e.splice(r,1):r++;return e}(s),l)):(u===Fs?(l.docking="source",Gs(t)&&(l.docking="target",l.newWaypoints=s.reverse())):u===$s&&(l.docking="target",Gs(t)&&(l.docking="source",l.newWaypoints=s.reverse())),o.reconnect(r,c,p,d,l))}),this)}function Gs(e){var t=e.hover,n=e.source,i=e.target,r=e.type;return r===Fs?t&&i&&t===i&&n!==i:r===$s?t&&n&&t===n&&n!==i:void 0}Hs.$inject=["injector","eventBus","canvas","dragging","rules","modeling"],Hs.prototype.cropWaypoints=function(e,t){var n=this._injector.get("connectionDocking",!1);if(!n)return t;var i=e.waypoints;return e.waypoints=t,e.waypoints=n.getCroppedWaypoints(e),t=e.waypoints,e.waypoints=i,t};var Ws="updateWaypoints",qs="connect-ok",Us="connect-not-ok",Ys="connect-hover",Ks="djs-updating",Xs="djs-element-hidden";function Zs(e,t,n,i){this._injector=t;var r=t.get("connectionPreview",!1);n.on("bendpoint.move.start",(function(e){var t=e.context,n=t.bendpointIndex,r=t.connection,o=t.insert,a=r.waypoints,s=a.slice();t.waypoints=a,o&&s.splice(n,0,{x:e.x,y:e.y}),r.waypoints=s,Ae(t.draggerGfx=Ms(i.getLayer("overlays"))).add("djs-dragging"),i.addMarker(r,Xs),i.addMarker(r,Ks)})),n.on("bendpoint.move.hover",(function(e){var t=e.context,n=t.allowed,r=t.hover,o=t.type;if(r){if(i.addMarker(r,Ys),o===Ws)return;n?(i.removeMarker(r,Us),i.addMarker(r,qs)):!1===n&&(i.removeMarker(r,qs),i.addMarker(r,Us))}})),n.on(["bendpoint.move.out","bendpoint.move.cleanup"],1100,(function(e){var t=e.context,n=t.hover,r=t.target;n&&(i.removeMarker(n,Ys),i.removeMarker(n,r?qs:Us))})),n.on("bendpoint.move.move",(function(t){var n=t.context,i=n.allowed,o=n.bendpointIndex,a=n.draggerGfx,s=n.hover,c=n.type,p=n.connection,u=p.source,l=p.target,d=p.waypoints.slice(),h={x:t.x,y:t.y},f=n.hints||{},m={};r&&(f.connectionStart&&(m.connectionStart=f.connectionStart),f.connectionEnd&&(m.connectionEnd=f.connectionEnd),"reconnectStart"===c?Gs(n)?(m.connectionEnd=m.connectionEnd||h,m.source=l,m.target=s||u,d=d.reverse()):(m.connectionStart=m.connectionStart||h,m.source=s||u,m.target=l):"reconnectEnd"===c?Gs(n)?(m.connectionStart=m.connectionStart||h,m.source=s||l,m.target=u,d=d.reverse()):(m.connectionEnd=m.connectionEnd||h,m.source=u,m.target=s||l):(m.noCropping=!0,m.noLayout=!0,d[o]=h),c===Ws&&(d=e.cropWaypoints(p,d)),m.waypoints=d,r.drawPreview(n,i,m)),Xn(a,t.x,t.y)}),this),n.on(["bendpoint.move.end","bendpoint.move.cancel"],1100,(function(e){var t=e.context,n=t.connection,o=t.draggerGfx,a=t.hover,s=t.target,c=t.waypoints;n.waypoints=c,Me(o),i.removeMarker(n,Ks),i.removeMarker(n,Xs),a&&(i.removeMarker(a,qs),i.removeMarker(a,s?qs:Us)),r&&r.cleanUp(t)}))}Zs.$inject=["bendpointMove","injector","eventBus","canvas"];var Qs="connect-hover",Js="djs-updating";function ec(e,t,n){return tc(e,t,e[t]+n)}function tc(e,t,n){return{x:"x"===t?n:e.x,y:"y"===t?n:e.y}}function nc(e){return"x"===e?"y":"x"}function ic(e,t,n){var i,r;return e.original?e.original:(i=mn(t),tc(e,r=nc(n),i[r]))}function rc(e,t,n,i,r,o){var a=e.get("connectionDocking",!1);function s(e,t){if(!a)return t;var n,i=e.waypoints;return e.waypoints=t,n=a.getCroppedWaypoints(e),e.waypoints=i,n}function c(e){r.update("connection",e.connection,e.connectionGfx)}function p(e,t,n){var i=e.newWaypoints,r=function(e,t,n,i){var r=Math.max(t[i],n[i]),o=Math.min(t[i],n[i]);return tc(t,i,Math.min(Math.max(o+20,e[i]),r-20))}(n,i[e.segmentStartIndex+t],i[e.segmentEndIndex+t],nc(e.axis));Xn(e.draggerGfx,r.x,r.y)}this.start=function(e,t,r){var o,a,s,c,p=n.getGraphics(t),u=r-1,l=r,d=t.waypoints,h=d[u],f=d[l],m=ks(n,d,e);(a=Tt(h,f))&&(s="v"===a?"x":"y",0===u&&(h=ic(h,t.source,s)),l===d.length-1&&(f=ic(f,t.target,s)),o={connection:t,segmentStartIndex:u,segmentEndIndex:l,segmentStart:h,segmentEnd:f,axis:s,dragPosition:c=m?m.point:{x:(h.x+f.x)/2,y:(h.y+f.y)/2}},i.init(e,c,"connectionSegment.move",{cursor:"x"===s?"resize-ew":"resize-ns",data:{connection:t,connectionGfx:p,context:o}}))},t.on("connectionSegment.move.start",(function(e){var t=e.context,i=e.connection,r=n.getLayer("overlays");t.originalWaypoints=i.waypoints.slice(),t.draggerGfx=Bs(r,t.segmentStart,t.segmentEnd),Ae(t.draggerGfx).add("djs-dragging"),n.addMarker(i,Js)})),t.on("connectionSegment.move.move",(function(e){var t,n,i=e.context,r=i.connection,o=i.segmentStartIndex,a=i.segmentEndIndex,u=i.segmentStart,l=i.segmentEnd,d=i.axis,h=i.originalWaypoints.slice(),f=ec(u,d,e["d"+d]),m=ec(l,d,e["d"+d]),v=h.length,g=0;h[o]=f,h[a]=m,o<2&&(t=vn(r.source,f),1===o?"intersect"===t&&(h.shift(),h[0]=f,g--):"intersect"!==t&&(h.unshift(u),g++)),a>v-3&&(n=vn(r.target,m),a===v-2?"intersect"===n&&(h.pop(),h[h.length-1]=m):"intersect"!==n&&h.push(l)),i.newWaypoints=r.waypoints=s(r,h),p(i,g,e),i.newSegmentStartIndex=o+g,c(e)})),t.on("connectionSegment.move.hover",(function(e){e.context.hover=e.hover,n.addMarker(e.hover,Qs)})),t.on(["connectionSegment.move.out","connectionSegment.move.cleanup"],(function(e){var t=e.context.hover;t&&n.removeMarker(t,Qs)})),t.on("connectionSegment.move.cleanup",(function(e){var t=e.context,i=t.connection;t.draggerGfx&&Me(t.draggerGfx),n.removeMarker(i,Js)})),t.on(["connectionSegment.move.cancel","connectionSegment.move.end"],(function(e){var t=e.context;t.connection.waypoints=t.originalWaypoints,c(e)})),t.on("connectionSegment.move.end",(function(e){var t=e.context,n=t.connection,i=t.newWaypoints,r=t.newSegmentStartIndex,a=function(e,t){var n=0;return{waypoints:e.filter((function(i,r){return!Pt(e[r-1],e[r+1],i)||(n=r<=t?n-1:n,!1)})),segmentOffset:n}}(i=i.map((function(e){return{original:e.original,x:Math.round(e.x),y:Math.round(e.y)}})),r),c=s(n,a.waypoints),p=a.segmentOffset,u={segmentMove:{segmentStartIndex:t.segmentStartIndex,newSegmentStartIndex:r+p}};o.updateWaypoints(n,c,u)}))}rc.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","modeling"];var oc=Math.abs,ac=Math.round;function sc(e){return{x:e.x,y:e.y}}function cc(e){return{x:e.x+e.width,y:e.y+e.height}}function pc(e,t){return!e||isNaN(e.x)||isNaN(e.y)?t:{x:ac(e.x+e.width/2),y:ac(e.y+e.height/2)}}function uc(e,t){var n=e.snapped;return!!n&&("string"==typeof t?n[t]:n.x&&n.y)}function lc(e,t,n){if("string"!=typeof t)throw new Error("axis must be in [x, y]");if("number"!=typeof n&&!1!==n)throw new Error("value must be Number or false");var i,r=e[t],o=e.snapped=e.snapped||{};return!1===n?o[t]=!1:(o[t]=!0,i=n-r,e[t]+=i,e["d"+t]+=i),r}function dc(e){return e.children||[]}var hc=Math.abs,fc=Math.round;function mc(e){function t(e,t){if(h(e)){for(var n=e.length;n--;)if(hc(e[n]-t)<=10)return e[n]}else{var i=t%(e=+e);if(i<10)return t-i;if(i>e-10)return t-i+e}return t}function n(e){if(e.width)return{x:fc(e.width/2+e.x),y:fc(e.height/2+e.y)}}e.on("connectionSegment.move.move",1500,(function(e){var i,r,o=function(e){var t=e.snapPoints,i=e.connection,r=i.waypoints,o=e.segmentStart,a=e.segmentStartIndex,s=e.segmentEnd,c=e.segmentEndIndex,p=e.axis;if(t)return t;var u=[r[a-1],o,s,r[c+1]];return a<2&&u.unshift(n(i.source)),c>r.length-3&&u.unshift(n(i.target)),e.snapPoints=t={horizontal:[],vertical:[]},E(u,(function(e){e&&(e=e.original||e,"y"===p&&t.horizontal.push(e.y),"x"===p&&t.vertical.push(e.x))})),t}(e.context),a=e.x,s=e.y;if(o){var c=a-(i=t(o.vertical,a)),p=s-(r=t(o.horizontal,s));G(e,{dx:e.dx-c,dy:e.dy-p,x:i,y:r}),(c||-1!==o.vertical.indexOf(a))&&lc(e,"x",i),(p||-1!==o.horizontal.indexOf(s))&&lc(e,"y",r)}})),e.on(["bendpoint.move.move","bendpoint.move.end"],1500,(function(e){var i,r,o=e.context,a=function(e){var t=e.snapPoints,n=e.connection.waypoints,i=e.bendpointIndex;if(t)return t;var r=[n[i-1],n[i+1]];return e.snapPoints=t={horizontal:[],vertical:[]},E(r,(function(e){e&&(e=e.original||e,t.horizontal.push(e.y),t.vertical.push(e.x))})),t}(o),s=o.hover,c=s&&n(s),p=e.x,u=e.y;if(a){var l=p-(i=t(c?a.vertical.concat([c.x]):a.vertical,p)),d=u-(r=t(c?a.horizontal.concat([c.y]):a.horizontal,u));G(e,{dx:e.dx-l,dy:e.dy-d,x:e.x-l,y:e.y-d}),(l||-1!==a.vertical.indexOf(p))&&lc(e,"x",i),(d||-1!==a.horizontal.indexOf(u))&&lc(e,"y",r)}}))}mc.$inject=["eventBus"];var vc={__depends__:[bs,Ss],__init__:["bendpoints","bendpointSnapping","bendpointMovePreview"],bendpoints:["type",Is],bendpointMove:["type",Hs],bendpointMovePreview:["type",Zs],connectionSegmentMove:["type",rc],bendpointSnapping:["type",mc]};function gc(e,t,n,i){function r(e,t){return i.allowed("connection.create",{source:e,target:t})}e.on("connect.hover",(function(e){var t,n=e.context,i=n.start,o=e.hover;if(n.hover=o,!d(t=n.canExecute=r(i,o))){if(!1!==t)return n.source=i,void(n.target=o);d(t=n.canExecute=r(o,i))||!1!==t&&(n.source=o,n.target=i)}})),e.on(["connect.out","connect.cleanup"],(function(e){var t=e.context;t.hover=null,t.source=null,t.target=null,t.canExecute=!1})),e.on("connect.end",(function(e){var t=e.context,i=t.canExecute,r=t.connectionStart,o={x:e.x,y:e.y},a=t.source,s=t.target;if(!i)return!1;var c=null,p={connectionStart:yc(t)?o:r,connectionEnd:yc(t)?r:o};f(i)&&(c=i),n.connect(a,s,c,p)})),this.start=function(e,n,i,r){f(i)||(r=i,i=mn(n)),t.init(e,"connect",{autoActivate:r,data:{shape:n,context:{start:n,connectionStart:i}}})}}function yc(e){var t=e.hover,n=e.source,i=e.target;return t&&n&&t===n&&n!==i}gc.$inject=["eventBus","dragging","modeling","rules"];var bc="connect-ok",xc="connect-not-ok";function _c(e,t,n){var i=e.get("connectionPreview",!1);i&&t.on("connect.move",(function(e){var t=e.context,n=t.canExecute,r=t.hover,o=t.source,a=t.start,s=t.startPosition,c=t.target,p=t.connectionStart||s,u=t.connectionEnd||{x:e.x,y:e.y},l=p,d=u;yc(t)&&(l=u,d=p),i.drawPreview(t,n,{source:o||a,target:c||r,connectionStart:l,connectionEnd:d})})),t.on("connect.hover",900,(function(e){var t=e.context,i=e.hover,r=t.canExecute;null!==r&&n.addMarker(i,r?bc:xc)})),t.on(["connect.out","connect.cleanup"],1100,(function(e){var t=e.hover;t&&(n.removeMarker(t,bc),n.removeMarker(t,xc))})),i&&t.on("connect.cleanup",(function(e){i.cleanUp(e.context)}))}_c.$inject=["injector","eventBus","canvas"];var wc={__depends__:[qo,Ss,bs],__init__:["connectPreview"],connect:["type",gc],connectPreview:["type",_c]};function Ec(e,t,n,i){this._canvas=t,this._graphicsFactory=n,this._elementFactory=i,this._connectionDocking=e.get("connectionDocking",!1),this._layouter=e.get("layouter",!1)}Ec.$inject=["injector","canvas","graphicsFactory","elementFactory"],Ec.prototype.drawPreview=function(e,t,n){n=n||{};var i,r,o,a=e.connectionPreviewGfx,s=e.getConnection,c=n.source,p=n.target,u=n.waypoints,l=n.connectionStart,d=n.connectionEnd,h=n.noLayout,f=n.noCropping,m=n.noNoop,v=this;a||(a=e.connectionPreviewGfx=this.createConnectionPreviewGfx()),De(a),s||(s=e.getConnection=(r=function(e,t,n){return v.getConnection(e,t,n)},o={},function(e){var t=JSON.stringify(e),n=o[t];return n||(n=o[t]=r.apply(null,arguments)),n})),t&&(i=s(t,c,p)),i?(i.waypoints=u||[],this._layouter&&!h&&(i.waypoints=this._layouter.layoutConnection(i,{source:c,target:p,connectionStart:l,connectionEnd:d,waypoints:n.waypoints||i.waypoints})),i.waypoints&&i.waypoints.length||(i.waypoints=[c?mn(c):l,p?mn(p):d]),this._connectionDocking&&(c||p)&&!f&&(i.waypoints=this._connectionDocking.getCroppedWaypoints(i,c,p)),this._graphicsFactory.drawConnection(a,i)):!m&&this.drawNoopPreview(a,n)},Ec.prototype.drawNoopPreview=function(e,t){var n=t.source,i=t.target,r=t.connectionStart||mn(n),o=t.connectionEnd||mn(i),a=this.cropWaypoints(r,o,n,i);_e(e,this.createNoopConnection(a[0],a[1]))},Ec.prototype.cropWaypoints=function(e,t,n,i){var r=this._graphicsFactory,o=n&&r.getShapePath(n),a=i&&r.getShapePath(i),s=r.getConnectionPath({waypoints:[e,t]});return[e=n&&gn(o,s,!0)||e,t=i&&gn(a,s,!1)||t]},Ec.prototype.cleanUp=function(e){e&&e.connectionPreviewGfx&&Me(e.connectionPreviewGfx)},Ec.prototype.getConnection=function(e){var t=function(e){return f(e)?e:{}}(e);return this._elementFactory.createConnection(t)},Ec.prototype.createConnectionPreviewGfx=function(){var e=Le("g");return Se(e,{pointerEvents:"none"}),Ae(e).add("djs-connection-preview"),_e(this._canvas.getActiveLayer(),e),e},Ec.prototype.createNoopConnection=function(e,t){var n=Le("polyline");return Se(n,{stroke:"#333",strokeDasharray:[1],strokeWidth:2,"pointer-events":"none"}),Se(n,{points:[e.x,e.y,t.x,t.y]}),n};var Sc={__init__:["connectionPreview"],connectionPreview:["type",Ec]},Cc=Math.min,Pc=Math.max;function Tc(e){e.preventDefault()}function Rc(e){e.stopPropagation()}function Ac(e){this.container=e.container,this.parent=he('<div class="djs-direct-editing-parent"><div class="djs-direct-editing-content" contenteditable="true"></div></div>'),this.content=ve("[contenteditable]",this.parent),this.keyHandler=e.keyHandler||function(){},this.resizeHandler=e.resizeHandler||function(){},this.autoResize=V(this.autoResize,this),this.handlePaste=V(this.handlePaste,this)}function kc(e,t){this._eventBus=e,this._providers=[],this._textbox=new Ac({container:t.getContainer(),keyHandler:V(this._handleKey,this),resizeHandler:V(this._handleResize,this)})}Ac.prototype.create=function(e,t,n,i){var r=this.parent,o=this.content,a=this.container;i=this.options=i||{};var s=W(t=this.style=t||{},["width","height","maxWidth","maxHeight","minWidth","minHeight","left","top","backgroundColor","position","overflow","border","wordWrap","textAlign","outline","transform"]);G(r.style,{width:e.width+"px",height:e.height+"px",maxWidth:e.maxWidth+"px",maxHeight:e.maxHeight+"px",minWidth:e.minWidth+"px",minHeight:e.minHeight+"px",left:e.x+"px",top:e.y+"px",backgroundColor:"#ffffff",position:"absolute",overflow:"visible",border:"1px solid #ccc",boxSizing:"border-box",wordWrap:"normal",textAlign:"center",outline:"none"},s);var c=W(t,["fontFamily","fontSize","fontWeight","lineHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"]);return G(o.style,{boxSizing:"border-box",width:"100%",outline:"none",wordWrap:"break-word"},c),i.centerVertically&&G(o.style,{position:"absolute",top:"50%",transform:"translate(0, -50%)"},c),o.innerText=n,pe.bind(o,"keydown",this.keyHandler),pe.bind(o,"mousedown",Rc),pe.bind(o,"paste",this.handlePaste),i.autoResize&&pe.bind(o,"input",this.autoResize),i.resizable&&this.resizable(t),a.appendChild(r),this.setSelection(o.lastChild,o.lastChild&&o.lastChild.length),r},Ac.prototype.handlePaste=function(e){var t,n=this.options,i=this.style;if(e.preventDefault(),t=e.clipboardData?e.clipboardData.getData("text/plain"):window.clipboardData.getData("Text"),this.insertText(t),n.autoResize){var r=this.autoResize(i);r&&this.resizeHandler(r)}},Ac.prototype.insertText=function(e){e=e.replace(/\r\n|\r|\n/g,"\n"),document.execCommand("insertText",!1,e)||this._insertTextIE(e)},Ac.prototype._insertTextIE=function(e){var t,n,i,r=this.getSelection(),o=r.startContainer,a=r.endContainer,s=r.startOffset,c=r.endOffset,p=r.commonAncestorContainer,u=(t=p.childNodes,[].slice.call(t));if(function(e){return e.nodeType===Node.TEXT_NODE}(p)){var l=o.textContent;o.textContent=l.substring(0,s)+e+l.substring(c),n=o,i=s+e.length}else if(o===this.content&&a===this.content){var d=document.createTextNode(e);this.content.insertBefore(d,u[s]),n=d,i=d.textContent.length}else{var h=u.indexOf(o),f=u.indexOf(a);u.forEach((function(t,n){n===h?t.textContent=o.textContent.substring(0,s)+e+a.textContent.substring(c):n>h&&n<=f&&ye(t)})),n=o,i=s+e.length}n&&void 0!==i&&setTimeout((function(){self.setSelection(n,i)}))},Ac.prototype.autoResize=function(){var e=this.parent,t=this.content,n=parseInt(this.style.fontSize)||12;if(t.scrollHeight>e.offsetHeight||t.scrollHeight<e.offsetHeight-n){var i=e.getBoundingClientRect(),r=t.scrollHeight;e.style.height=r+"px",this.resizeHandler({width:i.width,height:i.height,dx:0,dy:r-i.height})}},Ac.prototype.resizable=function(){var e=this,t=this.parent,n=this.resizeHandle,i=parseInt(this.style.minWidth)||0,r=parseInt(this.style.minHeight)||0,o=parseInt(this.style.maxWidth)||1/0,a=parseInt(this.style.maxHeight)||1/0;if(!n){var s,c,p,u;n=this.resizeHandle=he('<div class="djs-direct-editing-resize-handle"></div>');var l=function(n){Tc(n),Rc(n);var l=Cc(Pc(p+n.clientX-s,i),o),d=Cc(Pc(u+n.clientY-c,r),a);t.style.width=l+"px",t.style.height=d+"px",e.resizeHandler({width:p,height:u,dx:n.clientX-s,dy:n.clientY-c})},d=function(e){Tc(e),Rc(e),pe.unbind(document,"mousemove",l,!1),pe.unbind(document,"mouseup",d,!1)};pe.bind(n,"mousedown",(function(e){Tc(e),Rc(e),s=e.clientX,c=e.clientY;var n=t.getBoundingClientRect();p=n.width,u=n.height,pe.bind(document,"mousemove",l),pe.bind(document,"mouseup",d)}))}G(n.style,{position:"absolute",bottom:"0px",right:"0px",cursor:"nwse-resize",width:"0",height:"0",borderTop:(parseInt(this.style.fontSize)/4||3)+"px solid transparent",borderRight:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderBottom:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderLeft:(parseInt(this.style.fontSize)/4||3)+"px solid transparent"}),t.appendChild(n)},Ac.prototype.destroy=function(){var e=this.parent,t=this.content,n=this.resizeHandle;t.innerText="",e.removeAttribute("style"),t.removeAttribute("style"),pe.unbind(t,"keydown",this.keyHandler),pe.unbind(t,"mousedown",Rc),pe.unbind(t,"input",this.autoResize),pe.unbind(t,"paste",this.handlePaste),n&&(n.removeAttribute("style"),ye(n)),ye(e)},Ac.prototype.getValue=function(){return this.content.innerText.trim()},Ac.prototype.getSelection=function(){return window.getSelection().getRangeAt(0)},Ac.prototype.setSelection=function(e,t){var n=document.createRange();null===e?n.selectNodeContents(this.content):(n.setStart(e,t),n.setEnd(e,t));var i=window.getSelection();i.removeAllRanges(),i.addRange(n)},kc.$inject=["eventBus","canvas"],kc.prototype.registerProvider=function(e){this._providers.push(e)},kc.prototype.isActive=function(){return!!this._active},kc.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close())},kc.prototype._fire=function(e,t){this._eventBus.fire("directEditing."+e,t||{active:this._active})},kc.prototype.close=function(){this._textbox.destroy(),this._fire("deactivate"),this._active=null,this.resizable=void 0},kc.prototype.complete=function(){var e=this._active;if(e){var t,n=e.context.bounds,i=this.$textbox.getBoundingClientRect(),r=this.getValue();r===e.context.text&&i.height===n.height&&i.width===n.width||(t=this._textbox.container.getBoundingClientRect(),e.provider.update(e.element,r,e.context.text,{x:i.left-t.left,y:i.top-t.top,width:i.width,height:i.height})),this._fire("complete"),this.close()}},kc.prototype.getValue=function(){return this._textbox.getValue()},kc.prototype._handleKey=function(e){e.stopPropagation();var t=e.keyCode||e.charCode;return 27===t?(e.preventDefault(),this.cancel()):13!==t||e.shiftKey?void 0:(e.preventDefault(),this.complete())},kc.prototype._handleResize=function(e){this._fire("resize",e)},kc.prototype.activate=function(e){var t;this.isActive()&&this.cancel();var n=x(this._providers,(function(n){return(t=n.activate(e))?n:null}));return t&&(this.$textbox=this._textbox.create(t.bounds,t.style,t.text,t.options),this._active={element:e,context:t,provider:n},t.options&&t.options.resizable&&(this.resizable=!0),this._fire("activate")),!!t};var Mc={__depends__:[Lo],__init__:["directEditing"],directEditing:["type",kc]},Dc=".entry";function Bc(e,t,n){this._eventBus=t,this._overlays=n;var i=l(e&&e.scale)?e.scale:{min:1,max:1.5};this._overlaysConfig={position:{right:-9,top:-6},scale:i},this._current=null,this._init()}Bc.$inject=["config.contextPad","eventBus","overlays"],Bc.prototype._init=function(){var e=this._eventBus,t=this;e.on("selection.changed",(function(e){var n=e.newSelection;1===n.length?t.open(n[0]):t.close()})),e.on("elements.delete",(function(e){E(e.elements,(function(e){t.isOpen(e)&&t.close()}))})),e.on("element.changed",(function(e){var n=e.element,i=t._current;i&&i.element===n&&t.open(n,!0)}))},Bc.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("contextPad.getProviders",e,(function(e){e.providers.push(t)}))},Bc.prototype.getEntries=function(e){var t=this._getProviders(),n={};return E(t,(function(t){var i=t.getContextPadEntries(e);v(i)?n=i(n):E(i,(function(e,t){n[t]=e}))})),n},Bc.prototype.trigger=function(e,t,n){var i,r,o=this._current.element,a=this._current.entries,s=t.delegateTarget||t.target;if(!s)return t.preventDefault();if(i=a[Y(s,"data-action")].action,r=t.originalEvent||t,v(i)){if("click"===e)return i(r,o,n)}else if(i[e])return i[e](r,o,n);t.preventDefault()},Bc.prototype.open=function(e,t){!t&&this.isOpen(e)||(this.close(),this._updateAndOpen(e))},Bc.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},Bc.prototype._updateAndOpen=function(e){var t=this.getEntries(e),n=this.getPad(e),i=n.html;E(t,(function(e,t){var n,r=e.group||"default",o=he(e.html||'<div class="entry" draggable="true"></div>');Y(o,"data-action",t),(n=ve("[data-group="+r+"]",i))||(n=he('<div class="group" data-group="'+r+'"></div>'),i.appendChild(n)),n.appendChild(o),e.className&&function(e,t){var n=J(e);(h(t)?t:t.split(/\s+/g)).forEach((function(e){n.add(e)}))}(o,e.className),e.title&&Y(o,"title",e.title),e.imageUrl&&o.appendChild(he('<img src="'+e.imageUrl+'">'))})),J(i).add("open"),this._current={element:e,pad:n,entries:t},this._eventBus.fire("contextPad.open",{current:this._current})},Bc.prototype.getPad=function(e){if(this.isOpen())return this._current.pad;var t=this,n=this._overlays,i=he('<div class="djs-context-pad"></div>'),r=G({html:i},this._overlaysConfig);de.bind(i,Dc,"click",(function(e){t.trigger("click",e)})),de.bind(i,Dc,"dragstart",(function(e){t.trigger("dragstart",e)})),pe.bind(i,"mousedown",(function(e){e.stopPropagation()})),this._overlayId=n.add(e,"context-pad",r);var o=n.get(this._overlayId);return this._eventBus.fire("contextPad.create",{element:e,pad:o}),o},Bc.prototype.close=function(){this.isOpen()&&(this._overlays.remove(this._overlayId),this._overlayId=null,this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)},Bc.prototype.isOpen=function(e){return!(!this._current||e&&this._current.element!==e)};var jc={__depends__:[Lo,Jo],contextPad:["type",Bc]},Oc=["marker-start","marker-mid","marker-end"],Nc=["circle","ellipse","line","path","polygon","polyline","rect"];function Lc(e,t,n,i){this._elementRegistry=e,this._canvas=n,this._styles=i,this._clonedMarkers={};var r=this;t.on("drag.cleanup",(function(){E(r._clonedMarkers,(function(e){Me(e)})),r._clonedMarkers={}}))}Lc.$inject=["elementRegistry","eventBus","canvas","styles"],Lc.prototype.getGfx=function(e){return this._elementRegistry.getGraphics(e)},Lc.prototype.addDragger=function(e,t,n){var i=Be(n=n||this.getGfx(e)),r=n.getBoundingClientRect();return this._cloneMarkers(Yn(i)),Se(i,this._styles.cls("djs-dragger",[],{x:r.top,y:r.left})),_e(t,i),i},Lc.prototype.addFrame=function(e,t){var n=Le("rect",{class:"djs-resize-overlay",width:e.width,height:e.height,x:e.x,y:e.y});return _e(t,n),n},Lc.prototype._cloneMarkers=function(e){var t=this;if(e.childNodes)for(var n=0;n<e.childNodes.length;n++)t._cloneMarkers(e.childNodes[n]);(function(e){return-1!==Nc.indexOf(e.nodeName)})(e)&&Oc.forEach((function(n){if(Se(e,n)){var i=function(e,t,n){return ve("marker#"+(i=Se(e,t),i.match(/url\(['"]?#([^'"]*)['"]?\)/)[1]),n||document);var i}(e,n,t._canvas.getContainer());t._cloneMarker(e,i,n)}}))},Lc.prototype._cloneMarker=function(e,t,n){var i=t.id,r=this._clonedMarkers[i];if(!r){var o=i+"-clone";(r=Be(t)).id=o,Ae(r).add("djs-dragger").add("djs-dragger-marker"),this._clonedMarkers[i]=r;var a=ve("defs",this._canvas._svg);a||(a=Le("defs"),_e(this._canvas._svg,a)),_e(a,r)}Se(e,n,"url(#"+this._clonedMarkers[i].id+")")};var Ic={__init__:["previewSupport"],previewSupport:["type",Lc]},zc="drop-ok",Fc="drop-not-ok",$c="attach-ok",Vc="new-parent",Hc="create";function Gc(e,t,n,i,r){function o(t,n){[$c,zc,Fc,Vc].forEach((function(i){i===n?e.addMarker(t,i):e.removeMarker(t,i)}))}function a(){var e=t.context();e&&e.prefix===Hc&&t.cancel()}n.on(["create.move","create.hover"],(function(e){var t=e.context,n=t.elements,i=e.hover,a=t.source,s=t.hints||{};if(!i)return t.canExecute=!1,void(t.target=null);Wc(e);var c={x:e.x,y:e.y},p=t.canExecute=i&&function(e,t,n,i,o){if(!t)return!1;var a=x(e=w(e,(function(t){var n=t.labelTarget;return!(t.parent||function(e){return!!e.labelTarget}(t)&&-1!==e.indexOf(n))})),(function(e){return!qc(e)})),s=!1,c=!1,p=!1;Uc(e)&&(s=r.allowed("shape.attach",{position:n,shape:a,target:t})),s||(p=Uc(e)?r.allowed("shape.create",{position:n,shape:a,source:i,target:t}):r.allowed("elements.create",{elements:e,position:n,target:t}));var u=o.connectionTarget;return p||s?(a&&i&&(c=r.allowed("connection.create",{source:u===i?a:i,target:u===i?i:a,hints:{targetParent:t,targetAttach:s}})),{attach:s,connect:c}):(null===p||null===s)&&null}(n,i,c,a,s);i&&null!==p&&(t.target=i,p&&p.attach?o(i,$c):o(i,p?Vc:Fc))})),n.on(["create.end","create.out","create.cleanup"],(function(e){var t=e.hover;t&&o(t,null)})),n.on("create.end",(function(e){var t=e.context,n=t.source,r=t.shape,o=t.elements,a=t.target,s=t.canExecute,c=s&&s.attach,p=s&&s.connect,u=t.hints||{};if(!1===s||!a)return!1;Wc(e);var l={x:e.x,y:e.y};r=p?i.appendShape(n,r,l,a,{attach:c,connection:!0===p?{}:p,connectionTarget:u.connectionTarget}):x(o=i.createElements(o,l,a,G({},u,{attach:c})),(function(e){return!qc(e)})),G(t,{elements:o,shape:r}),G(e,{elements:o,shape:r})})),n.on("create.init",(function(){n.on("elements.changed",a),n.once(["create.cancel","create.end"],2e3,(function(){n.off("elements.changed",a)}))})),this.start=function(e,n,i){h(n)||(n=[n]);var r=x(n,(function(e){return!qc(e)}));if(r){i=G({elements:n,hints:{},shape:r},i||{}),E(n,(function(e){m(e.x)||(e.x=0),m(e.y)||(e.y=0)}));var o=mt(n);E(n,(function(e){qc(e)&&(e.waypoints=R(e.waypoints,(function(e){return{x:e.x-o.x-o.width/2,y:e.y-o.y-o.height/2}}))),G(e,{x:e.x-o.x-o.width/2,y:e.y-o.y-o.height/2})})),t.init(e,Hc,{cursor:"grabbing",autoActivate:!0,data:{shape:r,elements:n,context:i}})}}}function Wc(e){var t=e.context.createConstraints;t&&(t.left&&(e.x=Math.max(e.x,t.left)),t.right&&(e.x=Math.min(e.x,t.right)),t.top&&(e.y=Math.max(e.y,t.top)),t.bottom&&(e.y=Math.min(e.y,t.bottom)))}function qc(e){return!!e.waypoints}function Uc(e){return e&&1===e.length&&!qc(e[0])}Gc.$inject=["canvas","dragging","eventBus","modeling","rules"];function Yc(e,t,n,i,r){t.on("create.move",750,(function(t){var o=t.hover,a=t.context,s=a.elements,c=a.dragGroup;c||(c=a.dragGroup=function(e){var t=Le("g");Se(t,r.cls("djs-drag-group",["no-events"]));var o=Le("g");return e.forEach((function(e){var r;e.hidden||(e.waypoints?(r=n._createContainer("connection",o),n.drawConnection(Yn(r),e)):(r=n._createContainer("shape",o),n.drawShape(Yn(r),e),Xn(r,e.x,e.y)),i.addDragger(e,t,r))})),t}(s)),o?(c.parentNode||_e(e.getActiveLayer(),c),Xn(c,t.x,t.y)):Me(c)})),t.on("create.cleanup",(function(e){var t=e.context.dragGroup;t&&Me(t)}))}Yc.$inject=["canvas","eventBus","graphicsFactory","previewSupport","styles"];var Kc={__depends__:[bs,Ic,Ss,qo],__init__:["create","createPreview"],create:["type",Gc],createPreview:["type",Yc]},Xc="data-id",Zc=["contextPad.close","canvas.viewbox.changing","commandStack.changed"];function Qc(e,t,n){var i=l(e&&e.scale)?e.scale:{min:1,max:1.5};this._config={scale:i},this._eventBus=t,this._canvas=n,this._providers={},this._current={}}Qc.$inject=["config.popupMenu","eventBus","canvas"],Qc.prototype.registerProvider=function(e,t,n){n||(n=t,t=1e3),this._eventBus.on("popupMenu.getProviders."+e,t,(function(e){e.providers.push(n)}))},Qc.prototype.isEmpty=function(e,t){if(!e)throw new Error("element parameter is missing");if(!t)throw new Error("providerId parameter is missing");var n=this._getProviders(t);if(!n)return!0;var i=this._getEntries(e,n),r=this._getHeaderEntries(e,n),o=k(i)>0,a=r&&k(r)>0;return!o&&!a},Qc.prototype.open=function(e,t,n){var i=this._getProviders(t);if(!e)throw new Error("Element is missing");if(!i||!i.length)throw new Error("No registered providers for: "+t);if(!n)throw new Error("the position argument is missing");this.isOpen()&&this.close(),this._emit("open");var r=this._current={className:t,element:e,position:n},o=this._getEntries(e,i),a=this._getHeaderEntries(e,i);r.entries=G({},o,a),r.container=this._createContainer(),k(a)&&r.container.appendChild(this._createEntries(a,"djs-popup-header")),k(o)&&r.container.appendChild(this._createEntries(o,"djs-popup-body"));var s=this._canvas.getContainer();this._attachContainer(r.container,s,n.cursor),this._bindAutoClose()},Qc.prototype.close=function(){this.isOpen()&&(this._emit("close"),this._unbindAutoClose(),ye(this._current.container),this._current.container=null)},Qc.prototype.isOpen=function(){return!!this._current.container},Qc.prototype.trigger=function(e){e.preventDefault();var t=Y(e.delegateTarget||e.target,Xc),n=this._getEntry(t);if(n.action)return n.action.call(null,e,n)},Qc.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"popupMenu.getProviders."+e,providers:[]});return this._eventBus.fire(t),t.providers},Qc.prototype._getEntries=function(e,t){var n={};return E(t,(function(t){if(t.getPopupMenuEntries){var i=t.getPopupMenuEntries(e);v(i)?n=i(n):E(i,(function(e,t){n[t]=e}))}else E(t.getEntries(e),(function(e){var t=e.id;if(!t)throw new Error("every entry must have the id property set");n[t]=q(e,["id"])}))})),n},Qc.prototype._getHeaderEntries=function(e,t){var n={};return E(t,(function(t){if(t.getPopupMenuHeaderEntries){var i=t.getPopupMenuHeaderEntries(e);v(i)?n=i(n):E(i,(function(e,t){n[t]=e}))}else{if(!t.getHeaderEntries)return;E(t.getHeaderEntries(e),(function(e){var t=e.id;if(!t)throw new Error("every entry must have the id property set");n[t]=q(e,["id"])}))}})),n},Qc.prototype._getEntry=function(e){var t=this._current.entries[e];if(!t)throw new Error("entry not found");return t},Qc.prototype._emit=function(e){this._eventBus.fire("popupMenu."+e)},Qc.prototype._createContainer=function(){var e=he('<div class="djs-popup">'),t=this._current.position,n=this._current.className;return G(e.style,{position:"absolute",left:t.x+"px",top:t.y+"px",visibility:"hidden"}),J(e).add(n),e},Qc.prototype._attachContainer=function(e,t,n){var i=this;de.bind(e,".entry","click",(function(e){i.trigger(e)})),this._updateScale(e),t.appendChild(e),n&&this._assureIsInbounds(e,n)},Qc.prototype._updateScale=function(e){var t,n,i=this._canvas.zoom(),r=this._config.scale,o=i;!0!==r&&(!1===r?(t=1,n=1):(t=r.min,n=r.max),l(t)&&i<t&&(o=t),l(n)&&i>n&&(o=n)),function(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}(e,"scale("+o+")")},Qc.prototype._assureIsInbounds=function(e,t){var n,i,r=this._canvas._container.getBoundingClientRect(),o=e.offsetLeft,a=e.offsetTop,s=e.scrollWidth,c=e.scrollHeight,p={},u=t.x-r.left,l=t.y-r.top;o+s>r.width&&(p.x=!0),a+c>r.height&&(p.y=!0),p.x&&p.y?(n=u-s+"px",i=l-c+"px"):p.x?(n=u-s+"px",i=l+"px"):p.y&&l<c?(n=u+"px",i="10px"):p.y&&(n=u+"px",i=l-c+"px"),G(e.style,{left:n,top:i},{visibility:"visible","z-index":1e3})},Qc.prototype._createEntries=function(e,t){var n=he("<div>"),i=this;return J(n).add(t),E(e,(function(e,t){var r=i._createEntry(e,t);n.appendChild(r)})),n},Qc.prototype._createEntry=function(e,t){var n=he("<div>"),i=J(n);if(i.add("entry"),e.className&&e.className.split(" ").forEach((function(e){i.add(e)})),Y(n,Xc,t),e.label){var r=he("<span>");r.textContent=e.label,n.appendChild(r)}return e.imageUrl&&n.appendChild(he('<img src="'+e.imageUrl+'" />')),!0===e.active&&i.add("active"),!0===e.disabled&&i.add("disabled"),e.title&&(n.title=e.title),n},Qc.prototype._bindAutoClose=function(){this._eventBus.once(Zc,this.close,this)},Qc.prototype._unbindAutoClose=function(){this._eventBus.off(Zc,this.close,this)};var Jc={__init__:["popupMenu"],popupMenu:["type",Qc]};function ep(){}ep.prototype.get=function(){return this._data},ep.prototype.set=function(e){this._data=e},ep.prototype.clear=function(){var e=this._data;return delete this._data,e},ep.prototype.isEmpty=function(){return!this._data};var tp={clipboard:["type",ep]};function np(e){var t=this;function n(e){t._lastMoveEvent=e}this._lastMoveEvent=null,e.on("canvas.init",(function(e){(t._svg=e.svg).addEventListener("mousemove",n)})),e.on("canvas.destroy",(function(){t._lastMouseEvent=null,t._svg.removeEventListener("mousemove",n)}))}np.$inject=["eventBus"],np.prototype.getLastMoveEvent=function(){return this._lastMoveEvent||function(e,t){var n=document.createEvent("MouseEvent"),i=e,r=t,o=e,a=t;n.initMouseEvent&&n.initMouseEvent("mousemove",!0,!0,window,0,i,r,o,a,!1,!1,!1,!1,0,null);return n}(0,0)};var ip={__init__:["mouse"],mouse:["type",np]};function rp(e,t,n,i,r,o,a,s){this._canvas=e,this._create=t,this._clipboard=n,this._elementFactory=i,this._eventBus=r,this._modeling=o,this._mouse=a,this._rules=s,r.on("copyPaste.copyElement",(function(e){var t=e.descriptor,n=e.element,i=e.elements;t.priority=1,t.id=n.id,x(i,(function(e){return e===n.parent}))&&(t.parent=n.parent.id),function(e){return!!e.host}(n)&&(t.priority=2,t.host=n.host.id),op(n)&&(t.priority=3,t.source=n.source.id,t.target=n.target.id,t.waypoints=function(e){return R(e.waypoints,(function(e){return(e=sp(e)).original&&(e.original=sp(e.original)),e}))}(n)),ap(n)&&(t.priority=4,t.labelTarget=n.labelTarget.id),E(["x","y","width","height"],(function(e){m(n[e])&&(t[e]=n[e])})),t.hidden=n.hidden,t.collapsed=n.collapsed})),r.on("copyPaste.pasteElements",(function(e){G(e.hints,{createElementsBehavior:!1})}))}function op(e){return!!e.waypoints}function ap(e){return!!e.labelTarget}function sp(e){return G({},e)}function cp(e,t){var n=t.indexOf(e);return-1===n?t:t.splice(n,1)}rp.$inject=["canvas","create","clipboard","elementFactory","eventBus","modeling","mouse","rules"],rp.prototype.copy=function(e){var t,n;return h(e)||(e=e?[e]:[]),n=!1===(t=this._eventBus.fire("copyPaste.canCopyElements",{elements:e}))?{}:this.createTree(h(t)?t:e),this._clipboard.set(n),this._eventBus.fire("copyPaste.elementsCopied",{elements:e,tree:n}),n},rp.prototype.paste=function(e){var t=this._clipboard.get();if(!this._clipboard.isEmpty()){var n=e&&e.hints||{};this._eventBus.fire("copyPaste.pasteElements",{hints:n});var i=this._createElements(t);if(e&&e.element&&e.point)return this._paste(i,e.element,e.point,n);this._create.start(this._mouse.getLastMoveEvent(),i,{hints:n||{}})}},rp.prototype._paste=function(e,t,n,i){E(e,(function(e){m(e.x)||(e.x=0),m(e.y)||(e.y=0)}));var r=mt(e);return E(e,(function(e){op(e)&&(e.waypoints=R(e.waypoints,(function(e){return{x:e.x-r.x-r.width/2,y:e.y-r.y-r.height/2}}))),G(e,{x:e.x-r.x-r.width/2,y:e.y-r.y-r.height/2})})),this._modeling.createElements(e,n,t,G({},i))},rp.prototype._createElements=function(e){var t=this,n=this._eventBus,i={},r=[];return E(e,(function(e,o){E(e=O(e,"priority"),(function(e){var o,a=G({},q(e,["priority"]));return i[e.parent]?a.parent=i[e.parent]:delete a.parent,n.fire("copyPaste.pasteElement",{cache:i,descriptor:a}),op(a)?(a.source=i[e.source],a.target=i[e.target],o=i[e.id]=t.createConnection(a),void r.push(o)):ap(a)?(a.labelTarget=i[a.labelTarget],o=i[e.id]=t.createLabel(a),void r.push(o)):(a.host&&(a.host=i[a.host]),o=i[e.id]=t.createShape(a),void r.push(o))}))})),r},rp.prototype.createConnection=function(e){return this._elementFactory.createConnection(q(e,["id"]))},rp.prototype.createLabel=function(e){return this._elementFactory.createLabel(q(e,["id"]))},rp.prototype.createShape=function(e){return this._elementFactory.createShape(q(e,["id"]))},rp.prototype.hasRelations=function(e,t){var n,i;return!(op(e)&&(n=x(t,N({id:e.source.id})),i=x(t,N({id:e.target.id})),!n||!i))&&!(ap(e)&&!x(t,N({id:e.labelTarget.id})))},rp.prototype.createTree=function(e){var t=this._rules,n=this,i={},r=[];function o(e,t){var n=x(r,(function(t){return e===t.element}));n?n.depth<t&&(r=function(e,t){var n=t.indexOf(e);-1!==n&&t.splice(n,1);return t}(n,r)).push({element:n.element,depth:t}):r.push({element:e,depth:t})}return ht(ut(e),(function(e,t,n){if(!ap(e))return E(e.labels,(function(e){o(e,n)})),E([e.attachers,e.incoming,e.outgoing],(function(e){e&&e.length&&E(e,(function(e){E(e.labels,(function(e){o(e,n)})),o(e,n)}))})),o(e,n),e.children})),e=R(r,(function(e){return e.element})),r=O(r=R(r,(function(t){return t.descriptor={},n._eventBus.fire("copyPaste.copyElement",{descriptor:t.descriptor,element:t.element,elements:e}),t})),(function(e){return e.descriptor.priority})),e=R(r,(function(e){return e.element})),E(r,(function(r){var o=r.depth;n.hasRelations(r.element,e)?!function(e,n){return t.allowed("element.copy",{element:e,elements:n})}(r.element,e)?cp(r.element,e):(i[o]||(i[o]=[]),i[o].push(r.descriptor)):cp(r.element,e)})),i};var pp={__depends__:[tp,Kc,ip,Ss],__init__:["copyPaste"],copyPaste:["type",rp]};function up(e,t,n){h(n)||(n=[n]),E(n,(function(n){u(e[n])||(t[n]=e[n])}))}function lp(e,t,n){var i;t.on("copyPaste.copyElement",750,(function(e){var t=e.descriptor,n=e.element,i=t.oldBusinessObject=Or(n);if(t.type=n.type,up(i,t,"name"),t.di={},up(i.di,t.di,["fill","stroke","background-color","border-color","color"]),up(i.di,t,"isExpanded"),dp(t))return t;i.default&&(t.default=i.default.id)})),t.on("moddleCopy.canCopyProperty",(function(t){var i,r=t.parent,o=t.property;if("processRef"===t.propertyName&&jr(r,"bpmn:Participant")&&jr(o,"bpmn:Process"))return i=e.create("bpmn:Process"),n.copyElement(o,i)})),t.on("copyPaste.pasteElements",(function(){i={}})),t.on("copyPaste.pasteElement",(function(t){var r,o,a,s=t.cache,c=t.descriptor,p=c.oldBusinessObject;dp(c)?c.businessObject=Or(s[c.labelTarget]):(r=e.create(p.$type),c.businessObject=n.copyElement(p,r),function(e,t){var n=Or(e);e.default&&(i[e.default]={element:n,property:"default"}),e.host&&(Or(e).attachedToRef=Or(t[e.host])),i=q(i,C(i,(function(t,i,r){var o=i.element,a=i.property;return r===e.id&&(o[a]=n,t.push(e.id)),t}),[]))}(c,s),up(c,r,["isExpanded","name"]),o=c,h(a="oldBusinessObject")||(a=[a]),E(a,(function(e){o[e]&&delete o[e]})))}))}function dp(e){return!!e.labelTarget}lp.$inject=["bpmnFactory","eventBus","moddleCopy"];var hp=["artifacts","dataInputAssociations","dataOutputAssociations","default","flowElements","lanes","incoming","outgoing"];function fp(e,t,n){this._bpmnFactory=t,this._eventBus=e,this._moddle=n,e.on("moddleCopy.canCopyProperties",(function(e){var t=e.propertyNames;if(t&&t.length)return O(t,(function(e){return"extensionElements"===e}))})),e.on("moddleCopy.canCopyProperty",(function(e){var t=e.parent,n=f(t)&&t.$descriptor,i=e.propertyName;return(!i||-1===hp.indexOf(i))&&(!(i&&n&&!x(n.properties,N({name:i})))&&void 0)})),e.on("moddleCopy.canSetCopiedProperty",(function(e){var t,n,i=e.property;if(n="bpmn:ExtensionElements",(t=i)&&"function"==typeof t.$instanceOf&&t.$instanceOf(n)&&(!i.values||!i.values.length))return!1}))}function mp(e,t){return C(e.properties,(function(e,n){return t&&n.default?e:e.concat(n.name)}),[])}fp.$inject=["eventBus","bpmnFactory","moddle"],fp.prototype.copyElement=function(e,t,n){var i=this;n&&!h(n)&&(n=[n]),n=n||mp(e.$descriptor);var r=this._eventBus.fire("moddleCopy.canCopyProperties",{propertyNames:n,sourceElement:e,targetElement:t});return!1===r||(h(r)&&(n=r),E(n,(function(n){var r;b(e,n)&&(r=e.get(n));var o=i.copyProperty(r,t,n);!1!==i._eventBus.fire("moddleCopy.canSetCopiedProperty",{parent:t,property:o,propertyName:n})&&l(o)&&t.set(n,o)}))),t},fp.prototype.copyProperty=function(e,t,n){var i=this,r=this._eventBus.fire("moddleCopy.canCopyProperty",{parent:t,property:e,propertyName:n});if(!1!==r){if(r)return f(r)&&r.$type&&!r.$parent&&(r.$parent=t),r;var o=this._moddle.getPropertyDescriptor(t,n);if(!o.isReference){if(o.isId)return this._copyId(e,t);if(h(e))return C(e,(function(e,o){return(r=i.copyProperty(o,t,n))?(r.$parent=t,e.concat(r)):e}),[]);if(f(e)&&e.$type){if(this._moddle.getElementDescriptor(e).isGeneric)return;return(r=i._bpmnFactory.create(e.$type)).$parent=t,r=i.copyElement(e,r)}return e}}},fp.prototype._copyId=function(e,t){return this._moddle.ids.assigned(e)?void 0:(this._moddle.ids.claim(e,t),e)};var vp={__depends__:[pp],__init__:["bpmnCopyPaste","moddleCopy"],bpmnCopyPaste:["type",lp],moddleCopy:["type",fp]},gp=Math.round;function yp(e){this._modeling=e}yp.$inject=["modeling"],yp.prototype.replaceElement=function(e,t,n){if(e.waypoints)return null;var i=this._modeling,r=t.width||e.width,o=t.height||e.height,a=t.x||e.x,s=t.y||e.y,c=gp(a+r/2),p=gp(s+o/2);return i.replaceShape(e,G({},t,{x:c,y:p,width:r,height:o}),n)};var bp={__init__:["replace"],replace:["type",yp]};var xp=["cancelActivity","instantiate","eventGatewayType","triggeredByEvent","isInterrupting"];function _p(e,t,n,i,r,o,a){this.replaceElement=function(s,c,p){p=p||{};var l=c.type,d=s.businessObject;if(wp(d)&&"bpmn:SubProcess"===l&&function(e,t){var n=e&&b(e,"collapsed")?e.collapsed:!Lr(e);return n!==(t&&(b(t,"collapsed")||b(t,"isExpanded"))?b(t,"collapsed")?t.collapsed:!t.isExpanded:n)&&(e.collapsed=n,!0)}(s,c))return i.toggleCollapse(s),s;var f,m=e.create(l),v={type:l,businessObject:m},g=mp(d.$descriptor),y=mp(m.$descriptor,!0),x=(f=y,g.filter((function(e){return-1!==f.indexOf(e)})));G(m,W(c,xp));var _=w(x,(function(e){return"eventDefinitions"===e?Ep(s,c.eventDefinitionType):"loopCharacteristics"===e?!zr(m):!b(m,e)&&(("processRef"!==e||!1!==c.isExpanded)&&"triggeredByEvent"!==e)}));return m=n.copyElement(d,m,_),c.eventDefinitionType&&(Ep(m,c.eventDefinitionType)||(v.eventDefinitionType=c.eventDefinitionType,v.eventDefinitionAttrs=c.eventDefinitionAttrs)),jr(d,"bpmn:Activity")&&(wp(d)?v.isExpanded=Lr(d):c&&b(c,"isExpanded")&&(v.isExpanded=c.isExpanded),Lr(d)&&!jr(d,"bpmn:Task")&&v.isExpanded&&(v.width=s.width,v.height=s.height)),wp(d)&&!wp(m)&&(p.moveChildren=!1),jr(d,"bpmn:Participant")&&(!0===c.isExpanded?m.processRef=e.create("bpmn:Process"):p.moveChildren=!1,v.width=s.width,v.height=t._getDefaultSize(m).height),o.allowed("shape.resize",{shape:m})||(v.height=t._getDefaultSize(m).height,v.width=t._getDefaultSize(m).width),m.name=d.name,Ja(d,["bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:Activity"])&&Ja(m,["bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:Activity"])&&(m.default=d.default),c.host&&!jr(d,"bpmn:BoundaryEvent")&&jr(m,"bpmn:BoundaryEvent")&&(v.host=c.host),"bpmn:DataStoreReference"!==v.type&&"bpmn:DataObjectReference"!==v.type||(v.x=s.x+(s.width-v.width)/2),v.di={},function(e,t,n){h(n)||(n=[n]),E(n,(function(n){u(e[n])||(t[n]=e[n])}))}(d.di,v.di,["fill","stroke","background-color","border-color","color"]),v=r.replaceElement(s,v,p),!1!==p.select&&a.select(v),v}}function wp(e){return jr(e,"bpmn:SubProcess")}function Ep(e,t){var n=Or(e);return t&&n.get("eventDefinitions").some((function(e){return jr(e,t)}))}_p.$inject=["bpmnFactory","elementFactory","moddleCopy","modeling","replace","rules","selection"];var Sp={__depends__:[vp,bp,qo],bpmnReplace:["type",_p]};function Cp(e){return function(t){var n=t.target,i=Or(e),r=i.eventDefinitions&&i.eventDefinitions[0],o=i.$type===n.type,a=(r&&r.$type)===n.eventDefinitionType,s=i.triggeredByEvent===n.triggeredByEvent,c=void 0===n.isExpanded||n.isExpanded===Lr(i);return!(o&&a&&s&&c)}}var Pp=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message Start Event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Start Event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional Start Event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal Start Event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],Tp=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}}],Rp=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message Intermediate Catch Event",actionName:"replace-with-message-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Message Intermediate Throw Event",actionName:"replace-with-message-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-message",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Intermediate Catch Event",actionName:"replace-with-timer-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation Intermediate Throw Event",actionName:"replace-with-escalation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-escalation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional Intermediate Catch Event",actionName:"replace-with-conditional-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Link Intermediate Catch Event",actionName:"replace-with-link-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-link",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Link Intermediate Throw Event",actionName:"replace-with-link-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-link",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Compensation Intermediate Throw Event",actionName:"replace-with-compensation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-compensation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal Intermediate Catch Event",actionName:"replace-with-signal-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Signal Intermediate Throw Event",actionName:"replace-with-signal-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-signal",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],Ap=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message End Event",actionName:"replace-with-message-end",className:"bpmn-icon-end-event-message",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Escalation End Event",actionName:"replace-with-escalation-end",className:"bpmn-icon-end-event-escalation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Error End Event",actionName:"replace-with-error-end",className:"bpmn-icon-end-event-error",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel End Event",actionName:"replace-with-cancel-end",className:"bpmn-icon-end-event-cancel",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Compensation End Event",actionName:"replace-with-compensation-end",className:"bpmn-icon-end-event-compensation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal End Event",actionName:"replace-with-signal-end",className:"bpmn-icon-end-event-signal",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Terminate End Event",actionName:"replace-with-terminate-end",className:"bpmn-icon-end-event-terminate",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:TerminateEventDefinition"}}],kp=[{label:"Exclusive Gateway",actionName:"replace-with-exclusive-gateway",className:"bpmn-icon-gateway-xor",target:{type:"bpmn:ExclusiveGateway"}},{label:"Parallel Gateway",actionName:"replace-with-parallel-gateway",className:"bpmn-icon-gateway-parallel",target:{type:"bpmn:ParallelGateway"}},{label:"Inclusive Gateway",actionName:"replace-with-inclusive-gateway",className:"bpmn-icon-gateway-or",target:{type:"bpmn:InclusiveGateway"}},{label:"Complex Gateway",actionName:"replace-with-complex-gateway",className:"bpmn-icon-gateway-complex",target:{type:"bpmn:ComplexGateway"}},{label:"Event based Gateway",actionName:"replace-with-event-based-gateway",className:"bpmn-icon-gateway-eventbased",target:{type:"bpmn:EventBasedGateway",instantiate:!1,eventGatewayType:"Exclusive"}}],Mp=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Event Sub Process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}},{label:"Sub Process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}}],Dp=[{label:"Sub Process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Event Sub Process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}}],Bp=[{label:"Sub Process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}}],jp=[{label:"Task",actionName:"replace-with-task",className:"bpmn-icon-task",target:{type:"bpmn:Task"}},{label:"Send Task",actionName:"replace-with-send-task",className:"bpmn-icon-send",target:{type:"bpmn:SendTask"}},{label:"Receive Task",actionName:"replace-with-receive-task",className:"bpmn-icon-receive",target:{type:"bpmn:ReceiveTask"}},{label:"User Task",actionName:"replace-with-user-task",className:"bpmn-icon-user",target:{type:"bpmn:UserTask"}},{label:"Manual Task",actionName:"replace-with-manual-task",className:"bpmn-icon-manual",target:{type:"bpmn:ManualTask"}},{label:"Business Rule Task",actionName:"replace-with-rule-task",className:"bpmn-icon-business-rule",target:{type:"bpmn:BusinessRuleTask"}},{label:"Service Task",actionName:"replace-with-service-task",className:"bpmn-icon-service",target:{type:"bpmn:ServiceTask"}},{label:"Script Task",actionName:"replace-with-script-task",className:"bpmn-icon-script",target:{type:"bpmn:ScriptTask"}},{label:"Call Activity",actionName:"replace-with-call-activity",className:"bpmn-icon-call-activity",target:{type:"bpmn:CallActivity"}},{label:"Sub Process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}},{label:"Sub Process (expanded)",actionName:"replace-with-expanded-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}}],Op=[{label:"Data Store Reference",actionName:"replace-with-data-store-reference",className:"bpmn-icon-data-store",target:{type:"bpmn:DataStoreReference"}}],Np=[{label:"Data Object Reference",actionName:"replace-with-data-object-reference",className:"bpmn-icon-data-object",target:{type:"bpmn:DataObjectReference"}}],Lp=[{label:"Message Boundary Event",actionName:"replace-with-message-boundary",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Boundary Event",actionName:"replace-with-timer-boundary",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation Boundary Event",actionName:"replace-with-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional Boundary Event",actionName:"replace-with-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Error Boundary Event",actionName:"replace-with-error-boundary",className:"bpmn-icon-intermediate-event-catch-error",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel Boundary Event",actionName:"replace-with-cancel-boundary",className:"bpmn-icon-intermediate-event-catch-cancel",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Signal Boundary Event",actionName:"replace-with-signal-boundary",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Compensation Boundary Event",actionName:"replace-with-compensation-boundary",className:"bpmn-icon-intermediate-event-catch-compensation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Message Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-message-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!1}},{label:"Timer Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!1}},{label:"Escalation Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!1}},{label:"Conditional Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!1}},{label:"Signal Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!1}}],Ip=[{label:"Message Start Event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Start Event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional Start Event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal Start Event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Error Start Event",actionName:"replace-with-error-start",className:"bpmn-icon-start-event-error",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Escalation Start Event",actionName:"replace-with-escalation-start",className:"bpmn-icon-start-event-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Compensation Start Event",actionName:"replace-with-compensation-start",className:"bpmn-icon-start-event-compensation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Message Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-message-start",className:"bpmn-icon-start-event-non-interrupting-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!1}},{label:"Timer Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-start",className:"bpmn-icon-start-event-non-interrupting-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!1}},{label:"Conditional Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-start",className:"bpmn-icon-start-event-non-interrupting-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!1}},{label:"Signal Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-start",className:"bpmn-icon-start-event-non-interrupting-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!1}},{label:"Escalation Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-start",className:"bpmn-icon-start-event-non-interrupting-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!1}}],zp=[{label:"Sequence Flow",actionName:"replace-with-sequence-flow",className:"bpmn-icon-connection"},{label:"Default Flow",actionName:"replace-with-default-flow",className:"bpmn-icon-default-flow"},{label:"Conditional Flow",actionName:"replace-with-conditional-flow",className:"bpmn-icon-conditional-flow"}],Fp=[{label:"Expanded Pool",actionName:"replace-with-expanded-pool",className:"bpmn-icon-participant",target:{type:"bpmn:Participant",isExpanded:!0}},{label:function(e){var t="Empty Pool";return e.children&&e.children.length&&(t+=" (removes content)"),t},actionName:"replace-with-collapsed-pool",className:"bpmn-icon-lane",target:{type:"bpmn:Participant",isExpanded:!1}}];function $p(e,t,n,i,r,o,a){this._bpmnFactory=e,this._popupMenu=t,this._modeling=n,this._moddle=i,this._bpmnReplace=r,this._rules=o,this._translate=a,this.register()}$p.$inject=["bpmnFactory","popupMenu","modeling","moddle","bpmnReplace","rules","translate"],$p.prototype.register=function(){this._popupMenu.registerProvider("bpmn-replace",this)},$p.prototype.getEntries=function(e){var t,n=e.businessObject;if(!this._rules.allowed("shape.replace",{element:e}))return[];var i=Cp(e);return jr(n,"bpmn:DataObjectReference")?this._createEntries(e,Op):jr(n,"bpmn:DataStoreReference")?this._createEntries(e,Np):jr(n,"bpmn:StartEvent")&&!jr(n.$parent,"bpmn:SubProcess")?(t=w(Pp,i),this._createEntries(e,t)):jr(n,"bpmn:Participant")?(t=w(Fp,(function(e){return Lr(n)!==e.target.isExpanded})),this._createEntries(e,t)):jr(n,"bpmn:StartEvent")&&zr(n.$parent)?(t=w(Ip,(function(t){var n=!1!==t.target.isInterrupting,r=Or(e).isInterrupting===n;return i(t)||!i(t)&&!r})),this._createEntries(e,t)):jr(n,"bpmn:StartEvent")&&!zr(n.$parent)&&jr(n.$parent,"bpmn:SubProcess")?(t=w(Tp,i),this._createEntries(e,t)):jr(n,"bpmn:EndEvent")?(t=w(Ap,(function(e){return!("bpmn:CancelEventDefinition"==e.target.eventDefinitionType&&!jr(n.$parent,"bpmn:Transaction"))&&i(e)})),this._createEntries(e,t)):jr(n,"bpmn:BoundaryEvent")?(t=w(Lp,(function(e){var t=e.target;if("bpmn:CancelEventDefinition"==t.eventDefinitionType&&!jr(n.attachedToRef,"bpmn:Transaction"))return!1;var r=!1!==t.cancelActivity,o=n.cancelActivity==r;return i(e)||!i(e)&&!o})),this._createEntries(e,t)):jr(n,"bpmn:IntermediateCatchEvent")||jr(n,"bpmn:IntermediateThrowEvent")?(t=w(Rp,i),this._createEntries(e,t)):jr(n,"bpmn:Gateway")?(t=w(kp,i),this._createEntries(e,t)):jr(n,"bpmn:Transaction")?(t=w(Dp,i),this._createEntries(e,t)):zr(n)&&Lr(n)?(t=w(Bp,i),this._createEntries(e,t)):jr(n,"bpmn:SubProcess")&&Lr(n)?(t=w(Mp,i),this._createEntries(e,t)):jr(n,"bpmn:AdHocSubProcess")&&!Lr(n)?(t=w(jp,(function(t){var n=t.target,i="bpmn:SubProcess"===n.type,r=!0===n.isExpanded;return Cp(e)&&(!i||r)})),this._createEntries(e,t)):jr(n,"bpmn:SequenceFlow")?this._createSequenceFlowEntries(e,zp):jr(n,"bpmn:FlowNode")?(t=w(jp,i),jr(n,"bpmn:SubProcess")&&!Lr(n)&&(t=w(t,(function(e){return"Sub Process (collapsed)"!==e.label}))),this._createEntries(e,t)):[]},$p.prototype.getHeaderEntries=function(e){var t=[];return jr(e,"bpmn:Activity")&&!zr(e)&&(t=t.concat(this._getLoopEntries(e))),jr(e,"bpmn:DataObjectReference")&&(t=t.concat(this._getDataObjectIsCollection(e))),jr(e,"bpmn:Participant")&&(t=t.concat(this._getParticipantMultiplicity(e))),!jr(e,"bpmn:SubProcess")||jr(e,"bpmn:Transaction")||zr(e)||t.push(this._getAdHocEntry(e)),t},$p.prototype._createEntries=function(e,t){var n=[],i=this;return E(t,(function(t){var r=i._createMenuEntry(t,e);n.push(r)})),n},$p.prototype._createSequenceFlowEntries=function(e,t){var n=Or(e),i=[],r=this._modeling,o=this._moddle,a=this;return E(t,(function(t){switch(t.actionName){case"replace-with-default-flow":n.sourceRef.default!==n&&(jr(n.sourceRef,"bpmn:ExclusiveGateway")||jr(n.sourceRef,"bpmn:InclusiveGateway")||jr(n.sourceRef,"bpmn:ComplexGateway")||jr(n.sourceRef,"bpmn:Activity"))&&i.push(a._createMenuEntry(t,e,(function(){r.updateProperties(e.source,{default:n})})));break;case"replace-with-conditional-flow":!n.conditionExpression&&jr(n.sourceRef,"bpmn:Activity")&&i.push(a._createMenuEntry(t,e,(function(){var t=o.create("bpmn:FormalExpression",{body:""});r.updateProperties(e,{conditionExpression:t})})));break;default:if(jr(n.sourceRef,"bpmn:Activity")&&n.conditionExpression)return i.push(a._createMenuEntry(t,e,(function(){r.updateProperties(e,{conditionExpression:void 0})})));if((jr(n.sourceRef,"bpmn:ExclusiveGateway")||jr(n.sourceRef,"bpmn:InclusiveGateway")||jr(n.sourceRef,"bpmn:ComplexGateway")||jr(n.sourceRef,"bpmn:Activity"))&&n.sourceRef.default===n)return i.push(a._createMenuEntry(t,e,(function(){r.updateProperties(e.source,{default:void 0})})))}})),i},$p.prototype._createMenuEntry=function(e,t,n){var i=this._translate,r=this._bpmnReplace.replaceElement,o=e.label;return o&&"function"==typeof o&&(o=o(t)),n=n||function(){return r(t,e.target)},{label:i(o),className:e.className,id:e.actionName,action:n}},$p.prototype._getLoopEntries=function(e){var t=this,n=this._translate;function i(n,i){var r;i.active?r=void 0:(r=t._moddle.create(i.options.loopCharacteristics),i.options.isSequential&&(r.isSequential=i.options.isSequential)),t._modeling.updateProperties(e,{loopCharacteristics:r})}var r,o,a,s=Or(e).loopCharacteristics;return s&&(r=s.isSequential,o=void 0===s.isSequential,a=void 0!==s.isSequential&&!s.isSequential),[{id:"toggle-parallel-mi",className:"bpmn-icon-parallel-mi-marker",title:n("Parallel Multi Instance"),active:a,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!1}},{id:"toggle-sequential-mi",className:"bpmn-icon-sequential-mi-marker",title:n("Sequential Multi Instance"),active:r,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!0}},{id:"toggle-loop",className:"bpmn-icon-loop-marker",title:n("Loop"),active:o,action:i,options:{loopCharacteristics:"bpmn:StandardLoopCharacteristics"}}]},$p.prototype._getDataObjectIsCollection=function(e){var t=this,n=this._translate;var i=e.businessObject.dataObjectRef,r=i.isCollection;return[{id:"toggle-is-collection",className:"bpmn-icon-parallel-mi-marker",title:n("Collection"),active:r,action:function(n,r){t._modeling.updateModdleProperties(e,i,{isCollection:!r.active})}}]},$p.prototype._getParticipantMultiplicity=function(e){var t=this,n=this._bpmnFactory,i=this._translate;var r=e.businessObject.participantMultiplicity;return[{id:"toggle-participant-multiplicity",className:"bpmn-icon-parallel-mi-marker",title:i("Participant Multiplicity"),active:!!r,action:function(i,r){var o;r.active||(o=n.create("bpmn:ParticipantMultiplicity")),t._modeling.updateProperties(e,{participantMultiplicity:o})}}]},$p.prototype._getAdHocEntry=function(e){var t=this._translate,n=jr(Or(e),"bpmn:AdHocSubProcess"),i=this._bpmnReplace.replaceElement;return{id:"toggle-adhoc",className:"bpmn-icon-ad-hoc-marker",title:t("Ad-hoc"),active:n,action:function(t,r){return i(e,n?{type:"bpmn:SubProcess"}:{type:"bpmn:AdHocSubProcess"},{autoResize:!1,layoutConnection:!1})}}};var Vp={__depends__:[Jc,Sp],__init__:["replaceMenuProvider"],replaceMenuProvider:["type",$p]},Hp=Math.max,Gp=Math.min;function Wp(e,t){return{top:e.top-t.top,right:e.right-t.right,bottom:e.bottom-t.bottom,left:e.left-t.left}}function qp(e,t,n){var i=t[e],r=n.min&&n.min[e],o=n.max&&n.max[e];return m(r)&&(i=(/top|left/.test(e)?Gp:Hp)(i,r)),m(o)&&(i=(/top|left/.test(e)?Hp:Gp)(i,o)),i}function Up(e,t){return void 0!==e?e:20}function Yp(e){return!e.waypoints&&"label"!==e.type}function Kp(e,t){var n;if((n=void 0===e.length?w(e.children,Yp):e).length)return function(e,t){var n,i,r,o;return"object"==typeof t?(n=Up(t.left),i=Up(t.right),r=Up(t.top),o=Up(t.bottom)):n=i=r=o=Up(t),{x:e.x-n,y:e.y-r,width:e.width+n+i,height:e.height+r+o}}(mt(n),t)}var Xp=Math.abs;var Zp=["bpmn:Participant","bpmn:Process","bpmn:SubProcess"],Qp=30;function Jp(e,t){return t=t||[],e.children.filter((function(e){jr(e,"bpmn:Lane")&&(Jp(e,t),t.push(e))})),t}function eu(e){return e.children.filter((function(e){return jr(e,"bpmn:Lane")}))}function tu(e){return es(e,Zp)||e}function nu(e,t){var n=tu(e),i=Jp(n,jr(n,"bpmn:Process")?[]:[n]),r=hn(e),o=hn(t),a=function(e,t){return Wp(hn(t),hn(e))}(e,t),s=[];return i.forEach((function(t){if(t!==e){var n,i,c=0,p=a.right,u=0,l=a.left,d=hn(t);a.top&&(Xp(d.bottom-r.top)<10&&(u=o.top-d.bottom),Xp(d.top-r.top)<5&&(c=o.top-d.top)),a.bottom&&(Xp(d.top-r.bottom)<10&&(c=o.bottom-d.top),Xp(d.bottom-r.bottom)<5&&(u=o.bottom-d.bottom)),(c||p||u||l)&&s.push({shape:t,newBounds:(n=t,i={top:c,right:p,bottom:u,left:l},{x:n.x+(i.left||0),y:n.y+(i.top||0),width:n.width-(i.left||0)+(i.right||0),height:n.height-(i.top||0)+(i.bottom||0)})})}})),s}function iu(e,t,n,i,r,o,a,s,c,p,u,l){e=e||{},i.registerProvider(this),this._contextPad=i,this._modeling=r,this._elementFactory=o,this._connect=a,this._create=s,this._popupMenu=c,this._canvas=p,this._rules=u,this._translate=l,!1!==e.autoPlace&&(this._autoPlace=t.get("autoPlace",!1)),n.on("create.end",250,(function(e){var t=e.context.shape;if(Do(e)&&i.isOpen(t)){var n=i.getEntries(t);n.replace&&n.replace.action.click(e,t)}}))}function ru(e,t,n){var i=e.$instanceOf(t),r=!1;return E(e.eventDefinitions||[],(function(e){e.$type===n&&(r=!0)})),i&&r}iu.$inject=["config.contextPad","injector","eventBus","contextPad","modeling","elementFactory","connect","create","popupMenu","canvas","rules","translate"],iu.prototype.getContextPadEntries=function(e){var t=this._contextPad,n=this._modeling,i=this._elementFactory,r=this._connect,o=this._create,a=this._popupMenu,s=this._canvas,c=this._rules,p=this._autoPlace,u=this._translate,l={};if("label"===e.type)return l;var d=e.businessObject;function f(e,t){r.start(e,t)}function m(e,t,n,r){function a(t,n){var a=i.createShape(G({type:e},r));o.start(t,a,{source:n})}return"string"!=typeof n&&(r=n,n=u("Append {type}",{type:e.replace(/^bpmn:/,"")})),{group:"model",className:t,title:n,action:{dragstart:a,click:p?function(t,n){var o=i.createShape(G({type:e},r));p.append(n,o)}:a}}}function v(e){return function(i,r){n.splitLane(r,e),t.open(r,!0)}}if(Ja(d,["bpmn:Lane","bpmn:Participant"])&&Lr(d)){var g=eu(e);G(l,{"lane-insert-above":{group:"lane-insert-above",className:"bpmn-icon-lane-insert-above",title:u("Add Lane above"),action:{click:function(e,t){n.addLane(t,"top")}}}}),g.length<2&&(e.height>=120&&G(l,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:u("Divide into two Lanes"),action:{click:v(2)}}}),e.height>=180&&G(l,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:u("Divide into three Lanes"),action:{click:v(3)}}})),G(l,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:u("Add Lane below"),action:{click:function(e,t){n.addLane(t,"bottom")}}}})}jr(d,"bpmn:FlowNode")&&(jr(d,"bpmn:EventBasedGateway")?G(l,{"append.receive-task":m("bpmn:ReceiveTask","bpmn-icon-receive-task",u("Append ReceiveTask")),"append.message-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",u("Append MessageIntermediateCatchEvent"),{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",u("Append TimerIntermediateCatchEvent"),{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condition-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",u("Append ConditionIntermediateCatchEvent"),{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",u("Append SignalIntermediateCatchEvent"),{eventDefinitionType:"bpmn:SignalEventDefinition"})}):ru(d,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?G(l,{"append.compensation-activity":m("bpmn:Task","bpmn-icon-task",u("Append compensation activity"),{isForCompensation:!0})}):jr(d,"bpmn:EndEvent")||d.isForCompensation||ru(d,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")||zr(d)||G(l,{"append.end-event":m("bpmn:EndEvent","bpmn-icon-end-event-none",u("Append EndEvent")),"append.gateway":m("bpmn:ExclusiveGateway","bpmn-icon-gateway-none",u("Append Gateway")),"append.append-task":m("bpmn:Task","bpmn-icon-task",u("Append Task")),"append.intermediate-event":m("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none",u("Append Intermediate/Boundary Event"))})),a.isEmpty(e,"bpmn-replace")||G(l,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:u("Change type"),action:{click:function(e,n){var i=G(function(e){var n=s.getContainer(),i=t.getPad(e).html,r=n.getBoundingClientRect(),o=i.getBoundingClientRect(),a=o.top-r.top;return{x:o.left-r.left,y:a+o.height+5}}(n),{cursor:{x:e.x,y:e.y}});a.open(n,"bpmn-replace",i)}}}}),Ja(d,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference"])&&G(l,{"append.text-annotation":m("bpmn:TextAnnotation","bpmn-icon-text-annotation"),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:u("Connect using "+(d.isForCompensation?"":"Sequence/MessageFlow or ")+"Association"),action:{click:f,dragstart:f}}}),jr(d,"bpmn:TextAnnotation")&&G(l,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:u("Connect using Association"),action:{click:f,dragstart:f}}}),Ja(d,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&G(l,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:u("Connect using DataInputAssociation"),action:{click:f,dragstart:f}}}),jr(d,"bpmn:Group")&&G(l,{"append.text-annotation":m("bpmn:TextAnnotation","bpmn-icon-text-annotation")});var y=c.allowed("elements.delete",{elements:[e]});return h(y)&&(y=y[0]===e),y&&G(l,{delete:{group:"edit",className:"bpmn-icon-trash",title:u("Remove"),action:{click:function(t){n.removeElements([e])}}}}),l};var ou={__depends__:[Mc,jc,qo,wc,Kc,Vp],__init__:["contextPadProvider"],contextPadProvider:["type",iu]},au={horizontal:["x","width"],vertical:["y","height"]};function su(e){this._modeling=e,this._filters=[],this.registerFilter((function(e,t,n){var i,r=0,o=0;return E(e,(function(e){e.waypoints||e.labelTarget||(r+=e[n],o+=1)})),i=Math.round(r/o),w(e,(function(e){return e[n]<i+50}))}))}su.$inject=["modeling"],su.prototype.registerFilter=function(e){if("function"!=typeof e)throw new Error("the filter has to be a function");this._filters.push(e)},su.prototype.trigger=function(e,t){var n,i,r=this._modeling;if(!(e.length<3||(this._setOrientation(t),i=this._filterElements(e),(n=this._createGroups(i)).length<=2)))return r.distributeElements(n,this._axis,this._dimension),n},su.prototype._filterElements=function(e){var t=this._filters,n=this._axis,i=this._dimension,r=[].concat(e);return t.length?(E(t,(function(e){r=e(r,n,i)})),r):e},su.prototype._createGroups=function(e){var t=[],n=this,i=this._axis,r=this._dimension;if(!i)throw new Error('must have a defined "axis" and "dimension"');return E(O(e,i),(function(e,o){var a,s=n._findRange(e,i,r),c=t[t.length-1];c&&n._hasIntersection(c.range,s)?t[t.length-1].elements.push(e):(a={range:s,elements:[e]},t.push(a))})),t},su.prototype._setOrientation=function(e){var t=au[e];this._axis=t[0],this._dimension=t[1]},su.prototype._hasIntersection=function(e,t){return Math.max(e.min,e.max)>=Math.min(t.min,t.max)&&Math.min(e.min,e.max)<=Math.max(t.min,t.max)},su.prototype._findRange=function(e){var t=e[this._axis];return{min:t+5,max:t+e[this._dimension]-5}};var cu={__init__:["distributeElements"],distributeElements:["type",su]};function pu(e){e.registerFilter((function(e){return w(e,(function(e){var t=Ja(e,["bpmn:Association","bpmn:BoundaryEvent","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:Lane","bpmn:MessageFlow","bpmn:Participant","bpmn:SequenceFlow","bpmn:TextAnnotation"]);return!(e.labelTarget||t)}))}))}pu.$inject=["distributeElements"];var uu={__depends__:[cu],__init__:["bpmnDistributeElements"],bpmnDistributeElements:["type",pu]},lu="is not a registered action";function du(e,t){this._actions={};var n=this;e.on("diagram.init",(function(){n._registerDefaultActions(t),e.fire("editorActions.init",{editorActions:n})}))}function hu(e,t){return new Error(e+" "+t)}du.$inject=["eventBus","injector"],du.prototype._registerDefaultActions=function(e){var t=e.get("commandStack",!1),n=e.get("modeling",!1),i=e.get("selection",!1),r=e.get("zoomScroll",!1),o=e.get("copyPaste",!1),a=e.get("canvas",!1),s=e.get("rules",!1),c=e.get("keyboardMove",!1),p=e.get("keyboardMoveSelection",!1);t&&(this.register("undo",(function(){t.undo()})),this.register("redo",(function(){t.redo()}))),o&&i&&this.register("copy",(function(){var e=i.get();o.copy(e)})),o&&this.register("paste",(function(){o.paste()})),r&&this.register("stepZoom",(function(e){r.stepZoom(e.value)})),a&&this.register("zoom",(function(e){a.zoom(e.value)})),n&&i&&s&&this.register("removeSelection",(function(){var e=i.get();if(e.length){var t,r=s.allowed("elements.delete",{elements:e});!1!==r&&(t=h(r)?r:e).length&&n.removeElements(t.slice())}})),c&&this.register("moveCanvas",(function(e){c.moveCanvas(e)})),p&&this.register("moveSelection",(function(e){p.moveSelection(e.direction,e.accelerated)}))},du.prototype.trigger=function(e,t){if(!this._actions[e])throw hu(e,lu);return this._actions[e](t)},du.prototype.register=function(e,t){var n=this;if("string"==typeof e)return this._registerAction(e,t);E(e,(function(e,t){n._registerAction(t,e)}))},du.prototype._registerAction=function(e,t){if(this.isRegistered(e))throw hu(e,"is already registered");this._actions[e]=t},du.prototype.unregister=function(e){if(!this.isRegistered(e))throw hu(e,lu);this._actions[e]=void 0},du.prototype.getActions=function(){return Object.keys(this._actions)},du.prototype.isRegistered=function(e){return!!this._actions[e]};var fu={__init__:["editorActions"],editorActions:["type",du]};function mu(e){e.invoke(du,this)}i(mu,du),mu.$inject=["injector"],mu.prototype._registerDefaultActions=function(e){du.prototype._registerDefaultActions.call(this,e);var t=e.get("canvas",!1),n=e.get("elementRegistry",!1),i=e.get("selection",!1),r=e.get("spaceTool",!1),o=e.get("lassoTool",!1),a=e.get("handTool",!1),s=e.get("globalConnect",!1),c=e.get("distributeElements",!1),p=e.get("alignElements",!1),u=e.get("directEditing",!1),l=e.get("searchPad",!1),d=e.get("modeling",!1);t&&n&&i&&this._registerAction("selectElements",(function(){var e=t.getRootElement(),r=n.filter((function(t){return t!==e}));return i.select(r),r})),r&&this._registerAction("spaceTool",(function(){r.toggle()})),o&&this._registerAction("lassoTool",(function(){o.toggle()})),a&&this._registerAction("handTool",(function(){a.toggle()})),s&&this._registerAction("globalConnectTool",(function(){s.toggle()})),i&&c&&this._registerAction("distributeElements",(function(e){var t=i.get(),n=e.type;t.length&&c.trigger(t,n)})),i&&p&&this._registerAction("alignElements",(function(e){var t=i.get(),n=[],r=e.type;t.length&&(n=w(t,(function(e){return!jr(e,"bpmn:Lane")})),p.trigger(n,r))})),i&&d&&this._registerAction("setColor",(function(e){var t=i.get();t.length&&d.setColor(t,e)})),i&&u&&this._registerAction("directEditing",(function(){var e=i.get();e.length&&u.activate(e[0])})),l&&this._registerAction("find",(function(){l.toggle()})),t&&d&&this._registerAction("moveToOrigin",(function(){var e,i,r=t.getRootElement();e=mt(i=jr(r,"bpmn:Collaboration")?n.filter((function(e){return jr(e.parent,"bpmn:Collaboration")})):n.filter((function(e){return e!==r&&!jr(e.parent,"bpmn:SubProcess")}))),d.moveElements(i,{x:-e.x,y:-e.y},r)}))};var vu={__depends__:[fu],editorActions:["type",mu]};function gu(e){e.on(["create.init","shape.move.init"],(function(e){var t=e.context;Ja(e.shape,["bpmn:Participant","bpmn:SubProcess","bpmn:TextAnnotation"])&&(t.gridSnappingContext||(t.gridSnappingContext={}),t.gridSnappingContext.snapLocation="top-left")}))}gu.$inject=["eventBus"];function yu(e,t,n){return n||(n="round"),Math[n](e/t)*t}function bu(e,t,n){var i=!n||!1!==n.active;this._eventBus=t;var r=this;t.on("diagram.init",800,(function(){r.setActive(i)})),t.on(["create.move","create.end","bendpoint.move.move","bendpoint.move.end","connect.move","connect.end","connectionSegment.move.move","connectionSegment.move.end","resize.move","resize.end","shape.move.move","shape.move.end"],1200,(function(t){var n=t.originalEvent;if(!(!r.active||n&&ta(n))){var i=t.context,o=i.gridSnappingContext;o||(o=i.gridSnappingContext={}),["x","y"].forEach((function(n){var i={},o=function(e,t,n){var i=e.context,r=e.shape,o=i.gridSnappingContext,a=o.snapLocation,s=o.snapOffset;if(s&&m(s[t]))return s[t];s||(s=o.snapOffset={});m(s[t])||(s[t]=0);if(!r)return s[t];n.get(r.id)||(xu(t)?s[t]+=r[t]+r.width/2:s[t]+=r[t]+r.height/2);if(!a)return s[t];"x"===t?/left/.test(a)?s[t]-=r.width/2:/right/.test(a)&&(s[t]+=r.width/2):/top/.test(a)?s[t]-=r.height/2:/bottom/.test(a)&&(s[t]+=r.height/2);return s[t]}(t,n,e);o&&(i.offset=o);var a=function(e,t){var n=e.context,i=n.createConstraints,r=n.resizeConstraints||{},o=n.gridSnappingContext,a=o.snapConstraints;if(a&&a[t])return a[t];a||(a=o.snapConstraints={});a[t]||(a[t]={});var s=n.direction;i&&(xu(t)?(a.x.min=i.left,a.x.max=i.right):(a.y.min=i.top,a.y.max=i.bottom));var c=r.min,p=r.max;c&&(xu(t)?wu(s)?a.x.max=c.left:a.x.min=c.right:_u(s)?a.y.max=c.top:a.y.min=c.bottom);p&&(xu(t)?wu(s)?a.x.min=p.left:a.x.max=p.right:_u(s)?a.y.min=p.top:a.y.max=p.bottom);return a[t]}(t,n);a&&G(i,a),uc(t,n)||r.snapEvent(t,n,i)}))}}))}function xu(e){return"x"===e}function _u(e){return-1!==e.indexOf("n")}function wu(e){return-1!==e.indexOf("w")}function Eu(e,t){as.call(this,e),this._gridSnapping=t;var n=this;this.preExecute("shape.resize",(function(e){var t=e.context,i=(t.hints||{}).autoResize;if(i){var r=t.shape,o=t.newBounds;g(i)?t.newBounds=n.snapComplex(o,i):t.newBounds=n.snapSimple(r,o)}}))}bu.prototype.snapEvent=function(e,t,n){lc(e,t,this.snapValue(e[t],n))},bu.prototype.getGridSpacing=function(){return 10},bu.prototype.snapValue=function(e,t){var n,i,r=0;return t&&t.offset&&(r=t.offset),e=yu(e+=r,10),t&&t.min&&m(n=t.min)&&(n=yu(n+r,10,"ceil"),e=Math.max(e,n)),t&&t.max&&m(i=t.max)&&(i=yu(i+r,10,"floor"),e=Math.min(e,i)),e-=r},bu.prototype.isActive=function(){return this.active},bu.prototype.setActive=function(e){this.active=e,this._eventBus.fire("gridSnapping.toggle",{active:e})},bu.prototype.toggleActive=function(){this.setActive(!this.active)},bu.$inject=["elementRegistry","eventBus","config.gridSnapping"],Eu.$inject=["eventBus","gridSnapping","modeling"],i(Eu,as),Eu.prototype.snapSimple=function(e,t){var n=this._gridSnapping;return t.width=n.snapValue(t.width,{min:t.width}),t.height=n.snapValue(t.height,{min:t.height}),t.x=e.x+e.width/2-t.width/2,t.y=e.y+e.height/2-t.height/2,t},Eu.prototype.snapComplex=function(e,t){return/w|e/.test(t)&&(e=this.snapHorizontally(e,t)),/n|s/.test(t)&&(e=this.snapVertically(e,t)),e},Eu.prototype.snapHorizontally=function(e,t){var n=this._gridSnapping,i=/w/.test(t),r=/e/.test(t),o={};return o.width=n.snapValue(e.width,{min:e.width}),r&&(i?(o.x=n.snapValue(e.x,{max:e.x}),o.width+=n.snapValue(e.x-o.x,{min:e.x-o.x})):e.x=e.x+e.width-o.width),G(e,o),e},Eu.prototype.snapVertically=function(e,t){var n=this._gridSnapping,i=/n/.test(t),r=/s/.test(t),o={};return o.height=n.snapValue(e.height,{min:e.height}),i&&(r?(o.y=n.snapValue(e.y,{max:e.y}),o.height+=n.snapValue(e.y-o.y,{min:e.y-o.y})):e.y=e.y+e.height-o.height),G(e,o),e};function Su(e,t){e.on(["spaceTool.move","spaceTool.end"],2e3,(function(e){var n,i=e.context;i.initialized&&("x"===i.axis?(n=t.snapValue(e.dx),e.x=e.x+n-e.dx,e.dx=n):(n=t.snapValue(e.dy),e.y=e.y+n-e.dy,e.dy=n))}))}Su.$inject=["eventBus","gridSnapping"];var Cu={__depends__:[{__init__:["gridSnappingResizeBehavior","gridSnappingSpaceToolBehavior"],gridSnappingResizeBehavior:["type",Eu],gridSnappingSpaceToolBehavior:["type",Su]}],__init__:["gridSnapping"],gridSnapping:["type",bu]};function Pu(e,t){e.on("autoPlace",2e3,(function(e){var n=e.source,i=mn(n),r=e.shape,o=ns(n,r);return["x","y"].forEach((function(e){var n={};o[e]!==i[e]&&(o[e]>i[e]?n.min=o[e]:n.max=o[e],jr(r,"bpmn:TextAnnotation")&&(!function(e){return"x"===e}(e)?n.offset=-r.height/2:n.offset=-r.width/2),o[e]=t.snapValue(o[e],n))})),o}))}Pu.$inject=["eventBus","gridSnapping"];function Tu(e,t,n){t.on(["create.start","shape.move.start"],1750,(function(t){var i=t.context,r=i.shape,o=e.getRootElement();jr(r,"bpmn:Participant")&&jr(o,"bpmn:Process")&&o.children.length&&(i.createConstraints&&(r.width=n.snapValue(r.width,{min:r.width}),r.height=n.snapValue(r.height,{min:r.height})))}))}Tu.$inject=["canvas","eventBus","gridSnapping"];function Ru(e,t,n){as.call(this,e),this._gridSnapping=t;var i=this;this.postExecuted(["connection.create","connection.layout"],3e3,(function(e){var t=e.context,r=t.connection,o=t.hints||{},a=r.waypoints;o.connectionStart||o.connectionEnd||!1===o.createElementsBehavior||function(e){return e.length>3}(a)&&n.updateWaypoints(r,i.snapMiddleSegments(a))}))}function Au(e,t,n){var i=Tt(t,n),r={};return function(e){return"h"===e}(i)&&(r.y=e.snapValue(t.y)),function(e){return"v"===e}(i)&&(r.x=e.snapValue(t.x)),("x"in r||"y"in r)&&(t=G({},t,r),n=G({},n,r)),[t,n]}Ru.$inject=["eventBus","gridSnapping","modeling"],i(Ru,as),Ru.prototype.snapMiddleSegments=function(e){var t,n=this._gridSnapping;e=e.slice();for(var i=1;i<e.length-2;i++)t=Au(n,e[i],e[i+1]),e[i]=t[0],e[i+1]=t[1];return e};var ku={__depends__:[Cu,{__init__:["gridSnappingAutoPlaceBehavior","gridSnappingCreateParticipantBehavior","gridSnappingLayoutConnectionBehavior"],gridSnappingAutoPlaceBehavior:["type",Pu],gridSnappingCreateParticipantBehavior:["type",Tu],gridSnappingLayoutConnectionBehavior:["type",Ru]}],__init__:["bpmnGridSnapping"],bpmnGridSnapping:["type",gu]};function Mu(e,t){this._interactionEvents=t;var n=this;e.on(["interactionEvents.createHit","interactionEvents.updateHit"],(function(e){var t=e.element,i=e.gfx;return jr(t,"bpmn:Lane")?n.createParticipantHit(t,i):jr(t,"bpmn:Participant")?Lr(t)?n.createParticipantHit(t,i):n.createDefaultHit(t,i):jr(t,"bpmn:SubProcess")?Lr(t)?n.createSubProcessHit(t,i):n.createDefaultHit(t,i):void 0}))}Mu.$inject=["eventBus","interactionEvents"],Mu.prototype.createDefaultHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createDefaultHit(e,t),!0},Mu.prototype.createParticipantHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createBoxHit(t,"click-stroke",{width:e.width,height:e.height}),this._interactionEvents.createBoxHit(t,"all",{width:30,height:e.height}),!0},Mu.prototype.createSubProcessHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createBoxHit(t,"click-stroke",{width:e.width,height:e.height}),this._interactionEvents.createBoxHit(t,"all",{width:e.width,height:30}),!0};var Du={__init__:["bpmnInteractionEvents"],bpmnInteractionEvents:["type",Mu]};function Bu(e){e.invoke(la,this)}i(Bu,la),Bu.$inject=["injector"],Bu.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}la.prototype.registerBindings.call(this,e,t),n("selectElements",(function(n){var i=n.keyEvent;if(e.isKey(["a","A"],i)&&e.isCmd(i))return t.trigger("selectElements"),!0})),n("find",(function(n){var i=n.keyEvent;if(e.isKey(["f","F"],i)&&e.isCmd(i))return t.trigger("find"),!0})),n("spaceTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["s","S"],i)?(t.trigger("spaceTool"),!0):void 0})),n("lassoTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["l","L"],i)?(t.trigger("lassoTool"),!0):void 0})),n("handTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["h","H"],i)?(t.trigger("handTool"),!0):void 0})),n("globalConnectTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["c","C"],i)?(t.trigger("globalConnectTool"),!0):void 0})),n("directEditing",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["e","E"],i)?(t.trigger("directEditing"),!0):void 0}))};var ju={__depends__:[da],__init__:["keyboardBindings"],keyboardBindings:["type",Bu]},Ou={moveSpeed:1,moveSpeedAccelerated:10},Nu="left",Lu="right",Iu="down",zu={ArrowLeft:Nu,Left:Nu,ArrowUp:"up",Up:"up",ArrowRight:Lu,Right:Lu,ArrowDown:Iu,Down:Iu},Fu={left:function(e){return{x:-e,y:0}},up:function(e){return{x:0,y:-e}},right:function(e){return{x:e,y:0}},down:function(e){return{x:0,y:e}}};function $u(e,t,n,i,r){var o=this;this._config=G({},Ou,e||{}),t.addListener(1500,(function(e){var n=e.keyEvent,i=zu[n.key];if(i&&!t.isCmd(n)){var r=t.isShift(n);return o.moveSelection(i,r),!0}})),this.moveSelection=function(e,t){var o=r.get();if(o.length){var a=this._config[t?"moveSpeedAccelerated":"moveSpeed"],s=Fu[e](a);i.allowed("elements.move",{shapes:o})&&n.moveElements(o,s)}}}$u.$inject=["config.keyboardMoveSelection","keyboard","modeling","rules","selection"];var Vu={__depends__:[da,qo],__init__:["keyboardMoveSelection"],keyboardMoveSelection:["type",$u]};function Hu(e,t,n,i){e.on("element.changed",(function(i){var r=i.element;(r.parent||r===t.getRootElement())&&(i.gfx=n.getGraphics(r)),i.gfx&&e.fire(vt(r)+".changed",i)})),e.on("elements.changed",(function(t){var n=t.elements;n.forEach((function(t){e.fire("element.changed",{element:t})})),i.updateContainments(n)})),e.on("shape.changed",(function(e){i.update("shape",e.element,e.gfx)})),e.on("connection.changed",(function(e){i.update("connection",e.element,e.gfx)}))}Hu.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var Gu={__init__:["changeSupport"],changeSupport:["type",Hu]};function Wu(e,t,n,i){this._dragging=i,this._rules=t;var r=this;function o(e,t){var n,i=e.shape,o=e.direction,a=e.resizeConstraints;e.delta=t,n=function(e,t,n){var i=n.x,r=n.y,o={x:e.x,y:e.y,width:e.width,height:e.height};return-1!==t.indexOf("n")?(o.y=e.y+r,o.height=e.height-r):-1!==t.indexOf("s")&&(o.height=e.height+r),-1!==t.indexOf("e")?o.width=e.width+i:-1!==t.indexOf("w")&&(o.x=e.x+i,o.width=e.width-i),o}(i,o,t),e.newBounds=function(e,t){if(!t)return e;var n=hn(e);return fn({top:qp("top",n,t),right:qp("right",n,t),bottom:qp("bottom",n,t),left:qp("left",n,t)})}(n,a),e.canExecute=r.canResize(e)}e.on("resize.start",(function(e){var t,n,i;t=e.context,n=t.resizeConstraints,i=t.minBounds,void 0===n&&(void 0===i&&(i=r.computeMinResizeBox(t)),t.resizeConstraints={min:hn(i)})})),e.on("resize.move",(function(e){var t={x:e.dx,y:e.dy};o(e.context,t)})),e.on("resize.end",(function(e){!function(e){var t=e.shape,i=e.canExecute,r=e.newBounds;if(i){if(!function(e,t){return e.x!==t.x||e.y!==t.y||e.width!==t.width||e.height!==t.height}(t,r=ln(r)))return;n.resizeShape(t,r)}}(e.context)}))}function qu(e,t){var n=mn(e),i=hn(e),r={x:n.x,y:n.y};return-1!==t.indexOf("n")?r.y=i.top:-1!==t.indexOf("s")&&(r.y=i.bottom),-1!==t.indexOf("e")?r.x=i.right:-1!==t.indexOf("w")&&(r.x=i.left),r}function Uu(e){return"n"===e||"s"===e?"resize-ns":"e"===e||"w"===e?"resize-ew":"nw"===e||"se"===e?"resize-nwse":"resize-nesw"}Wu.prototype.canResize=function(e){var t=this._rules,n=W(e,["newBounds","shape","delta","direction"]);return t.allowed("shape.resize",n)},Wu.prototype.activate=function(e,t,n){var i,r,o=this._dragging;if("string"==typeof n&&(n={direction:n}),!(r=(i=G({shape:t},n)).direction))throw new Error("must provide a direction (n|w|s|e|nw|se|ne|sw)");o.init(e,qu(t,r),"resize",{autoActivate:!0,cursor:Uu(r),data:{shape:t,context:i}})},Wu.prototype.computeMinResizeBox=function(e){var t=e.shape;return function(e,t,n,i){var r=hn(t),o={top:/n/.test(e)?r.bottom-n.height:r.top,left:/w/.test(e)?r.right-n.width:r.left,bottom:/s/.test(e)?r.top+n.height:r.bottom,right:/e/.test(e)?r.left+n.width:r.right},a=i?hn(i):o;return fn({top:Gp(o.top,a.top),left:Gp(o.left,a.left),bottom:Hp(o.bottom,a.bottom),right:Hp(o.right,a.right)})}(e.direction,t,e.minDimensions||{width:10,height:10},Kp(t,e.childrenBoxPadding))},Wu.$inject=["eventBus","rules","modeling","dragging"];var Yu="djs-resizing",Ku="resize-not-ok";function Xu(e,t,n){e.on("resize.move",500,(function(e){var i,r,o,a;i=e.context,r=i.shape,o=i.newBounds,(a=i.frame)||(a=i.frame=n.addFrame(r,t.getActiveLayer()),t.addMarker(r,Yu)),o.width>5&&Se(a,{x:o.x,width:o.width}),o.height>5&&Se(a,{y:o.y,height:o.height}),i.canExecute?Ae(a).remove(Ku):Ae(a).add(Ku)})),e.on("resize.cleanup",(function(e){var n,i;n=e.context,i=n.shape,n.frame&&Me(n.frame),t.removeMarker(i,Yu)}))}Xu.$inject=["eventBus","canvas","previewSupport"];var Zu=-6,Qu="djs-resizer",Ju=["n","w","s","e","nw","ne","se","sw"];function el(e,t,n,i){this._resize=i,this._canvas=t;var r=this;e.on("selection.changed",(function(e){var t=e.newSelection;r.removeResizers(),1===t.length&&E(t,V(r.addResizer,r))})),e.on("shape.changed",(function(e){var t=e.element;n.isSelected(t)&&(r.removeResizers(),r.addResizer(t))}))}el.prototype.makeDraggable=function(e,t,n){var i=this._resize;function r(t){Mo(t)&&i.activate(t,e,n)}pe.bind(t,"mousedown",r),pe.bind(t,"touchstart",r)},el.prototype._createResizer=function(e,t,n,i){var r=this._getResizersParent(),o=function(e){var t={x:0,y:0};-1!==e.indexOf("e")?t.x=6:-1!==e.indexOf("w")&&(t.x=Zu);-1!==e.indexOf("s")?t.y=6:-1!==e.indexOf("n")&&(t.y=Zu);return t}(i),a=Le("g");Ae(a).add(Qu),Ae(a).add("djs-resizer-"+e.id),Ae(a).add("djs-resizer-"+i),_e(r,a);var s=Le("rect");Se(s,{x:-2+o.x,y:-2+o.y,width:4,height:4}),Ae(s).add("djs-resizer-visual"),_e(a,s);var c=Le("rect");return Se(c,{x:-10+o.x,y:-10+o.y,width:20,height:20}),Ae(c).add("djs-resizer-hit"),_e(a,c),Kn(a,t,n),a},el.prototype.createResizer=function(e,t){var n=qu(e,t),i=this._createResizer(e,n.x,n.y,t);this.makeDraggable(e,i,t)},el.prototype.addResizer=function(e){var t=this;this._resize.canResize({shape:e})&&E(Ju,(function(n){t.createResizer(e,n)}))},el.prototype.removeResizers=function(){De(this._getResizersParent())},el.prototype._getResizersParent=function(){return this._canvas.getLayer("resizers")},el.$inject=["eventBus","canvas","selection","resize"];var tl={__depends__:[Ss,bs,Ic],__init__:["resize","resizePreview","resizeHandles"],resize:["type",Wu],resizePreview:["type",Xu],resizeHandles:["type",el]};function nl(e,t){var n=t.create("bpmn:CategoryValue"),i=t.create("bpmn:Category",{categoryValue:[n]});return wt(e.get("rootElements"),i),Or(i).$parent=e,Or(n).$parent=i,n}function il(e,t,n,i,r,o,a){function s(e,t){(t||Ja(e,["bpmn:Task","bpmn:TextAnnotation","bpmn:Group"])||rl(e))&&i.activate(e)}this._bpmnFactory=t,this._canvas=n,this._modeling=r,this._textRenderer=a,i.registerProvider(this),e.on("element.dblclick",(function(e){s(e.element,!0)})),e.on(["autoPlace.start","canvas.viewbox.changing","drag.init","element.mousedown","popupMenu.open"],(function(e){i.isActive()&&i.complete()})),e.on(["commandStack.changed"],(function(e){i.isActive()&&i.cancel()})),e.on("directEditing.activate",(function(e){o.removeResizers()})),e.on("create.end",500,(function(e){var t=e.context,n=t.shape,i=e.context.canExecute;e.isTouch||i&&(t.hints&&!1===t.hints.createElementsBehavior||s(n))})),e.on("autoPlace.end",500,(function(e){s(e.shape)}))}function rl(e){return jr(e,"bpmn:SubProcess")&&!Lr(e)}il.$inject=["eventBus","bpmnFactory","canvas","directEditing","modeling","resizeHandles","textRenderer"],il.prototype.activate=function(e){var t=qr(e);if(void 0!==t){var n={text:t};G(n,this.getEditingBBox(e));var i={};return(Ja(e,["bpmn:Task","bpmn:Participant","bpmn:Lane","bpmn:CallActivity"])||rl(e))&&G(i,{centerVertically:!0}),vo(e)&&G(i,{autoResize:!0}),jr(e,"bpmn:TextAnnotation")&&G(i,{resizable:!0,autoResize:!0}),G(n,{options:i}),n}},il.prototype.getEditingBBox=function(e){var t=this._canvas,n=e.label||e,i=t.getAbsoluteBBox(n),r=i.x+i.width/2,o=i.y+i.height/2,a={x:i.x,y:i.y},s=t.zoom(),c=this._textRenderer.getDefaultStyle(),p=this._textRenderer.getExternalStyle(),u=p.fontSize*s,l=p.lineHeight,d=c.fontSize*s,h=c.lineHeight,f={fontFamily:this._textRenderer.getDefaultStyle().fontFamily,fontWeight:this._textRenderer.getDefaultStyle().fontWeight};(jr(e,"bpmn:Lane")||function(e){return jr(e,"bpmn:Participant")&&Lr(e)}(e))&&(G(a,{width:i.height,height:30*s,x:i.x-i.height/2+15*s,y:o-30*s/2}),G(f,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px",transform:"rotate(-90deg)"})),(Ja(e,["bpmn:Task","bpmn:CallActivity"])||function(e){return jr(e,"bpmn:Participant")&&!Lr(e)}(e)||rl(e))&&(G(a,{width:i.width,height:i.height}),G(f,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px"})),function(e){return jr(e,"bpmn:SubProcess")&&Lr(e)}(e)&&(G(a,{width:i.width,x:i.x}),G(f,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px"}));var m=90*s,v=7*s,g=4*s;if(n.labelTarget&&(G(a,{width:m,height:i.height+v+g,x:r-m/2,y:i.y-v}),G(f,{fontSize:u+"px",lineHeight:l,paddingTop:v+"px",paddingBottom:g+"px"})),vo(n)&&!go(n)&&!xo(n)){var y=bo(e),b=t.getAbsoluteBBox({x:y.x,y:y.y,width:0,height:0}),x=u+v+g;G(a,{width:m,height:x,x:b.x-m/2,y:b.y-x/2}),G(f,{fontSize:u+"px",lineHeight:l,paddingTop:v+"px",paddingBottom:g+"px"})}return jr(e,"bpmn:TextAnnotation")&&(G(a,{width:i.width,height:i.height,minWidth:30*s,minHeight:10*s}),G(f,{textAlign:"left",paddingTop:5*s+"px",paddingBottom:7*s+"px",paddingLeft:7*s+"px",paddingRight:5*s+"px",fontSize:d+"px",lineHeight:h})),{bounds:a,style:f}},il.prototype.update=function(e,t,n,i){var r,o;if((jr(e,"bpmn:TextAnnotation")&&(o=this._canvas.getAbsoluteBBox(e),r={x:e.x,y:e.y,width:e.width/o.width*i.width,height:e.height/o.height*i.height}),jr(e,"bpmn:Group"))&&!Or(e).categoryValueRef){var a=nl(Or(this._canvas.getRootElement()).$parent,this._bpmnFactory);Or(e).categoryValueRef=a}(function(e){return!e||!e.trim()})(t)&&(t=null),this._modeling.updateLabel(e,t,r)};var ol="djs-element-hidden",al="djs-label-hidden";function sl(e,t,n,i){var r,o,a,s=this,c=t.getDefaultLayer();e.on("directEditing.activate",(function(e){var n=e.active;if(jr(r=n.element.label||n.element,"bpmn:TextAnnotation")){o=t.getAbsoluteBBox(r),a=Le("g");var p=i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r.width,containerHeight:r.height,position:{mx:0,my:0}}),u=s.path=Le("path");Se(u,{d:p,strokeWidth:2,stroke:cl(r)}),_e(a,u),_e(c,a),Xn(a,r.x,r.y)}jr(r,"bpmn:TextAnnotation")||r.labelTarget?t.addMarker(r,ol):(jr(r,"bpmn:Task")||jr(r,"bpmn:CallActivity")||jr(r,"bpmn:SubProcess")||jr(r,"bpmn:Participant"))&&t.addMarker(r,al)})),e.on("directEditing.resize",(function(e){if(jr(r,"bpmn:TextAnnotation")){var t=e.height,n=e.dy,a=Math.max(r.height/o.height*(t+n),0),c=i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r.width,containerHeight:a,position:{mx:0,my:0}});Se(s.path,{d:c})}})),e.on(["directEditing.complete","directEditing.cancel"],(function(e){var n=e.active;n&&(t.removeMarker(n.element.label||n.element,ol),t.removeMarker(r,al)),r=void 0,o=void 0,a&&(Me(a),a=void 0)}))}function cl(e,t){return Or(e).di.get("stroke")||t||"black"}sl.$inject=["eventBus","canvas","elementRegistry","pathMap"];var pl={__depends__:[Gu,tl,Mc],__init__:["labelEditingProvider","labelEditingPreview"],labelEditingProvider:["type",il],labelEditingPreview:["type",sl]},ul=["top","bottom","left","right"],ll=10;function dl(e,t){function n(e){if(go(e)){var n=function(e){var t=mn(e.label),n=hl(mn(e),t);if(i=n,-1===ul.indexOf(i))return;var i;var r=function(e){var t=mn(e);return[].concat(e.incoming.map((function(e){return e.waypoints[e.waypoints.length-2]})),e.outgoing.map((function(e){return e.waypoints[1]}))).map((function(e){return hl(t,e)}))}(e);if(e.host){var o=function(e){var t,n=e.host,i=vn(mn(e),n);t=i.indexOf("-")>=0?i.split("-"):[i];return ul.filter((function(e){return-1===t.indexOf(e)}))}(e);r=r.concat(o)}var a=ul.filter((function(e){return-1===r.indexOf(e)}));if(-1!==a.indexOf(n))return;return a[0]}(e);n&&function(e,n){var i=mn(e),r=e.label,o=mn(r);if(!r.parent)return;var a,s=hn(e);switch(n){case"top":a={x:i.x,y:s.top-ll-r.height/2};break;case"left":a={x:s.left-ll-r.width/2,y:i.y};break;case"bottom":a={x:i.x,y:s.bottom+ll+r.height/2};break;case"right":a={x:s.right+ll+r.width/2,y:i.y}}var c=_a(a,o);t.moveShape(r,c)}(e,n)}}as.call(this,e),this.postExecuted(["connection.create","connection.layout","connection.updateWaypoints"],(function(e){var t=e.context,i=t.connection,r=i.source,o=i.target;!1!==(t.hints||{}).createElementsBehavior&&(n(r),n(o))})),this.postExecuted(["label.create"],(function(e){var t=e.context,i=t.shape;!1!==(t.hints||{}).createElementsBehavior&&n(i.labelTarget)})),this.postExecuted(["elements.create"],(function(e){var t=e.context,i=t.elements;!1!==(t.hints||{}).createElementsBehavior&&i.forEach((function(e){n(e)}))}))}function hl(e,t){return vn(t,e,5)}function fl(e,t,n){as.call(this,e),this.preExecute("shape.append",(function(e){var t=e.source,n=e.shape;e.position||(jr(n,"bpmn:TextAnnotation")?e.position={x:t.x+t.width/2+75,y:t.y-50-n.height/2}:e.position={x:t.x+t.width+80+n.width/2,y:t.y+t.height/2})}),!0)}function ml(e,t){e.invoke(as,this),this.postExecute("shape.move",(function(e){var n=e.newParent,i=e.shape;E(w(i.incoming.concat(i.outgoing),(function(e){return jr(e,"bpmn:Association")})),(function(e){t.moveConnection(e,{x:0,y:0},n)}))}),!0)}i(dl,as),dl.$inject=["eventBus","modeling"],i(fl,as),fl.$inject=["eventBus","elementFactory","bpmnRules"],i(ml,as),ml.$inject=["injector","modeling"];function vl(e,t){t.invoke(as,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",500,(function(e){var t=e.elements;1===(t=t.filter((function(e){return gl(e,e.host)}))).length&&t.map((function(e){return t.indexOf(e)})).forEach((function(i){var r=t[i];e.elements[i]=n.replaceShape(t[i],r)}))}),!0),this.preExecute("elements.move",500,(function(e){var t=e.shapes,i=e.newHost;if(1===t.length){var r=t[0];gl(r,i)&&(e.shapes=[n.replaceShape(r,i)])}}),!0)}function gl(e,t){return!xo(e)&&Ja(e,["bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"])&&!!t}vl.$inject=["bpmnReplace","injector"],i(vl,as),vl.prototype.replaceShape=function(e,t){var n,i=(n=Or(e).eventDefinitions)&&n[0],r={type:"bpmn:BoundaryEvent",host:t};return i&&(r.eventDefinitionType=i.$type),this._bpmnReplace.replaceElement(e,r,{layoutConnection:!1})};function yl(e,t,n){function i(e){return w(e.attachers,(function(e){return jr(e,"bpmn:BoundaryEvent")}))}as.call(this,e),this.postExecute("connection.create",(function(e){var t=e.context.source,r=e.context.target,o=i(r);jr(t,"bpmn:EventBasedGateway")&&jr(r,"bpmn:ReceiveTask")&&o.length>0&&n.removeElements(o)})),this.postExecute("connection.reconnect",(function(e){var t=e.context.oldSource,r=e.context.newSource;jr(t,"bpmn:Gateway")&&jr(r,"bpmn:EventBasedGateway")&&E(r.outgoing,(function(e){var t=e.target,r=i(t);jr(t,"bpmn:ReceiveTask")&&r.length>0&&n.removeElements(r)}))})),e.on("moddleCopy.canCopyProperty",2e3,(function(e){var n=e.parent,i=e.property,r=e.propertyName,o=t.getPropertyDescriptor(n,r);o&&o.isReference&&jr(i,"bpmn:RootElement")&&n.set(r,i)}))}yl.$inject=["eventBus","moddle","modeling"],i(yl,as);function bl(e,t,n,i,r){function o(e){return Ja(e,["bpmn:ReceiveTask","bpmn:SendTask"])||function(e,t){h(t)||(t=[t]);return T(t,(function(t){return Fr(e,t)}))}(e,["bpmn:ErrorEventDefinition","bpmn:EscalationEventDefinition","bpmn:MessageEventDefinition","bpmn:SignalEventDefinition"])}function a(t){return!!x(e.getDefinitions().get("rootElements"),N({id:t.id}))}function s(e){return jr(e,"bpmn:ErrorEventDefinition")?"errorRef":jr(e,"bpmn:EscalationEventDefinition")?"escalationRef":jr(e,"bpmn:MessageEventDefinition")?"messageRef":jr(e,"bpmn:SignalEventDefinition")?"signalRef":void 0}function c(e){if(Ja(e,["bpmn:ReceiveTask","bpmn:SendTask"]))return e.get("messageRef");var t=e.get("eventDefinitions")[0];return t.get(s(t))}n.invoke(as,this),this.executed("shape.create",(function(t){var n=t.shape;if(o(n)){var i=c(Or(n));i&&!a(i)&&(wt(e.getDefinitions().get("rootElements"),i),t.addedRootElement=i)}}),!0),this.reverted("shape.create",(function(t){var n=t.addedRootElement;n&&_t(e.getDefinitions().get("rootElements"),n)}),!0),t.on("copyPaste.copyElement",(function(e){var t=e.descriptor,n=e.element;if(o(n)){var i=c(Or(n));i&&(t.referencedRootElement=i)}})),t.on("copyPaste.pasteElement",500,(function(e){var t=e.descriptor,n=t.businessObject;if(o(n)){var c=t.referencedRootElement;c&&(a(c)||(c=i.copyElement(c,r.create(c.$type))),function(e,t){if(Ja(e,["bpmn:ReceiveTask","bpmn:SendTask"]))return e.set("messageRef",t);var n=e.get("eventDefinitions")[0];n.set(s(n),t)}(n,c))}}))}function xl(e){e.invoke(as,this),this.preExecute("shape.create",1500,(function(e){var t=e.context,n=t.parent,i=t.shape;jr(n,"bpmn:Lane")&&!jr(i,"bpmn:Lane")&&(t.parent=es(n,"bpmn:Participant"))}))}bl.$inject=["bpmnjs","eventBus","injector","moddleCopy","bpmnFactory"],i(bl,as),xl.$inject=["injector"],i(xl,as);var _l=1500;function wl(e,t,n){t.on(["create.hover","create.move","create.out","create.end","shape.move.hover","shape.move.move","shape.move.out","shape.move.end"],_l,(function(t){var i=t.context.shape||t.shape,r=t.hover;jr(r,"bpmn:Lane")&&!Ja(i,["bpmn:Lane","bpmn:Participant"])&&(t.hover=tu(r),t.hoverGfx=e.getGraphics(t.hover));var o=n.getRootElement();r!==o&&(i.labelTarget||jr(i,"bpmn:Group"))&&(t.hover=o,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["connect.hover","connect.out","connect.end","connect.cleanup","global-connect.hover","global-connect.out","global-connect.end","global-connect.cleanup"],_l,(function(t){var n=t.hover;jr(n,"bpmn:Lane")&&(t.hover=tu(n)||n,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["bendpoint.move.hover"],_l,(function(t){var n=t.context,i=t.hover,r=n.type;jr(i,"bpmn:Lane")&&/reconnect/.test(r)&&(t.hover=tu(i)||i,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["connect.start"],_l,(function(e){var t=e.context,n=t.start;jr(n,"bpmn:Lane")&&(t.start=tu(n)||n)})),t.on("shape.move.start",2e3,(function(e){var t=e.shape;jr(t,"bpmn:Lane")&&(e.shape=tu(t)||t)}))}function El(e,t,n){as.call(this,e),this.preExecute("shape.create",(function(e){var n=e.context.shape;if(jr(n,"bpmn:DataObjectReference")&&"label"!==n.type){var i=t.create("bpmn:DataObject");n.businessObject.dataObjectRef=i}}))}wl.$inject=["elementRegistry","eventBus","canvas"],El.$inject=["eventBus","bpmnFactory","moddle"],i(El,as);var Sl=20,Cl=20,Pl=2e3;function Tl(e,t,n){function i(t){var i,r=t.parent,o=e.getRootElement();jr(o,"bpmn:Collaboration")?i=o:(i=n.makeCollaboration(),t.process=r),t.parent=i}as.call(this,t),t.on(["create.start","shape.move.start"],Pl,(function(t){var n=t.context,i=n.shape,r=e.getRootElement();if(jr(i,"bpmn:Participant")&&jr(r,"bpmn:Process")&&r.children.length){var o=r.children.filter((function(e){return!jr(e,"bpmn:Group")&&!xo(e)&&!function(e){return!!e.waypoints}(e)}));if(o.length){var a=mt(o);G(i,function(e,t){t={width:t.width+40+30,height:t.height+40};var n=Math.max(e.width,t.width),i=Math.max(e.height,t.height);return{x:-n/2,y:-i/2,width:n,height:i}}(i,a)),n.createConstraints=function(e,t){return{bottom:(t=hn(t)).top+e.height/2-Cl,left:t.right-e.width/2+Sl,top:t.bottom-e.height/2+Cl,right:t.left+e.width/2-Sl-30}}(i,a)}}})),t.on("create.start",Pl,(function(n){var i=n.context.shape,r=e.getRootElement(),o=e.getGraphics(r);function a(e){e.element=r,e.gfx=o}jr(i,"bpmn:Participant")&&jr(r,"bpmn:Process")&&(t.on("element.hover",Pl,a),t.once("create.cleanup",(function(){t.off("element.hover",a)})))})),this.preExecute("shape.create",(function(e){var t=e.parent;jr(e.shape,"bpmn:Participant")&&jr(t,"bpmn:Process")&&i(e)}),!0),this.execute("shape.create",(function(e){var t=e.process,n=e.shape;t&&(e.oldProcessRef=n.businessObject.processRef,n.businessObject.processRef=t.businessObject)}),!0),this.revert("shape.create",(function(e){var t=e.process,n=e.shape;t&&(n.businessObject.processRef=e.oldProcessRef)}),!0),this.postExecute("shape.create",(function(e){var t=e.process,i=e.shape;if(t){var r=t.children.slice();n.moveElements(r,{x:0,y:0},i)}}),!0),this.preExecute("elements.create",Pl,(function(e){var t,n=e.elements,r=e.parent;Rl(n)&&jr(r,"bpmn:Process")&&(i(e),t=Rl(n),e.oldProcessRef=t.businessObject.processRef,t.businessObject.processRef=r.businessObject)}),!0),this.revert("elements.create",(function(e){var t=e.elements;e.process&&(Rl(t).businessObject.processRef=e.oldProcessRef)}),!0),this.postExecute("elements.create",(function(e){var t,i=e.elements,r=e.process;if(r){t=Rl(i);var o=r.children.slice();n.moveElements(o,{x:0,y:0},t)}}),!0)}function Rl(e){return x(e,(function(e){return jr(e,"bpmn:Participant")}))}Tl.$inject=["canvas","eventBus","modeling"],i(Tl,as);var Al="__targetRef_placeholder";function kl(e,t){function n(e,n){var i=e.get("properties"),r=x(i,(function(e){return e.name===Al}));return!r&&n&&wt(i,r=t.create("bpmn:Property",{name:Al})),r}function i(e,t){var i=n(e);i&&(function(e,t,n){return x(e.get("dataInputAssociations"),(function(e){return e!==n&&e.targetRef===t}))}(e,i,t)||_t(e.get("properties"),i))}function r(e){var t,r=e.context,o=r.connection,a=o.businessObject,s=o.target,c=s&&s.businessObject,p=r.newTarget,u=p&&p.businessObject,l=r.oldTarget||r.target,d=l&&l.businessObject,h=o.businessObject;d&&d!==c&&i(d,a),u&&u!==c&&i(u,a),c?(t=n(c,!0),h.targetRef=t):h.targetRef=null}as.call(this,e),this.executed(["connection.create","connection.delete","connection.move","connection.reconnect"],Ml(r)),this.reverted(["connection.create","connection.delete","connection.move","connection.reconnect"],Ml(r))}function Ml(e){return function(t){if(jr(t.context.connection,"bpmn:DataInputAssociation"))return e(t)}}function Dl(e){this._bpmnUpdater=e}function Bl(e,t,n,i){function r(e){return e.children.filter((function(e){return jr(e,"bpmn:DataStoreReference")&&!e.labelTarget}))}function o(e,i){var r=e.businessObject||e;if(i=i||n.filter((function(e){return jr(e,"bpmn:Participant")&&Or(e).processRef}))[0]){var o=i.businessObject||i;t.execute("dataStore.updateContainment",{dataStoreBo:r,newSemanticParent:o.processRef||o,newDiParent:o.di})}}as.call(this,i),t.registerHandler("dataStore.updateContainment",Dl),this.preExecute("shape.create",(function(e){var t=e.context,n=t.shape;jr(n,"bpmn:DataStoreReference")&&"label"!==n.type&&(t.hints||(t.hints={}),t.hints.autoResize=!1)})),this.preExecute("elements.move",(function(e){var t=e.context,n=t.shapes;n.filter((function(e){return jr(e,"bpmn:DataStoreReference")})).length&&(t.hints||(t.hints={}),t.hints.autoResize=n.filter((function(e){return!jr(e,"bpmn:DataStoreReference")})))})),this.postExecute("shape.create",(function(e){var t=e.context.shape,n=t.parent;jr(t,"bpmn:DataStoreReference")&&"label"!==t.type&&jr(n,"bpmn:Collaboration")&&o(t)})),this.postExecute("shape.move",(function(e){var t=e.context,n=t.shape,i=t.oldParent,r=n.parent;jr(i,"bpmn:Collaboration")||jr(n,"bpmn:DataStoreReference")&&"label"!==n.type&&jr(r,"bpmn:Collaboration")&&o(n,jr(i,"bpmn:Participant")?i:function(e,t){for(;e.parent;){if(jr(e.parent,t))return e.parent;e=e.parent}}(i,"bpmn:Participant"))})),this.postExecute("shape.delete",(function(t){var n=t.context.shape,i=e.getRootElement();Ja(n,["bpmn:Participant","bpmn:SubProcess"])&&jr(i,"bpmn:Collaboration")&&r(i).filter((function(e){return function(e,t){var n=e.businessObject||e,i=t.businessObject||t;for(;n.$parent;){if(n.$parent===i.processRef||i)return!0;n=n.$parent}return!1}(e,n)})).forEach((function(e){o(e)}))})),this.postExecute("canvas.updateRoot",(function(e){var t=e.context,n=t.oldRoot,i=t.newRoot;r(n).forEach((function(e){jr(i,"bpmn:Process")&&o(e,i)}))}))}kl.$inject=["eventBus","bpmnFactory"],i(kl,as),Dl.$inject=["bpmnUpdater"],Dl.prototype.execute=function(e){var t=e.dataStoreBo,n=e.newSemanticParent,i=e.newDiParent;e.oldSemanticParent=t.$parent,e.oldDiParent=t.di.$parent,this._bpmnUpdater.updateSemanticParent(t,n),this._bpmnUpdater.updateDiParent(t.di,i)},Dl.prototype.revert=function(e){var t=e.dataStoreBo,n=e.oldSemanticParent,i=e.oldDiParent;this._bpmnUpdater.updateSemanticParent(t,n),this._bpmnUpdater.updateDiParent(t.di,i)},Bl.$inject=["canvas","commandStack","elementRegistry","eventBus"],i(Bl,as);function jl(e,t,n){as.call(this,e),this.postExecuted("shape.delete",500,(function(e){var t=e.context,i=t.hints,r=t.shape,o=t.oldParent;jr(r,"bpmn:Lane")&&(i&&i.nested||function(e,t){var i,r,o,a=eu(t),s=[],c=[];ht(a,(function(t){return t.y>e.y?c.push(t):s.push(t),t.children})),a.length&&(i=c.length&&s.length?e.height/2:e.height,s.length&&(r=n.calculateAdjustments(s,"y",i,e.y-10),n.makeSpace(r.movingShapes,r.resizingShapes,{x:0,y:i},"s")),c.length&&(o=n.calculateAdjustments(c,"y",-i,e.y+e.height+10),n.makeSpace(o.movingShapes,o.resizingShapes,{x:0,y:-i},"n")))}(r,o))}))}jl.$inject=["eventBus","modeling","spaceTool"],i(jl,as);function Ol(e,t){t.invoke(as,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",500,(function(e){var t=e.elements;t.filter((function(e){return Nl(e,e.host)})).map((function(e){return t.indexOf(e)})).forEach((function(i){e.elements[i]=n.replaceShape(t[i])}))}),!0),this.preExecute("elements.move",500,(function(e){var t=e.shapes,i=e.newHost;t.forEach((function(e,r){var o,a=e.host;Nl(e,(o=a,-1!==t.indexOf(o)?a:i))&&(t[r]=n.replaceShape(e))}))}),!0)}function Nl(e,t){return!xo(e)&&jr(e,"bpmn:BoundaryEvent")&&!t}function Ll(e,t,n){function i(e,i,r){var o,a,s,c,p,u,l,d,h=i.waypoints,f=e.outgoing.slice(),v=e.incoming.slice(),g=Ts(h,d=m(r.width)?mn(r):r);if(g){if(o=h.slice(0,g.index),a=h.slice(g.index+(g.bendpoint?1:0)),!o.length||!a.length)return;s=g.bendpoint?h[g.index]:d,Il(e,o[o.length-1])||o.push(zl(s)),Il(e,a[0])||a.unshift(zl(s))}c=i.source,p=i.target,t.canConnect(c,e,i)&&(n.reconnectEnd(i,e,o||d),u=i),t.canConnect(e,p,i)&&(u?l=n.connect(e,p,{type:i.type,waypoints:a}):(n.reconnectStart(i,e,a||d),l=i));var y=[].concat(u&&w(v,(function(e){return e.source===u.source}))||[],l&&w(f,(function(e){return e.target===l.target}))||[]);y.length&&n.removeElements(y)}as.call(this,e),this.preExecute("elements.move",(function(e){var n=e.newParent,i=e.shapes,r=e.delta,o=i[0];if(o&&n){n&&n.waypoints&&(e.newParent=n=n.parent);var a=mn(o),s={x:a.x+r.x,y:a.y+r.y},c=x(n.children,(function(e){return t.canInsert(i,e)&&Ts(e.waypoints,s)}));c&&(e.targetFlow=c,e.position=s)}}),!0),this.postExecuted("elements.move",(function(e){var t=e.shapes,n=e.targetFlow,r=e.position;n&&i(t[0],n,r)}),!0),this.preExecute("shape.create",(function(e){var n=e.parent,i=e.shape;t.canInsert(i,n)&&(e.targetFlow=n,e.parent=n.parent)}),!0),this.postExecuted("shape.create",(function(e){var t=e.shape,n=e.targetFlow,r=e.position;n&&i(t,n,r)}),!0)}function Il(e,t){var n=t.x,i=t.y;return n>=e.x&&n<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}function zl(e){return G({},e)}function Fl(e,t){as.call(this,e),this.preExecuted("connection.create",(function(e){var n=e.context,i=n.source,r=n.target,o=r.incoming.slice();n.hints&&!1===n.hints.createElementsBehavior||jr(i,"bpmn:EventBasedGateway")&&r.incoming.length&&o.filter($l).forEach((function(e){t.removeConnection(e)}))})),this.preExecuted("shape.replace",(function(e){var n=e.context.newShape;jr(n,"bpmn:EventBasedGateway")&&n.outgoing.filter($l).map((function(e){return e.target})).reduce((function(e,t){var n=t.incoming.filter($l);return e.concat(n)}),[]).forEach((function(e){e.source!==n&&t.removeConnection(e)}))}))}function $l(e){return jr(e,"bpmn:SequenceFlow")}Ol.$inject=["bpmnReplace","injector"],i(Ol,as),Ol.prototype.replaceShape=function(e){var t,n,i=(n=Or(e).eventDefinitions)&&n[0];return t=i?{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:i.$type}:{type:"bpmn:IntermediateThrowEvent"},this._bpmnReplace.replaceElement(e,t,{layoutConnection:!1})},i(Ll,as),Ll.$inject=["eventBus","bpmnRules","modeling"],Fl.$inject=["eventBus","modeling"],i(Fl,as);function Vl(e,t,n,i,r,o){function a(){return Or(t.getRootElement()).$parent}function s(e){var t=Or(e).categoryValueRef;if(t){var n=t.$parent;t&&(_t(n.categoryValue,t),n&&!n.categoryValue.length&&function(e){_t(a().get("rootElements"),e)}(n))}}r.invoke(as,this),this.executed("shape.delete",(function(e){var t,i=e.context.shape;if(jr(i,"bpmn:Group")){var r=Or(i).categoryValueRef,o=n.filter((function(e){return jr(e,"bpmn:Group")}));t=r,o.some((function(e){var n=Or(e);return n.categoryValueRef&&n.categoryValueRef===t}))||s(i)}})),this.reverted("shape.delete",(function(e){var t=e.context.shape;if(jr(t,"bpmn:Group")){var n=Or(t).categoryValueRef,i=a(),r=n?n.$parent:null;wt(r.get("categoryValue"),n),wt(i.get("rootElements"),r)}})),this.execute("shape.create",(function(t){var n=Or(t.context.shape);if(jr(n,"bpmn:Group")&&!n.categoryValueRef){var i=nl(a(),e);n.categoryValueRef=i}})),this.revert("shape.create",(function(e){var t=e.context.shape;jr(t,"bpmn:Group")&&(s(t),delete Or(t).categoryValueRef)})),i.on("moddleCopy.canCopyProperty",2e3,(function(t){var n,i=t.property;if(jr(i,"bpmn:CategoryValue"))return n=nl(a(),e),o.copyElement(i,n)}))}function Hl(e,t,n,i){var r,o,a,s;return 0==(r=(i.y-n.y)*(t.x-e.x)-(i.x-n.x)*(t.y-e.y))?null:(o=e.y-n.y,a=e.x-n.x,s=((i.x-n.x)*o-(i.y-n.y)*a)/r,{x:Math.round(e.x+s*(t.x-e.x)),y:Math.round(e.y+s*(t.y-e.y))})}function Gl(e){function t(e,t,n){var i,r={x:n.x,y:n.y-50},o={x:n.x-50,y:n.y},a=Hl(e,t,n,r),s=Hl(e,t,n,o);i=a&&s?Wl(a,n)>Wl(s,n)?s:a:a||s,e.original=i}e.on("bpmnElement.added",(function(e){var n,i,r=e.element;r.waypoints&&(t((i=(n=r).waypoints)[0],i[1],mn(n.source)),t(i[i.length-1],i[i.length-2],mn(n.target)))}))}function Wl(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ql(e){as.call(this,e);var t=["bpmn:Participant","bpmn:Lane"];this.executed(["shape.move","shape.create","shape.resize"],(function(e){var n=Or(e.context.shape);Ja(n,t)&&!n.di.get("isHorizontal")&&n.di.set("isHorizontal",!0)}))}function Ul(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}function Yl(e){return Math.atan((e[1].y-e[0].y)/(e[1].x-e[0].x))}function Kl(e,t){var n=t[0],i=t[1],r={x:i.x-n.x,y:i.y-n.y},o=function(e,t,n){var i=[{n:e[0]-n[0],lambda:t[0]},{n:e[1]-n[1],lambda:t[1]}];return-(i[0].n*t[0]+i[1].n*t[1])/(i[0].lambda*t[0]+i[1].lambda*t[1])}([n.x,n.y],[r.x,r.y],[e.x,e.y]);return{x:n.x+o*r.x,y:n.y+o*r.y}}function Xl(e,t){var n=Kl(e,t);return Ul({x:n.x-e.x,y:n.y-e.y})}function Zl(e,t){return Ul({x:e.x-t.x,y:e.y-t.y})}Vl.$inject=["bpmnFactory","canvas","elementRegistry","eventBus","injector","moddleCopy"],i(Vl,as),Gl.$inject=["eventBus"],ql.$inject=["eventBus"],i(ql,as);var Ql=Math.sqrt,Jl=Math.min,ed=Math.max,td=Math.abs;function nd(e){return Math.pow(e,2)}function id(e,t){return Ql(nd(e.x-t.x)+nd(e.y-t.y))}function rd(e,t,n,i){var r=t.x-e.x,o=t.y-e.y,a=n.x-e.x,s=n.y-e.y,c=r*r+o*o,p=(r*a+o*s)/c,u=p*p-(a*a+s*s-i*i)/c;if(u<0&&u>-1e-6&&(u=0),u<0)return[];var l=Ql(u),d=-p+l,h=-p-l,f={x:e.x-r*d,y:e.y-o*d};return 0===u?[f]:[f,{x:e.x-r*h,y:e.y-o*h}].filter((function(n){return function(e,t,n){return od(e.x,t.x,n.x)&&od(e.y,t.y,n.y)}(n,e,t)}))}function od(e,t,n){return e>=Jl(t,n)-ad&&e<=ed(t,n)+ad}var ad=.1;function sd(e,t){return td(e.x-t.x)<=ad&&td(e.y-t.y)<=ad}function cd(e,t,n,i){var r=0,o=0,a=function(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}(e),s=function(e,t){var n,i,r,o,a,s,c,p,u,l,d,h,f=0;for(f=0;f<t.length-1;f++){if(sd(n=t[f],i=t[f+1])?s=[n]:(r=id(e,n),o=id(e,i),s=rd(n,i,e,Jl(r,o))),s.length<1)throw new Error("expected between [1, 2] circle -> line intersections");1===s.length&&(c={type:"bendpoint",position:s[0],segmentIndex:f,bendpointIndex:sd(n,s[0])?f:f+1}),2===s.length&&(d=s[0],h=s[1],c={type:"segment",position:a={x:(d.x+h.x)/2,y:(d.y+h.y)/2},segmentIndex:f,relativeLocation:id(n,a)/id(n,i)}),p=id(c.position,e),(!l||u>p)&&(l=c,u=p)}return l}(a,n),c=s.segmentIndex,p=function(e,t,n,i){var r=n.segmentIndex,o=t.length-e.length;if(i.segmentMove){var a=i.segmentMove.segmentStartIndex,s=i.segmentMove.newSegmentStartIndex;return r===a?s:r>=s?r+o<s?s:r+o:r}if(i.bendpointMove){var c,p=i.bendpointMove.insert,u=i.bendpointMove.bendpointIndex;return 0===o?r:(r>=u&&(c=p?r+1:r-1),r<u&&(c=r,p&&"bendpoint"!==n.type&&u-1===r&&pd(t,u)<n.relativeLocation&&c++),c)}return 0===o?r:i.connectionStart?0===r?0:null:i.connectionEnd&&r===e.length-2?t.length-2:null}(n,t,s,i);if(null===p)return{x:r,y:o};if(p<0||p>t.length-2)return{x:r,y:o};var u,l,d=ud(n,c),h=ud(t,p),f=s.position,m=function(e,t){var n=Zl(e[0],e[1]),i=Zl(e[0],t);return 0===n?0:i/n}(d,f),v=(u=h,l=Yl(d),Yl(u)-l);if("bendpoint"===s.type){var g=t.length-n.length,y=s.bendpointIndex,b=n[y];if(-1!==t.indexOf(b))return{x:r,y:o};if(0===g){var x=t[y];return{x:x.x-s.position.x,y:x.y-s.position.y}}g<0&&0!==y&&y<n.length-1&&(m=pd(n,y))}var _,w,E=(h[1].x-h[0].x)*m+h[0].x,S=(h[1].y-h[0].y)*m+h[0].y,C=(_={x:a.x-f.x,y:a.y-f.y},(w=v)?{x:Math.cos(w)*_.x-Math.sin(w)*_.y,y:Math.sin(w)*_.x+Math.cos(w)*_.y}:_);return dn({x:r=E+C.x-a.x,y:o=S+C.y-a.y})}function pd(e,t){var n=Zl(e[t-1],e[t]);return n/(n+Zl(e[t],e[t+1]))}function ud(e,t){return[e[t],e[t+1]]}function ld(e,t,n){var i=xa(t),r=xa(n),o=_a(e,i),a=o.x*(n.width/t.width),s=o.y*(n.height/t.height);return dn({x:r.x+a,y:r.y+s})}function dd(e,t,n){var i=xa(e),r=xa(t),o=xa(n),a=_a(e,i),s=_a(i,r),c=function(e,t,n){var i=hn(t),r=hn(n);if(function(e,t){return function(e,t){return e.right!==t.right&&e.left!==t.left}(e,t)||function(e,t){return e.top!==t.top&&e.bottom!==t.bottom}(e,t)}(i,r))return null;var o,a,s=vn(t,e);if("top"===s)o={x:0,y:r.bottom-i.bottom};else if("bottom"===s)o={x:0,y:r.top-i.top};else if("right"===s)o={x:r.left-i.left,y:0};else{if("left"!==s)return null;o={x:r.right-i.right,y:0}}if(a={x:e.x+o.x,y:e.y+o.y},vn(n,a)!==s)return null;return o}(i,t,n);if(c)return c;var p=s.x*(n.width/t.width),u=s.y*(n.height/t.height),l=o.x+p,d=o.y+u;return dn({x:l+a.x-e.x,y:d+a.y-e.y})}var hd={width:90,height:20},fd="name",md="text";function vd(e,t,n,i){as.call(this,e),this.postExecute("element.updateProperties",(function(e){var n=e.context,r=n.element,o=n.properties;if(fd in o&&t.updateLabel(r,o.name),md in o&&jr(r,"bpmn:TextAnnotation")){var a=i.getTextAnnotationBounds({x:r.x,y:r.y,width:r.width,height:r.height},o.text||"");t.updateLabel(r,o.text,a)}})),this.postExecute(["shape.create","connection.create"],(function(e){var n=e.context;if(!1!==(n.hints||{}).createElementsBehavior){var r=n.shape||n.connection,o=r.businessObject;if(!xo(r)&&vo(r)&&qr(r)){var a=bo(r),s=i.getExternalLabelBounds(hd,qr(r));t.createLabel(r,a,{id:o.id+"_label",businessObject:o,width:s.width,height:s.height})}}})),this.postExecute("shape.delete",(function(e){var n=e.context,i=n.labelTarget,r=n.hints||{};i&&!1!==r.unsetLabel&&t.updateLabel(i,null,null,{removeShape:!1})})),this.postExecute(["label.create"],(function(e){var t,i=e.context.shape;i.labelTarget&&jr(i.labelTarget||i,"bpmn:BaseElement")&&((t=i.businessObject.di).label||(t.label=n.create("bpmndi:BPMNLabel",{bounds:n.create("dc:Bounds")})),G(t.label.bounds,{x:i.x,y:i.y,width:i.width,height:i.height}))})),this.postExecute(["connection.layout","connection.updateWaypoints"],(function(e){var n=e.context;if(!1!==(n.hints||{}).labelBehavior){var i,r=n.connection.label;r&&r.parent&&(i=function(e){var t=e.context,n=t.connection,i=n.label,r=G({},t.hints),o=t.newWaypoints||n.waypoints,a=t.oldWaypoints;return void 0===r.startChanged&&(r.startChanged=!!r.connectionStart),void 0===r.endChanged&&(r.endChanged=!!r.connectionEnd),cd(i,o,a,r)}(e),t.moveShape(r,i))}})),this.postExecute(["shape.replace"],(function(e){var t=e.context,n=t.newShape,i=t.oldShape,r=Or(n);r&&vo(r)&&i.label&&n.label&&(n.label.x=i.label.x,n.label.y=i.label.y)})),this.postExecute("shape.resize",(function(e){var n,i=e.context,r=i.shape,o=i.newBounds,a=i.oldBounds;if(go(r)){var s=r.label,c=gd(function(e,t){if(!t.length)return;var n=function(e,t){return O(t.map((function(t){return{line:t,distance:Xl(e,t)}})),"distance")[0].line}(e,t);return Kl(e,n)}(mn(s),[[{x:(n=a).x,y:n.y},{x:n.x+(n.width||0),y:n.y}],[{x:n.x+(n.width||0),y:n.y},{x:n.x+(n.width||0),y:n.y+(n.height||0)}],[{x:n.x,y:n.y+(n.height||0)},{x:n.x+(n.width||0),y:n.y+(n.height||0)}],[{x:n.x,y:n.y},{x:n.x,y:n.y+(n.height||0)}]]),a,o);t.moveShape(s,c)}}))}function gd(e,t,n){return dn(_a(ld(e,t,n),e))}function yd(e,t,n){var i=Ed(e),r=Sd(i,t),o=i[0];return r.length?r[r.length-1]:ld(o.original||o,n,t)}function bd(e,t,n){var i=Ed(e),r=Sd(i,t),o=i[i.length-1];return r.length?r[0]:ld(o.original||o,n,t)}function xd(e,t,n){var i=Ed(e),r=wd(t,n),o=i[0];return ld(o.original||o,r,t)}function _d(e,t,n){var i=Ed(e),r=wd(t,n),o=i[i.length-1];return ld(o.original||o,r,t)}function wd(e,t){return{x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}}function Ed(e){var t=e.waypoints;if(!t.length)throw new Error("connection#"+e.id+": no waypoints");return t}function Sd(e,t){return w(R(e,Cd),(function(e){return function(e,t){return"intersect"===vn(t,e,1)}(e,t)}))}function Cd(e){return e.original||e}function Pd(e,t){as.call(this,e),this.postExecute("shape.replace",(function(e){var n=e.oldShape,i=e.newShape;if(function(e,t){return jr(e,"bpmn:Participant")&&Lr(e)&&jr(t,"bpmn:Participant")&&!Lr(t)}(n,i)){var r,o,a,s,c=(o=ft([r=n],!1),a=[],s=[],o.forEach((function(e){e!==r&&(e.incoming.forEach((function(e){jr(e,"bpmn:MessageFlow")&&a.push(e)})),e.outgoing.forEach((function(e){jr(e,"bpmn:MessageFlow")&&s.push(e)})))}),[]),{incoming:a,outgoing:s});c.incoming.forEach((function(e){var r=bd(e,i,n);t.reconnectEnd(e,i,r)})),c.outgoing.forEach((function(e){var r=yd(e,i,n);t.reconnectStart(e,i,r)}))}}),!0)}i(vd,as),vd.$inject=["eventBus","modeling","bpmnFactory","textRenderer"],Pd.$inject=["eventBus","modeling"],i(Pd,as);function Td(e,t,n){e.on(["shape.move.rejected","create.rejected"],(function(e){var i,r,o,a=e.context,s=a.shape;jr(a.target,"bpmn:Collaboration")&&jr(s,"bpmn:FlowNode")&&(i=e,r=n("flow elements must be children of pools/participants"),t.add({position:{x:i.x+5,y:i.y+5},type:"error",timeout:o||2e3,html:"<div>"+r+"</div>"}))}))}function Rd(e,t,n,i){as.call(this,e);var r=i.get("dragging",!1);function o(e){var i,r,o=e.source,a=e.target;e.parent&&(jr(e,"bpmn:SequenceFlow")&&(n.canConnectSequenceFlow(o,a)||(r=!0),n.canConnectMessageFlow(o,a)&&(i="bpmn:MessageFlow")),jr(e,"bpmn:MessageFlow")&&(n.canConnectMessageFlow(o,a)||(r=!0),n.canConnectSequenceFlow(o,a)&&(i="bpmn:SequenceFlow")),jr(e,"bpmn:Association")&&!n.canConnectAssociation(o,a)&&(r=!0),r&&t.removeConnection(e),i&&t.connect(o,a,{type:i,waypoints:e.waypoints.slice()}))}this.postExecuted("elements.move",(function(e){E(e.closure.allConnections,o)}),!0),this.preExecute("connection.reconnect",(function(e){var i,o,a=e.context,s=a.connection,c=a.newSource||s.source,p=a.newTarget||s.target;(i=n.canConnect(c,p))&&i.type!==s.type&&(o=t.connect(c,p,{type:i.type,waypoints:s.waypoints.slice()}),t.removeConnection(s),a.connection=o,r&&function(e,t){var n,i=r.context(),o=i&&i.payload.previousSelection;if(!o||!o.length)return;if(-1===(n=o.indexOf(e)))return;o.splice(n,1,t)}(s,o))})),this.postExecuted("element.updateProperties",(function(e){var n,i=e.context,r=i.properties,o=i.element,a=o.businessObject;r.default&&(n=x(o.outgoing,N({id:o.businessObject.default.id})))&&t.updateProperties(n,{conditionExpression:void 0}),r.conditionExpression&&a.sourceRef.default===a&&t.updateProperties(o.source,{default:void 0})}))}function Ad(e,t){as.call(this,e),this.preExecute("shape.delete",(function(e){var t=e.shape,n=t.parent;jr(t,"bpmn:Participant")&&(e.collaborationRoot=n)}),!0),this.postExecute("shape.delete",(function(e){var n=e.collaborationRoot;n&&!n.businessObject.participants.length&&t.makeProcess()}),!0)}function kd(e,t,n,i,r,o){i.invoke(as,this),this._bpmnReplace=e,this._elementRegistry=n,this._selection=o,this.postExecuted(["elements.create"],500,(function(e){var n=e.context,i=n.parent,r=n.elements,o=t.canReplace(r,i);o&&this.replaceElements(r,o.replacements)}),this),this.postExecuted(["elements.move"],500,(function(e){var n=e.context,i=n.newParent,r=n.newHost,o=[];E(n.closure.topLevel,(function(e){o=zr(e)?o.concat(e.children):o.concat(e)})),1===o.length&&r&&(i=r);var a=t.canReplace(o,i);a&&this.replaceElements(o,a.replacements,r)}),this),this.postExecute(["shape.replace"],1500,(function(e){var n,i=e.context,r=i.oldShape,o=i.newShape,a=r.attachers;a&&a.length&&(n=t.canReplace(a,o),this.replaceElements(a,n.replacements))}),this),this.postExecuted(["shape.replace"],1500,(function(e){var t=e.context,n=t.oldShape,i=t.newShape;r.unclaimId(n.businessObject.id,n.businessObject),r.updateProperties(i,{id:n.id})}))}Td.$inject=["eventBus","tooltips","translate"],i(Rd,as),Rd.$inject=["eventBus","modeling","bpmnRules","injector"],Ad.$inject=["eventBus","modeling"],i(Ad,as),i(kd,as),kd.prototype.replaceElements=function(e,t){var n=this._elementRegistry,i=this._bpmnReplace,r=this._selection;E(t,(function(t){var r={type:t.newElementType},o=n.get(t.oldElementId),a=e.indexOf(o);e[a]=i.replaceElement(o,r,{select:!1})})),t&&r.select(e)},kd.$inject=["bpmnReplace","bpmnRules","elementRegistry","injector","modeling","selection"];var Md=300,Dd=60,Bd={width:300,height:150},jd={width:140,height:120},Od={width:50,height:30};function Nd(e){e.on("resize.start",1500,(function(e){var t=e.context,n=t.shape,i=t.direction,r=t.balanced;(jr(n,"bpmn:Lane")||jr(n,"bpmn:Participant"))&&(t.resizeConstraints=function(e,t,n){var i=tu(e),r=!0,o=!0,a=Jp(i,[i]),s=hn(e),c={},p={};/e/.test(t)?p.right=s.left+Md:/w/.test(t)&&(p.left=s.right-Md);return a.forEach((function(e){var i=hn(e);/n/.test(t)&&(i.top<s.top-10&&(r=!1),n&&Ld(s.top-i.bottom)<10&&Vd(c,"top",i.top+Dd),Ld(s.top-i.top)<5&&$d(p,"top",i.bottom-Dd)),/s/.test(t)&&(i.bottom>s.bottom+10&&(o=!1),n&&Ld(s.bottom-i.top)<10&&$d(c,"bottom",i.bottom-Dd),Ld(s.bottom-i.bottom)<5&&Vd(p,"bottom",i.top+Dd))})),i.children.filter((function(e){return!e.hidden&&!e.waypoints&&(jr(e,"bpmn:FlowElement")||jr(e,"bpmn:Artifact"))})).forEach((function(e){var n=hn(e);r&&/n/.test(t)&&$d(p,"top",n.top-20),/e/.test(t)&&Vd(p,"right",n.right+20),o&&/s/.test(t)&&Vd(p,"bottom",n.bottom+20),/w/.test(t)&&$d(p,"left",n.left-50)})),{min:p,max:c}}(n,i,r)),jr(n,"bpmn:Participant")&&(t.minDimensions=Bd),jr(n,"bpmn:SubProcess")&&Lr(n)&&(t.minDimensions=jd),jr(n,"bpmn:TextAnnotation")&&(t.minDimensions=Od)}))}Nd.$inject=["eventBus"];var Ld=Math.abs,Id=Math.min,zd=Math.max;function Fd(e,t,n,i){var r=e[t];e[t]=void 0===r?n:i(n,r)}function $d(e,t,n){return Fd(e,t,n,Id)}function Vd(e,t,n){return Fd(e,t,n,zd)}function Hd(e,t){e.on("resize.start",1501,(function(e){var t=e.context,n=t.shape;(jr(n,"bpmn:Lane")||jr(n,"bpmn:Participant"))&&(t.balanced=!Do(e))})),e.on("resize.end",1001,(function(e){var n=e.context,i=n.shape,r=n.canExecute,o=n.newBounds;if(jr(i,"bpmn:Lane")||jr(i,"bpmn:Participant"))return r&&(o=ln(o),t.resizeLane(i,o,n.balanced)),!1}))}function Gd(e,t,n){as.call(this,e),this.preExecute("shape.delete",(function(e){var i=e.context.shape;if(1===i.incoming.length&&1===i.outgoing.length){var r=i.incoming[0],o=i.outgoing[0];if(jr(r,"bpmn:SequenceFlow")&&jr(o,"bpmn:SequenceFlow")&&t.canConnect(r.source,o.target,r)){var a=function(e,t){var n=Hl(Wd(e[e.length-2]),Wd(e[e.length-1]),Wd(t[1]),Wd(t[0]));return n?[].concat(e.slice(0,e.length-1),[n],t.slice(1)):[Wd(e[0]),Wd(t[t.length-1])]}(r.waypoints,o.waypoints);n.reconnectEnd(r,o.target,a)}}}))}function Wd(e){return e.original||e}Hd.$inject=["eventBus","modeling"],i(Gd,as),Gd.$inject=["eventBus","bpmnRules","modeling"];var qd=Math.max;function Ud(e){e.on("spaceTool.getMinDimensions",(function(e){var t=e.shapes,n=e.axis,i=e.start,r={};return E(t,(function(e){var t=e.id;jr(e,"bpmn:Participant")&&(!function(e){return"x"===e}(n)?r[t]={width:Bd.width,height:Yd(e,i)}:r[t]=Bd),jr(e,"bpmn:SubProcess")&&Lr(e)&&(r[t]=jd),jr(e,"bpmn:TextAnnotation")&&(r[t]=Od)})),r}))}function Yd(e,t){var n;return eu(e).length?(n=function(e,t){var n,i=eu(e);return n=Kd(i,t),e.height-n.height+Dd}(e,t),qd(Bd.height,n)):Bd.height}function Kd(e,t){var n,i,r;for(n=0;n<e.length;n++)if(t>=(i=e[n]).y&&t<=i.y+i.height)return(r=eu(i)).length?Kd(r,t):i}function Xd(e,t){e.invoke(as,this),this.postExecuted("shape.replace",(function(e){var n=e.context.oldShape,i=e.context.newShape;if(jr(i,"bpmn:SubProcess")&&jr(n,"bpmn:Task")&&Lr(i)){var r,o={x:(r=i).x+r.width/6,y:r.y+r.height/2};t.createShape({type:"bpmn:StartEvent"},o,i)}}))}Ud.$inject=["eventBus"],Xd.$inject=["injector","modeling"],i(Xd,as);function Zd(e,t,n,i){as.call(this,e),this.executed(["shape.toggleCollapse"],500,(function(e){var t,n=e.context.shape;jr(n,"bpmn:SubProcess")&&(n.collapsed?Or(n).di.isExpanded=!1:((t=n.children).length&&t.forEach((function(e){"label"!==e.type||e.businessObject.name||(e.hidden=!0)})),Or(n).di.isExpanded=!0))})),this.reverted(["shape.toggleCollapse"],500,(function(e){var t=e.context.shape;t.collapsed?Or(t).di.isExpanded=!1:Or(t).di.isExpanded=!0})),this.postExecuted(["shape.toggleCollapse"],500,(function(e){var i,r=e.context.shape,o=t._getDefaultSize(r);i=r.collapsed?function(e,t){return{x:e.x+(e.width-t.width)/2,y:e.y+(e.height-t.height)/2,width:t.width,height:t.height}}(r,o):function(e,t){var n,i,r=e.children,o=t;return(n=Kp((i=r,i.filter((function(e){return!e.hidden}))).concat([e])))?(o.width=Math.max(n.width,o.width),o.height=Math.max(n.height,o.height),o.x=n.x+(n.width-o.width)/2,o.y=n.y+(n.height-o.height)/2):(o.x=e.x+(e.width-o.width)/2,o.y=e.y+(e.height-o.height)/2),o}(r,o),n.resizeShape(r,i,null,{autoResize:!r.collapsed&&"nwse"})}))}function Qd(e,t,n,i){t.invoke(as,this),this.preExecute("shape.delete",(function(e){var t=e.context.shape,r=t.businessObject;xo(t)||(jr(t,"bpmn:Participant")&&Lr(t)&&n.ids.unclaim(r.processRef.id),i.unclaimId(r.id,r))})),this.preExecute("connection.delete",(function(e){var t=e.context.connection.businessObject;i.unclaimId(t.id,t)})),this.preExecute("canvas.updateRoot",(function(){var t=e.getRootElement().businessObject;n.ids.unclaim(t.id)}))}i(Zd,as),Zd.$inject=["eventBus","elementFactory","modeling"],i(Qd,as),Qd.$inject=["canvas","injector","moddle","modeling"];function Jd(e,t,n){var i;function r(){if(!i)throw new Error(n("out of bounds release"));return i}as.call(this,e);var o=["spaceTool","lane.add","lane.resize","lane.split","elements.create","elements.delete","elements.move","shape.create","shape.delete","shape.move","shape.resize"];this.preExecute(o,5e3,(function(e){(i=i||new eh).enter()})),this.postExecuted(o,500,(function(e){!function(){if(!i)throw new Error(n("out of bounds release"));var e=i.leave();e&&(t.updateLaneRefs(i.flowNodes,i.lanes),i=null)}()})),this.preExecute(["shape.create","shape.move","shape.delete","shape.resize"],(function(e){var t=e.context.shape,n=r();t.labelTarget||(jr(t,"bpmn:Lane")&&n.addLane(t),jr(t,"bpmn:FlowNode")&&n.addFlowNode(t))}))}function eh(){this.flowNodes=[],this.lanes=[],this.counter=0,this.addLane=function(e){this.lanes.push(e)},this.addFlowNode=function(e){this.flowNodes.push(e)},this.enter=function(){this.counter++},this.leave=function(){return this.counter--,!this.counter}}function th(e,t){as.call(this,e),this.preExecute("connection.delete",(function(e){var n=e.context.connection,i=n.source;(function(e,t){if(!jr(e,"bpmn:SequenceFlow"))return!1;var n=Or(t),i=Or(e);return n.get("default")===i})(n,i)&&t.updateProperties(i,{default:null})}))}Jd.$inject=["eventBus","modeling","translate"],i(Jd,as),i(th,as),th.$inject=["eventBus","modeling"];var nh={__init__:["adaptiveLabelPositioningBehavior","appendBehavior","associationBehavior","attachEventBehavior","boundaryEventBehavior","rootElementReferenceBehavior","createBehavior","fixHoverBehavior","createDataObjectBehavior","createParticipantBehavior","dataStoreBehavior","dataInputAssociationBehavior","deleteLaneBehavior","detachEventBehavior","dropOnFlowBehavior","eventBasedGatewayBehavior","groupBehavior","importDockingFix","isHorizontalFix","labelBehavior","messageFlowBehavior","modelingFeedback","removeElementBehavior","removeParticipantBehavior","replaceConnectionBehavior","replaceElementBehaviour","resizeBehavior","resizeLaneBehavior","toggleElementCollapseBehaviour","spaceToolBehavior","subProcessStartEventBehavior","unclaimIdBehavior","unsetDefaultFlowBehavior","updateFlowNodeRefsBehavior"],adaptiveLabelPositioningBehavior:["type",dl],appendBehavior:["type",fl],associationBehavior:["type",ml],attachEventBehavior:["type",vl],boundaryEventBehavior:["type",yl],rootElementReferenceBehavior:["type",bl],createBehavior:["type",xl],fixHoverBehavior:["type",wl],createDataObjectBehavior:["type",El],createParticipantBehavior:["type",Tl],dataInputAssociationBehavior:["type",kl],dataStoreBehavior:["type",Bl],deleteLaneBehavior:["type",jl],detachEventBehavior:["type",Ol],dropOnFlowBehavior:["type",Ll],eventBasedGatewayBehavior:["type",Fl],groupBehavior:["type",Vl],importDockingFix:["type",Gl],isHorizontalFix:["type",ql],labelBehavior:["type",vd],messageFlowBehavior:["type",Pd],modelingFeedback:["type",Td],replaceConnectionBehavior:["type",Rd],removeParticipantBehavior:["type",Ad],replaceElementBehaviour:["type",kd],resizeBehavior:["type",Nd],resizeLaneBehavior:["type",Hd],removeElementBehavior:["type",Gd],toggleElementCollapseBehaviour:["type",Zd],spaceToolBehavior:["type",Ud],subProcessStartEventBehavior:["type",Xd],unclaimIdBehavior:["type",Qd],updateFlowNodeRefsBehavior:["type",Jd],unsetDefaultFlowBehavior:["type",th]};function ih(e,t){var n=vn(e,t,-15);return"intersect"!==n?n:null}function rh(e){ps.call(this,e)}function oh(e){return!e||xo(e)}function ah(e){do{if(jr(e,"bpmn:Process"))return Or(e);if(jr(e,"bpmn:Participant"))return Or(e).processRef||Or(e)}while(e=e.parent)}function sh(e){return jr(e,"bpmn:TextAnnotation")}function ch(e){return jr(e,"bpmn:Group")&&!e.labelTarget}function ph(e){return jr(e,"bpmn:BoundaryEvent")&&dh(e,"bpmn:CompensateEventDefinition")}function uh(e){return Or(e).isForCompensation}function lh(e){for(var t=e;t=t.parent;){if(jr(t,"bpmn:FlowElementsContainer"))return Or(t);if(jr(t,"bpmn:Participant"))return Or(t).processRef}return null}function dh(e,t){return!!x(Or(e).eventDefinitions||[],(function(e){return jr(e,t)}))}function hh(e,t){return(Or(e).eventDefinitions||[]).every((function(e){return jr(e,t)}))}function fh(e){return jr(e,"bpmn:ReceiveTask")||jr(e,"bpmn:IntermediateCatchEvent")&&(dh(e,"bpmn:MessageEventDefinition")||dh(e,"bpmn:TimerEventDefinition")||dh(e,"bpmn:ConditionalEventDefinition")||dh(e,"bpmn:SignalEventDefinition"))}function mh(e){return e.waypoints}function vh(e,t){return-1!==function(e){for(var t=[];e;)(e=e.parent)&&t.push(e);return t}(t).indexOf(e)}function gh(e,t,n){if(oh(e)||oh(t))return null;if(!jr(n,"bpmn:DataAssociation")){if(kh(e,t))return{type:"bpmn:MessageFlow"};if(Mh(e,t))return{type:"bpmn:SequenceFlow"}}var i=Dh(e,t);return i||(ph(e)&&uh(t)?{type:"bpmn:Association",associationDirection:"One"}:!!Ah(e,t)&&{type:"bpmn:Association"})}function yh(e,t,n){return!(!xo(e)&&!ch(e))||!(jr(t,"bpmn:Participant")&&!Lr(t))&&(jr(e,"bpmn:Participant")?jr(t,"bpmn:Process")||jr(t,"bpmn:Collaboration"):Ja(e,["bpmn:DataInput","bpmn:DataOutput"])&&e.parent?t===e.parent:jr(e,"bpmn:Lane")?jr(t,"bpmn:Participant")||jr(t,"bpmn:Lane"):!(jr(e,"bpmn:BoundaryEvent")&&(i=e,!Or(i).cancelActivity||!_h(i)&&!wh(i)))&&(jr(e,"bpmn:FlowElement")&&!jr(e,"bpmn:DataStoreReference")?jr(t,"bpmn:FlowElementsContainer")?Lr(t):Ja(t,["bpmn:Participant","bpmn:Lane"]):jr(e,"bpmn:DataStoreReference")&&jr(t,"bpmn:Collaboration")?T(Or(t).get("participants"),(function(e){return!!e.get("processRef")})):Ja(e,["bpmn:Artifact","bpmn:DataAssociation","bpmn:DataStoreReference"])?Ja(t,["bpmn:Collaboration","bpmn:Lane","bpmn:Participant","bpmn:Process","bpmn:SubProcess"]):!!jr(e,"bpmn:MessageFlow")&&(jr(t,"bpmn:Collaboration")||e.source.parent==t||e.target.parent==t)));var i}function bh(e){return jr(e,"bpmn:Lane")}function xh(e){return!!function(e){return!xo(e)&&jr(e,"bpmn:BoundaryEvent")}(e)||(!(!jr(e,"bpmn:IntermediateThrowEvent")||!_h(e))||jr(e,"bpmn:IntermediateCatchEvent")&&wh(e))}function _h(e){var t=Or(e);return t&&!(t.eventDefinitions&&t.eventDefinitions.length)}function wh(e){return Eh(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])}function Eh(e,t){return t.some((function(t){return dh(e,t)}))}function Sh(e,t,n,i){if(Array.isArray(e)||(e=[e]),1!==e.length)return!1;var r=e[0];return!xo(r)&&(!!xh(r)&&(!zr(t)&&(!(!jr(t,"bpmn:Activity")||uh(t))&&(!(i&&!ih(i,t))&&(!function(e){return jr(e,"bpmn:ReceiveTask")&&x(e.incoming,(function(e){return jr(e.source,"bpmn:EventBasedGateway")}))}(t)&&"attach")))))}function Ch(e,t,n){if(!t)return!1;var i={replacements:[]};return E(e,(function(e){zr(t)||jr(e,"bpmn:StartEvent")&&"label"!==e.type&&yh(e,t)&&(Ir(e)||i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),($r(e)||Vr(e)||Hr(e))&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),Eh(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])&&jr(t,"bpmn:SubProcess")&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"})),jr(t,"bpmn:Transaction")||dh(e,"bpmn:CancelEventDefinition")&&"label"!==e.type&&(jr(e,"bpmn:EndEvent")&&yh(e,t)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:EndEvent"}),jr(e,"bpmn:BoundaryEvent")&&Sh(e,t,0,n)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:BoundaryEvent"}))})),!!i.replacements.length&&i}function Ph(e,t){return!T(e,bh)&&(!t||e.every((function(e){return yh(e,t)})))}function Th(e,t,n,i){return!!t&&(!(!xo(e)&&!ch(e))||n!==t&&((!n||!vh(n,t))&&(yh(e,t)||Bh(e,t))))}function Rh(e,t){return jr(e,"bpmn:SubProcess")?Lr(e)&&(!t||t.width>=100&&t.height>=80):jr(e,"bpmn:Lane")?!t||t.width>=130&&t.height>=60:jr(e,"bpmn:Participant")?!t||t.width>=250&&t.height>=50:!!sh(e)||!!ch(e)}function Ah(e,t){return!mh(e)&&!mh(t)&&(!(!ph(e)||!uh(t))||!vh(t,e)&&!vh(e,t)&&(!!function(e,t){var n=sh(e),i=sh(t);return(n||i)&&n!==i}(e,t)||!!Dh(e,t)))}function kh(e,t){return!(Nh(e)&&!Nh(t))&&(jr(i=e,"bpmn:InteractionNode")&&!jr(i,"bpmn:BoundaryEvent")&&(!jr(i,"bpmn:Event")||jr(i,"bpmn:ThrowEvent")&&hh(i,"bpmn:MessageEventDefinition"))&&function(e){return jr(e,"bpmn:InteractionNode")&&!uh(e)&&(!jr(e,"bpmn:Event")||jr(e,"bpmn:CatchEvent")&&hh(e,"bpmn:MessageEventDefinition"))&&!(jr(e,"bpmn:BoundaryEvent")&&!dh(e,"bpmn:MessageEventDefinition"))}(t)&&(n=t,!(ah(e)===ah(n))));var n,i}function Mh(e,t){return!(fh(t)&&t.incoming.length>0&&(n=t.incoming,(n=n||[]).some(Oh))&&!jr(e,"bpmn:EventBasedGateway"))&&(jr(r=e,"bpmn:FlowNode")&&!jr(r,"bpmn:EndEvent")&&!zr(r)&&!(jr(r,"bpmn:IntermediateThrowEvent")&&dh(r,"bpmn:LinkEventDefinition"))&&!ph(r)&&!uh(r)&&function(e){return jr(e,"bpmn:FlowNode")&&!jr(e,"bpmn:StartEvent")&&!jr(e,"bpmn:BoundaryEvent")&&!zr(e)&&!(jr(e,"bpmn:IntermediateCatchEvent")&&dh(e,"bpmn:LinkEventDefinition"))&&!uh(e)}(t)&&(i=t,lh(e)===lh(i))&&!(jr(e,"bpmn:EventBasedGateway")&&!fh(t)));var n,i,r}function Dh(e,t){return Ja(e,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&Ja(t,["bpmn:Activity","bpmn:ThrowEvent"])?{type:"bpmn:DataInputAssociation"}:!(!Ja(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])||!Ja(e,["bpmn:Activity","bpmn:CatchEvent"]))&&{type:"bpmn:DataOutputAssociation"}}function Bh(e,t,n){if(!t)return!1;if(Array.isArray(e)){if(1!==e.length)return!1;e=e[0]}return t.source!==e&&t.target!==e&&(Ja(t,["bpmn:SequenceFlow","bpmn:MessageFlow"])&&!xo(t)&&jr(e,"bpmn:FlowNode")&&!jr(e,"bpmn:BoundaryEvent")&&yh(e,t.parent))}function jh(e,t){return!!xo(t)||!(jr(t,"bpmn:Lane")&&!function(e,t){return e&&t&&-1!==e.indexOf(t)}(e,t.parent))}function Oh(e){if(e&&e.source)return jr(e.source,"bpmn:EventBasedGateway")}function Nh(e){return es(e,"bpmn:Process")||es(e,"bpmn:Collaboration")}i(rh,ps),rh.$inject=["eventBus"],rh.prototype.init=function(){this.addRule("connection.start",(function(e){return function(e){if(oh(e))return null;return Ja(e,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference","bpmn:Group","bpmn:TextAnnotation"])}(e.source)})),this.addRule("connection.create",(function(e){var t=e.source,n=e.target,i=e.hints||{},r=i.targetParent;if(i.targetAttach)return!1;r&&(n.parent=r);try{return gh(t,n)}finally{r&&(n.parent=null)}})),this.addRule("connection.reconnect",(function(e){var t=e.connection;return gh(e.source,e.target,t)})),this.addRule("connection.updateWaypoints",(function(e){return{type:e.connection.type}})),this.addRule("shape.resize",(function(e){return Rh(e.shape,e.newBounds)})),this.addRule("elements.create",(function(e){var t=e.elements,n=e.position,i=e.target;return!(mh(i)&&!Bh(t,i))&&P(t,(function(e){return mh(e)?gh(e.source,e.target,e):e.host?Sh(e,e.host,null,n):Th(e,i,null)}))})),this.addRule("elements.move",(function(e){var t=e.target,n=e.shapes,i=e.position;return Sh(n,t,null,i)||Ch(n,t,i)||Ph(n,t)||Bh(n,t)})),this.addRule("shape.create",(function(e){return Th(e.shape,e.target,e.source,e.position)})),this.addRule("shape.attach",(function(e){return Sh(e.shape,e.target,null,e.position)})),this.addRule("element.copy",(function(e){var t=e.element;return jh(e.elements,t)}))},rh.prototype.canConnectMessageFlow=kh,rh.prototype.canConnectSequenceFlow=Mh,rh.prototype.canConnectDataAssociation=Dh,rh.prototype.canConnectAssociation=Ah,rh.prototype.canMove=Ph,rh.prototype.canAttach=Sh,rh.prototype.canReplace=Ch,rh.prototype.canDrop=yh,rh.prototype.canInsert=Bh,rh.prototype.canCreate=Th,rh.prototype.canConnect=gh,rh.prototype.canResize=Rh,rh.prototype.canCopy=jh;var Lh={__depends__:[Ss],__init__:["bpmnRules"],bpmnRules:["type",rh]};function Ih(e,t){e.on("saveXML.start",2e3,(function(){var e,n,i=t.getRootElement(),r=Or(i).di;e=w(e=ft([i],!1),(function(e){return e!==i&&!e.labelTarget})),n=R(e,Yr),r.set("planeElement",n)}))}Ih.$inject=["eventBus","canvas"];var zh={__init__:["bpmnDiOrdering"],bpmnDiOrdering:["type",Ih]};function Fh(e){as.call(this,e);var t=this;this.preExecute(["shape.create","connection.create"],(function(e){var n=e.context,i=n.shape||n.connection,r=n.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.parent=o.parent),n.parentIndex=o.index)})),this.preExecute(["shape.move","connection.move"],(function(e){var n=e.context,i=n.shape||n.connection,r=n.newParent||i.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.newParent=o.parent),n.newParentIndex=o.index)}))}function $h(e,t,n){Fh.call(this,e);var i=[{type:"bpmn:SubProcess",order:{level:6}},{type:"bpmn:SequenceFlow",order:{level:3,containers:["bpmn:Participant","bpmn:FlowElementsContainer"]}},{type:"bpmn:DataAssociation",order:{level:9,containers:["bpmn:Collaboration","bpmn:Process"]}},{type:"bpmn:MessageFlow",order:{level:9,containers:["bpmn:Collaboration"]}},{type:"bpmn:Association",order:{level:6,containers:["bpmn:Participant","bpmn:FlowElementsContainer","bpmn:Collaboration"]}},{type:"bpmn:BoundaryEvent",order:{level:8}},{type:"bpmn:Group",order:{level:10,containers:["bpmn:Collaboration","bpmn:Process"]}},{type:"bpmn:FlowElement",order:{level:5}},{type:"bpmn:Participant",order:{level:-2}},{type:"bpmn:Lane",order:{level:-1}}];function r(e){var t=e.order;if(t||(e.order=t=function(e){if(e.labelTarget)return{level:10};var t=x(i,(function(t){return Ja(e,[t.type])}));return t&&t.order||{level:1}}(e)),!t)throw new Error("no order for <"+e.id+">");return t}this.getOrdering=function(e,n){if(e.labelTarget)return{parent:t.getRootElement(),index:-1};var i=r(e);i.containers&&(n=function(e,t,n){for(var i=t;i&&!Ja(i,n);)i=i.parent;if(!i)throw new Error("no parent for <"+e.id+"> in <"+(t&&t.id)+">");return i}(e,n,i.containers));var o=n.children.indexOf(e),a=_(n.children,(function(t){return!(!e.labelTarget&&t.labelTarget)&&i.level<r(t).level}));return-1!==a&&-1!==o&&o<a&&(a-=1),{index:a,parent:n}}}Fh.prototype.getOrdering=function(e,t){return null},i(Fh,as),$h.$inject=["eventBus","canvas","translate"],i($h,Fh);var Vh={__depends__:[ho],__init__:["bpmnOrderingProvider"],bpmnOrderingProvider:["type",$h]};function Hh(e,t){this._handlerMap={},this._stack=[],this._stackIdx=-1,this._currentExecution={actions:[],dirty:[],trigger:null},this._injector=t,this._eventBus=e,this._uid=1,e.on(["diagram.destroy","diagram.clear"],(function(){this.clear(!1)}),this)}Hh.$inject=["eventBus","injector"],Hh.prototype.execute=function(e,t){if(!e)throw new Error("command required");this._currentExecution.trigger="execute";var n={command:e,context:t};this._pushAction(n),this._internalExecute(n),this._popAction(n)},Hh.prototype.canExecute=function(e,t){var n={command:e,context:t},i=this._getHandler(e),r=this._fire(e,"canExecute",n);if(void 0===r){if(!i)return!1;i.canExecute&&(r=i.canExecute(t))}return r},Hh.prototype.clear=function(e){this._stack.length=0,this._stackIdx=-1,!1!==e&&this._fire("changed",{trigger:"clear"})},Hh.prototype.undo=function(){var e,t=this._getUndoAction();if(t){for(this._currentExecution.trigger="undo",this._pushAction(t);t&&(this._internalUndo(t),(e=this._getUndoAction())&&e.id===t.id);)t=e;this._popAction()}},Hh.prototype.redo=function(){var e,t=this._getRedoAction();if(t){for(this._currentExecution.trigger="redo",this._pushAction(t);t&&(this._internalExecute(t,!0),(e=this._getRedoAction())&&e.id===t.id);)t=e;this._popAction()}},Hh.prototype.register=function(e,t){this._setHandler(e,t)},Hh.prototype.registerHandler=function(e,t){if(!e||!t)throw new Error("command and handlerCls must be defined");var n=this._injector.instantiate(t);this.register(e,n)},Hh.prototype.canUndo=function(){return!!this._getUndoAction()},Hh.prototype.canRedo=function(){return!!this._getRedoAction()},Hh.prototype._getRedoAction=function(){return this._stack[this._stackIdx+1]},Hh.prototype._getUndoAction=function(){return this._stack[this._stackIdx]},Hh.prototype._internalUndo=function(e){var t=this,n=e.command,i=e.context,r=this._getHandler(n);this._atomicDo((function(){t._fire(n,"revert",e),r.revert&&t._markDirty(r.revert(i)),t._revertedAction(e),t._fire(n,"reverted",e)}))},Hh.prototype._fire=function(e,t,n){arguments.length<3&&(n=t,t=null);var i,r,o,a=t?[e+"."+t,t]:[e];for(n=this._eventBus.createEvent(n),i=0;(r=a[i])&&(o=this._eventBus.fire("commandStack."+r,n),!n.cancelBubble);i++);return o},Hh.prototype._createId=function(){return this._uid++},Hh.prototype._atomicDo=function(e){var t=this._currentExecution;t.atomic=!0;try{e()}finally{t.atomic=!1}},Hh.prototype._internalExecute=function(e,t){var n=this,i=e.command,r=e.context,o=this._getHandler(i);if(!o)throw new Error("no command handler registered for <"+i+">");this._pushAction(e),t||(this._fire(i,"preExecute",e),o.preExecute&&o.preExecute(r),this._fire(i,"preExecuted",e)),this._atomicDo((function(){n._fire(i,"execute",e),o.execute&&n._markDirty(o.execute(r)),n._executedAction(e,t),n._fire(i,"executed",e)})),t||(this._fire(i,"postExecute",e),o.postExecute&&o.postExecute(r),this._fire(i,"postExecuted",e)),this._popAction(e)},Hh.prototype._pushAction=function(e){var t=this._currentExecution,n=t.actions,i=n[0];if(t.atomic)throw new Error("illegal invocation in <execute> or <revert> phase (action: "+e.command+")");e.id||(e.id=i&&i.id||this._createId()),n.push(e)},Hh.prototype._popAction=function(){var e=this._currentExecution,t=e.trigger,n=e.actions,i=e.dirty;n.pop(),n.length||(this._eventBus.fire("elements.changed",{elements:B("id",i.reverse())}),i.length=0,this._fire("changed",{trigger:t}),e.trigger=null)},Hh.prototype._markDirty=function(e){var t=this._currentExecution;e&&(e=h(e)?e:[e],t.dirty=t.dirty.concat(e))},Hh.prototype._executedAction=function(e,t){var n=++this._stackIdx;t||this._stack.splice(n,this._stack.length,e)},Hh.prototype._revertedAction=function(e){this._stackIdx--},Hh.prototype._getHandler=function(e){return this._handlerMap[e]},Hh.prototype._setHandler=function(e,t){if(!e||!t)throw new Error("command and handler required");if(this._handlerMap[e])throw new Error("overriding handler for command <"+e+">");this._handlerMap[e]=t};var Gh={commandStack:["type",Hh]},Wh=new Uo("tt");function qh(e,t){e.style.display=!1===t?"none":""}var Uh=".djs-tooltip";function Yh(e,t){this._eventBus=e,this._canvas=t,this._ids=Wh,this._tooltipDefaults={show:{minZoom:.7,maxZoom:5}},this._tooltips={},this._tooltipRoot=function(e){var t=he('<div class="djs-tooltip-container" style="position: absolute; width: 0; height: 0;" />');return e.insertBefore(t,e.firstChild),t}(t.getContainer());var n=this;de.bind(this._tooltipRoot,Uh,"mousedown",(function(e){e.stopPropagation()})),de.bind(this._tooltipRoot,Uh,"mouseover",(function(e){n.trigger("mouseover",e)})),de.bind(this._tooltipRoot,Uh,"mouseout",(function(e){n.trigger("mouseout",e)})),this._init()}Yh.$inject=["eventBus","canvas"],Yh.prototype.add=function(e){if(!e.position)throw new Error("must specifiy tooltip position");if(!e.html)throw new Error("must specifiy tooltip html");var t=this._ids.next();return e=G({},this._tooltipDefaults,e,{id:t}),this._addTooltip(e),e.timeout&&this.setTimeout(e),t},Yh.prototype.trigger=function(e,t){var n=t.delegateTarget||t.target,i=this.get(Y(n,"data-tooltip-id"));i&&("mouseover"===e&&i.timeout&&this.clearTimeout(i),"mouseout"===e&&i.timeout&&(i.timeout=1e3,this.setTimeout(i)))},Yh.prototype.get=function(e){return"string"!=typeof e&&(e=e.id),this._tooltips[e]},Yh.prototype.clearTimeout=function(e){if(e=this.get(e)){var t=e.removeTimer;t&&(clearTimeout(t),e.removeTimer=null)}},Yh.prototype.setTimeout=function(e){if(e=this.get(e)){this.clearTimeout(e);var t=this;e.removeTimer=setTimeout((function(){t.remove(e)}),e.timeout)}},Yh.prototype.remove=function(e){var t=this.get(e);t&&(ye(t.html),ye(t.htmlContainer),delete t.htmlContainer,delete this._tooltips[t.id])},Yh.prototype.show=function(){qh(this._tooltipRoot)},Yh.prototype.hide=function(){qh(this._tooltipRoot,!1)},Yh.prototype._updateRoot=function(e){var t=e.scale||1,n=e.scale||1,i="matrix("+t+",0,0,"+n+","+-1*e.x*t+","+-1*e.y*n+")";this._tooltipRoot.style.transform=i,this._tooltipRoot.style["-ms-transform"]=i},Yh.prototype._addTooltip=function(e){var t,n=e.id,i=e.html,r=this._tooltipRoot;i.get&&i.constructor.prototype.jquery&&(i=i.get(0)),g(i)&&(i=he(i)),(t=he('<div data-tooltip-id="'+n+'" class="'+'djs-tooltip" style="position: absolute">')).appendChild(i),e.type&&J(t).add("djs-tooltip-"+e.type),e.className&&J(t).add(e.className),e.htmlContainer=t,r.appendChild(t),this._tooltips[n]=e,this._updateTooltip(e)},Yh.prototype._updateTooltip=function(e){var t,n,i,r=e.position,o=e.htmlContainer;t=o,n=r.x,i=r.y,G(t.style,{left:n+"px",top:i+"px"})},Yh.prototype._updateTooltipVisibilty=function(e){E(this._tooltips,(function(t){var n=t.show,i=t.htmlContainer,r=!0;n&&((n.minZoom>e.scale||n.maxZoom<e.scale)&&(r=!1),qh(i,r))}))},Yh.prototype._init=function(){var e=this;this._eventBus.on("canvas.viewbox.changing",(function(t){e.hide()})),this._eventBus.on("canvas.viewbox.changed",(function(t){var n;n=t.viewbox,e._updateRoot(n),e._updateTooltipVisibilty(n),e.show()}))};var Kh={__init__:["tooltips"],tooltips:["type",Yh]};function Xh(e,t){if("function"!=typeof t)throw new Error("removeFn iterator must be a function");if(e){for(var n;n=e[0];)t(n);return e}}function Zh(e,t,n){as.call(this,t);var i=e.get("movePreview",!1);t.on("shape.move.start",1400,(function(e){var t=e.context,n=t.shapes,i=t.validatedShapes;t.shapes=Qh(n),t.validatedShapes=Qh(i)})),i&&t.on("shape.move.start",250,(function(e){var t=e.context,n=t.shapes,r=[];E(n,(function(e){E(e.labels,(function(n){n.hidden||-1!==t.shapes.indexOf(n)||r.push(n),e.labelTarget&&r.push(e)}))})),E(r,(function(e){i.makeDraggable(t,e,!0)}))})),this.preExecuted("elements.move",1400,(function(e){var t=e.context.closure,n=t.enclosedElements,i=[];E(n,(function(e){E(e.labels,(function(e){n[e.id]||i.push(e)}))})),t.addAll(i)})),this.preExecute(["connection.delete","shape.delete"],(function(e){var t=e.context;Xh((t.connection||t.shape).labels,(function(e){n.removeShape(e,{nested:!0})}))})),this.execute("shape.delete",(function(e){var t=e.context,n=t.shape,i=n.labelTarget;i&&(t.labelTargetIndex=Et(i.labels,n),t.labelTarget=i,n.labelTarget=null)})),this.revert("shape.delete",(function(e){var t=e.context,n=t.shape,i=t.labelTarget,r=t.labelTargetIndex;i&&(wt(i.labels,n,r),n.labelTarget=i)}))}function Qh(e){return w(e,(function(t){return-1===e.indexOf(t.labelTarget)}))}i(Zh,as),Zh.$inject=["injector","eventBus","modeling"];var Jh={__init__:["labelSupport"],labelSupport:["type",Zh]},ef="attach-ok";function tf(e,t,n,i,r){as.call(this,t);var o=e.get("movePreview",!1);t.on("shape.move.start",1401,(function(e){var t,n,i=e.context,r=i.shapes,o=i.validatedShapes;i.shapes=(n=nf(t=r),j("id",t,n)),i.validatedShapes=function(e){var t=D(e,"id");return w(e,(function(e){for(;e;){if(e.host&&t[e.host.id])return!1;e=e.parent}return!0}))}(o)})),o&&t.on("shape.move.start",251,(function(e){var t=e.context;E(nf(t.shapes),(function(e){o.makeDraggable(t,e,!0),E(e.labels,(function(e){o.makeDraggable(t,e,!0)}))}))})),o&&t.on("shape.move.start",(function(e){var i=e.context.shapes;if(1===i.length){var r=i[0].host;r&&(n.addMarker(r,ef),t.once(["shape.move.out","shape.move.cleanup"],(function(){n.removeMarker(r,ef)})))}})),this.preExecuted("elements.move",1401,(function(e){var t=e.context,n=t.closure;E(nf(t.shapes),(function(e){n.add(e,n.topLevel[e.host.id])}))})),this.postExecuted("elements.move",(function(e){var t=e.context,n=t.shapes,i=t.newHost;i&&1!==n.length||E(i?n:w(n,(function(e){var t,i=e.host;return function(e){return!!e.host}(e)&&(t=i,!(-1!==n.indexOf(t)))})),(function(e){r.updateAttachment(e,i)}))})),this.postExecuted("elements.move",(function(e){E(e.context.shapes,(function(e){E(e.attachers,(function(e){E(e.outgoing.slice(),(function(e){i.allowed("connection.reconnect",{connection:e,source:e.source,target:e.target})||r.removeConnection(e)})),E(e.incoming.slice(),(function(e){i.allowed("connection.reconnect",{connection:e,source:e.source,target:e.target})||r.removeConnection(e)}))}))}))})),this.postExecute("shape.create",(function(e){var t=e.context,n=t.shape,i=t.host;i&&r.updateAttachment(n,i)})),this.postExecute("shape.replace",(function(e){var t=e.context,n=t.oldShape,o=t.newShape;Xh(n.attachers,(function(e){"attach"===i.allowed("elements.move",{target:o,shapes:[e]})?r.updateAttachment(e,o):r.removeShape(e)})),o.attachers.length&&E(o.attachers,(function(e){var t=dd(e,n,o);r.moveShape(e,t,e.parent)}))})),this.postExecute("shape.resize",(function(e){var t=e.context,n=t.shape,i=t.oldBounds,o=t.newBounds,a=n.attachers;!1!==(t.hints||{}).attachSupport&&E(a,(function(e){var t=dd(e,i,o);r.moveShape(e,t,e.parent),E(e.labels,(function(e){r.moveShape(e,t,e.parent)}))}))})),this.preExecute("shape.delete",(function(e){var t=e.context.shape;Xh(t.attachers,(function(e){r.removeShape(e)})),t.host&&r.updateAttachment(t,null)}))}function nf(e){return s(R(e,(function(e){return e.attachers||[]})))}i(tf,as),tf.$inject=["injector","eventBus","canvas","rules","modeling"];var rf={__depends__:[Ss],__init__:["attachSupport"],attachSupport:["type",tf]};function of(e,t){this._eventBus=e,this._dragging=t,this._tools=[],this._active=null}of.$inject=["eventBus","dragging"],of.prototype.registerTool=function(e,t){var n=this._tools;if(!t)throw new Error('A tool has to be registered with it\'s "events"');n.push(e),this.bindEvents(e,t)},of.prototype.isActive=function(e){return e&&this._active===e},of.prototype.length=function(e){return this._tools.length},of.prototype.setActive=function(e){var t=this._eventBus;this._active!==e&&(this._active=e,t.fire("tool-manager.update",{tool:e}))},of.prototype.bindEvents=function(e,t){var n=this._eventBus,i=this._dragging,r=[];n.on(t.tool+".init",(function(t){if(!t.context.reactivate&&this.isActive(e))return this.setActive(null),void i.cancel();this.setActive(e)}),this),E(t,(function(e){r.push(e+".ended"),r.push(e+".canceled")})),n.on(r,250,(function(e){this._active&&(function(e){var t=e.originalEvent&&e.originalEvent.target;return t&&oe(t,'.group[data-group="tools"]')}(e)||this.setActive(null))}),this)};var af={__depends__:[bs],__init__:["toolManager"],toolManager:["type",of]};function sf(e,t){return-1!==e.indexOf(t)}var cf=Math.abs,pf=Math.round,uf={x:"width",y:"height"},lf="crosshair",df={n:"top",w:"left",s:"bottom",e:"right"},hf={n:"s",w:"e",s:"n",e:"w"};function ff(e,t,n,i,r,o,a){this._canvas=e,this._dragging=t,this._eventBus=n,this._modeling=i,this._rules=r,this._toolManager=o,this._mouse=a;var s=this;o.registerTool("space",{tool:"spaceTool.selection",dragging:"spaceTool"}),n.on("spaceTool.selection.end",(function(e){n.once("spaceTool.selection.ended",(function(){s.activateMakeSpace(e.originalEvent)}))})),n.on("spaceTool.move",1500,(function(e){var t=e.context,n=t.initialized;n||(n=t.initialized=s.init(e,t)),n&&vf(e)})),n.on("spaceTool.end",(function(e){var t=e.context,i=t.axis,r=t.direction,o=t.movingShapes,a=t.resizingShapes,c=t.start;if(t.initialized){vf(e);var p={x:0,y:0};p[i]=pf(e["d"+i]),s.makeSpace(o,a,p,r,c),n.once("spaceTool.ended",(function(e){s.activateSelection(e.originalEvent,!0,!0)}))}}))}function mf(e){return{top:e.top-20,right:e.right+20,bottom:e.bottom+20,left:e.left-20}}function vf(e){var t,n,i=e.context.spaceToolConstraints;i&&(m(i.left)&&(t=Math.max(e.x,i.left),e.dx=e.dx+t-e.x,e.x=t),m(i.right)&&(t=Math.min(e.x,i.right),e.dx=e.dx+t-e.x,e.x=t),m(i.top)&&(n=Math.max(e.y,i.top),e.dy=e.dy+n-e.y,e.y=n),m(i.bottom)&&(n=Math.min(e.y,i.bottom),e.dy=e.dy+n-e.y,e.y=n))}function gf(e,t){return-1!==e.indexOf(t)}function yf(e){return!!e.waypoints}function bf(e){return!!e.labelTarget}ff.$inject=["canvas","dragging","eventBus","modeling","rules","toolManager","mouse"],ff.prototype.activateSelection=function(e,t,n){this._dragging.init(e,"spaceTool.selection",{autoActivate:t,cursor:lf,data:{context:{reactivate:n}},trapClick:!1})},ff.prototype.activateMakeSpace=function(e){this._dragging.init(e,"spaceTool",{autoActivate:!0,cursor:lf,data:{context:{}}})},ff.prototype.makeSpace=function(e,t,n,i,r){return this._modeling.createSpace(e,t,n,i,r)},ff.prototype.init=function(e,t){var n=cf(e.dx)>cf(e.dy)?"x":"y",i=e["d"+n],r=e[n]-i;if(cf(i)<5)return!1;i<0&&(i*=-1),Do(e)&&(i*=-1);var o=function(e,t){if("x"===e){if(t>0)return"e";if(t<0)return"w"}if("y"===e){if(t>0)return"s";if(t<0)return"n"}return null}(n,i),a=ft(this._canvas.getRootElement(),!0),s=this.calculateAdjustments(a,n,i,r);return G(t,s,{axis:n,direction:o,spaceToolConstraints:function(e,t,n,i,r){var o=e.movingShapes,a=e.resizingShapes;if(!a.length)return;var s,c,p={};return E(a,(function(e){var u,l,d,h=hn(e),f=w(e.children,(function(e){return!(yf(e)||bf(e)||gf(o,e)||gf(a,e))})),v=w(e.children,(function(e){return!yf(e)&&!bf(e)&&gf(o,e)}));f.length&&(l=mf(hn(mt(f))),u=i-h[df[n]]+l[df[n]],"n"===n?p.bottom=c=m(c)?Math.min(c,u):u:"w"===n?p.right=c=m(c)?Math.min(c,u):u:"s"===n?p.top=s=m(s)?Math.max(s,u):u:"e"===n&&(p.left=s=m(s)?Math.max(s,u):u)),v.length&&(d=mf(hn(mt(v))),u=i-d[df[hf[n]]]+h[df[hf[n]]],"n"===n?p.bottom=c=m(c)?Math.min(c,u):u:"w"===n?p.right=c=m(c)?Math.min(c,u):u:"s"===n?p.top=s=m(s)?Math.max(s,u):u:"e"===n&&(p.left=s=m(s)?Math.max(s,u):u));var g=r&&r[e.id];g&&("n"===n?(u=i+e[uf[t]]-g[uf[t]],p.bottom=c=m(c)?Math.min(c,u):u):"w"===n?(u=i+e[uf[t]]-g[uf[t]],p.right=c=m(c)?Math.min(c,u):u):"s"===n?(u=i-e[uf[t]]+g[uf[t]],p.top=s=m(s)?Math.max(s,u):u):"e"===n&&(u=i-e[uf[t]]+g[uf[t]],p.left=s=m(s)?Math.max(s,u):u))})),p}(s,n,o,r,this._eventBus.fire("spaceTool.getMinDimensions",{axis:n,direction:o,shapes:s.resizingShapes,start:r})),start:r}),ga("resize-"+("x"===n?"ew":"ns")),!0},ff.prototype.calculateAdjustments=function(e,t,n,i){var r=this._rules,o=[],a=[];return E(e,(function(e){if(e.parent&&!yf(e)){var s=e[t],c=s+e[uf[t]];return n>0&&s>i||n<0&&c<i?o.push(e):s<i&&c>i&&r.allowed("shape.resize",{shape:e})?a.push(e):void 0}})),{movingShapes:o,resizingShapes:a}},ff.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateSelection(e,!!e)},ff.prototype.isActive=function(){var e=this._dragging.context();return e&&/^spaceTool/.test(e.prefix)};var xf="djs-dragging",_f="djs-resizing",wf=Math.max;function Ef(e,t,n,i,r){function o(e,t){E(e,(function(e){r.addDragger(e,t),n.addMarker(e,xf)}))}e.on("spaceTool.selection.start",(function(e){var t=n.getLayer("space"),r=e.context,o="M 0,-10000 L 0,10000",a="M -10000,0 L 10000,0",s=Le("g");Se(s,i.cls("djs-crosshair-group",["no-events"])),_e(t,s);var c=Le("path");Se(c,"d",o),Ae(c).add("djs-crosshair"),_e(s,c);var p=Le("path");Se(p,"d",a),Ae(p).add("djs-crosshair"),_e(s,p),r.crosshairGroup=s})),e.on("spaceTool.selection.move",(function(e){Xn(e.context.crosshairGroup,e.x,e.y)})),e.on("spaceTool.selection.cleanup",(function(e){var t=e.context.crosshairGroup;t&&Me(t)})),e.on("spaceTool.move",250,(function(e){var a=e.context,s=a.line,c=a.axis,p=a.movingShapes,u=a.resizingShapes;if(a.initialized){if(!a.dragGroup){var l=n.getLayer("space");Se(s=Le("path"),"d","M0,0 L0,0"),Ae(s).add("djs-crosshair"),_e(l,s),a.line=s;var d=Le("g");Se(d,i.cls("djs-drag-group",["no-events"])),_e(n.getActiveLayer(),d),o(p,d),o(a.movingConnections=t.filter((function(e){var t=!1;E(p,(function(n){E(n.outgoing,(function(n){e===n&&(t=!0)}))}));var n=!1;E(p,(function(t){E(t.incoming,(function(t){e===t&&(n=!0)}))}));var i=!1;E(u,(function(t){E(t.outgoing,(function(t){e===t&&(i=!0)}))}));var r=!1;return E(u,(function(t){E(t.incoming,(function(t){e===t&&(r=!0)}))})),function(e){return e.waypoints}(e)&&(t||i)&&(n||r)})),d),a.dragGroup=d}if(!a.frameGroup){var h=Le("g");Se(h,i.cls("djs-frame-group",["no-events"])),_e(n.getActiveLayer(),h);var f=[];E(u,(function(e){var t=r.addFrame(e,h),i=t.getBBox();f.push({element:t,initialBounds:i}),n.addMarker(e,_f)})),a.frameGroup=h,a.frames=f}Se(s,{d:{x:"M"+e.x+", -10000 L"+e.x+", 10000",y:"M -10000, "+e.y+" L 10000, "+e.y}[c]});var m={x:e.dx,y:e.dy};m[{x:"y",y:"x"}[a.axis]]=0,Xn(a.dragGroup,m.x,m.y),E(a.frames,(function(e){var t,n,i=e.element,r=e.initialBounds;"e"===a.direction?Se(i,{width:wf(r.width+m.x,5)}):Se(i,{width:t=wf(r.width-m.x,5),x:r.x+r.width-t}),"s"===a.direction?Se(i,{height:wf(r.height+m.y,5)}):Se(i,{height:n=wf(r.height-m.y,5),y:r.y+r.height-n})}))}})),e.on("spaceTool.cleanup",(function(e){var t=e.context,i=t.movingShapes,r=t.movingConnections,o=t.resizingShapes,a=t.line,s=t.dragGroup,c=t.frameGroup;E(i,(function(e){n.removeMarker(e,xf)})),E(r,(function(e){n.removeMarker(e,xf)})),s&&(Me(a),Me(s)),E(o,(function(e){n.removeMarker(e,_f)})),c&&Me(c)}))}Ef.$inject=["eventBus","elementRegistry","canvas","styles","previewSupport"];var Sf={__init__:["spaceToolPreview"],__depends__:[bs,Ss,af,Ic,ip],spaceTool:["type",ff],spaceToolPreview:["type",Ef]};function Cf(e){this._model=e}function Pf(e,t,n,i){as.call(this,e),this._bpmnFactory=t,this._translate=i;var r=this;function o(e){E(e.context.oldRoot.children,(function(e){jr(e,"bpmn:BaseElement")&&r.updateParent(e)}))}function a(e){var t=e.context.shape;jr(t,"bpmn:BaseElement")&&r.updateBounds(t)}function s(e){r.updateConnection(e.context)}function c(e){r.updateConnectionWaypoints(e.context.connection)}function p(e){r.updateAttachment(e.context)}this.executed(["connection.layout","connection.create"],(function(e){var t,i=e.context,r=i.hints||{};i.cropped||!1===r.createElementsBehavior||((t=i.connection).waypoints=n.getCroppedWaypoints(t),i.cropped=!0)})),this.reverted(["connection.layout"],(function(e){delete e.context.cropped})),this.executed(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Tf((function(e){var t=e.context;r.updateParent(t.shape||t.connection,t.oldParent)}))),this.reverted(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Tf((function(e){var t=e.context,n=t.shape||t.connection,i=t.parent||t.newParent;r.updateParent(n,i)}))),this.executed(["canvas.updateRoot"],o),this.reverted(["canvas.updateRoot"],o),this.executed(["shape.move","shape.create","shape.resize"],Tf((function(e){"label"!==e.context.shape.type&&a(e)}))),this.reverted(["shape.move","shape.create","shape.resize"],Tf((function(e){"label"!==e.context.shape.type&&a(e)}))),e.on("shape.changed",(function(e){"label"===e.element.type&&a({context:{shape:e.element}})})),this.executed(["connection.create","connection.move","connection.delete","connection.reconnect"],Tf(s)),this.reverted(["connection.create","connection.move","connection.delete","connection.reconnect"],Tf(s)),this.executed(["connection.layout","connection.move","connection.updateWaypoints"],Tf(c)),this.reverted(["connection.layout","connection.move","connection.updateWaypoints"],Tf(c)),this.executed("connection.reconnect",Tf((function(e){var t=e.context,n=t.connection,i=t.oldSource,r=t.newSource,o=Or(n),a=Or(i),s=Or(r);o.conditionExpression&&!Ja(s,["bpmn:Activity","bpmn:ExclusiveGateway","bpmn:InclusiveGateway"])&&(t.oldConditionExpression=o.conditionExpression,delete o.conditionExpression),i!==r&&a.default===o&&(t.oldDefault=a.default,delete a.default)}))),this.reverted("connection.reconnect",Tf((function(e){var t=e.context,n=t.connection,i=t.oldSource,r=t.newSource,o=Or(n),a=Or(i),s=Or(r);t.oldConditionExpression&&(o.conditionExpression=t.oldConditionExpression),t.oldDefault&&(a.default=t.oldDefault,delete s.default)}))),this.executed(["element.updateAttachment"],Tf(p)),this.reverted(["element.updateAttachment"],Tf(p))}function Tf(e){return function(t){var n=t.context;jr(n.shape||n.connection,"bpmn:BaseElement")&&e(t)}}function Rf(e,t,n){Gn.call(this),this._bpmnFactory=e,this._moddle=t,this._translate=n}function Af(e,t,n){e[n]=t[n],delete t[n]}function kf(e,t){this._modeling=e,this._canvas=t}function Mf(e){this._modeling=e}function Df(e,t){this._canvas=e,this._layouter=t}Cf.$inject=["moddle"],Cf.prototype._needsId=function(e){return Ja(e,["bpmn:RootElement","bpmn:FlowElement","bpmn:MessageFlow","bpmn:DataAssociation","bpmn:Artifact","bpmn:Participant","bpmn:Lane","bpmn:LaneSet","bpmn:Process","bpmn:Collaboration","bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane","bpmn:Property","bpmn:CategoryValue"])},Cf.prototype._ensureId=function(e){var t;t=jr(e,"bpmn:Activity")?"Activity":jr(e,"bpmn:Event")?"Event":jr(e,"bpmn:Gateway")?"Gateway":Ja(e,["bpmn:SequenceFlow","bpmn:MessageFlow"])?"Flow":(e.$type||"").replace(/^[^:]*:/g,""),t+="_",!e.id&&this._needsId(e)&&(e.id=this._model.ids.nextPrefixed(t,e))},Cf.prototype.create=function(e,t){var n=this._model.create(e,t||{});return this._ensureId(n),n},Cf.prototype.createDiLabel=function(){return this.create("bpmndi:BPMNLabel",{bounds:this.createDiBounds()})},Cf.prototype.createDiShape=function(e,t,n){return this.create("bpmndi:BPMNShape",G({bpmnElement:e,bounds:this.createDiBounds(t)},n))},Cf.prototype.createDiBounds=function(e){return this.create("dc:Bounds",e)},Cf.prototype.createDiWaypoints=function(e){var t=this;return R(e,(function(e){return t.createDiWaypoint(e)}))},Cf.prototype.createDiWaypoint=function(e){return this.create("dc:Point",W(e,["x","y"]))},Cf.prototype.createDiEdge=function(e,t,n){return this.create("bpmndi:BPMNEdge",G({bpmnElement:e},n))},Cf.prototype.createDiPlane=function(e){return this.create("bpmndi:BPMNPlane",{bpmnElement:e})},i(Pf,as),Pf.$inject=["eventBus","bpmnFactory","connectionDocking","translate"],Pf.prototype.updateAttachment=function(e){var t=e.shape,n=t.businessObject,i=t.host;n.attachedToRef=i&&i.businessObject},Pf.prototype.updateParent=function(e,t){if(!(e instanceof $n||jr(e,"bpmn:DataStoreReference")&&e.parent&&jr(e.parent,"bpmn:Collaboration"))){var n=e.parent,i=e.businessObject,r=n&&n.businessObject,o=r&&r.di;jr(e,"bpmn:FlowNode")&&this.updateFlowNodeRefs(i,r,t&&t.businessObject),jr(e,"bpmn:DataOutputAssociation")&&(r=e.source?e.source.businessObject:null),jr(e,"bpmn:DataInputAssociation")&&(r=e.target?e.target.businessObject:null),this.updateSemanticParent(i,r),jr(e,"bpmn:DataObjectReference")&&i.dataObjectRef&&this.updateSemanticParent(i.dataObjectRef,r),this.updateDiParent(i.di,o)}},Pf.prototype.updateBounds=function(e){var t=e.businessObject.di,n=e instanceof $n?this._getLabel(t):t,i=n.bounds;i||(i=this._bpmnFactory.createDiBounds(),n.set("bounds",i)),G(i,{x:e.x,y:e.y,width:e.width,height:e.height})},Pf.prototype.updateFlowNodeRefs=function(e,t,n){n!==t&&(jr(n,"bpmn:Lane")&&_t(n.get("flowNodeRef"),e),jr(t,"bpmn:Lane")&&wt(t.get("flowNodeRef"),e))},Pf.prototype.updateDiConnection=function(e,t,n){e.sourceElement&&e.sourceElement.bpmnElement!==t&&(e.sourceElement=t&&t.di),e.targetElement&&e.targetElement.bpmnElement!==n&&(e.targetElement=n&&n.di)},Pf.prototype.updateDiParent=function(e,t){if(t&&!jr(t,"bpmndi:BPMNPlane")&&(t=t.$parent),e.$parent!==t){var n=(t||e.$parent).get("planeElement");t?(n.push(e),e.$parent=t):(_t(n,e),e.$parent=null)}},Pf.prototype.getLaneSet=function(e){var t,n;return jr(e,"bpmn:Lane")?((t=e.childLaneSet)||(t=this._bpmnFactory.create("bpmn:LaneSet"),e.childLaneSet=t,t.$parent=e),t):(jr(e,"bpmn:Participant")&&(e=e.processRef),(t=(n=e.get("laneSets"))[0])||((t=this._bpmnFactory.create("bpmn:LaneSet")).$parent=e,n.push(t)),t)},Pf.prototype.updateSemanticParent=function(e,t,n){var i,r=this._translate;if(e.$parent!==t&&(!jr(e,"bpmn:DataInput")&&!jr(e,"bpmn:DataOutput")||(jr(t,"bpmn:Participant")&&"processRef"in t&&(t=t.processRef),!("ioSpecification"in t)||t.ioSpecification!==e.$parent))){if(jr(e,"bpmn:Lane"))t&&(t=this.getLaneSet(t)),i="lanes";else if(jr(e,"bpmn:FlowElement")){if(t)if(jr(t,"bpmn:Participant"))t=t.processRef;else if(jr(t,"bpmn:Lane"))do{t=t.$parent.$parent}while(jr(t,"bpmn:Lane"));i="flowElements"}else if(jr(e,"bpmn:Artifact")){for(;t&&!jr(t,"bpmn:Process")&&!jr(t,"bpmn:SubProcess")&&!jr(t,"bpmn:Collaboration");){if(jr(t,"bpmn:Participant")){t=t.processRef;break}t=t.$parent}i="artifacts"}else if(jr(e,"bpmn:MessageFlow"))i="messageFlows";else if(jr(e,"bpmn:Participant")){i="participants";var o,a=e.processRef;a&&(o=function(e){for(;e&&!jr(e,"bpmn:Definitions");)e=e.$parent;return e}(e.$parent||t),e.$parent&&(_t(o.get("rootElements"),a),a.$parent=null),t&&(wt(o.get("rootElements"),a),a.$parent=o))}else jr(e,"bpmn:DataOutputAssociation")?i="dataOutputAssociations":jr(e,"bpmn:DataInputAssociation")&&(i="dataInputAssociations");if(!i)throw new Error(r("no parent for {element} in {parent}",{element:e.id,parent:t.id}));var s;if(e.$parent&&_t(s=e.$parent.get(i),e),t?((s=t.get(i)).push(e),e.$parent=t):e.$parent=null,n){var c=n.get(i);_t(s,e),t&&(c||(c=[],t.set(i,c)),c.push(e))}}},Pf.prototype.updateConnectionWaypoints=function(e){e.businessObject.di.set("waypoint",this._bpmnFactory.createDiWaypoints(e.waypoints))},Pf.prototype.updateConnection=function(e){var t,n=e.connection,i=Or(n),r=Or(n.source),o=Or(n.target);if(jr(i,"bpmn:DataAssociation"))jr(i,"bpmn:DataInputAssociation")?(i.get("sourceRef")[0]=r,t=e.parent||e.newParent||o,this.updateSemanticParent(i,o,t)):jr(i,"bpmn:DataOutputAssociation")&&(t=e.parent||e.newParent||r,this.updateSemanticParent(i,r,t),i.targetRef=o);else{var a=jr(i,"bpmn:SequenceFlow");i.sourceRef!==r&&(a&&(_t(i.sourceRef&&i.sourceRef.get("outgoing"),i),r&&r.get("outgoing")&&r.get("outgoing").push(i)),i.sourceRef=r),i.targetRef!==o&&(a&&(_t(i.targetRef&&i.targetRef.get("incoming"),i),o&&o.get("incoming")&&o.get("incoming").push(i)),i.targetRef=o)}this.updateConnectionWaypoints(n),this.updateDiConnection(i.di,r,o)},Pf.prototype._getLabel=function(e){return e.label||(e.label=this._bpmnFactory.createDiLabel()),e.label},i(Rf,Gn),Rf.$inject=["bpmnFactory","moddle","translate"],Rf.prototype.baseCreate=Gn.prototype.create,Rf.prototype.create=function(e,t){return"label"===e?this.baseCreate(e,G({type:"label"},mo,t)):this.createBpmnElement(e,t)},Rf.prototype.createBpmnElement=function(e,t){var n,i,r,o=this._translate,a=(t=t||{}).businessObject;if(!a){if(!t.type)throw new Error(o("no shape type specified"));a=this._bpmnFactory.create(t.type)}return a.di||(a.di="root"===e?this._bpmnFactory.createDiPlane(a,[],{id:a.id+"_di"}):"connection"===e?this._bpmnFactory.createDiEdge(a,[],{id:a.id+"_di"}):this._bpmnFactory.createDiShape(a,{},{id:a.id+"_di"})),jr(a,"bpmn:Group")&&(t=G({isFrame:!0},t)),t.di&&(G(a.di,t.di),delete t.di),function(e,t,n){E(n,(function(n){void 0!==t[n]&&Af(e,t,n)}))}(a,t,["processRef","isInterrupting","associationDirection","isForCompensation"]),t.isExpanded&&Af(a.di,t,"isExpanded"),jr(a,"bpmn:ExclusiveGateway")&&(a.di.isMarkerVisible=!0),t.eventDefinitionType&&(i=a.get("eventDefinitions")||[],r=this._bpmnFactory.create(t.eventDefinitionType,t.eventDefinitionAttrs),"bpmn:ConditionalEventDefinition"===t.eventDefinitionType&&(r.condition=this._bpmnFactory.create("bpmn:FormalExpression")),i.push(r),r.$parent=a,a.eventDefinitions=i,delete t.eventDefinitionType),n=this._getDefaultSize(a),t=G({businessObject:a,id:a.id},n,t),this.baseCreate(e,t)},Rf.prototype._getDefaultSize=function(e){return jr(e,"bpmn:SubProcess")?Lr(e)?{width:350,height:200}:{width:100,height:80}:jr(e,"bpmn:Task")?{width:100,height:80}:jr(e,"bpmn:Gateway")?{width:50,height:50}:jr(e,"bpmn:Event")?{width:36,height:36}:jr(e,"bpmn:Participant")?Lr(e)?{width:600,height:250}:{width:400,height:60}:jr(e,"bpmn:Lane")?{width:400,height:100}:jr(e,"bpmn:DataObjectReference")?{width:36,height:50}:jr(e,"bpmn:DataStoreReference")?{width:50,height:50}:jr(e,"bpmn:TextAnnotation")?{width:100,height:30}:jr(e,"bpmn:Group")?{width:300,height:300}:{width:100,height:80}},Rf.prototype.createParticipantShape=function(e){return f(e)||(e={isExpanded:e}),!1!==(e=G({type:"bpmn:Participant"},e||{})).isExpanded&&(e.processRef=this._bpmnFactory.create("bpmn:Process")),this.createShape(e)},kf.$inject=["modeling","canvas"],kf.prototype.preExecute=function(e){var t=this._modeling,n=e.elements,i=e.alignment;E(n,(function(e){var n={x:0,y:0};i.left?n.x=i.left-e.x:i.right?n.x=i.right-e.width-e.x:i.center?n.x=i.center-Math.round(e.width/2)-e.x:i.top?n.y=i.top-e.y:i.bottom?n.y=i.bottom-e.height-e.y:i.middle&&(n.y=i.middle-Math.round(e.height/2)-e.y),t.moveElements([e],n,e.parent)}))},kf.prototype.postExecute=function(e){},Mf.$inject=["modeling"],Mf.prototype.preExecute=function(e){var t=e.source;if(!t)throw new Error("source required");var n=e.target||t.parent,i=e.shape,r=e.hints||{};i=e.shape=this._modeling.createShape(i,e.position,n,{attach:r.attach}),e.shape=i},Mf.prototype.postExecute=function(e){var t,n,i=e.hints||{};t=e.source,n=e.shape,T(t.outgoing,(function(e){return e.target===n}))||(i.connectionTarget===e.source?this._modeling.connect(e.shape,e.source,e.connection):this._modeling.connect(e.source,e.shape,e.connection))},Df.$inject=["canvas","layouter"],Df.prototype.execute=function(e){var t=e.connection,n=e.source,i=e.target,r=e.parent,o=e.parentIndex,a=e.hints;if(!n||!i)throw new Error("source and target required");if(!r)throw new Error("parent required");return t.source=n,t.target=i,t.waypoints||(t.waypoints=this._layouter.layoutConnection(t,a)),this._canvas.addConnection(t,r,o),t},Df.prototype.revert=function(e){var t=e.connection;return this._canvas.removeConnection(t),t.source=null,t.target=null,t};var Bf=Math.round;function jf(e){this._modeling=e}function Of(e){return!!e.waypoints}jf.$inject=["modeling"],jf.prototype.preExecute=function(e){var t=e.elements,n=e.parent,i=e.parentIndex,r=e.position,o=e.hints,a=this._modeling;E(t,(function(e){m(e.x)||(e.x=0),m(e.y)||(e.y=0)}));var s=mt(t);E(t,(function(e){Of(e)&&(e.waypoints=R(e.waypoints,(function(e){return{x:Bf(e.x-s.x-s.width/2+r.x),y:Bf(e.y-s.y-s.height/2+r.y)}}))),G(e,{x:Bf(e.x-s.x-s.width/2+r.x),y:Bf(e.y-s.y-s.height/2+r.y)})}));var c=ut(t),p={};E(t,(function(e){if(Of(e))p[e.id]=m(i)?a.createConnection(p[e.source.id],p[e.target.id],i,e,e.parent||n,o):a.createConnection(p[e.source.id],p[e.target.id],e,e.parent||n,o);else{var t=G({},o);-1===c.indexOf(e)&&(t.autoResize=!1),p[e.id]=m(i)?a.createShape(e,W(e,["x","y","width","height"]),e.parent||n,i,t):a.createShape(e,W(e,["x","y","width","height"]),e.parent||n,t)}})),e.elements=M(p)};var Nf=Math.round;function Lf(e){this._canvas=e}function If(e){Lf.call(this,e)}Lf.$inject=["canvas"],Lf.prototype.execute=function(e){var t=e.shape,n=e.position,i=e.parent,r=e.parentIndex;if(!i)throw new Error("parent required");if(!n)throw new Error("position required");return void 0!==n.width?G(t,n):G(t,{x:n.x-Nf(t.width/2),y:n.y-Nf(t.height/2)}),this._canvas.addShape(t,i,r),t},Lf.prototype.revert=function(e){var t=e.shape;return this._canvas.removeShape(t),t},i(If,Lf),If.$inject=["canvas"];var zf=Lf.prototype.execute;If.prototype.execute=function(e){var t=e.shape;return function(e){["width","height"].forEach((function(t){void 0===e[t]&&(e[t]=0)}))}(t),t.labelTarget=e.labelTarget,zf.call(this,e)};var Ff=Lf.prototype.revert;function $f(e,t){this._canvas=e,this._modeling=t}function Vf(e,t){this._modeling=e,this._elementRegistry=t}function Hf(e,t){this._canvas=e,this._modeling=t}function Gf(e){this._modeling=e}If.prototype.revert=function(e){return e.shape.labelTarget=null,Ff.call(this,e)},$f.$inject=["canvas","modeling"],$f.prototype.execute=function(e){var t=e.connection,n=t.parent;return e.parent=n,e.parentIndex=Et(n.children,t),e.source=t.source,e.target=t.target,this._canvas.removeConnection(t),t.source=null,t.target=null,t},$f.prototype.revert=function(e){var t=e.connection,n=e.parent,i=e.parentIndex;return t.source=e.source,t.target=e.target,wt(n.children,t,i),this._canvas.addConnection(t,n),t},Vf.$inject=["modeling","elementRegistry"],Vf.prototype.postExecute=function(e){var t=this._modeling,n=this._elementRegistry;E(e.elements,(function(e){n.get(e.id)&&(e.waypoints?t.removeConnection(e):t.removeShape(e))}))},Hf.$inject=["canvas","modeling"],Hf.prototype.preExecute=function(e){var t=this._modeling,n=e.shape;Xh(n.incoming,(function(e){t.removeConnection(e,{nested:!0})})),Xh(n.outgoing,(function(e){t.removeConnection(e,{nested:!0})})),Xh(n.children,(function(e){e.waypoints?t.removeConnection(e,{nested:!0}):t.removeShape(e,{nested:!0})}))},Hf.prototype.execute=function(e){var t=this._canvas,n=e.shape,i=n.parent;return e.oldParent=i,e.oldParentIndex=Et(i.children,n),t.removeShape(n),n},Hf.prototype.revert=function(e){var t=this._canvas,n=e.shape,i=e.oldParent,r=e.oldParentIndex;return wt(i.children,n,r),t.addShape(n,i),n},Gf.$inject=["modeling"];var Wf={x:"y",y:"x"};function qf(e,t){this._layouter=e,this._canvas=t}function Uf(){}function Yf(){this.allShapes={},this.allConnections={},this.enclosedElements={},this.enclosedConnections={},this.topLevel={}}function Kf(e){this._modeling=e}function Xf(e){this._helper=new Kf(e)}function Zf(e){this._modeling=e,this._helper=new Kf(e)}function Qf(e){this._modeling=e}function Jf(e){return e.original||e}function em(e,t){this._modeling=e,this._rules=t}function tm(e){this._modeling=e}function nm(e){this._modeling=e}function im(e){return G({},e)}function rm(e){switch(e){case"n":return"y";case"w":return"x";case"s":return"y";case"e":return"x"}}function om(e,t,n){var i=rm(n);return/e|s/.test(n)?e[i]>t:/n|w/.test(n)?e[i]<t:void 0}function am(e,t){return-1!==e.indexOf(t)}function sm(e){this._modeling=e}function cm(e){var t={};return E(e,(function(e){t[e.id]=e.hidden,e.children&&(t=G({},t,cm(e.children)))})),t}function pm(e,t){var n=[];return E(e,(function(e){e.hidden=t,n=n.concat(e),e.children&&(n=n.concat(pm(e.children,e.collapsed||t)))})),n}function um(e,t){var n=[];return E(e,(function(e){e.hidden=t[e.id],n=n.concat(e),e.children&&(n=n.concat(um(e.children,t)))})),n}function lm(e){this._modeling=e}function dm(e,t){return _t(e&&e.attachers,t)}function hm(e,t,n){if(e){var i=e.attachers;i||(e.attachers=i=[]),wt(i,t,n)}}function fm(){}function mm(e,t,n){this._eventBus=e,this._elementFactory=t,this._commandStack=n;var i=this;e.on("diagram.init",(function(){i.registerHandlers(n)}))}function vm(e){this._elementRegistry=e}function gm(e,t){E(t,(function(t,n){e.set(n,t)}))}Gf.prototype.preExecute=function(e){var t=this._modeling,n=e.groups,i=e.axis,r=e.dimension;function o(e,t){e.range.min=Math.min(t[i],e.range.min),e.range.max=Math.max(t[i]+t[r],e.range.max)}function a(e){return e[i]+e[r]/2}function s(e){return e.length-1}function c(e){return e.max-e.min}var p,u,l=n[0],d=s(n),h=n[d],f=0;E(n,(function(e,p){var u,l,h;e.elements.length<2?p&&p!==n.length-1&&(o(e,e.elements[0]),f+=c(e.range)):(l=(u=O(e.elements,i))[0],p===d&&(l=u[s(u)]),h=a(l),e.range=null,E(u,(function(n){!function(e,n){var r={y:0};r[i]=e-a(n),r[i]&&(r[Wf[i]]=0,t.moveElements([n],r,n.parent))}(h,n),null!==e.range?o(e,n):e.range={min:n[i],max:n[i]+n[r]}})),p&&p!==n.length-1&&(f+=c(e.range)))})),u=Math.abs(h.range.min-l.range.max),(p=Math.round((u-f)/(n.length-1)))<n.length-1||E(n,(function(e,o){var a,s={};e!==l&&e!==h&&(a=n[o-1],e.range.max=0,E(e.elements,(function(n,o){s[Wf[i]]=0,s[i]=a.range.max-n[i]+p,e.range.min!==n[i]&&(s[i]+=n[i]-e.range.min),s[i]&&t.moveElements([n],s,n.parent),e.range.max=Math.max(n[i]+n[r],o?e.range.max:0)})))}))},Gf.prototype.postExecute=function(e){},qf.$inject=["layouter","canvas"],qf.prototype.execute=function(e){var t=e.connection;return G(e,{oldWaypoints:t.waypoints}),t.waypoints=this._layouter.layoutConnection(t,e.hints),t},qf.prototype.revert=function(e){var t=e.connection;return t.waypoints=e.oldWaypoints,t},Uf.prototype.execute=function(e){var t=e.connection,n=e.delta,i=e.newParent||t.parent,r=e.newParentIndex,o=t.parent;return e.oldParent=o,e.oldParentIndex=_t(o.children,t),wt(i.children,t,r),t.parent=i,E(t.waypoints,(function(e){e.x+=n.x,e.y+=n.y,e.original&&(e.original.x+=n.x,e.original.y+=n.y)})),t},Uf.prototype.revert=function(e){var t=e.connection,n=t.parent,i=e.oldParent,r=e.oldParentIndex,o=e.delta;return _t(n.children,t),wt(i.children,t,r),t.parent=i,E(t.waypoints,(function(e){e.x-=o.x,e.y-=o.y,e.original&&(e.original.x-=o.x,e.original.y-=o.y)})),t},Yf.prototype.add=function(e,t){return this.addAll([e],t)},Yf.prototype.addAll=function(e,t){return G(this,function(e,t,n){u(t)&&(t=!0),f(t)&&(n=t,t=!0);var i=yt((n=n||{}).allShapes),r=yt(n.allConnections),o=yt(n.enclosedElements),a=yt(n.enclosedConnections),s=yt(n.topLevel,t&&D(e,(function(e){return e.id})));function c(e){s[e.source.id]&&s[e.target.id]&&(s[e.id]=[e]),i[e.source.id]&&i[e.target.id]&&(a[e.id]=o[e.id]=e),r[e.id]=e}return ht(e,(function(e){if(o[e.id]=e,!e.waypoints)return i[e.id]=e,E(e.incoming,c),E(e.outgoing,c),e.children;a[e.id]=r[e.id]=e})),{allShapes:i,allConnections:r,topLevel:s,enclosedConnections:a,enclosedElements:o}}(e,!!t,this)),this},Kf.prototype.moveRecursive=function(e,t,n){return e?this.moveClosure(this.getClosure(e),t,n):[]},Kf.prototype.moveClosure=function(e,t,n,i,r){var o=this._modeling,a=e.allShapes,s=e.allConnections,c=e.enclosedConnections,p=e.topLevel,u=!1;r&&r.parent===n&&(u=!0),E(a,(function(e){o.moveShape(e,t,p[e.id]&&!u&&n,{recurse:!1,layout:!1})})),E(s,(function(e){var i=!!a[e.source.id],r=!!a[e.target.id];c[e.id]&&i&&r?o.moveConnection(e,t,p[e.id]&&!u&&n):o.layoutConnection(e,{connectionStart:i&&xd(e,e.source,t),connectionEnd:r&&_d(e,e.target,t)})}))},Kf.prototype.getClosure=function(e){return(new Yf).addAll(e,!0)},Xf.$inject=["modeling"],Xf.prototype.preExecute=function(e){e.closure=this._helper.getClosure(e.shapes)},Xf.prototype.postExecute=function(e){var t,n=e.hints;n&&n.primaryShape&&(t=n.primaryShape,n.oldParent=t.parent),this._helper.moveClosure(e.closure,e.delta,e.newParent,e.newHost,t)},Zf.$inject=["modeling"],Zf.prototype.execute=function(e){var t=e.shape,n=e.delta,i=e.newParent||t.parent,r=e.newParentIndex,o=t.parent;return e.oldBounds=W(t,["x","y","width","height"]),e.oldParent=o,e.oldParentIndex=_t(o.children,t),wt(i.children,t,r),G(t,{parent:i,x:t.x+n.x,y:t.y+n.y}),t},Zf.prototype.postExecute=function(e){var t=e.shape,n=e.delta,i=e.hints,r=this._modeling;!1!==i.layout&&(E(t.incoming,(function(e){r.layoutConnection(e,{connectionEnd:_d(e,t,n)})})),E(t.outgoing,(function(e){r.layoutConnection(e,{connectionStart:xd(e,t,n)})}))),!1!==i.recurse&&this.moveChildren(e)},Zf.prototype.revert=function(e){var t=e.shape,n=e.oldParent,i=e.oldParentIndex,r=e.delta;return wt(n.children,t,i),G(t,{parent:n,x:t.x-r.x,y:t.y-r.y}),t},Zf.prototype.moveChildren=function(e){var t=e.delta,n=e.shape;this._helper.moveRecursive(n.children,t,null)},Zf.prototype.getNewParent=function(e){return e.newParent||e.shape.parent},Qf.$inject=["modeling"],Qf.prototype.execute=function(e){var t=e.newSource,n=e.newTarget,i=e.connection,r=e.dockingOrPoints;if(!t&&!n)throw new Error("newSource or newTarget required");return h(r)&&(e.oldWaypoints=i.waypoints,i.waypoints=r),t&&(e.oldSource=i.source,i.source=t),n&&(e.oldTarget=i.target,i.target=n),i},Qf.prototype.postExecute=function(e){var t=e.connection,n=e.newSource,i=e.newTarget,r=e.dockingOrPoints,o=e.hints||{},a={};o.connectionStart&&(a.connectionStart=o.connectionStart),o.connectionEnd&&(a.connectionEnd=o.connectionEnd),!1!==o.layoutConnection&&(!n||i&&"source"!==o.docking||(a.connectionStart=a.connectionStart||Jf(h(r)?r[0]:r)),!i||n&&"target"!==o.docking||(a.connectionEnd=a.connectionEnd||Jf(h(r)?r[r.length-1]:r)),o.newWaypoints&&(a.waypoints=o.newWaypoints),this._modeling.layoutConnection(t,a))},Qf.prototype.revert=function(e){var t=e.oldSource,n=e.oldTarget,i=e.oldWaypoints,r=e.connection;return t&&(r.source=t),n&&(r.target=n),i&&(r.waypoints=i),r},em.$inject=["modeling","rules"],em.prototype.preExecute=function(e){var t,n=this,i=this._modeling,r=this._rules,o=e.oldShape,a=e.newData,s=e.hints||{};function c(e,t,n){return r.allowed("connection.reconnect",{connection:n,source:e,target:t})}var p,u={x:a.x,y:a.y},l={x:o.x,y:o.y,width:o.width,height:o.height};t=e.newShape=e.newShape||n.createShape(a,u,o.parent,s),o.host&&i.updateAttachment(t,o.host),!1!==s.moveChildren&&(p=o.children.slice(),i.moveElements(p,{x:0,y:0},t,s));var d=o.incoming.slice(),h=o.outgoing.slice();E(d,(function(e){c(e.source,t,e)&&n.reconnectEnd(e,t,bd(e,t,l),s)})),E(h,(function(e){var i=e.target;c(t,i,e)&&n.reconnectStart(e,t,yd(e,t,l),s)}))},em.prototype.postExecute=function(e){var t=e.oldShape;this._modeling.removeShape(t)},em.prototype.execute=function(e){},em.prototype.revert=function(e){},em.prototype.createShape=function(e,t,n,i){return this._modeling.createShape(e,t,n,i)},em.prototype.reconnectStart=function(e,t,n,i){this._modeling.reconnectStart(e,t,n,i)},em.prototype.reconnectEnd=function(e,t,n,i){this._modeling.reconnectEnd(e,t,n,i)},tm.$inject=["modeling"],tm.prototype.execute=function(e){var t=e.shape,n=e.newBounds,i=e.minBounds;if(void 0===n.x||void 0===n.y||void 0===n.width||void 0===n.height)throw new Error("newBounds must have {x, y, width, height} properties");if(i&&(n.width<i.width||n.height<i.height))throw new Error("width and height cannot be less than minimum height and width");if(!i&&n.width<10||n.height<10)throw new Error("width and height cannot be less than 10px");return e.oldBounds={width:t.width,height:t.height,x:t.x,y:t.y},G(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t},tm.prototype.postExecute=function(e){var t=this._modeling,n=e.shape,i=e.oldBounds;!1!==(e.hints||{}).layout&&(E(n.incoming,(function(e){t.layoutConnection(e,{connectionEnd:bd(e,n,i)})})),E(n.outgoing,(function(e){t.layoutConnection(e,{connectionStart:yd(e,n,i)})})))},tm.prototype.revert=function(e){var t=e.shape,n=e.oldBounds;return G(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t},nm.$inject=["modeling"],nm.prototype.preExecute=function(e){var t=e.delta,n=e.direction,i=e.movingShapes,r=e.resizingShapes,o=e.start,a={};this.moveShapes(i,t),E(r,(function(e){a[e.id]=function(e){return{x:e.x,y:e.y,height:e.height,width:e.width}}(e)})),this.resizeShapes(r,t,n),this.updateConnectionWaypoints(function(e,t){var n=[];return E(e.concat(t),(function(i){var r=i.incoming,o=i.outgoing;E(r.concat(o),(function(i){var r=i.source,o=i.target;(sf(e,r)||sf(e,o)||sf(t,r)||sf(t,o))&&(sf(n,i)||n.push(i))}))})),n}(i,r),t,n,o,i,r,a)},nm.prototype.execute=function(){},nm.prototype.revert=function(){},nm.prototype.moveShapes=function(e,t){var n=this;E(e,(function(e){n._modeling.moveShape(e,t,null,{autoResize:!1,layout:!1,recurse:!1})}))},nm.prototype.resizeShapes=function(e,t,n){var i=this;E(e,(function(e){var r=function(e,t,n){var i=e.x,r=e.y,o=e.width,a=e.height,s=n.x,c=n.y;switch(t){case"n":return{x:i,y:r+c,width:o,height:a-c};case"s":return{x:i,y:r,width:o,height:a+c};case"w":return{x:i+s,y:r,width:o-s,height:a};case"e":return{x:i,y:r,width:o+s,height:a};default:throw new Error("unknown direction: "+t)}}(e,n,t);i._modeling.resizeShape(e,r,null,{attachSupport:!1,autoResize:!1,layout:!1})}))},nm.prototype.updateConnectionWaypoints=function(e,t,n,i,r,o,a){var s=this,c=r.concat(o);E(e,(function(e){var p=e.source,u=e.target,l=function(e){return R(e.waypoints,(function(e){return(e=im(e)).original&&(e.original=im(e.original)),e}))}(e),d=rm(n),h={labelBehavior:!1};am(c,p)&&am(c,u)?(l=R(l,(function(e){return om(e,i,n)&&(e[d]=e[d]+t[d]),e.original&&om(e.original,i,n)&&(e.original[d]=e.original[d]+t[d]),e})),s._modeling.updateWaypoints(e,l,{labelBehavior:!1})):(am(c,p)||am(c,u))&&(am(r,p)?h.connectionStart=xd(e,p,t):am(r,u)?h.connectionEnd=_d(e,u,t):am(o,p)?h.connectionStart=yd(e,p,a[p.id]):am(o,u)&&(h.connectionEnd=bd(e,u,a[u.id])),s._modeling.layoutConnection(e,h))}))},sm.$inject=["modeling"],sm.prototype.execute=function(e){var t=e.shape,n=t.children;e.oldChildrenVisibility=cm(n),t.collapsed=!t.collapsed;var i=pm(n,t.collapsed);return[t].concat(i)},sm.prototype.revert=function(e){var t=e.shape,n=e.oldChildrenVisibility,i=um(t.children,n);return t.collapsed=!t.collapsed,[t].concat(i)},lm.$inject=["modeling"],lm.prototype.execute=function(e){var t=e.shape,n=e.newHost,i=t.host;return e.oldHost=i,e.attacherIdx=dm(i,t),hm(n,t),t.host=n,t},lm.prototype.revert=function(e){var t=e.shape,n=e.newHost,i=e.oldHost,r=e.attacherIdx;return t.host=i,dm(n,t),hm(i,t,r),t},fm.prototype.execute=function(e){var t=e.connection,n=e.newWaypoints;return e.oldWaypoints=t.waypoints,t.waypoints=n,t},fm.prototype.revert=function(e){var t=e.connection,n=e.oldWaypoints;return t.waypoints=n,t},mm.$inject=["eventBus","elementFactory","commandStack"],mm.prototype.getHandlers=function(){return{"shape.append":Mf,"shape.create":Lf,"shape.delete":Hf,"shape.move":Zf,"shape.resize":tm,"shape.replace":em,"shape.toggleCollapse":sm,spaceTool:nm,"label.create":If,"connection.create":Df,"connection.delete":$f,"connection.move":Uf,"connection.layout":qf,"connection.updateWaypoints":fm,"connection.reconnect":Qf,"elements.create":jf,"elements.move":Xf,"elements.delete":Vf,"elements.distribute":Gf,"elements.align":kf,"element.updateAttachment":lm}},mm.prototype.registerHandlers=function(e){E(this.getHandlers(),(function(t,n){e.registerHandler(n,t)}))},mm.prototype.moveShape=function(e,t,n,i,r){"object"==typeof i&&(r=i,i=null);var o={shape:e,delta:t,newParent:n,newParentIndex:i,hints:r||{}};this._commandStack.execute("shape.move",o)},mm.prototype.updateAttachment=function(e,t){var n={shape:e,newHost:t};this._commandStack.execute("element.updateAttachment",n)},mm.prototype.moveElements=function(e,t,n,i){var r,o=(i=i||{}).attach,a=n;!0===o?(r=n,a=n.parent):!1===o&&(r=null);var s={shapes:e,delta:t,newParent:a,newHost:r,hints:i};this._commandStack.execute("elements.move",s)},mm.prototype.moveConnection=function(e,t,n,i,r){"object"==typeof i&&(r=i,i=void 0);var o={connection:e,delta:t,newParent:n,newParentIndex:i,hints:r||{}};this._commandStack.execute("connection.move",o)},mm.prototype.layoutConnection=function(e,t){var n={connection:e,hints:t||{}};this._commandStack.execute("connection.layout",n)},mm.prototype.createConnection=function(e,t,n,i,r,o){"object"==typeof n&&(o=r,r=i,i=n,n=void 0);var a={source:e,target:t,parent:r,parentIndex:n,connection:i=this._create("connection",i),hints:o};return this._commandStack.execute("connection.create",a),a.connection},mm.prototype.createShape=function(e,t,n,i,r){"number"!=typeof i&&(r=i,i=void 0);var o,a,s=(r=r||{}).attach;e=this._create("shape",e),s?(o=n.parent,a=n):o=n;var c={position:t,shape:e,parent:o,parentIndex:i,host:a,hints:r};return this._commandStack.execute("shape.create",c),c.shape},mm.prototype.createElements=function(e,t,n,i,r){h(e)||(e=[e]),"number"!=typeof i&&(r=i,i=void 0);var o={position:t,elements:e,parent:n,parentIndex:i,hints:r=r||{}};return this._commandStack.execute("elements.create",o),o.elements},mm.prototype.createLabel=function(e,t,n,i){n=this._create("label",n);var r={labelTarget:e,position:t,parent:i||e.parent,shape:n};return this._commandStack.execute("label.create",r),r.shape},mm.prototype.appendShape=function(e,t,n,i,r){r=r||{};var o={source:e,position:n,target:i,shape:t=this._create("shape",t),connection:r.connection,connectionParent:r.connectionParent,hints:r};return this._commandStack.execute("shape.append",o),o.shape},mm.prototype.removeElements=function(e){var t={elements:e};this._commandStack.execute("elements.delete",t)},mm.prototype.distributeElements=function(e,t,n){var i={groups:e,axis:t,dimension:n};this._commandStack.execute("elements.distribute",i)},mm.prototype.removeShape=function(e,t){var n={shape:e,hints:t||{}};this._commandStack.execute("shape.delete",n)},mm.prototype.removeConnection=function(e,t){var n={connection:e,hints:t||{}};this._commandStack.execute("connection.delete",n)},mm.prototype.replaceShape=function(e,t,n){var i={oldShape:e,newData:t,hints:n||{}};return this._commandStack.execute("shape.replace",i),i.newShape},mm.prototype.alignElements=function(e,t){var n={elements:e,alignment:t};this._commandStack.execute("elements.align",n)},mm.prototype.resizeShape=function(e,t,n,i){var r={shape:e,newBounds:t,minBounds:n,hints:i};this._commandStack.execute("shape.resize",r)},mm.prototype.createSpace=function(e,t,n,i,r){var o={delta:n,direction:i,movingShapes:e,resizingShapes:t,start:r};this._commandStack.execute("spaceTool",o)},mm.prototype.updateWaypoints=function(e,t,n){var i={connection:e,newWaypoints:t,hints:n||{}};this._commandStack.execute("connection.updateWaypoints",i)},mm.prototype.reconnect=function(e,t,n,i,r){var o={connection:e,newSource:t,newTarget:n,dockingOrPoints:i,hints:r||{}};this._commandStack.execute("connection.reconnect",o)},mm.prototype.reconnectStart=function(e,t,n,i){i||(i={}),this.reconnect(e,t,e.target,n,G(i,{docking:"source"}))},mm.prototype.reconnectEnd=function(e,t,n,i){i||(i={}),this.reconnect(e,e.source,t,n,G(i,{docking:"target"}))},mm.prototype.connect=function(e,t,n,i){return this.createConnection(e,t,n||{},e.parent,i)},mm.prototype._create=function(e,t){return t instanceof In?t:this._elementFactory.create(e,t)},mm.prototype.toggleCollapse=function(e,t){var n={shape:e,hints:t||{}};this._commandStack.execute("shape.toggleCollapse",n)},vm.$inject=["elementRegistry"],vm.prototype.execute=function(e){var t=e.element,n=e.moddleElement,i=e.properties;if(!n)throw new Error("<moddleElement> required");var r=e.changed||this.getVisualReferences(n).concat(t),o=e.oldProperties||function(e,t){return C(t,(function(t,n){return t[n]=e.get(n),t}),{})}(n,A(i));return gm(n,i),e.oldProperties=o,e.changed=r,r},vm.prototype.revert=function(e){var t=e.oldProperties,n=e.moddleElement,i=e.changed;return gm(n,t),i},vm.prototype.getVisualReferences=function(e){var t=this._elementRegistry;return jr(e,"bpmn:DataObject")?function(e,t){return t.filter((function(t){return jr(t,"bpmn:DataObjectReference")&&Or(t).dataObjectRef===e}))}(e,t):[]};var ym="default",bm="id",xm="di",_m={width:0,height:0};function wm(e,t,n,i,r){this._elementRegistry=e,this._moddle=t,this._translate=n,this._modeling=i,this._textRenderer=r}function Em(e,t){return bm in e&&e.id!==t.id}function Sm(e,t){E(t,(function(t,n){n!==xm?e.set(n,t):e.di&&function(e,t){E(t,(function(t,n){e.set(n,t)}))}(e.di,t)}))}wm.$inject=["elementRegistry","moddle","translate","modeling","textRenderer"],wm.prototype.execute=function(e){var t=e.element,n=[t],i=this._translate;if(!t)throw new Error(i("element required"));var r=this._elementRegistry,o=this._moddle.ids,a=t.businessObject,s=function(e){var t=G({},e);return Cm.forEach((function(n){n in e&&(t[n]=Or(t[n]))})),t}(e.properties),c=e.oldProperties||function(e,t){return C(A(t),(function(n,i){return n[i]=i!==xm?e.get(i):function(e,t){return C(t,(function(t,n){return t[n]=e.get(n),t}),{})}(e.di,A(t.di)),n}),{})}(a,s);return Em(s,a)&&(o.unclaim(a.id),r.updateId(t,s.id),o.claim(s.id,a)),ym in s&&(s.default&&n.push(r.get(s.default.id)),a.default&&n.push(r.get(a.default.id))),Sm(a,s),e.oldProperties=c,e.changed=n,n},wm.prototype.postExecute=function(e){var t=e.element.label,n=t&&Or(t).name;if(n){var i=this._textRenderer.getExternalLabelBounds(t,n);this._modeling.resizeShape(t,i,_m)}},wm.prototype.revert=function(e){var t=e.element,n=e.properties,i=e.oldProperties,r=t.businessObject,o=this._elementRegistry,a=this._moddle.ids;return Sm(r,i),Em(n,r)&&(a.unclaim(n.id),o.updateId(t,i.id),a.claim(i.id,r)),e.changed};var Cm=["default"];function Pm(e,t){this._canvas=e,this._modeling=t}function Tm(e,t){this._modeling=e,this._spaceTool=t}function Rm(e,t){this._modeling=e,this._translate=t}function Am(e,t){this._modeling=e,this._spaceTool=t}Pm.$inject=["canvas","modeling"],Pm.prototype.execute=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,r=t.getRootElement(),o=r.businessObject,a=o.$parent,s=o.di;t.setRootElement(n,!0),wt(a.rootElements,i),i.$parent=a,_t(a.rootElements,o),o.$parent=null,o.di=null,s.bpmnElement=i,i.di=s,e.oldRoot=r},Pm.prototype.revert=function(e){var t=this._canvas,n=e.newRoot.businessObject,i=e.oldRoot,r=i.businessObject,o=n.$parent,a=n.di;t.setRootElement(i,!0),_t(o.rootElements,n),n.$parent=null,wt(o.rootElements,r),r.$parent=o,n.di=null,a.bpmnElement=r,r.di=a},Tm.$inject=["modeling","spaceTool"],Tm.prototype.preExecute=function(e){var t=this._spaceTool,n=this._modeling,i=e.shape,r=e.location,o=tu(i),a=o===i,s=a?i:i.parent;eu(s).length||n.createShape({type:"bpmn:Lane"},{x:i.x+Qp,y:i.y,width:i.width-Qp,height:i.height},s);var c=[];ht(o,(function(e){return c.push(e),e.label&&c.push(e.label),e===i?[]:w(e.children,(function(e){return e!==i}))}));var p="top"===r?-120:120,u="top"===r?i.y:i.y+i.height,l=u+("top"===r?10:-10),d="top"===r?"n":"s",h=t.calculateAdjustments(c,"y",p,l);t.makeSpace(h.movingShapes,h.resizingShapes,{x:0,y:p},d,l),e.newLane=n.createShape({type:"bpmn:Lane"},{x:i.x+(a?Qp:0),y:u-("top"===r?120:0),width:i.width-(a?Qp:0),height:120},s)},Rm.$inject=["modeling","translate"],Rm.prototype.preExecute=function(e){var t=this._modeling,n=this._translate,i=e.shape,r=e.count,o=eu(i),a=o.length;if(a>r)throw new Error(n("more than {count} child lanes",{count:r}));var s,c,p,u,l,d=Math.round(i.height/r);for(l=0;l<r;l++)s=i.y+l*d,c=l===r-1?i.height-d*l:d,p={x:i.x+Qp,y:s,width:i.width-Qp,height:c},l<a?t.resizeShape(o[l],p):(u={type:"bpmn:Lane"},t.createShape(u,p,i))},Am.$inject=["modeling","spaceTool"],Am.prototype.preExecute=function(e){var t=e.shape,n=e.newBounds;!1!==e.balanced?this.resizeBalanced(t,n):this.resizeSpace(t,n)},Am.prototype.resizeBalanced=function(e,t){var n=this._modeling,i=nu(e,t);n.resizeShape(e,t),i.forEach((function(e){n.resizeShape(e.shape,e.newBounds)}))},Am.prototype.resizeSpace=function(e,t){var n,i,r,o,a,s=this._spaceTool,c=hn(e),p=Wp(hn(t),c),u=tu(e),l=[],d=[];ht(u,(function(e){return l.push(e),(jr(e,"bpmn:Lane")||jr(e,"bpmn:Participant"))&&d.push(e),e.children})),(p.bottom||p.top)&&(n=p.bottom||p.top,i=e.y+(p.bottom?e.height:0)+(p.bottom?-10:10),r=p.bottom?"s":"n",o=p.top>0||p.bottom<0?-n:n,a=s.calculateAdjustments(l,"y",o,i),s.makeSpace(a.movingShapes,a.resizingShapes,{x:0,y:n},r)),(p.left||p.right)&&(n=p.right||p.left,i=e.x+(p.right?e.width:0)+(p.right?-10:100),r=p.right?"e":"w",o=p.left>0||p.right<0?-n:n,a=s.calculateAdjustments(d,"x",o,i),s.makeSpace(a.movingShapes,a.resizingShapes,{x:n,y:0},r))};var km="flowNodeRef",Mm="lanes";function Dm(e){this._elementRegistry=e}function Bm(e){this._moddle=e}Dm.$inject=["elementRegistry"],Dm.prototype.computeUpdates=function(e,t){var n=[],i=[],r={},o=[];function a(e){-1===n.indexOf(e)&&(o.push(e),n.push(e))}function s(e){return e.parent?function(e){var t=tu(e);return r[t.id]||(r[t.id]=Jp(t)),r[t.id]}(e).filter((function(t){return n=e,i=hn(t),r=n.x+n.width/2,o=n.y+n.height/2,r>i.left&&r<i.right&&o>i.top&&o<i.bottom;var n,i,r,o})).map((function(e){return e.businessObject})):[]}return t.forEach((function(e){var t=tu(e);t&&-1===n.indexOf(t)&&(t.children.filter((function(e){return jr(e,"bpmn:FlowNode")})).forEach(a),n.push(t))})),e.forEach(a),o.forEach((function(e){var t=e.businessObject,n=t.get(Mm).slice(),r=s(e);i.push({flowNode:t,remove:n,add:r})})),t.forEach((function(e){var t=e.businessObject;e.parent||t.get(km).forEach((function(e){i.push({flowNode:e,remove:[t],add:[]})}))})),i},Dm.prototype.execute=function(e){var t=e.updates;t||(t=e.updates=this.computeUpdates(e.flowNodeShapes,e.laneShapes)),t.forEach((function(e){var t=e.flowNode,n=t.get(Mm);e.remove.forEach((function(e){_t(n,e),_t(e.get(km),t)})),e.add.forEach((function(e){wt(n,e),wt(e.get(km),t)}))}))},Dm.prototype.revert=function(e){e.updates.forEach((function(e){var t=e.flowNode,n=t.get(Mm);e.add.forEach((function(e){_t(n,e),_t(e.get(km),t)})),e.remove.forEach((function(e){wt(n,e),wt(e.get(km),t)}))}))},Bm.$inject=["moddle"],Bm.prototype.execute=function(e){var t=this._moddle.ids,n=e.id,i=e.element;e.claiming?t.claim(n,i):t.unclaim(n)},Bm.prototype.revert=function(e){var t=this._moddle.ids,n=e.id,i=e.element;e.claiming?t.unclaim(n):t.claim(n,i)};var jm={fill:void 0,stroke:void 0};function Om(e){this._commandStack=e,this._normalizeColor=function(e){if(e){if(g(e)){var t=function(e){var t=document.createElement("canvas").getContext("2d");return t.fillStyle="transparent",t.fillStyle=e,/^#[0-9a-fA-F]{6}$/.test(t.fillStyle)?t.fillStyle:null}(e);if(t)return t}throw new Error("invalid color value: "+e)}}}Om.$inject=["commandStack"],Om.prototype.postExecute=function(e){var t=e.elements,n=e.colors||jm,i=this,r={};"fill"in n&&G(r,{"background-color":this._normalizeColor(n.fill)}),"stroke"in n&&G(r,{"border-color":this._normalizeColor(n.stroke)}),E(t,(function(e){var t=function(e){return!!e.waypoints}(e)?W(r,["border-color"]):r;!function(e){"border-color"in e&&(e.stroke=e["border-color"]);"background-color"in e&&(e.fill=e["background-color"])}(t),i._commandStack.execute("element.updateProperties",{element:e,properties:{di:t}})}))};var Nm={width:0,height:0};function Lm(e,t){function n(e,t){var n=e.label||e,i=e.labelTarget||e;return function(e,t,n){var i=e.businessObject,r=Wr(i);r&&("categoryValueRef"===r?i.categoryValueRef.value=t:i[r]=t)}(n,t),[n,i]}this.preExecute=function(t){var n=t.element,i=n.businessObject,r=t.newLabel;if(!xo(n)&&vo(n)&&!go(n)&&!Im(r)){var o=bo(n);o={x:o.x,y:o.y+7},e.createLabel(n,o,{id:i.id+"_label",businessObject:i})}},this.execute=function(e){return e.oldLabel=qr(e.element),n(e.element,e.newLabel)},this.revert=function(e){return n(e.element,e.oldLabel)},this.postExecute=function(n){var i=n.element,r=i.label||i,o=n.newLabel,a=n.newBounds,s=n.hints||{};if(xo(r)||jr(r,"bpmn:TextAnnotation"))if(xo(r)&&Im(o))!1!==s.removeShape&&e.removeShape(r,{unsetLabel:!1});else{var c=qr(r);void 0===a&&(a=t.getExternalLabelBounds(r,c)),a&&e.resizeShape(r,a,Nm)}}}function Im(e){return!e||!e.trim()}function zm(e,t,n,i){mm.call(this,e,t,n),this._bpmnRules=i}function Fm(){}Lm.$inject=["modeling","textRenderer"],i(zm,mm),zm.$inject=["eventBus","elementFactory","commandStack","bpmnRules"],zm.prototype.getHandlers=function(){var e=mm.prototype.getHandlers.call(this);return e["element.updateModdleProperties"]=vm,e["element.updateProperties"]=wm,e["canvas.updateRoot"]=Pm,e["lane.add"]=Tm,e["lane.resize"]=Am,e["lane.split"]=Rm,e["lane.updateRefs"]=Dm,e["id.updateClaim"]=Bm,e["element.setColor"]=Om,e["element.updateLabel"]=Lm,e},zm.prototype.updateLabel=function(e,t,n,i){this._commandStack.execute("element.updateLabel",{element:e,newLabel:t,newBounds:n,hints:i||{}})},zm.prototype.connect=function(e,t,n,i){var r=this._bpmnRules;if(n||(n=r.canConnect(e,t)),n)return this.createConnection(e,t,n,e.parent,i)},zm.prototype.updateModdleProperties=function(e,t,n){this._commandStack.execute("element.updateModdleProperties",{element:e,moddleElement:t,properties:n})},zm.prototype.updateProperties=function(e,t){this._commandStack.execute("element.updateProperties",{element:e,properties:t})},zm.prototype.resizeLane=function(e,t,n){this._commandStack.execute("lane.resize",{shape:e,newBounds:t,balanced:n})},zm.prototype.addLane=function(e,t){var n={shape:e,location:t};return this._commandStack.execute("lane.add",n),n.newLane},zm.prototype.splitLane=function(e,t){this._commandStack.execute("lane.split",{shape:e,count:t})},zm.prototype.makeCollaboration=function(){var e=this._create("root",{type:"bpmn:Collaboration"}),t={newRoot:e};return this._commandStack.execute("canvas.updateRoot",t),e},zm.prototype.updateLaneRefs=function(e,t){this._commandStack.execute("lane.updateRefs",{flowNodeShapes:e,laneShapes:t})},zm.prototype.makeProcess=function(){var e={newRoot:this._create("root",{type:"bpmn:Process"})};this._commandStack.execute("canvas.updateRoot",e)},zm.prototype.claimId=function(e,t){this._commandStack.execute("id.updateClaim",{id:e,element:t,claiming:!0})},zm.prototype.unclaimId=function(e,t){this._commandStack.execute("id.updateClaim",{id:e,element:t})},zm.prototype.setColor=function(e,t){e.length||(e=[e]),this._commandStack.execute("element.setColor",{elements:e,colors:t})},Fm.prototype.layoutConnection=function(e,t){return[(t=t||{}).connectionStart||mn(t.source||e.source),t.connectionEnd||mn(t.target||e.target)]};var $m=Math.round,Vm={"h:h":20,"v:v":20,"h:v":-10,"v:h":-10};function Hm(e,t,n){var i,r,o,a=vn(t,e,5),s=n.split(":")[0],c=$m((t.x-e.x)/2+e.x),p=$m((t.y-e.y)/2+e.y),u=(o=a,{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/left|right/,v:/top|bottom/}[s].test(o)),l=/h|r|l/.test(s),d=!1;return u?(i=l?{x:c,y:e.y}:{x:e.x,y:p},r=l?"h:h":"v:v"):(r=l?"h:v":"v:h",function(e,t){return!{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/./,v:/./}[t].test(e)}(a,s)?l?(d=p===e.y,i={x:e.x+20*(/l/.test(s)?-1:1),y:d?p+20:p}):i={x:(d=c===e.x)?c+20:c,y:e.y+20*(/t/.test(s)?-1:1)}:i={x:c,y:p}),{waypoints:Wm(e,i,r).concat(i),directions:r,turnNextDirections:d}}function Gm(e){return e.split(":").reverse().join(":")}function Wm(e,t,n){if(!function(e){return e&&/^h|v|t|r|b|l:h|v|t|r|b|l$/.test(e)}(n=n||"h:h"))throw new Error("unknown directions: <"+n+">: must be specified as <start>:<end> with start/end in { h,v,t,r,b,l }");if(Xm(n)){var i=function(e,t,n){return Hm(e,t,n)}(e,t,n),r=function(e,t,n){var i=Hm(t,e,Gm(n));return{waypoints:i.waypoints.slice().reverse(),directions:Gm(i.directions),turnNextDirections:i.turnNextDirections}}(e,t,n),o=function(e,t){var n=e.directions.split(":")[1],i=t.directions.split(":")[0];e.turnNextDirections&&(n="h"==n?"v":"h"),t.turnNextDirections&&(i="h"==i?"v":"h");var r=n+":"+i;return{waypoints:Wm(e.waypoints[e.waypoints.length-1],t.waypoints[0],r),directions:r}}(i,r);return[].concat(i.waypoints,o.waypoints,r.waypoints)}return function(e,t,n){var i=$m((t.x-e.x)/2+e.x),r=$m((t.y-e.y)/2+e.y);if("h:v"===n)return[{x:t.x,y:e.y}];if("v:h"===n)return[{x:e.x,y:t.y}];if("h:h"===n)return[{x:i,y:e.y},{x:i,y:t.y}];if("v:v"===n)return[{x:e.x,y:r},{x:t.x,y:r}];throw new Error("invalid directions: can only handle varians of [hv]:[hv]")}(e,t,n)}function qm(e,t,n,i,r){var o=S(r&&r.preferredLayouts||[],"straight")[0]||"h:h",a=vn(e,t,Vm[o]||0),s=function(e,t){if(Xm(t))return t;switch(e){case"intersect":return"t:t";case"top":case"bottom":return"v:v";case"left":case"right":return"h:h";default:return t}}(a,o);n=n||mn(e),i=i||mn(t);var c=s.split(":");return function(e,t,n){var i=Wm(e,t,n);return i.unshift(e),i.push(t),Qm(i)}(Zm(n,e,c[0],function(e){return{top:"bottom",bottom:"top",left:"right",right:"left","top-left":"bottom-right","bottom-right":"top-left","top-right":"bottom-left","bottom-left":"top-right"}[e]}(a)),Zm(i,t,c[1],a),s)}function Um(e,t,n,i,r,o){var a;return h(n)&&(r=n,o=i,n=mn(e),i=mn(t)),r=r||[],(a=-1!==(o=G({preferredLayouts:[]},o)).preferredLayouts.indexOf("straight")&&function(e,t,n,i,r){var o,a,s={};if(a=vn(e,t),!/^(top|bottom|left|right)$/.test(a))return null;/top|bottom/.test(a)&&(o="x");/left|right/.test(a)&&(o="y");return"target"===r.preserveDocking?Ym(o,i,e)?(s[o]=i[o],[{x:void 0!==s.x?s.x:n.x,y:void 0!==s.y?s.y:n.y,original:{x:void 0!==s.x?s.x:n.x,y:void 0!==s.y?s.y:n.y}},{x:i.x,y:i.y}]):null:Ym(o,n,t)?(s[o]=n[o],[{x:n.x,y:n.y},{x:void 0!==s.x?s.x:i.x,y:void 0!==s.y?s.y:i.y,original:{x:void 0!==s.x?s.x:i.x,y:void 0!==s.y?s.y:i.y}}]):null}(e,t,n,i,o))||(a=o.connectionEnd&&function(e,t,n,i){var r=i.slice().reverse();return(r=Km(e,t,n,r))?r.reverse():null}(t,e,i,r))?a:(a=o.connectionStart&&Km(e,t,n,r))||(!o.connectionStart&&!o.connectionEnd&&r&&r.length?r:qm(e,t,n,i,o))}function Ym(e,t,n){return function(e,t,n){return e>=t&&e<=n}(t[e],n[e],n[e]+n[{x:"width",y:"height"}[e]])}function Km(e,t,n,i){if(function(e){return e.length<3||!(e.length>4)&&!!x(e,(function(t,n){var i=e[n-1];return i&&Ct(t,i)<3}))}(i))return null;var r,o=i[0],a=i.slice();return a[0]=n,a[1]=function(e,t,n){switch(Tt(t,e)){case"v":return{x:n.x,y:e.y};case"h":return{x:e.x,y:n.y}}return{x:e.x,y:e.y}}(a[1],o,n),(r=function(e,t,n){var i;for(i=e.length-2;0!==i;i--)if(Rt(e[i],t,20)||Rt(e[i],n,20))return e.slice(i);return e}(a,e,t))!==a&&(a=Km(e,t,n,r)),a&&Tt(a)?null:a}function Xm(e){return e&&/t|r|b|l/.test(e)}function Zm(e,t,n,i){if("h"===n&&(n=/left/.test(i)?"l":"r"),"v"===n&&(n=/top/.test(i)?"t":"b"),"t"===n)return{original:e,x:e.x,y:t.y};if("r"===n)return{original:e,x:t.x+t.width,y:e.y};if("b"===n)return{original:e,x:e.x,y:t.y+t.height};if("l"===n)return{original:e,x:t.x,y:e.y};throw new Error("unexpected dockingDirection: <"+n+">")}function Qm(e){return e.reduce((function(t,n,i){return Pt(t[t.length-1],e[i+1],n,0)||t.push(n),t}),[])}var Jm={top:"bottom","top-right":"bottom-left","top-left":"bottom-right",right:"left",bottom:"top","bottom-right":"top-left","bottom-left":"top-right",left:"right"},ev={top:"t",right:"r",bottom:"b",left:"l"};function tv(){}function nv(e,t){return jr(t,"bpmn:Participant")?"source":jr(e,"bpmn:Participant")?"target":av(t)?"source":av(e)||jr(t,"bpmn:Event")?"target":jr(e,"bpmn:Event")?"source":null}function iv(e){return av(e)?"target":"source"}function rv(e,t){return e?e.original||e:mn(t)}function ov(e,t){return jr(t,"bpmn:Activity")&&jr(e,"bpmn:BoundaryEvent")&&t.businessObject.isForCompensation}function av(e){return jr(e,"bpmn:SubProcess")&&Lr(e)}function sv(e,t){return e===t}function cv(e){var t=/right|left/.exec(e);return t&&t[0]}function pv(e){var t=/top|bottom/.exec(e);return t&&t[0]}function uv(e){return"right"===e||"left"===e}function lv(e,t){var n=t.waypoints,i=n&&n.length&&vn(n[0],e);return"top"===i?["t:r"]:"right"===i?["r:b"]:"left"===i?["l:t"]:["b:l"]}function dv(e,t,n){var i,r,o=mn(e),a=mn(t),s=(r=(i=e).host,vn(mn(i),r,-10)),c=sv(e.host,t),p=-1!==["top","right","bottom","left"].indexOf(s),u=vn(a,o,{x:e.width/2+t.width/2,y:e.height/2+t.height/2});return c?function(e,t,n,i,r){var o,a=t?e:pv(e),s=ev[a];o=t?uv(e)?hv("y",n,i,r)?"h":"b":hv("x",n,i,r)?"v":"l":"v";return[s+":"+o]}(s,p,e,t,n):[function(e,t,n){if(n)return ev[e];if(sv(pv(e),pv(t))||(i=cv(e),r=cv(t),Jm[i]===r))return ev[pv(e)];var i,r;return ev[cv(e)]}(s,u,p)+":"+function(e,t,n){if(n)return uv(e)?(i=t,r=cv(e),o=Jm[r],-1!==i.indexOf(o)||sv(e,t)?"h":"v"):function(e,t){var n=pv(e),i=Jm[n];return-1!==t.indexOf(i)}(e,t)||sv(e,t)?"v":"h";var i,r,o;return uv(t)||sv(pv(e),pv(t))&&cv(t)?"h":"v"}(s,u,p)]}function hv(e,t,n,i){return!(fv(e,i,n,40)||fv(e,i,{x:n.x+n.width,y:n.y+n.height},40)||fv(e,i,mn(t),40))}function fv(e,t,n,i){return Math.abs(t[e]-n[e])<i}function mv(e){return G({original:e.point.original||e.point},e.actual)}function vv(e,t){this._elementRegistry=e,this._graphicsFactory=t}i(tv,Fm),tv.prototype.layoutConnection=function(e,t){t||(t={});var n,i,r=t.source||e.source,o=t.target||e.target,a=t.waypoints||e.waypoints,s=t.connectionStart,c=t.connectionEnd;return s||(s=rv(a&&a[0],r)),c||(c=rv(a&&a[a.length-1],o)),(jr(e,"bpmn:Association")||jr(e,"bpmn:DataAssociation"))&&a&&!ov(r,o)?[].concat([s],a.slice(1,-1),[c]):(jr(e,"bpmn:MessageFlow")?n=function(e,t){return{preferredLayouts:["straight","v:v"],preserveDocking:nv(e,t)}}(r,o):(jr(e,"bpmn:SequenceFlow")||ov(r,o))&&(n=r===o?{preferredLayouts:lv(r,e)}:jr(r,"bpmn:BoundaryEvent")?{preferredLayouts:dv(r,o,c)}:av(r)||av(o)?function(e){return{preferredLayouts:["straight","h:h"],preserveDocking:iv(e)}}(r):jr(r,"bpmn:Gateway")?{preferredLayouts:["v:h"]}:jr(o,"bpmn:Gateway")?{preferredLayouts:["h:v"]}:{preferredLayouts:["h:h"]}),n&&(i=Qm(Um(r,o,s,c,a,n=G(n,t)))),i||[s,c])},vv.$inject=["elementRegistry","graphicsFactory"],vv.prototype.getCroppedWaypoints=function(e,t,n){t=t||e.source,n=n||e.target;var i=this.getDockingPoint(e,t,!0),r=this.getDockingPoint(e,n),o=e.waypoints.slice(i.idx+1,r.idx);return o.unshift(mv(i)),o.push(mv(r)),o},vv.prototype.getDockingPoint=function(e,t,n){var i,r,o=e.waypoints;return{point:r=o[i=n?0:o.length-1],actual:this._getIntersection(t,e,n)||r,idx:i}},vv.prototype._getIntersection=function(e,t,n){return gn(this._getShapePath(e),this._getConnectionPath(t),n)},vv.prototype._getConnectionPath=function(e){return this._graphicsFactory.getConnectionPath(e)},vv.prototype._getShapePath=function(e){return this._graphicsFactory.getShapePath(e)},vv.prototype._getGfx=function(e){return this._elementRegistry.getGraphics(e)};var gv={__init__:["modeling","bpmnUpdater"],__depends__:[nh,Lh,zh,Vh,Sp,Gh,Kh,Jh,rf,qo,Gu,Sf],bpmnFactory:["type",Cf],bpmnUpdater:["type",Pf],elementFactory:["type",Rf],modeling:["type",zm],layouter:["type",tv],connectionDocking:["type",vv]},yv=Math.round;function bv(e,t,n,i,r){function o(e,t,n,i){return r.allowed("elements.move",{shapes:e,delta:t,position:n,target:i})}function a(e,n,i,r){if(f(i)&&(r=i,i=!1),!n.waypoints&&n.parent){var o=function(e){return{x:e.x+yv(e.width/2),y:e.y+yv(e.height/2)}}(n);return t.init(e,o,"shape.move",{cursor:"grabbing",autoActivate:i,data:{shape:n,context:r||{}}}),!0}}e.on("shape.move.start",1500,(function(e){var t=e.context,n=e.shape,r=i.get().slice();-1===r.indexOf(n)&&(r=[n]),G(t,{shapes:r=function(e){var t=D(e,"id");return w(e,(function(e){for(;e=e.parent;)if(t[e.id])return!1;return!0}))}(r),validatedShapes:r,shape:n})})),e.on("shape.move.start",1250,(function(e){var t=e.context,n=t.validatedShapes;if(!(t.canExecute=o(n)))return!1})),e.on("shape.move.move",500,(function(e){var t,n=e.context,i=n.validatedShapes,r=e.hover,a={x:e.dx,y:e.dy};t=o(i,a,{x:e.x,y:e.y},r),n.delta=a,n.canExecute=t,n.target=null!==t?r:null})),e.on("shape.move.end",(function(e){var t=e.context,i=t.delta,r=t.canExecute,o="attach"===r,a=t.shapes;if(!1===r)return!1;i.x=yv(i.x),i.y=yv(i.y),0===i.x&&0===i.y||n.moveElements(a,i,t.target,{primaryShape:t.shape,attach:o})})),e.on("element.mousedown",(function(e){if(Mo(e)){var t=To(e);if(!t)throw new Error("must supply DOM mousedown event");return a(t,e.element)}})),this.start=a}bv.$inject=["eventBus","dragging","modeling","selection","rules"];var xv="djs-dragging",_v="drop-ok",wv="drop-not-ok",Ev="new-parent",Sv="attach-ok";function Cv(e,t,n,i){function r(e){return function(e){return w(e,(function(t){return!function(e){return e.waypoints}(t)||x(e,N({id:t.source.id}))&&x(e,N({id:t.target.id}))}))}(o(e))}function o(e){var t=ft(e,!0),n=R(t,(function(e){return(e.incoming||[]).concat(e.outgoing||[])}));return s(t.concat(n))}function a(e,n){[Sv,_v,wv,Ev].forEach((function(i){i===n?t.addMarker(e,i):t.removeMarker(e,i)}))}e.on("shape.move.start",499,(function(e){var a=e.context,c=a.shapes,p=a.allDraggedElements,u=r(c);if(!a.dragGroup){var l=Le("g");Se(l,n.cls("djs-drag-group",["no-events"])),_e(t.getActiveLayer(),l),a.dragGroup=l}u.forEach((function(e){i.addDragger(e,a.dragGroup)})),E(p=p?s([p,o(c)]):o(c),(function(e){t.addMarker(e,xv)})),a.allDraggedElements=p,a.differentParents=1!==k(D(c,(function(e){return e.parent&&e.parent.id})))})),e.on("shape.move.move",499,(function(e){var t=e.context,n=t.dragGroup,i=t.target,r=t.shape.parent,o=t.canExecute;i&&("attach"===o?a(i,Sv):t.canExecute&&i&&i.id!==r.id?a(i,Ev):a(i,t.canExecute?_v:wv)),Xn(n,e.dx,e.dy)})),e.on(["shape.move.out","shape.move.cleanup"],(function(e){var t=e.context.target;t&&a(t,null)})),e.on("shape.move.cleanup",(function(e){var n=e.context,i=n.allDraggedElements,r=n.dragGroup;E(i,(function(e){t.removeMarker(e,xv)})),r&&Me(r)})),this.makeDraggable=function(e,n,r){i.addDragger(n,e.dragGroup),r&&t.addMarker(n,xv),e.allDraggedElements?e.allDraggedElements.push(n):e.allDraggedElements=[n]}}Cv.$inject=["eventBus","canvas","styles","previewSupport"];var Pv={__depends__:[Lo,qo,zo,Ss,bs,Ic],__init__:["move","movePreview"],move:["type",bv],movePreview:["type",Cv]},Tv=".djs-palette-toggle",Rv=".entry",Av="open";function kv(e,t){this._eventBus=e,this._canvas=t;var n=this;e.on("tool-manager.update",(function(e){var t=e.tool;n.updateToolHighlight(t)})),e.on("i18n.changed",(function(){n._update()})),e.on("diagram.init",(function(){n._diagramInitialized=!0,n._rebuild()}))}function Mv(e,t){var n=t.getPaletteEntries();return v(n)?n(e):(E(n,(function(t,n){e[n]=t})),e)}kv.$inject=["eventBus","canvas"],kv.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("palette.getProviders",e,(function(e){e.providers.push(t)})),this._rebuild()},kv.prototype.getEntries=function(){return this._getProviders().reduce(Mv,{})},kv.prototype._rebuild=function(){this._diagramInitialized&&(this._getProviders().length&&(this._container||this._init(),this._update()))},kv.prototype._init=function(){var e=this,t=this._eventBus,n=this._getParentContainer(),i=this._container=he(kv.HTML_MARKUP);n.appendChild(i),de.bind(i,".djs-palette-toggle, .entry","click",(function(t){var n=t.delegateTarget;if(re(n,Tv))return e.toggle();e.trigger("click",t)})),pe.bind(i,"mousedown",(function(e){e.stopPropagation()})),de.bind(i,Rv,"dragstart",(function(t){e.trigger("dragstart",t)})),t.on("canvas.resized",this._layoutChanged,this),t.fire("palette.create",{container:i})},kv.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"palette.getProviders",providers:[]});return this._eventBus.fire(t),t.providers},kv.prototype._toggleState=function(e){e=e||{};var t,n=this._getParentContainer(),i=this._container,r=this._eventBus,o=J(i);t="twoColumn"in e?e.twoColumn:this._needsCollapse(n.clientHeight,this._entries||{}),o.toggle("two-column",t),"open"in e&&o.toggle(Av,e.open),r.fire("palette.changed",{twoColumn:t,open:this.isOpen()})},kv.prototype._update=function(){var e=ve(".djs-palette-entries",this._container),t=this._entries=this.getEntries();te(e),E(t,(function(t,n){var i=t.group||"default",r=ve("[data-group="+i+"]",e);r||(r=he('<div class="group" data-group="'+i+'"></div>'),e.appendChild(r));var o=t.html||(t.separator?'<hr class="separator" />':'<div class="entry" draggable="true"></div>'),a=he(o);r.appendChild(a),t.separator||(Y(a,"data-action",n),t.title&&Y(a,"title",t.title),t.className&&function(e,t){var n=J(e);(h(t)?t:t.split(/\s+/g)).forEach((function(e){n.add(e)}))}(a,t.className),t.imageUrl&&a.appendChild(he('<img src="'+t.imageUrl+'">')))})),this.open()},kv.prototype.trigger=function(e,t,n){var i,r,o,a=this._entries,s=t.delegateTarget||t.target;if(!s)return t.preventDefault();(i=a[Y(s,"data-action")])&&(r=i.action,o=t.originalEvent||t,v(r)?"click"===e&&r(o,n):r[e]&&r[e](o,n),t.preventDefault())},kv.prototype._layoutChanged=function(){this._toggleState({})},kv.prototype._needsCollapse=function(e,t){return e<46*Object.keys(t).length+50},kv.prototype.close=function(){this._toggleState({open:!1,twoColumn:!1})},kv.prototype.open=function(){this._toggleState({open:!0})},kv.prototype.toggle=function(e){this.isOpen()?this.close():this.open()},kv.prototype.isActiveTool=function(e){return e&&this._activeTool===e},kv.prototype.updateToolHighlight=function(e){var t;this._toolsContainer||(t=ve(".djs-palette-entries",this._container),this._toolsContainer=ve("[data-group=tools]",t)),E(this._toolsContainer.children,(function(t){var n=t.getAttribute("data-action");if(n){var i=J(t);n=n.replace("-tool",""),i.contains("entry")&&n===e?i.add("highlighted-entry"):i.remove("highlighted-entry")}}))},kv.prototype.isOpen=function(){return J(this._container).has(Av)},kv.prototype._getParentContainer=function(){return this._canvas.getContainer()},kv.HTML_MARKUP='<div class="djs-palette"><div class="djs-palette-entries"></div><div class="djs-palette-toggle"></div></div>';var Dv={__init__:["palette"],palette:["type",kv]},Bv="crosshair";function jv(e,t,n,i,r,o,a){this._selection=r,this._dragging=n,this._mouse=a;var s=this,c=function(e){var n,i=t.getActiveLayer();Se(n=e.frame=Le("rect"),{class:"djs-lasso-overlay",width:1,height:1,x:0,y:0}),_e(i,n)},p=function(e){var t=e.frame,n=e.bbox;Se(t,{x:n.x,y:n.y,width:n.width,height:n.height})},u=function(e){e.frame&&Me(e.frame)};o.registerTool("lasso",{tool:"lasso.selection",dragging:"lasso"}),e.on("lasso.selection.end",(function(t){var n=t.originalEvent.target;(t.hover||n instanceof SVGElement)&&e.once("lasso.selection.ended",(function(){s.activateLasso(t.originalEvent,!0)}))})),e.on("lasso.end",(function(e){var t=Ov(e),n=i.filter((function(e){return e}));s.select(n,t)})),e.on("lasso.start",(function(e){var t=e.context;t.bbox=Ov(e),c(t)})),e.on("lasso.move",(function(e){var t=e.context;t.bbox=Ov(e),p(t)})),e.on("lasso.cleanup",(function(e){var t=e.context;u(t)})),e.on("element.mousedown",1500,(function(e){if(Bo(e))return s.activateLasso(e.originalEvent),!0}))}function Ov(e){var t={x:e.x-e.dx,y:e.y-e.dy},n={x:e.x,y:e.y};return t.x<=n.x&&t.y<n.y||t.x<n.x&&t.y<=n.y?{x:t.x,y:t.y,width:n.x-t.x,height:n.y-t.y}:t.x>=n.x&&t.y<n.y||t.x>n.x&&t.y<=n.y?{x:n.x,y:t.y,width:t.x-n.x,height:n.y-t.y}:t.x<=n.x&&t.y>n.y||t.x<n.x&&t.y>=n.y?{x:t.x,y:n.y,width:n.x-t.x,height:t.y-n.y}:t.x>=n.x&&t.y>n.y||t.x>n.x&&t.y>=n.y?{x:n.x,y:n.y,width:t.x-n.x,height:t.y-n.y}:{x:n.x,y:n.y,width:0,height:0}}jv.$inject=["eventBus","canvas","dragging","elementRegistry","selection","toolManager","mouse"],jv.prototype.activateLasso=function(e,t){this._dragging.init(e,"lasso",{autoActivate:t,cursor:Bv,data:{context:{}}})},jv.prototype.activateSelection=function(e,t){this._dragging.init(e,"lasso.selection",{trapClick:!1,autoActivate:t,cursor:Bv,data:{context:{}}})},jv.prototype.select=function(e,t){var n=function(e,t){var n={};return E(e,(function(e){var i=e;i.waypoints&&(i=mt(i)),!m(t.y)&&i.x>t.x&&(n[e.id]=e),!m(t.x)&&i.y>t.y&&(n[e.id]=e),i.x>t.x&&i.y>t.y&&(m(t.width)&&m(t.height)&&i.width+i.x<t.width+t.x&&i.height+i.y<t.height+t.y?n[e.id]=e:m(t.width)&&m(t.height)||(n[e.id]=e))})),n}(e,t);this._selection.select(M(n))},jv.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateSelection(e,!!e)},jv.prototype.isActive=function(){var e=this._dragging.context();return e&&/^lasso/.test(e.prefix)};var Nv={__depends__:[af,ip],__init__:["lassoTool"],lassoTool:["type",jv]},Lv=1500,Iv="grab";function zv(e,t,n,i,r,o){this._dragging=n,this._mouse=o;var a=this,s=i.get("keyboard",!1);r.registerTool("hand",{tool:"hand",dragging:"hand.move"}),e.on("element.mousedown",Lv,(function(e){if(Do(e))return a.activateMove(e.originalEvent,!0),!1})),s&&s.addListener(Lv,(function(e){if(Fv(e.keyEvent)&&!a.isActive()){var t=a._mouse.getLastMoveEvent();a.activateMove(t,!!t)}}),"keyboard.keydown"),s&&s.addListener(Lv,(function(e){Fv(e.keyEvent)&&a.isActive()&&a.toggle()}),"keyboard.keyup"),e.on("hand.end",(function(t){var n=t.originalEvent.target;if(!(t.hover||n instanceof SVGElement))return!1;e.once("hand.ended",(function(){a.activateMove(t.originalEvent,{reactivate:!0})}))})),e.on("hand.move.move",(function(e){var n=t.viewbox().scale;t.scroll({dx:e.dx*n,dy:e.dy*n})})),e.on("hand.move.end",(function(t){var n=t.context.reactivate;return!Do(t)&&n&&e.once("hand.move.ended",(function(e){a.activateHand(e.originalEvent,!0,!0)})),!1}))}function Fv(e){return na(" ",e)}zv.$inject=["eventBus","canvas","dragging","injector","toolManager","mouse"],zv.prototype.activateMove=function(e,t,n){"object"==typeof t&&(n=t,t=!1),this._dragging.init(e,"hand.move",{autoActivate:t,cursor:Iv,data:{context:n||{}}})},zv.prototype.activateHand=function(e,t,n){this._dragging.init(e,"hand",{trapClick:!1,autoActivate:t,cursor:Iv,data:{context:{reactivate:n}}})},zv.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateHand(e,!!e)},zv.prototype.isActive=function(){var e=this._dragging.context();return!!e&&/^(hand|hand\.move)$/.test(e.prefix)};var $v={__depends__:[af,ip],__init__:["handTool"],handTool:["type",zv]},Vv="connect-ok",Hv="connect-not-ok";function Gv(e,t,n,i,r,o,a){var s=this;this._dragging=t,this._rules=o,this._mouse=a,r.registerTool("global-connect",{tool:"global-connect",dragging:"global-connect.drag"}),e.on("global-connect.hover",(function(e){var t=e.context,n=e.hover,r=t.canStartConnect=s.canStartConnect(n);null!==r&&(t.startTarget=n,i.addMarker(n,r?Vv:Hv))})),e.on(["global-connect.out","global-connect.cleanup"],(function(e){var t=e.context.startTarget,n=e.context.canStartConnect;t&&i.removeMarker(t,n?Vv:Hv)})),e.on(["global-connect.ended"],(function(t){var i=t.context.startTarget,r={x:t.x,y:t.y};if(s.canStartConnect(i))return e.once("element.out",(function(){e.once(["connect.ended","connect.canceled"],(function(){e.fire("global-connect.drag.ended")})),n.start(null,i,r)})),!1}))}Gv.$inject=["eventBus","dragging","connect","canvas","toolManager","rules","mouse"],Gv.prototype.start=function(e,t){this._dragging.init(e,"global-connect",{autoActivate:t,trapClick:!1,data:{context:{}}})},Gv.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();return this.start(e,!!e)},Gv.prototype.isActive=function(){var e=this._dragging.context();return e&&/^global-connect/.test(e.prefix)},Gv.prototype.canStartConnect=function(e){return this._rules.allowed("connection.start",{source:e})};var Wv={__depends__:[wc,Ss,bs,af,ip],globalConnect:["type",Gv]};function qv(e,t,n,i,r,o,a,s){this._palette=e,this._create=t,this._elementFactory=n,this._spaceTool=i,this._lassoTool=r,this._handTool=o,this._globalConnect=a,this._translate=s,e.registerProvider(this)}qv.$inject=["palette","create","elementFactory","spaceTool","lassoTool","handTool","globalConnect","translate"],qv.prototype.getPaletteEntries=function(e){var t={},n=this._create,i=this._elementFactory,r=this._spaceTool,o=this._lassoTool,a=this._handTool,s=this._globalConnect,c=this._translate;function p(e,t,r,o,a){function s(t){var r=i.createShape(G({type:e},a));a&&(r.businessObject.di.isExpanded=a.isExpanded),n.start(t,r)}var p=e.replace(/^bpmn:/,"");return{group:t,className:r,title:o||c("Create {type}",{type:p}),action:{dragstart:s,click:s}}}function u(e){var t=i.createShape({type:"bpmn:SubProcess",x:0,y:0,isExpanded:!0}),r=i.createShape({type:"bpmn:StartEvent",x:40,y:82,parent:t});n.start(e,[t,r],{hints:{autoSelect:[r]}})}function l(e){n.start(e,i.createParticipantShape())}return G(t,{"hand-tool":{group:"tools",className:"bpmn-icon-hand-tool",title:c("Activate the hand tool"),action:{click:function(e){a.activateHand(e)}}},"lasso-tool":{group:"tools",className:"bpmn-icon-lasso-tool",title:c("Activate the lasso tool"),action:{click:function(e){o.activateSelection(e)}}},"space-tool":{group:"tools",className:"bpmn-icon-space-tool",title:c("Activate the create/remove space tool"),action:{click:function(e){r.activateSelection(e)}}},"global-connect-tool":{group:"tools",className:"bpmn-icon-connection-multi",title:c("Activate the global connect tool"),action:{click:function(e){s.start(e)}}},"tool-separator":{group:"tools",separator:!0},"create.start-event":p("bpmn:StartEvent","event","bpmn-icon-start-event-none",c("Create StartEvent")),"create.intermediate-event":p("bpmn:IntermediateThrowEvent","event","bpmn-icon-intermediate-event-none",c("Create Intermediate/Boundary Event")),"create.end-event":p("bpmn:EndEvent","event","bpmn-icon-end-event-none",c("Create EndEvent")),"create.exclusive-gateway":p("bpmn:ExclusiveGateway","gateway","bpmn-icon-gateway-none",c("Create Gateway")),"create.task":p("bpmn:Task","activity","bpmn-icon-task",c("Create Task")),"create.data-object":p("bpmn:DataObjectReference","data-object","bpmn-icon-data-object",c("Create DataObjectReference")),"create.data-store":p("bpmn:DataStoreReference","data-store","bpmn-icon-data-store",c("Create DataStoreReference")),"create.subprocess-expanded":{group:"activity",className:"bpmn-icon-subprocess-expanded",title:c("Create expanded SubProcess"),action:{dragstart:u,click:u}},"create.participant-expanded":{group:"collaboration",className:"bpmn-icon-participant",title:c("Create Pool/Participant"),action:{dragstart:l,click:l}},"create.group":p("bpmn:Group","artifact","bpmn-icon-group",c("Create Group"))}),t};var Uv={__depends__:[Dv,Kc,Sf,Nv,$v,Wv,ho],__init__:["paletteProvider"],paletteProvider:["type",qv]};function Yv(e,t,n,i,r){as.call(this,e),e.on("shape.move.move",250,(function(e){var o=e.context,a=o.canExecute;o.visualReplacements||(o.visualReplacements={}),a&&a.replacements?function(e){E(e.canExecute.replacements,(function(o){var a=o.oldElementId,s={type:o.newElementType};if(!e.visualReplacements[a]){var c=t.get(a);G(s,{x:c.x,y:c.y});var p=n.createShape(s);i.addShape(p,c.parent);var u=ve('[data-element-id="'+Os(c.id)+'"]',e.dragGroup);u&&Se(u,{display:"none"});var l=r.addDragger(p,e.dragGroup);e.visualReplacements[a]=l,i.removeShape(p)}}))}(o):function(e){var t=e.visualReplacements;E(t,(function(n,i){var r=ve('[data-element-id="'+Os(i)+'"]',e.dragGroup);r&&Se(r,{display:"inline"}),n.remove(),t[i]&&delete t[i]}))}(o)}))}Yv.$inject=["eventBus","elementRegistry","elementFactory","canvas","previewSupport"],i(Yv,as);var Kv={__depends__:[Ic],__init__:["bpmnReplacePreview"],bpmnReplacePreview:["type",Yv]},Xv=40,Zv=["x","y"],Qv=Math.abs;function Jv(e){e.on(["connect.hover","connect.move","connect.end"],1250,(function(e){var t=e.context,n=t.canExecute,i=t.start,r=t.hover,o=t.source,a=t.target;e.originalEvent&&ta(e.originalEvent)||(t.initialConnectionStart||(t.initialConnectionStart=t.connectionStart),n&&r&&function(e,t,n){Zv.forEach((function(i){var r=ng(i,t);e[i]<t[i]+n?lc(e,i,t[i]+n):e[i]>t[i]+r-n&&lc(e,i,t[i]+r-n)}))}(e,r,function(e){return jr(e,"bpmn:Task")?10:20}(r)),r&&function(e,t){return T(t,(function(t){return tg(e,t)}))}(n,["bpmn:Association","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:SequenceFlow"])?(t.connectionStart=pc(i),Ja(r,["bpmn:Event","bpmn:Gateway"])&&eg(e,pc(r)),Ja(r,["bpmn:Task","bpmn:SubProcess"])&&function(e,t){var n=pc(t);Zv.forEach((function(i){(function(e,t,n){return e[n]>t[n]+20&&e[n]<t[n]+ng(n,t)-20})(e,t,i)&&lc(e,i,n[i])}))}(e,r),jr(o,"bpmn:BoundaryEvent")&&a===o.host&&function(e){var t=e.context,n=t.source,i=t.target;if(function(e){var t=e.hover,n=e.source;return t&&n&&t===n}(t))return;var r=pc(n),o=vn(r,i,-10),a=[];/top|bottom/.test(o)&&a.push("x");/left|right/.test(o)&&a.push("y");a.forEach((function(t){var n,i=e[t];Qv(i-r[t])<Xv&&(n=i>r[t]?r[t]+Xv:r[t]-Xv,lc(e,t,n))}))}(e)):tg(n,"bpmn:MessageFlow")?(jr(i,"bpmn:Event")&&(t.connectionStart=pc(i)),jr(r,"bpmn:Event")&&eg(e,pc(r))):t.connectionStart=t.initialConnectionStart)}))}function eg(e,t){lc(e,"x",t.x),lc(e,"y",t.y)}function tg(e,t){return e&&e.type===t}function ng(e,t){return"x"===e?t.width:t.height}function ig(){this._targets={},this._snapOrigins={},this._snapLocations=[],this._defaultSnaps={}}function rg(e){this._snapValues={}}Jv.$inject=["eventBus"],ig.prototype.getSnapOrigin=function(e){return this._snapOrigins[e]},ig.prototype.setSnapOrigin=function(e,t){this._snapOrigins[e]=t,-1===this._snapLocations.indexOf(e)&&this._snapLocations.push(e)},ig.prototype.addDefaultSnap=function(e,t){var n=this._defaultSnaps[e];n||(n=this._defaultSnaps[e]=[]),n.push(t)},ig.prototype.getSnapLocations=function(){return this._snapLocations},ig.prototype.setSnapLocations=function(e){this._snapLocations=e},ig.prototype.pointsForTarget=function(e){var t=e.id||e,n=this._targets[t];return n||(n=this._targets[t]=new rg).initDefaults(this._defaultSnaps),n},rg.prototype.add=function(e,t){var n=this._snapValues[e];n||(n=this._snapValues[e]={x:[],y:[]}),-1===n.x.indexOf(t.x)&&n.x.push(t.x),-1===n.y.indexOf(t.y)&&n.y.push(t.y)},rg.prototype.snap=function(e,t,n,i){var r=this._snapValues[t];return r&&function(e,t,n){var i,r;for(n=void 0===n?10:n,i=0;i<t.length;i++)if(r=t[i],oc(r-e)<=n)return r}(e[n],r[n],i)},rg.prototype.initDefaults=function(e){var t=this;E(e||{},(function(e,n){E(e,(function(e){t.add(n,e)}))}))};function og(e,t,n){var i=this;this._elementRegistry=e,t.on(["create.start","shape.move.start"],(function(e){i.initSnap(e)})),t.on(["create.move","create.end","shape.move.move","shape.move.end"],1250,(function(e){var t=e.context,r=t.shape,o=t.snapContext,a=t.target;if((!e.originalEvent||!ta(e.originalEvent))&&!uc(e)&&a){var s=o.pointsForTarget(a);s.initialized||((s=i.addSnapTargetPoints(s,r,a)).initialized=!0),n.snap(e,s)}})),t.on(["create.cleanup","shape.move.cleanup"],(function(){n.hide()}))}function ag(e){return!!e.labelTarget}og.$inject=["elementRegistry","eventBus","snapping"],og.prototype.initSnap=function(e){var t,n=this._elementRegistry,i=e.context,r=i.shape,o=i.snapContext;o||(o=i.snapContext=new ig);var a=(t=n.get(r.id)?pc(r,e):{x:e.x+pc(r).x,y:e.y+pc(r).y}).x-r.width/2,s=t.y-r.height/2,c=t.x+r.width/2,p=t.y+r.height/2;return o.setSnapOrigin("mid",{x:t.x-e.x,y:t.y-e.y}),ag(r)||(o.setSnapOrigin("top-left",{x:a-e.x,y:s-e.y}),o.setSnapOrigin("bottom-right",{x:c-e.x,y:p-e.y})),o},og.prototype.addSnapTargetPoints=function(e,t,n){return E(this.getSnapTargets(t,n),(function(n){if(ag(n))ag(t)&&e.add("mid",pc(n));else if(n.waypoints){if(n.waypoints.length<3)return;E(n.waypoints.slice(1,-1),(function(t){e.add("mid",t)}))}else{e.add("mid",pc(n))}})),m(t.x)&&m(t.y)?(this._elementRegistry.get(t.id)&&e.add("mid",pc(t)),e):e},og.prototype.getSnapTargets=function(e,t){return dc(t).filter((function(e){return!e.hidden}))};function sg(e,t){t.invoke(og,this),e.on(["create.move","create.end"],1500,cg),e.on(["create.move","create.end","shape.move.move","shape.move.end"],1500,(function(e){var t=e.context,n=t.canExecute,i=t.target;n&&("attach"===n||n.attach)&&!uc(e)&&function(e,t){var n,i=hn(t),r=ih(e,t),o=e.context.shape;n=o.parent?{x:0,y:0}:mn(o);/top/.test(r)?lc(e,"y",i.top-n.y):/bottom/.test(r)&&lc(e,"y",i.bottom-n.y);/left/.test(r)?lc(e,"x",i.left-n.x):/right/.test(r)&&lc(e,"x",i.right-n.x)}(e,i)}))}function cg(e){var t=e.context.createConstraints;if(t){var n=t.top,i=t.right,r=t.bottom,o=t.left;(o&&o>=e.x||i&&i<=e.x)&&lc(e,"x",e.x),(n&&n>=e.y||r&&r<=e.y)&&lc(e,"y",e.y)}}function pg(e,t){return-1!==e.indexOf(t)}function ug(e,t,n){return t?{x:e.x-n.x,y:e.y-n.y}:{x:e.x,y:e.y}}i(sg,og),sg.$inject=["eventBus","injector"],sg.prototype.initSnap=function(e){var t=og.prototype.initSnap.call(this,e),n=e.shape,i=!!this._elementRegistry.get(n.id);return E(n.outgoing,(function(n){var r=n.waypoints[0];r=r.original||r,t.setSnapOrigin(n.id+"-docking",ug(r,i,e))})),E(n.incoming,(function(n){var r=n.waypoints[n.waypoints.length-1];r=r.original||r,t.setSnapOrigin(n.id+"-docking",ug(r,i,e))})),jr(n,"bpmn:Participant")&&t.setSnapLocations(["top-left","bottom-right","mid"]),t},sg.prototype.addSnapTargetPoints=function(e,t,n){og.prototype.addSnapTargetPoints.call(this,e,t,n);var i=this.getSnapTargets(t,n);E(i,(function(n){var i;(function(e){if(jr(e,"bpmn:SubProcess")&&Lr(e))return!0;return jr(e,"bpmn:Participant")}(n)||(i="bpmn:TextAnnotation",[t,n].every((function(e){return jr(e,i)}))))&&(e.add("top-left",sc(n)),e.add("bottom-right",cc(n)))}));var r=this._elementRegistry;return E(t.incoming,(function(n){if(r.get(t.id)){pg(i,n.source)||e.add("mid",mn(n.source));var o=n.waypoints[0];e.add(n.id+"-docking",o.original||o)}})),E(t.outgoing,(function(n){if(r.get(t.id)){pg(i,n.target)||e.add("mid",mn(n.target));var o=n.waypoints[n.waypoints.length-1];e.add(n.id+"-docking",o.original||o)}})),jr(n,"bpmn:SequenceFlow")&&(e=this.addSnapTargetPoints(e,t,n.parent)),e},sg.prototype.getSnapTargets=function(e,t){return og.prototype.getSnapTargets.call(this,e,t).filter((function(e){return!jr(e,"bpmn:Lane")}))};function lg(e,t){var n=this;e.on(["resize.start"],(function(e){n.initSnap(e)})),e.on(["resize.move","resize.end"],1250,(function(e){var i=e.context,r=i.shape,o=r.parent,a=i.direction,s=i.snapContext;if(!(e.originalEvent&&ta(e.originalEvent)||uc(e))){var c=s.pointsForTarget(o);c.initialized||((c=n.addSnapTargetPoints(c,r,o,a)).initialized=!0),function(e){return"n"===e||"s"===e}(a)&&lc(e,"x",e.x),function(e){return"e"===e||"w"===e}(a)&&lc(e,"y",e.y),t.snap(e,c)}})),e.on(["resize.cleanup"],(function(){t.hide()}))}function dg(e,t){var n=mn(e),i=hn(e),r={x:n.x,y:n.y};return-1!==t.indexOf("n")?r.y=i.top:-1!==t.indexOf("s")&&(r.y=i.bottom),-1!==t.indexOf("e")?r.x=i.right:-1!==t.indexOf("w")&&(r.x=i.left),r}lg.prototype.initSnap=function(e){var t=e.context,n=t.shape,i=t.direction,r=t.snapContext;r||(r=t.snapContext=new ig);var o=dg(n,i);return r.setSnapOrigin("corner",{x:o.x-e.x,y:o.y-e.y}),r},lg.prototype.addSnapTargetPoints=function(e,t,n,i){return E(this.getSnapTargets(t,n),(function(t){e.add("corner",cc(t)),e.add("corner",sc(t))})),e.add("corner",dg(t,i)),e},lg.$inject=["eventBus","snapping"],lg.prototype.getSnapTargets=function(e,t){return dc(t).filter((function(t){return!(n=t,i=e,n.host===i||function(e){return!!e.waypoints}(t)||function(e){return!!e.hidden}(t)||function(e){return!!e.labelTarget}(t));var n,i}))};function hg(e){this._canvas=e,this._asyncHide=$(V(this.hide,this),1e3)}hg.$inject=["canvas"],hg.prototype.snap=function(e,t){var n=e.context.snapContext,i=n.getSnapLocations(),r={x:uc(e,"x"),y:uc(e,"y")};E(i,(function(i){var o=n.getSnapOrigin(i),a={x:e.x+o.x,y:e.y+o.y};if(E(["x","y"],(function(e){var n;r[e]||void 0!==(n=t.snap(a,i,e,7))&&(r[e]={value:n,originValue:n-o[e]})})),r.x&&r.y)return!1})),this.showSnapLine("vertical",r.x&&r.x.value),this.showSnapLine("horizontal",r.y&&r.y.value),E(["x","y"],(function(t){var n=r[t];f(n)&&lc(e,t,n.originValue)}))},hg.prototype._createLine=function(e){var t=this._canvas.getLayer("snap"),n=Le("path");return Se(n,{d:"M0,0 L0,0"}),Ae(n).add("djs-snap-line"),_e(t,n),{update:function(t){m(t)?Se(n,"horizontal"===e?{d:"M-100000,"+t+" L+100000,"+t,display:""}:{d:"M "+t+",-100000 L "+t+", +100000",display:""}):Se(n,{display:"none"})}}},hg.prototype._createSnapLines=function(){this._snapLines={horizontal:this._createLine("horizontal"),vertical:this._createLine("vertical")}},hg.prototype.showSnapLine=function(e,t){var n=this.getSnapLine(e);n&&n.update(t),this._asyncHide()},hg.prototype.getSnapLine=function(e){return this._snapLines||this._createSnapLines(),this._snapLines[e]},hg.prototype.hide=function(){E(this._snapLines,(function(e){e.update()}))};var fg={__depends__:[{__init__:["createMoveSnapping","resizeSnapping","snapping"],createMoveSnapping:["type",og],resizeSnapping:["type",lg],snapping:["type",hg]}],__init__:["connectSnapping","createMoveSnapping"],connectSnapping:["type",Jv],createMoveSnapping:["type",sg]};function mg(e,t,n,i){this._open=!1,this._results=[],this._eventMaps=[],this._canvas=e,this._eventBus=t,this._overlays=n,this._selection=i,this._container=he(mg.BOX_HTML),this._searchInput=ve(mg.INPUT_SELECTOR,this._container),this._resultsContainer=ve(mg.RESULTS_CONTAINER_SELECTOR,this._container),this._canvas.getContainer().appendChild(this._container),t.on(["canvas.destroy","diagram.destroy"],this.close,this)}function vg(e,t,n){var i=function(e){var t="";return e.forEach((function(e){e.matched?t+='<strong class="'+mg.RESULT_HIGHLIGHT_CLASS+'">'+Ls(e.matched)+"</strong>":t+=Ls(e.normal)})),""!==t?t:null}(t),r=he(n);r.innerHTML=i,e.appendChild(r)}mg.$inject=["canvas","eventBus","overlays","selection"],mg.prototype._bindEvents=function(){var e=this;function t(t,n,i,r){e._eventMaps.push({el:t,type:i,listener:de.bind(t,n,i,r)})}t(document,"html","click",(function(t){e.close()})),t(this._container,mg.INPUT_SELECTOR,"click",(function(e){e.stopPropagation(),e.delegateTarget.focus()})),t(this._container,mg.RESULT_SELECTOR,"mouseover",(function(t){t.stopPropagation(),e._scrollToNode(t.delegateTarget),e._preselect(t.delegateTarget)})),t(this._container,mg.RESULT_SELECTOR,"click",(function(t){t.stopPropagation(),e._select(t.delegateTarget)})),t(this._container,mg.INPUT_SELECTOR,"keydown",(function(e){38===e.keyCode&&e.preventDefault(),40===e.keyCode&&e.preventDefault()})),t(this._container,mg.INPUT_SELECTOR,"keyup",(function(t){if(27===t.keyCode)return e.close();if(13===t.keyCode){var n=e._getCurrentResult();return n?e._select(n):e.close()}return 38===t.keyCode?e._scrollToDirection(!0):40===t.keyCode?e._scrollToDirection():void(37!==t.keyCode&&39!==t.keyCode&&e._search(t.delegateTarget.value))}))},mg.prototype._unbindEvents=function(){this._eventMaps.forEach((function(e){de.unbind(e.el,e.type,e.listener)}))},mg.prototype._search=function(e){var t=this;if(this._clearResults(),e&&""!==e){var n=this._searchProvider.find(e);if(n.length){n.forEach((function(e){var n=e.element.id,i=t._createResultNode(e,n);t._results[n]={element:e.element,node:i}}));var i=ve(mg.RESULT_SELECTOR,this._resultsContainer);this._scrollToNode(i),this._preselect(i)}}},mg.prototype._scrollToDirection=function(e){var t=this._getCurrentResult();if(t){var n=e?t.previousElementSibling:t.nextElementSibling;n&&(this._scrollToNode(n),this._preselect(n))}},mg.prototype._scrollToNode=function(e){if(e&&e!==this._getCurrentResult()){var t=e.offsetTop,n=this._resultsContainer.scrollTop,i=t-this._resultsContainer.clientHeight+e.clientHeight;t<n?this._resultsContainer.scrollTop=t:n<i&&(this._resultsContainer.scrollTop=i)}},mg.prototype._clearResults=function(){te(this._resultsContainer),this._results=[],this._resetOverlay(),this._eventBus.fire("searchPad.cleared")},mg.prototype._getCurrentResult=function(){return ve(mg.RESULT_SELECTED_SELECTOR,this._resultsContainer)},mg.prototype._createResultNode=function(e,t){var n=he(mg.RESULT_HTML);return e.primaryTokens.length>0&&vg(n,e.primaryTokens,mg.RESULT_PRIMARY_HTML),vg(n,e.secondaryTokens,mg.RESULT_SECONDARY_HTML),Y(n,mg.RESULT_ID_ATTRIBUTE,t),this._resultsContainer.appendChild(n),n},mg.prototype.registerProvider=function(e){this._searchProvider=e},mg.prototype.open=function(){if(!this._searchProvider)throw new Error("no search provider registered");this.isOpen()||(this._bindEvents(),this._open=!0,J(this._container).add("open"),this._searchInput.focus(),this._eventBus.fire("searchPad.opened"))},mg.prototype.close=function(){this.isOpen()&&(this._unbindEvents(),this._open=!1,J(this._container).remove("open"),this._clearResults(),this._searchInput.value="",this._searchInput.blur(),this._resetOverlay(),this._eventBus.fire("searchPad.closed"))},mg.prototype.toggle=function(){this.isOpen()?this.close():this.open()},mg.prototype.isOpen=function(){return this._open},mg.prototype._preselect=function(e){var t=this._getCurrentResult();if(e!==t){t&&J(t).remove(mg.RESULT_SELECTED_CLASS);var n=Y(e,mg.RESULT_ID_ATTRIBUTE),i=this._results[n].element;J(e).add(mg.RESULT_SELECTED_CLASS),this._resetOverlay(i),this._canvas.scrollToElement(i,{top:400}),this._selection.select(i),this._eventBus.fire("searchPad.preselected",i)}},mg.prototype._select=function(e){var t=Y(e,mg.RESULT_ID_ATTRIBUTE),n=this._results[t].element;this.close(),this._resetOverlay(),this._canvas.scrollToElement(n,{top:400}),this._selection.select(n),this._eventBus.fire("searchPad.selected",n)},mg.prototype._resetOverlay=function(e){if(this._overlayId&&this._overlays.remove(this._overlayId),e){var t=function(e){var t=6,n=e.width+2*t,i=e.height+2*t,r=["width: "+n+"px","height: "+i+"px"].join("; ");return{position:{bottom:i-t,right:n-t},show:!0,html:'<div style="'+r+'" class="'+mg.OVERLAY_CLASS+'"></div>'}}(mt(e));this._overlayId=this._overlays.add(e,t)}},mg.CONTAINER_SELECTOR=".djs-search-container",mg.INPUT_SELECTOR=".djs-search-input input",mg.RESULTS_CONTAINER_SELECTOR=".djs-search-results",mg.RESULT_SELECTOR=".djs-search-result",mg.RESULT_SELECTED_CLASS="djs-search-result-selected",mg.RESULT_SELECTED_SELECTOR="."+mg.RESULT_SELECTED_CLASS,mg.RESULT_ID_ATTRIBUTE="data-result-id",mg.RESULT_HIGHLIGHT_CLASS="djs-search-highlight",mg.OVERLAY_CLASS="djs-search-overlay",mg.BOX_HTML='<div class="djs-search-container djs-draggable djs-scrollable"><div class="djs-search-input"><input type="text"/></div><div class="djs-search-results"></div></div>',mg.RESULT_HTML='<div class="djs-search-result"></div>',mg.RESULT_PRIMARY_HTML='<div class="djs-search-result-primary"></div>',mg.RESULT_SECONDARY_HTML='<p class="djs-search-result-secondary"></p>';var gg={__depends__:[Jo,qo],searchPad:["type",mg]};function yg(e,t,n){this._elementRegistry=e,this._canvas=n,t.registerProvider(this)}function bg(e){return w(e,(function(e){return!!e.matched})).length>0}function xg(e,t){var n=[],i=e;if(!e)return n;e=e.toLowerCase(),t=t.toLowerCase();var r=e.indexOf(t);return r>-1?(0!==r&&n.push({normal:i.substr(0,r)}),n.push({matched:i.substr(r,t.length)}),t.length+r<e.length&&n.push({normal:i.substr(t.length+r,e.length)})):n.push({normal:i}),n}yg.$inject=["elementRegistry","searchPad","canvas"],yg.prototype.find=function(e){var t=this._canvas.getRootElement(),n=this._elementRegistry.filter((function(e){return!e.labelTarget}));return n=w(n,(function(e){return e!==t})),n=O(n=w(n=R(n,(function(t){return{primaryTokens:xg(qr(t),e),secondaryTokens:xg(t.id,e),element:t}})),(function(e){return bg(e.primaryTokens)||bg(e.secondaryTokens)})),(function(e){return qr(e.element)+e.element.id}))};var _g={__depends__:[gg],__init__:["bpmnSearch"],bpmnSearch:["type",yg]};function wg(e){Br.call(this,e)}i(wg,Br),wg.Viewer=ea,wg.NavigatedViewer=ka,wg.prototype.createDiagram=Er((function(){return this.importXML('<?xml version="1.0" encoding="UTF-8"?><bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" targetNamespace="http://bpmn.io/schema/bpmn" id="Definitions_1"><bpmn:process id="Process_1" isExecutable="false"><bpmn:startEvent id="StartEvent_1"/></bpmn:process><bpmndi:BPMNDiagram id="BPMNDiagram_1"><bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"><bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"><dc:Bounds height="36.0" width="36.0" x="173.0" y="102.0"/></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn:definitions>')})),wg.prototype._interactionModules=[ma,Ea,Ia,Aa],wg.prototype._modelingModules=[Ga,os,ws,ds,vc,wc,Sc,ou,vp,Kc,uu,vu,ku,Du,ju,Vu,pl,gv,Pv,Uv,Kv,tl,fg,_g],wg.prototype._modules=[].concat(ea.prototype._modules,wg.prototype._interactionModules,wg.prototype._modelingModules);var Eg={min:.2,max:4};function Sg(e,t,n,i,r){var o=this;function a(e){o._state._svgClientRect&&!Ag(o._state._svgClientRect)||(o._state._svgClientRect=o._svg.getBoundingClientRect()),Pg(Cg({x:e.clientX-o._state._svgClientRect.left,y:e.clientY-o._state._svgClientRect.top},o._svg,o._lastViewbox),o._canvas),o._update()}function s(e){return function(t){o._state._svgClientRect&&!Ag(o._state._svgClientRect)||(o._state._svgClientRect=o._svg.getBoundingClientRect()),e&&a(t);var n=Cg({x:t.clientX-o._state._svgClientRect.left,y:t.clientY-o._state._svgClientRect.top},o._svg,o._lastViewbox),r=i.viewbox(),s=function(e,t){var n={x:t.x+t.width/2,y:t.y+t.height/2};return{x:e.x-n.x,y:e.y-n.y}}(n,r),u=o._viewportDom.getBoundingClientRect(),l={x:t.clientX-u.left+1,y:t.clientY-u.top+1};G(o._state,{cachedViewbox:r,initialDragPosition:{x:t.clientX,y:t.clientY},isDragging:!0,offsetViewport:s,offsetViewportDom:l,viewportClientRect:o._viewport.getBoundingClientRect(),parentClientRect:o._parent.getBoundingClientRect()}),pe.bind(document,"mousemove",c),pe.bind(document,"mouseup",p)}}function c(e){if(o._state.isDragging){o._state._svgClientRect&&!Ag(o._state._svgClientRect)||(o._state._svgClientRect=o._svg.getBoundingClientRect());var t=o._state.offsetViewportDom,n=o._state.viewportClientRect,i=o._state.parentClientRect;G(o._viewportDom.style,{top:e.clientY-t.y-i.top+"px",left:e.clientX-t.x-i.left+"px"});var r=Mg(i,{top:e.clientY-t.y-i.top,left:e.clientX-t.x-i.left,width:n.width,height:n.height});G(o._overlay.style,{clipPath:r});var a=Cg({x:e.clientX-o._state._svgClientRect.left,y:e.clientY-o._state._svgClientRect.top},o._svg,o._lastViewbox);Pg({x:a.x-o._state.offsetViewport.x,y:a.y-o._state.offsetViewport.y},o._canvas)}}function p(e){o._state.isDragging&&(o._state.initialDragPosition.x===e.clientX&&o._state.initialDragPosition.y===e.clientY&&a(e),o._update(),G(o._state,{cachedViewbox:null,initialDragPosition:null,isDragging:!1,offsetViewport:null,offsetViewportDom:null}),pe.unbind(document,"mousemove",c),pe.unbind(document,"mouseup",p))}this._canvas=i,this._elementRegistry=r,this._eventBus=n,this._injector=t,this._state={isOpen:void 0,isDragging:!1,initialDragPosition:null,offsetViewport:null,cachedViewbox:null,dragger:null,svgClientRect:null,parentClientRect:null,zoomDelta:0},this._init(),this.toggle(e&&e.open||!1),pe.bind(this._svg,"click",(function(e){e.preventDefault(),e.stopPropagation(),a(e)})),pe.bind(this._viewportDom,"mousedown",s(!1)),pe.bind(this._svg,"mousedown",s(!0)),pe.bind(this._parent,"wheel",(function(e){if(e.preventDefault(),e.stopPropagation(),e.ctrlKey&&(o._state._svgClientRect&&!Ag(o._state._svgClientRect)||(o._state._svgClientRect=o._svg.getBoundingClientRect()),t=e,n=o._state._svgClientRect,t.x>n.left&&t.x<n.left+n.width&&t.y>n.top&&t.y<n.top+n.height)){var t,n,r=0===e.deltaMode?.02:.32,a=Math.sqrt(Math.pow(e.deltaY,2)+Math.pow(e.deltaX,2))*kg(e.deltaY)*-r;if(o._state.zoomDelta+=a,Math.abs(o._state.zoomDelta)>.1){var s=a>0?1:-1,c=Math.log(i.zoom())/Math.log(10),p=function(e,t){var n=Math.log(e.min)/Math.log(10),i=Math.log(e.max)/Math.log(10);return(Math.abs(n)+Math.abs(i))/t}(Eg,20),u=Math.round(c/p)*p;u+=p*s;var l=Math.pow(10,u);i.zoom(function(e,t){return Math.max(e.min,Math.min(e.max,t))}(Eg,l),d),o._state.zoomDelta=0;var d=Cg({x:e.clientX-o._state._svgClientRect.left,y:e.clientY-o._state._svgClientRect.top},o._svg,o._lastViewbox);Pg(d,o._canvas),o._update()}}})),pe.bind(this._toggle,"click",(function(e){e.preventDefault(),e.stopPropagation(),o.toggle()})),n.on(["shape.added","connection.added"],(function(e){var t=e.element;o._addElement(t),o._update()})),n.on(["shape.removed","connection.removed"],(function(e){var t=e.element;o._removeElement(t),o._update()})),n.on("elements.changed",250,(function(e){e.elements.forEach((function(e){o._updateElement(e)})),o._update()})),n.on("element.updateId",(function(e){var t=e.element,n=e.newId;o._updateElementId(t,n)})),n.on("canvas.viewbox.changed",(function(){o._state.isDragging||o._update()})),n.on("canvas.resized",(function(){document.body.contains(o._parent)&&(o._state.isDragging||o._update(),o._state._svgClientRect=o._svg.getBoundingClientRect())}))}function Cg(e,t,n){var i=t.getBoundingClientRect(),r=function(e,t){var n=e.width/e.height,i=G({},{x:e.x,y:e.y,width:e.width,height:e.height});if(n>t){var r=i.width*(1/t);G(i,{y:i.y-(r-i.height)/2,height:r})}else if(n<t){var o=i.height*t;G(i,{x:i.x-(o-i.width)/2,width:o})}return i}(n,i.width/i.height);return{x:Tg(e.x,0,i.width,r.x,r.x+r.width),y:Tg(e.y,0,i.height,r.y,r.y+r.height)}}function Pg(e,t){var n=t.viewbox(),i=n.width,r=n.height;t.viewbox({x:e.x-i/2,y:e.y-r/2,width:i,height:r})}function Tg(e,t,n,i,r){return(e-t)*(r-i)/(n-t)+i}function Rg(e,t,n){var i=[].slice.call(t.childNodes)[n];t.insertBefore(e,i.nextSibling)}function Ag(e){return 0===e.width&&0===e.height}Sg.$inject=["config.minimap","injector","eventBus","canvas","elementRegistry"],Sg.prototype._init=function(){var e=this._canvas.getContainer(),t=this._parent=document.createElement("div");J(t).add("djs-minimap"),e.appendChild(t);var n=this._toggle=document.createElement("div");J(n).add("toggle"),t.appendChild(n);var i=this._map=document.createElement("div");J(i).add("map"),t.appendChild(i);var r=this._svg=Le("svg");Se(r,{width:"100%",height:"100%"}),_e(i,r),_e(r,this._elementsGroup=Le("g"));var o=this._viewportGroup=Le("g");_e(r,o);var a=this._viewport=Le("rect");Ae(a).add("viewport"),_e(o,a),pe.bind(t,"mousedown",(function(e){e.stopPropagation()}));var s=this._viewportDom=document.createElement("div");J(s).add("viewport-dom"),this._parent.appendChild(s);var c=this._overlay=document.createElement("div");J(c).add("overlay"),this._parent.appendChild(c)},Sg.prototype._update=function(){var e=this._canvas.viewbox(),t=e.inner,n=e.outer;if(Bg(e)){var i,r,o,a,s=n.width-t.width,c=n.height-t.height;t.width<n.width?(i=t.x-s/2,o=n.width,t.x+t.width<n.width&&(i=Math.min(0,t.x))):(i=t.x,o=t.width),t.height<n.height?(r=t.y-c/2,a=n.height,t.y+t.height<n.height&&(r=Math.min(0,t.y))):(r=t.y,a=t.height),i-=50,r-=50,o+=100,a+=100,this._lastViewbox={x:i,y:r,width:o,height:a},Se(this._svg,{viewBox:i+", "+r+", "+o+", "+a}),Se(this._viewport,{x:e.x,y:e.y,width:e.width,height:e.height});var p=this._state._parentClientRect=this._parent.getBoundingClientRect(),u=this._viewport.getBoundingClientRect(),l={top:u.top-p.top,left:u.left-p.left,width:u.width,height:u.height};G(this._viewportDom.style,{top:l.top+"px",left:l.left+"px",width:l.width+"px",height:l.height+"px"});var d=Mg(p,l);G(this._overlay.style,{clipPath:d})}},Sg.prototype.open=function(){G(this._state,{isOpen:!0}),J(this._parent).add("open");var e=this._injector.get("translate",!1)||function(e){return e};Y(this._toggle,"title",e("Close minimap")),this._update(),this._eventBus.fire("minimap.toggle",{open:!0})},Sg.prototype.close=function(){G(this._state,{isOpen:!1}),J(this._parent).remove("open");var e=this._injector.get("translate",!1)||function(e){return e};Y(this._toggle,"title",e("Open minimap")),this._eventBus.fire("minimap.toggle",{open:!1})},Sg.prototype.toggle=function(e){var t=this.isOpen();void 0===e&&(e=!t),e!=t&&(e?this.open():this.close())},Sg.prototype.isOpen=function(){return this._state.isOpen},Sg.prototype._updateElement=function(e){try{void 0!==e.parent&&null!==e.parent&&(this._removeElement(e),this._addElement(e))}catch(e){console.warn("Minimap#_updateElement errored",e)}},Sg.prototype._updateElementId=function(e,t){try{var n=ve("#"+Os(e.id),this._elementsGroup);n&&(n.id=t)}catch(e){console.warn("Minimap#_updateElementId errored",e)}},Sg.prototype._addElement=function(e){var t,n,i,r=this;this._removeElement(e);var o=this._createElement(e),a=ve("#"+Os(e.parent.id),this._elementsGroup);if(o){var s=function(e,t){var n=ve(".djs-children",t.parentNode);if(!n)return;var i=[].slice.call(n.childNodes),r=-1;return i.forEach((function(t,n){ve(".djs-element",t)===e&&(r=n)})),r}(this._elementRegistry.getGraphics(e),this._elementRegistry.getGraphics(e.parent));return"undefined"!==s&&a?a.childNodes.length>s?Rg(o,a,s):Rg(o,a,a.childNodes.length-1):this._elementsGroup.appendChild(o),!function(e){return e.waypoints}(e)?(n=e.x,i=e.y,a&&(n-=(t=e.parent).x,i-=t.y),Se(o,{transform:"translate("+n+" "+i+")"})):(n=0,i=0,void 0!==(t=e.parent).x&&void 0!==t.y&&(n=-t.x,i=-t.y),Se(o,{transform:"translate("+n+" "+i+")"})),e.children&&e.children.length&&e.children.forEach((function(e){r._addElement(e)})),o}},Sg.prototype._removeElement=function(e){var t=this._svg.getElementById(e.id);t&&Me(t)},Sg.prototype._createElement=function(e){var t,n=this._elementRegistry.getGraphics(e);if(n&&(t=Yn(n))){var i=Be(t);return Se(i,{id:e.id}),i}};var kg=Math.sign||function(e){return e>=0?1:-1};function Mg(e,t){return"polygon("+[Dg(t.left,t.top),Dg(t.left+t.width,t.top),Dg(t.left+t.width,t.top+t.height),Dg(t.left,t.top+t.height),Dg(t.left,e.height),Dg(e.width,e.height),Dg(e.width,0),Dg(0,0),Dg(0,e.height),Dg(t.left,e.height)].join(", ")+")"}function Dg(e,t){return e+"px "+t+"px"}function Bg(e){return P(e,(function(e){return f(e)?Bg(e):m(e)&&isFinite(e)}))}var jg={__init__:["minimap"],minimap:["type",Sg]};function Og(e,t){var n,i,r=(e=e||{}).borderColor||"rgba(0,0,0,0.1)",o=e.crossColor||"#CCC",a=-1;_e(t.getLayer("djs-origin",-1),n=Ig("g",{"pointer-events":"none"})),!1!==e.showBorder&&_e(n,Ig("path",{class:Lg("border"),d:Ng(["M",-22,a,"H",-1e3,"M",22,a,"H",6e3,"M",a,-22,"V",-1e3,"M",a,22,"V",3e3]),fill:"none",stroke:r,"stroke-width":"2px","stroke-dasharray":"6, 6","shape-rendering":"crispedges"})),_e(n,Ig("path",{d:Ng(["M",-15,a,"H",15,"M",a,-15,"V",15]),class:Lg("cross"),fill:"none",stroke:o,"stroke-width":"2px","stroke-linecap":"round"})),(i=Ig("text",{x:-40,y:-10,fill:o,class:Lg("label")})).textContent="(0, 0)",_e(n,i)}function Ng(e){return e.join(" ")}function Lg(e){return"djs-origin-"+e}function Ig(e,t){var n=Le(e);return Se(n,t),n}Og.$inject=["config.origin","canvas"];var zg={__init__:[Og]},Fg={offset:{x:150,y:75},tolerance:50,alignOnSave:!0};function $g(e,t,n,i,r,o){function a(e,n){var i=n.offset,r=n.tolerance,o={};return["x","y"].forEach((function(n){var a=-e[n]+i[n],s=t.get("gridSnapping",!1);s&&(a=function(e,t,n){n||(n="round");return Math[n](e/t)*t}(a,s.getGridSpacing())),o[n]=Math.abs(a)<r?0:a})),o}function s(){var t=r.viewbox().inner,n=r.getRootElement().children;if(n.length){var o=a(t,e);0===o.x&&0===o.y||i.execute("elements.alignToOrigin",{elements:n,delta:o})}}function c(e){return function(t){n.once("commandStack.changed",(function(){var n=t.delta,i=r.viewbox().scale;r.scroll({dx:e*n.x*i,dy:e*n.y*i})}))}}var p,u,l;e=function(e){var t=G({},Fg,e||{});return m(t.offset)&&(t.offset={x:t.offset,y:t.offset}),t}(e),i.register("elements.alignToOrigin",{preExecute:function(e){var t=e.delta,n=e.elements;o.moveElements(n,t)},execute:c(-1),revert:c(1)}),e.alignOnSave&&(p=t.get("_parent",!1),u=n,((l=p&&p._eventBus)||u).on("saveXML.start",1250,s),l&&u.on("diagram.destroy",(function(){l.off("saveXML.start",s)}))),this.align=s,this.computeAdjustment=a,this._config=e}$g.$inject=["config.alignToOrigin","injector","eventBus","commandStack","canvas","modeling"];var Vg={__init__:["alignToOrigin"],alignToOrigin:["type",$g]};function Hg(e){function t(e){if(!e.labelTarget){var t=Or(e);jr(t,"bpmn:Participant")&&(t=t.processRef),jr(t,"bpmn:Process")&&(t.isExecutable=!!t.isExecutable)}}e.on(["shape.added","root.added"],(function(e){t(e.element)})),e.on("elements.changed",(function(e){e.elements.forEach((function(e){t(e)}))}))}Hg.$inject=["eventBus"];var Gg={__init__:[Hg]};class Wg{constructor(e,t,n,i,r,o){this._eventBus=e,this._bpmnImporter=t,this._bpmnjs=n,this._canvas=i,this._modeling=r,this._translate=o}execute(e){var t=this,n=this._eventBus,i=e.subProcess,r=e.subProcessDiagram,o=[],a=new _r({element:function(n,i){e.cached||(e.cached={});var r=e.cached[n.id];if(r)return r.label&&t._canvas.addShape(r.label,i),r.waypoints?t._canvas.addConnection(r,i):t._canvas.addShape(r,i);var o=t._bpmnImporter.add(n,i);return e.cached[o.id]=o,o},error:function(e,t){o.push({message:e,context:t})}},this._translate);r.plane.planeElement.forEach((function(e){a.registerDi(e)})),qg(r,this.findDiagram(this._canvas.getRootElement().id));var s,c=Or(i);n.fire("signavio.import.render.start",{subProcess:c});try{a.handleSubProcess(c,i),a.handleDeferred()}catch(e){s=e}n.fire("signavio.import.render.complete",{error:s,subProcess:c,warnings:o}),n.fire("signavio.import.done",{error:s,subProcess:c,warnings:o})}postExecute(e){var t=e.subProcess,n=Kp(t.children.filter((function(e){return!e.hidden}))),i=n.x+n.width/2,r=n.y+n.height/2,o={x:t.x+t.width/2-i,y:t.y+t.height/2-r};this._modeling.moveElements(t.children,o,t)}revert(e){var t=this;var n=e.subProcess,i=e.subProcessDiagram,r=this.findDiagram(this._canvas.getRootElement().id),o=r.plane.planeElement.filter((function(e){return function(e,t){for(;e.bpmnElement&&e.bpmnElement.$parent;){if(e.bpmnElement.$parent.id===t)return!0;e=e.bpmnElement.$parent}return!1}(e,n.id)}));o.forEach((function(e){delete e.bpmnElement.di})),qg(r,i,o),n.children&&n.children.length&&Xh(n.children,(function(e){!function(e){e.waypoints?t._canvas.removeConnection(e):t._canvas.removeShape(e)}(e)}))}findDiagram(e){return x(this._bpmnjs.getDefinitions().diagrams,(function(t){return t.plane.bpmnElement.id===e}))}}function qg(e,t,n){n=n||e.plane.planeElement;var i=t.plane.planeElement;n.forEach((function(e){wt(i,e)})),n.slice().forEach((function(n){_t(e.plane.planeElement,n),n.$parent=t.plane}))}Wg.$inject=["eventBus","bpmnImporter","bpmnjs","canvas","modeling","translate"];class Ug{constructor(e,t,n,i,r){this._bpmnFactory=e,this._bpmnImporter=t,this._bpmnjs=n,this._canvas=i,this._translate=r}execute(e){var t=this;function n(e){e.children&&e.children.length&&e.children.slice().forEach(n),e.waypoints?t._canvas.removeConnection(e):t._canvas.removeShape(e)}var i=e.subProcess,r=e.subProcessDiagram;this.findDiagram(i.id)||(r||(r=this._bpmnFactory.create("bpmndi:BPMNDiagram",{plane:this._bpmnFactory.createDiPlane(Or(i))}),e.created=!0,e.subProcessDiagram=r),wt(this._bpmnjs.getDefinitions().diagrams,r));var o=this.findDiagram(this._canvas.getRootElement().id),a=o.plane.planeElement.filter((function(e){return function(e,t){for(;e.bpmnElement&&e.bpmnElement.$parent;){if(e.bpmnElement.$parent.id===t)return!0;e=e.bpmnElement.$parent}return!1}(e,i.id)}));a.forEach((function(e){delete e.bpmnElement.di})),Yg(o,r,a),i.children&&i.children.length&&Xh(i.children,(function(e){n(e)}))}revert(e){var t=this,n=e.subProcess,i=e.subProcessDiagram,r=e.created,o=[],a=new _r({element:function(e,n){return t._bpmnImporter.add(e,n)},error:function(e,t){o.push({message:e,context:t})}},this._translate);(i.plane.planeElement.forEach((function(e){a.registerDi(e)})),Yg(i,this.findDiagram(this._canvas.getRootElement().id)),r)&&_t(this._bpmnjs.getDefinitions().diagrams,i);try{a.handleSubProcess(Or(n),n),a.handleDeferred()}catch(e){console.error(e)}o.length&&console.warn(o)}findDiagram(e){return x(this._bpmnjs.getDefinitions().diagrams,(function(t){return t.plane.bpmnElement.id===e}))}}function Yg(e,t,n){n=n||e.plane.planeElement;var i=t.plane.get("planeElement");n.forEach((function(e){wt(i,e)})),n.slice().forEach((function(n){_t(e.plane.planeElement,n),n.$parent=t.plane}))}Ug.$inject=["bpmnFactory","bpmnImporter","bpmnjs","canvas","translate"];class Kg extends as{constructor(e,t,n,i,r,o,a){super(r),this._bpmnjs=e,i.registerHandler("signavioCompat.importSubProcess",Wg),i.registerHandler("signavioCompat.deleteSubProcess",Ug),this.postExecuted(["shape.toggleCollapse"],2e3,(t=>{if(!x(e.getDefinitions().$attrs,(function(e){return"http://www.signavio.com"===e})))return;const n=t.context.shape;var r;if(jr(n,"bpmn:SubProcess"))if(n.collapsed)r={subProcess:n,subProcessDiagram:this.findDiagram(n.id)},i.execute("signavioCompat.deleteSubProcess",r);else{const e=this.findDiagram(n.id);if(!e)return;r={subProcess:n,subProcessDiagram:e},i.execute("signavioCompat.importSubProcess",r)}}))}findDiagram(e){return x(this._bpmnjs.getDefinitions().diagrams,(function(t){return t.plane.bpmnElement.id===e}))}}Kg.$inject=["bpmnjs","bpmnImporter","canvas","commandStack","eventBus","modeling","translate"];var Xg={__init__:["signavioBehavior"],signavioBehavior:["type",Kg]},Zg="replace-with-collapsed-subprocess",Qg="replace-with-expanded-subprocess";function Jg(e,t,n){e.registerProvider("bpmn-replace",this),this._bpmnReplace=t,this._translate=n}function ey(e){return jr(e,"bpmn:SubProcess")&&!jr(e,"bpmn:Transaction")&&!zr(e)}Jg.$inject=["popupMenu","bpmnReplace","translate"],Jg.prototype.getPopupMenuEntries=function(e){var t=this._bpmnReplace,n=this._translate,i={"expand-subprocess":{className:"bpmn-icon-subprocess-expanded",label:n("Expand (not reversible)"),action:function(){t.replaceElement(e,{type:"bpmn:SubProcess",isExpanded:!0})}}};return function(r){return function(e){return jr(e,"bpmn:Task")}(e)?(delete r[Qg],delete r[Zg],r["replace-with-subprocess"]={className:"bpmn-icon-subprocess-collapsed",label:n("Sub Process"),action:function(){t.replaceElement(e,{type:"bpmn:SubProcess",isExpanded:!1})}},r):ey(e)&&Lr(e)?(delete r[Zg],r):ey(e)&&!Lr(e)?function(e){return e.children&&e.children.length}(e)?i:(delete r[Zg],delete r[Qg],G(r,i)):r}};var ty={__depends__:["popupMenu","bpmnReplace"],__init__:["disabledCollapsedSubprocessPopupProvider"],disabledCollapsedSubprocessPopupProvider:["type",Jg]};var ny=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e};var iy=function(e){return function(t,n,i){for(var r=-1,o=Object(t),a=i(t),s=a.length;s--;){var c=a[e?s:++r];if(!1===n(o[c],c,o))break}return t}}();var ry=function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i},oy="object"==typeof e&&e&&e.Object===Object&&e,ay="object"==typeof self&&self&&self.Object===Object&&self,sy=oy||ay||Function("return this")(),cy=sy.Symbol,py=Object.prototype,uy=py.hasOwnProperty,ly=py.toString,dy=cy?cy.toStringTag:void 0;var hy=function(e){var t=uy.call(e,dy),n=e[dy];try{e[dy]=void 0;var i=!0}catch(e){}var r=ly.call(e);return i&&(t?e[dy]=n:delete e[dy]),r},fy=Object.prototype.toString;var my=function(e){return fy.call(e)},vy=cy?cy.toStringTag:void 0;var gy=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":vy&&vy in Object(e)?hy(e):my(e)};var yy=function(e){return null!=e&&"object"==typeof e};var by=function(e){return yy(e)&&"[object Arguments]"==gy(e)},xy=Object.prototype,_y=xy.hasOwnProperty,wy=xy.propertyIsEnumerable,Ey=by(function(){return arguments}())?by:function(e){return yy(e)&&_y.call(e,"callee")&&!wy.call(e,"callee")},Sy=Array.isArray;var Cy=function(){return!1},Py=n((function(e,t){var n=t&&!t.nodeType&&t,i=n&&e&&!e.nodeType&&e,r=i&&i.exports===n?sy.Buffer:void 0,o=(r?r.isBuffer:void 0)||Cy;e.exports=o})),Ty=/^(?:0|[1-9]\d*)$/;var Ry=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Ty.test(e))&&e>-1&&e%1==0&&e<t};var Ay=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},ky={};ky["[object Float32Array]"]=ky["[object Float64Array]"]=ky["[object Int8Array]"]=ky["[object Int16Array]"]=ky["[object Int32Array]"]=ky["[object Uint8Array]"]=ky["[object Uint8ClampedArray]"]=ky["[object Uint16Array]"]=ky["[object Uint32Array]"]=!0,ky["[object Arguments]"]=ky["[object Array]"]=ky["[object ArrayBuffer]"]=ky["[object Boolean]"]=ky["[object DataView]"]=ky["[object Date]"]=ky["[object Error]"]=ky["[object Function]"]=ky["[object Map]"]=ky["[object Number]"]=ky["[object Object]"]=ky["[object RegExp]"]=ky["[object Set]"]=ky["[object String]"]=ky["[object WeakMap]"]=!1;var My=function(e){return yy(e)&&Ay(e.length)&&!!ky[gy(e)]};var Dy=function(e){return function(t){return e(t)}},By=n((function(e,t){var n=t&&!t.nodeType&&t,i=n&&e&&!e.nodeType&&e,r=i&&i.exports===n&&oy.process,o=function(){try{var e=i&&i.require&&i.require("util").types;return e||r&&r.binding&&r.binding("util")}catch(e){}}();e.exports=o})),jy=By&&By.isTypedArray,Oy=jy?Dy(jy):My,Ny=Object.prototype.hasOwnProperty;var Ly=function(e,t){var n=Sy(e),i=!n&&Ey(e),r=!n&&!i&&Py(e),o=!n&&!i&&!r&&Oy(e),a=n||i||r||o,s=a?ry(e.length,String):[],c=s.length;for(var p in e)!t&&!Ny.call(e,p)||a&&("length"==p||r&&("offset"==p||"parent"==p)||o&&("buffer"==p||"byteLength"==p||"byteOffset"==p)||Ry(p,c))||s.push(p);return s},Iy=Object.prototype;var zy=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Iy)};var Fy=function(e,t){return function(n){return e(t(n))}},$y=Fy(Object.keys,Object),Vy=Object.prototype.hasOwnProperty;var Hy=function(e){if(!zy(e))return $y(e);var t=[];for(var n in Object(e))Vy.call(e,n)&&"constructor"!=n&&t.push(n);return t};var Gy=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var Wy=function(e){if(!Gy(e))return!1;var t=gy(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var qy=function(e){return null!=e&&Ay(e.length)&&!Wy(e)};var Uy=function(e){return qy(e)?Ly(e):Hy(e)};var Yy=function(e,t){return e&&iy(e,t,Uy)};var Ky=function(e,t){return function(n,i){if(null==n)return n;if(!qy(n))return e(n,i);for(var r=n.length,o=t?r:-1,a=Object(n);(t?o--:++o<r)&&!1!==i(a[o],o,a););return n}}(Yy);var Xy=function(e){return e};var Zy=function(e){return"function"==typeof e?e:Xy};var Qy=function(e,t){return(Sy(e)?ny:Ky)(e,Zy(t))},Jy=Object.create,eb=function(){function e(){}return function(t){if(!Gy(t))return{};if(Jy)return Jy(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var tb=function(){this.__data__=[],this.size=0};var nb=function(e,t){return e===t||e!=e&&t!=t};var ib=function(e,t){for(var n=e.length;n--;)if(nb(e[n][0],t))return n;return-1},rb=Array.prototype.splice;var ob=function(e){var t=this.__data__,n=ib(t,e);return!(n<0)&&(n==t.length-1?t.pop():rb.call(t,n,1),--this.size,!0)};var ab=function(e){var t=this.__data__,n=ib(t,e);return n<0?void 0:t[n][1]};var sb=function(e){return ib(this.__data__,e)>-1};var cb=function(e,t){var n=this.__data__,i=ib(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};function pb(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}pb.prototype.clear=tb,pb.prototype.delete=ob,pb.prototype.get=ab,pb.prototype.has=sb,pb.prototype.set=cb;var ub=pb;var lb=function(){this.__data__=new ub,this.size=0};var db=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var hb=function(e){return this.__data__.get(e)};var fb,mb=function(e){return this.__data__.has(e)},vb=sy["__core-js_shared__"],gb=(fb=/[^.]+$/.exec(vb&&vb.keys&&vb.keys.IE_PROTO||""))?"Symbol(src)_1."+fb:"";var yb=function(e){return!!gb&&gb in e},bb=Function.prototype.toString;var xb=function(e){if(null!=e){try{return bb.call(e)}catch(e){}try{return e+""}catch(e){}}return""},_b=/^\[object .+?Constructor\]$/,wb=Function.prototype,Eb=Object.prototype,Sb=wb.toString,Cb=Eb.hasOwnProperty,Pb=RegExp("^"+Sb.call(Cb).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Tb=function(e){return!(!Gy(e)||yb(e))&&(Wy(e)?Pb:_b).test(xb(e))};var Rb=function(e,t){return null==e?void 0:e[t]};var Ab=function(e,t){var n=Rb(e,t);return Tb(n)?n:void 0},kb=Ab(sy,"Map"),Mb=Ab(Object,"create");var Db=function(){this.__data__=Mb?Mb(null):{},this.size=0};var Bb=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},jb=Object.prototype.hasOwnProperty;var Ob=function(e){var t=this.__data__;if(Mb){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return jb.call(t,e)?t[e]:void 0},Nb=Object.prototype.hasOwnProperty;var Lb=function(e){var t=this.__data__;return Mb?void 0!==t[e]:Nb.call(t,e)};var Ib=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Mb&&void 0===t?"__lodash_hash_undefined__":t,this};function zb(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}zb.prototype.clear=Db,zb.prototype.delete=Bb,zb.prototype.get=Ob,zb.prototype.has=Lb,zb.prototype.set=Ib;var Fb=zb;var $b=function(){this.size=0,this.__data__={hash:new Fb,map:new(kb||ub),string:new Fb}};var Vb=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Hb=function(e,t){var n=e.__data__;return Vb(t)?n["string"==typeof t?"string":"hash"]:n.map};var Gb=function(e){var t=Hb(this,e).delete(e);return this.size-=t?1:0,t};var Wb=function(e){return Hb(this,e).get(e)};var qb=function(e){return Hb(this,e).has(e)};var Ub=function(e,t){var n=Hb(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this};function Yb(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Yb.prototype.clear=$b,Yb.prototype.delete=Gb,Yb.prototype.get=Wb,Yb.prototype.has=qb,Yb.prototype.set=Ub;var Kb=Yb;var Xb=function(e,t){var n=this.__data__;if(n instanceof ub){var i=n.__data__;if(!kb||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Kb(i)}return n.set(e,t),this.size=n.size,this};function Zb(e){var t=this.__data__=new ub(e);this.size=t.size}Zb.prototype.clear=lb,Zb.prototype.delete=db,Zb.prototype.get=hb,Zb.prototype.has=mb,Zb.prototype.set=Xb;var Qb=Zb;var Jb=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var ex=function(e){return this.__data__.has(e)};function tx(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Kb;++t<n;)this.add(e[t])}tx.prototype.add=tx.prototype.push=Jb,tx.prototype.has=ex;var nx=tx;var ix=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1};var rx=function(e,t){return e.has(t)};var ox=function(e,t,n,i,r,o){var a=1&n,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var p=o.get(e),u=o.get(t);if(p&&u)return p==t&&u==e;var l=-1,d=!0,h=2&n?new nx:void 0;for(o.set(e,t),o.set(t,e);++l<s;){var f=e[l],m=t[l];if(i)var v=a?i(m,f,l,t,e,o):i(f,m,l,e,t,o);if(void 0!==v){if(v)continue;d=!1;break}if(h){if(!ix(t,(function(e,t){if(!rx(h,t)&&(f===e||r(f,e,n,i,o)))return h.push(t)}))){d=!1;break}}else if(f!==m&&!r(f,m,n,i,o)){d=!1;break}}return o.delete(e),o.delete(t),d},ax=sy.Uint8Array;var sx=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n};var cx=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},px=cy?cy.prototype:void 0,ux=px?px.valueOf:void 0;var lx=function(e,t,n,i,r,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new ax(e),new ax(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return nb(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=sx;case"[object Set]":var c=1&i;if(s||(s=cx),e.size!=t.size&&!c)return!1;var p=a.get(e);if(p)return p==t;i|=2,a.set(e,t);var u=ox(s(e),s(t),i,r,o,a);return a.delete(e),u;case"[object Symbol]":if(ux)return ux.call(e)==ux.call(t)}return!1};var dx=function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e};var hx=function(e,t,n){var i=t(e);return Sy(e)?i:dx(i,n(e))};var fx=function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n<i;){var a=e[n];t(a,n,e)&&(o[r++]=a)}return o};var mx=function(){return[]},vx=Object.prototype.propertyIsEnumerable,gx=Object.getOwnPropertySymbols,yx=gx?function(e){return null==e?[]:(e=Object(e),fx(gx(e),(function(t){return vx.call(e,t)})))}:mx;var bx=function(e){return hx(e,Uy,yx)},xx=Object.prototype.hasOwnProperty;var _x=function(e,t,n,i,r,o){var a=1&n,s=bx(e),c=s.length;if(c!=bx(t).length&&!a)return!1;for(var p=c;p--;){var u=s[p];if(!(a?u in t:xx.call(t,u)))return!1}var l=o.get(e),d=o.get(t);if(l&&d)return l==t&&d==e;var h=!0;o.set(e,t),o.set(t,e);for(var f=a;++p<c;){var m=e[u=s[p]],v=t[u];if(i)var g=a?i(v,m,u,t,e,o):i(m,v,u,e,t,o);if(!(void 0===g?m===v||r(m,v,n,i,o):g)){h=!1;break}f||(f="constructor"==u)}if(h&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(h=!1)}return o.delete(e),o.delete(t),h},wx=Ab(sy,"DataView"),Ex=Ab(sy,"Promise"),Sx=Ab(sy,"Set"),Cx=Ab(sy,"WeakMap"),Px="[object Map]",Tx="[object Promise]",Rx="[object Set]",Ax="[object WeakMap]",kx="[object DataView]",Mx=xb(wx),Dx=xb(kb),Bx=xb(Ex),jx=xb(Sx),Ox=xb(Cx),Nx=gy;(wx&&Nx(new wx(new ArrayBuffer(1)))!=kx||kb&&Nx(new kb)!=Px||Ex&&Nx(Ex.resolve())!=Tx||Sx&&Nx(new Sx)!=Rx||Cx&&Nx(new Cx)!=Ax)&&(Nx=function(e){var t=gy(e),n="[object Object]"==t?e.constructor:void 0,i=n?xb(n):"";if(i)switch(i){case Mx:return kx;case Dx:return Px;case Bx:return Tx;case jx:return Rx;case Ox:return Ax}return t});var Lx=Nx,Ix="[object Arguments]",zx="[object Array]",Fx="[object Object]",$x=Object.prototype.hasOwnProperty;var Vx=function(e,t,n,i,r,o){var a=Sy(e),s=Sy(t),c=a?zx:Lx(e),p=s?zx:Lx(t),u=(c=c==Ix?Fx:c)==Fx,l=(p=p==Ix?Fx:p)==Fx,d=c==p;if(d&&Py(e)){if(!Py(t))return!1;a=!0,u=!1}if(d&&!u)return o||(o=new Qb),a||Oy(e)?ox(e,t,n,i,r,o):lx(e,t,c,n,i,r,o);if(!(1&n)){var h=u&&$x.call(e,"__wrapped__"),f=l&&$x.call(t,"__wrapped__");if(h||f){var m=h?e.value():e,v=f?t.value():t;return o||(o=new Qb),r(m,v,n,i,o)}}return!!d&&(o||(o=new Qb),_x(e,t,n,i,r,o))};var Hx=function e(t,n,i,r,o){return t===n||(null==t||null==n||!yy(t)&&!yy(n)?t!=t&&n!=n:Vx(t,n,i,r,e,o))};var Gx=function(e,t,n,i){var r=n.length,o=r,a=!i;if(null==e)return!o;for(e=Object(e);r--;){var s=n[r];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++r<o;){var c=(s=n[r])[0],p=e[c],u=s[1];if(a&&s[2]){if(void 0===p&&!(c in e))return!1}else{var l=new Qb;if(i)var d=i(p,u,c,e,t,l);if(!(void 0===d?Hx(u,p,3,i,l):d))return!1}}return!0};var Wx=function(e){return e==e&&!Gy(e)};var qx=function(e){for(var t=Uy(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,Wx(r)]}return t};var Ux=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}};var Yx=function(e){var t=qx(e);return 1==t.length&&t[0][2]?Ux(t[0][0],t[0][1]):function(n){return n===e||Gx(n,e,t)}};var Kx=function(e){return"symbol"==typeof e||yy(e)&&"[object Symbol]"==gy(e)},Xx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zx=/^\w*$/;var Qx=function(e,t){if(Sy(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Kx(e))||(Zx.test(e)||!Xx.test(e)||null!=t&&e in Object(t))};function Jx(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var a=e.apply(this,i);return n.cache=o.set(r,a)||o,a};return n.cache=new(Jx.Cache||Kb),n}Jx.Cache=Kb;var e_=Jx;var t_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n_=/\\(\\)?/g,i_=function(e){var t=e_(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(t_,(function(e,n,i,r){t.push(i?r.replace(n_,"$1"):n||e)})),t}));var r_=function(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r},o_=cy?cy.prototype:void 0,a_=o_?o_.toString:void 0;var s_=function e(t){if("string"==typeof t)return t;if(Sy(t))return r_(t,e)+"";if(Kx(t))return a_?a_.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n};var c_=function(e){return null==e?"":s_(e)};var p_=function(e,t){return Sy(e)?e:Qx(e,t)?[e]:i_(c_(e))};var u_=function(e){if("string"==typeof e||Kx(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};var l_=function(e,t){for(var n=0,i=(t=p_(t,e)).length;null!=e&&n<i;)e=e[u_(t[n++])];return n&&n==i?e:void 0};var d_=function(e,t,n){var i=null==e?void 0:l_(e,t);return void 0===i?n:i};var h_=function(e,t){return null!=e&&t in Object(e)};var f_=function(e,t,n){for(var i=-1,r=(t=p_(t,e)).length,o=!1;++i<r;){var a=u_(t[i]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++i!=r?o:!!(r=null==e?0:e.length)&&Ay(r)&&Ry(a,r)&&(Sy(e)||Ey(e))};var m_=function(e,t){return null!=e&&f_(e,t,h_)};var v_=function(e,t){return Qx(e)&&Wx(t)?Ux(u_(e),t):function(n){var i=d_(n,e);return void 0===i&&i===t?m_(n,e):Hx(t,i,3)}};var g_=function(e){return function(t){return null==t?void 0:t[e]}};var y_=function(e){return function(t){return l_(t,e)}};var b_=function(e){return Qx(e)?g_(u_(e)):y_(e)};var x_=function(e){return"function"==typeof e?e:null==e?Xy:"object"==typeof e?Sy(e)?v_(e[0],e[1]):Yx(e):b_(e)},__=Fy(Object.getPrototypeOf,Object);var w_=function(e,t,n){var i=Sy(e),r=i||Py(e)||Oy(e);if(t=x_(t),null==n){var o=e&&e.constructor;n=r?i?new o:[]:Gy(e)&&Wy(o)?eb(__(e)):{}}return(r?ny:Yy)(e,(function(e,i,r){return t(n,e,i,r)})),n},E_=t(Nr),S_=E_.is;function C_(e){this._elementRegistry=e}C_.$inject=["elementRegistry"];var P_=C_;function T_(e,t){Qy(t,(function(t,n){e.set(n,t)}))}C_.prototype.execute=function(e){var t=e.element,n=e.businessObject,i=function(e){for(var t=e;t.$parent;)t=t.$parent;return t}(n).rootElements,r=e.referenceType,o=e.referenceProperty,a=[t];if(!t)throw new Error("element required");if(!n)throw new Error("businessObject required");var s=e.properties,c=e.oldProperties||function(e,t){return w_(t,(function(t,n){return t[n]=e.get(n),t}),{})}(n,Uy(s));return void 0!==r&&void 0!==o&&Qy(i,(function(e){S_(e,r)&&e.id===s[o]&&(s[o]=e)})),T_(n,s),e.oldProperties=c,e.changed=a,a},C_.prototype.revert=function(e){var t=e.oldProperties;return T_(e.businessObject,t),e.changed};var R_={},A_=R_;function k_(e,t){this._elementRegistry=e,this._bpmnFactory=t}R_.createElement=function(e,t,n,i){var r=i.create(e,t);return r.$parent=n,r},k_.$inject=["elementRegistry","bpmnFactory"];var M_=k_;function D_(e,t){if(!e)throw new Error(t+" required");return e}function B_(e,t){this._elementRegistry=e,this._bpmnFactory=t}k_.prototype.execute=function(e){var t=D_(e.referencingObject,"referencingObject"),n=D_(e.referenceProperty,"referenceProperty"),i=D_(e.newObject,"newObject"),r=D_(e.newObjectContainer,"newObjectContainer"),o=D_(e.newObjectParent,"newObjectParent"),a=[e.element],s=A_.createElement(i.type,i.properties,o,this._bpmnFactory);return e.referencedObject=s,r.push(s),e.previousReference=t[n],t[n]=s,e.changed=a,a},k_.prototype.revert=function(e){var t=e.referencingObject,n=e.referenceProperty,i=e.previousReference,r=e.referencedObject,o=e.newObjectContainer;return t.set(n,i),o.splice(o.indexOf(r),1),e.changed},B_.$inject=["elementRegistry","bpmnFactory"];var j_=B_;function O_(e,t){if(!e)throw new Error(t+" required");return e}function N_(e,t){this._elementRegistry=e,this._bpmnFactory=t}B_.prototype.execute=function(e){var t=O_(e.currentObject,"currentObject"),n=O_(e.propertyName,"propertyName"),i=function(e,t){if(!e||"[object Array]"!==Object.prototype.toString.call(e))throw new Error(t+" needs to be a list");return e}(e.newObjects,"newObjects"),r=[e.element],o=[],a=this;return Qy(i,(function(e){var n=A_.createElement(e.type,e.properties,t,a._bpmnFactory);o.push(n)})),e.childObject=o,e.previousChilds=t[n],t[n]=o,e.changed=r,r},B_.prototype.revert=function(e){var t=e.currentObject,n=e.propertyName,i=e.previousChilds;return t.set(n,i),e.changed},N_.$inject=["elementRegistry","bpmnFactory"];var L_=N_;function I_(e,t){if(!e)throw new Error(t+"required");return e}function z_(e){this._commandStack=e}N_.prototype.execute=function(e){var t,n=I_(e.currentObject,"currentObject"),i=I_(e.propertyName,"propertyName"),r=e.updatedObjectList,o=e.objectsToRemove||[],a=e.objectsToAdd||[],s=e.objectsToPrepend||[],c=[e.element];e.referencePropertyName&&(t=e.referencePropertyName);var p=n[i];if(e.previousList=n[i],r)n[i]=r;else{var u=s.slice();if(Qy(p,(function(e){-1==o.indexOf(e)&&u.push(e)})),(u=u.concat(a)).length>0||!t)n[i]=u;else if(t){n.$parent.set(t,void 0)}}return e.changed=c,c},N_.prototype.revert=function(e){var t=e.currentObject,n=e.propertyName,i=e.previousList,r=t.$parent;return e.referencePropertyName&&r.set(e.referencePropertyName,t),t.set(n,i),e.changed},z_.$inject=["commandStack"];var F_=z_;z_.prototype.preExecute=function(e){var t=this._commandStack;Qy(e,(function(e){t.execute(e.cmd,e.context)}))};var $_={"properties-panel.update-businessobject":P_,"properties-panel.create-and-reference":M_,"properties-panel.create-businessobject-list":j_,"properties-panel.update-businessobject-list":L_,"properties-panel.multi-command-executor":F_};function V_(e,t){e.on("diagram.init",(function(){Qy($_,(function(e,n){t.registerHandler(n,e)}))}))}V_.$inject=["eventBus","commandStack"];var H_={__init__:[V_]},G_=t(be),W_=t(a),q_=G_.query,U_=G_.clear,Y_=G_.classes,K_=E_.is,X_=G_.domify,Z_=W_.default,Q_=/\s/,J_=/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i,ew=/^[a-z_][\w-.]*$/i,tw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function nw(e){if(e.selectedIndex>=0)return e.options[e.selectedIndex].value}function iw(e){for(var t=e;t.$parent;)t=t.$parent;return t}function rw(e,t){var n=[];return Qy(e||[],(function(e){K_(e,t)&&n.push(e)})),n}function ow(e,t){return rw(iw(e).rootElements,t)}function aw(e){return e.push({label:"",value:"",name:""})}function sw(e){var t=e.name||"";return e.errorCode&&(t+=" (code="+e.errorCode+")"),e.escalationCode&&(t+=" (code="+e.escalationCode+")"),t}function cw(e,t){var n=[],i=ow(e,t);return Qy(i,(function(e){n.push({label:sw(e),value:e.id,name:e.name})})),n}function pw(e,t){return uw(e)?t("Id must not contain spaces."):ew.test(e)?void 0:J_.test(e)?t("Id must not contain prefix."):t("Id must be a valid QName.")}function uw(e){return Q_.test(e)}function lw(e){return(e=""+e)&&e.replace(/[&<>"']/g,(function(e){return tw[e]}))}var dw={selectedOption:nw,selectedType:function(e,t){return nw(q_(e,t))},getRoot:iw,filterElementsByType:rw,findRootElementsByType:ow,removeAllChildren:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},addEmptyParameter:aw,refreshOptionsModel:cw,updateOptionsDropDown:function(e,t,n,i){var r=cw(t,n);aw(r);var o=q_(e,i);return U_(o),Qy(r,(function(e){var t=X_('<option value="'+lw(e.value)+'">'+lw(e.label)+"</option>");o.appendChild(t)})),r},isIdValid:function(e,t,n){var i=e.$model.ids.assigned(t);return!t||i&&i!==e?n("Element must have an unique id."):pw(t,n)},validateId:pw,containsSpace:uw,nextId:function(e){return new Z_([32,32,1]).nextPrefixed(e)},triggerClickEvent:function(e){var t,n="click";if(document.createEvent){try{t=new MouseEvent(n,{view:window,bubbles:!0,cancelable:!0})}catch(e){(t=document.createEvent("MouseEvent")).initEvent(n,!0,!0)}return e.dispatchEvent(t)}return t=document.createEventObject(),e.fireEvent("onclick",t)},escapeHTML:lw,createDropdown:function(e){var t,n=e.menu,i=X_('<div class="group__dropdown"><button class="group__dropdown-button"><svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512"><path fill="currentColor" d="M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z"></path></svg></button><div class="group__dropdown-menu"></div></div>'),r=q_(".group__dropdown-button",i),o=q_(".group__dropdown-menu",i);return r.addEventListener("click",(function(e){Y_(i).toggle("group__dropdown--open"),function(e){function n(t){if(t!==e){var r=t.target;o===r||o.contains(r)||(Y_(i).remove("group__dropdown--open"),document.removeEventListener("click",n))}}t&&document.removeEventListener("click",t);document.addEventListener("click",n),t=n}(e)})),Qy(n,(function(e){var t=X_('<div class="group__dropdown-menu-item" data-dropdown-action="'+e.id+'">'+lw(e.label)+"</div>");t.addEventListener("click",(function(){e.onClick(),Y_(i).remove("group__dropdown--open")})),o.appendChild(t)})),i}};var hw=function(e,t){var n=[];return Ky(e,(function(e,i,r){t(e,i,r)&&n.push(e)})),n};var fw=function(e,t){return(Sy(e)?fx:hw)(e,x_(t))},mw=Object.prototype.hasOwnProperty;var vw=function(e){if(null==e)return!0;if(qy(e)&&(Sy(e)||"string"==typeof e||"function"==typeof e.splice||Py(e)||Oy(e)||Ey(e)))return!e.length;var t=Lx(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(zy(e))return!Hy(e).length;for(var n in e)if(mw.call(e,n))return!1;return!0};var gw=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},yw=Math.max;var bw=function(e,t,n){return t=yw(void 0===t?e.length-1:t,0),function(){for(var i=arguments,r=-1,o=yw(i.length-t,0),a=Array(o);++r<o;)a[r]=i[t+r];r=-1;for(var s=Array(t+1);++r<t;)s[r]=i[r];return s[t]=n(a),gw(e,this,s)}};var xw=function(e){return function(){return e}},_w=function(){try{var e=Ab(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),ww=_w?function(e,t){return _w(e,"toString",{configurable:!0,enumerable:!1,value:xw(t),writable:!0})}:Xy,Ew=Date.now;var Sw=function(e){var t=0,n=0;return function(){var i=Ew(),r=16-(i-n);if(n=i,r>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},Cw=Sw(ww);var Pw=function(e,t){return Cw(bw(e,t,Xy),e+"")};var Tw=function(e,t,n,i){for(var r=e.length,o=n+(i?1:-1);i?o--:++o<r;)if(t(e[o],o,e))return o;return-1};var Rw=function(e){return e!=e};var Aw=function(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1};var kw=function(e,t,n){return t==t?Aw(e,t,n):Tw(e,Rw,n)};var Mw=function(e,t){return!!(null==e?0:e.length)&&kw(e,t,0)>-1};var Dw=function(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1};var Bw=function(e,t,n,i){var r=-1,o=Mw,a=!0,s=e.length,c=[],p=t.length;if(!s)return c;n&&(t=r_(t,Dy(n))),i?(o=Dw,a=!1):t.length>=200&&(o=rx,a=!1,t=new nx(t));e:for(;++r<s;){var u=e[r],l=null==n?u:n(u);if(u=i||0!==u?u:0,a&&l==l){for(var d=p;d--;)if(t[d]===l)continue e;c.push(u)}else o(t,l,i)||c.push(u)}return c},jw=cy?cy.isConcatSpreadable:void 0;var Ow=function(e){return Sy(e)||Ey(e)||!!(jw&&e&&e[jw])};var Nw=function e(t,n,i,r,o){var a=-1,s=t.length;for(i||(i=Ow),o||(o=[]);++a<s;){var c=t[a];n>0&&i(c)?n>1?e(c,n-1,i,r,o):dx(o,c):r||(o[o.length]=c)}return o};var Lw=function(){},Iw=Sx&&1/cx(new Sx([,-0]))[1]==1/0?function(e){return new Sx(e)}:Lw;var zw=function(e,t,n){var i=-1,r=Mw,o=e.length,a=!0,s=[],c=s;if(n)a=!1,r=Dw;else if(o>=200){var p=t?null:Iw(e);if(p)return cx(p);a=!1,r=rx,c=new nx}else c=t?[]:s;e:for(;++i<o;){var u=e[i],l=t?t(u):u;if(u=n||0!==u?u:0,a&&l==l){for(var d=c.length;d--;)if(c[d]===l)continue e;t&&c.push(l),s.push(u)}else r(c,l,n)||(c!==s&&c.push(l),s.push(u))}return s};var Fw=function(e,t,n){var i=e.length;if(i<2)return i?zw(e[0]):[];for(var r=-1,o=Array(i);++r<i;)for(var a=e[r],s=-1;++s<i;)s!=r&&(o[r]=Bw(o[r]||a,e[s],t,n));return zw(Nw(o,1),t,n)};var $w=function(e){return yy(e)&&qy(e)},Vw=Pw((function(e){return Fw(fx(e,$w))})),Hw=function(){return sy.Date.now()},Gw=/\s/;var Ww=function(e){for(var t=e.length;t--&&Gw.test(e.charAt(t)););return t},qw=/^\s+/;var Uw=function(e){return e?e.slice(0,Ww(e)+1).replace(qw,""):e},Yw=/^[-+]0x[0-9a-f]+$/i,Kw=/^0b[01]+$/i,Xw=/^0o[0-7]+$/i,Zw=parseInt;var Qw=function(e){if("number"==typeof e)return e;if(Kx(e))return NaN;if(Gy(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Gy(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Uw(e);var n=Kw.test(e);return n||Xw.test(e)?Zw(e.slice(2),n?2:8):Yw.test(e)?NaN:+e},Jw=Math.max,eE=Math.min;var tE=function(e,t,n){var i,r,o,a,s,c,p=0,u=!1,l=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=i,o=r;return i=r=void 0,p=t,a=e.apply(o,n)}function f(e){return p=e,s=setTimeout(v,t),u?h(e):a}function m(e){var n=e-c;return void 0===c||n>=t||n<0||l&&e-p>=o}function v(){var e=Hw();if(m(e))return g(e);s=setTimeout(v,function(e){var n=t-(e-c);return l?eE(n,o-(e-p)):n}(e))}function g(e){return s=void 0,d&&i?h(e):(i=r=void 0,a)}function y(){var e=Hw(),n=m(e);if(i=arguments,r=this,c=e,n){if(void 0===s)return f(c);if(l)return clearTimeout(s),s=setTimeout(v,t),h(c)}return void 0===s&&(s=setTimeout(v,t)),a}return t=Qw(t)||0,Gy(n)&&(u=!!n.leading,o=(l="maxWait"in n)?Jw(Qw(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),p=0,i=c=r=s=void 0},y.flush=function(){return void 0===s?a:g(Hw())},y};var nE=function(e){return(null==e?0:e.length)?Nw(e,Infinity):[]};var iE=function(e,t,n){"__proto__"==t&&_w?_w(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var rE=function(e,t,n,i){for(var r=-1,o=null==e?0:e.length;++r<o;){var a=e[r];t(i,a,n(a),e)}return i};var oE=function(e,t,n,i){return Ky(e,(function(e,r,o){t(i,e,n(e),o)})),i};var aE=function(e,t){return function(n,i){var r=Sy(n)?rE:oE,o=t?t():{};return r(n,e,x_(i),o)}}((function(e,t,n){iE(e,n,t)}));var sE=function(e,t){var n=-1,i=qy(e)?Array(e.length):[];return Ky(e,(function(e,r,o){i[++n]=t(e,r,o)})),i};var cE=function(e,t){return(Sy(e)?r_:sE)(e,x_(t))};var pE=function(e,t,n,i){var r=-1,o=null==e?0:e.length;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n};var uE=function(e,t,n,i,r){return r(e,(function(e,r,o){n=i?(i=!1,e):t(n,e,r,o)})),n};var lE=function(e,t,n){var i=Sy(e)?pE:uE,r=arguments.length<3;return i(e,x_(t),n,r,Ky)};var dE=function(e,t,n){var i=e.start,r=i,o=n.length-t.length;n.length,t.length;var a=t.substring(i);return n.lastIndexOf(a)===n.length-a.length&&(t=t.substring(0,t.length-a.length),n=n.substring(0,n.length-a.length)),(o=function(e,t){var n,i,r,o=0,a=0;t.length>e.length?(i=t,r=e):(i=e,r=t);for(;o<i.length;)i.charAt(o)!==r.charAt(a)?(n||(n={l_start:o,s_start:a}),o++):(n&&!n.complete&&(n.l_end=o,n.s_end=a,n.complete=!0),a++,o++);n&&!n.complete&&(n.complete=!0,n.s_end=r.length,n.l_end=i.length);if(!n)return;return t.length>e.length?{newStart:n.l_start,newEnd:n.l_end,type:"add"}:{newStart:n.s_start,newEnd:n.s_end,type:t.length<e.length?"remove":"replace"}}(t,n))&&(r="remove"===o.type?o.newStart:o.newEnd),hE(r)};function hE(e,t){return{start:e,end:void 0===t?e:t}}var fE=hE;dE.range=fE;var mE={scrollSymbolLeft:"‹",scrollSymbolRight:"›"};function vE(e,t){G(this,function(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map((function(e){e(n)})),(e["*"]||[]).slice().map((function(e){e(t,n)}))}}}()),this.options=t=G({},mE,t),this.container=e,this._createScrollButtons(e,t),this._bindEvents(e)}function gE(e,t){var n=yE(e);return n||(n=new vE(e,t),e.__scrollTabs=n),n}function yE(e){return e.__scrollTabs}vE.prototype._createButton=function(e,t){var n=t.className,i=t.direction,r=ve("."+n,e);return r||(r=he('<span class="scroll-tabs-button '+n+'">'+t.label+"</span>"),e.insertBefore(r,e.childNodes[0])),Y(r,"data-direction",i),r},vE.prototype._createScrollButtons=function(e,t){this._createButton(e,{className:"scroll-tabs-left",label:t.scrollSymbolLeft,direction:-1}),this._createButton(e,{className:"scroll-tabs-right",label:t.scrollSymbolRight,direction:1})},vE.prototype.getActiveTabNode=function(){return ve(this.options.selectors.active,this.container)},vE.prototype.getTabsContainerNode=function(){return ve(this.options.selectors.tabsContainer,this.container)},vE.prototype.getAllTabNodes=function(){return ge(this.options.selectors.tab,this.container)},vE.prototype.getVisibleTabs=function(){var e=this.getAllTabNodes(),t=this.options.selectors.ignore;return w(e,(function(e){return!re(e,t)}))},vE.prototype.getAdjacentTab=function(e,t){var n=this.getVisibleTabs(),i=n.indexOf(e);return n[i+t]},vE.prototype._bindEvents=function(e){this._bindWheelEvent(e),this._bindTabClickEvents(e),this._bindScrollButtonEvents(e)},vE.prototype._bindTabClickEvents=function(e){var t=this.options.selectors.tab,n=this;de.bind(e,t,"click",(function(e){n.scrollToTabNode(e.delegateTarget)}))},vE.prototype._bindWheelEvent=function(e){var t=this;pe.bind(e,"wheel",(function(e){var n=Math.sign(e.deltaY),i=t.getActiveTabNode(),r=t.getAdjacentTab(i,n);r&&(t.scrollToTabNode(r),t.emit("scroll",r,i,n)),e.preventDefault()}))},vE.prototype._bindScrollButtonEvents=function(e){var t=this;de.bind(e,".scroll-tabs-button","click",(function(e){var n=e.delegateTarget,i=parseInt(Y(n,"data-direction"),10),r=t.getActiveTabNode(),o=t.getAdjacentTab(r,i);o&&(t.scrollToTabNode(o),t.emit("scroll",o,r,i)),e.preventDefault()}))},vE.prototype.scrollToTabNode=function(e){if(e){var t=e.parentNode,n=e.offsetWidth,i=e.offsetLeft,r=i+n,o=t.offsetWidth;t.scrollLeft>i?t.scrollLeft=0:r>o&&(t.scrollLeft=r-o)}},vE.prototype.update=function(){var e=this.getTabsContainerNode(),t=e.scrollWidth>e.offsetWidth;J(this.container).toggle("scroll-tabs-overflow",t),t&&this.scrollToTabNode(this.getActiveTabNode())},gE.get=yE;var bE=t(Object.freeze({__proto__:null,default:gE})),xE=dw.createDropdown,_E=dw.escapeHTML,wE=G_.domify,EE=G_.query,SE=G_.queryAll,CE=G_.remove,PE=G_.classes,TE=G_.closest,RE=G_.attr,AE=G_.delegate,kE=G_.matches,ME=bE.default,DE=E_.getBusinessObject,BE="bpp-hidden";function jE(e){return"checkbox"===e.type||"radio"===e.type}function OE(e){return RE(e,"contenteditable")}function NE(e,t){var n=SE("input[name], textarea[name], select[name], [contenteditable]",e);return n&&n.length||(n=kE(e,"option")?[e]:n),t||(n=fw(n,(function(e){return!TE(e,".bpp-hidden")}))),n}function LE(e){var t={},n=NE(e);return Qy(n,(function(e){var n=e.value,i=RE(e,"name")||RE(e,"data-name");jE(e)?n=e.checked?!RE(e,"value")||e.value:null:OE(e)&&(n=e.innerText),null!==n&&(t[i]=n)})),t}function IE(e){var t,n=EE("[data-list-entry-container]",e);if(n){t=[];var i=n.children||[];Qy(i,(function(e){t.push(LE(e))}))}else t=LE(e);return t}function zE(e,t){return!(e&&!t)&&Uy(e).concat(Uy(t)).every((function(n){return e[n]===t[n]}))}function FE(e){return aE(nE(cE(nE(cE(e,"groups")),"entries")),"id")}function $E(e,t,n,i,r,o){this._eventBus=n,this._modeling=i,this._commandStack=r,this._canvas=o;var a=t.get("propertiesProvider",!1);a&&this.registerProvider(a),this._init(e)}$E.$inject=["config.propertiesPanel","injector","eventBus","modeling","commandStack","canvas"];var VE=$E;function HE(e){return e&&(e.isImplicit||"__implicitroot"===e.id)}$E.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),"function"==typeof t.getTabs?(this._eventBus.on("propertiesPanel.getProviders",e,(function(e){e.providers.push(t)})),this._eventBus.fire("propertiesPanel.providersChanged")):console.error("Properties provider does not impement #getTabs(element) API")},$E.prototype._init=function(e){var t=this._canvas,n=this._eventBus,i=this;n.on("root.added",(function(e){var t=e.element;HE(t)||i.update(t)})),n.on("selection.changed",(function(e){var n=e.newSelection[0];HE(t.getRootElement())||i.update(n)})),n.on(["propertiesPanel.changed","propertiesPanel.resized"],(function(e){var t=EE(".bpp-properties-tab-bar",i._container);if(t){var n=ME.get(t);n||(n=ME(t,{selectors:{tabsContainer:".bpp-properties-tabs-links",tab:".bpp-properties-tabs-links li",ignore:".bpp-hidden",active:".bpp-active"}})).on("scroll",(function(e,t,n){var r=EE("[data-tab-target]",e),o=RE(r,"data-tab-target");i.activateTab(o)})),n.update()}})),n.on("elements.changed",(function(e){var t=i._current,n=t&&t.element;n&&-1!==e.elements.indexOf(n)&&i.update(n)})),n.on(["elementTemplates.changed","propertiesPanel.providersChanged"],(function(){var e=i._current,t=e&&e.element;t&&i.update(t)})),n.on("diagram.destroy",(function(){i.detach()})),this._container=wE('<div class="bpp-properties-panel" input-handle-modified-keys="z,y"></div>'),this._bindListeners(this._container),e&&e.parent&&this.attachTo(e.parent)},$E.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=EE(e));var t=this._container;e.appendChild(t),this._emit("attach")},$E.prototype.detach=function(){var e=this._container,t=e.parentNode;t&&(this._emit("detach"),t.removeChild(e))},$E.prototype.activateTab=function(e){Gy(e)&&(e=e.id);var t=SE(".bpp-properties-tab",this._current.panel),n=SE(".bpp-properties-tab-link",this._current.panel);Qy(t,(function(e){PE(e).remove("bpp-active")})),Qy(n,(function(e){PE(e).remove("bpp-active")}));var i=fw(t,(function(e){return!PE(e).has(BE)})),r=lE(i,(function(t,n){return RE(n,"data-tab")===e?n:t}),i[0]);r&&PE(r).add("bpp-active");var o=fw(n,(function(e){return!PE(e).has(BE)})),a=lE(o,(function(t,n){return RE(EE("a[data-tab-target]",n),"data-tab-target")===e?n:t}),o[0]);a&&PE(a).add("bpp-active")},$E.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"propertiesPanel.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},$E.prototype._getTabs=function(e){var t=this._getProviders();return lE(t,(function(t,n){var i=n.getTabs(e);return Wy(i)?i(t):i}),[])},$E.prototype.update=function(e){e||(e=this._canvas.getRootElement());var t,n,i=this._getTabs(e);this._current&&(n=EE(".bpp-properties-tab.bpp-active",this._current.panel))&&(t=RE(n,"data-tab")),this._current&&this._current.element===e&&!this._entriesChanged(this._current.entries,FE(i))||(this._current&&CE(this._current.panel),this._current=this._create(e,i)),this._updateActivation(this._current),t?this.activateTab(t):this.activateTab(this._current.tabs[0]),this._emit("changed")},$E.prototype._entriesChanged=function(e,t){var n=Uy(e),i=Uy(t);return!vw(Vw(n,i))},$E.prototype._emit=function(e){this._eventBus.fire("propertiesPanel."+e,{panel:this,current:this._current})},$E.prototype._bindListeners=function(e){var t=this,n=function(e){var n,i,r=e.delegateTarget,o=TE(r,"[data-entry]");if(o){n=RE(o,"data-entry"),i=t.getEntry(n);var a=IE(o);if("change"===e.type){var s=RE(r,"data-on-change");if(s)if(!t.executeAction(i,o,s,e))return t.update(t._current.element)}t.applyChanges(i,a,o),t.updateState(i,o)}};AE.bind(e,"input, textarea, [contenteditable]","input",tE(n,300)),AE.bind(e,"input, textarea, select, [contenteditable]","change",n),AE.bind(e,"[contenteditable]","paste",(function(e){var t=(e.clipboardData||window.clipboardData).getData("text");n=t,t=n.replace(/\r\n|\r|\n/g,"\n"),document.execCommand("insertText",!1,t),e.preventDefault();var n})),AE.bind(e,"select","keydown",(function(e){46===e.keyCode&&(e.stopPropagation(),e.preventDefault())})),AE.bind(e,"[data-auto-suggest]","input",(function(e){var n=e.delegateTarget,i=TE(n,"[data-entry]");if(i){var r=RE(n,"data-auto-suggest"),o=RE(i,"data-entry"),a=t.getEntry(o);t.executeAction(a,i,r,e)}}),!0),AE.bind(e,"[data-action]","click",(function(e){var n=e.delegateTarget,i=TE(n,"[data-entry]"),r=RE(n,"data-action"),o=RE(i,"data-entry"),a=t.getEntry(o);if(!t.executeAction(a,i,r,e))return t.update(t._current.element);var s=IE(i);t.applyChanges(a,s,i),t.updateState(a,i)})),AE.bind(e,"[data-blur]","blur",(function(e,n){var i=e.delegateTarget,r=TE(i,"[data-entry]");if(r){var o=RE(i,"data-blur"),a=RE(r,"data-entry"),s=t.getEntry(a);if(t.executeAction(s,r,o,e)){var c=IE(r);t.applyChanges(s,c,r)}t.updateState(s,r)}}),!0),AE.bind(e,".bpp-properties-tabs-links [data-tab-target]","click",(function(e){e.preventDefault();var n=e.delegateTarget,i=RE(n,"data-tab-target");t.activateTab(i)}))},$E.prototype.updateState=function(e,t){this.updateShow(e,t),this.updateDisable(e,t)},$E.prototype.updateShow=function(e,t){var n=this._current;if(n){var i=SE("[data-show]",t)||[];Qy(i,(function(i){var r=RE(i,"data-show"),o=d_(e,r);if(o){var a=TE(i,"[data-scope]")||t;o(n.element,t,i,a)||!1?PE(i).remove(BE):PE(i).add(BE)}}))}},$E.prototype.updateDisable=function(e,t){var n=this._current;if(n){var i=SE("[data-disable]",t)||[];Qy(i,(function(i){var r=RE(i,"data-disable"),o=d_(e,r);if(o){var a=TE(i,"[data-scope]")||t,s=o(n.element,t,i,a)||!1;RE(i,"disabled",s?"":null)}}))}},$E.prototype.executeAction=function(e,t,n,i){var r=this._current;if(r){var o=d_(e,n);if(o){var a=TE(i.target,"[data-scope]")||t;return o.apply(e,[r.element,t,i,a])}}},$E.prototype.applyChanges=function(e,t,n){var i=this._current.element;if(!function(e,t){return Sy(e)?e.length===t.length&&e.every((function(e,n){return zE(e,t[n])})):zE(e,t)}(t,e.oldValues)){var r,o=e.set(i,t,n);Sy(o)?o.length&&(r={cmd:"properties-panel.multi-command-executor",context:nE(o)}):r=o,r?this._commandStack.execute(r.cmd,r.context||{element:i}):this.update(i)}},$E.prototype.applyValidationErrors=function(e,t){var n=!0,i=NE(t,!0);return Qy(i,(function(t){var i=RE(t,"name")||RE(t,"data-name"),r=e&&e[i],o=EE(".bpp-error-message",t.parentNode);r?(n=!1,o||(o=wE("<div></div>"),PE(o).add("bpp-error-message"),t.parentNode.insertBefore(o,t.nextSibling)),o.textContent=r,PE(t).add("invalid")):(PE(t).remove("invalid"),o&&t.parentNode.removeChild(o))})),n},$E.prototype.validate=function(e,t,n){var i=this._current,r=!0;if(n=n||EE('[data-entry="'+e.id+'"]',i.panel),t instanceof Array)for(var o=EE("[data-list-entry-container]",n).children||[],a=0;a<t.length;a++){var s=t[a];if(e.validateListItem){var c=e.validateListItem(i.element,s,n,a),p=o[a];r=this.applyValidationErrors(c,p)&&r}}else e.validate&&(this.validationErrors=e.validate(i.element,t,n),r=this.applyValidationErrors(this.validationErrors,n)&&r);return r},$E.prototype.getEntry=function(e){return this._current&&this._current.entries[e]},$E.prototype._create=function(e,t){if(!e)return null;var n=this._container,i=this._createPanel(e,t);n.appendChild(i);var r=FE(t);return{tabs:t,groups:function(e){return aE(nE(cE(e,"groups")),"id")}(t),entries:r,element:e,panel:i}},$E.prototype._bindTemplate=function(e,t,n,i,r){var o=this._eventBus;var a=function(e){var t="input[name], textarea[name], [data-value], [contenteditable]",n=SE(t,e);return n&&n.length||!kE(e,t)||(n=[e]),n}(i);Qy(a,(function(a){var s,c,p;"value"in a||"true"===OE(a)?(s=RE(a,"name")||RE(a,"data-name"),c=n[s],(p=function(t,n){return o.fire("propertiesPanel.isPropertyEditable",{entry:t,propertyName:n,element:e})}(t,s))&&t.editable&&(p=t.editable(e,i,a,s,c,r)),RE(a,"readonly",p?null:""),RE(a,"disabled",p?null:""),t.setControlValue?t.setControlValue(e,i,a,s,c,r):jE(a)?function(e,t){var n=e.value;e.checked=t===n||!RE(e,"value")&&t}(a,c):function(e){return"select-one"===e.type}(a)?function(e,t){void 0!==t&&(e.value=t)}(a,c):function(e,t){var n,i=OE(e),r=i?e.innerText:e.value;void 0===t&&(t="");if(r===t)return;document.activeElement===e&&(n=dE(function(e){return OE(e)?function(e){var t=window.getSelection(),n=t.focusNode,i=t.focusOffset,r=t.anchorOffset;if(!n)throw new Error("not selected");if(!e.contains(n))throw new Error("not selected");return{start:Math.min(i,r),end:Math.max(i,r)}}(e):{start:e.selectionStart,end:e.selectionEnd}}(e),r,t));i?e.innerText=t:e.value=t;n&&function(e,t){OE(e)?function(e,t){var n,i,r;n=e.firstChild||e,(i=document.createRange()).setStart(n,t.start),i.setEnd(n,t.end),(r=window.getSelection()).removeAllRanges(),r.addRange(i)}(e,t):(e.selectionStart=t.start,e.selectionEnd=t.end)}(e,n)}(a,c)):(s=RE(a,"data-value"),c=n[s],t.setControlValue?t.setControlValue(e,i,a,s,c,r):function(e,t){e.textContent=t}(a,c))}))},$E.prototype._updateActivation=function(e){var t=this,n=this._eventBus,i=e.element;function r(e,t){PE(e).toggle(BE,!t)}function o(e,t,n){var i=EE(t,e);i&&(i.textContent=n)}var a=e.panel;Qy(e.tabs,(function(e){var s=EE("[data-tab="+e.id+"]",a),c=EE("[data-tab-target="+e.id+"]",a).parentNode,p=!1;Qy(e.groups,(function(a){var c=!1,u=EE("[data-group="+a.id+"]",s);Qy(a.entries,(function(o){var s=EE('[data-entry="'+o.id+'"]',u),p=function(e,t,r){return n.fire("propertiesPanel.isEntryVisible",{element:i,entry:e,group:t,tab:r})}(o,a,e);c=c||p,r(s,p);var l="get"in o?o.get(i,s):{};if(l instanceof Array){for(var d=EE("[data-list-entry-container]",s),h=d.children||[],f=0;f<l.length;f++){var m=l[f],v=h[f];v||(v=wE(o.createListEntryTemplate(m,f,d)),d.appendChild(v)),RE(v,"data-index",f),t._bindTemplate(i,o,m,v,f)}for(var g=h.length-l.length,y=0;y<g;y++)d.removeChild(d.lastChild)}else t._bindTemplate(i,o,l,s);t.updateState(o,s),t.validate(o,l,s),o.oldValues=IE(s)})),"function"==typeof a.label&&o(u,".group-label",a.label(i,u)),c=c&&function(e,t,n){return!Wy(e.enabled)||e.enabled(t,n)}(a,i,u),p=p||c,r(u,c)})),p=p&&function(e,t){return!Wy(e.enabled)||e.enabled(t)}(e,i),r(s,p),r(c,p)})),o(a,"[data-label-id]",DE(i).id||"")},$E.prototype._createPanel=function(e,t){var n=this,i=wE('<div class="bpp-properties"></div>'),r=wE('<div class="bpp-properties-header"><div class="label" data-label-id></div></div>'),o=wE('<div class="bpp-properties-tab-bar"></div>'),a=wE('<ul class="bpp-properties-tabs-links"></ul>'),s=wE('<div class="bpp-properties-tabs-container"></div>');return i.appendChild(r),Qy(t,(function(e,t){if(!e.id)throw new Error("tab must have an id");var i=wE('<div class="bpp-properties-tab" data-tab="'+_E(e.id)+'"></div>'),r=wE('<li class="bpp-properties-tab-link"><a href data-tab-target="'+_E(e.id)+'">'+_E(e.label)+"</a></li>"),o=e.groups;Qy(o,(function(e){if(!e.id)throw new Error("group must have an id");var t=wE('<div class="bpp-properties-group" data-group="'+_E(e.id)+'"><span class="group-toggle"></span><div class="group-header"><span class="group-label">'+_E(e.label)+"</span></div></div>");e.dropdown&&EE(".group-header",t).appendChild(xE(e.dropdown)),t.querySelector(".group-toggle").addEventListener("click",(function(e){PE(t).toggle("group-closed"),e.preventDefault(),e.stopPropagation()})),t.addEventListener("click",(function(e){!e.defaultPrevented&&PE(t).has("group-closed")&&PE(t).remove("group-closed")})),Qy(e.entries,(function(e){if(!e.id)throw new Error("entry must have an id");var i=e.html;"string"==typeof i&&(i=wE(i)),i.get&&i.constructor.prototype.jquery&&(i=i.get(0));var r=wE('<div class="bpp-properties-entry" data-entry="'+_E(e.id)+'"></div>');Qy(e.cssClasses||[],(function(e){PE(r).add(e)})),r.appendChild(i),t.appendChild(r),n.updateState(e,r)})),i.appendChild(t)})),a.appendChild(r),s.appendChild(i)})),o.appendChild(a),i.appendChild(o),i.appendChild(s),i};var GE={__depends__:[H_,t(fo).default],__init__:["propertiesPanel"],propertiesPanel:["type",VE]};function WE(e,t){var n=this;t=t||1e3,e.on("propertiesPanel.isEntryVisible",t,(function(e){var t=e.element,i=e.entry,r=e.group,o=e.tab;return n.isEntryVisible(t,i,r,o)})),e.on("propertiesPanel.isPropertyEditable",t,(function(e){var t=e.element,i=e.entry,r=e.group,o=e.propertyName,a=e.tab;return n.isPropertyEditable(o,t,i,r,a)}))}WE.$inject=["eventBus"];var qE=WE;WE.prototype.isEntryVisible=function(e,t,n,i){return!0},WE.prototype.isPropertyEditable=function(e,t,n,i,r){return!0};var UE=G_.domify,YE=G_.classes,KE=G_.event,XE=dw.escapeHTML,ZE=function(e,t,n){for(var i,r,o,a=n&&n.show,s=[],c=/(?:\[([^\]]+)\]\((https?:\/\/[^)]+)\))|(?:<a href="(https?:\/\/[^"]+)">(.+?(?=<\/))<\/a>)/gi,p=0;i=c.exec(t);)i.index>p&&s.push(QE(t.substring(p,i.index))),r=i[2]&&encodeURI(i[2])||i[3],o=i[1]||i[4],s.push('<a href="'+r+'" target="_blank">'+QE(o)+"</a>"),p=i.index+i[0].length;p<t.length&&s.push(QE(t.substring(p))),t=s.join("");var u=UE('<div class="bpp-field-description description description--expanded"'+(a?'data-show="'+a+'">':">")+"</div>"),l=UE('<span class="description__text">'+t+"</span>");function d(n){n?(YE(u).add("description--expanded"),l.textContent=t+" ",f.textContent=e("Less")):(YE(u).remove("description--expanded"),l.textContent=h+" ... ",f.textContent=e("More"))}u.appendChild(l);var h,f,m=!1;return t.length>200&&(h=t.slice(0,200),f=UE('<span class="bpp-entry-link description__expand">'+e("More")+"</span>"),KE.bind(f,"click",(function(){d(m=!m)})),u.appendChild(f),d(m)),u};function QE(e){for(var t,n=0,i=[],r=/<br\s*\/?>/gi;t=r.exec(e);)t.index>n&&i.push(XE(e.substring(n,t.index))),i.push("<br />"),n=t.index+t[0].length;return n<e.length&&i.push(XE(e.substring(n))),i.join("")}var JE=dw.escapeHTML,eS=G_.domify,tS=G_.query,nS=function(e,t,n){var i=n,r=t.label||i.id,o=t.dataValueLabel,a=t.buttonLabel||"X",s=void 0!==t.buttonAction?t.buttonAction.name:"clear",c=void 0!==t.buttonAction?t.buttonAction.method:function(e,n){return tS('input[name="'+t.modelProperty+'"]',n).value="",!0},p=void 0!==t.buttonShow?t.buttonShow.name:"canClear",u=void 0!==t.buttonShow?t.buttonShow.method:function(e,n){return""!==tS('input[name="'+t.modelProperty+'"]',n).value},l=!!t.disabled&&"function"==typeof t.disabled,d=!!t.hidden&&"function"==typeof t.hidden,h=t.description;return i.html=eS('<label for="camunda-'+JE(i.id)+'" '+(l?'data-disable="isDisabled" ':"")+(d?'data-show="isHidden" ':"")+(o?'data-value="'+JE(o)+'"':"")+">"+JE(r)+'</label><div class="bpp-field-wrapper" '+(l?'data-disable="isDisabled"':"")+(d?'data-show="isHidden"':"")+'><input id="camunda-'+JE(i.id)+'" type="text" name="'+JE(t.modelProperty)+'" '+(l?'data-disable="isDisabled"':"")+(d?'data-show="isHidden"':"")+' /><button class="action-button '+JE(s)+'" data-action="'+JE(s)+'" data-show="'+JE(p)+'" '+(l?'data-disable="isDisabled"':"")+(d?' data-show="isHidden"':"")+"><span>"+JE(a)+"</span></button></div>"),h&&i.html.appendChild(ZE(e,h,{show:d&&"isHidden"})),i[s]=c,i[p]=u,l&&(i.isDisabled=function(){return t.disabled.apply(i,arguments)}),d&&(i.isHidden=function(){return!t.hidden.apply(i,arguments)}),i.cssClasses=["bpp-textfield"],i},iS={},rS=iS;iS.updateProperties=function(e,t){return{cmd:"element.updateProperties",context:{element:e,properties:t}}},iS.updateBusinessObject=function(e,t,n){return{cmd:"properties-panel.update-businessobject",context:{element:e,businessObject:t,properties:n}}},iS.addElementsTolist=function(e,t,n,i,r){return{cmd:"properties-panel.update-businessobject-list",context:{element:e,currentObject:t,propertyName:n,objectsToPrepend:r,objectsToAdd:i}}},iS.removeElementsFromList=function(e,t,n,i,r){return{cmd:"properties-panel.update-businessobject-list",context:{element:e,currentObject:t,propertyName:n,referencePropertyName:i,objectsToRemove:r}}},iS.addAndRemoveElementsFromList=function(e,t,n,i,r,o){return{cmd:"properties-panel.update-businessobject-list",context:{element:e,currentObject:t,propertyName:n,referencePropertyName:i,objectsToAdd:r,objectsToRemove:o}}},iS.setList=function(e,t,n,i){return{cmd:"properties-panel.update-businessobject-list",context:{element:e,currentObject:t,propertyName:n,updatedObjectList:i}}};var oS=G_.domify,aS=E_.getBusinessObject,sS=dw.escapeHTML,cS=function(e,t,n){var i=n,r=i.id,o=t.label||r,a=!!t.disabled&&"function"==typeof t.disabled,s=!!t.hidden&&"function"==typeof t.hidden,c=t.description;return i.html=oS('<input id="camunda-'+sS(r)+'" type="checkbox" name="'+sS(t.modelProperty)+'" '+(a?'data-disable="isDisabled"':"")+(s?'data-show="isHidden"':"")+' /><label for="camunda-'+sS(r)+'" '+(a?'data-disable="isDisabled"':"")+(s?'data-show="isHidden"':"")+">"+sS(o)+"</label>"),c&&i.html.appendChild(ZE(e,c,{show:s&&"isHidden"})),i.get=function(e){var n=aS(e),i={};return i[t.modelProperty]=n.get(t.modelProperty),i},i.set=function(e,n){var i={};return i[t.modelProperty]=!!n[t.modelProperty],rS.updateProperties(e,i)},"function"==typeof t.set&&(i.set=t.set),"function"==typeof t.get&&(i.get=t.get),a&&(i.isDisabled=function(){return t.disabled.apply(i,arguments)}),s&&(i.isHidden=function(){return!t.hidden.apply(i,arguments)}),i.cssClasses=["bpp-checkbox"],i},pS=dw.escapeHTML,uS=G_.domify,lS=G_.query,dS=function(e,t,n){var i=n,r=t.label||i.id,o=t.selectOptions||[{name:"",value:""}],a=t.modelProperty,s=t.emptyParameter,c=!!t.disabled&&"function"==typeof t.disabled,p=!!t.hidden&&"function"==typeof t.hidden,u=t.description;s&&(o=o.concat([{name:"",value:""}])),i.html=uS('<label for="camunda-'+pS(i.id)+'"'+(c?'data-disable="isDisabled" ':"")+(p?'data-show="isHidden" ':"")+">"+pS(r)+'</label><select id="camunda-'+pS(i.id)+'-select" name="'+pS(a)+'"'+(c?'data-disable="isDisabled" ':"")+(p?'data-show="isHidden" ':"")+" data-value></select>");var l=lS("select",i.html);return function(e){return!(!e||"[object Array]"!==Object.prototype.toString.call(e))}(o)&&Qy(o,(function(e){l.appendChild(uS('<option value="'+pS(e.value)+(e.title?'" title="'+pS(e.title):"")+'">'+(e.name?pS(e.name):"")+"</option>"))})),u&&"function"!=typeof t.showCustomInput&&i.html.appendChild(ZE(e,u,{show:p&&"isHidden"})),i.setControlValue=function(e,t,n,i,r){if("function"==typeof o){var a=o(e,n);if(a){for(;n.firstChild;)n.removeChild(n.firstChild);Qy(a,(function(e){var t=uS(function(e){return'<option value="'+e.value+'">'+e.name+"</option>"}(e));n.appendChild(t)}))}}void 0!==r&&(n.value=r)},c&&(i.isDisabled=function(){return t.disabled.apply(i,arguments)}),p&&(i.isHidden=function(){return!t.hidden.apply(i,arguments)}),i.cssClasses=["bpp-dropdown"],i},hS=Object.prototype.hasOwnProperty;var fS=function(e,t,n){var i=e[t];hS.call(e,t)&&nb(i,n)&&(void 0!==n||t in e)||iE(e,t,n)};var mS=function(e,t,n,i){var r=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],c=i?i(n[s],e[s],s,n,e):void 0;void 0===c&&(c=e[s]),r?iE(n,s,c):fS(n,s,c)}return n};var vS=function(e,t,n){if(!Gy(n))return!1;var i=typeof t;return!!("number"==i?qy(n)&&Ry(t,n.length):"string"==i&&t in n)&&nb(n[t],e)};var gS=function(e){return Pw((function(t,n){var i=-1,r=n.length,o=r>1?n[r-1]:void 0,a=r>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(r--,o):void 0,a&&vS(n[0],n[1],a)&&(o=r<3?void 0:o,r=1),t=Object(t);++i<r;){var s=n[i];s&&e(t,s,i,o)}return t}))},yS=Object.prototype.hasOwnProperty,bS=gS((function(e,t){if(zy(t)||qy(t))mS(t,Uy(t),e);else for(var n in t)yS.call(t,n)&&fS(e,n,t[n])}));var xS=function(e){return function(t,n,i){var r=Object(t);if(!qy(t)){var o=x_(n);t=Uy(t),n=function(e){return o(r[e],e,r)}}var a=e(t,n,i);return a>-1?r[o?t[a]:a]:void 0}},_S=1/0;var wS=function(e){return e?(e=Qw(e))===_S||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var ES=function(e){var t=wS(e),n=t%1;return t==t?n?t-n:t:0},SS=Math.max;var CS=xS((function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ES(n);return r<0&&(r=SS(i+r,0)),Tw(e,x_(t),r)})),PS=G_.domify,TS=G_.query,RS=dw.escapeHTML,AS=function(e,t){var n=t.selectOptions,i=t.modelProperty,r=t.customValue||"custom",o=t.customName||"custom "+i,a=t.description,s=bS({},t);s.showCustomInput=function(e,n){var i=TS('[data-entry="'+t.id+'"] select',n.parentNode);return!!i&&i.value===r},s.get=function(e,o){var a=t.get(e,o),s={};return function(e){return void 0!==e[i]&&!CS(n,(function(t){return e[i]===t.value}))}(a)?(s[i]=r,s["custom-"+i]=a[i],s):(s[i]=a[i]||"",s)},s.set=function(e,n,o){var a={};return n[i]===r?a[i]=n["custom-"+i]||"":t.emptyParameter&&""===n[i]?a[i]=void 0:a[i]=n[i],t.set(e,a,o)},s.selectOptions.push({name:o,value:r});var c=bS({},dS(e,s,s)),p=document.createDocumentFragment();return p.appendChild(c.html),c.html=p,c.html.appendChild(PS('<div class="bpp-field-wrapper bpp-combo-input" data-show="showCustomInput"><input id="camunda-'+RS(t.id)+'-input" type="text" name="custom-'+RS(i)+'" /></div>')),a&&c.html.appendChild(ZE(e,a,{show:"showCustomInput"})),c},kS=G_.domify,MS=dw.escapeHTML,DS=function(e,t,n){var i=n,r=t.label||i.id,o=!!t.show&&"function"==typeof t.show,a=t.description;return i.html=kS('<label for="camunda-'+MS(i.id)+'" '+(o?'data-show="isShown"':"")+">"+r+'</label><div class="bpp-field-wrapper" '+(o?'data-show="isShown"':"")+'><div contenteditable="true" id="camunda-'+MS(i.id)+'" name="'+MS(t.modelProperty)+'" /></div>'),a&&i.html.appendChild(ZE(e,a,{show:o&&"isShown"})),o&&(i.isShown=function(){return t.show.apply(i,arguments)}),i.cssClasses=["bpp-textbox"],i},BS=function(e,t,n){var i=t.modelProperty;n.get=function(e,n){var r=this.__lastInvalidValue;delete this.__lastInvalidValue;var o={};return o[i]=void 0!==r?r:t.getProperty(e,n),o},n.set=function(e,n,o){var a=r.apply(this,[e,n,o]),s=n[i];if(a&&a[i])return this.__lastInvalidValue=s,t.setProperty(e,{},o);var c={};return c[i]=s,t.setProperty(e,c,o)};var r=n.validate=function(e,n,r){var o=n[i]||this.__lastInvalidValue,a={};return a[i]=o,t.validate(e,a,r)};return nS(e,t,n)},jS=dw.escapeHTML,OS=G_.query,NS=G_.attr,LS=G_.closest,IS=G_.domify,zS='<div class="bpp-field-wrapper bpp-table-row">';function FS(e,t){var n=zS;return n+=function(e,t){var n=e.length,i="";return Qy(e,(function(e,r){i+='<input class="bpp-table-row-columns-'+n+" "+(t?"bpp-table-row-removable":"")+'" id="camunda-table-row-cell-input-value-'+r+'"type="text" name="'+jS(e)+'" />'})),i}(e,t),n+=t?'<button class="action-button clear" data-action="deleteElement"><span>X</span></button>':"",n+="</div>"}function $S(e){var t=zS;return t+=function(e){var t=e.length,n="";return Qy(e,(function(e){n+='<label class="bpp-table-row-columns-'+t+'">'+jS(e)+"</label>"})),n}(e),t+="</div>"}function VS(e,t,n,i,r){return fw(n,(function(n,o){return!function(e,t,n,i,r,o){if(n&&!i)return!1;return Uy(n).concat(Uy(i)).every((function(a){var s=n[a]||void 0,c=i[a]||void 0;return!r(e,t,a,o)||s===c}))}(e,t,n,i[o],r,o)}))}function HS(e){return LS(e,"[data-entry]",!0)}function GS(e){return OS("div[data-list-entry-container]",e)}var WS=function(e,t){var n=t.id,i=t.modelProperties,r=t.labels,o=t.description,a=$S(r),s=t.getElements,c=t.removeElement,p="function"==typeof c,u=t.addElement,l="function"==typeof u,d=t.addLabel||"Add Value",h=t.updateElement,f="function"==typeof h,m=t.editable||function(){return!0},v=t.setControlValue,g=t.show,y="function"==typeof g,b=function(e,t){return function(e,t){return(e||[]).map((function(e){var n={};return Qy(t,(function(t){n[t]=e[t]||""})),n}))}(s(e,t),i)},x=IS((l?'<div class="bpp-table-add-row" '+(y?'data-show="show"':"")+"><label>"+jS(d)+'</label><button class="action-button add" data-action="addElement"><span>+</span></button></div>':"")+'<div class="bpp-table" data-show="showTable"><div class="bpp-field-wrapper bpp-table-row">'+a+"</div><div data-list-entry-container></div></div>");o&&x.appendChild(ZE(e,o,{show:"showTable"}));var _={id:n,html:x,get:function(e,t){var n=b(e,t,this.__invalidValues),r=this.__invalidValues;return delete this.__invalidValues,Qy(r,(function(e,t){var r=n[t];Qy(i,(function(t){r[t]=e[t]}))})),n},set:function(e,n,i){var r=this.__action||{};if(delete this.__action,"delete-element"===r.id)return c(e,i,r.idx);if("add-element"===r.id)return u(e,i);if(f){var o=[],a=n;"function"!=typeof t.validate&&(a=VS(e,i,n,b(e,i),m));var s=this;return Qy(a,(function(r){var a,c=n.indexOf(r);if("function"==typeof t.validate&&(a=t.validate(e,r,i,c)),a)s.__invalidValues=s.__invalidValues||{},s.__invalidValues[c]=r,o.push(rS.updateProperties(e,{}));else{var p=h(e,r,i,c);p&&o.push(p)}})),o}},createListEntryTemplate:function(e,t,n){return FS(i,p)},addElement:function(e,t,n,r){var o=IS(FS(i,p));return GS(t).appendChild(o),this.__action={id:"add-element"},!0},deleteElement:function(e,t,n,i){var r=GS(t),o=n.delegateTarget.parentNode,a=parseInt(NS(o,"data-index"),10);return r.removeChild(o),this.__action={id:"delete-element",idx:a},!0},editable:function(e,t,n,i,r,o){var a=LS(t,"[data-entry]");return m(e,a,i,o)},show:function(e,t,n,i){return t=HS(t),g(e,t,n,i)},showTable:function(e,t,n,i){t=HS(t);var r=b(e,t);return r&&r.length&&(!y||g(e,t,n,i))},validateListItem:function(e,n,i,r){if("function"==typeof t.validate)return t.validate(e,n,i,r)}};return v&&(_.setControlValue=function(e,t,n,i,r,o){var a,s=HS(t),c=NS(n,"readonly"),p=n.value;void 0===r&&(r=""),c&&p===r||(document.activeElement===n&&(a=dE(function(e){return{start:e.selectionStart,end:e.selectionEnd}}(n),p,r)),v(e,s,n,i,r,o),a&&function(e,t){e.selectionStart=t.start,e.selectionEnd=t.end}(n,a))}),_},qS=function(e){return{id:e.id,html:'<label data-value="label" data-show="showLabel" class="entry-label'+(e.divider?" divider":"")+'"></label>',get:function(t,n){return"function"==typeof e.get?e.get(t,n):{label:e.labelText}},showLabel:function(t,n){return"function"!=typeof e.showLabel||e.showLabel(t,n)}}},US=Cx&&new Cx,YS=US?function(e,t){return US.set(e,t),e}:Xy;var KS=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=eb(e.prototype),i=e.apply(n,t);return Gy(i)?i:n}};var XS=function(e,t,n){var i=1&t,r=KS(e);return function t(){var o=this&&this!==sy&&this instanceof t?r:e;return o.apply(i?n:this,arguments)}},ZS=Math.max;var QS=function(e,t,n,i){for(var r=-1,o=e.length,a=n.length,s=-1,c=t.length,p=ZS(o-a,0),u=Array(c+p),l=!i;++s<c;)u[s]=t[s];for(;++r<a;)(l||r<o)&&(u[n[r]]=e[r]);for(;p--;)u[s++]=e[r++];return u},JS=Math.max;var eC=function(e,t,n,i){for(var r=-1,o=e.length,a=-1,s=n.length,c=-1,p=t.length,u=JS(o-s,0),l=Array(u+p),d=!i;++r<u;)l[r]=e[r];for(var h=r;++c<p;)l[h+c]=t[c];for(;++a<s;)(d||r<o)&&(l[h+n[a]]=e[r++]);return l};var tC=function(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i};var nC=function(){};function iC(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}iC.prototype=eb(nC.prototype),iC.prototype.constructor=iC;var rC=iC,oC=US?function(e){return US.get(e)}:Lw,aC={},sC=Object.prototype.hasOwnProperty;var cC=function(e){for(var t=e.name+"",n=aC[t],i=sC.call(aC,t)?n.length:0;i--;){var r=n[i],o=r.func;if(null==o||o==e)return r.name}return t};function pC(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}pC.prototype=eb(nC.prototype),pC.prototype.constructor=pC;var uC=pC;var lC=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t};var dC=function(e){if(e instanceof rC)return e.clone();var t=new uC(e.__wrapped__,e.__chain__);return t.__actions__=lC(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t},hC=Object.prototype.hasOwnProperty;function fC(e){if(yy(e)&&!Sy(e)&&!(e instanceof rC)){if(e instanceof uC)return e;if(hC.call(e,"__wrapped__"))return dC(e)}return new uC(e)}fC.prototype=nC.prototype,fC.prototype.constructor=fC;var mC=fC;var vC=function(e){var t=cC(e),n=mC[t];if("function"!=typeof n||!(t in rC.prototype))return!1;if(e===n)return!0;var i=oC(n);return!!i&&e===i[0]},gC=Sw(YS),yC=/\{\n\/\* \[wrapped with (.+)\] \*/,bC=/,? & /;var xC=function(e){var t=e.match(yC);return t?t[1].split(bC):[]},_C=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;var wC=function(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(_C,"{\n/* [wrapped with "+t+"] */\n")},EC=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];var SC=function(e,t){return ny(EC,(function(n){var i="_."+n[0];t&n[1]&&!Mw(e,i)&&e.push(i)})),e.sort()};var CC=function(e,t,n){var i=t+"";return Cw(e,wC(i,SC(xC(i),n)))};var PC=function(e,t,n,i,r,o,a,s,c,p){var u=8&t;t|=u?32:64,4&(t&=~(u?64:32))||(t&=-4);var l=[e,t,r,u?o:void 0,u?a:void 0,u?void 0:o,u?void 0:a,s,c,p],d=n.apply(void 0,l);return vC(e)&&gC(d,l),d.placeholder=i,CC(d,e,t)};var TC=function(e){return e.placeholder},RC=Math.min;var AC=function(e,t){for(var n=e.length,i=RC(t.length,n),r=lC(e);i--;){var o=t[i];e[i]=Ry(o,n)?r[o]:void 0}return e},kC="__lodash_placeholder__";var MC=function(e,t){for(var n=-1,i=e.length,r=0,o=[];++n<i;){var a=e[n];a!==t&&a!==kC||(e[n]=kC,o[r++]=n)}return o};var DC=function e(t,n,i,r,o,a,s,c,p,u){var l=128&n,d=1&n,h=2&n,f=24&n,m=512&n,v=h?void 0:KS(t);return function g(){for(var y=arguments.length,b=Array(y),x=y;x--;)b[x]=arguments[x];if(f)var _=TC(g),w=tC(b,_);if(r&&(b=QS(b,r,o,f)),a&&(b=eC(b,a,s,f)),y-=w,f&&y<u){var E=MC(b,_);return PC(t,n,e,g.placeholder,i,b,E,c,p,u-y)}var S=d?i:this,C=h?S[t]:t;return y=b.length,c?b=AC(b,c):m&&y>1&&b.reverse(),l&&p<y&&(b.length=p),this&&this!==sy&&this instanceof g&&(C=v||KS(C)),C.apply(S,b)}};var BC=function(e,t,n){var i=KS(e);return function r(){for(var o=arguments.length,a=Array(o),s=o,c=TC(r);s--;)a[s]=arguments[s];var p=o<3&&a[0]!==c&&a[o-1]!==c?[]:MC(a,c);if((o-=p.length)<n)return PC(e,t,DC,r.placeholder,void 0,a,p,void 0,void 0,n-o);var u=this&&this!==sy&&this instanceof r?i:e;return gw(u,this,a)}};var jC=function(e,t,n,i){var r=1&t,o=KS(e);return function t(){for(var a=-1,s=arguments.length,c=-1,p=i.length,u=Array(p+s),l=this&&this!==sy&&this instanceof t?o:e;++c<p;)u[c]=i[c];for(;s--;)u[c++]=arguments[++a];return gw(l,r?n:this,u)}},OC="__lodash_placeholder__",NC=128,LC=Math.min;var IC=function(e,t){var n=e[1],i=t[1],r=n|i,o=r<131,a=i==NC&&8==n||i==NC&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&i&&(e[2]=t[2],r|=1&n?0:4);var s=t[3];if(s){var c=e[3];e[3]=c?QS(c,s,t[4]):s,e[4]=c?MC(e[3],OC):t[4]}return(s=t[5])&&(c=e[5],e[5]=c?eC(c,s,t[6]):s,e[6]=c?MC(e[5],OC):t[6]),(s=t[7])&&(e[7]=s),i&NC&&(e[8]=null==e[8]?t[8]:LC(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r,e},zC=Math.max;var FC=function(e,t,n,i,r,o,a,s){var c=2&t;if(!c&&"function"!=typeof e)throw new TypeError("Expected a function");var p=i?i.length:0;if(p||(t&=-97,i=r=void 0),a=void 0===a?a:zC(ES(a),0),s=void 0===s?s:ES(s),p-=r?r.length:0,64&t){var u=i,l=r;i=r=void 0}var d=c?void 0:oC(e),h=[e,t,n,i,r,u,l,o,a,s];if(d&&IC(h,d),e=h[0],t=h[1],n=h[2],i=h[3],r=h[4],!(s=h[9]=void 0===h[9]?c?0:e.length:zC(h[9]-p,0))&&24&t&&(t&=-25),t&&1!=t)f=8==t||16==t?BC(e,t,s):32!=t&&33!=t||r.length?DC.apply(void 0,h):jC(e,t,n,i);else var f=XS(e,t,n);return CC((d?YS:gC)(f,h),e,t)},$C=Pw((function(e,t,n){var i=1;if(n.length){var r=MC(n,TC($C));i|=32}return FC(e,i,t,n,r)}));$C.placeholder={};var VC=$C,HC=G_.domify,GC=dw.escapeHTML;var WC=function(e,t){var n=t.id,i=t.buttonLabel||n,r=t.showLink,o=t.handleClick,a=t.description,s=t.label;if(r&&"function"!=typeof r)throw new Error("options.showLink must be a function");if("function"!=typeof o)throw new Error("options.handleClick must be a function");var c={id:n,html:document.createDocumentFragment()};return s&&c.html.appendChild(HC('<label for="camunda-'+GC(n)+'" '+(r?'data-show="showLink" ':"")+">"+GC(s)+"</label>")),c.html.appendChild(HC('<div class="bpp-field-wrapper"><a data-action="handleClick" '+(r?'data-show="showLink" ':"")+'class="bpp-entry-link'+(t.cssClasses?" "+GC(t.cssClasses):"")+'">'+GC(i)+"</a></div>")),a&&c.html.appendChild(ZE(e,a,{show:"showLink"})),c.handleClick=VC(o,c),"function"==typeof r&&(c.showLink=function(){return r.apply(c,arguments)}),c},qC=t(U),UC=G_.classes,YC=G_.domify,KC=G_.query,XC=qC.assign,ZC=qC.find,QC=qC.forEach,JC=qC.debounce,eP=dw.escapeHTML,tP="active",nP="#text",iP=function(){},rP=function(e,t,n){var i=n,r=t.label||i.id,o=!!t.show&&"function"==typeof t.show,a=t.description;function s(e,t){var n=oP().range.getBoundingClientRect(),i=t.getBoundingClientRect(),r=e.getBoundingClientRect(),o={"top-left":{x:n.right-r.width,y:n.top-r.height},"top-right":{x:n.right,y:n.top-r.height},"bottom-left":{x:n.right-r.width,y:n.top+15},"bottom-right":{x:n.right,y:n.top+15}},a="";return a=n.top+15+r.height>i.height+i.top?"top-":"bottom-",n.right+r.width>i.width+i.left?a+="left":a+="right",{orientation:a,position:o[a]}}return i.html=YC('<label for="camunda-'+eP(i.id)+'" '+(o?'data-show="isShown"':"")+">"+r+'</label><div class="bpp-field-wrapper" '+(o?'data-show="isShown"':"")+'><div contenteditable="true"id="camunda-'+eP(i.id)+'" name="'+eP(t.modelProperty)+'" data-auto-suggest="suggestItems"data-blur="handleFocusLeave"></div><div class="bpp-autosuggest-list"></div></div>'),a&&KC(".bpp-field-wrapper",i.html).appendChild(ZE(e,a)),o&&(i.isShown=function(){return t.show.apply(i,arguments)}),i.handleFocusLeave=JC((function(e,t){sP(t),aP(t)}),"150"),i.suggestItems=function(e,n,i){var r=i.delegateTarget,o=oP(),a=o.focusNode,c=function(e){return e.startOffset}(o.range),p=t.canSuggest||iP,u=t.getItems;function l(e){var t=e.target.innerText,i=d.index,r=i,o=i+d[0].length;!function(e,t,n){var i=document.createRange(),r=window.getSelection();i.setStart(e,t),i.setEnd(e,n),r.removeAllRanges(),r.addRange(i)}(a,r,o),document.execCommand("insertText",!1,t),sP(n),aP(n)}aP(n);var d=function(e,t){var n=function(e){return function(e,t){var n,i=RegExp(t),r=[];for(;null!==(n=i.exec(e));)r.push(n);return r}(e,/[^\s\r\(\)\,\+\-\*\/\{\}]+/g)}(e.nodeName===nP?e.wholeText:e.innerText);return ZC(n,(function(e){var n=e[0],i=e.index,r=i+n.length-1;return i<=t-1&&r>=t-1}))}(a,c)||[];if(d&&p(d,r,a)){var h=u(e,n),f=[],m=d[0];QC(h,(function(e){var t=e.toLowerCase(),n=m&&m.toLowerCase();0===t.indexOf(n)&&f.push(e)})),QC(h,(function(e){var t=e.toLowerCase(e),n=m&&m.toLowerCase();t.indexOf(n)>=1&&f.push(e)})),function(e){var t=KC(".bpp-autosuggest-list",n);if(sP(n),e.length){UC(t).add(tP),QC(e,(function(e){!function(e,t){var n=YC('<div class="bpp-autosuggest-item"></div>');n.innerText=eP(t),e.appendChild(n),n.addEventListener("click",l)}(t,e)}));var i,r,o,a=s(t,document.body).position;i=t,r=a.x,o=a.y,XC(i.style,{left:r+"px",top:o+"px"})}}(f)}},i.getSuggestionListPosition=s,i.cssClasses=["bpp-autosuggest-textbox"],i};function oP(){var e=document.getSelection();return{range:e.getRangeAt(0),focusNode:e.focusNode}}function aP(e){var t=KC(".bpp-autosuggest-list",e);UC(t).remove(tP)}function sP(e){for(var t=KC(".bpp-autosuggest-list",e);t.firstChild;)t.removeChild(t.firstChild)}var cP=dw.escapeHTML,pP=G_.query;var uP=function(e){var t=e.id,n=e.title||"",i=e.description||"",r=!!e.open||!1,o=e.onToggle||lP,a=e.onRemove,s=e.cssClasses||[],c={id:t,toggle:function(e,t,n,i){var a=!r;p(a,t),o(a,t)},isOpen:function(){return r},set:function(){var e=this._commands;if(e)return delete this._commands,e},setOpen:p,get:function(t,r){if(e.get)return e.get(t,r);return{title:n||"",description:i||""}}};function p(e,t){r=e,t.classList.toggle("bpp-collapsible--collapsed",!e)}return"function"==typeof a&&(c.onRemove=function(e,t,n,i){var r=a(e,t,n,i);if(r)return function(e,t){c._commands=e,pP('input[type="hidden"]',t).value=1}(r,t),!0}),c.html='<div class="bpp-field-wrapper" data-action="toggle"><input name="hidden" type="hidden"><span class="bpp-collapsible__icon"></span><label class="bpp-collapsible__title" data-value="title">'+cP(n)+'</label><label class="bpp-collapsible__description" data-value="description">'+cP(i)+"</label>"+(a?'<button class="bpp-collapsible__remove action-button clear" data-action="onRemove"></button>':"")+"</div>",c.cssClasses=s.concat(r?["bpp-collapsible"]:["bpp-collapsible","bpp-collapsible--collapsed"]),c};function lP(){}var dP=E_.getBusinessObject,hP=dw.escapeHTML,fP=G_.domify,mP=function(e,t,n){var i=n,r=i.id,o=t.label||r,a=!!t.hidden&&"function"==typeof t.hidden,s=t.isOn,c=t.descriptionOn,p=t.descriptionOff,u=t.labelOn,l=t.labelOff;return i.html=document.createDocumentFragment(),i.html.appendChild(fP('<label for="'+hP(r)+'" '+(a?'data-show="shouldShow"':"")+">"+hP(o)+'</label><div class="bpp-field-wrapper"'+(a?'data-show="shouldShow"':"")+'><label class="bpp-toggle-switch__switcher"><input id="'+hP(r)+'" type="checkbox" name="'+hP(t.modelProperty)+'" /><span class="bpp-toggle-switch__slider"></span></label><p class="bpp-toggle-switch__label" data-show="isOn">'+hP(u)+'</p><p class="bpp-toggle-switch__label" data-show="isOff">'+hP(l)+"</p></div>")),c&&i.html.appendChild(ZE(e,c,{show:"isOn"})),p&&i.html.appendChild(ZE(e,p,{show:"isOff"})),i.get=function(e){var n=dP(e),i={};return i[t.modelProperty]=n.get(t.modelProperty),i},i.set=function(e,n){var i={};return i[t.modelProperty]=!!n[t.modelProperty],rS.updateProperties(e,i)},"function"==typeof t.set&&(i.set=t.set),"function"==typeof t.get&&(i.get=t.get),a&&(i.shouldShow=function(){return!t.hidden.apply(i,arguments)}),i.isOn=function(){return!(a&&!i.shouldShow())&&s.apply(i,arguments)},i.isOff=function(){return!(a&&!i.shouldShow())&&!i.isOn()},i.cssClasses=["bpp-toggle-switch"],i},vP=E_.getBusinessObject;function gP(e){if(!e)throw new Error(e+" must be set.");return e}var yP=function(e){return{id:e.id,description:e.description||"",get:e.get||function(t){var n=vP(t),i={},r=gP(e.modelProperty);return i[r]=n.get(r),i},set:e.set||function(t,n){var i={},r=gP(e.modelProperty);return""!==n[r]?i[r]=n[r]:i[r]=void 0,rS.updateProperties(t,i)},validate:e.validate||function(){return{}},html:""}};function bP(){}bP.textField=function(e,t){return nS(e,t,yP(t))},bP.validationAwareTextField=function(e,t){return BS(e,t,yP(t))},bP.checkbox=function(e,t){return cS(e,t,yP(t))},bP.textBox=function(e,t){return DS(e,t,yP(t))},bP.selectBox=function(e,t){return dS(e,t,yP(t))},bP.comboBox=function(e,t){return AS(e,t)},bP.table=function(e,t){return WS(e,t)},bP.label=function(e){return qS(e)},bP.link=function(e,t){return WC(e,t)},bP.autoSuggest=function(e,t){return rP(e,t,yP(t))},bP.collapsible=function(e){return uP(e)},bP.toggleSwitch=function(e,t){return mP(e,t,yP(t))};var xP=bP,_P=E_.is,wP=E_.getBusinessObject,EP={},SP=EP;EP.modifyProcessBusinessObject=function(e,t,n){if(!_P(e,"bpmn:Participant"))return{};var i=wP(e).get("processRef"),r={};return r[t]=n[t],rS.updateBusinessObject(e,i,r)},EP.getProcessBusinessObject=function(e,t){if(!_P(e,"bpmn:Participant"))return{};var n=wP(e).get("processRef"),i={};return i[t]=n.get(t),i};var CP=function(e,t,n){var i=(t=t||{}).id||"name",r=t.label||n("Name"),o=t.modelProperty||"name";return[xP.textBox(n,{id:i,label:r,modelProperty:o,get:t.get,set:t.set})]},PP=E_.is,TP=E_.getBusinessObject,RP=E_.getBusinessObject,AP=E_.is,kP={},MP=kP;kP.getEventDefinition=function(e,t){var n=RP(e),i=null;return n.eventDefinitions&&Qy(n.eventDefinitions,(function(e){AP(e,t)&&(i=e)})),i},kP.getTimerEventDefinition=function(e){return this.getEventDefinition(e,"bpmn:TimerEventDefinition")},kP.getMessageEventDefinition=function(e){return this.getEventDefinition(e,"bpmn:MessageEventDefinition")},kP.getSignalEventDefinition=function(e){return this.getEventDefinition(e,"bpmn:SignalEventDefinition")},kP.getErrorEventDefinition=function(e){return this.getEventDefinition(e,"bpmn:ErrorEventDefinition")},kP.getEscalationEventDefinition=function(e){return this.getEventDefinition(e,"bpmn:EscalationEventDefinition")},kP.getCompensateEventDefinition=function(e){return this.getEventDefinition(e,"bpmn:CompensateEventDefinition")},kP.getLinkEventDefinition=function(e){return this.getEventDefinition(e,"bpmn:LinkEventDefinition")},kP.getConditionalEventDefinition=function(e){return this.getEventDefinition(e,"bpmn:ConditionalEventDefinition")};var DP=G_.query,BP=G_.domify,jP=G_.attr,OP=dw.escapeHTML,NP="select[name=selectedElement]";var LP=function(e,t,n,i){var r=i.elementName||"",o=i.elementType,a=i.referenceProperty,s=i.newElementIdPrefix||"elem_",c=i.label||"",p=i.description||"",u=[],l=!!i.hidden&&"function"==typeof i.hidden;return u.push({id:i.id||"event-definitions-"+r,description:p,isShown:function(){return l?!i.hidden.apply(t,arguments):!i.hidden},html:'<div class="bpp-row bpp-select" data-show="isShown"><label for="camunda-'+OP(r)+'">'+OP(c)+'</label><div class="bpp-field-wrapper"><select id="camunda-'+OP(r)+'" name="selectedElement" data-value></select><button class="action-button add" id="addElement" data-action="addElement"><span>+</span></button></div></div>',get:function(e,n){dw.updateOptionsDropDown(NP,t,o,n);var i=t.get(a);return{selectedElement:i&&i.id||""}},set:function(e,i){var r=i.selectedElement,s={};if(!r||void 0===r)return s[a]=void 0,rS.updateBusinessObject(e,t,s);var c,p,u,l,d=[],h=(c=t,p=o,u=r,l=dw.findRootElementsByType(c,p),CS(l,(function(e){return e.id===u})));if(!h){var f=dw.getRoot(t);h=A_.createElement(o,{name:r},f,n),d.push(rS.addAndRemoveElementsFromList(e,f,"rootElements",null,[h]))}return s[a]=h,d.push(rS.updateBusinessObject(e,t,s)),d},addElement:function(e,t){var n=dw.nextId(s),i=BP('<option value="'+OP(n)+'"> (id='+OP(n)+")</option>"),r=function(e){return DP(NP,e)}(t);return r.insertBefore(i,r.firstChild),Qy(r,(function(e){e.value===n?jP(e,"selected","selected"):jP(e,"selected",null)})),!0}}),u},IP=function(e,t,n,i,r){var o=r.id||"element-property",a=r.label,s=r.referenceProperty,c=r.modelProperty||"name",p=r.shouldValidate||!1,u=r.description,l=!!r.hidden&&"function"==typeof r.hidden,d=xP.textField(i,{id:o,label:a,modelProperty:c,description:u,get:function(e,n){var i=t.get(s),r={};return r[c]=i&&i.get(c),r},set:function(e,n,i){var r=t.get(s),o={};return o[c]=n[c]||void 0,rS.updateBusinessObject(e,r,o)},hidden:function(e,n){return l&&r.hidden.apply(t,arguments)||!t.get(s)}});return p&&(d.validate=function(e,n,i){if(t.get(s)&&!n[c]){var r={};return r[c]="Must provide a value",r}}),[d]},zP=function(e,t,n,i,r){e.entries=e.entries.concat(LP(0,i,n,{label:r("Global Message referenced"),elementName:"message",elementType:"bpmn:Message",referenceProperty:"messageRef",newElementIdPrefix:"Message_"})),e.entries=e.entries.concat(IP(0,i,0,r,{id:"message-element-name",label:r("Global Message Name"),referenceProperty:"messageRef",modelProperty:"name",shouldValidate:!0}))};function FP(e){if(e)return void 0!==e.get("timeDate")?"timeDate":void 0!==e.get("timeCycle")?"timeCycle":void 0!==e.get("timeDuration")?"timeDuration":void 0}function $P(e,t,n){return"function"==typeof e?e(t,n):e}var VP=function(e,t,n,i,r,o){var a=[{value:"timeDate",name:r("Date")},{value:"timeDuration",name:r("Duration")},{value:"timeCycle",name:r("Cycle")}],s=o&&o.idPrefix,c=o&&o.createTimerEventDefinition;e.entries.push(xP.selectBox(r,{id:s+"timer-event-definition-type",label:r("Timer Definition Type"),selectOptions:a,emptyParameter:!0,modelProperty:"timerDefinitionType",get:function(e,t){return{timerDefinitionType:FP($P(i,e,t))||""}},set:function(e,t,r){var o={timeDuration:void 0,timeDate:void 0,timeCycle:void 0},a=$P(i,e,r),s=t.timerDefinitionType;if(a||"function"!=typeof c||(a=c(e,r)),t.timerDefinitionType){var p,u=FP(a);if(u)p=a.get(u).get("body");o[s]=function(e,t,n){return t=t||void 0,A_.createElement("bpmn:FormalExpression",{body:t},e,n)}(a,p,n)}return rS.updateBusinessObject(e,a,o)},hidden:function(e,t){return void 0===$P(i,e,t)}})),e.entries.push(xP.textField(r,{id:s+"timer-event-definition",label:r("Timer Definition"),modelProperty:"timerDefinition",get:function(e,t){var n=$P(i,e,t),r=FP(n),o=r&&n.get(r);return{timerDefinition:o&&o.get("body")}},set:function(e,t,n){var r=$P(i,e,n),o=FP(r),a=o&&r.get(o);if(a)return rS.updateBusinessObject(e,a,{body:t.timerDefinition||void 0})},validate:function(e,t){var n=$P(i,e,t),o=FP(n),a=o&&n.get(o);if(a&&!a.get("body"))return{timerDefinition:r("Must provide a value")}},hidden:function(e,t){return!FP($P(i,e,t))}}))},HP=E_.getBusinessObject,GP=E_.is;function WP(e,t){return dw.filterElementsByType(e.flowElements,t)}function qP(e,t){return GP(e,"bpmn:SubProcess")&&!e.triggeredByEvent||GP(e,"bpmn:CallActivity")||function(e,t){var n=e.id;return!!CS(t,(function(e){var t=MP.getCompensateEventDefinition(e),i=e.attachedToRef;return t&&i&&i.id===n}))}(e,t)}function UP(e){var t=function(e){return WP(e,"bpmn:BoundaryEvent")}(e);return fw(function(e){return WP(e,"bpmn:Activity")}(e),(function(e){return qP(e,t)}))}function YP(e){var t=[{value:""}],n=function(e){var t=HP(e).$parent,n=UP(t);return GP(t,"bpmn:SubProcess")&&t.triggeredByEvent&&(t=t.$parent)&&(n=n.concat(UP(t))),n}(e);return Qy(n,(function(e){var n=e.id,i=(e.name?e.name+" ":"")+"(id="+n+")";t.push({value:n,name:i})})),t}var KP=t(Gr),XP=E_.is,ZP=KP.isEventSubProcess,QP=t(ts),JP=E_.is,eT=QP.isAny,tT=E_.getBusinessObject,nT=function(e,t,n,i,r){Qy(["bpmn:StartEvent","bpmn:EndEvent","bpmn:IntermediateThrowEvent","bpmn:BoundaryEvent","bpmn:IntermediateCatchEvent"],(function(i){if(JP(t,i)){var o=MP.getMessageEventDefinition(t),a=MP.getSignalEventDefinition(t);o&&zP(e,0,n,o,r),a&&function(e,t,n,i,r){e.entries=e.entries.concat(LP(0,i,n,{label:r("Global Signal referenced"),elementName:"signal",elementType:"bpmn:Signal",referenceProperty:"signalRef",newElementIdPrefix:"Signal_"})),e.entries=e.entries.concat(IP(0,i,0,r,{id:"signal-element-name",label:r("Global Signal Name"),referenceProperty:"signalRef",modelProperty:"name",shouldValidate:!0}))}(e,0,n,a,r)}})),JP(t,"bpmn:ReceiveTask")&&zP(e,0,n,tT(t),r);Qy(["bpmn:StartEvent","bpmn:BoundaryEvent","bpmn:EndEvent"],(function(i){if(JP(t,i)){var o=MP.getErrorEventDefinition(t);o&&function(e,t,n,i,r){e.entries=e.entries.concat(LP(0,i,n,{label:r("Global Error referenced"),elementName:"error",elementType:"bpmn:Error",referenceProperty:"errorRef",newElementIdPrefix:"Error_"})),e.entries=e.entries.concat(IP(0,i,0,r,{id:"error-element-name",label:r("Name"),referenceProperty:"errorRef",modelProperty:"name",shouldValidate:!0})),e.entries=e.entries.concat(IP(0,i,0,r,{id:"error-element-code",label:r("Code"),referenceProperty:"errorRef",modelProperty:"errorCode"}))}(e,0,n,o,r)}}));Qy(["bpmn:StartEvent","bpmn:BoundaryEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent"],(function(i){if(JP(t,i)){var o=JP(t,"bpmn:StartEvent")||JP(t,"bpmn:BoundaryEvent"),a=MP.getEscalationEventDefinition(t);a&&function(e,t,n,i,r,o){e.entries=e.entries.concat(LP(0,i,n,{label:o("Global Escalation referenced"),elementName:"escalation",elementType:"bpmn:Escalation",referenceProperty:"escalationRef",newElementIdPrefix:"Escalation_"})),e.entries=e.entries.concat(IP(0,i,0,o,{id:"escalation-element-name",label:o("Global Escalation Name"),referenceProperty:"escalationRef",modelProperty:"name",shouldValidate:!0})),e.entries=e.entries.concat(IP(0,i,0,o,{id:"escalation-element-code",label:o("Global Escalation Code"),referenceProperty:"escalationRef",modelProperty:"escalationCode"})),r&&e.entries.push(xP.validationAwareTextField(o,{id:"escalationCodeVariable",label:o("Escalation Code Variable"),modelProperty:"escalationCodeVariable",description:o("Define the name of the variable that will contain the escalation code"),getProperty:function(e){return i.get("camunda:escalationCodeVariable")},setProperty:function(e,t){return""===t.escalationCodeVariable&&(t.escalationCodeVariable=void 0),rS.updateBusinessObject(e,i,t)},validate:function(e,t){var n={},i=t.escalationCodeVariable;return dw.containsSpace(i)&&(n.escalationCodeVariable=o("Escalation code variable must not contain spaces.")),n}}))}(e,0,n,a,o,r)}}));Qy(["bpmn:StartEvent","bpmn:BoundaryEvent","bpmn:IntermediateCatchEvent"],(function(i){if(JP(t,i)){var o=MP.getTimerEventDefinition(t);o&&VP(e,t,n,o,r)}}));Qy(["bpmn:EndEvent","bpmn:IntermediateThrowEvent"],(function(n){if(JP(t,n)){var o=MP.getCompensateEventDefinition(t);o&&function(e,t,n,i,r,o){e.entries.push(xP.checkbox(o,{id:"wait-for-completion",label:o("Wait for Completion"),modelProperty:"waitForCompletion",get:function(e,t){return{waitForCompletion:i.waitForCompletion}},set:function(e,t){return t.waitForCompletion=t.waitForCompletion||!1,rS.updateBusinessObject(e,i,t)}})),e.entries.push(xP.selectBox(o,{id:"activity-ref",label:o("Activity Ref"),selectOptions:YP(t),modelProperty:"activityRef",get:function(e,t){var n=i.activityRef;return{activityRef:(n=n&&n.id)||""}},set:function(e,t){var n=t.activityRef||void 0;return n=n&&HP(r.get(n)),rS.updateBusinessObject(e,i,{activityRef:n})}}))}(e,t,0,o,i,r)}}));if(eT(t,["bpmn:StartEvent","bpmn:BoundaryEvent","bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"])){var o=MP.getConditionalEventDefinition(t);o&&function(e,t,n,i,r,o){var a=function(e){return function(t){var n=i.get("camunda:"+e),r={};return r[e]=n,r}},s=function(e){return function(t,n){var r={};return r["camunda:"+e]=n[e]||void 0,rS.updateBusinessObject(t,i,r)}};e.entries.push(xP.textField(o,{id:"variableName",label:o("Variable Name"),modelProperty:"variableName",get:a("variableName"),set:s("variableName")})),XP(t,"bpmn:StartEvent")&&!ZP(t.parent)||e.entries.push(xP.textField(o,{id:"variableEvents",label:o("Variable Events"),description:o("Specify more than one variable change event as a comma separated list."),modelProperty:"variableEvents",get:a("variableEvents"),set:s("variableEvents")}))}(e,t,0,o,0,r)}},iT=E_.is,rT=E_.getBusinessObject;var oT=function(e,t,n){Qy(["bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"],(function(i){if(iT(t,i)){var r=function(e){var t=rT(e),n=null;return t.eventDefinitions&&Qy(t.eventDefinitions,(function(e){iT(e,"bpmn:LinkEventDefinition")&&(n=e)})),n}(t);if(r){var o=xP.textField(n,{id:"link-event",label:n("Link Name"),modelProperty:"link-name"});o.get=function(){return{"link-name":r.get("name")}},o.set=function(e,t){var n={name:t["link-name"]};return rS.updateBusinessObject(e,r,n)},e.entries.push(o)}}}))},aT=E_.is,sT=E_.getBusinessObject,cT="text/plain",pT=E_.getBusinessObject,uT=t(St).add,lT=E_.getBusinessObject,dT={},hT=dT;dT.createCategoryValue=function(e,t){var n=t.create("bpmn:CategoryValue"),i=t.create("bpmn:Category",{categoryValue:[n]});return uT(e.get("rootElements"),i),lT(i).$parent=e,lT(n).$parent=i,n};var fT=hT.createCategoryValue,mT=E_.is,vT=E_.getBusinessObject,gT=function(e,t,n,i,r,o){if(o||(o={}),!mT(t,"bpmn:Collaboration")){var a={id:o.id,label:o.label&&r(o.label)};mT(t,"bpmn:TextAnnotation")?(a.modelProperty="text",a.label=r("Text")):mT(t,"bpmn:Group")&&(a.modelProperty="categoryValue",a.label=r("Category Value"),a.get=function(e){return{categoryValue:(vT(e).categoryValueRef||{}).value}},a.set=function(e,t){var r,o,a,s,c=vT(e);return c.categoryValueRef||(r=c,o=i.getRootElement(),a=vT(o).$parent,s=fT(a,n),r.categoryValueRef=s),{cmd:"element.updateLabel",context:{element:e,newLabel:t.categoryValue}}}),e.entries=e.entries.concat(CP(0,a,r))}},yT=E_.is,bT=E_.getBusinessObject,xT=E_.is;function _T(e,t,n,i,r){var o={id:"general",label:r("General"),entries:[]};!function(e,t,n,i){i||(i={}),e.entries.push(xP.validationAwareTextField(n,{id:i.id||"id",label:n(i.label||"Id"),description:i.description&&n(i.description),modelProperty:"id",getProperty:function(e){return pT(e).id},setProperty:function(e,t){return e=e.labelTarget||e,rS.updateProperties(e,t)},validate:function(e,t){var i=t.id,r=pT(e),o=dw.isIdValid(r,i,n);return o?{id:o}:{}}}))}(o,0,r,function(e){if(xT(e,"bpmn:Participant"))return{id:"participant-id",label:"Participant Id"}}(e)),gT(o,e,n,t,r,function(e){if(xT(e,"bpmn:Participant"))return{id:"participant-name",label:"Participant Name"}}(e)),function(e,t,n,i){var r=TP(t),o=i&&i.processIdDescription;if((PP(t,"bpmn:Process")||PP(t,"bpmn:Participant")&&r.get("processRef"))&&PP(t,"bpmn:Participant")){var a=xP.validationAwareTextField(n,{id:"process-id",label:n("Process Id"),description:o&&n(o),modelProperty:"processId"});a.get=function(e){return{processId:SP.getProcessBusinessObject(e,"id").id}},a.set=function(e,t){return SP.modifyProcessBusinessObject(e,"id",{id:t.processId})},a.validate=function(e,t){var i=t.processId,r=TP(e),o=dw.isIdValid(r.processRef,i,n);return o?{processId:o}:{}},e.entries.push(a);var s=CP(0,{id:"process-name",label:n("Process Name")})[0];s.get=function(e){return SP.getProcessBusinessObject(e,"name")},s.set=function(e,t){return SP.modifyProcessBusinessObject(e,"name",t)},e.entries.push(s)}}(o,e,r),function(e,t,n){var i=bT(t);if(i&&(yT(t,"bpmn:Process")||yT(t,"bpmn:Participant")&&i.get("processRef"))){var r=xP.checkbox(n,{id:"process-is-executable",label:n("Executable"),modelProperty:"isExecutable"});yT(t,"bpmn:Participant")&&(r.get=function(e){return SP.getProcessBusinessObject(e,"isExecutable")},r.set=function(e,t){return SP.modifyProcessBusinessObject(e,"isExecutable",t)}),e.entries.push(r)}}(o,e,r);var a={id:"details",label:r("Details"),entries:[]};oT(a,e,r),nT(a,e,n,i,r);var s={id:"documentation",label:r("Documentation"),entries:[]};return function(e,t,n,i){var r,o=function(e){return e.find((function(e){return(e.textFormat||cT)===cT}))},a=function(e){return function(t){var n=o(e&&e.get("documentation"));return{documentation:n&&n.text||""}}},s=function(e){return function(t,i){var r=i.documentation,a=o(e&&e.get("documentation"));return a?r?rS.updateBusinessObject(t,a,{text:i.documentation}):rS.removeElementsFromList(t,e,"documentation",null,[a]):r?rS.addElementsTolist(t,e,"documentation",[n.create("bpmn:Documentation",{text:i.documentation})]):void 0}},c=xP.textBox(i,{id:"documentation",label:i("Element Documentation"),modelProperty:"documentation"});if(c.set=s(sT(t)),c.get=a(sT(t)),e.entries.push(c),aT(t,"bpmn:Participant")&&(r=sT(t).processRef)){var p=xP.textBox(i,{id:"process-documentation",label:i("Process Documentation"),modelProperty:"documentation"});p.set=s(r),p.get=a(r),e.entries.push(p)}}(s,e,n,r),[o,a,s]}function wT(e,t,n,i,r){qE.call(this,e),this.getTabs=function(e){return[{id:"general",label:r("General"),groups:_T(e,t,n,i,r)}]}}wT.$inject=["eventBus","canvas","bpmnFactory","elementRegistry","translate"],i(wT,qE);var ET={__init__:["propertiesProvider"],propertiesProvider:["type",wT]};function ST(e={}){this._injectOriginModule(e),wg.call(this,e)}return i(ST,wg),ST.prototype._injectOriginModule=function(e){this._modules=[].concat(this._modules,e&&e.disableAdjustOrigin?zg:Vg)},ST.prototype._extensionModules=[jg,Gg,Xg,ty,GE,ET],ST.prototype._modules=[].concat(wg.prototype._modules,ST.prototype._extensionModules),ST}));
8
+ var Ha=t((function(e){!function(t,n,i,r){var o,a=["","webkit","Moz","MS","ms","o"],s=n.createElement("div"),c=Math.round,l=Math.abs,p=Date.now;function u(e,t,n){return setTimeout(y(e,n),t)}function h(e,t,n){return!!Array.isArray(e)&&(d(e,n[t],n),!0)}function d(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==r)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function m(e,n,i){var r="DEPRECATED METHOD: "+n+"\n"+i+" AT \n";return function(){var n=new Error("get-stack-trace"),i=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=t.console&&(t.console.warn||t.console.log);return o&&o.call(t.console,r,i),e.apply(this,arguments)}}o="function"!=typeof Object.assign?function(e){if(e===r||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==r&&null!==i)for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o])}return t}:Object.assign;var f=m((function(e,t,n){for(var i=Object.keys(t),o=0;o<i.length;)(!n||n&&e[i[o]]===r)&&(e[i[o]]=t[i[o]]),o++;return e}),"extend","Use `assign`."),v=m((function(e,t){return f(e,t,!0)}),"merge","Use `assign`.");function g(e,t,n){var i,r=t.prototype;(i=e.prototype=Object.create(r)).constructor=e,i._super=r,n&&o(i,n)}function y(e,t){return function(){return e.apply(t,arguments)}}function b(e,t){return"function"==typeof e?e.apply(t&&t[0]||r,t):e}function _(e,t){return e===r?t:e}function x(e,t,n){d(C(t),(function(t){e.addEventListener(t,n,!1)}))}function w(e,t,n){d(C(t),(function(t){e.removeEventListener(t,n,!1)}))}function E(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function S(e,t){return e.indexOf(t)>-1}function C(e){return e.trim().split(/\s+/g)}function R(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}function P(e){return Array.prototype.slice.call(e,0)}function M(e,t,n){for(var i=[],r=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];R(r,a)<0&&i.push(e[o]),r[o]=a,o++}return n&&(i=t?i.sort((function(e,n){return e[t]>n[t]})):i.sort()),i}function T(e,t){for(var n,i,o=t[0].toUpperCase()+t.slice(1),s=0;s<a.length;){if((i=(n=a[s])?n+o:t)in e)return i;s++}return r}var A=1;function k(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}var O="ontouchstart"in t,D=T(t,"PointerEvent")!==r,z=O&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),N="touch",B="mouse",L=24,j=["x","y"],I=["clientX","clientY"];function $(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){b(e.options.enable,[e])&&n.handler(t)},this.init()}function F(e,t,n){var i=n.pointers.length,o=n.changedPointers.length,a=1&t&&i-o==0,s=12&t&&i-o==0;n.isFirst=!!a,n.isFinal=!!s,a&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,i=t.pointers,o=i.length;n.firstInput||(n.firstInput=H(t));o>1&&!n.firstMultiple?n.firstMultiple=H(t):1===o&&(n.firstMultiple=!1);var a=n.firstInput,s=n.firstMultiple,c=s?s.center:a.center,u=t.center=V(i);t.timeStamp=p(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=q(c,u),t.distance=U(c,u),function(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y});t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}(n,t),t.offsetDirection=W(t.deltaX,t.deltaY);var h=G(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=h.x,t.overallVelocityY=h.y,t.overallVelocity=l(h.x)>l(h.y)?h.x:h.y,t.scale=s?(d=s.pointers,m=i,U(m[0],m[1],I)/U(d[0],d[1],I)):1,t.rotation=s?function(e,t){return q(t[1],t[0],I)+q(e[1],e[0],I)}(s.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,i,o,a,s=e.lastInterval||t,c=t.timeStamp-s.timeStamp;if(8!=t.eventType&&(c>25||s.velocity===r)){var p=t.deltaX-s.deltaX,u=t.deltaY-s.deltaY,h=G(c,p,u);i=h.x,o=h.y,n=l(h.x)>l(h.y)?h.x:h.y,a=W(p,u),e.lastInterval=t}else n=s.velocity,i=s.velocityX,o=s.velocityY,a=s.direction;t.velocity=n,t.velocityX=i,t.velocityY=o,t.direction=a}(n,t);var d,m;var f=e.element;E(t.srcEvent.target,f)&&(f=t.srcEvent.target);t.target=f}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function H(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:c(e.pointers[n].clientX),clientY:c(e.pointers[n].clientY)},n++;return{timeStamp:p(),pointers:t,center:V(t),deltaX:e.deltaX,deltaY:e.deltaY}}function V(e){var t=e.length;if(1===t)return{x:c(e[0].clientX),y:c(e[0].clientY)};for(var n=0,i=0,r=0;r<t;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:c(n/t),y:c(i/t)}}function G(e,t,n){return{x:t/e||0,y:n/e||0}}function W(e,t){return e===t?1:l(e)>=l(t)?e<0?2:4:t<0?8:16}function U(e,t,n){n||(n=j);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(i*i+r*r)}function q(e,t,n){n||(n=j);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,i)/Math.PI}$.prototype={handler:function(){},init:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(k(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(k(this.element),this.evWin,this.domHandler)}};var X={mousedown:1,mousemove:2,mouseup:4},Y="mousedown",K="mousemove mouseup";function Z(){this.evEl=Y,this.evWin=K,this.pressed=!1,$.apply(this,arguments)}g(Z,$,{handler:function(e){var t=X[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:B,srcEvent:e}))}});var Q={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},J={2:N,3:"pen",4:B,5:"kinect"},ee="pointerdown",te="pointermove pointerup pointercancel";function ne(){this.evEl=ee,this.evWin=te,$.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(ee="MSPointerDown",te="MSPointerMove MSPointerUp MSPointerCancel"),g(ne,$,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=Q[i],o=J[e.pointerType]||e.pointerType,a=o==N,s=R(t,e.pointerId,"pointerId");1&r&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):12&r&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var ie={touchstart:1,touchmove:2,touchend:4,touchcancel:8},re="touchstart",oe="touchstart touchmove touchend touchcancel";function ae(){this.evTarget=re,this.evWin=oe,this.started=!1,$.apply(this,arguments)}function se(e,t){var n=P(e.touches),i=P(e.changedTouches);return 12&t&&(n=M(n.concat(i),"identifier",!0)),[n,i]}g(ae,$,{handler:function(e){var t=ie[e.type];if(1===t&&(this.started=!0),this.started){var n=se.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:N,srcEvent:e})}}});var ce={touchstart:1,touchmove:2,touchend:4,touchcancel:8},le="touchstart touchmove touchend touchcancel";function pe(){this.evTarget=le,this.targetIds={},$.apply(this,arguments)}function ue(e,t){var n=P(e.touches),i=this.targetIds;if(3&t&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,a=P(e.changedTouches),s=[],c=this.target;if(o=n.filter((function(e){return E(e.target,c)})),1===t)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<a.length;)i[a[r].identifier]&&s.push(a[r]),12&t&&delete i[a[r].identifier],r++;return s.length?[M(o.concat(s),"identifier",!0),s]:void 0}g(pe,$,{handler:function(e){var t=ce[e.type],n=ue.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:N,srcEvent:e})}});function he(){$.apply(this,arguments);var e=y(this.handler,this);this.touch=new pe(this.manager,e),this.mouse=new Z(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function de(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,me.call(this,t)):12&e&&me.call(this,t)}function me(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout((function(){var e=i.indexOf(n);e>-1&&i.splice(e,1)}),2500)}}function fe(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(t-r.x),a=Math.abs(n-r.y);if(o<=25&&a<=25)return!0}return!1}g(he,$,{handler:function(e,t,n){var i=n.pointerType==N,r=n.pointerType==B;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)de.call(this,t,n);else if(r&&fe.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ve=T(s.style,"touchAction"),ge=ve!==r,ye="compute",be="auto",_e="manipulation",xe="none",we="pan-x",Ee="pan-y",Se=function(){if(!ge)return!1;var e={},n=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(i){e[i]=!n||t.CSS.supports("touch-action",i)})),e}();function Ce(e,t){this.manager=e,this.set(t)}Ce.prototype={set:function(e){e==ye&&(e=this.compute()),ge&&this.manager.element.style&&Se[e]&&(this.manager.element.style[ve]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return d(this.manager.recognizers,(function(t){b(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(S(e,xe))return xe;var t=S(e,we),n=S(e,Ee);if(t&&n)return xe;if(t||n)return t?we:Ee;if(S(e,_e))return _e;return be}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var i=this.actions,r=S(i,xe)&&!Se.none,o=S(i,Ee)&&!Se["pan-y"],a=S(i,we)&&!Se["pan-x"];if(r){var s=1===e.pointers.length,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!a||!o)return r||o&&6&n||a&&n&L?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var Re=32;function Pe(e){this.options=o({},this.defaults,e||{}),this.id=A++,this.manager=null,this.options.enable=_(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Me(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function Te(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function Ae(e,t){var n=t.manager;return n?n.get(e):e}function ke(){Pe.apply(this,arguments)}function Oe(){ke.apply(this,arguments),this.pX=null,this.pY=null}function De(){ke.apply(this,arguments)}function ze(){Pe.apply(this,arguments),this._timer=null,this._input=null}function Ne(){ke.apply(this,arguments)}function Be(){ke.apply(this,arguments)}function Le(){Pe.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function je(e,t){return(t=t||{}).recognizers=_(t.recognizers,je.defaults.preset),new Ie(e,t)}Pe.prototype={defaults:{},set:function(e){return o(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(h(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Ae(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return h(e,"dropRecognizeWith",this)||(e=Ae(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(h(e,"requireFailure",this))return this;var t=this.requireFail;return-1===R(t,e=Ae(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(h(e,"dropRequireFailure",this))return this;e=Ae(e,this);var t=R(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function i(n){t.manager.emit(n,e)}n<8&&i(t.options.event+Me(n)),i(t.options.event),e.additionalEvent&&i(e.additionalEvent),n>=8&&i(t.options.event+Me(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=Re},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=o({},e);if(!b(this.options.enable,[this,t]))return this.reset(),void(this.state=Re);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},g(ke,Pe,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,i=6&t,r=this.attrTest(e);return i&&(8&n||!r)?16|t:i||r?4&n?8|t:2&t?4|t:2:Re}}),g(Oe,ke,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(Ee),e&L&&t.push(we),t},directionTest:function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,a=e.deltaY;return r&t.direction||(6&t.direction?(r=0===o?1:o<0?2:4,n=o!=this.pX,i=Math.abs(e.deltaX)):(r=0===a?1:a<0?8:16,n=a!=this.pY,i=Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},attrTest:function(e){return ke.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Te(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),g(De,ke,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[xe]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),g(ze,Pe,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[be]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime>t.time;if(this._input=e,!i||!n||12&e.eventType&&!r)this.reset();else if(1&e.eventType)this.reset(),this._timer=u((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return Re},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),g(Ne,ke,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[xe]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),g(Be,ke,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Oe.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:n&L&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&l(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=Te(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),g(Le,Pe,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[_e]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(i&&r&&n){if(4!=e.eventType)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||U(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&o?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=u((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return Re},failTimeout:function(){return this._timer=u((function(){this.state=Re}),this.options.interval,this),Re},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),je.VERSION="2.0.7",je.defaults={domEvents:!1,touchAction:ye,enable:!0,inputTarget:null,inputClass:null,preset:[[Ne,{enable:!1}],[De,{enable:!1},["rotate"]],[Be,{direction:6}],[Oe,{direction:6},["swipe"]],[Le],[Le,{event:"doubletap",taps:2},["tap"]],[ze]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Ie(e,t){var n;this.options=o({},je.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(D?ne:z?pe:O?he:Z))(n,F),this.touchAction=new Ce(this,this.options.touchAction),$e(this,!0),d(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function $e(e,t){var n,i=e.element;i.style&&(d(e.options.cssProps,(function(r,o){n=T(i.style,o),t?(e.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}Ie.prototype={set:function(e){return o(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var i=this.recognizers,r=t.curRecognizer;(!r||r&&8&r.state)&&(r=t.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===t.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&14&n.state&&(r=t.curRecognizer=n),o++}},get:function(e){if(e instanceof Pe)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(h(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(h(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=R(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==r&&t!==r){var n=this.handlers;return d(C(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==r){var n=this.handlers;return d(C(e),(function(e){t?n[e]&&n[e].splice(R(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var i=n.createEvent("Event");i.initEvent(e,!0,!0),i.gesture=t,t.target.dispatchEvent(i)}(e,t);var i=this.handlers[e]&&this.handlers[e].slice();if(i&&i.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<i.length;)i[r](t),r++}},destroy:function(){this.element&&$e(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},o(je,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:Re,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:L,DIRECTION_ALL:30,Manager:Ie,Input:$,TouchAction:Ce,TouchInput:pe,MouseInput:Z,PointerEventInput:ne,TouchMouseInput:he,SingleTouchInput:ae,Recognizer:Pe,AttrRecognizer:ke,Tap:Le,Pan:Oe,Swipe:Be,Pinch:De,Rotate:Ne,Press:ze,on:x,off:w,each:d,merge:v,extend:f,assign:o,inherit:g,bindFn:y,prefixed:T}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=je,e.exports?e.exports=je:t.Hammer=je}(window,document)})),Va=["mousedown","mouseup","mouseover","mouseout","click","dblclick"];function Ga(e,t){return t.get(e,!1)}function Wa(e){e.preventDefault(),"function"==typeof e.stopPropagation?e.stopPropagation():e.srcEvent&&"function"==typeof e.srcEvent.stopPropagation&&e.srcEvent.stopPropagation(),"function"==typeof e.stopImmediatePropagation&&e.stopImmediatePropagation()}function Ua(e){function t(t){setTimeout((function(){b(Va,(function(t){re.unbind(e,t,Wa,!0)}))}),500)}re.bind(e,"touchstart",(function(t){b(Va,(function(t){re.bind(e,t,Wa,!0)}))}),!0),re.bind(e,"touchend",t,!0),re.bind(e,"touchcancel",t,!0);var n=new Ha.Manager(e,{inputClass:Ha.TouchInput,recognizers:[],domEvents:!0}),i=new Ha.Tap,r=new Ha.Pan({threshold:10}),o=new Ha.Press,a=new Ha.Pinch,s=new Ha.Tap({event:"doubletap",taps:2});return a.requireFailure(r),a.requireFailure(o),n.add([r,o,a,s,i]),n.reset=function(e){var t=this.recognizers,i=this.session;i.stopped||(n.stop(e),setTimeout((function(){var e,n;for(e=0;n=t[e];e++)n.reset(),n.state=8;i.curRecognizer=null}),0))},n.on("hammer.input",(function(e){e.srcEvent.defaultPrevented&&n.reset(!0)})),n}function qa(e,t,n,i,r){var o,a=Ga("dragging",e),s=Ga("move",e),c=Ga("contextPad",e),l=Ga("palette",e);function p(e,t){return function(n){var o=u(n.target),a=o&&i.get(o);return t&&(n.srcEvent.button=t),r.fire(e,n,a)}}function u(e){return ee(e,"svg, .djs-element",!0)}function h(e){function n(e){var n=u(e.target),r=n&&i.get(n);if(s&&t.getRootElement()!==r)return s.start(e,r,!0);!function(e){var n=0,i=0;function r(e){var r=e.deltaX-n,o=e.deltaY-i;t.scroll({dx:r,dy:o}),n=e.deltaX,i=e.deltaY}function a(e){o.off("panmove",r),o.off("panend",a),o.off("pancancel",a)}o.on("panmove",r),o.on("panend",a),o.on("pancancel",a)}()}(o=Ua(e)).on("tap",p("element.click")),o.on("doubletap",p("element.dblclick",1)),o.on("panstart",n),o.on("press",n),o.on("pinchstart",(function(e){var n=t.zoom(),i=e.center;function r(e){var r=1-(1-e.scale)/1.5,o=Math.max(.2,Math.min(4,r*n));t.zoom(o,i),Wa(e)}function a(e){o.off("pinchmove",r),o.off("pinchend",a),o.off("pinchcancel",a),o.reset(!0)}o.on("pinchmove",r),o.on("pinchend",a),o.on("pinchcancel",a)}))}a&&n.on("drag.move",(function(e){var t=e.originalEvent;if(t&&!(t instanceof MouseEvent)){var n=vo(t),r=u(document.elementFromPoint(n.x,n.y)),o=r&&i.get(r);o!==e.hover&&(e.hover&&a.out(e),o&&(a.hover({element:o,gfx:r}),e.hover=o,e.hoverGfx=r))}})),c&&n.on("contextPad.create",(function(e){var t=Ua(e.pad.html);t.on("panstart",(function(e){c.trigger("dragstart",e,!0)})),t.on("press",(function(e){c.trigger("dragstart",e,!0)})),t.on("tap",(function(e){c.trigger("click",e)}))})),l&&n.on("palette.create",(function(e){var t=Ua(e.container);t.on("panstart",(function(e){l.trigger("dragstart",e,!0)})),t.on("press",(function(e){l.trigger("dragstart",e,!0)})),t.on("tap",(function(e){l.trigger("click",e)}))})),n.on("canvas.init",(function(e){h(e.svg)}))}function Xa(e,t){var n=this;t.on("canvas.init",(function(e){n.addBBoxMarker(e.svg)}))}qa.$inject=["injector","canvas","eventBus","elementRegistry","interactionEvents","touchFix"],Xa.$inject=["canvas","eventBus"],Xa.prototype.addBBoxMarker=function(e){var t={fill:"none",class:"outer-bound-marker"},n=ke("rect");ye(n,{x:-1e4,y:1e4,width:10,height:10}),ye(n,t),fe(e,n);var i=ke("rect");ye(i,{x:1e4,y:1e4,width:10,height:10}),ye(i,t),fe(e,i)};var Ya={__depends__:[{__depends__:[So],__init__:["touchInteractionEvents"],touchInteractionEvents:["type",qa],touchFix:["type",Xa]}]};function Ka(e){return e&&e[e.length-1]}function Za(e){return e.y}function Qa(e){return e.x}var Ja={left:Qa,center:Qa,right:function(e){return e.x+e.width},top:Za,middle:Za,bottom:function(e){return e.y+e.height}};function es(e){this._modeling=e}es.$inject=["modeling"],es.prototype._getOrientationDetails=function(e){var t="x",n="width";return-1!==["top","bottom","middle"].indexOf(e)&&(t="y",n="height"),{axis:t,dimension:n}},es.prototype._isType=function(e,t){return-1!==t.indexOf(e)},es.prototype._alignmentPosition=function(e,t){var n,i,r,o=this._getOrientationDetails(e),a=o.axis,s=o.dimension,c={},l={},p=!1;if(this._isType(e,["left","top"]))c[e]=t[0][a];else if(this._isType(e,["right","bottom"]))r=Ka(t),c[e]=r[a]+r[s];else if(this._isType(e,["center","middle"])){if(b(t,(function(e){var t=e[a]+Math.round(e[s]/2);l[t]?l[t].elements.push(e):l[t]={elements:[e],center:t}})),n=k(l,(function(e){return e.elements.length>1&&(p=!0),e.elements.length})),p)return c[e]=Ka(n).center,c;i=t[0],r=Ka(t=k(t,(function(e){return e[a]+e[s]}))),c[e]=function(e,t){return Math.round((e[a]+t[a]+t[s])/2)}(i,r)}return c},es.prototype.trigger=function(e,t){var n=this._modeling,i=y(e,(function(e){return!(e.waypoints||e.host||e.labelTarget)}));if(!(i.length<2)){var r=k(i,Ja[t]),o=this._alignmentPosition(t,r);n.alignElements(r,o)}};var ts={__init__:["alignElements"],alignElements:["type",es]};function ns(e,t,n,i){for(var r;r=rs(e,n,t);)n=i(t,n,r);return n}function is(e){return function(t,n,i){var r={x:n.x,y:n.y};return["x","y"].forEach((function(o){var a=e[o];if(a){var s="x"===o?"width":"height",c=a.margin,l=a.minDistance;r[o]=c<0?Math.min(i[o]+c-t[s]/2,n[o]-l+c):Math.max(i[o]+i[s]+c+t[s]/2,n[o]+l+c)}})),r}}function rs(e,t,n){var i={x:t.x-n.width/2,y:t.y-n.height/2,width:n.width,height:n.height};return g(function(e){var t=os(e);e.host&&(t=t.concat(os(e.host)));e.attachers&&(t=t.concat(e.attachers.reduce((function(e,t){return e.concat(os(t))}),[])));return t}(e),(function(e){return e!==n&&"intersect"===ln(e,i,10)}))}function os(e){return(t=e,t.outgoing.map((function(e){return e.target}))).concat(function(e){return e.incoming.map((function(e){return e.source}))}(e));var t}function as(){return!0}function ss(e,t,n){e.on("autoPlace",100,(function(e){var t=e.shape;return function(e,t,n){n||(n={});var i=n.defaultDistance||50,r=cn(e);return{x:an(e).right+i+t.width/2,y:r.y}}(e.source,t)})),e.on("autoPlace.end",(function(e){n.scrollToElement(e.shape)})),this.append=function(n,i,r){e.fire("autoPlace.start",{source:n,shape:i});var o=e.fire("autoPlace",{source:n,shape:i}),a=t.appendShape(n,i,o,n.parent,r);return e.fire("autoPlace.end",{source:n,shape:a}),a}}function cs(e,t){e.on("autoPlace.end",500,(function(e){t.select(e.shape)}))}ss.$inject=["eventBus","modeling","canvas"],cs.$inject=["eventBus","selection"];var ls={__init__:["autoPlaceSelectionBehavior"],autoPlace:["type",ss],autoPlaceSelectionBehavior:["type",cs]};function ps(e,t){for("string"==typeof t&&(t=[t]);e=e.parent;)if(fr(e,t))return e;return null}function us(e,t){return mr(t,"bpmn:TextAnnotation")?function(e,t){var n=an(e),i={x:n.right+t.width/2,y:n.top-50-t.height/2};return ns(e,t,i,is({y:{margin:-30,minDistance:20}}))}(e,t):fr(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])?function(e,t){var n=an(e),i={x:n.right-10+t.width/2,y:n.bottom+40+t.width/2};return ns(e,t,i,is({x:{margin:30,minDistance:30}}))}(e,t):mr(t,"bpmn:FlowNode")?function(e,t){var n=an(e),i=cn(e),r=function(e,t){t||(t={});var n=t.defaultDistance||50,i=t.direction||"e",r=t.filter,o=t.getWeight||function(t){return t.source===e?1:-1},a=t.maxDistance||250,s=t.reference||"start";function c(e,t){return"n"===i?"start"===s?an(e).top-an(t).bottom:"center"===s?an(e).top-cn(t).y:an(e).top-an(t).top:"w"===i?"start"===s?an(e).left-an(t).right:"center"===s?an(e).left-cn(t).x:an(e).left-an(t).left:"s"===i?"start"===s?an(t).top-an(e).bottom:"center"===s?cn(t).y-an(e).bottom:an(t).bottom-an(e).bottom:"start"===s?an(t).left-an(e).right:"center"===s?cn(t).x-an(e).right:an(t).right-an(e).right}r||(r=as);var l=e.incoming.filter(r).map((function(t){var n=o(t),i=n<0?c(t.source,e):c(e,t.source);return{id:t.source.id,distance:i,weight:n}})),p=e.outgoing.filter(r).map((function(t){var n=o(t),i=n>0?c(e,t.target):c(t.target,e);return{id:t.target.id,distance:i,weight:n}}));return x(l.concat(p).reduce((function(e,t){return e[t.id+"__weight_"+t.weight]=t,e}),{}),(function(e,t){var n=t.distance,i=t.weight;return n<0||n>a||(e[String(n)]||(e[String(n)]=0),e[String(n)]+=1*i,(!e.distance||e[e.distance]<e[String(n)])&&(e.distance=n)),e}),{}).distance||n}(e,{filter:function(e){return mr(e,"bpmn:SequenceFlow")}}),o=30,a=80,s="left";mr(e,"bpmn:BoundaryEvent")&&-1!==(s=ln(e,e.host,-25)).indexOf("top")&&(o*=-1);var c={x:n.right+r+t.width/2,y:i.y+hs(s,a)};return ns(e,t,c,is({y:{margin:o,minDistance:a}}))}(e,t):void 0}function hs(e,t){return-1!=e.indexOf("top")?-1*t:-1!=e.indexOf("bottom")?t:0}function ds(e){e.on("autoPlace",(function(e){var t=e.shape;return us(e.source,t)}))}ds.$inject=["eventBus"];var ms={__depends__:[ls],__init__:["bpmnAutoPlace"],bpmnAutoPlace:["type",ds]};function fs(e,t,n,i){Vo.call(this,e),this._elementRegistry=t,this._modeling=n,this._rules=i;var r=this;this.postExecuted(["shape.create"],(function(e){var t=e.context,n=t.hints||{},i=t.shape,o=t.parent||t.newParent;!1!==n.autoResize&&r._expand([i],o)})),this.postExecuted(["elements.move"],(function(e){var t=e.context,n=o(P(t.closure.topLevel)),i=t.hints,a=!i||i.autoResize;!1!==a&&b(M(n,(function(e){return e.parent.id})),(function(e,t){u(a)&&(e=e.filter((function(e){return g(a,O({id:e.id}))}))),r._expand(e,t)}))})),this.postExecuted(["shape.toggleCollapse"],(function(e){var t=e.context,n=t.hints,i=t.shape;n&&!1===n.autoResize||i.collapsed||r._expand(i.children||[],i)})),this.postExecuted(["shape.resize"],(function(e){var t=e.context,n=t.hints,i=t.shape,o=i.parent;n&&!1===n.autoResize||o&&r._expand([i],o)}))}function vs(e){e.invoke(fs,this)}function gs(e){Vo.call(this,e),this.init()}function ys(e){gs.call(this,e);var t=this;this.addRule("element.autoResize",(function(e){return t.canResize(e.elements,e.target)}))}function bs(e,t){ys.call(this,e),this._modeling=t}fs.$inject=["eventBus","elementRegistry","modeling","rules"],n(fs,Vo),fs.prototype._getOptimalBounds=function(e,t){var n=this.getOffset(t),i=this.getPadding(t),r=an(lt(e)),o=an(t),a={};return r.top-o.top<i.top&&(a.top=r.top-n.top),r.left-o.left<i.left&&(a.left=r.left-n.left),o.right-r.right<i.right&&(a.right=r.right+n.right),o.bottom-r.bottom<i.bottom&&(a.bottom=r.bottom+n.bottom),sn($({},o,a))},fs.prototype._expand=function(e,t){if("string"==typeof t&&(t=this._elementRegistry.get(t)),this._rules.allowed("element.autoResize",{elements:e,target:t})){var n=this._getOptimalBounds(e,t);if(function(e,t){return e.x!==t.x||e.y!==t.y||e.width!==t.width||e.height!==t.height}(n,t)){var i=function(e,t){var n="";e=an(e),t=an(t),e.top>t.top&&(n=n.concat("n"));e.right<t.right&&(n=n.concat("w"));e.bottom<t.bottom&&(n=n.concat("s"));e.left>t.left&&(n=n.concat("e"));return n}(F(t,["x","y","width","height"]),n);this.resize(t,n,{autoResize:i});var r=t.parent;r&&this._expand([t],r)}}},fs.prototype.getOffset=function(e){return{top:60,bottom:60,left:100,right:100}},fs.prototype.getPadding=function(e){return{top:2,bottom:2,left:15,right:15}},fs.prototype.resize=function(e,t,n){this._modeling.resizeShape(e,t,null,n)},vs.$inject=["injector"],n(vs,fs),vs.prototype.resize=function(e,t,n){mr(e,"bpmn:Participant")?this._modeling.resizeLane(e,t,null,n):this._modeling.resizeShape(e,t,null,n)},gs.$inject=["eventBus"],n(gs,Vo),gs.prototype.addRule=function(e,t,n){var i=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){i.canExecute(e,t,(function(e,t,i){return n(e)}),!0)}))},gs.prototype.init=function(){},ys.$inject=["eventBus"],n(ys,gs),ys.prototype.canResize=function(e,t){return!1},n(bs,ys),bs.$inject=["eventBus","modeling"],bs.prototype.canResize=function(e,t){if(mr(t.di,"bpmndi:BPMNPlane"))return!1;if(!mr(t,"bpmn:Participant")&&!mr(t,"bpmn:Lane")&&!mr(t,"bpmn:SubProcess"))return!1;var n=!0;return b(e,(function(e){(mr(e,"bpmn:Lane")||e.labelTarget)&&(n=!1)})),n};var _s={__init__:["bpmnAutoResize","bpmnAutoResizeProvider"],bpmnAutoResize:["type",vs],bpmnAutoResizeProvider:["type",bs]};function xs(e,t,n){var i,r,o=this,a=n.get("dragging",!1);a&&t.on("drag.start",(function(n){t.once("drag.move",1500,(function(t){!function(t){if(!t.hover){var n=t.originalEvent,i=o._findTargetGfx(n),r=i&&e.get(i);i&&r&&(t.stopPropagation(),a.hover({element:r,gfx:i}),a.move(n))}}(t)}))})),t.on("element.hover",(function(e){i=e.gfx,r=e.element})),t.on("element.hover",1500,(function(e){r&&t.fire("element.out",{element:r,gfx:i})})),t.on("element.out",(function(){i=null,r=null})),this._findTargetGfx=function(e){var t;if(e instanceof MouseEvent)return t=vo(e),function(e){return ee(e,"svg, .djs-element",!0)}(document.elementFromPoint(t.x,t.y))}}xs.$inject=["elementRegistry","eventBus","injector"];var ws={__init__:["hoverFix"],hoverFix:["type",xs]},Es=Math.round,Ss="djs-drag-active";function Cs(e){e.preventDefault()}function Rs(e,t,n,i){var r,o={threshold:5,trapClick:!0};function a(e){var n=t.viewbox(),i=t._container.getBoundingClientRect();return{x:n.x+(e.x-i.left)/n.scale,y:n.y+(e.y-i.top)/n.scale}}function s(t,n){n=n||r;var i=e.createEvent($({},n.payload,n.data,{isTouch:n.isTouch}));return!1!==e.fire("drag."+t,i)&&e.fire(n.prefix+"."+t,i)}function c(e,i){var o,c=r.payload,l=r.displacement,p=r.globalStart,u=vo(e),h=Oa(u,p),d=r.localStart,m=a(u),v=Oa(m,d);if(!r.active&&(i||(o=h,Math.sqrt(Math.pow(o.x,2)+Math.pow(o.y,2))>r.threshold))){if($(c,{x:Es(d.x+l.x),y:Es(d.y+l.y),dx:0,dy:0},{originalEvent:e}),!1===s("start"))return f();r.active=!0,r.keepSelection||(c.previousSelection=n.get(),n.select(null)),r.cursor&&Ma(r.cursor),t.addMarker(t.getRootElement(),Ss)}fo(e),r.active&&($(c,{x:Es(m.x+l.x),y:Es(m.y+l.y),dx:Es(v.x),dy:Es(v.y)},{originalEvent:e}),s("move"))}function l(e){var t=!0;r.active&&(e&&(r.payload.originalEvent=e,fo(e)),t=s("end")),!1===t&&s("rejected"),s("ended",v(!0!==t))}function p(e){27===e.which&&(Cs(e),f())}function u(t){var n;r.active&&(n=Aa(e),setTimeout(n,400),Cs(t)),l(t)}function h(e){c(e)}function d(e){var t=r.payload;t.hoverGfx=e.gfx,t.hover=e.element,s("hover")}function m(e){s("out");var t=r.payload;t.hoverGfx=null,t.hover=null}function f(e){var t;if(r){var n=r.active;n&&s("cancel"),t=v(e),n&&s("canceled",t)}}function v(o){var a,v;s("cleanup"),Ta(),v=r.trapClick?u:l,re.unbind(document,"mousemove",c),re.unbind(document,"dragstart",Cs),re.unbind(document,"selectstart",Cs),re.unbind(document,"mousedown",v,!0),re.unbind(document,"mouseup",v,!0),re.unbind(document,"keyup",p),re.unbind(document,"touchstart",h,!0),re.unbind(document,"touchcancel",f,!0),re.unbind(document,"touchmove",c,!0),re.unbind(document,"touchend",l,!0),e.off("element.hover",d),e.off("element.out",m),t.removeMarker(t.getRootElement(),Ss);var g=r.payload.previousSelection;return!1!==o&&g&&!n.get().length&&function(e){var t=e.filter((function(e){return i.get(e.id)}));t.length&&n.select(t)}(g),a=r,r=null,a}e.on("diagram.destroy",f),this.init=function(t,n,i,v){r&&f(!1),"string"==typeof n&&(v=i,i=n,n=null);var g,y,b,_,x,w=(v=$({},o,v||{})).data||{};_=v.trapClick?u:l,t?(g=mo(t)||t,y=vo(t),fo(t),"dragstart"===g.type&&Cs(g)):(g=null,y={x:0,y:0}),b=a(y),n||(n=b),x=function(e){return"undefined"!=typeof TouchEvent&&e instanceof TouchEvent}(g),r=$({prefix:i,data:w,payload:{},globalStart:y,displacement:Oa(n,b),localStart:b,isTouch:x},v),v.manual||(x?(re.bind(document,"touchstart",h,!0),re.bind(document,"touchcancel",f,!0),re.bind(document,"touchmove",c,!0),re.bind(document,"touchend",l,!0)):(re.bind(document,"mousemove",c),re.bind(document,"dragstart",Cs),re.bind(document,"selectstart",Cs),re.bind(document,"mousedown",_,!0),re.bind(document,"mouseup",_,!0)),re.bind(document,"keyup",p),e.on("element.hover",d),e.on("element.out",m)),s("init"),v.autoActivate&&c(t,!0)},this.move=c,this.hover=d,this.out=m,this.end=l,this.cancel=f,this.context=function(){return r},this.setOptions=function(e){$(o,e)}}Rs.$inject=["eventBus","canvas","selection","elementRegistry"];var Ps={__depends__:[ws,Do],dragging:["type",Rs]};function Ms(e,t,n){this._canvas=n,this._opts=$({scrollThresholdIn:[20,20,20,20],scrollThresholdOut:[0,0,0,0],scrollRepeatTimeout:15,scrollStep:10},e);var i=this;t.on("drag.move",(function(e){var t=i._toBorderPoint(e);i.startScroll(t)})),t.on(["drag.cleanup"],(function(){i.stopScroll()}))}function Ts(e,t,n){return t<e&&e<n}Ms.$inject=["config.autoScroll","eventBus","canvas"],Ms.prototype.startScroll=function(e){var t=this._canvas,n=this._opts,i=this,r=t.getContainer().getBoundingClientRect(),o=[e.x,e.y,r.width-e.x,r.height-e.y];this.stopScroll();for(var a=0,s=0,c=0;c<4;c++)Ts(o[c],n.scrollThresholdOut[c],n.scrollThresholdIn[c])&&(0===c?a=n.scrollStep:1==c?s=n.scrollStep:2==c?a=-n.scrollStep:3==c&&(s=-n.scrollStep));0===a&&0===s||(t.scroll({dx:a,dy:s}),this._scrolling=setTimeout((function(){i.startScroll(e)}),n.scrollRepeatTimeout))},Ms.prototype.stopScroll=function(){clearTimeout(this._scrolling)},Ms.prototype.setOptions=function(e){this._opts=$({},this._opts,e)},Ms.prototype._toBorderPoint=function(e){var t=this._canvas._container.getBoundingClientRect(),n=vo(e.originalEvent);return{x:n.x-t.left,y:n.y-t.top}};var As={__depends__:[Ps],__init__:["autoScroll"],autoScroll:["type",Ms]};function ks(e){this._commandStack=e.get("commandStack",!1)}ks.$inject=["injector"],ks.prototype.allowed=function(e,t){var n=!0,i=this._commandStack;return i&&(n=i.canExecute(e,t)),void 0===n||n};var Os={__init__:["rules"],rules:["type",ks]},Ds=Math.round,zs=Math.max;function Ns(e,t){return function(e,t){var n,i;for(n=0;i=e[n];n++)if(yt(i,t)<=10)return{point:e[n],bendpoint:!0,index:n};return null}(e,t)||function(e,t){var n,i,r=nn(function(e,t){return[["M",e.x,e.y],["m",0,-t],["a",t,t,0,1,1,0,2*t],["a",t,t,0,1,1,0,-2*t],["z"]]}(t,10),(n=[],e.forEach((function(e,t){n.push([0===t?"M":"L",e.x,e.y])})),n)),o=r[0],a=r[r.length-1];return o?o!==a?o.segment2!==a.segment2?{point:e[i=zs(o.segment2,a.segment2)-1],bendpoint:!0,index:i}:{point:{x:Ds(o.x+a.x)/2,y:Ds(o.y+a.y)/2},index:o.segment2}:{point:{x:Ds(o.x),y:Ds(o.y)},index:o.segment2}:null}(e,t)}var Bs="djs-bendpoint",Ls="djs-segment-dragger";function js(e,t,n){return Ns(t,function(e,t){var n,i=vo(t),r=e._container.getBoundingClientRect();n={x:r.left,y:r.top};var o=e.viewbox();return{x:o.x+(i.x-n.x)/o.scale,y:o.y+(i.y-n.y)/o.scale}}(e,n))}function Is(e,t){var n=ke("g");Ee(n).add(Bs),fe(e,n);var i=ke("circle");ye(i,{cx:0,cy:0,r:4}),Ee(i).add("djs-visual"),fe(n,i);var r=ke("circle");return ye(r,{cx:0,cy:0,r:10}),Ee(r).add("djs-hit"),fe(n,r),t&&Ee(n).add(t),n}function $s(e,t,n,i){var r=ke("g");fe(e,r);var o=function(e,t,n){var i=t.x-e.x,r=t.y-e.y;return Hs("h"===n?i:r)}(t,n,i),a=ke("rect");ye(a,{x:-7,y:-1.5,width:14,height:3}),Ee(a).add("djs-visual"),fe(r,a);var s=ke("rect");return ye(s,{x:-o/2,y:-7,width:o,height:14}),Ee(s).add("djs-hit"),fe(r,s),Hn(r,"v"===i?90:0),r}function Fs(e,t,n){var i=ke("g"),r=wt(t,n),o=_t(t,n);return fe(e,i),$s(i,t,n,o),Ee(i).add(Ls),Ee(i).add("h"===o?"horizontal":"vertical"),Fn(i,r.x,r.y),i}function Hs(e){return Math.abs(Math.round(2*e/3))}function Vs(e,t,n,i,r){function o(e,n){var o=n.waypoints,a=js(t,o,e);if(a)return!function(e,t,n){var i,r,o,a,s,c,l=e.index,p=e.point;return!(l<=0||e.bendpoint)&&(o=wt(i=t[l-1],r=t[l]),a=_t(i,r),s=Math.abs(p.x-o.x),c=Math.abs(p.y-o.y),a&&s<=n&&c<=n)}(a,o,function(e,t){var n,i,r=e.waypoints;return t.index<=0||t.bendpoint?null:(i=_t((n={start:r[t.index-1],end:r[t.index]}).start,n.end))?Hs("h"===i?n.end.x-n.start.x:n.end.y-n.start.y)/2:null}(n,a))?i.start(e,n,a.index,!a.bendpoint):r.start(e,n,a.index),!0}function a(e,t,i){re.bind(e,t,(function(e){n.triggerMouseEvent(t,e,i),e.stopPropagation()}))}function s(e,n){var i=t.getLayer("overlays"),r=ue('.djs-bendpoints[data-element-id="'+Uo(e.id)+'"]',i);return!r&&n&&(ye(r=ke("g"),{"data-element-id":e.id}),Ee(r).add("djs-bendpoints"),fe(i,r),a(r,"mousedown",e),a(r,"click",e),a(r,"dblclick",e)),r}function c(e,t){return ue('.djs-segment-dragger[data-segment-idx="'+e+'"]',t)}function l(e,t){t.waypoints.forEach((function(t,n){var i=Is(e);fe(e,i),Fn(i,t.x,t.y)})),Is(e,"floating")}function p(e,t){for(var n,i,r,o=t.waypoints,s=1;s<o.length;s++)_t(n=o[s-1],i=o[s])&&(ye(r=Fs(e,n,i),{"data-segment-idx":s}),a(r,"mousemove",t))}function u(e){var t=s(e);return t||(l(t=s(e,!0),e),p(t,e)),t}function h(e){var t=s(e);t&&(!function(e){b(he(".djs-segment-dragger",e),(function(e){Ce(e)}))}(t),function(e){b(he(".djs-bendpoint",e),(function(e){Ce(e)}))}(t),p(t,e),l(t,e))}function d(e,t,n){var i,r,o=c(t.index,e),a=n[t.index-1],s=n[t.index],l=t.point,p=wt(a,s),u=_t(a,s);o&&(i=function(e){return ue(".djs-visual",e)}(o),r={x:l.x-p.x,y:l.y-p.y},"v"===u&&(r={x:r.y,y:r.x}),Fn(i,r.x,r.y))}e.on("connection.changed",(function(e){h(e.element)})),e.on("connection.remove",(function(e){var t=s(e.element);t&&Ce(t)})),e.on("element.marker.update",(function(e){var t,n=e.element;n.waypoints&&(t=u(n),e.add?Ee(t).add(e.marker):Ee(t).remove(e.marker))})),e.on("element.mousemove",(function(e){var n,i,r=e.element,o=r.waypoints;if(o){if(n=s(r,!0),!(i=js(t,o,e.originalEvent)))return;!function(e,t){var n=ue(".floating",e),i=t.point;n&&Fn(n,i.x,i.y)}(n,i),i.bendpoint||d(n,i,o)}})),e.on("element.mousedown",(function(e){if(yo(e)){var t=e.originalEvent,n=e.element;if(n.waypoints)return o(t,n)}})),e.on("selection.changed",(function(e){var t=e.newSelection[0];t&&t.waypoints&&u(t)})),e.on("element.hover",(function(e){var t=e.element;t.waypoints&&(u(t),n.registerEvent(e.gfx,"mousemove","element.mousemove"))})),e.on("element.out",(function(e){n.unregisterEvent(e.gfx,"mousemove","element.mousemove")})),e.on("element.updateId",(function(e){var t=e.element,n=e.newId;if(t.waypoints){var i=s(t);i&&ye(i,{"data-element-id":n})}})),this.addHandles=u,this.updateHandles=h,this.getBendpointsContainer=s,this.getSegmentDragger=c}Vs.$inject=["eventBus","canvas","interactionEvents","bendpointMove","connectionSegmentMove"];var Gs=Math.round,Ws="reconnectStart",Us="reconnectEnd",qs="updateWaypoints";function Xs(e,t,n,i,r,o){this._injector=e,this.start=function(e,t,o,a){var s,c=n.getGraphics(t),l=t.source,p=t.target,u=t.waypoints,h=(s=a||0!==o?a||o!==u.length-1?qs:Us:Ws)===qs?"connection.updateWaypoints":"connection.reconnect",d=r.allowed(h,{connection:t,source:l,target:p});!1===d&&(d=r.allowed(h,{connection:t,source:p,target:l})),!1!==d&&i.init(e,"bendpoint.move",{data:{connection:t,connectionGfx:c,context:{allowed:d,bendpointIndex:o,connection:t,source:l,target:p,insert:a,type:s}}})},t.on("bendpoint.move.hover",(function(e){var t,n=e.context,i=n.connection,o=i.source,a=i.target,s=e.hover,c=n.type;if(n.hover=s,s){var l=c===qs?"connection.updateWaypoints":"connection.reconnect";if(t=n.allowed=r.allowed(l,{connection:i,source:c===Ws?s:o,target:c===Us?s:a}))return n.source=c===Ws?s:o,void(n.target=c===Us?s:a);!1===t&&(t=n.allowed=r.allowed(l,{connection:i,source:c===Us?s:a,target:c===Ws?s:o})),t&&(n.source=c===Us?s:a,n.target=c===Ws?s:o)}})),t.on(["bendpoint.move.out","bendpoint.move.cleanup"],(function(e){var t=e.context,n=t.type;t.hover=null,t.source=null,t.target=null,n!==qs&&(t.allowed=!1)})),t.on("bendpoint.move.end",(function(e){var t=e.context,n=t.allowed,i=t.bendpointIndex,r=t.connection,a=t.insert,s=r.waypoints.slice(),c=t.source,l=t.target,p=t.type,u=t.hints||{},h={x:Gs(e.x),y:Gs(e.y)};if(!n)return!1;p===qs?(a?s.splice(i,0,h):s[i]=h,u.bendpointMove={insert:a,bendpointIndex:i},s=this.cropWaypoints(r,s),o.updateWaypoints(r,function(e){e=e.slice();for(var t,n,i,r=0;e[r];)t=e[r],n=e[r-1],0===yt(t,i=e[r+1])||bt(n,i,t)?e.splice(r,1):r++;return e}(s),u)):(p===Ws?(u.docking="source",Ys(t)&&(u.docking="target",u.newWaypoints=s.reverse())):p===Us&&(u.docking="target",Ys(t)&&(u.docking="source",u.newWaypoints=s.reverse())),o.reconnect(r,c,l,h,u))}),this)}function Ys(e){var t=e.hover,n=e.source,i=e.target,r=e.type;return r===Ws?t&&i&&t===i&&n!==i:r===Us?t&&n&&t===n&&n!==i:void 0}Xs.$inject=["injector","eventBus","canvas","dragging","rules","modeling"],Xs.prototype.cropWaypoints=function(e,t){var n=this._injector.get("connectionDocking",!1);if(!n)return t;var i=e.waypoints;return e.waypoints=t,e.waypoints=n.getCroppedWaypoints(e),t=e.waypoints,e.waypoints=i,t};var Ks="updateWaypoints",Zs="connect-ok",Qs="connect-not-ok",Js="connect-hover",ec="djs-updating",tc="djs-element-hidden";function nc(e,t,n,i){this._injector=t;var r=t.get("connectionPreview",!1);n.on("bendpoint.move.start",(function(e){var t=e.context,n=t.bendpointIndex,r=t.connection,o=t.insert,a=r.waypoints,s=a.slice();t.waypoints=a,o&&s.splice(n,0,{x:e.x,y:e.y}),r.waypoints=s,Ee(t.draggerGfx=Is(i.getLayer("overlays"))).add("djs-dragging"),i.addMarker(r,tc),i.addMarker(r,ec)})),n.on("bendpoint.move.hover",(function(e){var t=e.context,n=t.allowed,r=t.hover,o=t.type;if(r){if(i.addMarker(r,Js),o===Ks)return;n?(i.removeMarker(r,Qs),i.addMarker(r,Zs)):!1===n&&(i.removeMarker(r,Zs),i.addMarker(r,Qs))}})),n.on(["bendpoint.move.out","bendpoint.move.cleanup"],1100,(function(e){var t=e.context,n=t.hover,r=t.target;n&&(i.removeMarker(n,Js),i.removeMarker(n,r?Zs:Qs))})),n.on("bendpoint.move.move",(function(t){var n=t.context,i=n.allowed,o=n.bendpointIndex,a=n.draggerGfx,s=n.hover,c=n.type,l=n.connection,p=l.source,u=l.target,h=l.waypoints.slice(),d={x:t.x,y:t.y},m=n.hints||{},f={};r&&(m.connectionStart&&(f.connectionStart=m.connectionStart),m.connectionEnd&&(f.connectionEnd=m.connectionEnd),"reconnectStart"===c?Ys(n)?(f.connectionEnd=f.connectionEnd||d,f.source=u,f.target=s||p,h=h.reverse()):(f.connectionStart=f.connectionStart||d,f.source=s||p,f.target=u):"reconnectEnd"===c?Ys(n)?(f.connectionStart=f.connectionStart||d,f.source=s||u,f.target=p,h=h.reverse()):(f.connectionEnd=f.connectionEnd||d,f.source=p,f.target=s||u):(f.noCropping=!0,f.noLayout=!0,h[o]=d),c===Ks&&(h=e.cropWaypoints(l,h)),f.waypoints=h,r.drawPreview(n,i,f)),Fn(a,t.x,t.y)}),this),n.on(["bendpoint.move.end","bendpoint.move.cancel"],1100,(function(e){var t=e.context,n=t.connection,o=t.draggerGfx,a=t.hover,s=t.target,c=t.waypoints;n.waypoints=c,Ce(o),i.removeMarker(n,ec),i.removeMarker(n,tc),a&&(i.removeMarker(a,Zs),i.removeMarker(a,s?Zs:Qs)),r&&r.cleanUp(t)}))}nc.$inject=["bendpointMove","injector","eventBus","canvas"];var ic="connect-hover",rc="djs-updating";function oc(e,t,n){return ac(e,t,e[t]+n)}function ac(e,t,n){return{x:"x"===t?n:e.x,y:"y"===t?n:e.y}}function sc(e){return"x"===e?"y":"x"}function cc(e,t,n){var i,r;return e.original?e.original:(i=cn(t),ac(e,r=sc(n),i[r]))}function lc(e,t,n,i,r,o){var a=e.get("connectionDocking",!1);function s(e,t){if(!a)return t;var n,i=e.waypoints;return e.waypoints=t,n=a.getCroppedWaypoints(e),e.waypoints=i,n}function c(e){r.update("connection",e.connection,e.connectionGfx)}function l(e,t,n){var i=e.newWaypoints,r=function(e,t,n,i){var r=Math.max(t[i],n[i]),o=Math.min(t[i],n[i]);return ac(t,i,Math.min(Math.max(o+20,e[i]),r-20))}(n,i[e.segmentStartIndex+t],i[e.segmentEndIndex+t],sc(e.axis));Fn(e.draggerGfx,r.x,r.y)}this.start=function(e,t,r){var o,a,s,c,l=n.getGraphics(t),p=r-1,u=r,h=t.waypoints,d=h[p],m=h[u],f=js(n,h,e);(a=_t(d,m))&&(s="v"===a?"x":"y",0===p&&(d=cc(d,t.source,s)),u===h.length-1&&(m=cc(m,t.target,s)),o={connection:t,segmentStartIndex:p,segmentEndIndex:u,segmentStart:d,segmentEnd:m,axis:s,dragPosition:c=f?f.point:{x:(d.x+m.x)/2,y:(d.y+m.y)/2}},i.init(e,c,"connectionSegment.move",{cursor:"x"===s?"resize-ew":"resize-ns",data:{connection:t,connectionGfx:l,context:o}}))},t.on("connectionSegment.move.start",(function(e){var t=e.context,i=e.connection,r=n.getLayer("overlays");t.originalWaypoints=i.waypoints.slice(),t.draggerGfx=Fs(r,t.segmentStart,t.segmentEnd),Ee(t.draggerGfx).add("djs-dragging"),n.addMarker(i,rc)})),t.on("connectionSegment.move.move",(function(e){var t,n,i=e.context,r=i.connection,o=i.segmentStartIndex,a=i.segmentEndIndex,p=i.segmentStart,u=i.segmentEnd,h=i.axis,d=i.originalWaypoints.slice(),m=oc(p,h,e["d"+h]),f=oc(u,h,e["d"+h]),v=d.length,g=0;d[o]=m,d[a]=f,o<2&&(t=ln(r.source,m),1===o?"intersect"===t&&(d.shift(),d[0]=m,g--):"intersect"!==t&&(d.unshift(p),g++)),a>v-3&&(n=ln(r.target,f),a===v-2?"intersect"===n&&(d.pop(),d[d.length-1]=f):"intersect"!==n&&d.push(u)),i.newWaypoints=r.waypoints=s(r,d),l(i,g,e),i.newSegmentStartIndex=o+g,c(e)})),t.on("connectionSegment.move.hover",(function(e){e.context.hover=e.hover,n.addMarker(e.hover,ic)})),t.on(["connectionSegment.move.out","connectionSegment.move.cleanup"],(function(e){var t=e.context.hover;t&&n.removeMarker(t,ic)})),t.on("connectionSegment.move.cleanup",(function(e){var t=e.context,i=t.connection;t.draggerGfx&&Ce(t.draggerGfx),n.removeMarker(i,rc)})),t.on(["connectionSegment.move.cancel","connectionSegment.move.end"],(function(e){var t=e.context;t.connection.waypoints=t.originalWaypoints,c(e)})),t.on("connectionSegment.move.end",(function(e){var t=e.context,n=t.connection,i=t.newWaypoints,r=t.newSegmentStartIndex,a=function(e,t){var n=0;return{waypoints:e.filter((function(i,r){return!bt(e[r-1],e[r+1],i)||(n=r<=t?n-1:n,!1)})),segmentOffset:n}}(i=i.map((function(e){return{original:e.original,x:Math.round(e.x),y:Math.round(e.y)}})),r),c=s(n,a.waypoints),l=a.segmentOffset,p={segmentMove:{segmentStartIndex:t.segmentStartIndex,newSegmentStartIndex:r+l}};o.updateWaypoints(n,c,p)}))}lc.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","modeling"];var pc=Math.abs,uc=Math.round;function hc(e){return{x:e.x,y:e.y}}function dc(e){return{x:e.x+e.width,y:e.y+e.height}}function mc(e,t){return!e||isNaN(e.x)||isNaN(e.y)?t:{x:uc(e.x+e.width/2),y:uc(e.y+e.height/2)}}function fc(e,t){var n=e.snapped;return!!n&&("string"==typeof t?n[t]:n.x&&n.y)}function vc(e,t,n){if("string"!=typeof t)throw new Error("axis must be in [x, y]");if("number"!=typeof n&&!1!==n)throw new Error("value must be Number or false");var i,r=e[t],o=e.snapped=e.snapped||{};return!1===n?o[t]=!1:(o[t]=!0,i=n-r,e[t]+=i,e["d"+t]+=i),r}function gc(e){return e.children||[]}var yc=Math.abs,bc=Math.round;function _c(e){function t(e,t){if(u(e)){for(var n=e.length;n--;)if(yc(e[n]-t)<=10)return e[n]}else{var i=t%(e=+e);if(i<10)return t-i;if(i>e-10)return t-i+e}return t}function n(e){if(e.width)return{x:bc(e.width/2+e.x),y:bc(e.height/2+e.y)}}e.on("connectionSegment.move.move",1500,(function(e){var i,r,o=function(e){var t=e.snapPoints,i=e.connection,r=i.waypoints,o=e.segmentStart,a=e.segmentStartIndex,s=e.segmentEnd,c=e.segmentEndIndex,l=e.axis;if(t)return t;var p=[r[a-1],o,s,r[c+1]];return a<2&&p.unshift(n(i.source)),c>r.length-3&&p.unshift(n(i.target)),e.snapPoints=t={horizontal:[],vertical:[]},b(p,(function(e){e&&(e=e.original||e,"y"===l&&t.horizontal.push(e.y),"x"===l&&t.vertical.push(e.x))})),t}(e.context),a=e.x,s=e.y;if(o){var c=a-(i=t(o.vertical,a)),l=s-(r=t(o.horizontal,s));$(e,{dx:e.dx-c,dy:e.dy-l,x:i,y:r}),(c||-1!==o.vertical.indexOf(a))&&vc(e,"x",i),(l||-1!==o.horizontal.indexOf(s))&&vc(e,"y",r)}})),e.on(["bendpoint.move.move","bendpoint.move.end"],1500,(function(e){var i,r,o=e.context,a=function(e){var t=e.snapPoints,n=e.connection.waypoints,i=e.bendpointIndex;if(t)return t;var r=[n[i-1],n[i+1]];return e.snapPoints=t={horizontal:[],vertical:[]},b(r,(function(e){e&&(e=e.original||e,t.horizontal.push(e.y),t.vertical.push(e.x))})),t}(o),s=o.hover,c=s&&n(s),l=e.x,p=e.y;if(a){var u=l-(i=t(c?a.vertical.concat([c.x]):a.vertical,l)),h=p-(r=t(c?a.horizontal.concat([c.y]):a.horizontal,p));$(e,{dx:e.dx-u,dy:e.dy-h,x:e.x-u,y:e.y-h}),(u||-1!==a.vertical.indexOf(l))&&vc(e,"x",i),(h||-1!==a.horizontal.indexOf(p))&&vc(e,"y",r)}}))}_c.$inject=["eventBus"];var xc={__depends__:[Ps,Os],__init__:["bendpoints","bendpointSnapping","bendpointMovePreview"],bendpoints:["type",Vs],bendpointMove:["type",Xs],bendpointMovePreview:["type",nc],connectionSegmentMove:["type",lc],bendpointSnapping:["type",_c]};function wc(e,t,n,i){function r(e,t){return i.allowed("connection.create",{source:e,target:t})}e.on("connect.hover",(function(e){var t,n=e.context,i=n.start,o=e.hover;if(n.hover=o,!p(t=n.canExecute=r(i,o))){if(!1!==t)return n.source=i,void(n.target=o);p(t=n.canExecute=r(o,i))||!1!==t&&(n.source=o,n.target=i)}})),e.on(["connect.out","connect.cleanup"],(function(e){var t=e.context;t.hover=null,t.source=null,t.target=null,t.canExecute=!1})),e.on("connect.end",(function(e){var t=e.context,i=t.canExecute,r=t.connectionStart,o={x:e.x,y:e.y},a=t.source,s=t.target;if(!i)return!1;var c=null,l={connectionStart:Ec(t)?o:r,connectionEnd:Ec(t)?r:o};h(i)&&(c=i),n.connect(a,s,c,l)})),this.start=function(e,n,i,r){h(i)||(r=i,i=cn(n)),t.init(e,"connect",{autoActivate:r,data:{shape:n,context:{start:n,connectionStart:i}}})}}function Ec(e){var t=e.hover,n=e.source,i=e.target;return t&&n&&t===n&&n!==i}wc.$inject=["eventBus","dragging","modeling","rules"];var Sc="connect-ok",Cc="connect-not-ok";function Rc(e,t,n){var i=e.get("connectionPreview",!1);i&&t.on("connect.move",(function(e){var t=e.context,n=t.canExecute,r=t.hover,o=t.source,a=t.start,s=t.startPosition,c=t.target,l=t.connectionStart||s,p=t.connectionEnd||{x:e.x,y:e.y},u=l,h=p;Ec(t)&&(u=p,h=l),i.drawPreview(t,n,{source:o||a,target:c||r,connectionStart:u,connectionEnd:h})})),t.on("connect.hover",900,(function(e){var t=e.context,i=e.hover,r=t.canExecute;null!==r&&n.addMarker(i,r?Sc:Cc)})),t.on(["connect.out","connect.cleanup"],1100,(function(e){var t=e.hover;t&&(n.removeMarker(t,Sc),n.removeMarker(t,Cc))})),i&&t.on("connect.cleanup",(function(e){i.cleanUp(e.context)}))}Rc.$inject=["injector","eventBus","canvas"];var Pc={__depends__:[Do,Os,Ps],__init__:["connectPreview"],connect:["type",wc],connectPreview:["type",Rc]};function Mc(e,t,n,i){this._canvas=t,this._graphicsFactory=n,this._elementFactory=i,this._connectionDocking=e.get("connectionDocking",!1),this._layouter=e.get("layouter",!1)}Mc.$inject=["injector","canvas","graphicsFactory","elementFactory"],Mc.prototype.drawPreview=function(e,t,n){n=n||{};var i,r=e.connectionPreviewGfx,o=e.getConnection,a=n.source,s=n.target,c=n.waypoints,l=n.connectionStart,p=n.connectionEnd,u=n.noLayout,h=n.noCropping,d=n.noNoop,m=this;r||(r=e.connectionPreviewGfx=this.createConnectionPreviewGfx()),Re(r),o||(o=e.getConnection=function(e){var t={};return function(n){var i=JSON.stringify(n),r=t[i];return r||(r=t[i]=e.apply(null,arguments)),r}}((function(e,t,n){return m.getConnection(e,t,n)}))),t&&(i=o(t,a,s)),i?(i.waypoints=c||[],this._layouter&&!u&&(i.waypoints=this._layouter.layoutConnection(i,{source:a,target:s,connectionStart:l,connectionEnd:p,waypoints:n.waypoints||i.waypoints})),i.waypoints&&i.waypoints.length||(i.waypoints=[a?cn(a):l,s?cn(s):p]),this._connectionDocking&&(a||s)&&!h&&(i.waypoints=this._connectionDocking.getCroppedWaypoints(i,a,s)),this._graphicsFactory.drawConnection(r,i)):!d&&this.drawNoopPreview(r,n)},Mc.prototype.drawNoopPreview=function(e,t){var n=t.source,i=t.target,r=t.connectionStart||cn(n),o=t.connectionEnd||cn(i),a=this.cropWaypoints(r,o,n,i);fe(e,this.createNoopConnection(a[0],a[1]))},Mc.prototype.cropWaypoints=function(e,t,n,i){var r=this._graphicsFactory,o=n&&r.getShapePath(n),a=i&&r.getShapePath(i),s=r.getConnectionPath({waypoints:[e,t]});return[e=n&&pn(o,s,!0)||e,t=i&&pn(a,s,!1)||t]},Mc.prototype.cleanUp=function(e){e&&e.connectionPreviewGfx&&Ce(e.connectionPreviewGfx)},Mc.prototype.getConnection=function(e){var t=function(e){return h(e)?e:{}}(e);return this._elementFactory.createConnection(t)},Mc.prototype.createConnectionPreviewGfx=function(){var e=ke("g");return ye(e,{pointerEvents:"none"}),Ee(e).add("djs-connection-preview"),fe(this._canvas.getActiveLayer(),e),e},Mc.prototype.createNoopConnection=function(e,t){var n=ke("polyline");return ye(n,{stroke:"#333",strokeDasharray:[1],strokeWidth:2,"pointer-events":"none"}),ye(n,{points:[e.x,e.y,t.x,t.y]}),n};var Tc={__init__:["connectionPreview"],connectionPreview:["type",Mc]};function Ac(e,t){return(function(e){return e.originalEvent||e.srcEvent}(e)||e).button===t}function kc(e){return Ac(e,0)}function Oc(e){for(var t,n="",i=0;t=e[i];i++)n+=t.x+","+t.y+" ";return n}function Dc(e){return!0}function zc(e){return kc(e)||function(e){return Ac(e,1)}(e)}function Nc(e,t,n){var i=this;function r(n,i,r){var o,a;(function(e,t){return!(c[e]||kc)(t)})(n,i)||(r?a=t.getGraphics(r):(o=i.delegateTarget||i.target)&&(a=o,r=t.get(a)),a&&r&&!1===e.fire(n,{element:r,gfx:a,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var o={};function a(e){return o[e]}var s={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},c={"element.contextmenu":Dc,"element.mousedown":zc,"element.mouseup":zc,"element.click":zc,"element.dblclick":zc};function l(e,t,n,i){var a=o[n]=function(e){r(n,e)};i&&(c[n]=i),a.$delegate=se.bind(e,"svg, .djs-element",t,a)}function p(e,t,n){var i=a(n);i&&se.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){var t;t=e.svg,b(s,(function(e,n){p(t,n,e)}))})),e.on("canvas.init",(function(e){var t;t=e.svg,b(s,(function(e,n){l(t,n,e)}))})),e.on(["shape.added","connection.added"],(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.createHit",{element:n,gfx:i})})),e.on(["shape.changed","connection.changed"],500,(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.updateHit",{element:n,gfx:i})})),e.on("interactionEvents.createHit",500,(function(e){var t=e.element,n=e.gfx;i.createDefaultHit(t,n)})),e.on("interactionEvents.updateHit",(function(e){var t=e.element,n=e.gfx;i.updateDefaultHit(t,n)}));var u=m("djs-hit djs-hit-stroke"),h=m("djs-hit djs-hit-click-stroke"),d={all:m("djs-hit djs-hit-all"),"click-stroke":h,stroke:u};function m(e,t){return t=$({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function f(e,t){var n=d[t];if(!n)throw new Error("invalid hit type <"+t+">");return ye(e,n),e}function v(e,t){fe(e,t)}this.removeHits=function(e){b(he(".djs-hit",e),Ce)},this.createDefaultHit=function(e,t){var n,i=e.waypoints,r=e.isFrame;return i?this.createWaypointsHit(t,i):(n=r?"stroke":"all",this.createBoxHit(t,n,{width:e.width,height:e.height}))},this.createWaypointsHit=function(e,t){var n,i,r,o=(n=t,ye(r=ke("polyline"),{points:Oc(n)}),i&&ye(r,i),r);return f(o,"stroke"),v(e,o),o},this.createBoxHit=function(e,t,n){n=$({x:0,y:0},n);var i=ke("rect");return f(i,t),ye(i,n),v(e,i),i},this.updateDefaultHit=function(e,t){var n=ue(".djs-hit",t);if(n)return e.waypoints?function(e,t){ye(e,{points:Oc(t)})}(n,e.waypoints):ye(n,{width:e.width,height:e.height}),n},this.fire=r,this.triggerMouseEvent=function(e,t,n){var i=s[e];if(!i)throw new Error("unmapped DOM event name <"+e+">");return r(i,t,n)},this.mouseHandler=a,this.registerEvent=l,this.unregisterEvent=p}Nc.$inject=["eventBus","elementRegistry","styles"];var Bc={__init__:["interactionEvents"],interactionEvents:["type",Nc]},Lc=Math.min,jc=Math.max;function Ic(e){e.preventDefault()}function $c(e){e.stopPropagation()}function Fc(e){this.container=e.container,this.parent=ce('<div class="djs-direct-editing-parent"><div class="djs-direct-editing-content" contenteditable="true"></div></div>'),this.content=ue("[contenteditable]",this.parent),this.keyHandler=e.keyHandler||function(){},this.resizeHandler=e.resizeHandler||function(){},this.autoResize=j(this.autoResize,this),this.handlePaste=j(this.handlePaste,this)}function Hc(e,t){this._eventBus=e,this._providers=[],this._textbox=new Fc({container:t.getContainer(),keyHandler:j(this._handleKey,this),resizeHandler:j(this._handleResize,this)})}Fc.prototype.create=function(e,t,n,i){var r=this.parent,o=this.content,a=this.container;i=this.options=i||{};var s=F(t=this.style=t||{},["width","height","maxWidth","maxHeight","minWidth","minHeight","left","top","backgroundColor","position","overflow","border","wordWrap","textAlign","outline","transform"]);$(r.style,{width:e.width+"px",height:e.height+"px",maxWidth:e.maxWidth+"px",maxHeight:e.maxHeight+"px",minWidth:e.minWidth+"px",minHeight:e.minHeight+"px",left:e.x+"px",top:e.y+"px",backgroundColor:"#ffffff",position:"absolute",overflow:"visible",border:"1px solid #ccc",boxSizing:"border-box",wordWrap:"normal",textAlign:"center",outline:"none"},s);var c=F(t,["fontFamily","fontSize","fontWeight","lineHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"]);return $(o.style,{boxSizing:"border-box",width:"100%",outline:"none",wordWrap:"break-word"},c),i.centerVertically&&$(o.style,{position:"absolute",top:"50%",transform:"translate(0, -50%)"},c),o.innerText=n,re.bind(o,"keydown",this.keyHandler),re.bind(o,"mousedown",$c),re.bind(o,"paste",this.handlePaste),i.autoResize&&re.bind(o,"input",this.autoResize),i.resizable&&this.resizable(t),a.appendChild(r),this.setSelection(o.lastChild,o.lastChild&&o.lastChild.length),r},Fc.prototype.handlePaste=function(e){var t,n=this.options,i=this.style;if(e.preventDefault(),t=e.clipboardData?e.clipboardData.getData("text/plain"):window.clipboardData.getData("Text"),this.insertText(t),n.autoResize){var r=this.autoResize(i);r&&this.resizeHandler(r)}},Fc.prototype.insertText=function(e){e=e.replace(/\r\n|\r|\n/g,"\n"),document.execCommand("insertText",!1,e)||this._insertTextIE(e)},Fc.prototype._insertTextIE=function(e){var t,n,i,r=this.getSelection(),o=r.startContainer,a=r.endContainer,s=r.startOffset,c=r.endOffset,l=r.commonAncestorContainer,p=(t=l.childNodes,[].slice.call(t));if(function(e){return e.nodeType===Node.TEXT_NODE}(l)){var u=o.textContent;o.textContent=u.substring(0,s)+e+u.substring(c),n=o,i=s+e.length}else if(o===this.content&&a===this.content){var h=document.createTextNode(e);this.content.insertBefore(h,p[s]),n=h,i=h.textContent.length}else{var d=p.indexOf(o),m=p.indexOf(a);p.forEach((function(t,n){n===d?t.textContent=o.textContent.substring(0,s)+e+a.textContent.substring(c):n>d&&n<=m&&de(t)})),n=o,i=s+e.length}n&&void 0!==i&&setTimeout((function(){self.setSelection(n,i)}))},Fc.prototype.autoResize=function(){var e=this.parent,t=this.content,n=parseInt(this.style.fontSize)||12;if(t.scrollHeight>e.offsetHeight||t.scrollHeight<e.offsetHeight-n){var i=e.getBoundingClientRect(),r=t.scrollHeight;e.style.height=r+"px",this.resizeHandler({width:i.width,height:i.height,dx:0,dy:r-i.height})}},Fc.prototype.resizable=function(){var e=this,t=this.parent,n=this.resizeHandle,i=parseInt(this.style.minWidth)||0,r=parseInt(this.style.minHeight)||0,o=parseInt(this.style.maxWidth)||1/0,a=parseInt(this.style.maxHeight)||1/0;if(!n){var s,c,l,p;n=this.resizeHandle=ce('<div class="djs-direct-editing-resize-handle"></div>');var u=function(n){Ic(n),$c(n);var u=Lc(jc(l+n.clientX-s,i),o),h=Lc(jc(p+n.clientY-c,r),a);t.style.width=u+"px",t.style.height=h+"px",e.resizeHandler({width:l,height:p,dx:n.clientX-s,dy:n.clientY-c})},h=function(e){Ic(e),$c(e),re.unbind(document,"mousemove",u,!1),re.unbind(document,"mouseup",h,!1)};re.bind(n,"mousedown",(function(e){Ic(e),$c(e),s=e.clientX,c=e.clientY;var n=t.getBoundingClientRect();l=n.width,p=n.height,re.bind(document,"mousemove",u),re.bind(document,"mouseup",h)}))}$(n.style,{position:"absolute",bottom:"0px",right:"0px",cursor:"nwse-resize",width:"0",height:"0",borderTop:(parseInt(this.style.fontSize)/4||3)+"px solid transparent",borderRight:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderBottom:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderLeft:(parseInt(this.style.fontSize)/4||3)+"px solid transparent"}),t.appendChild(n)},Fc.prototype.destroy=function(){var e=this.parent,t=this.content,n=this.resizeHandle;t.innerText="",e.removeAttribute("style"),t.removeAttribute("style"),re.unbind(t,"keydown",this.keyHandler),re.unbind(t,"mousedown",$c),re.unbind(t,"input",this.autoResize),re.unbind(t,"paste",this.handlePaste),n&&(n.removeAttribute("style"),de(n)),de(e)},Fc.prototype.getValue=function(){return this.content.innerText.trim()},Fc.prototype.getSelection=function(){return window.getSelection().getRangeAt(0)},Fc.prototype.setSelection=function(e,t){var n=document.createRange();null===e?n.selectNodeContents(this.content):(n.setStart(e,t),n.setEnd(e,t));var i=window.getSelection();i.removeAllRanges(),i.addRange(n)},Hc.$inject=["eventBus","canvas"],Hc.prototype.registerProvider=function(e){this._providers.push(e)},Hc.prototype.isActive=function(){return!!this._active},Hc.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close())},Hc.prototype._fire=function(e,t){this._eventBus.fire("directEditing."+e,t||{active:this._active})},Hc.prototype.close=function(){this._textbox.destroy(),this._fire("deactivate"),this._active=null,this.resizable=void 0},Hc.prototype.complete=function(){var e=this._active;if(e){var t,n=e.context.bounds,i=this.$textbox.getBoundingClientRect(),r=this.getValue();r===e.context.text&&i.height===n.height&&i.width===n.width||(t=this._textbox.container.getBoundingClientRect(),e.provider.update(e.element,r,e.context.text,{x:i.left-t.left,y:i.top-t.top,width:i.width,height:i.height})),this._fire("complete"),this.close()}},Hc.prototype.getValue=function(){return this._textbox.getValue()},Hc.prototype._handleKey=function(e){e.stopPropagation();var t=e.keyCode||e.charCode;return 27===t?(e.preventDefault(),this.cancel()):13!==t||e.shiftKey?void 0:(e.preventDefault(),this.complete())},Hc.prototype._handleResize=function(e){this._fire("resize",e)},Hc.prototype.activate=function(e){var t;this.isActive()&&this.cancel();var n=g(this._providers,(function(n){return(t=n.activate(e))?n:null}));return t&&(this.$textbox=this._textbox.create(t.bounds,t.style,t.text,t.options),this._active={element:e,context:t,provider:n},t.options&&t.options.resizable&&(this.resizable=!0),this._fire("activate")),!!t};var Vc={__depends__:[Bc],__init__:["directEditing"],directEditing:["type",Hc]},Gc=".entry";function Wc(e,t,n){this._eventBus=t,this._overlays=n;var i=l(e&&e.scale)?e.scale:{min:1,max:1.5};this._overlaysConfig={position:{right:-9,top:-6},scale:i},this._current=null,this._init()}Wc.$inject=["config.contextPad","eventBus","overlays"],Wc.prototype._init=function(){var e=this._eventBus,t=this;e.on("selection.changed",(function(e){var n=e.newSelection;1===n.length?t.open(n[0]):t.close()})),e.on("elements.delete",(function(e){b(e.elements,(function(e){t.isOpen(e)&&t.close()}))})),e.on("element.changed",(function(e){var n=e.element,i=t._current;i&&i.element===n&&t.open(n,!0)}))},Wc.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("contextPad.getProviders",e,(function(e){e.providers.push(t)}))},Wc.prototype.getEntries=function(e){var t=this._getProviders(),n={};return b(t,(function(t){var i=t.getContextPadEntries(e);m(i)?n=i(n):b(i,(function(e,t){n[t]=e}))})),n},Wc.prototype.trigger=function(e,t,n){var i,r,o=this._current.element,a=this._current.entries,s=t.delegateTarget||t.target;if(!s)return t.preventDefault();if(i=a[V(s,"data-action")].action,r=t.originalEvent||t,m(i)){if("click"===e)return i(r,o,n)}else if(i[e])return i[e](r,o,n);t.preventDefault()},Wc.prototype.open=function(e,t){!t&&this.isOpen(e)||(this.close(),this._updateAndOpen(e))},Wc.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},Wc.prototype._updateAndOpen=function(e){var t=this.getEntries(e),n=this.getPad(e),i=n.html;b(t,(function(e,t){var n,r=e.group||"default",o=ce(e.html||'<div class="entry" draggable="true"></div>');V(o,"data-action",t),(n=ue("[data-group="+r+"]",i))||(n=ce('<div class="group" data-group="'+r+'"></div>'),i.appendChild(n)),n.appendChild(o),e.className&&function(e,t){var n=X(e);(u(t)?t:t.split(/\s+/g)).forEach((function(e){n.add(e)}))}(o,e.className),e.title&&V(o,"title",e.title),e.imageUrl&&o.appendChild(ce('<img src="'+e.imageUrl+'">'))})),X(i).add("open"),this._current={element:e,pad:n,entries:t},this._eventBus.fire("contextPad.open",{current:this._current})},Wc.prototype.getPad=function(e){if(this.isOpen())return this._current.pad;var t=this,n=this._overlays,i=ce('<div class="djs-context-pad"></div>'),r=$({html:i},this._overlaysConfig);se.bind(i,Gc,"click",(function(e){t.trigger("click",e)})),se.bind(i,Gc,"dragstart",(function(e){t.trigger("dragstart",e)})),re.bind(i,"mousedown",(function(e){e.stopPropagation()})),this._overlayId=n.add(e,"context-pad",r);var o=n.get(this._overlayId);return this._eventBus.fire("contextPad.create",{element:e,pad:o}),o},Wc.prototype.close=function(){this.isOpen()&&(this._overlays.remove(this._overlayId),this._overlayId=null,this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)},Wc.prototype.isOpen=function(e){return!(!this._current||e&&this._current.element!==e)};var Uc={__depends__:[So,$o],contextPad:["type",Wc]},qc=["marker-start","marker-mid","marker-end"],Xc=["circle","ellipse","line","path","polygon","polyline","rect"];function Yc(e,t,n,i){this._elementRegistry=e,this._canvas=n,this._styles=i,this._clonedMarkers={};var r=this;t.on("drag.cleanup",(function(){b(r._clonedMarkers,(function(e){Ce(e)})),r._clonedMarkers={}}))}Yc.$inject=["elementRegistry","eventBus","canvas","styles"],Yc.prototype.getGfx=function(e){return this._elementRegistry.getGraphics(e)},Yc.prototype.addDragger=function(e,t,n){var i=Pe(n=n||this.getGfx(e)),r=n.getBoundingClientRect();return this._cloneMarkers(In(i)),ye(i,this._styles.cls("djs-dragger",[],{x:r.top,y:r.left})),fe(t,i),i},Yc.prototype.addFrame=function(e,t){var n=ke("rect",{class:"djs-resize-overlay",width:e.width,height:e.height,x:e.x,y:e.y});return fe(t,n),n},Yc.prototype._cloneMarkers=function(e){var t=this;if(e.childNodes)for(var n=0;n<e.childNodes.length;n++)t._cloneMarkers(e.childNodes[n]);(function(e){return-1!==Xc.indexOf(e.nodeName)})(e)&&qc.forEach((function(n){if(ye(e,n)){var i=function(e,t,n){return ue("marker#"+(i=ye(e,t),i.match(/url\(['"]?#([^'"]*)['"]?\)/)[1]),n||document);var i}(e,n,t._canvas.getContainer());t._cloneMarker(e,i,n)}}))},Yc.prototype._cloneMarker=function(e,t,n){var i=t.id,r=this._clonedMarkers[i];if(!r){var o=i+"-clone";(r=Pe(t)).id=o,Ee(r).add("djs-dragger").add("djs-dragger-marker"),this._clonedMarkers[i]=r;var a=ue("defs",this._canvas._svg);a||(a=ke("defs"),fe(this._canvas._svg,a)),fe(a,r)}ye(e,n,"url(#"+this._clonedMarkers[i].id+")")};var Kc={__init__:["previewSupport"],previewSupport:["type",Yc]},Zc="drop-ok",Qc="drop-not-ok",Jc="attach-ok",el="new-parent",tl="create";function nl(e,t,n,i,r){function o(t,n){[Jc,Zc,Qc,el].forEach((function(i){i===n?e.addMarker(t,i):e.removeMarker(t,i)}))}function a(){var e=t.context();e&&e.prefix===tl&&t.cancel()}n.on(["create.move","create.hover"],(function(e){var t=e.context,n=t.elements,i=e.hover,a=t.source,s=t.hints||{};if(!i)return t.canExecute=!1,void(t.target=null);il(e);var c={x:e.x,y:e.y},l=t.canExecute=i&&function(e,t,n,i,o){if(!t)return!1;var a=g(e=y(e,(function(t){var n=t.labelTarget;return!(t.parent||function(e){return!!e.labelTarget}(t)&&-1!==e.indexOf(n))})),(function(e){return!rl(e)})),s=!1,c=!1,l=!1;ol(e)&&(s=r.allowed("shape.attach",{position:n,shape:a,target:t})),s||(l=ol(e)?r.allowed("shape.create",{position:n,shape:a,source:i,target:t}):r.allowed("elements.create",{elements:e,position:n,target:t}));var p=o.connectionTarget;return l||s?(a&&i&&(c=r.allowed("connection.create",{source:p===i?a:i,target:p===i?i:a,hints:{targetParent:t,targetAttach:s}})),{attach:s,connect:c}):(null===l||null===s)&&null}(n,i,c,a,s);i&&null!==l&&(t.target=i,l&&l.attach?o(i,Jc):o(i,l?el:Qc))})),n.on(["create.end","create.out","create.cleanup"],(function(e){var t=e.hover;t&&o(t,null)})),n.on("create.end",(function(e){var t=e.context,n=t.source,r=t.shape,o=t.elements,a=t.target,s=t.canExecute,c=s&&s.attach,l=s&&s.connect,p=t.hints||{};if(!1===s||!a)return!1;il(e);var u={x:e.x,y:e.y};r=l?i.appendShape(n,r,u,a,{attach:c,connection:!0===l?{}:l,connectionTarget:p.connectionTarget}):g(o=i.createElements(o,u,a,$({},p,{attach:c})),(function(e){return!rl(e)})),$(t,{elements:o,shape:r}),$(e,{elements:o,shape:r})})),n.on("create.init",(function(){n.on("elements.changed",a),n.once(["create.cancel","create.end"],2e3,(function(){n.off("elements.changed",a)}))})),this.start=function(e,n,i){u(n)||(n=[n]);var r=g(n,(function(e){return!rl(e)}));if(r){i=$({elements:n,hints:{},shape:r},i||{}),b(n,(function(e){d(e.x)||(e.x=0),d(e.y)||(e.y=0)}));var o=lt(y(n,(function(e){return!e.hidden})));b(n,(function(e){rl(e)&&(e.waypoints=S(e.waypoints,(function(e){return{x:e.x-o.x-o.width/2,y:e.y-o.y-o.height/2}}))),$(e,{x:e.x-o.x-o.width/2,y:e.y-o.y-o.height/2})})),t.init(e,tl,{cursor:"grabbing",autoActivate:!0,data:{shape:r,elements:n,context:i}})}}}function il(e){var t=e.context.createConstraints;t&&(t.left&&(e.x=Math.max(e.x,t.left)),t.right&&(e.x=Math.min(e.x,t.right)),t.top&&(e.y=Math.max(e.y,t.top)),t.bottom&&(e.y=Math.min(e.y,t.bottom)))}function rl(e){return!!e.waypoints}function ol(e){return e&&1===e.length&&!rl(e[0])}nl.$inject=["canvas","dragging","eventBus","modeling","rules"];function al(e,t,n,i,r){t.on("create.move",750,(function(t){var o=t.hover,a=t.context,s=a.elements,c=a.dragGroup;c||(c=a.dragGroup=function(e){var t=ke("g");ye(t,r.cls("djs-drag-group",["no-events"]));var o=ke("g");return e.forEach((function(e){var r;e.hidden||(e.waypoints?(r=n._createContainer("connection",o),n.drawConnection(In(r),e)):(r=n._createContainer("shape",o),n.drawShape(In(r),e),Fn(r,e.x,e.y)),i.addDragger(e,t,r))})),t}(s)),o?(c.parentNode||fe(e.getActiveLayer(),c),Fn(c,t.x,t.y)):Ce(c)})),t.on("create.cleanup",(function(e){var t=e.context.dragGroup;t&&Ce(t)}))}al.$inject=["canvas","eventBus","graphicsFactory","previewSupport","styles"];var sl={__depends__:[Ps,Kc,Os,Do],__init__:["create","createPreview"],create:["type",nl],createPreview:["type",al]},cl="data-id",ll=["contextPad.close","canvas.viewbox.changing","commandStack.changed"];function pl(e,t,n){var i=l(e&&e.scale)?e.scale:{min:1,max:1.5};this._config={scale:i},this._eventBus=t,this._canvas=n,this._providers={},this._current={}}pl.$inject=["config.popupMenu","eventBus","canvas"],pl.prototype.registerProvider=function(e,t,n){n||(n=t,t=1e3),this._eventBus.on("popupMenu.getProviders."+e,t,(function(e){e.providers.push(n)}))},pl.prototype.isEmpty=function(e,t){if(!e)throw new Error("element parameter is missing");if(!t)throw new Error("providerId parameter is missing");var n=this._getProviders(t);if(!n)return!0;var i=this._getEntries(e,n),r=this._getHeaderEntries(e,n),o=R(i)>0,a=r&&R(r)>0;return!o&&!a},pl.prototype.open=function(e,t,n){var i=this._getProviders(t);if(!e)throw new Error("Element is missing");if(!i||!i.length)throw new Error("No registered providers for: "+t);if(!n)throw new Error("the position argument is missing");this.isOpen()&&this.close(),this._emit("open");var r=this._current={className:t,element:e,position:n},o=this._getEntries(e,i),a=this._getHeaderEntries(e,i);r.entries=$({},o,a),r.container=this._createContainer(),R(a)&&r.container.appendChild(this._createEntries(a,"djs-popup-header")),R(o)&&r.container.appendChild(this._createEntries(o,"djs-popup-body"));var s=this._canvas.getContainer();this._attachContainer(r.container,s,n.cursor),this._bindAutoClose()},pl.prototype.close=function(){this.isOpen()&&(this._emit("close"),this._unbindAutoClose(),de(this._current.container),this._current.container=null)},pl.prototype.isOpen=function(){return!!this._current.container},pl.prototype.trigger=function(e){e.preventDefault();var t=V(e.delegateTarget||e.target,cl),n=this._getEntry(t);if(n.action)return n.action.call(null,e,n)},pl.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"popupMenu.getProviders."+e,providers:[]});return this._eventBus.fire(t),t.providers},pl.prototype._getEntries=function(e,t){var n={};return b(t,(function(t){if(t.getPopupMenuEntries){var i=t.getPopupMenuEntries(e);m(i)?n=i(n):b(i,(function(e,t){n[t]=e}))}else b(t.getEntries(e),(function(e){var t=e.id;if(!t)throw new Error("every entry must have the id property set");n[t]=H(e,["id"])}))})),n},pl.prototype._getHeaderEntries=function(e,t){var n={};return b(t,(function(t){if(t.getPopupMenuHeaderEntries){var i=t.getPopupMenuHeaderEntries(e);m(i)?n=i(n):b(i,(function(e,t){n[t]=e}))}else{if(!t.getHeaderEntries)return;b(t.getHeaderEntries(e),(function(e){var t=e.id;if(!t)throw new Error("every entry must have the id property set");n[t]=H(e,["id"])}))}})),n},pl.prototype._getEntry=function(e){var t=this._current.entries[e];if(!t)throw new Error("entry not found");return t},pl.prototype._emit=function(e){this._eventBus.fire("popupMenu."+e)},pl.prototype._createContainer=function(){var e=ce('<div class="djs-popup">'),t=this._current.position,n=this._current.className;return $(e.style,{position:"absolute",left:t.x+"px",top:t.y+"px",visibility:"hidden"}),X(e).add(n),e},pl.prototype._attachContainer=function(e,t,n){var i=this;se.bind(e,".entry","click",(function(e){i.trigger(e)})),this._updateScale(e),t.appendChild(e),n&&this._assureIsInbounds(e,n)},pl.prototype._updateScale=function(e){var t,n,i=this._canvas.zoom(),r=this._config.scale,o=i;!0!==r&&(!1===r?(t=1,n=1):(t=r.min,n=r.max),l(t)&&i<t&&(o=t),l(n)&&i>n&&(o=n)),function(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}(e,"scale("+o+")")},pl.prototype._assureIsInbounds=function(e,t){var n,i,r=this._canvas._container.getBoundingClientRect(),o=e.offsetLeft,a=e.offsetTop,s=e.scrollWidth,c=e.scrollHeight,l={},p=t.x-r.left,u=t.y-r.top;o+s>r.width&&(l.x=!0),a+c>r.height&&(l.y=!0),l.x&&l.y?(n=p-s+"px",i=u-c+"px"):l.x?(n=p-s+"px",i=u+"px"):l.y&&u<c?(n=p+"px",i="10px"):l.y&&(n=p+"px",i=u-c+"px"),$(e.style,{left:n,top:i},{visibility:"visible","z-index":1e3})},pl.prototype._createEntries=function(e,t){var n=ce("<div>"),i=this;return X(n).add(t),b(e,(function(e,t){var r=i._createEntry(e,t);n.appendChild(r)})),n},pl.prototype._createEntry=function(e,t){var n=ce("<div>"),i=X(n);if(i.add("entry"),e.className&&e.className.split(" ").forEach((function(e){i.add(e)})),V(n,cl,t),e.label){var r=ce("<span>");r.textContent=e.label,n.appendChild(r)}return e.imageUrl&&n.appendChild(ce('<img src="'+e.imageUrl+'" />')),!0===e.active&&i.add("active"),!0===e.disabled&&i.add("disabled"),e.title&&(n.title=e.title),n},pl.prototype._bindAutoClose=function(){this._eventBus.once(ll,this.close,this)},pl.prototype._unbindAutoClose=function(){this._eventBus.off(ll,this.close,this)};var ul={__init__:["popupMenu"],popupMenu:["type",pl]};function hl(){}hl.prototype.get=function(){return this._data},hl.prototype.set=function(e){this._data=e},hl.prototype.clear=function(){var e=this._data;return delete this._data,e},hl.prototype.isEmpty=function(){return!this._data};var dl={clipboard:["type",hl]};function ml(e){var t=this;function n(e){t._lastMoveEvent=e}this._lastMoveEvent=null,e.on("canvas.init",(function(e){(t._svg=e.svg).addEventListener("mousemove",n)})),e.on("canvas.destroy",(function(){t._lastMouseEvent=null,t._svg.removeEventListener("mousemove",n)}))}ml.$inject=["eventBus"],ml.prototype.getLastMoveEvent=function(){return this._lastMoveEvent||function(e,t){var n=document.createEvent("MouseEvent"),i=e,r=t,o=e,a=t;n.initMouseEvent&&n.initMouseEvent("mousemove",!0,!0,window,0,i,r,o,a,!1,!1,!1,!1,0,null);return n}(0,0)};var fl={__init__:["mouse"],mouse:["type",ml]};function vl(e,t,n,i,r,o,a,s){this._canvas=e,this._create=t,this._clipboard=n,this._elementFactory=i,this._eventBus=r,this._modeling=o,this._mouse=a,this._rules=s,r.on("copyPaste.copyElement",(function(e){var t=e.descriptor,n=e.element,i=e.elements;t.priority=1,t.id=n.id,g(i,(function(e){return e===n.parent}))&&(t.parent=n.parent.id),function(e){return!!e.host}(n)&&(t.priority=2,t.host=n.host.id),gl(n)&&(t.priority=3,t.source=n.source.id,t.target=n.target.id,t.waypoints=function(e){return S(e.waypoints,(function(e){return(e=bl(e)).original&&(e.original=bl(e.original)),e}))}(n)),yl(n)&&(t.priority=4,t.labelTarget=n.labelTarget.id),b(["x","y","width","height"],(function(e){d(n[e])&&(t[e]=n[e])})),t.hidden=n.hidden,t.collapsed=n.collapsed})),r.on("copyPaste.pasteElements",(function(e){$(e.hints,{createElementsBehavior:!1})}))}function gl(e){return!!e.waypoints}function yl(e){return!!e.labelTarget}function bl(e){return $({},e)}function _l(e,t){var n=t.indexOf(e);return-1===n?t:t.splice(n,1)}vl.$inject=["canvas","create","clipboard","elementFactory","eventBus","modeling","mouse","rules"],vl.prototype.copy=function(e){var t,n;return u(e)||(e=e?[e]:[]),n=!1===(t=this._eventBus.fire("copyPaste.canCopyElements",{elements:e}))?{}:this.createTree(u(t)?t:e),this._clipboard.set(n),this._eventBus.fire("copyPaste.elementsCopied",{elements:e,tree:n}),n},vl.prototype.paste=function(e){var t=this._clipboard.get();if(!this._clipboard.isEmpty()){var n=e&&e.hints||{};this._eventBus.fire("copyPaste.pasteElements",{hints:n});var i=this._createElements(t);if(e&&e.element&&e.point)return this._paste(i,e.element,e.point,n);this._create.start(this._mouse.getLastMoveEvent(),i,{hints:n||{}})}},vl.prototype._paste=function(e,t,n,i){b(e,(function(e){d(e.x)||(e.x=0),d(e.y)||(e.y=0)}));var r=lt(e);return b(e,(function(e){gl(e)&&(e.waypoints=S(e.waypoints,(function(e){return{x:e.x-r.x-r.width/2,y:e.y-r.y-r.height/2}}))),$(e,{x:e.x-r.x-r.width/2,y:e.y-r.y-r.height/2})})),this._modeling.createElements(e,n,t,$({},i))},vl.prototype._createElements=function(e){var t=this,n=this._eventBus,i={},r=[];return b(e,(function(e,o){b(e=k(e,"priority"),(function(e){var o,a=$({},H(e,["priority"]));return i[e.parent]?a.parent=i[e.parent]:delete a.parent,n.fire("copyPaste.pasteElement",{cache:i,descriptor:a}),gl(a)?(a.source=i[e.source],a.target=i[e.target],o=i[e.id]=t.createConnection(a),void r.push(o)):yl(a)?(a.labelTarget=i[a.labelTarget],o=i[e.id]=t.createLabel(a),void r.push(o)):(a.host&&(a.host=i[a.host]),o=i[e.id]=t.createShape(a),void r.push(o))}))})),r},vl.prototype.createConnection=function(e){return this._elementFactory.createConnection(H(e,["id"]))},vl.prototype.createLabel=function(e){return this._elementFactory.createLabel(H(e,["id"]))},vl.prototype.createShape=function(e){return this._elementFactory.createShape(H(e,["id"]))},vl.prototype.hasRelations=function(e,t){var n,i;return!(gl(e)&&(n=g(t,O({id:e.source.id})),i=g(t,O({id:e.target.id})),!n||!i))&&!(yl(e)&&!g(t,O({id:e.labelTarget.id})))},vl.prototype.createTree=function(e){var t=this._rules,n=this,i={},r=[];function o(e,t){var n=g(r,(function(t){return e===t.element}));n?n.depth<t&&(r=function(e,t){var n=t.indexOf(e);-1!==n&&t.splice(n,1);return t}(n,r)).push({element:n.element,depth:t}):r.push({element:e,depth:t})}return st(rt(e),(function(e,t,i){if(!yl(e)){b(e.labels,(function(e){o(e,i)})),b([e.attachers,e.incoming,e.outgoing],(function(e){e&&e.length&&b(e,(function(e){b(e.labels,(function(e){o(e,i)})),o(e,i)}))})),o(e,i);var r=[];return e.children&&(r=e.children.slice()),n._eventBus.fire("copyPaste.createTree",{element:e,children:r}),r}})),e=S(r,(function(e){return e.element})),r=k(r=S(r,(function(t){return t.descriptor={},n._eventBus.fire("copyPaste.copyElement",{descriptor:t.descriptor,element:t.element,elements:e}),t})),(function(e){return e.descriptor.priority})),e=S(r,(function(e){return e.element})),b(r,(function(r){var o=r.depth;n.hasRelations(r.element,e)?!function(e,n){return t.allowed("element.copy",{element:e,elements:n})}(r.element,e)?_l(r.element,e):(i[o]||(i[o]=[]),i[o].push(r.descriptor)):_l(r.element,e)})),i};var xl={__depends__:[dl,sl,fl,Os],__init__:["copyPaste"],copyPaste:["type",vl]};function wl(e,t,n){u(n)||(n=[n]),b(n,(function(n){c(e[n])||(t[n]=e[n])}))}function El(e,t,n){var i;t.on("copyPaste.copyElement",750,(function(e){var t=e.descriptor,n=e.element,i=t.oldBusinessObject=vr(n),r=t.oldDi=gr(n);if(t.type=n.type,wl(i,t,"name"),wl(r,t,"isExpanded"),Sl(t))return t;i.default&&(t.default=i.default.id)})),t.on("moddleCopy.canCopyProperty",(function(t){var i,r=t.parent,o=t.property;if("processRef"===t.propertyName&&mr(r,"bpmn:Participant")&&mr(o,"bpmn:Process"))return i=e.create("bpmn:Process"),n.copyElement(o,i)})),t.on("copyPaste.pasteElements",(function(){i={}})),t.on("copyPaste.pasteElement",(function(t){var r,o,a,s,c=t.cache,l=t.descriptor,p=l.oldBusinessObject,h=l.oldDi;if(Sl(l))return l.businessObject=vr(c[l.labelTarget]),void(l.di=gr(c[l.labelTarget]));r=e.create(p.$type),l.businessObject=n.copyElement(p,r),(o=e.create(h.$type)).bpmnElement=r,l.di=n.copyElement(h,o),function(e,t){var n=vr(e);e.default&&(i[e.default]={element:n,property:"default"}),e.host&&(vr(e).attachedToRef=vr(t[e.host])),i=H(i,x(i,(function(t,i,r){var o=i.element,a=i.property;return r===e.id&&(o[a]=n,t.push(e.id)),t}),[]))}(l,c),wl(l,r,["isExpanded","name"]),a=l,u(s="oldBusinessObject")||(s=[s]),b(s,(function(e){a[e]&&delete a[e]}))}))}function Sl(e){return!!e.labelTarget}El.$inject=["bpmnFactory","eventBus","moddleCopy"];var Cl=["artifacts","dataInputAssociations","dataOutputAssociations","default","flowElements","lanes","incoming","outgoing"];function Rl(e,t,n){this._bpmnFactory=t,this._eventBus=e,this._moddle=n,e.on("moddleCopy.canCopyProperties",(function(e){var t=e.propertyNames;if(t&&t.length)return k(t,(function(e){return"extensionElements"===e}))})),e.on("moddleCopy.canCopyProperty",(function(e){var t=e.parent,n=h(t)&&t.$descriptor,i=e.propertyName;return(!i||-1===Cl.indexOf(i))&&(!(i&&n&&!g(n.properties,O({name:i})))&&void 0)})),e.on("moddleCopy.canSetCopiedProperty",(function(e){var t,n,i=e.property;if(n="bpmn:ExtensionElements",(t=i)&&"function"==typeof t.$instanceOf&&t.$instanceOf(n)&&(!i.values||!i.values.length))return!1}))}function Pl(e,t){return x(e.properties,(function(e,n){return t&&n.default?e:e.concat(n.name)}),[])}Rl.$inject=["eventBus","bpmnFactory","moddle"],Rl.prototype.copyElement=function(e,t,n){var i=this;n&&!u(n)&&(n=[n]),n=n||Pl(e.$descriptor);var r=this._eventBus.fire("moddleCopy.canCopyProperties",{propertyNames:n,sourceElement:e,targetElement:t});return!1===r||(u(r)&&(n=r),b(n,(function(n){var r;v(e,n)&&(r=e.get(n));var o=i.copyProperty(r,t,n);!1!==i._eventBus.fire("moddleCopy.canSetCopiedProperty",{parent:t,property:o,propertyName:n})&&l(o)&&t.set(n,o)}))),t},Rl.prototype.copyProperty=function(e,t,n){var i=this,r=this._eventBus.fire("moddleCopy.canCopyProperty",{parent:t,property:e,propertyName:n});if(!1!==r){if(r)return h(r)&&r.$type&&!r.$parent&&(r.$parent=t),r;var o=this._moddle.getPropertyDescriptor(t,n);if(!o.isReference){if(o.isId)return this._copyId(e,t);if(u(e))return x(e,(function(e,o){return(r=i.copyProperty(o,t,n))?(r.$parent=t,e.concat(r)):e}),[]);if(h(e)&&e.$type){if(this._moddle.getElementDescriptor(e).isGeneric)return;return(r=i._bpmnFactory.create(e.$type)).$parent=t,r=i.copyElement(e,r)}return e}}},Rl.prototype._copyId=function(e,t){return this._moddle.ids.assigned(e)?void 0:(this._moddle.ids.claim(e,t),e)};var Ml={__depends__:[xl],__init__:["bpmnCopyPaste","moddleCopy"],bpmnCopyPaste:["type",El],moddleCopy:["type",Rl]},Tl=Math.round;function Al(e){this._modeling=e}Al.$inject=["modeling"],Al.prototype.replaceElement=function(e,t,n){if(e.waypoints)return null;var i=this._modeling,r=t.width||e.width,o=t.height||e.height,a=t.x||e.x,s=t.y||e.y,c=Tl(a+r/2),l=Tl(s+o/2);return i.replaceShape(e,$({},t,{x:c,y:l,width:r,height:o}),n)};var kl={__init__:["replace"],replace:["type",Al]};var Ol=["cancelActivity","instantiate","eventGatewayType","triggeredByEvent","isInterrupting"];function Dl(e,t,n,i,r,o,a){this.replaceElement=function(s,l,p){p=p||{};var h=l.type,d=s.businessObject;if(zl(d)&&"bpmn:SubProcess"===h&&function(e,t){var n=e&&v(e,"collapsed")?e.collapsed:!Ar(e);return n!==(t&&(v(t,"collapsed")||v(t,"isExpanded"))?v(t,"collapsed")?t.collapsed:!t.isExpanded:n)}(s,l))return i.toggleCollapse(s),s;var m=e.create(h),f={type:h,businessObject:m,di:{}};!function(e,t,n){u(n)||(n=[n]),b(n,(function(n){c(e[n])||(t[n]=e[n])}))}(s.di,f.di,["fill","stroke","background-color","border-color","color"]);var g,_=Pl(d.$descriptor),x=Pl(m.$descriptor,!0),w=(g=x,_.filter((function(e){return-1!==g.indexOf(e)})));$(m,F(l,Ol));var E=y(w,(function(e){return"eventDefinitions"===e?Nl(s,l.eventDefinitionType):"loopCharacteristics"===e?!Or(m):!v(m,e)&&(("processRef"!==e||!1!==l.isExpanded)&&"triggeredByEvent"!==e)}));return m=n.copyElement(d,m,E),l.eventDefinitionType&&(Nl(m,l.eventDefinitionType)||(f.eventDefinitionType=l.eventDefinitionType,f.eventDefinitionAttrs=l.eventDefinitionAttrs)),mr(d,"bpmn:Activity")&&(zl(d)?f.isExpanded=Ar(s):l&&v(l,"isExpanded")&&(f.isExpanded=l.isExpanded),Ar(s)&&!mr(d,"bpmn:Task")&&f.isExpanded&&(f.width=s.width,f.height=s.height)),zl(d)&&!zl(m)&&(p.moveChildren=!1),mr(d,"bpmn:Participant")&&(!0===l.isExpanded?m.processRef=e.create("bpmn:Process"):p.moveChildren=!1,f.width=s.width,f.height=t.getDefaultSize(f).height),o.allowed("shape.resize",{shape:m})||(f.height=t.getDefaultSize(f).height,f.width=t.getDefaultSize(f).width),m.name=d.name,fr(d,["bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:Activity"])&&fr(m,["bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:Activity"])&&(m.default=d.default),l.host&&!mr(d,"bpmn:BoundaryEvent")&&mr(m,"bpmn:BoundaryEvent")&&(f.host=l.host),"bpmn:DataStoreReference"!==f.type&&"bpmn:DataObjectReference"!==f.type||(f.x=s.x+(s.width-f.width)/2),f=r.replaceElement(s,f,p),!1!==p.select&&a.select(f),f}}function zl(e){return mr(e,"bpmn:SubProcess")}function Nl(e,t){var n=vr(e);return t&&n.get("eventDefinitions").some((function(e){return mr(e,t)}))}Dl.$inject=["bpmnFactory","elementFactory","moddleCopy","modeling","replace","rules","selection"];var Bl={__depends__:[Ml,kl,Do],bpmnReplace:["type",Dl]};function Ll(e){return function(t){var n=t.target,i=vr(e),r=i.eventDefinitions&&i.eventDefinitions[0],o=i.$type===n.type,a=(r&&r.$type)===n.eventDefinitionType,s=i.triggeredByEvent===n.triggeredByEvent,c=void 0===n.isExpanded||n.isExpanded===Ar(e);return!(o&&a&&s&&c)}}var jl=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message Start Event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Start Event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional Start Event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal Start Event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],Il=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}}],$l=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message Intermediate Catch Event",actionName:"replace-with-message-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Message Intermediate Throw Event",actionName:"replace-with-message-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-message",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Intermediate Catch Event",actionName:"replace-with-timer-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation Intermediate Throw Event",actionName:"replace-with-escalation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-escalation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional Intermediate Catch Event",actionName:"replace-with-conditional-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Link Intermediate Catch Event",actionName:"replace-with-link-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-link",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Link Intermediate Throw Event",actionName:"replace-with-link-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-link",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Compensation Intermediate Throw Event",actionName:"replace-with-compensation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-compensation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal Intermediate Catch Event",actionName:"replace-with-signal-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Signal Intermediate Throw Event",actionName:"replace-with-signal-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-signal",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],Fl=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message End Event",actionName:"replace-with-message-end",className:"bpmn-icon-end-event-message",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Escalation End Event",actionName:"replace-with-escalation-end",className:"bpmn-icon-end-event-escalation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Error End Event",actionName:"replace-with-error-end",className:"bpmn-icon-end-event-error",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel End Event",actionName:"replace-with-cancel-end",className:"bpmn-icon-end-event-cancel",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Compensation End Event",actionName:"replace-with-compensation-end",className:"bpmn-icon-end-event-compensation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal End Event",actionName:"replace-with-signal-end",className:"bpmn-icon-end-event-signal",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Terminate End Event",actionName:"replace-with-terminate-end",className:"bpmn-icon-end-event-terminate",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:TerminateEventDefinition"}}],Hl=[{label:"Exclusive Gateway",actionName:"replace-with-exclusive-gateway",className:"bpmn-icon-gateway-xor",target:{type:"bpmn:ExclusiveGateway"}},{label:"Parallel Gateway",actionName:"replace-with-parallel-gateway",className:"bpmn-icon-gateway-parallel",target:{type:"bpmn:ParallelGateway"}},{label:"Inclusive Gateway",actionName:"replace-with-inclusive-gateway",className:"bpmn-icon-gateway-or",target:{type:"bpmn:InclusiveGateway"}},{label:"Complex Gateway",actionName:"replace-with-complex-gateway",className:"bpmn-icon-gateway-complex",target:{type:"bpmn:ComplexGateway"}},{label:"Event based Gateway",actionName:"replace-with-event-based-gateway",className:"bpmn-icon-gateway-eventbased",target:{type:"bpmn:EventBasedGateway",instantiate:!1,eventGatewayType:"Exclusive"}}],Vl=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Event Sub Process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}},{label:"Sub Process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}}],Gl=[{label:"Sub Process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Event Sub Process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}}],Wl=[{label:"Sub Process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}}],Ul=[{label:"Task",actionName:"replace-with-task",className:"bpmn-icon-task",target:{type:"bpmn:Task"}},{label:"Send Task",actionName:"replace-with-send-task",className:"bpmn-icon-send",target:{type:"bpmn:SendTask"}},{label:"Receive Task",actionName:"replace-with-receive-task",className:"bpmn-icon-receive",target:{type:"bpmn:ReceiveTask"}},{label:"User Task",actionName:"replace-with-user-task",className:"bpmn-icon-user",target:{type:"bpmn:UserTask"}},{label:"Manual Task",actionName:"replace-with-manual-task",className:"bpmn-icon-manual",target:{type:"bpmn:ManualTask"}},{label:"Business Rule Task",actionName:"replace-with-rule-task",className:"bpmn-icon-business-rule",target:{type:"bpmn:BusinessRuleTask"}},{label:"Service Task",actionName:"replace-with-service-task",className:"bpmn-icon-service",target:{type:"bpmn:ServiceTask"}},{label:"Script Task",actionName:"replace-with-script-task",className:"bpmn-icon-script",target:{type:"bpmn:ScriptTask"}},{label:"Call Activity",actionName:"replace-with-call-activity",className:"bpmn-icon-call-activity",target:{type:"bpmn:CallActivity"}},{label:"Sub Process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}},{label:"Sub Process (expanded)",actionName:"replace-with-expanded-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}}],ql=[{label:"Data Store Reference",actionName:"replace-with-data-store-reference",className:"bpmn-icon-data-store",target:{type:"bpmn:DataStoreReference"}}],Xl=[{label:"Data Object Reference",actionName:"replace-with-data-object-reference",className:"bpmn-icon-data-object",target:{type:"bpmn:DataObjectReference"}}],Yl=[{label:"Message Boundary Event",actionName:"replace-with-message-boundary",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Boundary Event",actionName:"replace-with-timer-boundary",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation Boundary Event",actionName:"replace-with-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional Boundary Event",actionName:"replace-with-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Error Boundary Event",actionName:"replace-with-error-boundary",className:"bpmn-icon-intermediate-event-catch-error",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel Boundary Event",actionName:"replace-with-cancel-boundary",className:"bpmn-icon-intermediate-event-catch-cancel",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Signal Boundary Event",actionName:"replace-with-signal-boundary",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Compensation Boundary Event",actionName:"replace-with-compensation-boundary",className:"bpmn-icon-intermediate-event-catch-compensation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Message Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-message-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!1}},{label:"Timer Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!1}},{label:"Escalation Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!1}},{label:"Conditional Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!1}},{label:"Signal Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!1}}],Kl=[{label:"Message Start Event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Start Event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional Start Event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal Start Event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Error Start Event",actionName:"replace-with-error-start",className:"bpmn-icon-start-event-error",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Escalation Start Event",actionName:"replace-with-escalation-start",className:"bpmn-icon-start-event-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Compensation Start Event",actionName:"replace-with-compensation-start",className:"bpmn-icon-start-event-compensation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Message Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-message-start",className:"bpmn-icon-start-event-non-interrupting-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!1}},{label:"Timer Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-start",className:"bpmn-icon-start-event-non-interrupting-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!1}},{label:"Conditional Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-start",className:"bpmn-icon-start-event-non-interrupting-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!1}},{label:"Signal Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-start",className:"bpmn-icon-start-event-non-interrupting-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!1}},{label:"Escalation Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-start",className:"bpmn-icon-start-event-non-interrupting-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!1}}],Zl=[{label:"Sequence Flow",actionName:"replace-with-sequence-flow",className:"bpmn-icon-connection"},{label:"Default Flow",actionName:"replace-with-default-flow",className:"bpmn-icon-default-flow"},{label:"Conditional Flow",actionName:"replace-with-conditional-flow",className:"bpmn-icon-conditional-flow"}],Ql=[{label:"Expanded Pool",actionName:"replace-with-expanded-pool",className:"bpmn-icon-participant",target:{type:"bpmn:Participant",isExpanded:!0}},{label:function(e){var t="Empty Pool";return e.children&&e.children.length&&(t+=" (removes content)"),t},actionName:"replace-with-collapsed-pool",className:"bpmn-icon-lane",target:{type:"bpmn:Participant",isExpanded:!1}}];function Jl(e,t,n,i,r,o,a){this._bpmnFactory=e,this._popupMenu=t,this._modeling=n,this._moddle=i,this._bpmnReplace=r,this._rules=o,this._translate=a,this.register()}Jl.$inject=["bpmnFactory","popupMenu","modeling","moddle","bpmnReplace","rules","translate"],Jl.prototype.register=function(){this._popupMenu.registerProvider("bpmn-replace",this)},Jl.prototype.getEntries=function(e){var t,n=e.businessObject;if(!this._rules.allowed("shape.replace",{element:e}))return[];var i=Ll(e);return mr(n,"bpmn:DataObjectReference")?this._createEntries(e,ql):mr(n,"bpmn:DataStoreReference")&&!mr(e.parent,"bpmn:Collaboration")?this._createEntries(e,Xl):mr(n,"bpmn:StartEvent")&&!mr(n.$parent,"bpmn:SubProcess")?(t=y(jl,i),this._createEntries(e,t)):mr(n,"bpmn:Participant")?(t=y(Ql,(function(t){return Ar(e)!==t.target.isExpanded})),this._createEntries(e,t)):mr(n,"bpmn:StartEvent")&&Or(n.$parent)?(t=y(Kl,(function(t){var n=!1!==t.target.isInterrupting,r=vr(e).isInterrupting===n;return i(t)||!i(t)&&!r})),this._createEntries(e,t)):mr(n,"bpmn:StartEvent")&&!Or(n.$parent)&&mr(n.$parent,"bpmn:SubProcess")?(t=y(Il,i),this._createEntries(e,t)):mr(n,"bpmn:EndEvent")?(t=y(Fl,(function(e){return!("bpmn:CancelEventDefinition"==e.target.eventDefinitionType&&!mr(n.$parent,"bpmn:Transaction"))&&i(e)})),this._createEntries(e,t)):mr(n,"bpmn:BoundaryEvent")?(t=y(Yl,(function(e){var t=e.target;if("bpmn:CancelEventDefinition"==t.eventDefinitionType&&!mr(n.attachedToRef,"bpmn:Transaction"))return!1;var r=!1!==t.cancelActivity,o=n.cancelActivity==r;return i(e)||!i(e)&&!o})),this._createEntries(e,t)):mr(n,"bpmn:IntermediateCatchEvent")||mr(n,"bpmn:IntermediateThrowEvent")?(t=y($l,i),this._createEntries(e,t)):mr(n,"bpmn:Gateway")?(t=y(Hl,i),this._createEntries(e,t)):mr(n,"bpmn:Transaction")?(t=y(Gl,i),this._createEntries(e,t)):Or(n)&&Ar(e)?(t=y(Wl,i),this._createEntries(e,t)):mr(n,"bpmn:SubProcess")&&Ar(e)?(t=y(Vl,i),this._createEntries(e,t)):mr(n,"bpmn:AdHocSubProcess")&&!Ar(e)?(t=y(Ul,(function(t){var n=t.target,i="bpmn:SubProcess"===n.type,r=!0===n.isExpanded;return Ll(e)&&(!i||r)})),this._createEntries(e,t)):mr(n,"bpmn:SequenceFlow")?this._createSequenceFlowEntries(e,Zl):mr(n,"bpmn:FlowNode")?(t=y(Ul,i),mr(n,"bpmn:SubProcess")&&!Ar(e)&&(t=y(t,(function(e){return"Sub Process (collapsed)"!==e.label}))),this._createEntries(e,t)):[]},Jl.prototype.getHeaderEntries=function(e){var t=[];return mr(e,"bpmn:Activity")&&!Or(e)&&(t=t.concat(this._getLoopEntries(e))),mr(e,"bpmn:DataObjectReference")&&(t=t.concat(this._getDataObjectIsCollection(e))),mr(e,"bpmn:Participant")&&(t=t.concat(this._getParticipantMultiplicity(e))),!mr(e,"bpmn:SubProcess")||mr(e,"bpmn:Transaction")||Or(e)||t.push(this._getAdHocEntry(e)),t},Jl.prototype._createEntries=function(e,t){var n=[],i=this;return b(t,(function(t){var r=i._createMenuEntry(t,e);n.push(r)})),n},Jl.prototype._createSequenceFlowEntries=function(e,t){var n=vr(e),i=[],r=this._modeling,o=this._moddle,a=this;return b(t,(function(t){switch(t.actionName){case"replace-with-default-flow":n.sourceRef.default!==n&&(mr(n.sourceRef,"bpmn:ExclusiveGateway")||mr(n.sourceRef,"bpmn:InclusiveGateway")||mr(n.sourceRef,"bpmn:ComplexGateway")||mr(n.sourceRef,"bpmn:Activity"))&&i.push(a._createMenuEntry(t,e,(function(){r.updateProperties(e.source,{default:n})})));break;case"replace-with-conditional-flow":!n.conditionExpression&&mr(n.sourceRef,"bpmn:Activity")&&i.push(a._createMenuEntry(t,e,(function(){var t=o.create("bpmn:FormalExpression",{body:""});r.updateProperties(e,{conditionExpression:t})})));break;default:if(mr(n.sourceRef,"bpmn:Activity")&&n.conditionExpression)return i.push(a._createMenuEntry(t,e,(function(){r.updateProperties(e,{conditionExpression:void 0})})));if((mr(n.sourceRef,"bpmn:ExclusiveGateway")||mr(n.sourceRef,"bpmn:InclusiveGateway")||mr(n.sourceRef,"bpmn:ComplexGateway")||mr(n.sourceRef,"bpmn:Activity"))&&n.sourceRef.default===n)return i.push(a._createMenuEntry(t,e,(function(){r.updateProperties(e.source,{default:void 0})})))}})),i},Jl.prototype._createMenuEntry=function(e,t,n){var i=this._translate,r=this._bpmnReplace.replaceElement,o=e.label;return o&&"function"==typeof o&&(o=o(t)),n=n||function(){return r(t,e.target)},{label:i(o),className:e.className,id:e.actionName,action:n}},Jl.prototype._getLoopEntries=function(e){var t=this,n=this._translate;function i(n,i){var r;i.active?r=void 0:(r=t._moddle.create(i.options.loopCharacteristics),i.options.isSequential&&(r.isSequential=i.options.isSequential)),t._modeling.updateProperties(e,{loopCharacteristics:r})}var r,o,a,s=vr(e).loopCharacteristics;return s&&(r=s.isSequential,o=void 0===s.isSequential,a=void 0!==s.isSequential&&!s.isSequential),[{id:"toggle-parallel-mi",className:"bpmn-icon-parallel-mi-marker",title:n("Parallel Multi Instance"),active:a,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!1}},{id:"toggle-sequential-mi",className:"bpmn-icon-sequential-mi-marker",title:n("Sequential Multi Instance"),active:r,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!0}},{id:"toggle-loop",className:"bpmn-icon-loop-marker",title:n("Loop"),active:o,action:i,options:{loopCharacteristics:"bpmn:StandardLoopCharacteristics"}}]},Jl.prototype._getDataObjectIsCollection=function(e){var t=this,n=this._translate;var i=e.businessObject.dataObjectRef,r=i.isCollection;return[{id:"toggle-is-collection",className:"bpmn-icon-parallel-mi-marker",title:n("Collection"),active:r,action:function(n,r){t._modeling.updateModdleProperties(e,i,{isCollection:!r.active})}}]},Jl.prototype._getParticipantMultiplicity=function(e){var t=this,n=this._bpmnFactory,i=this._translate;var r=e.businessObject.participantMultiplicity;return[{id:"toggle-participant-multiplicity",className:"bpmn-icon-parallel-mi-marker",title:i("Participant Multiplicity"),active:!!r,action:function(i,r){var o;r.active||(o=n.create("bpmn:ParticipantMultiplicity")),t._modeling.updateProperties(e,{participantMultiplicity:o})}}]},Jl.prototype._getAdHocEntry=function(e){var t=this._translate,n=mr(vr(e),"bpmn:AdHocSubProcess"),i=this._bpmnReplace.replaceElement;return{id:"toggle-adhoc",className:"bpmn-icon-ad-hoc-marker",title:t("Ad-hoc"),active:n,action:function(t,r){return i(e,n?{type:"bpmn:SubProcess"}:{type:"bpmn:AdHocSubProcess"},{autoResize:!1,layoutConnection:!1})}}};var ep={__depends__:[ul,Bl],__init__:["replaceMenuProvider"],replaceMenuProvider:["type",Jl]},tp=Math.max,np=Math.min;function ip(e,t){return{top:e.top-t.top,right:e.right-t.right,bottom:e.bottom-t.bottom,left:e.left-t.left}}function rp(e,t,n){var i=t[e],r=n.min&&n.min[e],o=n.max&&n.max[e];return d(r)&&(i=(/top|left/.test(e)?np:tp)(i,r)),d(o)&&(i=(/top|left/.test(e)?tp:np)(i,o)),i}function op(e,t){return void 0!==e?e:20}function ap(e){return!e.waypoints&&"label"!==e.type}function sp(e,t){var n;if((n=void 0===e.length?y(e.children,ap):e).length)return function(e,t){var n,i,r,o;return"object"==typeof t?(n=op(t.left),i=op(t.right),r=op(t.top),o=op(t.bottom)):n=i=r=o=op(t),{x:e.x-n,y:e.y-r,width:e.width+n+i,height:e.height+r+o}}(lt(n),t)}var cp=Math.abs;var lp=["bpmn:Participant","bpmn:Process","bpmn:SubProcess"],pp=30;function up(e,t){return t=t||[],e.children.filter((function(e){mr(e,"bpmn:Lane")&&(up(e,t),t.push(e))})),t}function hp(e){return e.children.filter((function(e){return mr(e,"bpmn:Lane")}))}function dp(e){return ps(e,lp)||e}function mp(e,t){var n=dp(e),i=up(n,mr(n,"bpmn:Process")?[]:[n]),r=an(e),o=an(t),a=function(e,t){return ip(an(t),an(e))}(e,t),s=[];return i.forEach((function(t){if(t!==e){var n,i,c=0,l=a.right,p=0,u=a.left,h=an(t);a.top&&(cp(h.bottom-r.top)<10&&(p=o.top-h.bottom),cp(h.top-r.top)<5&&(c=o.top-h.top)),a.bottom&&(cp(h.top-r.bottom)<10&&(c=o.bottom-h.top),cp(h.bottom-r.bottom)<5&&(p=o.bottom-h.bottom)),(c||l||p||u)&&s.push({shape:t,newBounds:(n=t,i={top:c,right:l,bottom:p,left:u},{x:n.x+(i.left||0),y:n.y+(i.top||0),width:n.width-(i.left||0)+(i.right||0),height:n.height-(i.top||0)+(i.bottom||0)})})}})),s}function fp(e,t,n,i,r,o,a,s,c,l,p,u){e=e||{},i.registerProvider(this),this._contextPad=i,this._modeling=r,this._elementFactory=o,this._connect=a,this._create=s,this._popupMenu=c,this._canvas=l,this._rules=p,this._translate=u,!1!==e.autoPlace&&(this._autoPlace=t.get("autoPlace",!1)),n.on("create.end",250,(function(e){var t=e.context.shape;if(bo(e)&&i.isOpen(t)){var n=i.getEntries(t);n.replace&&n.replace.action.click(e,t)}}))}function vp(e,t,n){var i=e.$instanceOf(t),r=!1;return b(e.eventDefinitions||[],(function(e){e.$type===n&&(r=!0)})),i&&r}fp.$inject=["config.contextPad","injector","eventBus","contextPad","modeling","elementFactory","connect","create","popupMenu","canvas","rules","translate"],fp.prototype.getContextPadEntries=function(e){var t=this._contextPad,n=this._modeling,i=this._elementFactory,r=this._connect,o=this._create,a=this._popupMenu,s=this._canvas,c=this._rules,l=this._autoPlace,p=this._translate,h={};if("label"===e.type)return h;var d=e.businessObject;function m(e,t){r.start(e,t)}function f(e,t,n,r){function a(t,n){var a=i.createShape($({type:e},r));o.start(t,a,{source:n})}return"string"!=typeof n&&(r=n,n=p("Append {type}",{type:e.replace(/^bpmn:/,"")})),{group:"model",className:t,title:n,action:{dragstart:a,click:l?function(t,n){var o=i.createShape($({type:e},r));l.append(n,o)}:a}}}function v(e){return function(i,r){n.splitLane(r,e),t.open(r,!0)}}if(fr(d,["bpmn:Lane","bpmn:Participant"])&&Ar(e)){var g=hp(e);$(h,{"lane-insert-above":{group:"lane-insert-above",className:"bpmn-icon-lane-insert-above",title:p("Add Lane above"),action:{click:function(e,t){n.addLane(t,"top")}}}}),g.length<2&&(e.height>=120&&$(h,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:p("Divide into two Lanes"),action:{click:v(2)}}}),e.height>=180&&$(h,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:p("Divide into three Lanes"),action:{click:v(3)}}})),$(h,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:p("Add Lane below"),action:{click:function(e,t){n.addLane(t,"bottom")}}}})}mr(d,"bpmn:FlowNode")&&(mr(d,"bpmn:EventBasedGateway")?$(h,{"append.receive-task":f("bpmn:ReceiveTask","bpmn-icon-receive-task",p("Append ReceiveTask")),"append.message-intermediate-event":f("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",p("Append MessageIntermediateCatchEvent"),{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":f("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",p("Append TimerIntermediateCatchEvent"),{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condition-intermediate-event":f("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",p("Append ConditionIntermediateCatchEvent"),{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":f("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",p("Append SignalIntermediateCatchEvent"),{eventDefinitionType:"bpmn:SignalEventDefinition"})}):vp(d,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?$(h,{"append.compensation-activity":f("bpmn:Task","bpmn-icon-task",p("Append compensation activity"),{isForCompensation:!0})}):mr(d,"bpmn:EndEvent")||d.isForCompensation||vp(d,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")||Or(d)||$(h,{"append.end-event":f("bpmn:EndEvent","bpmn-icon-end-event-none",p("Append EndEvent")),"append.gateway":f("bpmn:ExclusiveGateway","bpmn-icon-gateway-none",p("Append Gateway")),"append.append-task":f("bpmn:Task","bpmn-icon-task",p("Append Task")),"append.intermediate-event":f("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none",p("Append Intermediate/Boundary Event"))})),a.isEmpty(e,"bpmn-replace")||$(h,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:p("Change type"),action:{click:function(e,n){var i=$(function(e){var n=s.getContainer(),i=t.getPad(e).html,r=n.getBoundingClientRect(),o=i.getBoundingClientRect(),a=o.top-r.top;return{x:o.left-r.left,y:a+o.height+5}}(n),{cursor:{x:e.x,y:e.y}});a.open(n,"bpmn-replace",i)}}}}),fr(d,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference"])&&$(h,{"append.text-annotation":f("bpmn:TextAnnotation","bpmn-icon-text-annotation"),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:p("Connect using "+(d.isForCompensation?"":"Sequence/MessageFlow or ")+"Association"),action:{click:m,dragstart:m}}}),mr(d,"bpmn:TextAnnotation")&&$(h,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:p("Connect using Association"),action:{click:m,dragstart:m}}}),fr(d,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&$(h,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:p("Connect using DataInputAssociation"),action:{click:m,dragstart:m}}}),mr(d,"bpmn:Group")&&$(h,{"append.text-annotation":f("bpmn:TextAnnotation","bpmn-icon-text-annotation")});var y=c.allowed("elements.delete",{elements:[e]});return u(y)&&(y=y[0]===e),y&&$(h,{delete:{group:"edit",className:"bpmn-icon-trash",title:p("Remove"),action:{click:function(t){n.removeElements([e])}}}}),h};var gp={__depends__:[Vc,Uc,Do,Pc,sl,ep],__init__:["contextPadProvider"],contextPadProvider:["type",fp]},yp={horizontal:["x","width"],vertical:["y","height"]};function bp(e){this._modeling=e,this._filters=[],this.registerFilter((function(e,t,n){var i,r=0,o=0;return b(e,(function(e){e.waypoints||e.labelTarget||(r+=e[n],o+=1)})),i=Math.round(r/o),y(e,(function(e){return e[n]<i+50}))}))}bp.$inject=["modeling"],bp.prototype.registerFilter=function(e){if("function"!=typeof e)throw new Error("the filter has to be a function");this._filters.push(e)},bp.prototype.trigger=function(e,t){var n,i,r=this._modeling;if(!(e.length<3||(this._setOrientation(t),i=this._filterElements(e),(n=this._createGroups(i)).length<=2)))return r.distributeElements(n,this._axis,this._dimension),n},bp.prototype._filterElements=function(e){var t=this._filters,n=this._axis,i=this._dimension,r=[].concat(e);return t.length?(b(t,(function(e){r=e(r,n,i)})),r):e},bp.prototype._createGroups=function(e){var t=[],n=this,i=this._axis,r=this._dimension;if(!i)throw new Error('must have a defined "axis" and "dimension"');return b(k(e,i),(function(e,o){var a,s=n._findRange(e,i,r),c=t[t.length-1];c&&n._hasIntersection(c.range,s)?t[t.length-1].elements.push(e):(a={range:s,elements:[e]},t.push(a))})),t},bp.prototype._setOrientation=function(e){var t=yp[e];this._axis=t[0],this._dimension=t[1]},bp.prototype._hasIntersection=function(e,t){return Math.max(e.min,e.max)>=Math.min(t.min,t.max)&&Math.min(e.min,e.max)<=Math.max(t.min,t.max)},bp.prototype._findRange=function(e){var t=e[this._axis];return{min:t+5,max:t+e[this._dimension]-5}};var _p={__init__:["distributeElements"],distributeElements:["type",bp]};function xp(e){e.registerFilter((function(e){return y(e,(function(e){var t=fr(e,["bpmn:Association","bpmn:BoundaryEvent","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:Lane","bpmn:MessageFlow","bpmn:Participant","bpmn:SequenceFlow","bpmn:TextAnnotation"]);return!(e.labelTarget||t)}))}))}xp.$inject=["distributeElements"];var wp={__depends__:[_p],__init__:["bpmnDistributeElements"],bpmnDistributeElements:["type",xp]},Ep="is not a registered action";function Sp(e,t){this._actions={};var n=this;e.on("diagram.init",(function(){n._registerDefaultActions(t),e.fire("editorActions.init",{editorActions:n})}))}function Cp(e,t){return new Error(e+" "+t)}Sp.$inject=["eventBus","injector"],Sp.prototype._registerDefaultActions=function(e){var t=e.get("commandStack",!1),n=e.get("modeling",!1),i=e.get("selection",!1),r=e.get("zoomScroll",!1),o=e.get("copyPaste",!1),a=e.get("canvas",!1),s=e.get("rules",!1),c=e.get("keyboardMove",!1),l=e.get("keyboardMoveSelection",!1);t&&(this.register("undo",(function(){t.undo()})),this.register("redo",(function(){t.redo()}))),o&&i&&this.register("copy",(function(){var e=i.get();o.copy(e)})),o&&this.register("paste",(function(){o.paste()})),r&&this.register("stepZoom",(function(e){r.stepZoom(e.value)})),a&&this.register("zoom",(function(e){a.zoom(e.value)})),n&&i&&s&&this.register("removeSelection",(function(){var e=i.get();if(e.length){var t,r=s.allowed("elements.delete",{elements:e});!1!==r&&(t=u(r)?r:e).length&&n.removeElements(t.slice())}})),c&&this.register("moveCanvas",(function(e){c.moveCanvas(e)})),l&&this.register("moveSelection",(function(e){l.moveSelection(e.direction,e.accelerated)}))},Sp.prototype.trigger=function(e,t){if(!this._actions[e])throw Cp(e,Ep);return this._actions[e](t)},Sp.prototype.register=function(e,t){var n=this;if("string"==typeof e)return this._registerAction(e,t);b(e,(function(e,t){n._registerAction(t,e)}))},Sp.prototype._registerAction=function(e,t){if(this.isRegistered(e))throw Cp(e,"is already registered");this._actions[e]=t},Sp.prototype.unregister=function(e){if(!this.isRegistered(e))throw Cp(e,Ep);this._actions[e]=void 0},Sp.prototype.getActions=function(){return Object.keys(this._actions)},Sp.prototype.isRegistered=function(e){return!!this._actions[e]};var Rp={__init__:["editorActions"],editorActions:["type",Sp]};function Pp(e){e.invoke(Sp,this)}n(Pp,Sp),Pp.$inject=["injector"],Pp.prototype._registerDefaultActions=function(e){Sp.prototype._registerDefaultActions.call(this,e);var t=e.get("canvas",!1),n=e.get("elementRegistry",!1),i=e.get("selection",!1),r=e.get("spaceTool",!1),o=e.get("lassoTool",!1),a=e.get("handTool",!1),s=e.get("globalConnect",!1),c=e.get("distributeElements",!1),l=e.get("alignElements",!1),p=e.get("directEditing",!1),u=e.get("searchPad",!1),h=e.get("modeling",!1);t&&n&&i&&this._registerAction("selectElements",(function(){var e=t.getRootElement(),r=n.filter((function(t){return t!==e}));return i.select(r),r})),r&&this._registerAction("spaceTool",(function(){r.toggle()})),o&&this._registerAction("lassoTool",(function(){o.toggle()})),a&&this._registerAction("handTool",(function(){a.toggle()})),s&&this._registerAction("globalConnectTool",(function(){s.toggle()})),i&&c&&this._registerAction("distributeElements",(function(e){var t=i.get(),n=e.type;t.length&&c.trigger(t,n)})),i&&l&&this._registerAction("alignElements",(function(e){var t=i.get(),n=[],r=e.type;t.length&&(n=y(t,(function(e){return!mr(e,"bpmn:Lane")})),l.trigger(n,r))})),i&&h&&this._registerAction("setColor",(function(e){var t=i.get();t.length&&h.setColor(t,e)})),i&&p&&this._registerAction("directEditing",(function(){var e=i.get();e.length&&p.activate(e[0])})),u&&this._registerAction("find",(function(){u.toggle()})),t&&h&&this._registerAction("moveToOrigin",(function(){var e,i,r=t.getRootElement();e=lt(i=mr(r,"bpmn:Collaboration")?n.filter((function(e){return mr(e.parent,"bpmn:Collaboration")})):n.filter((function(e){return e!==r&&!mr(e.parent,"bpmn:SubProcess")}))),h.moveElements(i,{x:-e.x,y:-e.y},r)}))};var Mp={__depends__:[Rp],editorActions:["type",Pp]};function Tp(e){e.on(["create.init","shape.move.init"],(function(e){var t=e.context;fr(e.shape,["bpmn:Participant","bpmn:SubProcess","bpmn:TextAnnotation"])&&(t.gridSnappingContext||(t.gridSnappingContext={}),t.gridSnappingContext.snapLocation="top-left")}))}Tp.$inject=["eventBus"];function Ap(e,t,n){return n||(n="round"),Math[n](e/t)*t}function kp(e,t,n){var i=!n||!1!==n.active;this._eventBus=t;var r=this;t.on("diagram.init",800,(function(){r.setActive(i)})),t.on(["create.move","create.end","bendpoint.move.move","bendpoint.move.end","connect.move","connect.end","connectionSegment.move.move","connectionSegment.move.end","resize.move","resize.end","shape.move.move","shape.move.end"],1200,(function(t){var n=t.originalEvent;if(!(!r.active||n&&ha(n))){var i=t.context,o=i.gridSnappingContext;o||(o=i.gridSnappingContext={}),["x","y"].forEach((function(n){var i={},o=function(e,t,n){var i=e.context,r=e.shape,o=i.gridSnappingContext,a=o.snapLocation,s=o.snapOffset;if(s&&d(s[t]))return s[t];s||(s=o.snapOffset={});d(s[t])||(s[t]=0);if(!r)return s[t];n.get(r.id)||(Op(t)?s[t]+=r[t]+r.width/2:s[t]+=r[t]+r.height/2);if(!a)return s[t];"x"===t?/left/.test(a)?s[t]-=r.width/2:/right/.test(a)&&(s[t]+=r.width/2):/top/.test(a)?s[t]-=r.height/2:/bottom/.test(a)&&(s[t]+=r.height/2);return s[t]}(t,n,e);o&&(i.offset=o);var a=function(e,t){var n=e.context,i=n.createConstraints,r=n.resizeConstraints||{},o=n.gridSnappingContext,a=o.snapConstraints;if(a&&a[t])return a[t];a||(a=o.snapConstraints={});a[t]||(a[t]={});var s=n.direction;i&&(Op(t)?(a.x.min=i.left,a.x.max=i.right):(a.y.min=i.top,a.y.max=i.bottom));var c=r.min,l=r.max;c&&(Op(t)?zp(s)?a.x.max=c.left:a.x.min=c.right:Dp(s)?a.y.max=c.top:a.y.min=c.bottom);l&&(Op(t)?zp(s)?a.x.min=l.left:a.x.max=l.right:Dp(s)?a.y.min=l.top:a.y.max=l.bottom);return a[t]}(t,n);a&&$(i,a),fc(t,n)||r.snapEvent(t,n,i)}))}}))}function Op(e){return"x"===e}function Dp(e){return-1!==e.indexOf("n")}function zp(e){return-1!==e.indexOf("w")}function Np(e,t){Vo.call(this,e),this._gridSnapping=t;var n=this;this.preExecute("shape.resize",(function(e){var t=e.context,i=(t.hints||{}).autoResize;if(i){var r=t.shape,o=t.newBounds;f(i)?t.newBounds=n.snapComplex(o,i):t.newBounds=n.snapSimple(r,o)}}))}kp.prototype.snapEvent=function(e,t,n){vc(e,t,this.snapValue(e[t],n))},kp.prototype.getGridSpacing=function(){return 10},kp.prototype.snapValue=function(e,t){var n,i,r=0;return t&&t.offset&&(r=t.offset),e=Ap(e+=r,10),t&&t.min&&d(n=t.min)&&(n=Ap(n+r,10,"ceil"),e=Math.max(e,n)),t&&t.max&&d(i=t.max)&&(i=Ap(i+r,10,"floor"),e=Math.min(e,i)),e-=r},kp.prototype.isActive=function(){return this.active},kp.prototype.setActive=function(e){this.active=e,this._eventBus.fire("gridSnapping.toggle",{active:e})},kp.prototype.toggleActive=function(){this.setActive(!this.active)},kp.$inject=["elementRegistry","eventBus","config.gridSnapping"],Np.$inject=["eventBus","gridSnapping","modeling"],n(Np,Vo),Np.prototype.snapSimple=function(e,t){var n=this._gridSnapping;return t.width=n.snapValue(t.width,{min:t.width}),t.height=n.snapValue(t.height,{min:t.height}),t.x=e.x+e.width/2-t.width/2,t.y=e.y+e.height/2-t.height/2,t},Np.prototype.snapComplex=function(e,t){return/w|e/.test(t)&&(e=this.snapHorizontally(e,t)),/n|s/.test(t)&&(e=this.snapVertically(e,t)),e},Np.prototype.snapHorizontally=function(e,t){var n=this._gridSnapping,i=/w/.test(t),r=/e/.test(t),o={};return o.width=n.snapValue(e.width,{min:e.width}),r&&(i?(o.x=n.snapValue(e.x,{max:e.x}),o.width+=n.snapValue(e.x-o.x,{min:e.x-o.x})):e.x=e.x+e.width-o.width),$(e,o),e},Np.prototype.snapVertically=function(e,t){var n=this._gridSnapping,i=/n/.test(t),r=/s/.test(t),o={};return o.height=n.snapValue(e.height,{min:e.height}),i&&(r?(o.y=n.snapValue(e.y,{max:e.y}),o.height+=n.snapValue(e.y-o.y,{min:e.y-o.y})):e.y=e.y+e.height-o.height),$(e,o),e};function Bp(e,t){e.on(["spaceTool.move","spaceTool.end"],2e3,(function(e){var n,i=e.context;i.initialized&&("x"===i.axis?(n=t.snapValue(e.dx),e.x=e.x+n-e.dx,e.dx=n):(n=t.snapValue(e.dy),e.y=e.y+n-e.dy,e.dy=n))}))}Bp.$inject=["eventBus","gridSnapping"];var Lp={__depends__:[{__init__:["gridSnappingResizeBehavior","gridSnappingSpaceToolBehavior"],gridSnappingResizeBehavior:["type",Np],gridSnappingSpaceToolBehavior:["type",Bp]}],__init__:["gridSnapping"],gridSnapping:["type",kp]};function jp(e,t){e.on("autoPlace",2e3,(function(e){var n=e.source,i=cn(n),r=e.shape,o=us(n,r);return["x","y"].forEach((function(e){var n={};o[e]!==i[e]&&(o[e]>i[e]?n.min=o[e]:n.max=o[e],mr(r,"bpmn:TextAnnotation")&&(!function(e){return"x"===e}(e)?n.offset=-r.height/2:n.offset=-r.width/2),o[e]=t.snapValue(o[e],n))})),o}))}jp.$inject=["eventBus","gridSnapping"];function Ip(e,t,n){t.on(["create.start","shape.move.start"],1750,(function(t){var i=t.context,r=i.shape,o=e.getRootElement();mr(r,"bpmn:Participant")&&mr(o,"bpmn:Process")&&o.children.length&&(i.createConstraints&&(r.width=n.snapValue(r.width,{min:r.width}),r.height=n.snapValue(r.height,{min:r.height})))}))}Ip.$inject=["canvas","eventBus","gridSnapping"];function $p(e,t,n){Vo.call(this,e),this._gridSnapping=t;var i=this;this.postExecuted(["connection.create","connection.layout"],3e3,(function(e){var t=e.context,r=t.connection,o=t.hints||{},a=r.waypoints;o.connectionStart||o.connectionEnd||!1===o.createElementsBehavior||function(e){return e.length>3}(a)&&n.updateWaypoints(r,i.snapMiddleSegments(a))}))}function Fp(e,t,n){var i=_t(t,n),r={};return function(e){return"h"===e}(i)&&(r.y=e.snapValue(t.y)),function(e){return"v"===e}(i)&&(r.x=e.snapValue(t.x)),("x"in r||"y"in r)&&(t=$({},t,r),n=$({},n,r)),[t,n]}$p.$inject=["eventBus","gridSnapping","modeling"],n($p,Vo),$p.prototype.snapMiddleSegments=function(e){var t,n=this._gridSnapping;e=e.slice();for(var i=1;i<e.length-2;i++)t=Fp(n,e[i],e[i+1]),e[i]=t[0],e[i+1]=t[1];return e};var Hp={__depends__:[Lp,{__init__:["gridSnappingAutoPlaceBehavior","gridSnappingCreateParticipantBehavior","gridSnappingLayoutConnectionBehavior"],gridSnappingAutoPlaceBehavior:["type",jp],gridSnappingCreateParticipantBehavior:["type",Ip],gridSnappingLayoutConnectionBehavior:["type",$p]}],__init__:["bpmnGridSnapping"],bpmnGridSnapping:["type",Tp]};function Vp(e,t){this._interactionEvents=t;var n=this;e.on(["interactionEvents.createHit","interactionEvents.updateHit"],(function(e){var t=e.element,i=e.gfx;return mr(t,"bpmn:Lane")?n.createParticipantHit(t,i):mr(t,"bpmn:Participant")?Ar(t)?n.createParticipantHit(t,i):n.createDefaultHit(t,i):mr(t,"bpmn:SubProcess")?Ar(t)?n.createSubProcessHit(t,i):n.createDefaultHit(t,i):void 0}))}Vp.$inject=["eventBus","interactionEvents"],Vp.prototype.createDefaultHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createDefaultHit(e,t),!0},Vp.prototype.createParticipantHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createBoxHit(t,"click-stroke",{width:e.width,height:e.height}),this._interactionEvents.createBoxHit(t,"all",{width:30,height:e.height}),!0},Vp.prototype.createSubProcessHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createBoxHit(t,"click-stroke",{width:e.width,height:e.height}),this._interactionEvents.createBoxHit(t,"all",{width:e.width,height:30}),!0};var Gp={__init__:["bpmnInteractionEvents"],bpmnInteractionEvents:["type",Vp]};function Wp(e){e.invoke(wa,this)}n(Wp,wa),Wp.$inject=["injector"],Wp.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}wa.prototype.registerBindings.call(this,e,t),n("selectElements",(function(n){var i=n.keyEvent;if(e.isKey(["a","A"],i)&&e.isCmd(i))return t.trigger("selectElements"),!0})),n("find",(function(n){var i=n.keyEvent;if(e.isKey(["f","F"],i)&&e.isCmd(i))return t.trigger("find"),!0})),n("spaceTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["s","S"],i)?(t.trigger("spaceTool"),!0):void 0})),n("lassoTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["l","L"],i)?(t.trigger("lassoTool"),!0):void 0})),n("handTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["h","H"],i)?(t.trigger("handTool"),!0):void 0})),n("globalConnectTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["c","C"],i)?(t.trigger("globalConnectTool"),!0):void 0})),n("directEditing",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["e","E"],i)?(t.trigger("directEditing"),!0):void 0}))};var Up={__depends__:[Ea],__init__:["keyboardBindings"],keyboardBindings:["type",Wp]},qp={moveSpeed:1,moveSpeedAccelerated:10},Xp="left",Yp="right",Kp="down",Zp={ArrowLeft:Xp,Left:Xp,ArrowUp:"up",Up:"up",ArrowRight:Yp,Right:Yp,ArrowDown:Kp,Down:Kp},Qp={left:function(e){return{x:-e,y:0}},up:function(e){return{x:0,y:-e}},right:function(e){return{x:e,y:0}},down:function(e){return{x:0,y:e}}};function Jp(e,t,n,i,r){var o=this;this._config=$({},qp,e||{}),t.addListener(1500,(function(e){var n=e.keyEvent,i=Zp[n.key];if(i&&!t.isCmd(n)){var r=t.isShift(n);return o.moveSelection(i,r),!0}})),this.moveSelection=function(e,t){var o=r.get();if(o.length){var a=this._config[t?"moveSpeedAccelerated":"moveSpeed"],s=Qp[e](a);i.allowed("elements.move",{shapes:o})&&n.moveElements(o,s)}}}Jp.$inject=["config.keyboardMoveSelection","keyboard","modeling","rules","selection"];var eu={__depends__:[Ea,Do],__init__:["keyboardMoveSelection"],keyboardMoveSelection:["type",Jp]};function tu(e,t,n,i){this._dragging=i,this._rules=t;var r=this;function o(e,t){var n,i=e.shape,o=e.direction,a=e.resizeConstraints;e.delta=t,n=function(e,t,n){var i=n.x,r=n.y,o={x:e.x,y:e.y,width:e.width,height:e.height};return-1!==t.indexOf("n")?(o.y=e.y+r,o.height=e.height-r):-1!==t.indexOf("s")&&(o.height=e.height+r),-1!==t.indexOf("e")?o.width=e.width+i:-1!==t.indexOf("w")&&(o.x=e.x+i,o.width=e.width-i),o}(i,o,t),e.newBounds=function(e,t){if(!t)return e;var n=an(e);return sn({top:rp("top",n,t),right:rp("right",n,t),bottom:rp("bottom",n,t),left:rp("left",n,t)})}(n,a),e.canExecute=r.canResize(e)}e.on("resize.start",(function(e){var t,n,i;t=e.context,n=t.resizeConstraints,i=t.minBounds,void 0===n&&(void 0===i&&(i=r.computeMinResizeBox(t)),t.resizeConstraints={min:an(i)})})),e.on("resize.move",(function(e){var t={x:e.dx,y:e.dy};o(e.context,t)})),e.on("resize.end",(function(e){!function(e){var t=e.shape,i=e.canExecute,r=e.newBounds;if(i){if(!function(e,t){return e.x!==t.x||e.y!==t.y||e.width!==t.width||e.height!==t.height}(t,r=rn(r)))return;n.resizeShape(t,r)}}(e.context)}))}function nu(e,t){var n=cn(e),i=an(e),r={x:n.x,y:n.y};return-1!==t.indexOf("n")?r.y=i.top:-1!==t.indexOf("s")&&(r.y=i.bottom),-1!==t.indexOf("e")?r.x=i.right:-1!==t.indexOf("w")&&(r.x=i.left),r}function iu(e){return"n"===e||"s"===e?"resize-ns":"e"===e||"w"===e?"resize-ew":"nw"===e||"se"===e?"resize-nwse":"resize-nesw"}tu.prototype.canResize=function(e){var t=this._rules,n=F(e,["newBounds","shape","delta","direction"]);return t.allowed("shape.resize",n)},tu.prototype.activate=function(e,t,n){var i,r,o=this._dragging;if("string"==typeof n&&(n={direction:n}),!(r=(i=$({shape:t},n)).direction))throw new Error("must provide a direction (n|w|s|e|nw|se|ne|sw)");o.init(e,nu(t,r),"resize",{autoActivate:!0,cursor:iu(r),data:{shape:t,context:i}})},tu.prototype.computeMinResizeBox=function(e){var t=e.shape;return function(e,t,n,i){var r=an(t),o={top:/n/.test(e)?r.bottom-n.height:r.top,left:/w/.test(e)?r.right-n.width:r.left,bottom:/s/.test(e)?r.top+n.height:r.bottom,right:/e/.test(e)?r.left+n.width:r.right},a=i?an(i):o;return sn({top:np(o.top,a.top),left:np(o.left,a.left),bottom:tp(o.bottom,a.bottom),right:tp(o.right,a.right)})}(e.direction,t,e.minDimensions||{width:10,height:10},sp(t,e.childrenBoxPadding))},tu.$inject=["eventBus","rules","modeling","dragging"];var ru="djs-resizing",ou="resize-not-ok";function au(e,t,n){e.on("resize.move",500,(function(e){var i,r,o,a;i=e.context,r=i.shape,o=i.newBounds,(a=i.frame)||(a=i.frame=n.addFrame(r,t.getActiveLayer()),t.addMarker(r,ru)),o.width>5&&ye(a,{x:o.x,width:o.width}),o.height>5&&ye(a,{y:o.y,height:o.height}),i.canExecute?Ee(a).remove(ou):Ee(a).add(ou)})),e.on("resize.cleanup",(function(e){var n,i;n=e.context,i=n.shape,n.frame&&Ce(n.frame),t.removeMarker(i,ru)}))}au.$inject=["eventBus","canvas","previewSupport"];var su=-6,cu="djs-resizer",lu=["n","w","s","e","nw","ne","se","sw"];function pu(e,t,n,i){this._resize=i,this._canvas=t;var r=this;e.on("selection.changed",(function(e){var t=e.newSelection;r.removeResizers(),1===t.length&&b(t,j(r.addResizer,r))})),e.on("shape.changed",(function(e){var t=e.element;n.isSelected(t)&&(r.removeResizers(),r.addResizer(t))}))}pu.prototype.makeDraggable=function(e,t,n){var i=this._resize;function r(t){yo(t)&&i.activate(t,e,n)}re.bind(t,"mousedown",r),re.bind(t,"touchstart",r)},pu.prototype._createResizer=function(e,t,n,i){var r=this._getResizersParent(),o=function(e){var t={x:0,y:0};-1!==e.indexOf("e")?t.x=6:-1!==e.indexOf("w")&&(t.x=su);-1!==e.indexOf("s")?t.y=6:-1!==e.indexOf("n")&&(t.y=su);return t}(i),a=ke("g");Ee(a).add(cu),Ee(a).add("djs-resizer-"+e.id),Ee(a).add("djs-resizer-"+i),fe(r,a);var s=ke("rect");ye(s,{x:-2+o.x,y:-2+o.y,width:4,height:4}),Ee(s).add("djs-resizer-visual"),fe(a,s);var c=ke("rect");return ye(c,{x:-10+o.x,y:-10+o.y,width:20,height:20}),Ee(c).add("djs-resizer-hit"),fe(a,c),$n(a,t,n),a},pu.prototype.createResizer=function(e,t){var n=nu(e,t),i=this._createResizer(e,n.x,n.y,t);this.makeDraggable(e,i,t)},pu.prototype.addResizer=function(e){var t=this;this._resize.canResize({shape:e})&&b(lu,(function(n){t.createResizer(e,n)}))},pu.prototype.removeResizers=function(){Re(this._getResizersParent())},pu.prototype._getResizersParent=function(){return this._canvas.getLayer("resizers")},pu.$inject=["eventBus","canvas","selection","resize"];var uu={__depends__:[Os,Ps,Kc],__init__:["resize","resizePreview","resizeHandles"],resize:["type",tu],resizePreview:["type",au],resizeHandles:["type",pu]};function hu(e,t){var n=t.create("bpmn:CategoryValue"),i=t.create("bpmn:Category",{categoryValue:[n]});return vt(e.get("rootElements"),i),vr(i).$parent=e,vr(n).$parent=i,n}function du(e,t,n,i,r,o,a){function s(e,t){(t||fr(e,["bpmn:Task","bpmn:TextAnnotation"])||mu(e))&&i.activate(e)}this._bpmnFactory=t,this._canvas=n,this._modeling=r,this._textRenderer=a,i.registerProvider(this),e.on("element.dblclick",(function(e){s(e.element,!0)})),e.on(["autoPlace.start","canvas.viewbox.changing","drag.init","element.mousedown","popupMenu.open"],(function(e){i.isActive()&&i.complete()})),e.on(["commandStack.changed"],(function(e){i.isActive()&&i.cancel()})),e.on("directEditing.activate",(function(e){o.removeResizers()})),e.on("create.end",500,(function(e){var t=e.context,n=t.shape,i=e.context.canExecute;e.isTouch||i&&(t.hints&&!1===t.hints.createElementsBehavior||s(n))})),e.on("autoPlace.end",500,(function(e){s(e.shape)}))}function mu(e){return mr(e,"bpmn:SubProcess")&&!Ar(e)}du.$inject=["eventBus","bpmnFactory","canvas","directEditing","modeling","resizeHandles","textRenderer"],du.prototype.activate=function(e){var t=Nr(e);if(void 0!==t){var n={text:t};$(n,this.getEditingBBox(e));var i={};return(fr(e,["bpmn:Task","bpmn:Participant","bpmn:Lane","bpmn:CallActivity"])||mu(e))&&$(i,{centerVertically:!0}),no(e)&&$(i,{autoResize:!0}),mr(e,"bpmn:TextAnnotation")&&$(i,{resizable:!0,autoResize:!0}),$(n,{options:i}),n}},du.prototype.getEditingBBox=function(e){var t=this._canvas,n=e.label||e,i=t.getAbsoluteBBox(n),r=i.x+i.width/2,o=i.y+i.height/2,a={x:i.x,y:i.y},s=t.zoom(),c=this._textRenderer.getDefaultStyle(),l=this._textRenderer.getExternalStyle(),p=l.fontSize*s,u=l.lineHeight,h=c.fontSize*s,d=c.lineHeight,m={fontFamily:this._textRenderer.getDefaultStyle().fontFamily,fontWeight:this._textRenderer.getDefaultStyle().fontWeight};(mr(e,"bpmn:Lane")||function(e){return mr(e,"bpmn:Participant")&&Ar(e)}(e))&&($(a,{width:i.height,height:30*s,x:i.x-i.height/2+15*s,y:o-30*s/2}),$(m,{fontSize:h+"px",lineHeight:d,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px",transform:"rotate(-90deg)"})),(fr(e,["bpmn:Task","bpmn:CallActivity"])||function(e){return mr(e,"bpmn:Participant")&&!Ar(e)}(e)||mu(e))&&($(a,{width:i.width,height:i.height}),$(m,{fontSize:h+"px",lineHeight:d,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px"})),function(e){return mr(e,"bpmn:SubProcess")&&Ar(e)}(e)&&($(a,{width:i.width,x:i.x}),$(m,{fontSize:h+"px",lineHeight:d,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px"}));var f=90*s,v=7*s,g=4*s;if(n.labelTarget&&($(a,{width:f,height:i.height+v+g,x:r-f/2,y:i.y-v}),$(m,{fontSize:p+"px",lineHeight:u,paddingTop:v+"px",paddingBottom:g+"px"})),no(n)&&!io(n)&&!ao(n)){var y=oo(e),b=t.getAbsoluteBBox({x:y.x,y:y.y,width:0,height:0}),_=p+v+g;$(a,{width:f,height:_,x:b.x-f/2,y:b.y-_/2}),$(m,{fontSize:p+"px",lineHeight:u,paddingTop:v+"px",paddingBottom:g+"px"})}return mr(e,"bpmn:TextAnnotation")&&($(a,{width:i.width,height:i.height,minWidth:30*s,minHeight:10*s}),$(m,{textAlign:"left",paddingTop:5*s+"px",paddingBottom:7*s+"px",paddingLeft:7*s+"px",paddingRight:5*s+"px",fontSize:h+"px",lineHeight:d})),{bounds:a,style:m}},du.prototype.update=function(e,t,n,i){var r,o,a;if((mr(e,"bpmn:TextAnnotation")&&(o=this._canvas.getAbsoluteBBox(e),r={x:e.x,y:e.y,width:e.width/o.width*i.width,height:e.height/o.height*i.height}),mr(e,"bpmn:Group"))&&!vr(e).categoryValueRef){var s=hu(vr(this._canvas.getRootElement()).$parent,this._bpmnFactory);vr(e).categoryValueRef=s}(a=t)&&a.trim()||(t=null),this._modeling.updateLabel(e,t,r)};var fu="djs-element-hidden",vu="djs-label-hidden";function gu(e,t,n,i){var r,o,a,s=this,c=t.getDefaultLayer();e.on("directEditing.activate",(function(e){var n=e.active;if(mr(r=n.element.label||n.element,"bpmn:TextAnnotation")){o=t.getAbsoluteBBox(r),a=ke("g");var l=i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r.width,containerHeight:r.height,position:{mx:0,my:0}}),p=s.path=ke("path");ye(p,{d:l,strokeWidth:2,stroke:yu(r)}),fe(a,p),fe(c,a),Fn(a,r.x,r.y)}mr(r,"bpmn:TextAnnotation")||r.labelTarget?t.addMarker(r,fu):(mr(r,"bpmn:Task")||mr(r,"bpmn:CallActivity")||mr(r,"bpmn:SubProcess")||mr(r,"bpmn:Participant"))&&t.addMarker(r,vu)})),e.on("directEditing.resize",(function(e){if(mr(r,"bpmn:TextAnnotation")){var t=e.height,n=e.dy,a=Math.max(r.height/o.height*(t+n),0),c=i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r.width,containerHeight:a,position:{mx:0,my:0}});ye(s.path,{d:c})}})),e.on(["directEditing.complete","directEditing.cancel"],(function(e){var n=e.active;n&&(t.removeMarker(n.element.label||n.element,fu),t.removeMarker(r,vu)),r=void 0,o=void 0,a&&(Ce(a),a=void 0)}))}function yu(e,t){return gr(e).get("stroke")||t||"black"}gu.$inject=["eventBus","canvas","elementRegistry","pathMap"];var bu={__depends__:[Ho,uu,Vc],__init__:["labelEditingProvider","labelEditingPreview"],labelEditingProvider:["type",du],labelEditingPreview:["type",gu]},_u=["top","bottom","left","right"],xu=10;function wu(e,t){function n(e){if(io(e)){var n=function(e){var t=cn(e.label),n=Eu(cn(e),t);if(i=n,-1===_u.indexOf(i))return;var i;var r=function(e){var t=cn(e);return[].concat(e.incoming.map((function(e){return e.waypoints[e.waypoints.length-2]})),e.outgoing.map((function(e){return e.waypoints[1]}))).map((function(e){return Eu(t,e)}))}(e);if(e.host){var o=function(e){var t,n=e.host,i=ln(cn(e),n);t=i.indexOf("-")>=0?i.split("-"):[i];return _u.filter((function(e){return-1===t.indexOf(e)}))}(e);r=r.concat(o)}var a=_u.filter((function(e){return-1===r.indexOf(e)}));if(-1!==a.indexOf(n))return;return a[0]}(e);n&&function(e,n){var i=cn(e),r=e.label,o=cn(r);if(!r.parent)return;var a,s=an(e);switch(n){case"top":a={x:i.x,y:s.top-xu-r.height/2};break;case"left":a={x:s.left-xu-r.width/2,y:i.y};break;case"bottom":a={x:i.x,y:s.bottom+xu+r.height/2};break;case"right":a={x:s.right+xu+r.width/2,y:i.y}}var c=Oa(a,o);t.moveShape(r,c)}(e,n)}}Vo.call(this,e),this.postExecuted(["connection.create","connection.layout","connection.updateWaypoints"],(function(e){var t=e.context,i=t.connection,r=i.source,o=i.target;!1!==(t.hints||{}).createElementsBehavior&&(n(r),n(o))})),this.postExecuted(["label.create"],(function(e){var t=e.context,i=t.shape;!1!==(t.hints||{}).createElementsBehavior&&n(i.labelTarget)})),this.postExecuted(["elements.create"],(function(e){var t=e.context,i=t.elements;!1!==(t.hints||{}).createElementsBehavior&&i.forEach((function(e){n(e)}))}))}function Eu(e,t){return ln(t,e,5)}function Su(e,t,n){Vo.call(this,e),this.preExecute("shape.append",(function(e){var t=e.source,n=e.shape;e.position||(mr(n,"bpmn:TextAnnotation")?e.position={x:t.x+t.width/2+75,y:t.y-50-n.height/2}:e.position={x:t.x+t.width+80+n.width/2,y:t.y+t.height/2})}),!0)}function Cu(e,t){e.invoke(Vo,this),this.postExecute("shape.move",(function(e){var n=e.newParent,i=e.shape;b(y(i.incoming.concat(i.outgoing),(function(e){return mr(e,"bpmn:Association")})),(function(e){t.moveConnection(e,{x:0,y:0},n)}))}),!0)}n(wu,Vo),wu.$inject=["eventBus","modeling"],n(Su,Vo),Su.$inject=["eventBus","elementFactory","bpmnRules"],n(Cu,Vo),Cu.$inject=["injector","modeling"];function Ru(e,t){t.invoke(Vo,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",500,(function(e){var t=e.elements;1===(t=t.filter((function(e){return Pu(e,e.host)}))).length&&t.map((function(e){return t.indexOf(e)})).forEach((function(i){var r=t[i];e.elements[i]=n.replaceShape(t[i],r)}))}),!0),this.preExecute("elements.move",500,(function(e){var t=e.shapes,i=e.newHost;if(1===t.length){var r=t[0];Pu(r,i)&&(e.shapes=[n.replaceShape(r,i)])}}),!0)}function Pu(e,t){return!ao(e)&&fr(e,["bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"])&&!!t}Ru.$inject=["bpmnReplace","injector"],n(Ru,Vo),Ru.prototype.replaceShape=function(e,t){var n,i=(n=vr(e).eventDefinitions)&&n[0],r={type:"bpmn:BoundaryEvent",host:t};return i&&(r.eventDefinitionType=i.$type),this._bpmnReplace.replaceElement(e,r,{layoutConnection:!1})};function Mu(e,t,n){function i(e){return y(e.attachers,(function(e){return mr(e,"bpmn:BoundaryEvent")}))}Vo.call(this,e),this.postExecute("connection.create",(function(e){var t=e.context.source,r=e.context.target,o=i(r);mr(t,"bpmn:EventBasedGateway")&&mr(r,"bpmn:ReceiveTask")&&o.length>0&&n.removeElements(o)})),this.postExecute("connection.reconnect",(function(e){var t=e.context.oldSource,r=e.context.newSource;mr(t,"bpmn:Gateway")&&mr(r,"bpmn:EventBasedGateway")&&b(r.outgoing,(function(e){var t=e.target,r=i(t);mr(t,"bpmn:ReceiveTask")&&r.length>0&&n.removeElements(r)}))})),e.on("moddleCopy.canCopyProperty",2e3,(function(e){var n=e.parent,i=e.property,r=e.propertyName,o=t.getPropertyDescriptor(n,r);o&&o.isReference&&mr(i,"bpmn:RootElement")&&n.set(r,i)}))}Mu.$inject=["eventBus","moddle","modeling"],n(Mu,Vo);function Tu(e,t,n,i,r){function o(e){return fr(e,["bpmn:ReceiveTask","bpmn:SendTask"])||function(e,t){u(t)||(t=[t]);return E(t,(function(t){return Dr(e,t)}))}(e,["bpmn:ErrorEventDefinition","bpmn:EscalationEventDefinition","bpmn:MessageEventDefinition","bpmn:SignalEventDefinition"])}function a(t){return!!g(e.getDefinitions().get("rootElements"),O({id:t.id}))}function s(e){return mr(e,"bpmn:ErrorEventDefinition")?"errorRef":mr(e,"bpmn:EscalationEventDefinition")?"escalationRef":mr(e,"bpmn:MessageEventDefinition")?"messageRef":mr(e,"bpmn:SignalEventDefinition")?"signalRef":void 0}function c(e){if(fr(e,["bpmn:ReceiveTask","bpmn:SendTask"]))return e.get("messageRef");var t=e.get("eventDefinitions")[0];return t.get(s(t))}n.invoke(Vo,this),this.executed("shape.create",(function(t){var n=t.shape;if(o(n)){var i=c(vr(n));i&&!a(i)&&(vt(e.getDefinitions().get("rootElements"),i),t.addedRootElement=i)}}),!0),this.reverted("shape.create",(function(t){var n=t.addedRootElement;n&&ft(e.getDefinitions().get("rootElements"),n)}),!0),t.on("copyPaste.copyElement",(function(e){var t=e.descriptor,n=e.element;if(o(n)){var i=c(vr(n));i&&(t.referencedRootElement=i)}})),t.on("copyPaste.pasteElement",500,(function(e){var t=e.descriptor,n=t.businessObject;if(o(n)){var c=t.referencedRootElement;c&&(a(c)||(c=i.copyElement(c,r.create(c.$type))),function(e,t){if(fr(e,["bpmn:ReceiveTask","bpmn:SendTask"]))return e.set("messageRef",t);var n=e.get("eventDefinitions")[0];n.set(s(n),t)}(n,c))}}))}function Au(e){e.invoke(Vo,this),this.preExecute("shape.create",1500,(function(e){var t=e.context,n=t.parent,i=t.shape;mr(n,"bpmn:Lane")&&!mr(i,"bpmn:Lane")&&(t.parent=ps(n,"bpmn:Participant"))}))}Tu.$inject=["bpmnjs","eventBus","injector","moddleCopy","bpmnFactory"],n(Tu,Vo),Au.$inject=["injector"],n(Au,Vo);var ku=1500;function Ou(e,t,n){t.on(["create.hover","create.move","create.out","create.end","shape.move.hover","shape.move.move","shape.move.out","shape.move.end"],ku,(function(t){var i=t.context.shape||t.shape,r=t.hover;mr(r,"bpmn:Lane")&&!fr(i,["bpmn:Lane","bpmn:Participant"])&&(t.hover=dp(r),t.hoverGfx=e.getGraphics(t.hover));var o=n.getRootElement();r!==o&&(i.labelTarget||mr(i,"bpmn:Group"))&&(t.hover=o,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["connect.hover","connect.out","connect.end","connect.cleanup","global-connect.hover","global-connect.out","global-connect.end","global-connect.cleanup"],ku,(function(t){var n=t.hover;mr(n,"bpmn:Lane")&&(t.hover=dp(n)||n,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["bendpoint.move.hover"],ku,(function(t){var n=t.context,i=t.hover,r=n.type;mr(i,"bpmn:Lane")&&/reconnect/.test(r)&&(t.hover=dp(i)||i,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["connect.start"],ku,(function(e){var t=e.context,n=t.start;mr(n,"bpmn:Lane")&&(t.start=dp(n)||n)})),t.on("shape.move.start",2e3,(function(e){var t=e.shape;mr(t,"bpmn:Lane")&&(e.shape=dp(t)||t)}))}function Du(e,t,n){Vo.call(this,e),this.preExecute("shape.create",(function(e){var n=e.context.shape;if(mr(n,"bpmn:DataObjectReference")&&"label"!==n.type){var i=t.create("bpmn:DataObject");n.businessObject.dataObjectRef=i}}))}Ou.$inject=["elementRegistry","eventBus","canvas"],Du.$inject=["eventBus","bpmnFactory","moddle"],n(Du,Vo);var zu=20,Nu=20,Bu=2e3;function Lu(e,t,n){function i(){var t=e.getRootElement();return mr(t,"bpmn:Collaboration")?t:n.makeCollaboration()}Vo.call(this,t),t.on(["create.start","shape.move.start"],Bu,(function(t){var n=t.context,i=n.shape,r=e.getRootElement();if(mr(i,"bpmn:Participant")&&mr(r,"bpmn:Process")&&r.children.length){var o=r.children.filter((function(e){return!mr(e,"bpmn:Group")&&!ao(e)&&!function(e){return!!e.waypoints}(e)}));if(o.length){var a=lt(o);$(i,function(e,t){t={width:t.width+40+30,height:t.height+40};var n=Math.max(e.width,t.width),i=Math.max(e.height,t.height);return{x:-n/2,y:-i/2,width:n,height:i}}(i,a)),n.createConstraints=function(e,t){return{bottom:(t=an(t)).top+e.height/2-Nu,left:t.right-e.width/2+zu,top:t.bottom-e.height/2+Nu,right:t.left+e.width/2-zu-30}}(i,a)}}})),t.on("create.start",Bu,(function(n){var i=n.context.shape,r=e.getRootElement(),o=e.getGraphics(r);function a(e){e.element=r,e.gfx=o}mr(i,"bpmn:Participant")&&mr(r,"bpmn:Process")&&(t.on("element.hover",Bu,a),t.once("create.cleanup",(function(){t.off("element.hover",a)})))})),this.preExecute("elements.create",Bu,(function(e){var t,n=e.elements,r=e.parent,o=function(e){return g(e,(function(e){return mr(e,"bpmn:Participant")}))}(n);o&&mr(r,"bpmn:Process")&&(e.parent=i(),(t=e.hints=e.hints||{}).participant=o,t.process=r,t.processRef=vr(o).get("processRef"))}),!0),this.preExecute("shape.create",(function(e){var t=e.parent,n=e.shape;mr(n,"bpmn:Participant")&&mr(t,"bpmn:Process")&&(e.parent=i(),e.process=t,e.processRef=vr(n).get("processRef"))}),!0),this.execute("shape.create",(function(e){var t=e.hints||{},n=e.process||t.process,i=e.shape,r=t.participant;!n||r&&i!==r||vr(i).set("processRef",vr(n))}),!0),this.revert("shape.create",(function(e){var t=e.hints||{},n=e.process||t.process,i=e.processRef||t.processRef,r=e.shape,o=t.participant;!n||o&&r!==o||vr(r).set("processRef",i)}),!0),this.postExecute("shape.create",(function(e){var t=e.hints||{},i=e.process||e.hints.process,r=e.shape,o=t.participant;if(i){var a=i.children.slice();o?r===o&&n.moveElements(a,{x:0,y:0},o):n.moveElements(a,{x:0,y:0},r)}}),!0)}Lu.$inject=["canvas","eventBus","modeling"],n(Lu,Vo);var ju="__targetRef_placeholder";function Iu(e,t){function n(e,n){var i=e.get("properties"),r=g(i,(function(e){return e.name===ju}));return!r&&n&&vt(i,r=t.create("bpmn:Property",{name:ju})),r}function i(e,t){var i=n(e);i&&(function(e,t,n){return g(e.get("dataInputAssociations"),(function(e){return e!==n&&e.targetRef===t}))}(e,i,t)||ft(e.get("properties"),i))}function r(e){var t,r=e.context,o=r.connection,a=o.businessObject,s=o.target,c=s&&s.businessObject,l=r.newTarget,p=l&&l.businessObject,u=r.oldTarget||r.target,h=u&&u.businessObject,d=o.businessObject;h&&h!==c&&i(h,a),p&&p!==c&&i(p,a),c?(t=n(c,!0),d.targetRef=t):d.targetRef=null}Vo.call(this,e),this.executed(["connection.create","connection.delete","connection.move","connection.reconnect"],$u(r)),this.reverted(["connection.create","connection.delete","connection.move","connection.reconnect"],$u(r))}function $u(e){return function(t){if(mr(t.context.connection,"bpmn:DataInputAssociation"))return e(t)}}function Fu(e){this._bpmnUpdater=e}function Hu(e,t,n,i){function r(e){return e.children.filter((function(e){return mr(e,"bpmn:DataStoreReference")&&!e.labelTarget}))}function o(e,i){var r=e.businessObject||e;if(i=i||n.filter((function(e){return mr(e,"bpmn:Participant")&&vr(e).processRef}))[0]){var o=i.businessObject||i;t.execute("dataStore.updateContainment",{dataStoreBo:r,dataStoreDi:gr(e),newSemanticParent:o.processRef||o,newDiParent:gr(i)})}}Vo.call(this,i),t.registerHandler("dataStore.updateContainment",Fu),this.preExecute("shape.create",(function(e){var t=e.context,n=t.shape;mr(n,"bpmn:DataStoreReference")&&"label"!==n.type&&(t.hints||(t.hints={}),t.hints.autoResize=!1)})),this.preExecute("elements.move",(function(e){var t=e.context,n=t.shapes;n.filter((function(e){return mr(e,"bpmn:DataStoreReference")})).length&&(t.hints||(t.hints={}),t.hints.autoResize=n.filter((function(e){return!mr(e,"bpmn:DataStoreReference")})))})),this.postExecute("shape.create",(function(e){var t=e.context.shape,n=t.parent;mr(t,"bpmn:DataStoreReference")&&"label"!==t.type&&mr(n,"bpmn:Collaboration")&&o(t)})),this.postExecute("shape.move",(function(e){var t=e.context,n=t.shape,i=t.oldParent,r=n.parent;mr(i,"bpmn:Collaboration")||mr(n,"bpmn:DataStoreReference")&&"label"!==n.type&&mr(r,"bpmn:Collaboration")&&o(n,mr(i,"bpmn:Participant")?i:function(e,t){for(;e.parent;){if(mr(e.parent,t))return e.parent;e=e.parent}}(i,"bpmn:Participant"))})),this.postExecute("shape.delete",(function(t){var n=t.context.shape,i=e.getRootElement();fr(n,["bpmn:Participant","bpmn:SubProcess"])&&mr(i,"bpmn:Collaboration")&&r(i).filter((function(e){return function(e,t){var n=e.businessObject||e,i=t.businessObject||t;for(;n.$parent;){if(n.$parent===i.processRef||i)return!0;n=n.$parent}return!1}(e,n)})).forEach((function(e){o(e)}))})),this.postExecute("canvas.updateRoot",(function(e){var t=e.context,n=t.oldRoot,i=t.newRoot;r(n).forEach((function(e){mr(i,"bpmn:Process")&&o(e,i)}))}))}Iu.$inject=["eventBus","bpmnFactory"],n(Iu,Vo),Fu.$inject=["bpmnUpdater"],Fu.prototype.execute=function(e){var t=e.dataStoreBo,n=e.dataStoreDi,i=e.newSemanticParent,r=e.newDiParent;e.oldSemanticParent=t.$parent,e.oldDiParent=n.$parent,this._bpmnUpdater.updateSemanticParent(t,i),this._bpmnUpdater.updateDiParent(n,r)},Fu.prototype.revert=function(e){var t=e.dataStoreBo,n=e.dataStoreDi,i=e.oldSemanticParent,r=e.oldDiParent;this._bpmnUpdater.updateSemanticParent(t,i),this._bpmnUpdater.updateDiParent(n,r)},Hu.$inject=["canvas","commandStack","elementRegistry","eventBus"],n(Hu,Vo);function Vu(e,t,n){Vo.call(this,e),this.postExecuted("shape.delete",500,(function(e){var t=e.context,i=t.hints,r=t.shape,o=t.oldParent;mr(r,"bpmn:Lane")&&(i&&i.nested||function(e,t){var i,r,o,a=hp(t),s=[],c=[];st(a,(function(t){return t.y>e.y?c.push(t):s.push(t),t.children})),a.length&&(i=c.length&&s.length?e.height/2:e.height,s.length&&(r=n.calculateAdjustments(s,"y",i,e.y-10),n.makeSpace(r.movingShapes,r.resizingShapes,{x:0,y:i},"s")),c.length&&(o=n.calculateAdjustments(c,"y",-i,e.y+e.height+10),n.makeSpace(o.movingShapes,o.resizingShapes,{x:0,y:-i},"n")))}(r,o))}))}Vu.$inject=["eventBus","modeling","spaceTool"],n(Vu,Vo);function Gu(e,t){t.invoke(Vo,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",500,(function(e){var t=e.elements;t.filter((function(e){return Wu(e,e.host)})).map((function(e){return t.indexOf(e)})).forEach((function(i){e.elements[i]=n.replaceShape(t[i])}))}),!0),this.preExecute("elements.move",500,(function(e){var t=e.shapes,i=e.newHost;t.forEach((function(e,r){var o,a=e.host;Wu(e,(o=a,-1!==t.indexOf(o)?a:i))&&(t[r]=n.replaceShape(e))}))}),!0)}function Wu(e,t){return!ao(e)&&mr(e,"bpmn:BoundaryEvent")&&!t}function Uu(e,t,n){function i(e,i,r){var o,a,s,c,l,p,u,h,m=i.waypoints,f=e.outgoing.slice(),v=e.incoming.slice(),g=Ns(m,h=d(r.width)?cn(r):r);if(g){if(o=m.slice(0,g.index),a=m.slice(g.index+(g.bendpoint?1:0)),!o.length||!a.length)return;s=g.bendpoint?m[g.index]:h,1!==o.length&&qu(e,o[o.length-1])||o.push(Xu(s)),1!==a.length&&qu(e,a[0])||a.unshift(Xu(s))}c=i.source,l=i.target,t.canConnect(c,e,i)&&(n.reconnectEnd(i,e,o||h),p=i),t.canConnect(e,l,i)&&(p?u=n.connect(e,l,{type:i.type,waypoints:a}):(n.reconnectStart(i,e,a||h),u=i));var b=[].concat(p&&y(v,(function(e){return e.source===p.source}))||[],u&&y(f,(function(e){return e.target===u.target}))||[]);b.length&&n.removeElements(b)}Vo.call(this,e),this.preExecute("elements.move",(function(e){var n=e.newParent,i=e.shapes,r=e.delta,o=i[0];if(o&&n){n&&n.waypoints&&(e.newParent=n=n.parent);var a=cn(o),s={x:a.x+r.x,y:a.y+r.y},c=g(n.children,(function(e){return t.canInsert(i,e)&&Ns(e.waypoints,s)}));c&&(e.targetFlow=c,e.position=s)}}),!0),this.postExecuted("elements.move",(function(e){var t=e.shapes,n=e.targetFlow,r=e.position;n&&i(t[0],n,r)}),!0),this.preExecute("shape.create",(function(e){var n=e.parent,i=e.shape;t.canInsert(i,n)&&(e.targetFlow=n,e.parent=n.parent)}),!0),this.postExecuted("shape.create",(function(e){var t=e.shape,n=e.targetFlow,r=e.position;n&&i(t,n,r)}),!0)}function qu(e,t){var n=t.x,i=t.y;return n>=e.x&&n<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}function Xu(e){return $({},e)}function Yu(e,t){Vo.call(this,e),this.preExecuted("connection.create",(function(e){var n=e.context,i=n.source,r=n.target,o=r.incoming.slice();n.hints&&!1===n.hints.createElementsBehavior||mr(i,"bpmn:EventBasedGateway")&&r.incoming.length&&o.filter(Ku).forEach((function(e){t.removeConnection(e)}))})),this.preExecuted("shape.replace",(function(e){var n=e.context.newShape;mr(n,"bpmn:EventBasedGateway")&&n.outgoing.filter(Ku).map((function(e){return e.target})).reduce((function(e,t){var n=t.incoming.filter(Ku);return e.concat(n)}),[]).forEach((function(e){e.source!==n&&t.removeConnection(e)}))}))}function Ku(e){return mr(e,"bpmn:SequenceFlow")}Gu.$inject=["bpmnReplace","injector"],n(Gu,Vo),Gu.prototype.replaceShape=function(e){var t,n,i=(n=vr(e).eventDefinitions)&&n[0];return t=i?{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:i.$type}:{type:"bpmn:IntermediateThrowEvent"},this._bpmnReplace.replaceElement(e,t,{layoutConnection:!1})},n(Uu,Vo),Uu.$inject=["eventBus","bpmnRules","modeling"],Yu.$inject=["eventBus","modeling"],n(Yu,Vo);function Zu(e,t,n,i,r,o){function a(){return vr(t.getRootElement()).$parent}function s(e){var t=vr(e).categoryValueRef;if(t){var n=t.$parent;t&&(ft(n.categoryValue,t),n&&!n.categoryValue.length&&function(e){ft(a().get("rootElements"),e)}(n))}}r.invoke(Vo,this),this.executed("shape.delete",(function(e){var t,i=e.context.shape;if(mr(i,"bpmn:Group")){var r=vr(i).categoryValueRef,o=n.filter((function(e){return mr(e,"bpmn:Group")}));t=r,o.some((function(e){var n=vr(e);return n.categoryValueRef&&n.categoryValueRef===t}))||s(i)}})),this.reverted("shape.delete",(function(e){var t=e.context.shape;if(mr(t,"bpmn:Group")){var n=vr(t).categoryValueRef,i=a(),r=n?n.$parent:null;vt(r.get("categoryValue"),n),vt(i.get("rootElements"),r)}})),this.execute("shape.create",(function(t){var n=vr(t.context.shape);if(mr(n,"bpmn:Group")&&!n.categoryValueRef){var i=hu(a(),e);n.categoryValueRef=i}})),this.revert("shape.create",(function(e){var t=e.context.shape;mr(t,"bpmn:Group")&&(s(t),delete vr(t).categoryValueRef)})),i.on("moddleCopy.canCopyProperty",2e3,(function(t){var n,i=t.property;if(mr(i,"bpmn:CategoryValue"))return n=hu(a(),e),o.copyElement(i,n)}))}function Qu(e,t,n,i){var r,o,a,s;return 0==(r=(i.y-n.y)*(t.x-e.x)-(i.x-n.x)*(t.y-e.y))?null:(o=e.y-n.y,a=e.x-n.x,s=((i.x-n.x)*o-(i.y-n.y)*a)/r,{x:Math.round(e.x+s*(t.x-e.x)),y:Math.round(e.y+s*(t.y-e.y))})}function Ju(e){function t(e,t,n){var i,r={x:n.x,y:n.y-50},o={x:n.x-50,y:n.y},a=Qu(e,t,n,r),s=Qu(e,t,n,o);i=a&&s?eh(a,n)>eh(s,n)?s:a:a||s,e.original=i}e.on("bpmnElement.added",(function(e){var n,i,r=e.element;r.waypoints&&(t((i=(n=r).waypoints)[0],i[1],cn(n.source)),t(i[i.length-1],i[i.length-2],cn(n.target)))}))}function eh(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function th(e){Vo.call(this,e);var t=["bpmn:Participant","bpmn:Lane"];this.executed(["shape.move","shape.create","shape.resize"],(function(e){var n=e.context.shape,i=vr(n),r=gr(n);fr(i,t)&&!r.get("isHorizontal")&&r.set("isHorizontal",!0)}))}function nh(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}function ih(e){return Math.atan((e[1].y-e[0].y)/(e[1].x-e[0].x))}function rh(e,t){var n=t[0],i=t[1],r={x:i.x-n.x,y:i.y-n.y},o=function(e,t,n){var i=[{n:e[0]-n[0],lambda:t[0]},{n:e[1]-n[1],lambda:t[1]}];return-(i[0].n*t[0]+i[1].n*t[1])/(i[0].lambda*t[0]+i[1].lambda*t[1])}([n.x,n.y],[r.x,r.y],[e.x,e.y]);return{x:n.x+o*r.x,y:n.y+o*r.y}}function oh(e,t){var n=rh(e,t);return nh({x:n.x-e.x,y:n.y-e.y})}function ah(e,t){return nh({x:e.x-t.x,y:e.y-t.y})}Zu.$inject=["bpmnFactory","canvas","elementRegistry","eventBus","injector","moddleCopy"],n(Zu,Vo),Ju.$inject=["eventBus"],th.$inject=["eventBus"],n(th,Vo);var sh=Math.sqrt,ch=Math.min,lh=Math.max,ph=Math.abs;function uh(e){return Math.pow(e,2)}function hh(e,t){return sh(uh(e.x-t.x)+uh(e.y-t.y))}function dh(e,t,n,i){var r=t.x-e.x,o=t.y-e.y,a=n.x-e.x,s=n.y-e.y,c=r*r+o*o,l=(r*a+o*s)/c,p=l*l-(a*a+s*s-i*i)/c;if(p<0&&p>-1e-6&&(p=0),p<0)return[];var u=sh(p),h=-l+u,d=-l-u,m={x:e.x-r*h,y:e.y-o*h};return 0===p?[m]:[m,{x:e.x-r*d,y:e.y-o*d}].filter((function(n){return function(e,t,n){return mh(e.x,t.x,n.x)&&mh(e.y,t.y,n.y)}(n,e,t)}))}function mh(e,t,n){return e>=ch(t,n)-fh&&e<=lh(t,n)+fh}var fh=.1;function vh(e,t){return ph(e.x-t.x)<=fh&&ph(e.y-t.y)<=fh}function gh(e,t,n,i){var r=0,o=0,a=function(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}(e),s=function(e,t){var n,i,r,o,a,s,c,l,p,u,h,d,m=0;for(m=0;m<t.length-1;m++){if(vh(n=t[m],i=t[m+1])?s=[n]:(r=hh(e,n),o=hh(e,i),s=dh(n,i,e,ch(r,o))),s.length<1)throw new Error("expected between [1, 2] circle -> line intersections");1===s.length&&(c={type:"bendpoint",position:s[0],segmentIndex:m,bendpointIndex:vh(n,s[0])?m:m+1}),2===s.length&&(h=s[0],d=s[1],c={type:"segment",position:a={x:(h.x+d.x)/2,y:(h.y+d.y)/2},segmentIndex:m,relativeLocation:hh(n,a)/hh(n,i)}),l=hh(c.position,e),(!u||p>l)&&(u=c,p=l)}return u}(a,n),c=s.segmentIndex,l=function(e,t,n,i){var r=n.segmentIndex,o=t.length-e.length;if(i.segmentMove){var a=i.segmentMove.segmentStartIndex,s=i.segmentMove.newSegmentStartIndex;return r===a?s:r>=s?r+o<s?s:r+o:r}if(i.bendpointMove){var c,l=i.bendpointMove.insert,p=i.bendpointMove.bendpointIndex;return 0===o?r:(r>=p&&(c=l?r+1:r-1),r<p&&(c=r,l&&"bendpoint"!==n.type&&p-1===r&&yh(t,p)<n.relativeLocation&&c++),c)}return 0===o?r:i.connectionStart?0===r?0:null:i.connectionEnd&&r===e.length-2?t.length-2:null}(n,t,s,i);if(null===l)return{x:r,y:o};if(l<0||l>t.length-2)return{x:r,y:o};var p,u,h=bh(n,c),d=bh(t,l),m=s.position,f=function(e,t){var n=ah(e[0],e[1]),i=ah(e[0],t);return 0===n?0:i/n}(h,m),v=(p=d,u=ih(h),ih(p)-u);if("bendpoint"===s.type){var g=t.length-n.length,y=s.bendpointIndex,b=n[y];if(-1!==t.indexOf(b))return{x:r,y:o};if(0===g){var _=t[y];return{x:_.x-s.position.x,y:_.y-s.position.y}}g<0&&0!==y&&y<n.length-1&&(f=yh(n,y))}var x,w,E=(d[1].x-d[0].x)*f+d[0].x,S=(d[1].y-d[0].y)*f+d[0].y,C=(x={x:a.x-m.x,y:a.y-m.y},(w=v)?{x:Math.cos(w)*x.x-Math.sin(w)*x.y,y:Math.sin(w)*x.x+Math.cos(w)*x.y}:x);return on({x:r=E+C.x-a.x,y:o=S+C.y-a.y})}function yh(e,t){var n=ah(e[t-1],e[t]);return n/(n+ah(e[t],e[t+1]))}function bh(e,t){return[e[t],e[t+1]]}function _h(e,t,n){var i=ka(t),r=ka(n),o=Oa(e,i),a=o.x*(n.width/t.width),s=o.y*(n.height/t.height);return on({x:r.x+a,y:r.y+s})}function xh(e,t,n){var i=ka(e),r=ka(t),o=ka(n),a=Oa(e,i),s=Oa(i,r),c=function(e,t,n){var i=an(t),r=an(n);if(function(e,t){return function(e,t){return e.right!==t.right&&e.left!==t.left}(e,t)||function(e,t){return e.top!==t.top&&e.bottom!==t.bottom}(e,t)}(i,r))return null;var o,a,s=ln(t,e);if("top"===s)o={x:0,y:r.bottom-i.bottom};else if("bottom"===s)o={x:0,y:r.top-i.top};else if("right"===s)o={x:r.left-i.left,y:0};else{if("left"!==s)return null;o={x:r.right-i.right,y:0}}if(a={x:e.x+o.x,y:e.y+o.y},ln(n,a)!==s)return null;return o}(i,t,n);if(c)return c;var l=s.x*(n.width/t.width),p=s.y*(n.height/t.height),u=o.x+l,h=o.y+p;return on({x:u+a.x-e.x,y:h+a.y-e.y})}var wh={width:90,height:20},Eh="name",Sh="text";function Ch(e,t,n,i){Vo.call(this,e),this.postExecute("element.updateProperties",(function(e){var n=e.context,r=n.element,o=n.properties;if(Eh in o&&t.updateLabel(r,o.name),Sh in o&&mr(r,"bpmn:TextAnnotation")){var a=i.getTextAnnotationBounds({x:r.x,y:r.y,width:r.width,height:r.height},o.text||"");t.updateLabel(r,o.text,a)}})),this.postExecute(["shape.create","connection.create"],(function(e){var n=e.context;if(!1!==(n.hints||{}).createElementsBehavior){var r=n.shape||n.connection,o=r.businessObject;if(!ao(r)&&no(r)&&Nr(r)){var a=oo(r),s=i.getExternalLabelBounds(wh,Nr(r));t.createLabel(r,a,{id:o.id+"_label",businessObject:o,width:s.width,height:s.height})}}})),this.postExecute("shape.delete",(function(e){var n=e.context,i=n.labelTarget,r=n.hints||{};i&&!1!==r.unsetLabel&&t.updateLabel(i,null,null,{removeShape:!1})})),this.postExecute(["label.create"],(function(e){var t,i=e.context,r=i.shape,o=i.labelTarget;o&&mr(o,"bpmn:BaseElement")&&((t=gr(o)).label||(t.label=n.create("bpmndi:BPMNLabel",{bounds:n.create("dc:Bounds")}),r.di=t),$(t.label.bounds,{x:r.x,y:r.y,width:r.width,height:r.height}))})),this.postExecute(["connection.layout","connection.updateWaypoints"],(function(e){var n=e.context;if(!1!==(n.hints||{}).labelBehavior){var i,r=n.connection.label;r&&r.parent&&(i=function(e){var t=e.context,n=t.connection,i=n.label,r=$({},t.hints),o=t.newWaypoints||n.waypoints,a=t.oldWaypoints;return void 0===r.startChanged&&(r.startChanged=!!r.connectionStart),void 0===r.endChanged&&(r.endChanged=!!r.connectionEnd),gh(i,o,a,r)}(e),t.moveShape(r,i))}})),this.postExecute(["shape.replace"],(function(e){var t=e.context,n=t.newShape,i=t.oldShape,r=vr(n);r&&no(r)&&i.label&&n.label&&(n.label.x=i.label.x,n.label.y=i.label.y)})),this.postExecute("shape.resize",(function(e){var n,i=e.context,r=i.shape,o=i.newBounds,a=i.oldBounds;if(io(r)){var s=r.label,c=Rh(function(e,t){if(!t.length)return;var n=function(e,t){return k(t.map((function(t){return{line:t,distance:oh(e,t)}})),"distance")[0].line}(e,t);return rh(e,n)}(cn(s),[[{x:(n=a).x,y:n.y},{x:n.x+(n.width||0),y:n.y}],[{x:n.x+(n.width||0),y:n.y},{x:n.x+(n.width||0),y:n.y+(n.height||0)}],[{x:n.x,y:n.y+(n.height||0)},{x:n.x+(n.width||0),y:n.y+(n.height||0)}],[{x:n.x,y:n.y},{x:n.x,y:n.y+(n.height||0)}]]),a,o);t.moveShape(s,c)}}))}function Rh(e,t,n){return on(Oa(_h(e,t,n),e))}function Ph(e,t,n){var i=Oh(e),r=Dh(i,t),o=i[0];return r.length?r[r.length-1]:_h(o.original||o,n,t)}function Mh(e,t,n){var i=Oh(e),r=Dh(i,t),o=i[i.length-1];return r.length?r[0]:_h(o.original||o,n,t)}function Th(e,t,n){var i=Oh(e),r=kh(t,n),o=i[0];return _h(o.original||o,r,t)}function Ah(e,t,n){var i=Oh(e),r=kh(t,n),o=i[i.length-1];return _h(o.original||o,r,t)}function kh(e,t){return{x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}}function Oh(e){var t=e.waypoints;if(!t.length)throw new Error("connection#"+e.id+": no waypoints");return t}function Dh(e,t){return y(S(e,zh),(function(e){return function(e,t){return"intersect"===ln(t,e,1)}(e,t)}))}function zh(e){return e.original||e}function Nh(e,t){Vo.call(this,e),this.postExecute("shape.replace",(function(e){var n=e.oldShape,i=e.newShape;if(function(e,t){return mr(e,"bpmn:Participant")&&Ar(e)&&mr(t,"bpmn:Participant")&&!Ar(t)}(n,i)){var r,o,a,s,c=(o=ct([r=n],!1),a=[],s=[],o.forEach((function(e){e!==r&&(e.incoming.forEach((function(e){mr(e,"bpmn:MessageFlow")&&a.push(e)})),e.outgoing.forEach((function(e){mr(e,"bpmn:MessageFlow")&&s.push(e)})))}),[]),{incoming:a,outgoing:s});c.incoming.forEach((function(e){var r=Mh(e,i,n);t.reconnectEnd(e,i,r)})),c.outgoing.forEach((function(e){var r=Ph(e,i,n);t.reconnectStart(e,i,r)}))}}),!0)}n(Ch,Vo),Ch.$inject=["eventBus","modeling","bpmnFactory","textRenderer"],Nh.$inject=["eventBus","modeling"],n(Nh,Vo);function Bh(e,t,n){e.on(["shape.move.rejected","create.rejected"],(function(e){var i,r,o,a=e.context,s=a.shape;mr(a.target,"bpmn:Collaboration")&&mr(s,"bpmn:FlowNode")&&(i=e,r=n("flow elements must be children of pools/participants"),t.add({position:{x:i.x+5,y:i.y+5},type:"error",timeout:o||2e3,html:"<div>"+r+"</div>"}))}))}function Lh(e,t,n,i){Vo.call(this,e);var r=i.get("dragging",!1);function o(e){var i,r,o=e.source,a=e.target;e.parent&&(mr(e,"bpmn:SequenceFlow")&&(n.canConnectSequenceFlow(o,a)||(r=!0),n.canConnectMessageFlow(o,a)&&(i="bpmn:MessageFlow")),mr(e,"bpmn:MessageFlow")&&(n.canConnectMessageFlow(o,a)||(r=!0),n.canConnectSequenceFlow(o,a)&&(i="bpmn:SequenceFlow")),mr(e,"bpmn:Association")&&!n.canConnectAssociation(o,a)&&(r=!0),r&&t.removeConnection(e),i&&t.connect(o,a,{type:i,waypoints:e.waypoints.slice()}))}this.postExecuted("elements.move",(function(e){b(e.closure.allConnections,o)}),!0),this.preExecute("connection.reconnect",(function(e){var i,o,a=e.context,s=a.connection,c=a.newSource||s.source,l=a.newTarget||s.target;(i=n.canConnect(c,l))&&i.type!==s.type&&(o=t.connect(c,l,{type:i.type,waypoints:s.waypoints.slice()}),t.removeConnection(s),a.connection=o,r&&function(e,t){var n,i=r.context(),o=i&&i.payload.previousSelection;if(!o||!o.length)return;if(-1===(n=o.indexOf(e)))return;o.splice(n,1,t)}(s,o))})),this.postExecuted("element.updateProperties",(function(e){var n,i=e.context,r=i.properties,o=i.element,a=o.businessObject;r.default&&(n=g(o.outgoing,O({id:o.businessObject.default.id})))&&t.updateProperties(n,{conditionExpression:void 0}),r.conditionExpression&&a.sourceRef.default===a&&t.updateProperties(o.source,{default:void 0})}))}function jh(e,t){Vo.call(this,e),this.preExecute("shape.delete",(function(e){var t=e.shape,n=t.parent;mr(t,"bpmn:Participant")&&(e.collaborationRoot=n)}),!0),this.postExecute("shape.delete",(function(e){var n=e.collaborationRoot;n&&!n.businessObject.participants.length&&t.makeProcess()}),!0)}function Ih(e,t,n,i,r,o){i.invoke(Vo,this),this._bpmnReplace=e,this._elementRegistry=n,this._selection=o,this.postExecuted(["elements.create"],500,(function(e){var n=e.context,i=n.parent,r=n.elements,o=t.canReplace(r,i);o&&this.replaceElements(r,o.replacements)}),this),this.postExecuted(["elements.move"],500,(function(e){var n=e.context,i=n.newParent,r=n.newHost,o=[];b(n.closure.topLevel,(function(e){o=Or(e)?o.concat(e.children):o.concat(e)})),1===o.length&&r&&(i=r);var a=t.canReplace(o,i);a&&this.replaceElements(o,a.replacements,r)}),this),this.postExecute(["shape.replace"],1500,(function(e){var n,i=e.context,r=i.oldShape,o=i.newShape,a=r.attachers;a&&a.length&&(n=t.canReplace(a,o),this.replaceElements(a,n.replacements))}),this),this.postExecuted(["shape.replace"],1500,(function(e){var t=e.context,n=t.oldShape,i=t.newShape;r.unclaimId(n.businessObject.id,n.businessObject),r.updateProperties(i,{id:n.id})}))}Bh.$inject=["eventBus","tooltips","translate"],n(Lh,Vo),Lh.$inject=["eventBus","modeling","bpmnRules","injector"],jh.$inject=["eventBus","modeling"],n(jh,Vo),n(Ih,Vo),Ih.prototype.replaceElements=function(e,t){var n=this._elementRegistry,i=this._bpmnReplace,r=this._selection;b(t,(function(t){var r={type:t.newElementType},o=n.get(t.oldElementId),a=e.indexOf(o);e[a]=i.replaceElement(o,r,{select:!1})})),t&&r.select(e)},Ih.$inject=["bpmnReplace","bpmnRules","elementRegistry","injector","modeling","selection"];var $h=300,Fh=60,Hh={width:300,height:150},Vh={width:140,height:120},Gh={width:50,height:30};function Wh(e){e.on("resize.start",1500,(function(e){var t=e.context,n=t.shape,i=t.direction,r=t.balanced;(mr(n,"bpmn:Lane")||mr(n,"bpmn:Participant"))&&(t.resizeConstraints=function(e,t,n){var i=dp(e),r=!0,o=!0,a=up(i,[i]),s=an(e),c={},l={};/e/.test(t)?l.right=s.left+$h:/w/.test(t)&&(l.left=s.right-$h);return a.forEach((function(e){var i=an(e);/n/.test(t)&&(i.top<s.top-10&&(r=!1),n&&Uh(s.top-i.bottom)<10&&Zh(c,"top",i.top+Fh),Uh(s.top-i.top)<5&&Kh(l,"top",i.bottom-Fh)),/s/.test(t)&&(i.bottom>s.bottom+10&&(o=!1),n&&Uh(s.bottom-i.top)<10&&Kh(c,"bottom",i.bottom-Fh),Uh(s.bottom-i.bottom)<5&&Zh(l,"bottom",i.top+Fh))})),i.children.filter((function(e){return!e.hidden&&!e.waypoints&&(mr(e,"bpmn:FlowElement")||mr(e,"bpmn:Artifact"))})).forEach((function(e){var n=an(e);r&&/n/.test(t)&&Kh(l,"top",n.top-20),/e/.test(t)&&Zh(l,"right",n.right+20),o&&/s/.test(t)&&Zh(l,"bottom",n.bottom+20),/w/.test(t)&&Kh(l,"left",n.left-50)})),{min:l,max:c}}(n,i,r)),mr(n,"bpmn:Participant")&&(t.minDimensions=Hh),mr(n,"bpmn:SubProcess")&&Ar(n)&&(t.minDimensions=Vh),mr(n,"bpmn:TextAnnotation")&&(t.minDimensions=Gh)}))}Wh.$inject=["eventBus"];var Uh=Math.abs,qh=Math.min,Xh=Math.max;function Yh(e,t,n,i){var r=e[t];e[t]=void 0===r?n:i(n,r)}function Kh(e,t,n){return Yh(e,t,n,qh)}function Zh(e,t,n){return Yh(e,t,n,Xh)}function Qh(e,t){e.on("resize.start",1501,(function(e){var t=e.context,n=t.shape;(mr(n,"bpmn:Lane")||mr(n,"bpmn:Participant"))&&(t.balanced=!bo(e))})),e.on("resize.end",1001,(function(e){var n=e.context,i=n.shape,r=n.canExecute,o=n.newBounds;if(mr(i,"bpmn:Lane")||mr(i,"bpmn:Participant"))return r&&(o=rn(o),t.resizeLane(i,o,n.balanced)),!1}))}function Jh(e,t,n){Vo.call(this,e),this.preExecute("shape.delete",(function(e){var i=e.context.shape;if(1===i.incoming.length&&1===i.outgoing.length){var r=i.incoming[0],o=i.outgoing[0];if(mr(r,"bpmn:SequenceFlow")&&mr(o,"bpmn:SequenceFlow")&&t.canConnect(r.source,o.target,r)){var a=function(e,t){var n=Qu(ed(e[e.length-2]),ed(e[e.length-1]),ed(t[1]),ed(t[0]));return n?[].concat(e.slice(0,e.length-1),[n],t.slice(1)):[ed(e[0]),ed(t[t.length-1])]}(r.waypoints,o.waypoints);n.reconnectEnd(r,o.target,a)}}}))}function ed(e){return e.original||e}Qh.$inject=["eventBus","modeling"],n(Jh,Vo),Jh.$inject=["eventBus","bpmnRules","modeling"];var td=Math.max;function nd(e){e.on("spaceTool.getMinDimensions",(function(e){var t=e.shapes,n=e.axis,i=e.start,r={};return b(t,(function(e){var t=e.id;mr(e,"bpmn:Participant")&&(!function(e){return"x"===e}(n)?r[t]={width:Hh.width,height:id(e,i)}:r[t]=Hh),mr(e,"bpmn:SubProcess")&&Ar(e)&&(r[t]=Vh),mr(e,"bpmn:TextAnnotation")&&(r[t]=Gh)})),r}))}function id(e,t){var n;return hp(e).length?(n=function(e,t){var n,i=hp(e);return n=rd(i,t),e.height-n.height+Fh}(e,t),td(Hh.height,n)):Hh.height}function rd(e,t){var n,i,r;for(n=0;n<e.length;n++)if(t>=(i=e[n]).y&&t<=i.y+i.height)return(r=hp(i)).length?rd(r,t):i}function od(e,t){e.invoke(Vo,this),this.postExecuted("shape.replace",(function(e){var n=e.context.oldShape,i=e.context.newShape;if(mr(i,"bpmn:SubProcess")&&mr(n,"bpmn:Task")&&Ar(i)){var r,o={x:(r=i).x+r.width/6,y:r.y+r.height/2};t.createShape({type:"bpmn:StartEvent"},o,i)}}))}nd.$inject=["eventBus"],od.$inject=["injector","modeling"],n(od,Vo);var ad=180,sd=160;function cd(e,t,n,i,r,o,a){Vo.call(this,t),this._canvas=e,this._eventBus=t,this._modeling=n,this._elementFactory=i,this._bpmnFactory=r,this._bpmnjs=o,this._elementRegistry=a;var s=this;function c(e){return mr(e,"bpmn:SubProcess")&&!Ar(e)}function l(t){var n=t.shape,i=t.newRootElement,r=vr(n);i=s._addDiagram(i||r),t.newRootElement=e.addRootElement(i)}function p(t){var n=vr(t.shape);s._removeDiagram(n);var i=t.newRootElement=a.get(Zo(n));e.removeRootElement(i)}this.executed("shape.create",(function(e){c(e.shape)&&l(e)}),!0),this.postExecuted("shape.create",(function(e){var t=e.shape,n=e.newRootElement;n&&t.children&&(s._showRecursively(t.children),s._moveChildrenToShape(t,n))}),!0),this.reverted("shape.create",(function(e){c(e.shape)&&p(e)}),!0),this.preExecuted("shape.delete",(function(e){var t=e.shape;if(c(t)){var i=a.get(Zo(t));i&&n.removeElements(i.children.slice())}}),!0),this.executed("shape.delete",(function(e){c(e.shape)&&p(e)}),!0),this.reverted("shape.delete",(function(e){c(e.shape)&&l(e)}),!0),this.preExecuted("shape.replace",(function(t){var n=t.oldShape,i=t.newShape;c(n)&&c(i)&&(t.oldRoot=e.removeRootElement(Zo(n)))}),!0),this.postExecuted("shape.replace",(function(t){var i=t.newShape,r=t.oldRoot,o=e.findRoot(Zo(i));if(r&&o){var a=r.children;n.moveElements(a,{x:0,y:0},o)}}),!0),this.executed("element.updateProperties",(function(e){var t=e.element;if(mr(t,"bpmn:SubProcess")){var n=e.properties,i=e.oldProperties.id,r=n.id;if(i!==r){if(Jo(t))return a.updateId(t,Qo(r)),void a.updateId(i,r);a.get(Qo(i))&&a.updateId(Qo(i),Qo(r))}}}),!0),this.reverted("element.updateProperties",(function(e){if(c(e.element)){var t=e.properties,n=e.oldProperties.id,i=t.id;if(n!==i){var r=a.get(Qo(i));r&&a.updateId(r,Qo(n))}}}),!0),this.executed("shape.toggleCollapse",400,(function(e){var t=e.shape;mr(t,"bpmn:SubProcess")&&(Ar(t)?p(e):(l(e),s._showRecursively(t.children)))}),!0),this.reverted("shape.toggleCollapse",400,(function(e){var t=e.shape;mr(t,"bpmn:SubProcess")&&(Ar(t)?p(e):(l(e),s._showRecursively(t.children)))}),!0),this.postExecuted("shape.toggleCollapse",600,(function(e){var t=e.shape;if(mr(t,"bpmn:SubProcess")){var n=e.newRootElement;n&&(Ar(t)?s._moveChildrenToShape(n,t):s._moveChildrenToShape(t,n))}}),!0),t.on("copyPaste.createTree",(function(e){var t=e.element,n=e.children;if(c(t)){var i=Zo(t),r=a.get(i);r&&n.push.apply(n,r.children)}})),t.on("copyPaste.copyElement",(function(e){var t=e.descriptor,n=e.element,i=e.elements,r=n.parent;if(mr(gr(r),"bpmndi:BPMNPlane")){var o=Ko(r),a=g(i,(function(e){return e.id===o}));a&&(t.parent=a.id)}})),t.on("copyPaste.pasteElement",(function(e){var t=e.descriptor;t.parent&&(c(t.parent)||t.parent.hidden)&&(t.hidden=!0)}))}function ld(e,t){Vo.call(this,e),this.postExecuted("shape.toggleCollapse",1500,(function(e){var n=e.shape;if(!Ar(n)){var i=ct(n);i.forEach((function(e){var t=e.incoming.slice(),n=e.outgoing.slice();b(t,(function(e){r(e,!0)})),b(n,(function(e){r(e,!1)}))}))}function r(e,r){i.includes(e.source)&&i.includes(e.target)||(r?t.reconnectEnd(e,n,cn(n)):t.reconnectStart(e,n,cn(n)))}}),!0)}n(cd,Vo),cd.prototype._moveChildrenToShape=function(e,t){var n,i=this._modeling,r=e.children;if(r){var o=r.filter((function(e){return!e.hidden}));if(o.length){var a=lt(o);if(t.x){var s=cn(t),c=cn(a);n={x:s.x-c.x,y:s.y-c.y}}else n={x:ad-a.x,y:sd-a.y};i.moveElements(r,n,t,{autoResize:!1})}else i.moveElements(r,{x:0,y:0},t,{autoResize:!1})}},cd.prototype._showRecursively=function(e,t){var n=this,i=[];return e.forEach((function(e){e.hidden=!!t,i=i.concat(e),e.children&&(i=i.concat(n._showRecursively(e.children,e.collapsed||t)))})),i},cd.prototype._addDiagram=function(e){var t=this._bpmnjs.getDefinitions().diagrams;return e.businessObject||(e=this._createNewDiagram(e)),t.push(e.di.$parent),e},cd.prototype._createNewDiagram=function(e){var t=this._bpmnFactory,n=this._elementFactory,i=t.create("bpmndi:BPMNPlane",{bpmnElement:e}),r=t.create("bpmndi:BPMNDiagram",{plane:i});return i.$parent=r,n.createRoot({id:Zo(e),type:e.$type,di:i,businessObject:e,collapsed:!0})},cd.prototype._removeDiagram=function(e){var t=this._bpmnjs.getDefinitions().diagrams,n=g(t,(function(t){return t.plane.bpmnElement.id===e.id}));return t.splice(t.indexOf(n),1),n},cd.$inject=["canvas","eventBus","modeling","elementFactory","bpmnFactory","bpmnjs","elementRegistry"],n(ld,Vo),ld.$inject=["eventBus","modeling"];function pd(e,t,n,i){Vo.call(this,e),this.executed(["shape.toggleCollapse"],500,(function(e){var t,n=e.context.shape;mr(n,"bpmn:SubProcess")&&(n.collapsed?gr(n).isExpanded=!1:((t=n.children).length&&t.forEach((function(e){"label"!==e.type||e.businessObject.name||(e.hidden=!0)})),gr(n).isExpanded=!0))})),this.reverted(["shape.toggleCollapse"],500,(function(e){var t=e.context.shape;t.collapsed?gr(t).isExpanded=!1:gr(t).isExpanded=!0})),this.postExecuted(["shape.toggleCollapse"],500,(function(e){var i,r=e.context.shape,o=t.getDefaultSize(r);i=r.collapsed?function(e,t){return{x:e.x+(e.width-t.width)/2,y:e.y+(e.height-t.height)/2,width:t.width,height:t.height}}(r,o):function(e,t){var n,i,r=e.children,o=t;return(n=sp((i=r,i.filter((function(e){return!e.hidden}))).concat([e])))?(o.width=Math.max(n.width,o.width),o.height=Math.max(n.height,o.height),o.x=n.x+(n.width-o.width)/2,o.y=n.y+(n.height-o.height)/2):(o.x=e.x+(e.width-o.width)/2,o.y=e.y+(e.height-o.height)/2),o}(r,o),n.resizeShape(r,i,null,{autoResize:!r.collapsed&&"nwse"})}))}function ud(e,t,n,i){t.invoke(Vo,this),this.preExecute("shape.delete",(function(e){var t=e.context.shape,r=t.businessObject;ao(t)||(mr(t,"bpmn:Participant")&&Ar(t)&&n.ids.unclaim(r.processRef.id),i.unclaimId(r.id,r))})),this.preExecute("connection.delete",(function(e){var t=e.context.connection.businessObject;i.unclaimId(t.id,t)})),this.preExecute("canvas.updateRoot",(function(){var t=e.getRootElement(),i=t.businessObject;mr(t,"bpmn:Collaboration")&&n.ids.unclaim(i.id)}))}n(pd,Vo),pd.$inject=["eventBus","elementFactory","modeling"],n(ud,Vo),ud.$inject=["canvas","injector","moddle","modeling"];function hd(e,t,n){var i;function r(){if(!i)throw new Error(n("out of bounds release"));return i}Vo.call(this,e);var o=["spaceTool","lane.add","lane.resize","lane.split","elements.create","elements.delete","elements.move","shape.create","shape.delete","shape.move","shape.resize"];this.preExecute(o,5e3,(function(e){(i=i||new dd).enter()})),this.postExecuted(o,500,(function(e){!function(){if(!i)throw new Error(n("out of bounds release"));var e=i.leave();e&&(t.updateLaneRefs(i.flowNodes,i.lanes),i=null)}()})),this.preExecute(["shape.create","shape.move","shape.delete","shape.resize"],(function(e){var t=e.context.shape,n=r();t.labelTarget||(mr(t,"bpmn:Lane")&&n.addLane(t),mr(t,"bpmn:FlowNode")&&n.addFlowNode(t))}))}function dd(){this.flowNodes=[],this.lanes=[],this.counter=0,this.addLane=function(e){this.lanes.push(e)},this.addFlowNode=function(e){this.flowNodes.push(e)},this.enter=function(){this.counter++},this.leave=function(){return this.counter--,!this.counter}}function md(e,t){Vo.call(this,e),this.preExecute("connection.delete",(function(e){var n=e.context.connection,i=n.source;(function(e,t){if(!mr(e,"bpmn:SequenceFlow"))return!1;var n=vr(t),i=vr(e);return n.get("default")===i})(n,i)&&t.updateProperties(i,{default:null})}))}hd.$inject=["eventBus","modeling","translate"],n(hd,Vo),n(md,Vo),md.$inject=["eventBus","modeling"];var fd={__init__:["adaptiveLabelPositioningBehavior","appendBehavior","associationBehavior","attachEventBehavior","boundaryEventBehavior","rootElementReferenceBehavior","createBehavior","fixHoverBehavior","createDataObjectBehavior","createParticipantBehavior","dataStoreBehavior","dataInputAssociationBehavior","deleteLaneBehavior","detachEventBehavior","dropOnFlowBehavior","eventBasedGatewayBehavior","groupBehavior","importDockingFix","isHorizontalFix","labelBehavior","messageFlowBehavior","modelingFeedback","removeElementBehavior","removeParticipantBehavior","replaceConnectionBehavior","replaceElementBehaviour","resizeBehavior","resizeLaneBehavior","toggleCollapseConnectionBehaviour","toggleElementCollapseBehaviour","spaceToolBehavior","subProcessStartEventBehavior","subProcessPlaneBehavior","unclaimIdBehavior","unsetDefaultFlowBehavior","updateFlowNodeRefsBehavior"],adaptiveLabelPositioningBehavior:["type",wu],appendBehavior:["type",Su],associationBehavior:["type",Cu],attachEventBehavior:["type",Ru],boundaryEventBehavior:["type",Mu],rootElementReferenceBehavior:["type",Tu],createBehavior:["type",Au],fixHoverBehavior:["type",Ou],createDataObjectBehavior:["type",Du],createParticipantBehavior:["type",Lu],dataInputAssociationBehavior:["type",Iu],dataStoreBehavior:["type",Hu],deleteLaneBehavior:["type",Vu],detachEventBehavior:["type",Gu],dropOnFlowBehavior:["type",Uu],eventBasedGatewayBehavior:["type",Yu],groupBehavior:["type",Zu],importDockingFix:["type",Ju],isHorizontalFix:["type",th],labelBehavior:["type",Ch],messageFlowBehavior:["type",Nh],modelingFeedback:["type",Bh],replaceConnectionBehavior:["type",Lh],removeParticipantBehavior:["type",jh],replaceElementBehaviour:["type",Ih],resizeBehavior:["type",Wh],resizeLaneBehavior:["type",Qh],removeElementBehavior:["type",Jh],toggleCollapseConnectionBehaviour:["type",ld],toggleElementCollapseBehaviour:["type",pd],spaceToolBehavior:["type",nd],subProcessStartEventBehavior:["type",od],subProcessPlaneBehavior:["type",cd],unclaimIdBehavior:["type",ud],updateFlowNodeRefsBehavior:["type",hd],unsetDefaultFlowBehavior:["type",md]};function vd(e,t){var n=ln(e,t,-15);return"intersect"!==n?n:null}function gd(e){gs.call(this,e)}function yd(e){return!e||ao(e)}function bd(e){do{if(mr(e,"bpmn:Process"))return vr(e);if(mr(e,"bpmn:Participant"))return vr(e).processRef||vr(e)}while(e=e.parent)}function _d(e){return mr(e,"bpmn:TextAnnotation")}function xd(e){return mr(e,"bpmn:Group")&&!e.labelTarget}function wd(e){return mr(e,"bpmn:BoundaryEvent")&&Cd(e,"bpmn:CompensateEventDefinition")}function Ed(e){return vr(e).isForCompensation}function Sd(e){for(var t=e;t=t.parent;){if(mr(t,"bpmn:FlowElementsContainer"))return vr(t);if(mr(t,"bpmn:Participant"))return vr(t).processRef}return null}function Cd(e,t){return!!g(vr(e).eventDefinitions||[],(function(e){return mr(e,t)}))}function Rd(e,t){return(vr(e).eventDefinitions||[]).every((function(e){return mr(e,t)}))}function Pd(e){return mr(e,"bpmn:ReceiveTask")||mr(e,"bpmn:IntermediateCatchEvent")&&(Cd(e,"bpmn:MessageEventDefinition")||Cd(e,"bpmn:TimerEventDefinition")||Cd(e,"bpmn:ConditionalEventDefinition")||Cd(e,"bpmn:SignalEventDefinition"))}function Md(e){return e.waypoints}function Td(e,t){return-1!==function(e){for(var t=[];e;)(e=e.parent)&&t.push(e);return t}(t).indexOf(e)}function Ad(e,t,n){if(yd(e)||yd(t))return null;if(!mr(n,"bpmn:DataAssociation")){if(Vd(e,t))return{type:"bpmn:MessageFlow"};if(Gd(e,t))return{type:"bpmn:SequenceFlow"}}var i=Wd(e,t);return i||(wd(e)&&Ed(t)?{type:"bpmn:Association",associationDirection:"One"}:!!Hd(e,t)&&{type:"bpmn:Association"})}function kd(e,t,n){return!(!ao(e)&&!xd(e))||!(mr(t,"bpmn:Participant")&&!Ar(t))&&(mr(e,"bpmn:Participant")?mr(t,"bpmn:Process")||mr(t,"bpmn:Collaboration"):fr(e,["bpmn:DataInput","bpmn:DataOutput"])&&e.parent?t===e.parent:mr(e,"bpmn:Lane")?mr(t,"bpmn:Participant")||mr(t,"bpmn:Lane"):!(mr(e,"bpmn:BoundaryEvent")&&(i=e,!vr(i).cancelActivity||!zd(i)&&!Nd(i)))&&(mr(e,"bpmn:FlowElement")&&!mr(e,"bpmn:DataStoreReference")?mr(t,"bpmn:FlowElementsContainer")?Ar(t):fr(t,["bpmn:Participant","bpmn:Lane"]):mr(e,"bpmn:DataStoreReference")&&mr(t,"bpmn:Collaboration")?E(vr(t).get("participants"),(function(e){return!!e.get("processRef")})):fr(e,["bpmn:Artifact","bpmn:DataAssociation","bpmn:DataStoreReference"])?fr(t,["bpmn:Collaboration","bpmn:Lane","bpmn:Participant","bpmn:Process","bpmn:SubProcess"]):!!mr(e,"bpmn:MessageFlow")&&(mr(t,"bpmn:Collaboration")||e.source.parent==t||e.target.parent==t)));var i}function Od(e){return mr(e,"bpmn:Lane")}function Dd(e){return!!function(e){return!ao(e)&&mr(e,"bpmn:BoundaryEvent")}(e)||(!(!mr(e,"bpmn:IntermediateThrowEvent")||!zd(e))||mr(e,"bpmn:IntermediateCatchEvent")&&Nd(e))}function zd(e){var t=vr(e);return t&&!(t.eventDefinitions&&t.eventDefinitions.length)}function Nd(e){return Bd(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])}function Bd(e,t){return t.some((function(t){return Cd(e,t)}))}function Ld(e,t,n,i){if(Array.isArray(e)||(e=[e]),1!==e.length)return!1;var r=e[0];return!ao(r)&&(!!Dd(r)&&(!Or(t)&&(!(!mr(t,"bpmn:Activity")||Ed(t))&&(!(i&&!vd(i,t))&&(!function(e){return mr(e,"bpmn:ReceiveTask")&&g(e.incoming,(function(e){return mr(e.source,"bpmn:EventBasedGateway")}))}(t)&&"attach")))))}function jd(e,t,n){if(!t)return!1;var i={replacements:[]};return b(e,(function(e){Or(t)||mr(e,"bpmn:StartEvent")&&"label"!==e.type&&kd(e,t)&&(kr(e)||i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),(function(e){return Dr(e,"bpmn:ErrorEventDefinition")}(e)||function(e){return Dr(e,"bpmn:EscalationEventDefinition")}(e)||function(e){return Dr(e,"bpmn:CompensateEventDefinition")}(e))&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),Bd(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])&&mr(t,"bpmn:SubProcess")&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"})),mr(t,"bpmn:Transaction")||Cd(e,"bpmn:CancelEventDefinition")&&"label"!==e.type&&(mr(e,"bpmn:EndEvent")&&kd(e,t)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:EndEvent"}),mr(e,"bpmn:BoundaryEvent")&&Ld(e,t,0,n)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:BoundaryEvent"}))})),!!i.replacements.length&&i}function Id(e,t){return!E(e,Od)&&(!t||e.every((function(e){return kd(e,t)})))}function $d(e,t,n,i){return!!t&&(!(!ao(e)&&!xd(e))||!function(e,t){return e===t}(n,t)&&((!n||!Td(n,t))&&(kd(e,t)||Ud(e,t))))}function Fd(e,t){return mr(e,"bpmn:SubProcess")?Ar(e)&&(!t||t.width>=100&&t.height>=80):mr(e,"bpmn:Lane")?!t||t.width>=130&&t.height>=60:mr(e,"bpmn:Participant")?!t||t.width>=250&&t.height>=50:!!_d(e)||!!xd(e)}function Hd(e,t){return!Md(e)&&!Md(t)&&(!(!wd(e)||!Ed(t))||!Td(t,e)&&!Td(e,t)&&(!!function(e,t){var n=_d(e),i=_d(t);return(n||i)&&n!==i}(e,t)||!!Wd(e,t)))}function Vd(e,t){return!(Yd(e)&&!Yd(t))&&(mr(n=e,"bpmn:InteractionNode")&&!mr(n,"bpmn:BoundaryEvent")&&(!mr(n,"bpmn:Event")||mr(n,"bpmn:ThrowEvent")&&Rd(n,"bpmn:MessageEventDefinition"))&&function(e){return mr(e,"bpmn:InteractionNode")&&!Ed(e)&&(!mr(e,"bpmn:Event")||mr(e,"bpmn:CatchEvent")&&Rd(e,"bpmn:MessageEventDefinition"))&&!(mr(e,"bpmn:BoundaryEvent")&&!Cd(e,"bpmn:MessageEventDefinition"))}(t)&&!function(e,t){return bd(e)===bd(t)}(e,t));var n}function Gd(e,t){return!(Pd(t)&&t.incoming.length>0&&(n=t.incoming,(n=n||[]).some(Xd))&&!mr(e,"bpmn:EventBasedGateway"))&&(mr(i=e,"bpmn:FlowNode")&&!mr(i,"bpmn:EndEvent")&&!Or(i)&&!(mr(i,"bpmn:IntermediateThrowEvent")&&Cd(i,"bpmn:LinkEventDefinition"))&&!wd(i)&&!Ed(i)&&function(e){return mr(e,"bpmn:FlowNode")&&!mr(e,"bpmn:StartEvent")&&!mr(e,"bpmn:BoundaryEvent")&&!Or(e)&&!(mr(e,"bpmn:IntermediateCatchEvent")&&Cd(e,"bpmn:LinkEventDefinition"))&&!Ed(e)}(t)&&function(e,t){return Sd(e)===Sd(t)}(e,t)&&!(mr(e,"bpmn:EventBasedGateway")&&!Pd(t)));var n,i}function Wd(e,t){return fr(e,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&fr(t,["bpmn:Activity","bpmn:ThrowEvent"])?{type:"bpmn:DataInputAssociation"}:!(!fr(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])||!fr(e,["bpmn:Activity","bpmn:CatchEvent"]))&&{type:"bpmn:DataOutputAssociation"}}function Ud(e,t,n){if(!t)return!1;if(Array.isArray(e)){if(1!==e.length)return!1;e=e[0]}return t.source!==e&&t.target!==e&&(fr(t,["bpmn:SequenceFlow","bpmn:MessageFlow"])&&!ao(t)&&mr(e,"bpmn:FlowNode")&&!mr(e,"bpmn:BoundaryEvent")&&kd(e,t.parent))}function qd(e,t){return!!ao(t)||!(mr(t,"bpmn:Lane")&&!function(e,t){return e&&t&&-1!==e.indexOf(t)}(e,t.parent))}function Xd(e){if(e&&e.source)return mr(e.source,"bpmn:EventBasedGateway")}function Yd(e){return ps(e,"bpmn:Process")||ps(e,"bpmn:Collaboration")}n(gd,gs),gd.$inject=["eventBus"],gd.prototype.init=function(){this.addRule("connection.start",(function(e){return function(e){if(yd(e))return null;return fr(e,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference","bpmn:Group","bpmn:TextAnnotation"])}(e.source)})),this.addRule("connection.create",(function(e){var t=e.source,n=e.target,i=e.hints||{},r=i.targetParent;if(i.targetAttach)return!1;r&&(n.parent=r);try{return Ad(t,n)}finally{r&&(n.parent=null)}})),this.addRule("connection.reconnect",(function(e){var t=e.connection;return Ad(e.source,e.target,t)})),this.addRule("connection.updateWaypoints",(function(e){return{type:e.connection.type}})),this.addRule("shape.resize",(function(e){return Fd(e.shape,e.newBounds)})),this.addRule("elements.create",(function(e){var t=e.elements,n=e.position,i=e.target;return!(Md(i)&&!Ud(t,i))&&w(t,(function(e){return Md(e)?Ad(e.source,e.target,e):e.host?Ld(e,e.host,null,n):$d(e,i,null)}))})),this.addRule("elements.move",(function(e){var t=e.target,n=e.shapes,i=e.position;return Ld(n,t,null,i)||jd(n,t,i)||Id(n,t)||Ud(n,t)})),this.addRule("shape.create",(function(e){return $d(e.shape,e.target,e.source,e.position)})),this.addRule("shape.attach",(function(e){return Ld(e.shape,e.target,null,e.position)})),this.addRule("element.copy",(function(e){var t=e.element;return qd(e.elements,t)}))},gd.prototype.canConnectMessageFlow=Vd,gd.prototype.canConnectSequenceFlow=Gd,gd.prototype.canConnectDataAssociation=Wd,gd.prototype.canConnectAssociation=Hd,gd.prototype.canMove=Id,gd.prototype.canAttach=Ld,gd.prototype.canReplace=jd,gd.prototype.canDrop=kd,gd.prototype.canInsert=Ud,gd.prototype.canCreate=$d,gd.prototype.canConnect=Ad,gd.prototype.canResize=Fd,gd.prototype.canCopy=qd;var Kd={__depends__:[Os],__init__:["bpmnRules"],bpmnRules:["type",gd]};function Zd(e,t){e.on("saveXML.start",2e3,(function(){b(t.getRootElements(),(function(e){var t,n=gr(e);t=S(y(ct([e],!1),(function(t){return t!==e&&!t.labelTarget})),gr),n.set("planeElement",t)}))}))}Zd.$inject=["eventBus","canvas"];var Qd={__init__:["bpmnDiOrdering"],bpmnDiOrdering:["type",Zd]};function Jd(e){Vo.call(this,e);var t=this;this.preExecute(["shape.create","connection.create"],(function(e){var n=e.context,i=n.shape||n.connection,r=n.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.parent=o.parent),n.parentIndex=o.index)})),this.preExecute(["shape.move","connection.move"],(function(e){var n=e.context,i=n.shape||n.connection,r=n.newParent||i.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.newParent=o.parent),n.newParentIndex=o.index)}))}function em(e,t,n){Jd.call(this,e);var i=[{type:"bpmn:SubProcess",order:{level:6}},{type:"bpmn:SequenceFlow",order:{level:3,containers:["bpmn:Participant","bpmn:FlowElementsContainer"]}},{type:"bpmn:DataAssociation",order:{level:9,containers:["bpmn:Collaboration","bpmn:Process"]}},{type:"bpmn:MessageFlow",order:{level:9,containers:["bpmn:Collaboration"]}},{type:"bpmn:Association",order:{level:6,containers:["bpmn:Participant","bpmn:FlowElementsContainer","bpmn:Collaboration"]}},{type:"bpmn:BoundaryEvent",order:{level:8}},{type:"bpmn:Group",order:{level:10,containers:["bpmn:Collaboration","bpmn:Process"]}},{type:"bpmn:FlowElement",order:{level:5}},{type:"bpmn:Participant",order:{level:-2}},{type:"bpmn:Lane",order:{level:-1}}];function r(e){var t=e.order;if(t||(e.order=t=function(e){if(e.labelTarget)return{level:10};var t=g(i,(function(t){return fr(e,[t.type])}));return t&&t.order||{level:1}}(e)),!t)throw new Error("no order for <"+e.id+">");return t}this.getOrdering=function(e,n){if(e.labelTarget)return{parent:t.findRoot(e.labelTarget)||t.getRootElement(),index:-1};var i=r(e);i.containers&&(n=function(e,t,n){for(var i=t;i&&!fr(i,n);)i=i.parent;if(!i)throw new Error("no parent for <"+e.id+"> in <"+(t&&t.id)+">");return i}(e,n,i.containers));var o=n.children.indexOf(e),a=function(e,t){t=z(t);var n=u(e)?-1:void 0;return b(e,(function(e,i){if(t(e,i))return n=i,!1})),n}(n.children,(function(t){return!(!e.labelTarget&&t.labelTarget)&&i.level<r(t).level}));return-1!==a&&-1!==o&&o<a&&(a-=1),{index:a,parent:n}}}Jd.prototype.getOrdering=function(e,t){return null},n(Jd,Vo),em.$inject=["eventBus","canvas","translate"],n(em,Jd);var tm={__depends__:[eo],__init__:["bpmnOrderingProvider"],bpmnOrderingProvider:["type",em]};function nm(e,t){this._handlerMap={},this._stack=[],this._stackIdx=-1,this._currentExecution={actions:[],dirty:[],trigger:null},this._injector=t,this._eventBus=e,this._uid=1,e.on(["diagram.destroy","diagram.clear"],(function(){this.clear(!1)}),this)}nm.$inject=["eventBus","injector"],nm.prototype.execute=function(e,t){if(!e)throw new Error("command required");this._currentExecution.trigger="execute";var n={command:e,context:t};this._pushAction(n),this._internalExecute(n),this._popAction(n)},nm.prototype.canExecute=function(e,t){var n={command:e,context:t},i=this._getHandler(e),r=this._fire(e,"canExecute",n);if(void 0===r){if(!i)return!1;i.canExecute&&(r=i.canExecute(t))}return r},nm.prototype.clear=function(e){this._stack.length=0,this._stackIdx=-1,!1!==e&&this._fire("changed",{trigger:"clear"})},nm.prototype.undo=function(){var e,t=this._getUndoAction();if(t){for(this._currentExecution.trigger="undo",this._pushAction(t);t&&(this._internalUndo(t),(e=this._getUndoAction())&&e.id===t.id);)t=e;this._popAction()}},nm.prototype.redo=function(){var e,t=this._getRedoAction();if(t){for(this._currentExecution.trigger="redo",this._pushAction(t);t&&(this._internalExecute(t,!0),(e=this._getRedoAction())&&e.id===t.id);)t=e;this._popAction()}},nm.prototype.register=function(e,t){this._setHandler(e,t)},nm.prototype.registerHandler=function(e,t){if(!e||!t)throw new Error("command and handlerCls must be defined");var n=this._injector.instantiate(t);this.register(e,n)},nm.prototype.canUndo=function(){return!!this._getUndoAction()},nm.prototype.canRedo=function(){return!!this._getRedoAction()},nm.prototype._getRedoAction=function(){return this._stack[this._stackIdx+1]},nm.prototype._getUndoAction=function(){return this._stack[this._stackIdx]},nm.prototype._internalUndo=function(e){var t=this,n=e.command,i=e.context,r=this._getHandler(n);this._atomicDo((function(){t._fire(n,"revert",e),r.revert&&t._markDirty(r.revert(i)),t._revertedAction(e),t._fire(n,"reverted",e)}))},nm.prototype._fire=function(e,t,n){arguments.length<3&&(n=t,t=null);var i,r,o,a=t?[e+"."+t,t]:[e];for(n=this._eventBus.createEvent(n),i=0;(r=a[i])&&(o=this._eventBus.fire("commandStack."+r,n),!n.cancelBubble);i++);return o},nm.prototype._createId=function(){return this._uid++},nm.prototype._atomicDo=function(e){var t=this._currentExecution;t.atomic=!0;try{e()}finally{t.atomic=!1}},nm.prototype._internalExecute=function(e,t){var n=this,i=e.command,r=e.context,o=this._getHandler(i);if(!o)throw new Error("no command handler registered for <"+i+">");this._pushAction(e),t||(this._fire(i,"preExecute",e),o.preExecute&&o.preExecute(r),this._fire(i,"preExecuted",e)),this._atomicDo((function(){n._fire(i,"execute",e),o.execute&&n._markDirty(o.execute(r)),n._executedAction(e,t),n._fire(i,"executed",e)})),t||(this._fire(i,"postExecute",e),o.postExecute&&o.postExecute(r),this._fire(i,"postExecuted",e)),this._popAction(e)},nm.prototype._pushAction=function(e){var t=this._currentExecution,n=t.actions,i=n[0];if(t.atomic)throw new Error("illegal invocation in <execute> or <revert> phase (action: "+e.command+")");e.id||(e.id=i&&i.id||this._createId()),n.push(e)},nm.prototype._popAction=function(){var e=this._currentExecution,t=e.trigger,n=e.actions,i=e.dirty;n.pop(),n.length||(this._eventBus.fire("elements.changed",{elements:T("id",i.reverse())}),i.length=0,this._fire("changed",{trigger:t}),e.trigger=null)},nm.prototype._markDirty=function(e){var t=this._currentExecution;e&&(e=u(e)?e:[e],t.dirty=t.dirty.concat(e))},nm.prototype._executedAction=function(e,t){var n=++this._stackIdx;t||this._stack.splice(n,this._stack.length,e)},nm.prototype._revertedAction=function(e){this._stackIdx--},nm.prototype._getHandler=function(e){return this._handlerMap[e]},nm.prototype._setHandler=function(e,t){if(!e||!t)throw new Error("command and handler required");if(this._handlerMap[e])throw new Error("overriding handler for command <"+e+">");this._handlerMap[e]=t};var im={commandStack:["type",nm]},rm=new zo("tt");function om(e,t){e.style.display=!1===t?"none":""}var am=".djs-tooltip";function sm(e,t){var n,i;this._eventBus=e,this._canvas=t,this._ids=rm,this._tooltipDefaults={show:{minZoom:.7,maxZoom:5}},this._tooltips={},this._tooltipRoot=(n=t.getContainer(),i=ce('<div class="djs-tooltip-container" style="position: absolute; width: 0; height: 0;" />'),n.insertBefore(i,n.firstChild),i);var r=this;se.bind(this._tooltipRoot,am,"mousedown",(function(e){e.stopPropagation()})),se.bind(this._tooltipRoot,am,"mouseover",(function(e){r.trigger("mouseover",e)})),se.bind(this._tooltipRoot,am,"mouseout",(function(e){r.trigger("mouseout",e)})),this._init()}sm.$inject=["eventBus","canvas"],sm.prototype.add=function(e){if(!e.position)throw new Error("must specifiy tooltip position");if(!e.html)throw new Error("must specifiy tooltip html");var t=this._ids.next();return e=$({},this._tooltipDefaults,e,{id:t}),this._addTooltip(e),e.timeout&&this.setTimeout(e),t},sm.prototype.trigger=function(e,t){var n=t.delegateTarget||t.target,i=this.get(V(n,"data-tooltip-id"));i&&("mouseover"===e&&i.timeout&&this.clearTimeout(i),"mouseout"===e&&i.timeout&&(i.timeout=1e3,this.setTimeout(i)))},sm.prototype.get=function(e){return"string"!=typeof e&&(e=e.id),this._tooltips[e]},sm.prototype.clearTimeout=function(e){if(e=this.get(e)){var t=e.removeTimer;t&&(clearTimeout(t),e.removeTimer=null)}},sm.prototype.setTimeout=function(e){if(e=this.get(e)){this.clearTimeout(e);var t=this;e.removeTimer=setTimeout((function(){t.remove(e)}),e.timeout)}},sm.prototype.remove=function(e){var t=this.get(e);t&&(de(t.html),de(t.htmlContainer),delete t.htmlContainer,delete this._tooltips[t.id])},sm.prototype.show=function(){om(this._tooltipRoot)},sm.prototype.hide=function(){om(this._tooltipRoot,!1)},sm.prototype._updateRoot=function(e){var t=e.scale||1,n=e.scale||1,i="matrix("+t+",0,0,"+n+","+-1*e.x*t+","+-1*e.y*n+")";this._tooltipRoot.style.transform=i,this._tooltipRoot.style["-ms-transform"]=i},sm.prototype._addTooltip=function(e){var t,n=e.id,i=e.html,r=this._tooltipRoot;i.get&&i.constructor.prototype.jquery&&(i=i.get(0)),f(i)&&(i=ce(i)),(t=ce('<div data-tooltip-id="'+n+'" class="'+'djs-tooltip" style="position: absolute">')).appendChild(i),e.type&&X(t).add("djs-tooltip-"+e.type),e.className&&X(t).add(e.className),e.htmlContainer=t,r.appendChild(t),this._tooltips[n]=e,this._updateTooltip(e)},sm.prototype._updateTooltip=function(e){var t=e.position;!function(e,t,n){$(e.style,{left:t+"px",top:n+"px"})}(e.htmlContainer,t.x,t.y)},sm.prototype._updateTooltipVisibilty=function(e){b(this._tooltips,(function(t){var n=t.show,i=t.htmlContainer,r=!0;n&&((n.minZoom>e.scale||n.maxZoom<e.scale)&&(r=!1),om(i,r))}))},sm.prototype._init=function(){var e=this;this._eventBus.on("canvas.viewbox.changing",(function(t){e.hide()})),this._eventBus.on("canvas.viewbox.changed",(function(t){var n;n=t.viewbox,e._updateRoot(n),e._updateTooltipVisibilty(n),e.show()}))};var cm={__init__:["tooltips"],tooltips:["type",sm]};function lm(e,t){if("function"!=typeof t)throw new Error("removeFn iterator must be a function");if(e){for(var n;n=e[0];)t(n);return e}}function pm(e,t,n){Vo.call(this,t);var i=e.get("movePreview",!1);t.on("shape.move.start",1400,(function(e){var t=e.context,n=t.shapes,i=t.validatedShapes;t.shapes=um(n),t.validatedShapes=um(i)})),i&&t.on("shape.move.start",250,(function(e){var t=e.context,n=t.shapes,r=[];b(n,(function(e){b(e.labels,(function(n){n.hidden||-1!==t.shapes.indexOf(n)||r.push(n),e.labelTarget&&r.push(e)}))})),b(r,(function(e){i.makeDraggable(t,e,!0)}))})),this.preExecuted("elements.move",1400,(function(e){var t=e.context.closure,n=t.enclosedElements,i=[];b(n,(function(e){b(e.labels,(function(e){n[e.id]||i.push(e)}))})),t.addAll(i)})),this.preExecute(["connection.delete","shape.delete"],(function(e){var t=e.context;lm((t.connection||t.shape).labels,(function(e){n.removeShape(e,{nested:!0})}))})),this.execute("shape.delete",(function(e){var t=e.context,n=t.shape,i=n.labelTarget;i&&(t.labelTargetIndex=gt(i.labels,n),t.labelTarget=i,n.labelTarget=null)})),this.revert("shape.delete",(function(e){var t=e.context,n=t.shape,i=t.labelTarget,r=t.labelTargetIndex;i&&(vt(i.labels,n,r),n.labelTarget=i)}))}function um(e){return y(e,(function(t){return-1===e.indexOf(t.labelTarget)}))}n(pm,Vo),pm.$inject=["injector","eventBus","modeling"];var hm={__init__:["labelSupport"],labelSupport:["type",pm]},dm="attach-ok";function mm(e,t,n,i,r){Vo.call(this,t);var o=e.get("movePreview",!1);t.on("shape.move.start",1401,(function(e){var t,n,i=e.context,r=i.shapes,o=i.validatedShapes;i.shapes=(n=fm(t=r),A("id",t,n)),i.validatedShapes=function(e){var t=M(e,"id");return y(e,(function(e){for(;e;){if(e.host&&t[e.host.id])return!1;e=e.parent}return!0}))}(o)})),o&&t.on("shape.move.start",251,(function(e){var t=e.context;b(fm(t.shapes),(function(e){o.makeDraggable(t,e,!0),b(e.labels,(function(e){o.makeDraggable(t,e,!0)}))}))})),o&&t.on("shape.move.start",(function(e){var i=e.context.shapes;if(1===i.length){var r=i[0].host;r&&(n.addMarker(r,dm),t.once(["shape.move.out","shape.move.cleanup"],(function(){n.removeMarker(r,dm)})))}})),this.preExecuted("elements.move",1401,(function(e){var t=e.context,n=t.closure;b(fm(t.shapes),(function(e){n.add(e,n.topLevel[e.host.id])}))})),this.postExecuted("elements.move",(function(e){var t=e.context,n=t.shapes,i=t.newHost;i&&1!==n.length||b(i?n:y(n,(function(e){var t,i=e.host;return function(e){return!!e.host}(e)&&(t=i,!(-1!==n.indexOf(t)))})),(function(e){r.updateAttachment(e,i)}))})),this.postExecuted("elements.move",(function(e){b(e.context.shapes,(function(e){b(e.attachers,(function(e){b(e.outgoing.slice(),(function(e){i.allowed("connection.reconnect",{connection:e,source:e.source,target:e.target})||r.removeConnection(e)})),b(e.incoming.slice(),(function(e){i.allowed("connection.reconnect",{connection:e,source:e.source,target:e.target})||r.removeConnection(e)}))}))}))})),this.postExecute("shape.create",(function(e){var t=e.context,n=t.shape,i=t.host;i&&r.updateAttachment(n,i)})),this.postExecute("shape.replace",(function(e){var t=e.context,n=t.oldShape,o=t.newShape;lm(n.attachers,(function(e){"attach"===i.allowed("elements.move",{target:o,shapes:[e]})?r.updateAttachment(e,o):r.removeShape(e)})),o.attachers.length&&b(o.attachers,(function(e){var t=xh(e,n,o);r.moveShape(e,t,e.parent)}))})),this.postExecute("shape.resize",(function(e){var t=e.context,n=t.shape,i=t.oldBounds,o=t.newBounds,a=n.attachers;!1!==(t.hints||{}).attachSupport&&b(a,(function(e){var t=xh(e,i,o);r.moveShape(e,t,e.parent),b(e.labels,(function(e){r.moveShape(e,t,e.parent)}))}))})),this.preExecute("shape.delete",(function(e){var t=e.context.shape;lm(t.attachers,(function(e){r.removeShape(e)})),t.host&&r.updateAttachment(t,null)}))}function fm(e){return o(S(e,(function(e){return e.attachers||[]})))}n(mm,Vo),mm.$inject=["injector","eventBus","canvas","rules","modeling"];var vm={__depends__:[Os],__init__:["attachSupport"],attachSupport:["type",mm]};function gm(e,t){this._eventBus=e,this._dragging=t,this._tools=[],this._active=null}gm.$inject=["eventBus","dragging"],gm.prototype.registerTool=function(e,t){var n=this._tools;if(!t)throw new Error('A tool has to be registered with it\'s "events"');n.push(e),this.bindEvents(e,t)},gm.prototype.isActive=function(e){return e&&this._active===e},gm.prototype.length=function(e){return this._tools.length},gm.prototype.setActive=function(e){var t=this._eventBus;this._active!==e&&(this._active=e,t.fire("tool-manager.update",{tool:e}))},gm.prototype.bindEvents=function(e,t){var n=this._eventBus,i=this._dragging,r=[];n.on(t.tool+".init",(function(t){if(!t.context.reactivate&&this.isActive(e))return this.setActive(null),void i.cancel();this.setActive(e)}),this),b(t,(function(e){r.push(e+".ended"),r.push(e+".canceled")})),n.on(r,250,(function(e){this._active&&(function(e){var t=e.originalEvent&&e.originalEvent.target;return t&&ee(t,'.group[data-group="tools"]')}(e)||this.setActive(null))}),this)};var ym={__depends__:[Ps],__init__:["toolManager"],toolManager:["type",gm]};function bm(e,t){return-1!==e.indexOf(t)}var _m=Math.abs,xm=Math.round,wm={x:"width",y:"height"},Em="crosshair",Sm={n:"top",w:"left",s:"bottom",e:"right"},Cm={n:"s",w:"e",s:"n",e:"w"};function Rm(e,t,n,i,r,o,a){this._canvas=e,this._dragging=t,this._eventBus=n,this._modeling=i,this._rules=r,this._toolManager=o,this._mouse=a;var s=this;o.registerTool("space",{tool:"spaceTool.selection",dragging:"spaceTool"}),n.on("spaceTool.selection.end",(function(e){n.once("spaceTool.selection.ended",(function(){s.activateMakeSpace(e.originalEvent)}))})),n.on("spaceTool.move",1500,(function(e){var t=e.context,n=t.initialized;n||(n=t.initialized=s.init(e,t)),n&&Mm(e)})),n.on("spaceTool.end",(function(e){var t=e.context,i=t.axis,r=t.direction,o=t.movingShapes,a=t.resizingShapes,c=t.start;if(t.initialized){Mm(e);var l={x:0,y:0};l[i]=xm(e["d"+i]),s.makeSpace(o,a,l,r,c),n.once("spaceTool.ended",(function(e){s.activateSelection(e.originalEvent,!0,!0)}))}}))}function Pm(e){return{top:e.top-20,right:e.right+20,bottom:e.bottom+20,left:e.left-20}}function Mm(e){var t,n,i=e.context.spaceToolConstraints;i&&(d(i.left)&&(t=Math.max(e.x,i.left),e.dx=e.dx+t-e.x,e.x=t),d(i.right)&&(t=Math.min(e.x,i.right),e.dx=e.dx+t-e.x,e.x=t),d(i.top)&&(n=Math.max(e.y,i.top),e.dy=e.dy+n-e.y,e.y=n),d(i.bottom)&&(n=Math.min(e.y,i.bottom),e.dy=e.dy+n-e.y,e.y=n))}function Tm(e,t){return-1!==e.indexOf(t)}function Am(e){return!!e.waypoints}function km(e){return!!e.labelTarget}Rm.$inject=["canvas","dragging","eventBus","modeling","rules","toolManager","mouse"],Rm.prototype.activateSelection=function(e,t,n){this._dragging.init(e,"spaceTool.selection",{autoActivate:t,cursor:Em,data:{context:{reactivate:n}},trapClick:!1})},Rm.prototype.activateMakeSpace=function(e){this._dragging.init(e,"spaceTool",{autoActivate:!0,cursor:Em,data:{context:{}}})},Rm.prototype.makeSpace=function(e,t,n,i,r){return this._modeling.createSpace(e,t,n,i,r)},Rm.prototype.init=function(e,t){var n=_m(e.dx)>_m(e.dy)?"x":"y",i=e["d"+n],r=e[n]-i;if(_m(i)<5)return!1;i<0&&(i*=-1),bo(e)&&(i*=-1);var o=function(e,t){if("x"===e){if(t>0)return"e";if(t<0)return"w"}if("y"===e){if(t>0)return"s";if(t<0)return"n"}return null}(n,i),a=ct(this._canvas.getRootElement(),!0),s=this.calculateAdjustments(a,n,i,r);return $(t,s,{axis:n,direction:o,spaceToolConstraints:function(e,t,n,i,r){var o=e.movingShapes,a=e.resizingShapes;if(!a.length)return;var s,c,l={};return b(a,(function(e){var p,u,h,m=an(e),f=y(e.children,(function(e){return!(Am(e)||km(e)||Tm(o,e)||Tm(a,e))})),v=y(e.children,(function(e){return!Am(e)&&!km(e)&&Tm(o,e)}));f.length&&(u=Pm(an(lt(f))),p=i-m[Sm[n]]+u[Sm[n]],"n"===n?l.bottom=c=d(c)?Math.min(c,p):p:"w"===n?l.right=c=d(c)?Math.min(c,p):p:"s"===n?l.top=s=d(s)?Math.max(s,p):p:"e"===n&&(l.left=s=d(s)?Math.max(s,p):p)),v.length&&(h=Pm(an(lt(v))),p=i-h[Sm[Cm[n]]]+m[Sm[Cm[n]]],"n"===n?l.bottom=c=d(c)?Math.min(c,p):p:"w"===n?l.right=c=d(c)?Math.min(c,p):p:"s"===n?l.top=s=d(s)?Math.max(s,p):p:"e"===n&&(l.left=s=d(s)?Math.max(s,p):p));var g=r&&r[e.id];g&&("n"===n?(p=i+e[wm[t]]-g[wm[t]],l.bottom=c=d(c)?Math.min(c,p):p):"w"===n?(p=i+e[wm[t]]-g[wm[t]],l.right=c=d(c)?Math.min(c,p):p):"s"===n?(p=i-e[wm[t]]+g[wm[t]],l.top=s=d(s)?Math.max(s,p):p):"e"===n&&(p=i-e[wm[t]]+g[wm[t]],l.left=s=d(s)?Math.max(s,p):p))})),l}(s,n,o,r,this._eventBus.fire("spaceTool.getMinDimensions",{axis:n,direction:o,shapes:s.resizingShapes,start:r})),start:r}),Ma("resize-"+("x"===n?"ew":"ns")),!0},Rm.prototype.calculateAdjustments=function(e,t,n,i){var r=this._rules,o=[],a=[];return b(e,(function(e){if(e.parent&&!Am(e)){var s=e[t],c=s+e[wm[t]];return n>0&&s>i||n<0&&c<i?o.push(e):s<i&&c>i&&r.allowed("shape.resize",{shape:e})?a.push(e):void 0}})),{movingShapes:o,resizingShapes:a}},Rm.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateSelection(e,!!e)},Rm.prototype.isActive=function(){var e=this._dragging.context();return e&&/^spaceTool/.test(e.prefix)};var Om="djs-dragging",Dm="djs-resizing",zm=Math.max;function Nm(e,t,n,i,r){function o(e,t){b(e,(function(e){r.addDragger(e,t),n.addMarker(e,Om)}))}e.on("spaceTool.selection.start",(function(e){var t=n.getLayer("space"),r=e.context,o="M 0,-10000 L 0,10000",a="M -10000,0 L 10000,0",s=ke("g");ye(s,i.cls("djs-crosshair-group",["no-events"])),fe(t,s);var c=ke("path");ye(c,"d",o),Ee(c).add("djs-crosshair"),fe(s,c);var l=ke("path");ye(l,"d",a),Ee(l).add("djs-crosshair"),fe(s,l),r.crosshairGroup=s})),e.on("spaceTool.selection.move",(function(e){Fn(e.context.crosshairGroup,e.x,e.y)})),e.on("spaceTool.selection.cleanup",(function(e){var t=e.context.crosshairGroup;t&&Ce(t)})),e.on("spaceTool.move",250,(function(e){var a=e.context,s=a.line,c=a.axis,l=a.movingShapes,p=a.resizingShapes;if(a.initialized){if(!a.dragGroup){var u=n.getLayer("space");ye(s=ke("path"),"d","M0,0 L0,0"),Ee(s).add("djs-crosshair"),fe(u,s),a.line=s;var h=ke("g");ye(h,i.cls("djs-drag-group",["no-events"])),fe(n.getActiveLayer(),h),o(l,h),o(a.movingConnections=t.filter((function(e){var t=!1;b(l,(function(n){b(n.outgoing,(function(n){e===n&&(t=!0)}))}));var n=!1;b(l,(function(t){b(t.incoming,(function(t){e===t&&(n=!0)}))}));var i=!1;b(p,(function(t){b(t.outgoing,(function(t){e===t&&(i=!0)}))}));var r=!1;return b(p,(function(t){b(t.incoming,(function(t){e===t&&(r=!0)}))})),function(e){return e.waypoints}(e)&&(t||i)&&(n||r)})),h),a.dragGroup=h}if(!a.frameGroup){var d=ke("g");ye(d,i.cls("djs-frame-group",["no-events"])),fe(n.getActiveLayer(),d);var m=[];b(p,(function(e){var t=r.addFrame(e,d),i=t.getBBox();m.push({element:t,initialBounds:i}),n.addMarker(e,Dm)})),a.frameGroup=d,a.frames=m}ye(s,{d:{x:"M"+e.x+", -10000 L"+e.x+", 10000",y:"M -10000, "+e.y+" L 10000, "+e.y}[c]});var f={x:e.dx,y:e.dy};f[{x:"y",y:"x"}[a.axis]]=0,Fn(a.dragGroup,f.x,f.y),b(a.frames,(function(e){var t,n,i=e.element,r=e.initialBounds;"e"===a.direction?ye(i,{width:zm(r.width+f.x,5)}):ye(i,{width:t=zm(r.width-f.x,5),x:r.x+r.width-t}),"s"===a.direction?ye(i,{height:zm(r.height+f.y,5)}):ye(i,{height:n=zm(r.height-f.y,5),y:r.y+r.height-n})}))}})),e.on("spaceTool.cleanup",(function(e){var t=e.context,i=t.movingShapes,r=t.movingConnections,o=t.resizingShapes,a=t.line,s=t.dragGroup,c=t.frameGroup;b(i,(function(e){n.removeMarker(e,Om)})),b(r,(function(e){n.removeMarker(e,Om)})),s&&(Ce(a),Ce(s)),b(o,(function(e){n.removeMarker(e,Dm)})),c&&Ce(c)}))}Nm.$inject=["eventBus","elementRegistry","canvas","styles","previewSupport"];var Bm={__init__:["spaceToolPreview"],__depends__:[Ps,Os,ym,Kc,fl],spaceTool:["type",Rm],spaceToolPreview:["type",Nm]};function Lm(e){this._model=e}function jm(e,t,n,i){Vo.call(this,e),this._bpmnFactory=t,this._translate=i;var r=this;function o(e){b(e.context.oldRoot.children,(function(e){mr(e,"bpmn:BaseElement")&&r.updateParent(e)}))}function a(e){var t=e.context.shape;mr(t,"bpmn:BaseElement")&&r.updateBounds(t)}function s(e){r.updateConnection(e.context)}function c(e){r.updateConnectionWaypoints(e.context.connection)}function l(e){r.updateAttachment(e.context)}this.executed(["connection.layout","connection.create"],(function(e){var t,i=e.context,r=i.hints||{};i.cropped||!1===r.createElementsBehavior||((t=i.connection).waypoints=n.getCroppedWaypoints(t),i.cropped=!0)})),this.reverted(["connection.layout"],(function(e){delete e.context.cropped})),this.executed(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Im((function(e){var t=e.context;r.updateParent(t.shape||t.connection,t.oldParent)}))),this.reverted(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Im((function(e){var t=e.context,n=t.shape||t.connection,i=t.parent||t.newParent;r.updateParent(n,i)}))),this.executed(["canvas.updateRoot"],o),this.reverted(["canvas.updateRoot"],o),this.executed(["shape.move","shape.create","shape.resize"],Im((function(e){"label"!==e.context.shape.type&&a(e)}))),this.reverted(["shape.move","shape.create","shape.resize"],Im((function(e){"label"!==e.context.shape.type&&a(e)}))),e.on("shape.changed",(function(e){"label"===e.element.type&&a({context:{shape:e.element}})})),this.executed(["connection.create","connection.move","connection.delete","connection.reconnect"],Im(s)),this.reverted(["connection.create","connection.move","connection.delete","connection.reconnect"],Im(s)),this.executed(["connection.layout","connection.move","connection.updateWaypoints"],Im(c)),this.reverted(["connection.layout","connection.move","connection.updateWaypoints"],Im(c)),this.executed("connection.reconnect",Im((function(e){var t=e.context,n=t.connection,i=t.oldSource,r=t.newSource,o=vr(n),a=vr(i),s=vr(r);o.conditionExpression&&!fr(s,["bpmn:Activity","bpmn:ExclusiveGateway","bpmn:InclusiveGateway"])&&(t.oldConditionExpression=o.conditionExpression,delete o.conditionExpression),i!==r&&a.default===o&&(t.oldDefault=a.default,delete a.default)}))),this.reverted("connection.reconnect",Im((function(e){var t=e.context,n=t.connection,i=t.oldSource,r=t.newSource,o=vr(n),a=vr(i),s=vr(r);t.oldConditionExpression&&(o.conditionExpression=t.oldConditionExpression),t.oldDefault&&(a.default=t.oldDefault,delete s.default)}))),this.executed(["element.updateAttachment"],Im(l)),this.reverted(["element.updateAttachment"],Im(l))}function Im(e){return function(t){var n=t.context;mr(n.shape||n.connection,"bpmn:BaseElement")&&e(t)}}function $m(e,t,n){Nn.call(this),this._bpmnFactory=e,this._moddle=t,this._translate=n}function Fm(e,t,n){e[n]=t[n],delete t[n]}function Hm(e,t){this._modeling=e,this._canvas=t}function Vm(e){this._modeling=e}function Gm(e,t){this._canvas=e,this._layouter=t}Lm.$inject=["moddle"],Lm.prototype._needsId=function(e){return fr(e,["bpmn:RootElement","bpmn:FlowElement","bpmn:MessageFlow","bpmn:DataAssociation","bpmn:Artifact","bpmn:Participant","bpmn:Lane","bpmn:LaneSet","bpmn:Process","bpmn:Collaboration","bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane","bpmn:Property","bpmn:CategoryValue"])},Lm.prototype._ensureId=function(e){var t;e.id?this._model.ids.claim(e.id,e):(t=mr(e,"bpmn:Activity")?"Activity":mr(e,"bpmn:Event")?"Event":mr(e,"bpmn:Gateway")?"Gateway":fr(e,["bpmn:SequenceFlow","bpmn:MessageFlow"])?"Flow":(e.$type||"").replace(/^[^:]*:/g,""),t+="_",!e.id&&this._needsId(e)&&(e.id=this._model.ids.nextPrefixed(t,e)))},Lm.prototype.create=function(e,t){var n=this._model.create(e,t||{});return this._ensureId(n),n},Lm.prototype.createDiLabel=function(){return this.create("bpmndi:BPMNLabel",{bounds:this.createDiBounds()})},Lm.prototype.createDiShape=function(e,t){return this.create("bpmndi:BPMNShape",$({bpmnElement:e,bounds:this.createDiBounds()},t))},Lm.prototype.createDiBounds=function(e){return this.create("dc:Bounds",e)},Lm.prototype.createDiWaypoints=function(e){var t=this;return S(e,(function(e){return t.createDiWaypoint(e)}))},Lm.prototype.createDiWaypoint=function(e){return this.create("dc:Point",F(e,["x","y"]))},Lm.prototype.createDiEdge=function(e,t){return this.create("bpmndi:BPMNEdge",$({bpmnElement:e,waypoint:this.createDiWaypoints([])},t))},Lm.prototype.createDiPlane=function(e,t){return this.create("bpmndi:BPMNPlane",$({bpmnElement:e},t))},n(jm,Vo),jm.$inject=["eventBus","bpmnFactory","connectionDocking","translate"],jm.prototype.updateAttachment=function(e){var t=e.shape,n=t.businessObject,i=t.host;n.attachedToRef=i&&i.businessObject},jm.prototype.updateParent=function(e,t){if(!(e instanceof On||mr(e,"bpmn:DataStoreReference")&&e.parent&&mr(e.parent,"bpmn:Collaboration"))){var n=e.parent,i=e.businessObject,r=gr(e),o=n&&n.businessObject,a=gr(n);mr(e,"bpmn:FlowNode")&&this.updateFlowNodeRefs(i,o,t&&t.businessObject),mr(e,"bpmn:DataOutputAssociation")&&(o=e.source?e.source.businessObject:null),mr(e,"bpmn:DataInputAssociation")&&(o=e.target?e.target.businessObject:null),this.updateSemanticParent(i,o),mr(e,"bpmn:DataObjectReference")&&i.dataObjectRef&&this.updateSemanticParent(i.dataObjectRef,o),this.updateDiParent(r,a)}},jm.prototype.updateBounds=function(e){var t=gr(e),n=e instanceof On?this._getLabel(t):t,i=n.bounds;i||(i=this._bpmnFactory.createDiBounds(),n.set("bounds",i)),$(i,{x:e.x,y:e.y,width:e.width,height:e.height})},jm.prototype.updateFlowNodeRefs=function(e,t,n){n!==t&&(mr(n,"bpmn:Lane")&&ft(n.get("flowNodeRef"),e),mr(t,"bpmn:Lane")&&vt(t.get("flowNodeRef"),e))},jm.prototype.updateDiConnection=function(e,t,n){var i=gr(e),r=gr(t),o=gr(n);i.sourceElement&&i.sourceElement.bpmnElement!==vr(t)&&(i.sourceElement=t&&r),i.targetElement&&i.targetElement.bpmnElement!==vr(n)&&(i.targetElement=n&&o)},jm.prototype.updateDiParent=function(e,t){if(t&&!mr(t,"bpmndi:BPMNPlane")&&(t=t.$parent),e.$parent!==t){var n=(t||e.$parent).get("planeElement");t?(n.push(e),e.$parent=t):(ft(n,e),e.$parent=null)}},jm.prototype.getLaneSet=function(e){var t,n;return mr(e,"bpmn:Lane")?((t=e.childLaneSet)||(t=this._bpmnFactory.create("bpmn:LaneSet"),e.childLaneSet=t,t.$parent=e),t):(mr(e,"bpmn:Participant")&&(e=e.processRef),(t=(n=e.get("laneSets"))[0])||((t=this._bpmnFactory.create("bpmn:LaneSet")).$parent=e,n.push(t)),t)},jm.prototype.updateSemanticParent=function(e,t,n){var i,r=this._translate;if(e.$parent!==t&&(!mr(e,"bpmn:DataInput")&&!mr(e,"bpmn:DataOutput")||(mr(t,"bpmn:Participant")&&"processRef"in t&&(t=t.processRef),!("ioSpecification"in t)||t.ioSpecification!==e.$parent))){if(mr(e,"bpmn:Lane"))t&&(t=this.getLaneSet(t)),i="lanes";else if(mr(e,"bpmn:FlowElement")){if(t)if(mr(t,"bpmn:Participant"))t=t.processRef;else if(mr(t,"bpmn:Lane"))do{t=t.$parent.$parent}while(mr(t,"bpmn:Lane"));i="flowElements"}else if(mr(e,"bpmn:Artifact")){for(;t&&!mr(t,"bpmn:Process")&&!mr(t,"bpmn:SubProcess")&&!mr(t,"bpmn:Collaboration");){if(mr(t,"bpmn:Participant")){t=t.processRef;break}t=t.$parent}i="artifacts"}else if(mr(e,"bpmn:MessageFlow"))i="messageFlows";else if(mr(e,"bpmn:Participant")){i="participants";var o,a=e.processRef;a&&(o=function(e){for(;e&&!mr(e,"bpmn:Definitions");)e=e.$parent;return e}(e.$parent||t),e.$parent&&(ft(o.get("rootElements"),a),a.$parent=null),t&&(vt(o.get("rootElements"),a),a.$parent=o))}else mr(e,"bpmn:DataOutputAssociation")?i="dataOutputAssociations":mr(e,"bpmn:DataInputAssociation")&&(i="dataInputAssociations");if(!i)throw new Error(r("no parent for {element} in {parent}",{element:e.id,parent:t.id}));var s;if(e.$parent&&ft(s=e.$parent.get(i),e),t?((s=t.get(i)).push(e),e.$parent=t):e.$parent=null,n){var c=n.get(i);ft(s,e),t&&(c||(c=[],t.set(i,c)),c.push(e))}}},jm.prototype.updateConnectionWaypoints=function(e){gr(e).set("waypoint",this._bpmnFactory.createDiWaypoints(e.waypoints))},jm.prototype.updateConnection=function(e){var t,n=e.connection,i=vr(n),r=n.source,o=vr(r),a=n.target,s=vr(n.target);if(mr(i,"bpmn:DataAssociation"))mr(i,"bpmn:DataInputAssociation")?(i.get("sourceRef")[0]=o,t=e.parent||e.newParent||s,this.updateSemanticParent(i,s,t)):mr(i,"bpmn:DataOutputAssociation")&&(t=e.parent||e.newParent||o,this.updateSemanticParent(i,o,t),i.targetRef=s);else{var c=mr(i,"bpmn:SequenceFlow");i.sourceRef!==o&&(c&&(ft(i.sourceRef&&i.sourceRef.get("outgoing"),i),o&&o.get("outgoing")&&o.get("outgoing").push(i)),i.sourceRef=o),i.targetRef!==s&&(c&&(ft(i.targetRef&&i.targetRef.get("incoming"),i),s&&s.get("incoming")&&s.get("incoming").push(i)),i.targetRef=s)}this.updateConnectionWaypoints(n),this.updateDiConnection(n,r,a)},jm.prototype._getLabel=function(e){return e.label||(e.label=this._bpmnFactory.createDiLabel()),e.label},n($m,Nn),$m.$inject=["bpmnFactory","moddle","translate"],$m.prototype.baseCreate=Nn.prototype.create,$m.prototype.create=function(e,t){if("label"===e){var n=t.di||this._bpmnFactory.createDiLabel();return this.baseCreate(e,$({type:"label",di:n},to,t))}return this.createBpmnElement(e,t)},$m.prototype.createBpmnElement=function(e,t){var n,i,r,o=this._translate,a=(t=t||{}).businessObject,s=t.di;if(!a){if(!t.type)throw new Error(o("no shape type specified"));ur(a=this._bpmnFactory.create(t.type))}if(!fr(s,["bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane"])){var c=$(s||{},{id:a.id+"_di"});s="root"===e?this._bpmnFactory.createDiPlane(a,c):"connection"===e?this._bpmnFactory.createDiEdge(a,c):this._bpmnFactory.createDiShape(a,c)}return mr(a,"bpmn:Group")&&(t=$({isFrame:!0},t)),function(e,t,n){b(n,(function(n){void 0!==t[n]&&Fm(e,t,n)}))}(a,t,["processRef","isInterrupting","associationDirection","isForCompensation"]),t.isExpanded&&Fm(s,t,"isExpanded"),mr(a,"bpmn:SubProcess")&&(t.collapsed=!Ar(a,s)),mr(a,"bpmn:ExclusiveGateway")&&(s.isMarkerVisible=!0),t.eventDefinitionType&&(i=a.get("eventDefinitions")||[],r=this._bpmnFactory.create(t.eventDefinitionType,t.eventDefinitionAttrs),"bpmn:ConditionalEventDefinition"===t.eventDefinitionType&&(r.condition=this._bpmnFactory.create("bpmn:FormalExpression")),i.push(r),r.$parent=a,a.eventDefinitions=i,delete t.eventDefinitionType),n=this.getDefaultSize(a,s),t=$({id:a.id},n,t,{businessObject:a,di:s}),this.baseCreate(e,t)},$m.prototype.getDefaultSize=function(e,t){var n=vr(e);return t=t||gr(e),mr(n,"bpmn:SubProcess")?Ar(n,t)?{width:350,height:200}:{width:100,height:80}:mr(n,"bpmn:Task")?{width:100,height:80}:mr(n,"bpmn:Gateway")?{width:50,height:50}:mr(n,"bpmn:Event")?{width:36,height:36}:mr(n,"bpmn:Participant")?Ar(n,t)?{width:600,height:250}:{width:400,height:60}:mr(n,"bpmn:Lane")?{width:400,height:100}:mr(n,"bpmn:DataObjectReference")?{width:36,height:50}:mr(n,"bpmn:DataStoreReference")?{width:50,height:50}:mr(n,"bpmn:TextAnnotation")?{width:100,height:30}:mr(n,"bpmn:Group")?{width:300,height:300}:{width:100,height:80}},$m.prototype.createParticipantShape=function(e){return h(e)||(e={isExpanded:e}),!1!==(e=$({type:"bpmn:Participant"},e||{})).isExpanded&&(e.processRef=this._bpmnFactory.create("bpmn:Process")),this.createShape(e)},Hm.$inject=["modeling","canvas"],Hm.prototype.preExecute=function(e){var t=this._modeling,n=e.elements,i=e.alignment;b(n,(function(e){var n={x:0,y:0};i.left?n.x=i.left-e.x:i.right?n.x=i.right-e.width-e.x:i.center?n.x=i.center-Math.round(e.width/2)-e.x:i.top?n.y=i.top-e.y:i.bottom?n.y=i.bottom-e.height-e.y:i.middle&&(n.y=i.middle-Math.round(e.height/2)-e.y),t.moveElements([e],n,e.parent)}))},Hm.prototype.postExecute=function(e){},Vm.$inject=["modeling"],Vm.prototype.preExecute=function(e){var t=e.source;if(!t)throw new Error("source required");var n=e.target||t.parent,i=e.shape,r=e.hints||{};i=e.shape=this._modeling.createShape(i,e.position,n,{attach:r.attach}),e.shape=i},Vm.prototype.postExecute=function(e){var t,n,i=e.hints||{};t=e.source,n=e.shape,E(t.outgoing,(function(e){return e.target===n}))||(i.connectionTarget===e.source?this._modeling.connect(e.shape,e.source,e.connection):this._modeling.connect(e.source,e.shape,e.connection))},Gm.$inject=["canvas","layouter"],Gm.prototype.execute=function(e){var t=e.connection,n=e.source,i=e.target,r=e.parent,o=e.parentIndex,a=e.hints;if(!n||!i)throw new Error("source and target required");if(!r)throw new Error("parent required");return t.source=n,t.target=i,t.waypoints||(t.waypoints=this._layouter.layoutConnection(t,a)),this._canvas.addConnection(t,r,o),t},Gm.prototype.revert=function(e){var t=e.connection;return this._canvas.removeConnection(t),t.source=null,t.target=null,t};var Wm=Math.round;function Um(e){this._modeling=e}function qm(e){return!!e.waypoints}Um.$inject=["modeling"],Um.prototype.preExecute=function(e){var t=e.elements,n=e.parent,i=e.parentIndex,r=e.position,o=e.hints,a=this._modeling;b(t,(function(e){d(e.x)||(e.x=0),d(e.y)||(e.y=0)}));var s=lt(y(t,(function(e){return!e.hidden})));b(t,(function(e){qm(e)&&(e.waypoints=S(e.waypoints,(function(e){return{x:Wm(e.x-s.x-s.width/2+r.x),y:Wm(e.y-s.y-s.height/2+r.y)}}))),$(e,{x:Wm(e.x-s.x-s.width/2+r.x),y:Wm(e.y-s.y-s.height/2+r.y)})}));var c=rt(t),l={};b(t,(function(e){if(qm(e))l[e.id]=d(i)?a.createConnection(l[e.source.id],l[e.target.id],i,e,e.parent||n,o):a.createConnection(l[e.source.id],l[e.target.id],e,e.parent||n,o);else{var t=$({},o);-1===c.indexOf(e)&&(t.autoResize=!1),l[e.id]=d(i)?a.createShape(e,F(e,["x","y","width","height"]),e.parent||n,i,t):a.createShape(e,F(e,["x","y","width","height"]),e.parent||n,t)}})),e.elements=P(l)};var Xm=Math.round;function Ym(e){this._canvas=e}function Km(e){Ym.call(this,e)}Ym.$inject=["canvas"],Ym.prototype.execute=function(e){var t=e.shape,n=e.position,i=e.parent,r=e.parentIndex;if(!i)throw new Error("parent required");if(!n)throw new Error("position required");return void 0!==n.width?$(t,n):$(t,{x:n.x-Xm(t.width/2),y:n.y-Xm(t.height/2)}),this._canvas.addShape(t,i,r),t},Ym.prototype.revert=function(e){var t=e.shape;return this._canvas.removeShape(t),t},n(Km,Ym),Km.$inject=["canvas"];var Zm=Ym.prototype.execute;Km.prototype.execute=function(e){var t=e.shape;return function(e){["width","height"].forEach((function(t){void 0===e[t]&&(e[t]=0)}))}(t),t.labelTarget=e.labelTarget,Zm.call(this,e)};var Qm=Ym.prototype.revert;function Jm(e,t){this._canvas=e,this._modeling=t}function ef(e,t){this._modeling=e,this._elementRegistry=t}function tf(e,t){this._canvas=e,this._modeling=t}function nf(e){this._modeling=e}Km.prototype.revert=function(e){return e.shape.labelTarget=null,Qm.call(this,e)},Jm.$inject=["canvas","modeling"],Jm.prototype.execute=function(e){var t=e.connection,n=t.parent;return e.parent=n,e.parentIndex=gt(n.children,t),e.source=t.source,e.target=t.target,this._canvas.removeConnection(t),t.source=null,t.target=null,t},Jm.prototype.revert=function(e){var t=e.connection,n=e.parent,i=e.parentIndex;return t.source=e.source,t.target=e.target,vt(n.children,t,i),this._canvas.addConnection(t,n),t},ef.$inject=["modeling","elementRegistry"],ef.prototype.postExecute=function(e){var t=this._modeling,n=this._elementRegistry;b(e.elements,(function(e){n.get(e.id)&&(e.waypoints?t.removeConnection(e):t.removeShape(e))}))},tf.$inject=["canvas","modeling"],tf.prototype.preExecute=function(e){var t=this._modeling,n=e.shape;lm(n.incoming,(function(e){t.removeConnection(e,{nested:!0})})),lm(n.outgoing,(function(e){t.removeConnection(e,{nested:!0})})),lm(n.children,(function(e){e.waypoints?t.removeConnection(e,{nested:!0}):t.removeShape(e,{nested:!0})}))},tf.prototype.execute=function(e){var t=this._canvas,n=e.shape,i=n.parent;return e.oldParent=i,e.oldParentIndex=gt(i.children,n),t.removeShape(n),n},tf.prototype.revert=function(e){var t=this._canvas,n=e.shape,i=e.oldParent,r=e.oldParentIndex;return vt(i.children,n,r),t.addShape(n,i),n},nf.$inject=["modeling"];var rf={x:"y",y:"x"};function of(e,t){this._layouter=e,this._canvas=t}function af(){}function sf(){this.allShapes={},this.allConnections={},this.enclosedElements={},this.enclosedConnections={},this.topLevel={}}function cf(e){this._modeling=e}function lf(e){this._helper=new cf(e)}function pf(e){this._modeling=e,this._helper=new cf(e)}function uf(e){this._modeling=e}function hf(e){return e.original||e}function df(e,t){this._modeling=e,this._rules=t}function mf(e){this._modeling=e}function ff(e){this._modeling=e}function vf(e){return $({},e)}function gf(e){switch(e){case"n":return"y";case"w":return"x";case"s":return"y";case"e":return"x"}}function yf(e,t,n){var i=gf(n);return/e|s/.test(n)?e[i]>t:/n|w/.test(n)?e[i]<t:void 0}function bf(e,t){return-1!==e.indexOf(t)}function _f(e){this._modeling=e}function xf(e){var t={};return b(e,(function(e){t[e.id]=e.hidden,e.children&&(t=$({},t,xf(e.children)))})),t}function wf(e,t){var n=[];return b(e,(function(e){e.hidden=t,n=n.concat(e),e.children&&(n=n.concat(wf(e.children,e.collapsed||t)))})),n}function Ef(e,t){var n=[];return b(e,(function(e){e.hidden=t[e.id],n=n.concat(e),e.children&&(n=n.concat(Ef(e.children,t)))})),n}function Sf(e){this._modeling=e}function Cf(e,t){return ft(e&&e.attachers,t)}function Rf(e,t,n){if(e){var i=e.attachers;i||(e.attachers=i=[]),vt(i,t,n)}}function Pf(){}function Mf(e,t,n){this._eventBus=e,this._elementFactory=t,this._commandStack=n;var i=this;e.on("diagram.init",(function(){i.registerHandlers(n)}))}function Tf(e){this._elementRegistry=e}function Af(e,t){b(t,(function(t,n){e.set(n,t)}))}nf.prototype.preExecute=function(e){var t=this._modeling,n=e.groups,i=e.axis,r=e.dimension;function o(e,t){e.range.min=Math.min(t[i],e.range.min),e.range.max=Math.max(t[i]+t[r],e.range.max)}function a(e){return e[i]+e[r]/2}function s(e){return e.length-1}function c(e){return e.max-e.min}var l,p,u=n[0],h=s(n),d=n[h],m=0;b(n,(function(e,l){var p,u,d;e.elements.length<2?l&&l!==n.length-1&&(o(e,e.elements[0]),m+=c(e.range)):(u=(p=k(e.elements,i))[0],l===h&&(u=p[s(p)]),d=a(u),e.range=null,b(p,(function(n){!function(e,n){var r={y:0};r[i]=e-a(n),r[i]&&(r[rf[i]]=0,t.moveElements([n],r,n.parent))}(d,n),null!==e.range?o(e,n):e.range={min:n[i],max:n[i]+n[r]}})),l&&l!==n.length-1&&(m+=c(e.range)))})),p=Math.abs(d.range.min-u.range.max),(l=Math.round((p-m)/(n.length-1)))<n.length-1||b(n,(function(e,o){var a,s={};e!==u&&e!==d&&(a=n[o-1],e.range.max=0,b(e.elements,(function(n,o){s[rf[i]]=0,s[i]=a.range.max-n[i]+l,e.range.min!==n[i]&&(s[i]+=n[i]-e.range.min),s[i]&&t.moveElements([n],s,n.parent),e.range.max=Math.max(n[i]+n[r],o?e.range.max:0)})))}))},nf.prototype.postExecute=function(e){},of.$inject=["layouter","canvas"],of.prototype.execute=function(e){var t=e.connection;return $(e,{oldWaypoints:t.waypoints}),t.waypoints=this._layouter.layoutConnection(t,e.hints),t},of.prototype.revert=function(e){var t=e.connection;return t.waypoints=e.oldWaypoints,t},af.prototype.execute=function(e){var t=e.connection,n=e.delta,i=e.newParent||t.parent,r=e.newParentIndex,o=t.parent;return e.oldParent=o,e.oldParentIndex=ft(o.children,t),vt(i.children,t,r),t.parent=i,b(t.waypoints,(function(e){e.x+=n.x,e.y+=n.y,e.original&&(e.original.x+=n.x,e.original.y+=n.y)})),t},af.prototype.revert=function(e){var t=e.connection,n=t.parent,i=e.oldParent,r=e.oldParentIndex,o=e.delta;return ft(n.children,t),vt(i.children,t,r),t.parent=i,b(t.waypoints,(function(e){e.x-=o.x,e.y-=o.y,e.original&&(e.original.x-=o.x,e.original.y-=o.y)})),t},sf.prototype.add=function(e,t){return this.addAll([e],t)},sf.prototype.addAll=function(e,t){return $(this,function(e,t,n){c(t)&&(t=!0),h(t)&&(n=t,t=!0);var i=ht((n=n||{}).allShapes),r=ht(n.allConnections),o=ht(n.enclosedElements),a=ht(n.enclosedConnections),s=ht(n.topLevel,t&&M(e,(function(e){return e.id})));function l(e){s[e.source.id]&&s[e.target.id]&&(s[e.id]=[e]),i[e.source.id]&&i[e.target.id]&&(a[e.id]=o[e.id]=e),r[e.id]=e}return st(e,(function(e){if(o[e.id]=e,!e.waypoints)return i[e.id]=e,b(e.incoming,l),b(e.outgoing,l),e.children;a[e.id]=r[e.id]=e})),{allShapes:i,allConnections:r,topLevel:s,enclosedConnections:a,enclosedElements:o}}(e,!!t,this)),this},cf.prototype.moveRecursive=function(e,t,n){return e?this.moveClosure(this.getClosure(e),t,n):[]},cf.prototype.moveClosure=function(e,t,n,i,r){var o=this._modeling,a=e.allShapes,s=e.allConnections,c=e.enclosedConnections,l=e.topLevel,p=!1;r&&r.parent===n&&(p=!0),b(a,(function(e){o.moveShape(e,t,l[e.id]&&!p&&n,{recurse:!1,layout:!1})})),b(s,(function(e){var i=!!a[e.source.id],r=!!a[e.target.id];c[e.id]&&i&&r?o.moveConnection(e,t,l[e.id]&&!p&&n):o.layoutConnection(e,{connectionStart:i&&Th(e,e.source,t),connectionEnd:r&&Ah(e,e.target,t)})}))},cf.prototype.getClosure=function(e){return(new sf).addAll(e,!0)},lf.$inject=["modeling"],lf.prototype.preExecute=function(e){e.closure=this._helper.getClosure(e.shapes)},lf.prototype.postExecute=function(e){var t,n=e.hints;n&&n.primaryShape&&(t=n.primaryShape,n.oldParent=t.parent),this._helper.moveClosure(e.closure,e.delta,e.newParent,e.newHost,t)},pf.$inject=["modeling"],pf.prototype.execute=function(e){var t=e.shape,n=e.delta,i=e.newParent||t.parent,r=e.newParentIndex,o=t.parent;return e.oldBounds=F(t,["x","y","width","height"]),e.oldParent=o,e.oldParentIndex=ft(o.children,t),vt(i.children,t,r),$(t,{parent:i,x:t.x+n.x,y:t.y+n.y}),t},pf.prototype.postExecute=function(e){var t=e.shape,n=e.delta,i=e.hints,r=this._modeling;!1!==i.layout&&(b(t.incoming,(function(e){r.layoutConnection(e,{connectionEnd:Ah(e,t,n)})})),b(t.outgoing,(function(e){r.layoutConnection(e,{connectionStart:Th(e,t,n)})}))),!1!==i.recurse&&this.moveChildren(e)},pf.prototype.revert=function(e){var t=e.shape,n=e.oldParent,i=e.oldParentIndex,r=e.delta;return vt(n.children,t,i),$(t,{parent:n,x:t.x-r.x,y:t.y-r.y}),t},pf.prototype.moveChildren=function(e){var t=e.delta,n=e.shape;this._helper.moveRecursive(n.children,t,null)},pf.prototype.getNewParent=function(e){return e.newParent||e.shape.parent},uf.$inject=["modeling"],uf.prototype.execute=function(e){var t=e.newSource,n=e.newTarget,i=e.connection,r=e.dockingOrPoints;if(!t&&!n)throw new Error("newSource or newTarget required");return u(r)&&(e.oldWaypoints=i.waypoints,i.waypoints=r),t&&(e.oldSource=i.source,i.source=t),n&&(e.oldTarget=i.target,i.target=n),i},uf.prototype.postExecute=function(e){var t=e.connection,n=e.newSource,i=e.newTarget,r=e.dockingOrPoints,o=e.hints||{},a={};o.connectionStart&&(a.connectionStart=o.connectionStart),o.connectionEnd&&(a.connectionEnd=o.connectionEnd),!1!==o.layoutConnection&&(!n||i&&"source"!==o.docking||(a.connectionStart=a.connectionStart||hf(u(r)?r[0]:r)),!i||n&&"target"!==o.docking||(a.connectionEnd=a.connectionEnd||hf(u(r)?r[r.length-1]:r)),o.newWaypoints&&(a.waypoints=o.newWaypoints),this._modeling.layoutConnection(t,a))},uf.prototype.revert=function(e){var t=e.oldSource,n=e.oldTarget,i=e.oldWaypoints,r=e.connection;return t&&(r.source=t),n&&(r.target=n),i&&(r.waypoints=i),r},df.$inject=["modeling","rules"],df.prototype.preExecute=function(e){var t,n=this,i=this._modeling,r=this._rules,o=e.oldShape,a=e.newData,s=e.hints||{};function c(e,t,n){return r.allowed("connection.reconnect",{connection:n,source:e,target:t})}var l,p={x:a.x,y:a.y},u={x:o.x,y:o.y,width:o.width,height:o.height};t=e.newShape=e.newShape||n.createShape(a,p,o.parent,s),o.host&&i.updateAttachment(t,o.host),!1!==s.moveChildren&&(l=o.children.slice(),i.moveElements(l,{x:0,y:0},t,s));var h=o.incoming.slice(),d=o.outgoing.slice();b(h,(function(e){c(e.source,t,e)&&n.reconnectEnd(e,t,Mh(e,t,u),s)})),b(d,(function(e){var i=e.target;c(t,i,e)&&n.reconnectStart(e,t,Ph(e,t,u),s)}))},df.prototype.postExecute=function(e){var t=e.oldShape;this._modeling.removeShape(t)},df.prototype.execute=function(e){},df.prototype.revert=function(e){},df.prototype.createShape=function(e,t,n,i){return this._modeling.createShape(e,t,n,i)},df.prototype.reconnectStart=function(e,t,n,i){this._modeling.reconnectStart(e,t,n,i)},df.prototype.reconnectEnd=function(e,t,n,i){this._modeling.reconnectEnd(e,t,n,i)},mf.$inject=["modeling"],mf.prototype.execute=function(e){var t=e.shape,n=e.newBounds,i=e.minBounds;if(void 0===n.x||void 0===n.y||void 0===n.width||void 0===n.height)throw new Error("newBounds must have {x, y, width, height} properties");if(i&&(n.width<i.width||n.height<i.height))throw new Error("width and height cannot be less than minimum height and width");if(!i&&n.width<10||n.height<10)throw new Error("width and height cannot be less than 10px");return e.oldBounds={width:t.width,height:t.height,x:t.x,y:t.y},$(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t},mf.prototype.postExecute=function(e){var t=this._modeling,n=e.shape,i=e.oldBounds;!1!==(e.hints||{}).layout&&(b(n.incoming,(function(e){t.layoutConnection(e,{connectionEnd:Mh(e,n,i)})})),b(n.outgoing,(function(e){t.layoutConnection(e,{connectionStart:Ph(e,n,i)})})))},mf.prototype.revert=function(e){var t=e.shape,n=e.oldBounds;return $(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t},ff.$inject=["modeling"],ff.prototype.preExecute=function(e){var t=e.delta,n=e.direction,i=e.movingShapes,r=e.resizingShapes,o=e.start,a={};this.moveShapes(i,t),b(r,(function(e){a[e.id]=function(e){return{x:e.x,y:e.y,height:e.height,width:e.width}}(e)})),this.resizeShapes(r,t,n),this.updateConnectionWaypoints(function(e,t){var n=[];return b(e.concat(t),(function(i){var r=i.incoming,o=i.outgoing;b(r.concat(o),(function(i){var r=i.source,o=i.target;(bm(e,r)||bm(e,o)||bm(t,r)||bm(t,o))&&(bm(n,i)||n.push(i))}))})),n}(i,r),t,n,o,i,r,a)},ff.prototype.execute=function(){},ff.prototype.revert=function(){},ff.prototype.moveShapes=function(e,t){var n=this;b(e,(function(e){n._modeling.moveShape(e,t,null,{autoResize:!1,layout:!1,recurse:!1})}))},ff.prototype.resizeShapes=function(e,t,n){var i=this;b(e,(function(e){var r=function(e,t,n){var i=e.x,r=e.y,o=e.width,a=e.height,s=n.x,c=n.y;switch(t){case"n":return{x:i,y:r+c,width:o,height:a-c};case"s":return{x:i,y:r,width:o,height:a+c};case"w":return{x:i+s,y:r,width:o-s,height:a};case"e":return{x:i,y:r,width:o+s,height:a};default:throw new Error("unknown direction: "+t)}}(e,n,t);i._modeling.resizeShape(e,r,null,{attachSupport:!1,autoResize:!1,layout:!1})}))},ff.prototype.updateConnectionWaypoints=function(e,t,n,i,r,o,a){var s=this,c=r.concat(o);b(e,(function(e){var l=e.source,p=e.target,u=function(e){return S(e.waypoints,(function(e){return(e=vf(e)).original&&(e.original=vf(e.original)),e}))}(e),h=gf(n),d={labelBehavior:!1};bf(c,l)&&bf(c,p)?(u=S(u,(function(e){return yf(e,i,n)&&(e[h]=e[h]+t[h]),e.original&&yf(e.original,i,n)&&(e.original[h]=e.original[h]+t[h]),e})),s._modeling.updateWaypoints(e,u,{labelBehavior:!1})):(bf(c,l)||bf(c,p))&&(bf(r,l)?d.connectionStart=Th(e,l,t):bf(r,p)?d.connectionEnd=Ah(e,p,t):bf(o,l)?d.connectionStart=Ph(e,l,a[l.id]):bf(o,p)&&(d.connectionEnd=Mh(e,p,a[p.id])),s._modeling.layoutConnection(e,d))}))},_f.$inject=["modeling"],_f.prototype.execute=function(e){var t=e.shape,n=t.children;e.oldChildrenVisibility=xf(n),t.collapsed=!t.collapsed;var i=wf(n,t.collapsed);return[t].concat(i)},_f.prototype.revert=function(e){var t=e.shape,n=e.oldChildrenVisibility,i=Ef(t.children,n);return t.collapsed=!t.collapsed,[t].concat(i)},Sf.$inject=["modeling"],Sf.prototype.execute=function(e){var t=e.shape,n=e.newHost,i=t.host;return e.oldHost=i,e.attacherIdx=Cf(i,t),Rf(n,t),t.host=n,t},Sf.prototype.revert=function(e){var t=e.shape,n=e.newHost,i=e.oldHost,r=e.attacherIdx;return t.host=i,Cf(n,t),Rf(i,t,r),t},Pf.prototype.execute=function(e){var t=e.connection,n=e.newWaypoints;return e.oldWaypoints=t.waypoints,t.waypoints=n,t},Pf.prototype.revert=function(e){var t=e.connection,n=e.oldWaypoints;return t.waypoints=n,t},Mf.$inject=["eventBus","elementFactory","commandStack"],Mf.prototype.getHandlers=function(){return{"shape.append":Vm,"shape.create":Ym,"shape.delete":tf,"shape.move":pf,"shape.resize":mf,"shape.replace":df,"shape.toggleCollapse":_f,spaceTool:ff,"label.create":Km,"connection.create":Gm,"connection.delete":Jm,"connection.move":af,"connection.layout":of,"connection.updateWaypoints":Pf,"connection.reconnect":uf,"elements.create":Um,"elements.move":lf,"elements.delete":ef,"elements.distribute":nf,"elements.align":Hm,"element.updateAttachment":Sf}},Mf.prototype.registerHandlers=function(e){b(this.getHandlers(),(function(t,n){e.registerHandler(n,t)}))},Mf.prototype.moveShape=function(e,t,n,i,r){"object"==typeof i&&(r=i,i=null);var o={shape:e,delta:t,newParent:n,newParentIndex:i,hints:r||{}};this._commandStack.execute("shape.move",o)},Mf.prototype.updateAttachment=function(e,t){var n={shape:e,newHost:t};this._commandStack.execute("element.updateAttachment",n)},Mf.prototype.moveElements=function(e,t,n,i){var r,o=(i=i||{}).attach,a=n;!0===o?(r=n,a=n.parent):!1===o&&(r=null);var s={shapes:e,delta:t,newParent:a,newHost:r,hints:i};this._commandStack.execute("elements.move",s)},Mf.prototype.moveConnection=function(e,t,n,i,r){"object"==typeof i&&(r=i,i=void 0);var o={connection:e,delta:t,newParent:n,newParentIndex:i,hints:r||{}};this._commandStack.execute("connection.move",o)},Mf.prototype.layoutConnection=function(e,t){var n={connection:e,hints:t||{}};this._commandStack.execute("connection.layout",n)},Mf.prototype.createConnection=function(e,t,n,i,r,o){"object"==typeof n&&(o=r,r=i,i=n,n=void 0);var a={source:e,target:t,parent:r,parentIndex:n,connection:i=this._create("connection",i),hints:o};return this._commandStack.execute("connection.create",a),a.connection},Mf.prototype.createShape=function(e,t,n,i,r){"number"!=typeof i&&(r=i,i=void 0);var o,a,s=(r=r||{}).attach;e=this._create("shape",e),s?(o=n.parent,a=n):o=n;var c={position:t,shape:e,parent:o,parentIndex:i,host:a,hints:r};return this._commandStack.execute("shape.create",c),c.shape},Mf.prototype.createElements=function(e,t,n,i,r){u(e)||(e=[e]),"number"!=typeof i&&(r=i,i=void 0);var o={position:t,elements:e,parent:n,parentIndex:i,hints:r=r||{}};return this._commandStack.execute("elements.create",o),o.elements},Mf.prototype.createLabel=function(e,t,n,i){n=this._create("label",n);var r={labelTarget:e,position:t,parent:i||e.parent,shape:n};return this._commandStack.execute("label.create",r),r.shape},Mf.prototype.appendShape=function(e,t,n,i,r){r=r||{};var o={source:e,position:n,target:i,shape:t=this._create("shape",t),connection:r.connection,connectionParent:r.connectionParent,hints:r};return this._commandStack.execute("shape.append",o),o.shape},Mf.prototype.removeElements=function(e){var t={elements:e};this._commandStack.execute("elements.delete",t)},Mf.prototype.distributeElements=function(e,t,n){var i={groups:e,axis:t,dimension:n};this._commandStack.execute("elements.distribute",i)},Mf.prototype.removeShape=function(e,t){var n={shape:e,hints:t||{}};this._commandStack.execute("shape.delete",n)},Mf.prototype.removeConnection=function(e,t){var n={connection:e,hints:t||{}};this._commandStack.execute("connection.delete",n)},Mf.prototype.replaceShape=function(e,t,n){var i={oldShape:e,newData:t,hints:n||{}};return this._commandStack.execute("shape.replace",i),i.newShape},Mf.prototype.alignElements=function(e,t){var n={elements:e,alignment:t};this._commandStack.execute("elements.align",n)},Mf.prototype.resizeShape=function(e,t,n,i){var r={shape:e,newBounds:t,minBounds:n,hints:i};this._commandStack.execute("shape.resize",r)},Mf.prototype.createSpace=function(e,t,n,i,r){var o={delta:n,direction:i,movingShapes:e,resizingShapes:t,start:r};this._commandStack.execute("spaceTool",o)},Mf.prototype.updateWaypoints=function(e,t,n){var i={connection:e,newWaypoints:t,hints:n||{}};this._commandStack.execute("connection.updateWaypoints",i)},Mf.prototype.reconnect=function(e,t,n,i,r){var o={connection:e,newSource:t,newTarget:n,dockingOrPoints:i,hints:r||{}};this._commandStack.execute("connection.reconnect",o)},Mf.prototype.reconnectStart=function(e,t,n,i){i||(i={}),this.reconnect(e,t,e.target,n,$(i,{docking:"source"}))},Mf.prototype.reconnectEnd=function(e,t,n,i){i||(i={}),this.reconnect(e,e.source,t,n,$(i,{docking:"target"}))},Mf.prototype.connect=function(e,t,n,i){return this.createConnection(e,t,n||{},e.parent,i)},Mf.prototype._create=function(e,t){return t instanceof Tn?t:this._elementFactory.create(e,t)},Mf.prototype.toggleCollapse=function(e,t){var n={shape:e,hints:t||{}};this._commandStack.execute("shape.toggleCollapse",n)},Tf.$inject=["elementRegistry"],Tf.prototype.execute=function(e){var t=e.element,n=e.moddleElement,i=e.properties;if(!n)throw new Error("<moddleElement> required");var r=e.changed||this.getVisualReferences(n).concat(t),o=e.oldProperties||function(e,t){return x(t,(function(t,n){return t[n]=e.get(n),t}),{})}(n,C(i));return Af(n,i),e.oldProperties=o,e.changed=r,r},Tf.prototype.revert=function(e){var t=e.oldProperties,n=e.moddleElement,i=e.changed;return Af(n,t),i},Tf.prototype.getVisualReferences=function(e){var t=this._elementRegistry;return mr(e,"bpmn:DataObject")?function(e,t){return t.filter((function(t){return mr(t,"bpmn:DataObjectReference")&&vr(t).dataObjectRef===e}))}(e,t):[]};var kf="default",Of="id",Df="di",zf={width:0,height:0};function Nf(e,t,n,i,r){this._elementRegistry=e,this._moddle=t,this._translate=n,this._modeling=i,this._textRenderer=r}function Bf(e,t){return Of in e&&e.id!==t.id}function Lf(e,t){var n=e.businessObject,i=gr(e);b(t,(function(e,t){t!==Df?n.set(t,e):i&&function(e,t){b(t,(function(t,n){e.set(n,t)}))}(i,e)}))}Nf.$inject=["elementRegistry","moddle","translate","modeling","textRenderer"],Nf.prototype.execute=function(e){var t=e.element,n=[t],i=this._translate;if(!t)throw new Error(i("element required"));var r=this._elementRegistry,o=this._moddle.ids,a=t.businessObject,s=function(e){var t=$({},e);return jf.forEach((function(n){n in e&&(t[n]=vr(t[n]))})),t}(e.properties),c=e.oldProperties||function(e,t){var n=C(t),i=e.businessObject,r=gr(e);return x(n,(function(e,n){return e[n]=n!==Df?i.get(n):function(e,t){return x(t,(function(t,n){return t[n]=e&&e.get(n),t}),{})}(r,C(t.di)),e}),{})}(t,s);return Bf(s,a)&&(o.unclaim(a.id),r.updateId(t,s.id),o.claim(s.id,a)),kf in s&&(s.default&&n.push(r.get(s.default.id)),a.default&&n.push(r.get(a.default.id))),Lf(t,s),e.oldProperties=c,e.changed=n,n},Nf.prototype.postExecute=function(e){var t=e.element.label,n=t&&vr(t).name;if(n){var i=this._textRenderer.getExternalLabelBounds(t,n);this._modeling.resizeShape(t,i,zf)}},Nf.prototype.revert=function(e){var t=e.element,n=e.properties,i=e.oldProperties,r=t.businessObject,o=this._elementRegistry,a=this._moddle.ids;return Lf(t,i),Bf(n,r)&&(a.unclaim(n.id),o.updateId(t,i.id),a.claim(i.id,r)),e.changed};var jf=["default"];function If(e,t){this._canvas=e,this._modeling=t}function $f(e,t){this._modeling=e,this._spaceTool=t}function Ff(e,t){this._modeling=e,this._translate=t}function Hf(e,t){this._modeling=e,this._spaceTool=t}If.$inject=["canvas","modeling"],If.prototype.execute=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,r=t.getRootElement(),o=r.businessObject,a=o.$parent,s=gr(r);t.setRootElement(n),t.removeRootElement(r),vt(a.rootElements,i),i.$parent=a,ft(a.rootElements,o),o.$parent=null,r.di=null,s.bpmnElement=i,n.di=s,e.oldRoot=r},If.prototype.revert=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,r=e.oldRoot,o=r.businessObject,a=i.$parent,s=gr(n);t.setRootElement(r),t.removeRootElement(n),ft(a.rootElements,i),i.$parent=null,vt(a.rootElements,o),o.$parent=a,n.di=null,s.bpmnElement=o,r.di=s},$f.$inject=["modeling","spaceTool"],$f.prototype.preExecute=function(e){var t=this._spaceTool,n=this._modeling,i=e.shape,r=e.location,o=dp(i),a=o===i,s=a?i:i.parent;hp(s).length||n.createShape({type:"bpmn:Lane"},{x:i.x+pp,y:i.y,width:i.width-pp,height:i.height},s);var c=[];st(o,(function(e){return c.push(e),e.label&&c.push(e.label),e===i?[]:y(e.children,(function(e){return e!==i}))}));var l="top"===r?-120:120,p="top"===r?i.y:i.y+i.height,u=p+("top"===r?10:-10),h="top"===r?"n":"s",d=t.calculateAdjustments(c,"y",l,u);t.makeSpace(d.movingShapes,d.resizingShapes,{x:0,y:l},h,u),e.newLane=n.createShape({type:"bpmn:Lane"},{x:i.x+(a?pp:0),y:p-("top"===r?120:0),width:i.width-(a?pp:0),height:120},s)},Ff.$inject=["modeling","translate"],Ff.prototype.preExecute=function(e){var t=this._modeling,n=this._translate,i=e.shape,r=e.count,o=hp(i),a=o.length;if(a>r)throw new Error(n("more than {count} child lanes",{count:r}));var s,c,l,p,u,h=Math.round(i.height/r);for(u=0;u<r;u++)s=i.y+u*h,c=u===r-1?i.height-h*u:h,l={x:i.x+pp,y:s,width:i.width-pp,height:c},u<a?t.resizeShape(o[u],l):(p={type:"bpmn:Lane"},t.createShape(p,l,i))},Hf.$inject=["modeling","spaceTool"],Hf.prototype.preExecute=function(e){var t=e.shape,n=e.newBounds;!1!==e.balanced?this.resizeBalanced(t,n):this.resizeSpace(t,n)},Hf.prototype.resizeBalanced=function(e,t){var n=this._modeling,i=mp(e,t);n.resizeShape(e,t),i.forEach((function(e){n.resizeShape(e.shape,e.newBounds)}))},Hf.prototype.resizeSpace=function(e,t){var n,i,r,o,a,s=this._spaceTool,c=an(e),l=ip(an(t),c),p=dp(e),u=[],h=[];st(p,(function(e){return u.push(e),(mr(e,"bpmn:Lane")||mr(e,"bpmn:Participant"))&&h.push(e),e.children})),(l.bottom||l.top)&&(n=l.bottom||l.top,i=e.y+(l.bottom?e.height:0)+(l.bottom?-10:10),r=l.bottom?"s":"n",o=l.top>0||l.bottom<0?-n:n,a=s.calculateAdjustments(u,"y",o,i),s.makeSpace(a.movingShapes,a.resizingShapes,{x:0,y:n},r)),(l.left||l.right)&&(n=l.right||l.left,i=e.x+(l.right?e.width:0)+(l.right?-10:100),r=l.right?"e":"w",o=l.left>0||l.right<0?-n:n,a=s.calculateAdjustments(h,"x",o,i),s.makeSpace(a.movingShapes,a.resizingShapes,{x:n,y:0},r))};var Vf="flowNodeRef",Gf="lanes";function Wf(e){this._elementRegistry=e}function Uf(e){this._moddle=e}Wf.$inject=["elementRegistry"],Wf.prototype.computeUpdates=function(e,t){var n=[],i=[],r={},o=[];function a(e){-1===n.indexOf(e)&&(o.push(e),n.push(e))}function s(e){return e.parent?function(e){var t=dp(e);return r[t.id]||(r[t.id]=up(t)),r[t.id]}(e).filter((function(t){return n=e,i=an(t),r=n.x+n.width/2,o=n.y+n.height/2,r>i.left&&r<i.right&&o>i.top&&o<i.bottom;var n,i,r,o})).map((function(e){return e.businessObject})):[]}return t.forEach((function(e){var t=dp(e);t&&-1===n.indexOf(t)&&(t.children.filter((function(e){return mr(e,"bpmn:FlowNode")})).forEach(a),n.push(t))})),e.forEach(a),o.forEach((function(e){var t=e.businessObject,n=t.get(Gf).slice(),r=s(e);i.push({flowNode:t,remove:n,add:r})})),t.forEach((function(e){var t=e.businessObject;e.parent||t.get(Vf).forEach((function(e){i.push({flowNode:e,remove:[t],add:[]})}))})),i},Wf.prototype.execute=function(e){var t=e.updates;t||(t=e.updates=this.computeUpdates(e.flowNodeShapes,e.laneShapes)),t.forEach((function(e){var t=e.flowNode,n=t.get(Gf);e.remove.forEach((function(e){ft(n,e),ft(e.get(Vf),t)})),e.add.forEach((function(e){vt(n,e),vt(e.get(Vf),t)}))}))},Wf.prototype.revert=function(e){e.updates.forEach((function(e){var t=e.flowNode,n=t.get(Gf);e.add.forEach((function(e){ft(n,e),ft(e.get(Vf),t)})),e.remove.forEach((function(e){vt(n,e),vt(e.get(Vf),t)}))}))},Uf.$inject=["moddle"],Uf.prototype.execute=function(e){var t=this._moddle.ids,n=e.id,i=e.element;e.claiming?t.claim(n,i):t.unclaim(n)},Uf.prototype.revert=function(e){var t=this._moddle.ids,n=e.id,i=e.element;e.claiming?t.unclaim(n):t.claim(n,i)};var qf={fill:void 0,stroke:void 0};function Xf(e){this._commandStack=e,this._normalizeColor=function(e){if(e){if(f(e)){var t=function(e){var t=document.createElement("canvas").getContext("2d");return t.fillStyle="transparent",t.fillStyle=e,/^#[0-9a-fA-F]{6}$/.test(t.fillStyle)?t.fillStyle:null}(e);if(t)return t}throw new Error("invalid color value: "+e)}}}Xf.$inject=["commandStack"],Xf.prototype.postExecute=function(e){var t=e.elements,n=e.colors||qf,i=this,r={};"fill"in n&&$(r,{"background-color":this._normalizeColor(n.fill)}),"stroke"in n&&$(r,{"border-color":this._normalizeColor(n.stroke)}),b(t,(function(e){var t=function(e){return!!e.waypoints}(e)?F(r,["border-color"]):r;!function(e){"border-color"in e&&(e.stroke=e["border-color"]);"background-color"in e&&(e.fill=e["background-color"])}(t),e.labelTarget?i._commandStack.execute("element.updateModdleProperties",{element:e,moddleElement:gr(e).label,properties:{color:r["background-color"]}}):i._commandStack.execute("element.updateProperties",{element:e,properties:{di:t}})}))};var Yf={width:0,height:0};function Kf(e,t,n){function i(e,t){var i=e.label||e,r=e.labelTarget||e;return function(e,t,n){var i=e.businessObject,r=zr(i);r&&("categoryValueRef"===r?i.categoryValueRef.value=t:i[r]=t)}(i,t),function(e,t){if(!no(e)){var i=gr(e);t&&!i.label&&(i.label=n.create("bpmndi:BPMNLabel")),!t&&i.label&&(i.label=null)}}(e,t),[i,r]}this.preExecute=function(t){var n=t.element,i=n.businessObject,r=t.newLabel;if(!ao(n)&&no(n)&&!io(n)&&!Zf(r)){var o=oo(n);o={x:o.x,y:o.y+7},e.createLabel(n,o,{id:i.id+"_label",businessObject:i,di:n.di})}},this.execute=function(e){return e.oldLabel=Nr(e.element),i(e.element,e.newLabel)},this.revert=function(e){return i(e.element,e.oldLabel)},this.postExecute=function(n){var i=n.element,r=i.label||i,o=n.newLabel,a=n.newBounds,s=n.hints||{};if(ao(r)||mr(r,"bpmn:TextAnnotation"))if(ao(r)&&Zf(o))!1!==s.removeShape&&e.removeShape(r,{unsetLabel:!1});else{var c=Nr(r);void 0===a&&(a=t.getExternalLabelBounds(r,c)),a&&e.resizeShape(r,a,Yf)}}}function Zf(e){return!e||!e.trim()}function Qf(e,t,n,i){Mf.call(this,e,t,n),this._bpmnRules=i}function Jf(){}Kf.$inject=["modeling","textRenderer","bpmnFactory"],n(Qf,Mf),Qf.$inject=["eventBus","elementFactory","commandStack","bpmnRules"],Qf.prototype.getHandlers=function(){var e=Mf.prototype.getHandlers.call(this);return e["element.updateModdleProperties"]=Tf,e["element.updateProperties"]=Nf,e["canvas.updateRoot"]=If,e["lane.add"]=$f,e["lane.resize"]=Hf,e["lane.split"]=Ff,e["lane.updateRefs"]=Wf,e["id.updateClaim"]=Uf,e["element.setColor"]=Xf,e["element.updateLabel"]=Kf,e},Qf.prototype.updateLabel=function(e,t,n,i){this._commandStack.execute("element.updateLabel",{element:e,newLabel:t,newBounds:n,hints:i||{}})},Qf.prototype.connect=function(e,t,n,i){var r=this._bpmnRules;if(n||(n=r.canConnect(e,t)),n)return this.createConnection(e,t,n,e.parent,i)},Qf.prototype.updateModdleProperties=function(e,t,n){this._commandStack.execute("element.updateModdleProperties",{element:e,moddleElement:t,properties:n})},Qf.prototype.updateProperties=function(e,t){this._commandStack.execute("element.updateProperties",{element:e,properties:t})},Qf.prototype.resizeLane=function(e,t,n){this._commandStack.execute("lane.resize",{shape:e,newBounds:t,balanced:n})},Qf.prototype.addLane=function(e,t){var n={shape:e,location:t};return this._commandStack.execute("lane.add",n),n.newLane},Qf.prototype.splitLane=function(e,t){this._commandStack.execute("lane.split",{shape:e,count:t})},Qf.prototype.makeCollaboration=function(){var e=this._create("root",{type:"bpmn:Collaboration"}),t={newRoot:e};return this._commandStack.execute("canvas.updateRoot",t),e},Qf.prototype.updateLaneRefs=function(e,t){this._commandStack.execute("lane.updateRefs",{flowNodeShapes:e,laneShapes:t})},Qf.prototype.makeProcess=function(){var e={newRoot:this._create("root",{type:"bpmn:Process"})};this._commandStack.execute("canvas.updateRoot",e)},Qf.prototype.claimId=function(e,t){this._commandStack.execute("id.updateClaim",{id:e,element:t,claiming:!0})},Qf.prototype.unclaimId=function(e,t){this._commandStack.execute("id.updateClaim",{id:e,element:t})},Qf.prototype.setColor=function(e,t){e.length||(e=[e]),this._commandStack.execute("element.setColor",{elements:e,colors:t})},Jf.prototype.layoutConnection=function(e,t){return[(t=t||{}).connectionStart||cn(t.source||e.source),t.connectionEnd||cn(t.target||e.target)]};var ev=Math.round,tv={"h:h":20,"v:v":20,"h:v":-10,"v:h":-10};function nv(e,t,n){var i,r,o,a=ln(t,e,5),s=n.split(":")[0],c=ev((t.x-e.x)/2+e.x),l=ev((t.y-e.y)/2+e.y),p=(o=a,{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/left|right/,v:/top|bottom/}[s].test(o)),u=/h|r|l/.test(s),h=!1;return p?(i=u?{x:c,y:e.y}:{x:e.x,y:l},r=u?"h:h":"v:v"):(r=u?"h:v":"v:h",function(e,t){return!{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/./,v:/./}[t].test(e)}(a,s)?u?(h=l===e.y,i={x:e.x+20*(/l/.test(s)?-1:1),y:h?l+20:l}):i={x:(h=c===e.x)?c+20:c,y:e.y+20*(/t/.test(s)?-1:1)}:i={x:c,y:l}),{waypoints:rv(e,i,r).concat(i),directions:r,turnNextDirections:h}}function iv(e){return e.split(":").reverse().join(":")}function rv(e,t,n){if(!function(e){return e&&/^h|v|t|r|b|l:h|v|t|r|b|l$/.test(e)}(n=n||"h:h"))throw new Error("unknown directions: <"+n+">: must be specified as <start>:<end> with start/end in { h,v,t,r,b,l }");if(lv(n)){var i=function(e,t,n){return nv(e,t,n)}(e,t,n),r=function(e,t,n){var i=nv(t,e,iv(n));return{waypoints:i.waypoints.slice().reverse(),directions:iv(i.directions),turnNextDirections:i.turnNextDirections}}(e,t,n),o=function(e,t){var n=e.directions.split(":")[1],i=t.directions.split(":")[0];e.turnNextDirections&&(n="h"==n?"v":"h"),t.turnNextDirections&&(i="h"==i?"v":"h");var r=n+":"+i;return{waypoints:rv(e.waypoints[e.waypoints.length-1],t.waypoints[0],r),directions:r}}(i,r);return[].concat(i.waypoints,o.waypoints,r.waypoints)}return function(e,t,n){var i=ev((t.x-e.x)/2+e.x),r=ev((t.y-e.y)/2+e.y);if("h:v"===n)return[{x:t.x,y:e.y}];if("v:h"===n)return[{x:e.x,y:t.y}];if("h:h"===n)return[{x:i,y:e.y},{x:i,y:t.y}];if("v:v"===n)return[{x:e.x,y:r},{x:t.x,y:r}];throw new Error("invalid directions: can only handle varians of [hv]:[hv]")}(e,t,n)}function ov(e,t,n,i,r){var o=_(r&&r.preferredLayouts||[],"straight")[0]||"h:h",a=ln(e,t,tv[o]||0),s=function(e,t){if(lv(t))return t;switch(e){case"intersect":return"t:t";case"top":case"bottom":return"v:v";case"left":case"right":return"h:h";default:return t}}(a,o);n=n||cn(e),i=i||cn(t);var c=s.split(":");return function(e,t,n){var i=rv(e,t,n);return i.unshift(e),i.push(t),uv(i)}(pv(n,e,c[0],function(e){return{top:"bottom",bottom:"top",left:"right",right:"left","top-left":"bottom-right","bottom-right":"top-left","top-right":"bottom-left","bottom-left":"top-right"}[e]}(a)),pv(i,t,c[1],a),s)}function av(e,t,n,i,r,o){var a;return u(n)&&(r=n,o=i,n=cn(e),i=cn(t)),r=r||[],(a=-1!==(o=$({preferredLayouts:[]},o)).preferredLayouts.indexOf("straight")&&function(e,t,n,i,r){var o,a,s={};if(a=ln(e,t),!/^(top|bottom|left|right)$/.test(a))return null;/top|bottom/.test(a)&&(o="x");/left|right/.test(a)&&(o="y");return"target"===r.preserveDocking?sv(o,i,e)?(s[o]=i[o],[{x:void 0!==s.x?s.x:n.x,y:void 0!==s.y?s.y:n.y,original:{x:void 0!==s.x?s.x:n.x,y:void 0!==s.y?s.y:n.y}},{x:i.x,y:i.y}]):null:sv(o,n,t)?(s[o]=n[o],[{x:n.x,y:n.y},{x:void 0!==s.x?s.x:i.x,y:void 0!==s.y?s.y:i.y,original:{x:void 0!==s.x?s.x:i.x,y:void 0!==s.y?s.y:i.y}}]):null}(e,t,n,i,o))||(a=o.connectionEnd&&function(e,t,n,i){var r=i.slice().reverse();return(r=cv(e,t,n,r))?r.reverse():null}(t,e,i,r))?a:(a=o.connectionStart&&cv(e,t,n,r))||(!o.connectionStart&&!o.connectionEnd&&r&&r.length?r:ov(e,t,n,i,o))}function sv(e,t,n){return function(e,t,n){return e>=t&&e<=n}(t[e],n[e],n[e]+n[{x:"width",y:"height"}[e]])}function cv(e,t,n,i){if(function(e){return e.length<3||!(e.length>4)&&!!g(e,(function(t,n){var i=e[n-1];return i&&yt(t,i)<3}))}(i))return null;var r,o=i[0],a=i.slice();return a[0]=n,a[1]=function(e,t,n){switch(_t(t,e)){case"v":return{x:n.x,y:e.y};case"h":return{x:e.x,y:n.y}}return{x:e.x,y:e.y}}(a[1],o,n),(r=function(e,t,n){var i;for(i=e.length-2;0!==i;i--)if(xt(e[i],t,20)||xt(e[i],n,20))return e.slice(i);return e}(a,e,t))!==a&&(a=cv(e,t,n,r)),a&&_t(a)?null:a}function lv(e){return e&&/t|r|b|l/.test(e)}function pv(e,t,n,i){if("h"===n&&(n=/left/.test(i)?"l":"r"),"v"===n&&(n=/top/.test(i)?"t":"b"),"t"===n)return{original:e,x:e.x,y:t.y};if("r"===n)return{original:e,x:t.x+t.width,y:e.y};if("b"===n)return{original:e,x:e.x,y:t.y+t.height};if("l"===n)return{original:e,x:t.x,y:e.y};throw new Error("unexpected dockingDirection: <"+n+">")}function uv(e){return e.reduce((function(t,n,i){return bt(t[t.length-1],e[i+1],n,0)||t.push(n),t}),[])}var hv={top:"bottom","top-right":"bottom-left","top-left":"bottom-right",right:"left",bottom:"top","bottom-right":"top-left","bottom-left":"top-right",left:"right"},dv={top:"t",right:"r",bottom:"b",left:"l"};function mv(){}function fv(e,t){return mr(t,"bpmn:Participant")?"source":mr(e,"bpmn:Participant")?"target":bv(t)?"source":bv(e)||mr(t,"bpmn:Event")?"target":mr(e,"bpmn:Event")?"source":null}function vv(e){return bv(e)?"target":"source"}function gv(e,t){return e?e.original||e:cn(t)}function yv(e,t){return mr(t,"bpmn:Activity")&&mr(e,"bpmn:BoundaryEvent")&&t.businessObject.isForCompensation}function bv(e){return mr(e,"bpmn:SubProcess")&&Ar(e)}function _v(e,t){return e===t}function xv(e){var t=/right|left/.exec(e);return t&&t[0]}function wv(e){var t=/top|bottom/.exec(e);return t&&t[0]}function Ev(e){return"right"===e||"left"===e}function Sv(e,t){var n=t.waypoints,i=n&&n.length&&ln(n[0],e);return"top"===i?["t:r"]:"right"===i?["r:b"]:"left"===i?["l:t"]:["b:l"]}function Cv(e,t,n){var i,r,o=cn(e),a=cn(t),s=(r=(i=e).host,ln(cn(i),r,-10)),c=_v(e.host,t),l=-1!==["top","right","bottom","left"].indexOf(s),p=ln(a,o,{x:e.width/2+t.width/2,y:e.height/2+t.height/2});return c?function(e,t,n,i,r){var o,a=t?e:wv(e),s=dv[a];o=t?Ev(e)?Rv("y",n,i,r)?"h":"b":Rv("x",n,i,r)?"v":"l":"v";return[s+":"+o]}(s,l,e,t,n):[function(e,t,n){if(n)return dv[e];if(_v(wv(e),wv(t))||function(e,t){return hv[e]===t}(xv(e),xv(t)))return dv[wv(e)];return dv[xv(e)]}(s,p,l)+":"+function(e,t,n){if(n)return Ev(e)?function(e,t){var n=xv(e),i=hv[n];return-1!==t.indexOf(i)}(e,t)||_v(e,t)?"h":"v":function(e,t){var n=wv(e),i=hv[n];return-1!==t.indexOf(i)}(e,t)||_v(e,t)?"v":"h";return Ev(t)||_v(wv(e),wv(t))&&xv(t)?"h":"v"}(s,p,l)]}function Rv(e,t,n,i){return!(Pv(e,i,n,40)||Pv(e,i,{x:n.x+n.width,y:n.y+n.height},40)||Pv(e,i,cn(t),40))}function Pv(e,t,n,i){return Math.abs(t[e]-n[e])<i}function Mv(e){return $({original:e.point.original||e.point},e.actual)}function Tv(e,t){this._elementRegistry=e,this._graphicsFactory=t}n(mv,Jf),mv.prototype.layoutConnection=function(e,t){t||(t={});var n,i,r=t.source||e.source,o=t.target||e.target,a=t.waypoints||e.waypoints,s=t.connectionStart,c=t.connectionEnd;return s||(s=gv(a&&a[0],r)),c||(c=gv(a&&a[a.length-1],o)),(mr(e,"bpmn:Association")||mr(e,"bpmn:DataAssociation"))&&a&&!yv(r,o)?[].concat([s],a.slice(1,-1),[c]):(mr(e,"bpmn:MessageFlow")?n=function(e,t){return{preferredLayouts:["straight","v:v"],preserveDocking:fv(e,t)}}(r,o):(mr(e,"bpmn:SequenceFlow")||yv(r,o))&&(n=r===o?{preferredLayouts:Sv(r,e)}:mr(r,"bpmn:BoundaryEvent")?{preferredLayouts:Cv(r,o,c)}:bv(r)||bv(o)?function(e){return{preferredLayouts:["straight","h:h"],preserveDocking:vv(e)}}(r):mr(r,"bpmn:Gateway")?{preferredLayouts:["v:h"]}:mr(o,"bpmn:Gateway")?{preferredLayouts:["h:v"]}:{preferredLayouts:["h:h"]}),n&&(i=uv(av(r,o,s,c,a,n=$(n,t)))),i||[s,c])},Tv.$inject=["elementRegistry","graphicsFactory"],Tv.prototype.getCroppedWaypoints=function(e,t,n){t=t||e.source,n=n||e.target;var i=this.getDockingPoint(e,t,!0),r=this.getDockingPoint(e,n),o=e.waypoints.slice(i.idx+1,r.idx);return o.unshift(Mv(i)),o.push(Mv(r)),o},Tv.prototype.getDockingPoint=function(e,t,n){var i,r,o=e.waypoints;return{point:r=o[i=n?0:o.length-1],actual:this._getIntersection(t,e,n)||r,idx:i}},Tv.prototype._getIntersection=function(e,t,n){return pn(this._getShapePath(e),this._getConnectionPath(t),n)},Tv.prototype._getConnectionPath=function(e){return this._graphicsFactory.getConnectionPath(e)},Tv.prototype._getShapePath=function(e){return this._graphicsFactory.getShapePath(e)},Tv.prototype._getGfx=function(e){return this._elementRegistry.getGraphics(e)};var Av={__init__:["modeling","bpmnUpdater"],__depends__:[fd,Kd,Qd,tm,Bl,im,cm,hm,vm,Do,Ho,Bm],bpmnFactory:["type",Lm],bpmnUpdater:["type",jm],elementFactory:["type",$m],modeling:["type",Qf],layouter:["type",mv],connectionDocking:["type",Tv]},kv=Math.round;function Ov(e,t,n,i,r){function o(e,t,n,i){return r.allowed("elements.move",{shapes:e,delta:t,position:n,target:i})}function a(e,n,i,r){if(h(i)&&(r=i,i=!1),!n.waypoints&&n.parent){var o=function(e){return{x:e.x+kv(e.width/2),y:e.y+kv(e.height/2)}}(n);return t.init(e,o,"shape.move",{cursor:"grabbing",autoActivate:i,data:{shape:n,context:r||{}}}),!0}}e.on("shape.move.start",1500,(function(e){var t=e.context,n=e.shape,r=i.get().slice();-1===r.indexOf(n)&&(r=[n]),$(t,{shapes:r=function(e){var t=M(e,"id");return y(e,(function(e){for(;e=e.parent;)if(t[e.id])return!1;return!0}))}(r),validatedShapes:r,shape:n})})),e.on("shape.move.start",1250,(function(e){var t=e.context,n=t.validatedShapes;if(!(t.canExecute=o(n)))return!1})),e.on("shape.move.move",500,(function(e){var t,n=e.context,i=n.validatedShapes,r=e.hover,a={x:e.dx,y:e.dy};t=o(i,a,{x:e.x,y:e.y},r),n.delta=a,n.canExecute=t,n.target=null!==t?r:null})),e.on("shape.move.end",(function(e){var t=e.context,i=t.delta,r=t.canExecute,o="attach"===r,a=t.shapes;if(!1===r)return!1;i.x=kv(i.x),i.y=kv(i.y),0===i.x&&0===i.y||n.moveElements(a,i,t.target,{primaryShape:t.shape,attach:o})})),e.on("element.mousedown",(function(e){if(yo(e)){var t=mo(e);if(!t)throw new Error("must supply DOM mousedown event");return a(t,e.element)}})),this.start=a}Ov.$inject=["eventBus","dragging","modeling","selection","rules"];var Dv="djs-dragging",zv="drop-ok",Nv="drop-not-ok",Bv="new-parent",Lv="attach-ok";function jv(e,t,n,i){function r(e){return function(e){return y(e,(function(t){return!function(e){return e.waypoints}(t)||g(e,O({id:t.source.id}))&&g(e,O({id:t.target.id}))}))}(a(e))}function a(e){var t=ct(e,!0),n=S(t,(function(e){return(e.incoming||[]).concat(e.outgoing||[])}));return o(t.concat(n))}function s(e,n){[Lv,zv,Nv,Bv].forEach((function(i){i===n?t.addMarker(e,i):t.removeMarker(e,i)}))}e.on("shape.move.start",499,(function(e){var s=e.context,c=s.shapes,l=s.allDraggedElements,p=r(c);if(!s.dragGroup){var u=ke("g");ye(u,n.cls("djs-drag-group",["no-events"])),fe(t.getActiveLayer(),u),s.dragGroup=u}p.forEach((function(e){i.addDragger(e,s.dragGroup)})),b(l=l?o([l,a(c)]):a(c),(function(e){t.addMarker(e,Dv)})),s.allDraggedElements=l,s.differentParents=1!==R(M(c,(function(e){return e.parent&&e.parent.id})))})),e.on("shape.move.move",499,(function(e){var t=e.context,n=t.dragGroup,i=t.target,r=t.shape.parent,o=t.canExecute;i&&("attach"===o?s(i,Lv):t.canExecute&&i&&i.id!==r.id?s(i,Bv):s(i,t.canExecute?zv:Nv)),Fn(n,e.dx,e.dy)})),e.on(["shape.move.out","shape.move.cleanup"],(function(e){var t=e.context.target;t&&s(t,null)})),e.on("shape.move.cleanup",(function(e){var n=e.context,i=n.allDraggedElements,r=n.dragGroup;b(i,(function(e){t.removeMarker(e,Dv)})),r&&Ce(r)})),this.makeDraggable=function(e,n,r){i.addDragger(n,e.dragGroup),r&&t.addMarker(n,Dv),e.allDraggedElements?e.allDraggedElements.push(n):e.allDraggedElements=[n]}}jv.$inject=["eventBus","canvas","styles","previewSupport"];var Iv={__depends__:[So,Do,Ro,Os,Ps,Kc],__init__:["move","movePreview"],move:["type",Ov],movePreview:["type",jv]},$v=".djs-palette-toggle",Fv=".entry",Hv="open",Vv="two-column";function Gv(e,t){this._eventBus=e,this._canvas=t;var n=this;e.on("tool-manager.update",(function(e){var t=e.tool;n.updateToolHighlight(t)})),e.on("i18n.changed",(function(){n._update()})),e.on("diagram.init",(function(){n._diagramInitialized=!0,n._rebuild()}))}function Wv(e,t){var n=t.getPaletteEntries();return m(n)?n(e):(b(n,(function(t,n){e[n]=t})),e)}Gv.$inject=["eventBus","canvas"],Gv.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("palette.getProviders",e,(function(e){e.providers.push(t)})),this._rebuild()},Gv.prototype.getEntries=function(){return this._getProviders().reduce(Wv,{})},Gv.prototype._rebuild=function(){this._diagramInitialized&&(this._getProviders().length&&(this._container||this._init(),this._update()))},Gv.prototype._init=function(){var e=this,t=this._eventBus,n=this._getParentContainer(),i=this._container=ce(Gv.HTML_MARKUP);n.appendChild(i),X(n).add("djs-palette-shown"),se.bind(i,".djs-palette-toggle, .entry","click",(function(t){var n=t.delegateTarget;if(J(n,$v))return e.toggle();e.trigger("click",t)})),re.bind(i,"mousedown",(function(e){e.stopPropagation()})),se.bind(i,Fv,"dragstart",(function(t){e.trigger("dragstart",t)})),t.on("canvas.resized",this._layoutChanged,this),t.fire("palette.create",{container:i})},Gv.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"palette.getProviders",providers:[]});return this._eventBus.fire(t),t.providers},Gv.prototype._toggleState=function(e){e=e||{};var t,n=this._getParentContainer(),i=this._container,r=this._eventBus,o=X(i),a=X(n);t="twoColumn"in e?e.twoColumn:this._needsCollapse(n.clientHeight,this._entries||{}),o.toggle(Vv,t),a.toggle("djs-palette-two-column",t),"open"in e&&(o.toggle(Hv,e.open),a.toggle("djs-palette-open",e.open)),r.fire("palette.changed",{twoColumn:t,open:this.isOpen()})},Gv.prototype._update=function(){var e=ue(".djs-palette-entries",this._container),t=this._entries=this.getEntries();K(e),b(t,(function(t,n){var i=t.group||"default",r=ue("[data-group="+i+"]",e);r||(r=ce('<div class="group" data-group="'+i+'"></div>'),e.appendChild(r));var o=t.html||(t.separator?'<hr class="separator" />':'<div class="entry" draggable="true"></div>'),a=ce(o);r.appendChild(a),t.separator||(V(a,"data-action",n),t.title&&V(a,"title",t.title),t.className&&function(e,t){var n=X(e);(u(t)?t:t.split(/\s+/g)).forEach((function(e){n.add(e)}))}(a,t.className),t.imageUrl&&a.appendChild(ce('<img src="'+t.imageUrl+'">')))})),this.open()},Gv.prototype.trigger=function(e,t,n){var i,r,o,a=this._entries,s=t.delegateTarget||t.target;if(!s)return t.preventDefault();(i=a[V(s,"data-action")])&&(r=i.action,o=t.originalEvent||t,m(r)?"click"===e&&r(o,n):r[e]&&r[e](o,n),t.preventDefault())},Gv.prototype._layoutChanged=function(){this._toggleState({})},Gv.prototype._needsCollapse=function(e,t){return e<46*Object.keys(t).length+50},Gv.prototype.close=function(){this._toggleState({open:!1,twoColumn:!1})},Gv.prototype.open=function(){this._toggleState({open:!0})},Gv.prototype.toggle=function(e){this.isOpen()?this.close():this.open()},Gv.prototype.isActiveTool=function(e){return e&&this._activeTool===e},Gv.prototype.updateToolHighlight=function(e){var t;this._toolsContainer||(t=ue(".djs-palette-entries",this._container),this._toolsContainer=ue("[data-group=tools]",t)),b(this._toolsContainer.children,(function(t){var n=t.getAttribute("data-action");if(n){var i=X(t);n=n.replace("-tool",""),i.contains("entry")&&n===e?i.add("highlighted-entry"):i.remove("highlighted-entry")}}))},Gv.prototype.isOpen=function(){return X(this._container).has(Hv)},Gv.prototype._getParentContainer=function(){return this._canvas.getContainer()},Gv.HTML_MARKUP='<div class="djs-palette"><div class="djs-palette-entries"></div><div class="djs-palette-toggle"></div></div>';var Uv={__init__:["palette"],palette:["type",Gv]},qv="crosshair";function Xv(e,t,n,i,r,o,a){this._selection=r,this._dragging=n,this._mouse=a;var s=this,c=function(e){var n,i=t.getActiveLayer();ye(n=e.frame=ke("rect"),{class:"djs-lasso-overlay",width:1,height:1,x:0,y:0}),fe(i,n)},l=function(e){var t=e.frame,n=e.bbox;ye(t,{x:n.x,y:n.y,width:n.width,height:n.height})},p=function(e){e.frame&&Ce(e.frame)};o.registerTool("lasso",{tool:"lasso.selection",dragging:"lasso"}),e.on("lasso.selection.end",(function(t){var n=t.originalEvent.target;(t.hover||n instanceof SVGElement)&&e.once("lasso.selection.ended",(function(){s.activateLasso(t.originalEvent,!0)}))})),e.on("lasso.end",(function(e){var t=Yv(e),n=i.filter((function(e){return e}));s.select(n,t)})),e.on("lasso.start",(function(e){var t=e.context;t.bbox=Yv(e),c(t)})),e.on("lasso.move",(function(e){var t=e.context;t.bbox=Yv(e),l(t)})),e.on("lasso.cleanup",(function(e){var t=e.context;p(t)})),e.on("element.mousedown",1500,(function(e){if(_o(e))return s.activateLasso(e.originalEvent),!0}))}function Yv(e){var t={x:e.x-e.dx,y:e.y-e.dy},n={x:e.x,y:e.y};return t.x<=n.x&&t.y<n.y||t.x<n.x&&t.y<=n.y?{x:t.x,y:t.y,width:n.x-t.x,height:n.y-t.y}:t.x>=n.x&&t.y<n.y||t.x>n.x&&t.y<=n.y?{x:n.x,y:t.y,width:t.x-n.x,height:n.y-t.y}:t.x<=n.x&&t.y>n.y||t.x<n.x&&t.y>=n.y?{x:t.x,y:n.y,width:n.x-t.x,height:t.y-n.y}:t.x>=n.x&&t.y>n.y||t.x>n.x&&t.y>=n.y?{x:n.x,y:n.y,width:t.x-n.x,height:t.y-n.y}:{x:n.x,y:n.y,width:0,height:0}}Xv.$inject=["eventBus","canvas","dragging","elementRegistry","selection","toolManager","mouse"],Xv.prototype.activateLasso=function(e,t){this._dragging.init(e,"lasso",{autoActivate:t,cursor:qv,data:{context:{}}})},Xv.prototype.activateSelection=function(e,t){this._dragging.init(e,"lasso.selection",{trapClick:!1,autoActivate:t,cursor:qv,data:{context:{}}})},Xv.prototype.select=function(e,t){var n=function(e,t){var n={};return b(e,(function(e){var i=e;i.waypoints&&(i=lt(i)),!d(t.y)&&i.x>t.x&&(n[e.id]=e),!d(t.x)&&i.y>t.y&&(n[e.id]=e),i.x>t.x&&i.y>t.y&&(d(t.width)&&d(t.height)&&i.width+i.x<t.width+t.x&&i.height+i.y<t.height+t.y?n[e.id]=e:d(t.width)&&d(t.height)||(n[e.id]=e))})),n}(e,t);this._selection.select(P(n))},Xv.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateSelection(e,!!e)},Xv.prototype.isActive=function(){var e=this._dragging.context();return e&&/^lasso/.test(e.prefix)};var Kv={__depends__:[ym,fl],__init__:["lassoTool"],lassoTool:["type",Xv]},Zv=1500,Qv="grab";function Jv(e,t,n,i,r,o){this._dragging=n,this._mouse=o;var a=this,s=i.get("keyboard",!1);r.registerTool("hand",{tool:"hand",dragging:"hand.move"}),e.on("element.mousedown",Zv,(function(e){if(bo(e))return a.activateMove(e.originalEvent,!0),!1})),s&&s.addListener(Zv,(function(e){if(eg(e.keyEvent)&&!a.isActive()){var t=a._mouse.getLastMoveEvent();a.activateMove(t,!!t)}}),"keyboard.keydown"),s&&s.addListener(Zv,(function(e){eg(e.keyEvent)&&a.isActive()&&a.toggle()}),"keyboard.keyup"),e.on("hand.end",(function(t){var n=t.originalEvent.target;if(!(t.hover||n instanceof SVGElement))return!1;e.once("hand.ended",(function(){a.activateMove(t.originalEvent,{reactivate:!0})}))})),e.on("hand.move.move",(function(e){var n=t.viewbox().scale;t.scroll({dx:e.dx*n,dy:e.dy*n})})),e.on("hand.move.end",(function(t){var n=t.context.reactivate;return!bo(t)&&n&&e.once("hand.move.ended",(function(e){a.activateHand(e.originalEvent,!0,!0)})),!1}))}function eg(e){return da(" ",e)}Jv.$inject=["eventBus","canvas","dragging","injector","toolManager","mouse"],Jv.prototype.activateMove=function(e,t,n){"object"==typeof t&&(n=t,t=!1),this._dragging.init(e,"hand.move",{autoActivate:t,cursor:Qv,data:{context:n||{}}})},Jv.prototype.activateHand=function(e,t,n){this._dragging.init(e,"hand",{trapClick:!1,autoActivate:t,cursor:Qv,data:{context:{reactivate:n}}})},Jv.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateHand(e,!!e)},Jv.prototype.isActive=function(){var e=this._dragging.context();return!!e&&/^(hand|hand\.move)$/.test(e.prefix)};var tg={__depends__:[ym,fl],__init__:["handTool"],handTool:["type",Jv]},ng="connect-ok",ig="connect-not-ok";function rg(e,t,n,i,r,o,a){var s=this;this._dragging=t,this._rules=o,this._mouse=a,r.registerTool("global-connect",{tool:"global-connect",dragging:"global-connect.drag"}),e.on("global-connect.hover",(function(e){var t=e.context,n=e.hover,r=t.canStartConnect=s.canStartConnect(n);null!==r&&(t.startTarget=n,i.addMarker(n,r?ng:ig))})),e.on(["global-connect.out","global-connect.cleanup"],(function(e){var t=e.context.startTarget,n=e.context.canStartConnect;t&&i.removeMarker(t,n?ng:ig)})),e.on(["global-connect.ended"],(function(t){var i=t.context.startTarget,r={x:t.x,y:t.y};if(s.canStartConnect(i))return e.once("element.out",(function(){e.once(["connect.ended","connect.canceled"],(function(){e.fire("global-connect.drag.ended")})),n.start(null,i,r)})),!1}))}rg.$inject=["eventBus","dragging","connect","canvas","toolManager","rules","mouse"],rg.prototype.start=function(e,t){this._dragging.init(e,"global-connect",{autoActivate:t,trapClick:!1,data:{context:{}}})},rg.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();return this.start(e,!!e)},rg.prototype.isActive=function(){var e=this._dragging.context();return e&&/^global-connect/.test(e.prefix)},rg.prototype.canStartConnect=function(e){return this._rules.allowed("connection.start",{source:e})};var og={__depends__:[Pc,Os,Ps,ym,fl],globalConnect:["type",rg]};function ag(e,t,n,i,r,o,a,s){this._palette=e,this._create=t,this._elementFactory=n,this._spaceTool=i,this._lassoTool=r,this._handTool=o,this._globalConnect=a,this._translate=s,e.registerProvider(this)}ag.$inject=["palette","create","elementFactory","spaceTool","lassoTool","handTool","globalConnect","translate"],ag.prototype.getPaletteEntries=function(e){var t={},n=this._create,i=this._elementFactory,r=this._spaceTool,o=this._lassoTool,a=this._handTool,s=this._globalConnect,c=this._translate;function l(e,t,r,o,a){function s(t){var r=i.createShape($({type:e},a));a&&(gr(r).isExpanded=a.isExpanded);n.start(t,r)}var l=e.replace(/^bpmn:/,"");return{group:t,className:r,title:o||c("Create {type}",{type:l}),action:{dragstart:s,click:s}}}function p(e){var t=i.createShape({type:"bpmn:SubProcess",x:0,y:0,isExpanded:!0}),r=i.createShape({type:"bpmn:StartEvent",x:40,y:82,parent:t});n.start(e,[t,r],{hints:{autoSelect:[t]}})}function u(e){n.start(e,i.createParticipantShape())}return $(t,{"hand-tool":{group:"tools",className:"bpmn-icon-hand-tool",title:c("Activate the hand tool"),action:{click:function(e){a.activateHand(e)}}},"lasso-tool":{group:"tools",className:"bpmn-icon-lasso-tool",title:c("Activate the lasso tool"),action:{click:function(e){o.activateSelection(e)}}},"space-tool":{group:"tools",className:"bpmn-icon-space-tool",title:c("Activate the create/remove space tool"),action:{click:function(e){r.activateSelection(e)}}},"global-connect-tool":{group:"tools",className:"bpmn-icon-connection-multi",title:c("Activate the global connect tool"),action:{click:function(e){s.start(e)}}},"tool-separator":{group:"tools",separator:!0},"create.start-event":l("bpmn:StartEvent","event","bpmn-icon-start-event-none",c("Create StartEvent")),"create.intermediate-event":l("bpmn:IntermediateThrowEvent","event","bpmn-icon-intermediate-event-none",c("Create Intermediate/Boundary Event")),"create.end-event":l("bpmn:EndEvent","event","bpmn-icon-end-event-none",c("Create EndEvent")),"create.exclusive-gateway":l("bpmn:ExclusiveGateway","gateway","bpmn-icon-gateway-none",c("Create Gateway")),"create.task":l("bpmn:Task","activity","bpmn-icon-task",c("Create Task")),"create.data-object":l("bpmn:DataObjectReference","data-object","bpmn-icon-data-object",c("Create DataObjectReference")),"create.data-store":l("bpmn:DataStoreReference","data-store","bpmn-icon-data-store",c("Create DataStoreReference")),"create.subprocess-expanded":{group:"activity",className:"bpmn-icon-subprocess-expanded",title:c("Create expanded SubProcess"),action:{dragstart:p,click:p}},"create.participant-expanded":{group:"collaboration",className:"bpmn-icon-participant",title:c("Create Pool/Participant"),action:{dragstart:u,click:u}},"create.group":l("bpmn:Group","artifact","bpmn-icon-group",c("Create Group"))}),t};var sg={__depends__:[Uv,sl,Bm,Kv,tg,og,eo],__init__:["paletteProvider"],paletteProvider:["type",ag]};function cg(e,t,n,i,r){Vo.call(this,e),e.on("shape.move.move",250,(function(e){var o=e.context,a=o.canExecute;o.visualReplacements||(o.visualReplacements={}),a&&a.replacements?function(e){b(e.canExecute.replacements,(function(o){var a=o.oldElementId,s={type:o.newElementType};if(!e.visualReplacements[a]){var c=t.get(a);$(s,{x:c.x,y:c.y});var l=n.createShape(s);i.addShape(l,c.parent);var p=ue('[data-element-id="'+Uo(c.id)+'"]',e.dragGroup);p&&ye(p,{display:"none"});var u=r.addDragger(l,e.dragGroup);e.visualReplacements[a]=u,i.removeShape(l)}}))}(o):function(e){var t=e.visualReplacements;b(t,(function(n,i){var r=ue('[data-element-id="'+Uo(i)+'"]',e.dragGroup);r&&ye(r,{display:"inline"}),n.remove(),t[i]&&delete t[i]}))}(o)}))}cg.$inject=["eventBus","elementRegistry","elementFactory","canvas","previewSupport"],n(cg,Vo);var lg={__depends__:[Kc],__init__:["bpmnReplacePreview"],bpmnReplacePreview:["type",cg]},pg=40,ug=["x","y"],hg=Math.abs;function dg(e){e.on(["connect.hover","connect.move","connect.end"],1250,(function(e){var t=e.context,n=t.canExecute,i=t.start,r=t.hover,o=t.source,a=t.target;e.originalEvent&&ha(e.originalEvent)||(t.initialConnectionStart||(t.initialConnectionStart=t.connectionStart),n&&r&&function(e,t,n){ug.forEach((function(i){var r=vg(i,t);e[i]<t[i]+n?vc(e,i,t[i]+n):e[i]>t[i]+r-n&&vc(e,i,t[i]+r-n)}))}(e,r,function(e){return mr(e,"bpmn:Task")?10:20}(r)),r&&function(e,t){return E(t,(function(t){return fg(e,t)}))}(n,["bpmn:Association","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:SequenceFlow"])?(t.connectionStart=mc(i),fr(r,["bpmn:Event","bpmn:Gateway"])&&mg(e,mc(r)),fr(r,["bpmn:Task","bpmn:SubProcess"])&&function(e,t){var n=mc(t);ug.forEach((function(i){(function(e,t,n){return e[n]>t[n]+20&&e[n]<t[n]+vg(n,t)-20})(e,t,i)&&vc(e,i,n[i])}))}(e,r),mr(o,"bpmn:BoundaryEvent")&&a===o.host&&function(e){var t=e.context,n=t.source,i=t.target;if(function(e){var t=e.hover,n=e.source;return t&&n&&t===n}(t))return;var r=mc(n),o=ln(r,i,-10),a=[];/top|bottom/.test(o)&&a.push("x");/left|right/.test(o)&&a.push("y");a.forEach((function(t){var n,i=e[t];hg(i-r[t])<pg&&(n=i>r[t]?r[t]+pg:r[t]-pg,vc(e,t,n))}))}(e)):fg(n,"bpmn:MessageFlow")?(mr(i,"bpmn:Event")&&(t.connectionStart=mc(i)),mr(r,"bpmn:Event")&&mg(e,mc(r))):t.connectionStart=t.initialConnectionStart)}))}function mg(e,t){vc(e,"x",t.x),vc(e,"y",t.y)}function fg(e,t){return e&&e.type===t}function vg(e,t){return"x"===e?t.width:t.height}function gg(){this._targets={},this._snapOrigins={},this._snapLocations=[],this._defaultSnaps={}}function yg(e){this._snapValues={}}dg.$inject=["eventBus"],gg.prototype.getSnapOrigin=function(e){return this._snapOrigins[e]},gg.prototype.setSnapOrigin=function(e,t){this._snapOrigins[e]=t,-1===this._snapLocations.indexOf(e)&&this._snapLocations.push(e)},gg.prototype.addDefaultSnap=function(e,t){var n=this._defaultSnaps[e];n||(n=this._defaultSnaps[e]=[]),n.push(t)},gg.prototype.getSnapLocations=function(){return this._snapLocations},gg.prototype.setSnapLocations=function(e){this._snapLocations=e},gg.prototype.pointsForTarget=function(e){var t=e.id||e,n=this._targets[t];return n||(n=this._targets[t]=new yg).initDefaults(this._defaultSnaps),n},yg.prototype.add=function(e,t){var n=this._snapValues[e];n||(n=this._snapValues[e]={x:[],y:[]}),-1===n.x.indexOf(t.x)&&n.x.push(t.x),-1===n.y.indexOf(t.y)&&n.y.push(t.y)},yg.prototype.snap=function(e,t,n,i){var r=this._snapValues[t];return r&&function(e,t,n){var i,r;for(n=void 0===n?10:n,i=0;i<t.length;i++)if(r=t[i],pc(r-e)<=n)return r}(e[n],r[n],i)},yg.prototype.initDefaults=function(e){var t=this;b(e||{},(function(e,n){b(e,(function(e){t.add(n,e)}))}))};function bg(e,t,n){var i=this;this._elementRegistry=e,t.on(["create.start","shape.move.start"],(function(e){i.initSnap(e)})),t.on(["create.move","create.end","shape.move.move","shape.move.end"],1250,(function(e){var t=e.context,r=t.shape,o=t.snapContext,a=t.target;if((!e.originalEvent||!ha(e.originalEvent))&&!fc(e)&&a){var s=o.pointsForTarget(a);s.initialized||((s=i.addSnapTargetPoints(s,r,a)).initialized=!0),n.snap(e,s)}})),t.on(["create.cleanup","shape.move.cleanup"],(function(){n.hide()}))}function _g(e){return!!e.labelTarget}bg.$inject=["elementRegistry","eventBus","snapping"],bg.prototype.initSnap=function(e){var t,n=this._elementRegistry,i=e.context,r=i.shape,o=i.snapContext;o||(o=i.snapContext=new gg);var a=(t=n.get(r.id)?mc(r,e):{x:e.x+mc(r).x,y:e.y+mc(r).y}).x-r.width/2,s=t.y-r.height/2,c=t.x+r.width/2,l=t.y+r.height/2;return o.setSnapOrigin("mid",{x:t.x-e.x,y:t.y-e.y}),_g(r)||(o.setSnapOrigin("top-left",{x:a-e.x,y:s-e.y}),o.setSnapOrigin("bottom-right",{x:c-e.x,y:l-e.y})),o},bg.prototype.addSnapTargetPoints=function(e,t,n){return b(this.getSnapTargets(t,n),(function(n){if(_g(n))_g(t)&&e.add("mid",mc(n));else if(n.waypoints){if(n.waypoints.length<3)return;b(n.waypoints.slice(1,-1),(function(t){e.add("mid",t)}))}else{e.add("mid",mc(n))}})),d(t.x)&&d(t.y)?(this._elementRegistry.get(t.id)&&e.add("mid",mc(t)),e):e},bg.prototype.getSnapTargets=function(e,t){return gc(t).filter((function(e){return!e.hidden}))};function xg(e,t){t.invoke(bg,this),e.on(["create.move","create.end"],1500,wg),e.on(["create.move","create.end","shape.move.move","shape.move.end"],1500,(function(e){var t=e.context,n=t.canExecute,i=t.target;n&&("attach"===n||n.attach)&&!fc(e)&&function(e,t){var n,i=an(t),r=vd(e,t),o=e.context.shape;n=o.parent?{x:0,y:0}:cn(o);/top/.test(r)?vc(e,"y",i.top-n.y):/bottom/.test(r)&&vc(e,"y",i.bottom-n.y);/left/.test(r)?vc(e,"x",i.left-n.x):/right/.test(r)&&vc(e,"x",i.right-n.x)}(e,i)}))}function wg(e){var t=e.context.createConstraints;if(t){var n=t.top,i=t.right,r=t.bottom,o=t.left;(o&&o>=e.x||i&&i<=e.x)&&vc(e,"x",e.x),(n&&n>=e.y||r&&r<=e.y)&&vc(e,"y",e.y)}}function Eg(e,t){return-1!==e.indexOf(t)}function Sg(e,t,n){return t?{x:e.x-n.x,y:e.y-n.y}:{x:e.x,y:e.y}}n(xg,bg),xg.$inject=["eventBus","injector"],xg.prototype.initSnap=function(e){var t=bg.prototype.initSnap.call(this,e),n=e.shape,i=!!this._elementRegistry.get(n.id);return b(n.outgoing,(function(n){var r=n.waypoints[0];r=r.original||r,t.setSnapOrigin(n.id+"-docking",Sg(r,i,e))})),b(n.incoming,(function(n){var r=n.waypoints[n.waypoints.length-1];r=r.original||r,t.setSnapOrigin(n.id+"-docking",Sg(r,i,e))})),mr(n,"bpmn:Participant")&&t.setSnapLocations(["top-left","bottom-right","mid"]),t},xg.prototype.addSnapTargetPoints=function(e,t,n){bg.prototype.addSnapTargetPoints.call(this,e,t,n);var i=this.getSnapTargets(t,n);b(i,(function(n){var i;(function(e){if(mr(e,"bpmn:SubProcess")&&Ar(e))return!0;return mr(e,"bpmn:Participant")}(n)||(i="bpmn:TextAnnotation",[t,n].every((function(e){return mr(e,i)}))))&&(e.add("top-left",hc(n)),e.add("bottom-right",dc(n)))}));var r=this._elementRegistry;return b(t.incoming,(function(n){if(r.get(t.id)){Eg(i,n.source)||e.add("mid",cn(n.source));var o=n.waypoints[0];e.add(n.id+"-docking",o.original||o)}})),b(t.outgoing,(function(n){if(r.get(t.id)){Eg(i,n.target)||e.add("mid",cn(n.target));var o=n.waypoints[n.waypoints.length-1];e.add(n.id+"-docking",o.original||o)}})),mr(n,"bpmn:SequenceFlow")&&(e=this.addSnapTargetPoints(e,t,n.parent)),e},xg.prototype.getSnapTargets=function(e,t){return bg.prototype.getSnapTargets.call(this,e,t).filter((function(e){return!mr(e,"bpmn:Lane")}))};function Cg(e,t){var n=this;e.on(["resize.start"],(function(e){n.initSnap(e)})),e.on(["resize.move","resize.end"],1250,(function(e){var i=e.context,r=i.shape,o=r.parent,a=i.direction,s=i.snapContext;if(!(e.originalEvent&&ha(e.originalEvent)||fc(e))){var c=s.pointsForTarget(o);c.initialized||((c=n.addSnapTargetPoints(c,r,o,a)).initialized=!0),function(e){return"n"===e||"s"===e}(a)&&vc(e,"x",e.x),function(e){return"e"===e||"w"===e}(a)&&vc(e,"y",e.y),t.snap(e,c)}})),e.on(["resize.cleanup"],(function(){t.hide()}))}function Rg(e,t){var n=cn(e),i=an(e),r={x:n.x,y:n.y};return-1!==t.indexOf("n")?r.y=i.top:-1!==t.indexOf("s")&&(r.y=i.bottom),-1!==t.indexOf("e")?r.x=i.right:-1!==t.indexOf("w")&&(r.x=i.left),r}Cg.prototype.initSnap=function(e){var t=e.context,n=t.shape,i=t.direction,r=t.snapContext;r||(r=t.snapContext=new gg);var o=Rg(n,i);return r.setSnapOrigin("corner",{x:o.x-e.x,y:o.y-e.y}),r},Cg.prototype.addSnapTargetPoints=function(e,t,n,i){return b(this.getSnapTargets(t,n),(function(t){e.add("corner",dc(t)),e.add("corner",hc(t))})),e.add("corner",Rg(t,i)),e},Cg.$inject=["eventBus","snapping"],Cg.prototype.getSnapTargets=function(e,t){return gc(t).filter((function(t){return!(n=t,i=e,n.host===i||function(e){return!!e.waypoints}(t)||function(e){return!!e.hidden}(t)||function(e){return!!e.labelTarget}(t));var n,i}))};function Pg(e){this._canvas=e,this._asyncHide=L(j(this.hide,this),1e3)}Pg.$inject=["canvas"],Pg.prototype.snap=function(e,t){var n=e.context.snapContext,i=n.getSnapLocations(),r={x:fc(e,"x"),y:fc(e,"y")};b(i,(function(i){var o=n.getSnapOrigin(i),a={x:e.x+o.x,y:e.y+o.y};if(b(["x","y"],(function(e){var n;r[e]||void 0!==(n=t.snap(a,i,e,7))&&(r[e]={value:n,originValue:n-o[e]})})),r.x&&r.y)return!1})),this.showSnapLine("vertical",r.x&&r.x.value),this.showSnapLine("horizontal",r.y&&r.y.value),b(["x","y"],(function(t){var n=r[t];h(n)&&vc(e,t,n.originValue)}))},Pg.prototype._createLine=function(e){var t=this._canvas.getLayer("snap"),n=ke("path");return ye(n,{d:"M0,0 L0,0"}),Ee(n).add("djs-snap-line"),fe(t,n),{update:function(t){d(t)?ye(n,"horizontal"===e?{d:"M-100000,"+t+" L+100000,"+t,display:""}:{d:"M "+t+",-100000 L "+t+", +100000",display:""}):ye(n,{display:"none"})}}},Pg.prototype._createSnapLines=function(){this._snapLines={horizontal:this._createLine("horizontal"),vertical:this._createLine("vertical")}},Pg.prototype.showSnapLine=function(e,t){var n=this.getSnapLine(e);n&&n.update(t),this._asyncHide()},Pg.prototype.getSnapLine=function(e){return this._snapLines||this._createSnapLines(),this._snapLines[e]},Pg.prototype.hide=function(){b(this._snapLines,(function(e){e.update()}))};var Mg={__depends__:[{__init__:["createMoveSnapping","resizeSnapping","snapping"],createMoveSnapping:["type",bg],resizeSnapping:["type",Cg],snapping:["type",Pg]}],__init__:["connectSnapping","createMoveSnapping"],connectSnapping:["type",dg],createMoveSnapping:["type",xg]};function Tg(e,t,n,i){this._open=!1,this._results=[],this._eventMaps=[],this._canvas=e,this._eventBus=t,this._overlays=n,this._selection=i,this._container=ce(Tg.BOX_HTML),this._searchInput=ue(Tg.INPUT_SELECTOR,this._container),this._resultsContainer=ue(Tg.RESULTS_CONTAINER_SELECTOR,this._container),this._canvas.getContainer().appendChild(this._container),t.on(["canvas.destroy","diagram.destroy"],this.close,this)}function Ag(e,t,n){var i=function(e){var t="";return e.forEach((function(e){e.matched?t+='<strong class="'+Tg.RESULT_HIGHLIGHT_CLASS+'">'+Xo(e.matched)+"</strong>":t+=Xo(e.normal)})),""!==t?t:null}(t),r=ce(n);r.innerHTML=i,e.appendChild(r)}Tg.$inject=["canvas","eventBus","overlays","selection"],Tg.prototype._bindEvents=function(){var e=this;function t(t,n,i,r){e._eventMaps.push({el:t,type:i,listener:se.bind(t,n,i,r)})}t(document,"html","click",(function(t){e.close()})),t(this._container,Tg.INPUT_SELECTOR,"click",(function(e){e.stopPropagation(),e.delegateTarget.focus()})),t(this._container,Tg.RESULT_SELECTOR,"mouseover",(function(t){t.stopPropagation(),e._scrollToNode(t.delegateTarget),e._preselect(t.delegateTarget)})),t(this._container,Tg.RESULT_SELECTOR,"click",(function(t){t.stopPropagation(),e._select(t.delegateTarget)})),t(this._container,Tg.INPUT_SELECTOR,"keydown",(function(e){38===e.keyCode&&e.preventDefault(),40===e.keyCode&&e.preventDefault()})),t(this._container,Tg.INPUT_SELECTOR,"keyup",(function(t){if(27===t.keyCode)return e.close();if(13===t.keyCode){var n=e._getCurrentResult();return n?e._select(n):e.close()}return 38===t.keyCode?e._scrollToDirection(!0):40===t.keyCode?e._scrollToDirection():void(37!==t.keyCode&&39!==t.keyCode&&e._search(t.delegateTarget.value))}))},Tg.prototype._unbindEvents=function(){this._eventMaps.forEach((function(e){se.unbind(e.el,e.type,e.listener)}))},Tg.prototype._search=function(e){var t=this;if(this._clearResults(),e&&""!==e){var n=this._searchProvider.find(e);if(n.length){n.forEach((function(e){var n=e.element.id,i=t._createResultNode(e,n);t._results[n]={element:e.element,node:i}}));var i=ue(Tg.RESULT_SELECTOR,this._resultsContainer);this._scrollToNode(i),this._preselect(i)}}},Tg.prototype._scrollToDirection=function(e){var t=this._getCurrentResult();if(t){var n=e?t.previousElementSibling:t.nextElementSibling;n&&(this._scrollToNode(n),this._preselect(n))}},Tg.prototype._scrollToNode=function(e){if(e&&e!==this._getCurrentResult()){var t=e.offsetTop,n=this._resultsContainer.scrollTop,i=t-this._resultsContainer.clientHeight+e.clientHeight;t<n?this._resultsContainer.scrollTop=t:n<i&&(this._resultsContainer.scrollTop=i)}},Tg.prototype._clearResults=function(){K(this._resultsContainer),this._results=[],this._resetOverlay(),this._eventBus.fire("searchPad.cleared")},Tg.prototype._getCurrentResult=function(){return ue(Tg.RESULT_SELECTED_SELECTOR,this._resultsContainer)},Tg.prototype._createResultNode=function(e,t){var n=ce(Tg.RESULT_HTML);return e.primaryTokens.length>0&&Ag(n,e.primaryTokens,Tg.RESULT_PRIMARY_HTML),Ag(n,e.secondaryTokens,Tg.RESULT_SECONDARY_HTML),V(n,Tg.RESULT_ID_ATTRIBUTE,t),this._resultsContainer.appendChild(n),n},Tg.prototype.registerProvider=function(e){this._searchProvider=e},Tg.prototype.open=function(){if(!this._searchProvider)throw new Error("no search provider registered");this.isOpen()||(this._bindEvents(),this._open=!0,X(this._container).add("open"),this._searchInput.focus(),this._eventBus.fire("searchPad.opened"))},Tg.prototype.close=function(){this.isOpen()&&(this._unbindEvents(),this._open=!1,X(this._container).remove("open"),this._clearResults(),this._searchInput.value="",this._searchInput.blur(),this._resetOverlay(),this._eventBus.fire("searchPad.closed"))},Tg.prototype.toggle=function(){this.isOpen()?this.close():this.open()},Tg.prototype.isOpen=function(){return this._open},Tg.prototype._preselect=function(e){var t=this._getCurrentResult();if(e!==t){t&&X(t).remove(Tg.RESULT_SELECTED_CLASS);var n=V(e,Tg.RESULT_ID_ATTRIBUTE),i=this._results[n].element;X(e).add(Tg.RESULT_SELECTED_CLASS),this._resetOverlay(i),this._canvas.scrollToElement(i,{top:400}),this._selection.select(i),this._eventBus.fire("searchPad.preselected",i)}},Tg.prototype._select=function(e){var t=V(e,Tg.RESULT_ID_ATTRIBUTE),n=this._results[t].element;this.close(),this._resetOverlay(),this._canvas.scrollToElement(n,{top:400}),this._selection.select(n),this._eventBus.fire("searchPad.selected",n)},Tg.prototype._resetOverlay=function(e){if(this._overlayId&&this._overlays.remove(this._overlayId),e){var t=function(e){var t=6,n=e.width+2*t,i=e.height+2*t,r=["width: "+n+"px","height: "+i+"px"].join("; ");return{position:{bottom:i-t,right:n-t},show:!0,html:'<div style="'+r+'" class="'+Tg.OVERLAY_CLASS+'"></div>'}}(lt(e));this._overlayId=this._overlays.add(e,t)}},Tg.CONTAINER_SELECTOR=".djs-search-container",Tg.INPUT_SELECTOR=".djs-search-input input",Tg.RESULTS_CONTAINER_SELECTOR=".djs-search-results",Tg.RESULT_SELECTOR=".djs-search-result",Tg.RESULT_SELECTED_CLASS="djs-search-result-selected",Tg.RESULT_SELECTED_SELECTOR="."+Tg.RESULT_SELECTED_CLASS,Tg.RESULT_ID_ATTRIBUTE="data-result-id",Tg.RESULT_HIGHLIGHT_CLASS="djs-search-highlight",Tg.OVERLAY_CLASS="djs-search-overlay",Tg.BOX_HTML='<div class="djs-search-container djs-draggable djs-scrollable"><div class="djs-search-input"><input type="text"/></div><div class="djs-search-results"></div></div>',Tg.RESULT_HTML='<div class="djs-search-result"></div>',Tg.RESULT_PRIMARY_HTML='<div class="djs-search-result-primary"></div>',Tg.RESULT_SECONDARY_HTML='<p class="djs-search-result-secondary"></p>';var kg={__depends__:[$o,Do],searchPad:["type",Tg]};function Og(e,t,n){this._elementRegistry=e,this._canvas=n,t.registerProvider(this)}function Dg(e){return y(e,(function(e){return!!e.matched})).length>0}function zg(e,t){var n=[],i=e;if(!e)return n;e=e.toLowerCase(),t=t.toLowerCase();var r=e.indexOf(t);return r>-1?(0!==r&&n.push({normal:i.substr(0,r)}),n.push({matched:i.substr(r,t.length)}),t.length+r<e.length&&n.push({normal:i.substr(t.length+r,e.length)})):n.push({normal:i}),n}Og.$inject=["elementRegistry","searchPad","canvas"],Og.prototype.find=function(e){var t=this._canvas.getRootElement(),n=this._elementRegistry.filter((function(e){return!e.labelTarget}));return n=y(n,(function(e){return e!==t})),n=k(n=y(n=S(n,(function(t){return{primaryTokens:zg(Nr(t),e),secondaryTokens:zg(t.id,e),element:t}})),(function(e){return Dg(e.primaryTokens)||Dg(e.secondaryTokens)})),(function(e){return Nr(e.element)+e.element.id}))};var Ng={__depends__:[kg],__init__:["bpmnSearch"],bpmnSearch:["type",Og]};function Bg(e){Tr.call(this,e)}n(Bg,Tr),Bg.Viewer=ua,Bg.NavigatedViewer=Fa,Bg.prototype.createDiagram=pr((function(){return this.importXML('<?xml version="1.0" encoding="UTF-8"?><bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" targetNamespace="http://bpmn.io/schema/bpmn" id="Definitions_1"><bpmn:process id="Process_1" isExecutable="false"><bpmn:startEvent id="StartEvent_1"/></bpmn:process><bpmndi:BPMNDiagram id="BPMNDiagram_1"><bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"><bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"><dc:Bounds height="36.0" width="36.0" x="173.0" y="102.0"/></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn:definitions>')})),Bg.prototype._interactionModules=[Ra,za,Ya,$a],Bg.prototype._modelingModules=[ts,ms,As,_s,xc,Pc,Tc,gp,Ml,sl,wp,Mp,Hp,Gp,Up,eu,bu,Av,Iv,sg,lg,uu,Mg,Ng],Bg.prototype._modules=[].concat(ua.prototype._modules,Bg.prototype._interactionModules,Bg.prototype._modelingModules);var Lg={min:.2,max:4};function jg(e,t,n,i,r){var o=this;function a(e){o._state._svgClientRect&&!Vg(o._state._svgClientRect)||(o._state._svgClientRect=o._svg.getBoundingClientRect()),$g(Ig({x:e.clientX-o._state._svgClientRect.left,y:e.clientY-o._state._svgClientRect.top},o._svg,o._lastViewbox),o._canvas),o._update()}function s(e){return function(t){o._state._svgClientRect&&!Vg(o._state._svgClientRect)||(o._state._svgClientRect=o._svg.getBoundingClientRect()),e&&a(t);var n=Ig({x:t.clientX-o._state._svgClientRect.left,y:t.clientY-o._state._svgClientRect.top},o._svg,o._lastViewbox),r=i.viewbox(),s=function(e,t){var n={x:t.x+t.width/2,y:t.y+t.height/2};return{x:e.x-n.x,y:e.y-n.y}}(n,r),p=o._viewportDom.getBoundingClientRect(),u={x:t.clientX-p.left+1,y:t.clientY-p.top+1};$(o._state,{cachedViewbox:r,initialDragPosition:{x:t.clientX,y:t.clientY},isDragging:!0,offsetViewport:s,offsetViewportDom:u,viewportClientRect:o._viewport.getBoundingClientRect(),parentClientRect:o._parent.getBoundingClientRect()}),re.bind(document,"mousemove",c),re.bind(document,"mouseup",l)}}function c(e){if(o._state.isDragging){o._state._svgClientRect&&!Vg(o._state._svgClientRect)||(o._state._svgClientRect=o._svg.getBoundingClientRect());var t=o._state.offsetViewportDom,n=o._state.viewportClientRect,i=o._state.parentClientRect;$(o._viewportDom.style,{top:e.clientY-t.y-i.top+"px",left:e.clientX-t.x-i.left+"px"});var r=Wg(i,{top:e.clientY-t.y-i.top,left:e.clientX-t.x-i.left,width:n.width,height:n.height});$(o._overlay.style,{clipPath:r});var a=Ig({x:e.clientX-o._state._svgClientRect.left,y:e.clientY-o._state._svgClientRect.top},o._svg,o._lastViewbox);$g({x:a.x-o._state.offsetViewport.x,y:a.y-o._state.offsetViewport.y},o._canvas)}}function l(e){o._state.isDragging&&(o._state.initialDragPosition.x===e.clientX&&o._state.initialDragPosition.y===e.clientY&&a(e),o._update(),$(o._state,{cachedViewbox:null,initialDragPosition:null,isDragging:!1,offsetViewport:null,offsetViewportDom:null}),re.unbind(document,"mousemove",c),re.unbind(document,"mouseup",l))}this._canvas=i,this._elementRegistry=r,this._eventBus=n,this._injector=t,this._state={isOpen:void 0,isDragging:!1,initialDragPosition:null,offsetViewport:null,cachedViewbox:null,dragger:null,svgClientRect:null,parentClientRect:null,zoomDelta:0},this._init(),this.toggle(e&&e.open||!1),re.bind(this._svg,"click",(function(e){e.preventDefault(),e.stopPropagation(),a(e)})),re.bind(this._viewportDom,"mousedown",s(!1)),re.bind(this._svg,"mousedown",s(!0)),re.bind(this._parent,"wheel",(function(e){if(e.preventDefault(),e.stopPropagation(),e.ctrlKey&&(o._state._svgClientRect&&!Vg(o._state._svgClientRect)||(o._state._svgClientRect=o._svg.getBoundingClientRect()),t=e,n=o._state._svgClientRect,t.x>n.left&&t.x<n.left+n.width&&t.y>n.top&&t.y<n.top+n.height)){var t,n,r=0===e.deltaMode?.02:.32,a=Math.sqrt(Math.pow(e.deltaY,2)+Math.pow(e.deltaX,2))*Gg(e.deltaY)*-r;if(o._state.zoomDelta+=a,Math.abs(o._state.zoomDelta)>.1){var s=a>0?1:-1,c=Math.log(i.zoom())/Math.log(10),l=function(e,t){var n=Math.log(e.min)/Math.log(10),i=Math.log(e.max)/Math.log(10);return(Math.abs(n)+Math.abs(i))/t}(Lg,20),p=Math.round(c/l)*l;p+=l*s;var u=Math.pow(10,p);i.zoom(function(e,t){return Math.max(e.min,Math.min(e.max,t))}(Lg,u),h),o._state.zoomDelta=0;var h=Ig({x:e.clientX-o._state._svgClientRect.left,y:e.clientY-o._state._svgClientRect.top},o._svg,o._lastViewbox);$g(h,o._canvas),o._update()}}})),re.bind(this._toggle,"click",(function(e){e.preventDefault(),e.stopPropagation(),o.toggle()})),n.on(["shape.added","connection.added"],(function(e){var t=e.element;o._addElement(t),o._update()})),n.on(["shape.removed","connection.removed"],(function(e){var t=e.element;o._removeElement(t),o._update()})),n.on("elements.changed",250,(function(e){e.elements.forEach((function(e){o._updateElement(e)})),o._update()})),n.on("element.updateId",(function(e){var t=e.element,n=e.newId;o._updateElementId(t,n)})),n.on("canvas.viewbox.changed",(function(){o._state.isDragging||o._update()})),n.on("canvas.resized",(function(){document.body.contains(o._parent)&&(o._state.isDragging||o._update(),o._state._svgClientRect=o._svg.getBoundingClientRect())})),n.on("root.set",(function(e){o._clear(),e.element.children.forEach((function(e){o._addElement(e)})),o._update()}))}function Ig(e,t,n){var i=t.getBoundingClientRect(),r=function(e,t){var n=e.width/e.height,i=$({},{x:e.x,y:e.y,width:e.width,height:e.height});if(n>t){var r=i.width*(1/t);$(i,{y:i.y-(r-i.height)/2,height:r})}else if(n<t){var o=i.height*t;$(i,{x:i.x-(o-i.width)/2,width:o})}return i}(n,i.width/i.height);return{x:Fg(e.x,0,i.width,r.x,r.x+r.width),y:Fg(e.y,0,i.height,r.y,r.y+r.height)}}function $g(e,t){var n=t.viewbox(),i=n.width,r=n.height;t.viewbox({x:e.x-i/2,y:e.y-r/2,width:i,height:r})}function Fg(e,t,n,i,r){return(e-t)*(r-i)/(n-t)+i}function Hg(e,t,n){var i=function(e){var t=ue(".children",e);t||fe(e,t=ke("g",{class:"children"}));return t}(t),r=[].slice.call(i.childNodes)[n];r?t.insertBefore(e,r.nextSibling):t.appendChild(e)}function Vg(e){return 0===e.width&&0===e.height}jg.$inject=["config.minimap","injector","eventBus","canvas","elementRegistry"],jg.prototype._init=function(){var e=this._canvas.getContainer(),t=this._parent=document.createElement("div");X(t).add("djs-minimap"),e.appendChild(t);var n=this._toggle=document.createElement("div");X(n).add("toggle"),t.appendChild(n);var i=this._map=document.createElement("div");X(i).add("map"),t.appendChild(i);var r=this._svg=ke("svg");ye(r,{width:"100%",height:"100%"}),fe(i,r),fe(r,this._elementsGroup=ke("g"));var o=this._viewportGroup=ke("g");fe(r,o);var a=this._viewport=ke("rect");Ee(a).add("viewport"),fe(o,a),re.bind(t,"mousedown",(function(e){e.stopPropagation()}));var s=this._viewportDom=document.createElement("div");X(s).add("viewport-dom"),this._parent.appendChild(s);var c=this._overlay=document.createElement("div");X(c).add("overlay"),this._parent.appendChild(c)},jg.prototype._update=function(){var e=this._canvas.viewbox(),t=e.inner,n=e.outer;if(qg(e)){var i,r,o,a,s=n.width-t.width,c=n.height-t.height;t.width<n.width?(i=t.x-s/2,o=n.width,t.x+t.width<n.width&&(i=Math.min(0,t.x))):(i=t.x,o=t.width),t.height<n.height?(r=t.y-c/2,a=n.height,t.y+t.height<n.height&&(r=Math.min(0,t.y))):(r=t.y,a=t.height),i-=50,r-=50,o+=100,a+=100,this._lastViewbox={x:i,y:r,width:o,height:a},ye(this._svg,{viewBox:i+", "+r+", "+o+", "+a}),ye(this._viewport,{x:e.x,y:e.y,width:e.width,height:e.height});var l=this._state._parentClientRect=this._parent.getBoundingClientRect(),p=this._viewport.getBoundingClientRect(),u={top:p.top-l.top,left:p.left-l.left,width:p.width,height:p.height};$(this._viewportDom.style,{top:u.top+"px",left:u.left+"px",width:u.width+"px",height:u.height+"px"});var h=Wg(l,u);$(this._overlay.style,{clipPath:h})}},jg.prototype.open=function(){$(this._state,{isOpen:!0}),X(this._parent).add("open");var e=this._injector.get("translate",!1)||function(e){return e};V(this._toggle,"title",e("Close minimap")),this._update(),this._eventBus.fire("minimap.toggle",{open:!0})},jg.prototype.close=function(){$(this._state,{isOpen:!1}),X(this._parent).remove("open");var e=this._injector.get("translate",!1)||function(e){return e};V(this._toggle,"title",e("Open minimap")),this._eventBus.fire("minimap.toggle",{open:!1})},jg.prototype.toggle=function(e){var t=this.isOpen();void 0===e&&(e=!t),e!=t&&(e?this.open():this.close())},jg.prototype.isOpen=function(){return this._state.isOpen},jg.prototype._updateElement=function(e){try{void 0!==e.parent&&null!==e.parent&&(this._removeElement(e),this._addElement(e))}catch(e){console.warn("Minimap#_updateElement errored",e)}},jg.prototype._updateElementId=function(e,t){try{var n=ue("#"+Uo(e.id),this._elementsGroup);n&&(n.id=t)}catch(e){console.warn("Minimap#_updateElementId errored",e)}},jg.prototype._addElement=function(e){var t=this;if(this._removeElement(e),this._canvas.findRoot(e)===this._canvas.getRootElement()){var n,i,r,o=this._createElement(e),a=ue("#"+Uo(e.parent.id),this._elementsGroup);if(o){var s=function(e,t){var n=ue(".djs-children",t.parentNode);if(!n)return;var i=[].slice.call(n.childNodes),r=-1;return i.forEach((function(t,n){ue(".djs-element",t)===e&&(r=n)})),r}(this._elementRegistry.getGraphics(e),this._elementRegistry.getGraphics(e.parent));return"undefined"!==s&&a?a.childNodes.length>s?Hg(o,a,s):Hg(o,a,a.childNodes.length-1):this._elementsGroup.appendChild(o),!function(e){return e.waypoints}(e)?(i=e.x,r=e.y,a&&(i-=(n=e.parent).x,r-=n.y),ye(o,{transform:"translate("+i+" "+r+")"})):(i=0,r=0,void 0!==(n=e.parent).x&&void 0!==n.y&&(i=-n.x,r=-n.y),ye(o,{transform:"translate("+i+" "+r+")"})),e.children&&e.children.length&&e.children.forEach((function(e){t._addElement(e)})),o}}},jg.prototype._removeElement=function(e){var t=this._svg.getElementById(e.id);t&&Ce(t)},jg.prototype._createElement=function(e){var t,n=this._elementRegistry.getGraphics(e);if(n&&(t=function(e){return e.childNodes[0]}(n))){var i=Pe(t);return ye(i,{id:e.id}),i}},jg.prototype._clear=function(){Re(this._elementsGroup)};var Gg=Math.sign||function(e){return e>=0?1:-1};function Wg(e,t){return"polygon("+[Ug(t.left,t.top),Ug(t.left+t.width,t.top),Ug(t.left+t.width,t.top+t.height),Ug(t.left,t.top+t.height),Ug(t.left,e.height),Ug(e.width,e.height),Ug(e.width,0),Ug(0,0),Ug(0,e.height),Ug(t.left,e.height)].join(", ")+")"}function Ug(e,t){return e+"px "+t+"px"}function qg(e){return w(e,(function(e){return h(e)?qg(e):d(e)&&isFinite(e)}))}var Xg={__init__:["minimap"],minimap:["type",jg]};function Yg(e,t){var n,i,r=(e=e||{}).borderColor||"rgba(0,0,0,0.1)",o=e.crossColor||"#CCC",a=-1;fe(t.getLayer("djs-origin",-1),n=Qg("g",{"pointer-events":"none"})),!1!==e.showBorder&&fe(n,Qg("path",{class:Zg("border"),d:Kg(["M",-22,a,"H",-1e3,"M",22,a,"H",6e3,"M",a,-22,"V",-1e3,"M",a,22,"V",3e3]),fill:"none",stroke:r,"stroke-width":"2px","stroke-dasharray":"6, 6","shape-rendering":"crispedges"})),fe(n,Qg("path",{d:Kg(["M",-15,a,"H",15,"M",a,-15,"V",15]),class:Zg("cross"),fill:"none",stroke:o,"stroke-width":"2px","stroke-linecap":"round"})),(i=Qg("text",{x:-40,y:-10,fill:o,class:Zg("label")})).textContent="(0, 0)",fe(n,i)}function Kg(e){return e.join(" ")}function Zg(e){return"djs-origin-"+e}function Qg(e,t){var n=ke(e);return ye(n,t),n}Yg.$inject=["config.origin","canvas"];var Jg={__init__:[Yg]},ey={offset:{x:150,y:75},tolerance:50,alignOnSave:!0};function ty(e,t,n,i,r,o){function a(e,n){var i=n.offset,r=n.tolerance,o={};return["x","y"].forEach((function(n){var a=-e[n]+i[n],s=t.get("gridSnapping",!1);s&&(a=function(e,t,n){n||(n="round");return Math[n](e/t)*t}(a,s.getGridSpacing())),o[n]=Math.abs(a)<r?0:a})),o}function s(){var t=r.viewbox().inner,n=r.getRootElement().children;if(n.length){var o=a(t,e);0===o.x&&0===o.y||i.execute("elements.alignToOrigin",{elements:n,delta:o})}}function c(e){return function(t){n.once("commandStack.changed",(function(){var n=t.delta,i=r.viewbox().scale;r.scroll({dx:e*n.x*i,dy:e*n.y*i})}))}}var l,p,u;e=function(e){var t=$({},ey,e||{});return d(t.offset)&&(t.offset={x:t.offset,y:t.offset}),t}(e),i.register("elements.alignToOrigin",{preExecute:function(e){var t=e.delta,n=e.elements;o.moveElements(n,t)},execute:c(-1),revert:c(1)}),e.alignOnSave&&(l=t.get("_parent",!1),p=n,((u=l&&l._eventBus)||p).on("saveXML.start",1250,s),u&&p.on("diagram.destroy",(function(){u.off("saveXML.start",s)}))),this.align=s,this.computeAdjustment=a,this._config=e}ty.$inject=["config.alignToOrigin","injector","eventBus","commandStack","canvas","modeling"];var ny={__init__:["alignToOrigin"],alignToOrigin:["type",ty]};function iy(e){function t(e){if(!e.labelTarget){var t=vr(e);mr(t,"bpmn:Participant")&&(t=t.processRef),mr(t,"bpmn:Process")&&(t.isExecutable=!!t.isExecutable)}}e.on(["shape.added","root.added"],(function(e){t(e.element)})),e.on("elements.changed",(function(e){e.elements.forEach((function(e){t(e)}))}))}iy.$inject=["eventBus"];var ry,oy,ay,sy,cy,ly={__init__:[iy]},py={},uy=[],hy=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function dy(e,t){for(var n in t)e[n]=t[n];return e}function my(e){var t=e.parentNode;t&&t.removeChild(e)}function fy(e,t,n){var i,r,o,a=arguments,s={};for(o in t)"key"==o?i=t[o]:"ref"==o?r=t[o]:s[o]=t[o];if(arguments.length>3)for(n=[n],o=3;o<arguments.length;o++)n.push(a[o]);if(null!=n&&(s.children=n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return vy(e,s,i,r,null)}function vy(e,t,n,i,r){var o={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++ry.__v:r};return null!=ry.vnode&&ry.vnode(o),o}function gy(e){return e.children}function yy(e,t){this.props=e,this.context=t}function by(e,t){if(null==t)return e.__?by(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?by(e):null}function _y(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return _y(e)}}function xy(e){(!e.__d&&(e.__d=!0)&&oy.push(e)&&!wy.__r++||sy!==ry.debounceRendering)&&((sy=ry.debounceRendering)||ay)(wy)}function wy(){for(var e;wy.__r=oy.length;)e=oy.sort((function(e,t){return e.__v.__b-t.__v.__b})),oy=[],e.some((function(e){var t,n,i,r,o,a;e.__d&&(o=(r=(t=e).__v).__e,(a=t.__P)&&(n=[],(i=dy({},r)).__v=r.__v+1,ky(a,r,i,t.__n,void 0!==a.ownerSVGElement,null!=r.__h?[o]:null,n,null==o?by(r):o,r.__h),Oy(n,r),r.__e!=o&&_y(r)))}))}function Ey(e,t,n,i,r,o,a,s,c,l){var p,u,h,d,m,f,v,g=i&&i.__k||uy,y=g.length;for(n.__k=[],p=0;p<t.length;p++)if(null!=(d=n.__k[p]=null==(d=t[p])||"boolean"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?vy(null,d,null,null,d):Array.isArray(d)?vy(gy,{children:d},null,null,null):d.__b>0?vy(d.type,d.props,d.key,null,d.__v):d)){if(d.__=n,d.__b=n.__b+1,null===(h=g[p])||h&&d.key==h.key&&d.type===h.type)g[p]=void 0;else for(u=0;u<y;u++){if((h=g[u])&&d.key==h.key&&d.type===h.type){g[u]=void 0;break}h=null}ky(e,d,h=h||py,r,o,a,s,c,l),m=d.__e,(u=d.ref)&&h.ref!=u&&(v||(v=[]),h.ref&&v.push(h.ref,null,d),v.push(u,d.__c||m,d)),null!=m?(null==f&&(f=m),"function"==typeof d.type&&null!=d.__k&&d.__k===h.__k?d.__d=c=Sy(d,c,e):c=Ry(e,d,h,g,m,c),l||"option"!==n.type?"function"==typeof n.type&&(n.__d=c):e.value=""):c&&h.__e==c&&c.parentNode!=e&&(c=by(h))}for(n.__e=f,p=y;p--;)null!=g[p]&&("function"==typeof n.type&&null!=g[p].__e&&g[p].__e==n.__d&&(n.__d=by(i,p+1)),Ny(g[p],g[p]));if(v)for(p=0;p<v.length;p++)zy(v[p],v[++p],v[++p])}function Sy(e,t,n){var i,r;for(i=0;i<e.__k.length;i++)(r=e.__k[i])&&(r.__=e,t="function"==typeof r.type?Sy(r,t,n):Ry(n,r,r,e.__k,r.__e,t));return t}function Cy(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){Cy(e,t)})):t.push(e)),t}function Ry(e,t,n,i,r,o){var a,s,c;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||r!=o||null==r.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(r),a=null;else{for(s=o,c=0;(s=s.nextSibling)&&c<i.length;c+=2)if(s==r)break e;e.insertBefore(r,o),a=o}return void 0!==a?a:r.nextSibling}function Py(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||hy.test(t)?n:n+"px"}function My(e,t,n,i,r){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||Py(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||Py(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?i||e.addEventListener(t,o?Ay:Ty,o):e.removeEventListener(t,o?Ay:Ty,o);else if("dangerouslySetInnerHTML"!==t){if(r)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function Ty(e){this.l[e.type+!1](ry.event?ry.event(e):e)}function Ay(e){this.l[e.type+!0](ry.event?ry.event(e):e)}function ky(e,t,n,i,r,o,a,s,c){var l,p,u,h,d,m,f,v,g,y,b,_=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(c=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(l=ry.__b)&&l(t);try{e:if("function"==typeof _){if(v=t.props,g=(l=_.contextType)&&i[l.__c],y=l?g?g.props.value:l.__:i,n.__c?f=(p=t.__c=n.__c).__=p.__E:("prototype"in _&&_.prototype.render?t.__c=p=new _(v,y):(t.__c=p=new yy(v,y),p.constructor=_,p.render=By),g&&g.sub(p),p.props=v,p.state||(p.state={}),p.context=y,p.__n=i,u=p.__d=!0,p.__h=[]),null==p.__s&&(p.__s=p.state),null!=_.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=dy({},p.__s)),dy(p.__s,_.getDerivedStateFromProps(v,p.__s))),h=p.props,d=p.state,u)null==_.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==_.getDerivedStateFromProps&&v!==h&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(v,y),!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(v,p.__s,y)||t.__v===n.__v){p.props=v,p.state=p.__s,t.__v!==n.__v&&(p.__d=!1),p.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),p.__h.length&&a.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(v,p.__s,y),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(h,d,m)}))}p.context=y,p.props=v,p.state=p.__s,(l=ry.__r)&&l(t),p.__d=!1,p.__v=t,p.__P=e,l=p.render(p.props,p.state,p.context),p.state=p.__s,null!=p.getChildContext&&(i=dy(dy({},i),p.getChildContext())),u||null==p.getSnapshotBeforeUpdate||(m=p.getSnapshotBeforeUpdate(h,d)),b=null!=l&&l.type===gy&&null==l.key?l.props.children:l,Ey(e,Array.isArray(b)?b:[b],t,n,i,r,o,a,s,c),p.base=t.__e,t.__h=null,p.__h.length&&a.push(p),f&&(p.__E=p.__=null),p.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Dy(n.__e,t,n,i,r,o,a,c);(l=ry.diffed)&&l(t)}catch(e){t.__v=null,(c||null!=o)&&(t.__e=s,t.__h=!!c,o[o.indexOf(s)]=null),ry.__e(e,t,n)}}function Oy(e,t){ry.__c&&ry.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){ry.__e(e,t.__v)}}))}function Dy(e,t,n,i,r,o,a,s){var c,l,p,u,h=n.props,d=t.props,m=t.type,f=0;if("svg"===m&&(r=!0),null!=o)for(;f<o.length;f++)if((c=o[f])&&(c===e||(m?c.localName==m:3==c.nodeType))){e=c,o[f]=null;break}if(null==e){if(null===m)return document.createTextNode(d);e=r?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,d.is&&d),o=null,s=!1}if(null===m)h===d||s&&e.data===d||(e.data=d);else{if(o=o&&uy.slice.call(e.childNodes),l=(h=n.props||py).dangerouslySetInnerHTML,p=d.dangerouslySetInnerHTML,!s){if(null!=o)for(h={},u=0;u<e.attributes.length;u++)h[e.attributes[u].name]=e.attributes[u].value;(p||l)&&(p&&(l&&p.__html==l.__html||p.__html===e.innerHTML)||(e.innerHTML=p&&p.__html||""))}if(function(e,t,n,i,r){var o;for(o in n)"children"===o||"key"===o||o in t||My(e,o,null,n[o],i);for(o in t)r&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||My(e,o,t[o],n[o],i)}(e,d,h,r,s),p)t.__k=[];else if(f=t.props.children,Ey(e,Array.isArray(f)?f:[f],t,n,i,r&&"foreignObject"!==m,o,a,e.firstChild,s),null!=o)for(f=o.length;f--;)null!=o[f]&&my(o[f]);s||("value"in d&&void 0!==(f=d.value)&&(f!==e.value||"progress"===m&&!f)&&My(e,"value",f,h.value,!1),"checked"in d&&void 0!==(f=d.checked)&&f!==e.checked&&My(e,"checked",f,h.checked,!1))}return e}function zy(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){ry.__e(e,n)}}function Ny(e,t,n){var i,r,o;if(ry.unmount&&ry.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||zy(i,null,t)),n||"function"==typeof e.type||(n=null!=(r=e.__e)),e.__e=e.__d=void 0,null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){ry.__e(e,t)}i.base=i.__P=null}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&Ny(i[o],t,n);null!=r&&my(r)}function By(e,t,n){return this.constructor(e,n)}function Ly(e,t,n){var i,r,o;ry.__&&ry.__(e,t),r=(i="function"==typeof n)?null:n&&n.__k||t.__k,o=[],ky(t,e=(!i&&n||t).__k=fy(gy,null,[e]),r||py,py,void 0!==t.ownerSVGElement,!i&&n?[n]:r?null:t.firstChild?uy.slice.call(t.childNodes):null,o,!i&&n?n:r?r.__e:t.firstChild,i),Oy(o,e)}function jy(e,t){var n={__c:t="__cC"+cy++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,i;return this.getChildContext||(n=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(xy)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}ry={__e:function(e,t){for(var n,i,r;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&null!=i.getDerivedStateFromError&&(n.setState(i.getDerivedStateFromError(e)),r=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),r=n.__d),r)return n.__E=n}catch(t){e=t}throw e},__v:0},yy.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=dy({},this.state),"function"==typeof e&&(e=e(dy({},n),this.props)),e&&dy(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),xy(this))},yy.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),xy(this))},yy.prototype.render=gy,oy=[],ay="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,wy.__r=0,cy=0;var Iy,$y,Fy,Hy=0,Vy=[],Gy=ry.__b,Wy=ry.__r,Uy=ry.diffed,qy=ry.__c,Xy=ry.unmount;function Yy(e,t){ry.__h&&ry.__h($y,e,Hy||t),Hy=0;var n=$y.__H||($y.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Ky(e){return Hy=1,Zy(sb,e)}function Zy(e,t,n){var i=Yy(Iy++,2);return i.t=e,i.__c||(i.__=[n?n(t):sb(void 0,t),function(e){var t=i.t(i.__[0],e);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=$y),i.__}function Qy(e,t){var n=Yy(Iy++,3);!ry.__s&&ab(n.__H,t)&&(n.__=e,n.__H=t,$y.__H.__h.push(n))}function Jy(e){return Hy=5,eb((function(){return{current:e}}),[])}function eb(e,t){var n=Yy(Iy++,7);return ab(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function tb(e){var t=$y.context[e.__c],n=Yy(Iy++,9);return n.__c=e,t?(null==n.__&&(n.__=!0,t.sub($y)),t.props.value):e.__}function nb(){Vy.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(rb),e.__H.__h.forEach(ob),e.__H.__h=[]}catch(t){e.__H.__h=[],ry.__e(t,e.__v)}})),Vy=[]}ry.__b=function(e){$y=null,Gy&&Gy(e)},ry.__r=function(e){Wy&&Wy(e),Iy=0;var t=($y=e.__c).__H;t&&(t.__h.forEach(rb),t.__h.forEach(ob),t.__h=[])},ry.diffed=function(e){Uy&&Uy(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==Vy.push(t)&&Fy===ry.requestAnimationFrame||((Fy=ry.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(i),ib&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);ib&&(t=requestAnimationFrame(n))})(nb)),$y=void 0},ry.__c=function(e,t){t.some((function(e){try{e.__h.forEach(rb),e.__h=e.__h.filter((function(e){return!e.__||ob(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],ry.__e(n,e.__v)}})),qy&&qy(e,t)},ry.unmount=function(e){Xy&&Xy(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(rb)}catch(e){ry.__e(e,t.__v)}};var ib="function"==typeof requestAnimationFrame;function rb(e){var t=$y;"function"==typeof e.__c&&e.__c(),$y=t}function ob(e){var t=$y;e.__c=e.__(),$y=t}function ab(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function sb(e,t){return"function"==typeof t?t(e):t}var cb=Object.prototype.toString,lb=Object.prototype.hasOwnProperty;function pb(e){return void 0===e}function ub(e){return"[object Array]"===cb.call(e)}function hb(e){var t=cb.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function db(e,t){return lb.call(e,t)}function mb(e,t){var n;return t=yb(t),fb(e,(function(e,i){if(t(e,i))return n=e,!1})),n}function fb(e,t){var n;if(!pb(e)){var i=ub(e)?_b:bb;for(var r in e)if(db(e,r)&&!1===t(n=e[r],i(r)))return n}}function vb(e,t){return pb(e)?[]:(function(e){if(!ub(e))throw new Error("must supply array")}(e),t=yb(t),e.filter((function(e,n){return!t(e,n)})))}function gb(e,t){t=function(e){return hb(e)?e:function(t){return t[e]}}(t);var n=[];return fb(e,(function(e,i){for(var r=t(e,i),o={d:r,v:e},a=0;a<n.length;a++){if(r<n[a].d)return void n.splice(a,0,o)}n.push(o)})),function(e,t){var n=[];return fb(e,(function(e,i){n.push(t(e,i))})),n}(n,(function(e){return e.v}))}function yb(e){return hb(e)?e:function(t){return t===e}}function bb(e){return e}function _b(e){return Number(e)}
9
+ /*!
10
+ Copyright (c) 2018 Jed Watson.
11
+ Licensed under the MIT License (MIT), see
12
+ http://jedwatson.github.io/classnames
13
+ */var xb=t((function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],i=0;i<arguments.length;i++){var r=arguments[i];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var a=n.apply(null,r);a&&e.push(a)}}else if("object"===o)if(r.toString===Object.prototype.toString)for(var s in r)t.call(r,s)&&r[s]&&e.push(s);else e.push(r.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}));function wb(e,t,n,i,r){var o={};for(var a in t)"ref"!=a&&(o[a]=t[a]);var s,c,l={type:e,props:o,key:n,ref:t&&t.ref,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:++ry.__v,__source:i,__self:r};if("function"==typeof e&&(s=e.defaultProps))for(c in s)void 0===o[c]&&(o[c]=s[c]);return ry.vnode&&ry.vnode(l),l}function Eb(e,t){for(var n in t)e[n]=t[n];return e}function Sb(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var i in t)if("__source"!==i&&e[i]!==t[i])return!0;return!1}function Cb(e){this.props=e}(Cb.prototype=new yy).isPureReactComponent=!0,Cb.prototype.shouldComponentUpdate=function(e,t){return Sb(this.props,e)||Sb(this.state,t)};var Rb=ry.__b;ry.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Rb&&Rb(e)};"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref");var Pb=ry.__e;ry.__e=function(e,t,n){if(e.then)for(var i,r=t;r=r.__;)if((i=r.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Pb(e,t,n)};var Mb=ry.unmount;function Tb(){this.__u=0,this.t=null,this.__b=null}function Ab(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function kb(){this.u=null,this.o=null}ry.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Mb&&Mb(e)},(Tb.prototype=new yy).__c=function(e,t){var n=t.__c,i=this;null==i.t&&(i.t=[]),i.t.push(n);var r=Ab(i.__v),o=!1,a=function(){o||(o=!0,n.__R=null,r?r(s):s())};n.__R=a;var s=function(){if(!--i.__u){if(i.state.__e){var e=i.state.__e;i.__v.__k[0]=function e(t,n,i){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,i)})),t.__c&&t.__c.__P===n&&(t.__e&&i.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=i)),t}(e,e.__c.__P,e.__c.__O)}var t;for(i.setState({__e:i.__b=null});t=i.t.pop();)t.forceUpdate()}},c=!0===t.__h;i.__u++||c||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(a,a)},Tb.prototype.componentWillUnmount=function(){this.t=[]},Tb.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,i){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=Eb({},t)).__c&&(t.__c.__P===i&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,i)}))),t}(this.__b,n,i.__O=i.__P)}this.__b=null}var r=t.__e&&fy(gy,null,e.fallback);return r&&(r.__h=null),[fy(gy,null,t.__e?null:e.children),r]};var Ob=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(kb.prototype=new yy).__e=function(e){var t=this,n=Ab(t.__v),i=t.o.get(e);return i[0]++,function(r){var o=function(){t.props.revealOrder?(i.push(r),Ob(t,e,i)):r()};n?n(o):o()}},kb.prototype.render=function(e){this.u=null,this.o=new Map;var t=Cy(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},kb.prototype.componentDidUpdate=kb.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Ob(e,n,t)}))};var Db="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,zb=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Nb=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};yy.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(yy.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Bb=ry.event;function Lb(){}function jb(){return this.cancelBubble}function Ib(){return this.defaultPrevented}ry.event=function(e){return Bb&&(e=Bb(e)),e.persist=Lb,e.isPropagationStopped=jb,e.isDefaultPrevented=Ib,e.nativeEvent=e};var $b={configurable:!0,get:function(){return this.class}},Fb=ry.vnode;ry.vnode=function(e){var t=e.type,n=e.props,i=n;if("string"==typeof t){for(var r in i={},n){var o=n[r];"value"===r&&"defaultValue"in n&&null==o||("defaultValue"===r&&"value"in n&&null==n.value?r="value":"download"===r&&!0===o?o="":/ondoubleclick/i.test(r)?r="ondblclick":/^onchange(textarea|input)/i.test(r+t)&&!Nb(n.type)?r="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(r)?r=r.toLowerCase():zb.test(r)?r=r.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===o&&(o=void 0),i[r]=o)}"select"==t&&i.multiple&&Array.isArray(i.value)&&(i.value=Cy(n.children).forEach((function(e){e.props.selected=-1!=i.value.indexOf(e.props.value)}))),"select"==t&&null!=i.defaultValue&&(i.value=Cy(n.children).forEach((function(e){e.props.selected=i.multiple?-1!=i.defaultValue.indexOf(e.props.value):i.defaultValue==e.props.value}))),e.props=i}t&&n.class!=n.className&&($b.enumerable="className"in n,null!=n.className&&(i.class=n.className),Object.defineProperty(i,"className",$b)),e.$$typeof=Db,Fb&&Fb(e)};var Hb=ry.__r;ry.__r=function(e){Hb&&Hb(e),e.__c};"object"==typeof performance&&"function"==typeof performance.now&&performance.now.bind(performance);var Vb=fy;function Gb(e){const{element:t,headerProvider:n}=e,{getElementLabel:i,getTypeLabel:r,getElementIcon:o}=n,a=i(t),s=r(t),c=o(t);return wb("div",{class:"bio-properties-panel-header",children:[wb("div",{class:"bio-properties-panel-header-icon",children:c&&wb(c,{width:"32",height:"32",viewBox:"0 0 32 32"})}),wb("div",{class:"bio-properties-panel-header-labels",children:[wb("div",{title:s,class:"bio-properties-panel-header-type",children:s}),i(t)?wb("div",{title:a,class:"bio-properties-panel-header-label",children:a}):null]})]})}function Wb(e){const t=Jy();return Qy((()=>{t.current=e})),t.current}const Ub=jy({description:{},getDescriptionForId:()=>{}}),qb=jy({layout:{},setLayout:()=>{},getLayoutForKey:()=>{},setLayoutForKey:()=>{}});var Xb=function(e){return wb("svg",{...e,children:wb("path",{fillRule:"evenodd",d:"m11.657 8-4.95 4.95a1 1 0 0 1-1.414-1.414L8.828 8 5.293 4.464A1 1 0 1 1 6.707 3.05L11.657 8z"})})};function Yb(e){const{id:t,entries:n=[],label:i}=e,[r,o]=function(e,t){const{getLayoutForKey:n,setLayoutForKey:i}=tb(qb),r=n(e,t),[o,a]=Ky(r);return[o,t=>{a(t),i(e,t)}]}(["groups",t,"open"],!1),[a,s]=Ky(!1);return Qy((()=>{const e=n.find((e=>{const{id:t,isEdited:n}=e,i=ue(`[data-entry-id="${t}"]`);if(!m(n)||!i)return!1;return n(ue(".bio-properties-panel-input",i))}));s(e)}),[n]),wb("div",{class:"bio-properties-panel-group","data-group-id":"group-"+t,children:[wb("div",{class:xb("bio-properties-panel-group-header",a?"":"empty",r?"open":""),onClick:()=>o(!r),children:[wb("div",{title:i,class:"bio-properties-panel-group-header-title",children:i}),wb("div",{class:"bio-properties-panel-group-header-buttons",children:[a&&wb(Kb,{}),wb("button",{title:"Toggle section",class:"bio-properties-panel-group-header-button bio-properties-panel-arrow",children:wb(Xb,{class:r?"bio-properties-panel-arrow-down":"bio-properties-panel-arrow-right"})})]})]}),wb("div",{class:xb("bio-properties-panel-group-entries",r?"open":""),children:n.map((e=>e.component))})]})}function Kb(){return wb("div",{title:"Section contains data",class:"bio-properties-panel-dot"})}Xb.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16"};const Zb={open:!0},Qb={};function Jb(e){const{element:t,headerProvider:n,groups:i,layoutConfig:r={},layoutChanged:o,descriptionConfig:a={},descriptionLoaded:s}=e,[u,h]=Ky((d=r,{...Zb,...d}));var d;Qy((()=>{"function"==typeof o&&o(u)}),[u,o]);const m={layout:u,setLayout:h,getLayoutForKey:(e,t)=>function(e,t,n){var i=e;return b(t,(function(e){if(p(i))return i=void 0,!1;i=i[e]})),c(i)?n:i}(u,e,t),setLayoutForKey:(e,t)=>{const n=$({},u);!function(e,t,n){var i=e;b(t,(function(e,r){if("__proto__"===e)throw new Error("illegal key: __proto__");var o=t[r+1],a=i[e];l(o)&&p(a)&&(a=i[e]=isNaN(+o)?{}:[]),c(o)?c(n)?delete i[e]:i[e]=n:i=a}))}(n,e,t),h(n)}},f=function(e){return{...Qb,...e}}(a);"function"==typeof s&&s(f);const v={description:f,getDescriptionForId:(e,t)=>f[e]&&f[e](t)};return t?wb(Ub.Provider,{value:v,children:wb(qb.Provider,{value:m,children:wb("div",{class:xb("bio-properties-panel",u.open?"open":""),children:[wb(Gb,{element:t,headerProvider:n}),wb("div",{class:"bio-properties-panel-scroll-container",children:i.map((e=>{const{component:n=Yb,id:i}=e;return wb(n,{element:t,...e},i)}))})]})})}):wb("div",{class:"bio-properties-panel-placeholder",children:"Select an element to edit its properties."})}function e_(e){const{element:t,forId:n,value:i}=e,r=function(e,t){const{getDescriptionForId:n}=tb(Ub);return n(e,t)}(n,t),o=i||r;if(o)return wb("div",{class:"bio-properties-panel-description",children:o})}function t_(e){const{id:t,label:n,onChange:i,disabled:r,value:o=!1}=e;return wb("div",{class:"bio-properties-panel-checkbox",children:[wb("input",{id:r_(t),name:t,type:"checkbox",class:"bio-properties-panel-input",onChange:({target:e})=>{i(e.checked)},checked:o,disabled:r}),wb("label",{for:r_(t),class:"bio-properties-panel-label",children:n})]})}function n_(e){const{element:t,id:n,description:i,label:r,getValue:o,setValue:a,disabled:s}=e;return wb("div",{class:"bio-properties-panel-entry bio-properties-panel-checkbox-entry","data-entry-id":n,children:[wb(t_,{id:n,label:r,onChange:a,value:o(t),disabled:s}),wb(e_,{forId:n,element:t,value:i})]})}function i_(e){return e&&!!e.checked}function r_(e){return`bio-properties-panel-${e}`}function o_(e){const{id:t,label:n,onChange:i,options:r=[],value:o,disabled:a}=e;return wb("div",{class:"bio-properties-panel-select",children:[wb("label",{for:c_(t),class:"bio-properties-panel-label",children:n}),wb("select",{id:c_(t),name:t,class:"bio-properties-panel-input",onInput:({target:e})=>{i(e.value)},value:o,disabled:a,children:r.map(((e,t)=>wb("option",{value:e.value,disabled:e.disabled,children:e.label},t)))})]})}function a_(e){const{element:t,id:n,description:i,label:r,getValue:o,setValue:a,getOptions:s,disabled:c}=e;return wb("div",{class:"bio-properties-panel-entry","data-entry-id":n,children:[wb(o_,{id:n,label:r,value:o(t),onChange:a,options:s(t),disabled:c}),wb(e_,{forId:n,element:t,value:i})]})}function s_(e){return e&&!!e.value}function c_(e){return`bio-properties-panel-${e}`}function l_(e){const{id:t,label:n,rows:i=2,debounce:r,onInput:o,value:a="",disabled:s,monospace:c}=e,l=eb((()=>r((({target:e})=>o(e.value.length?e.value:void 0)))),[o,r]);return wb("div",{class:"bio-properties-panel-textarea",children:[wb("label",{for:h_(t),class:"bio-properties-panel-label",children:n}),wb("textarea",{id:h_(t),name:t,spellCheck:"false",class:xb("bio-properties-panel-input",c?"bio-properties-panel-input-monospace":""),onInput:l,onFocus:e.onFocus,onBlur:e.onBlur,rows:i,value:a,disabled:s})]})}function p_(e){const{element:t,id:n,description:i,debounce:r,label:o,getValue:a,setValue:s,rows:c,monospace:l,disabled:p}=e;return wb("div",{class:"bio-properties-panel-entry","data-entry-id":n,children:[wb(l_,{id:n,label:o,value:a(t),onInput:s,rows:c,debounce:r,monospace:l,disabled:p}),wb(e_,{forId:n,element:t,value:i})]})}function u_(e){return e&&!!e.value}function h_(e){return`bio-properties-panel-${e}`}function d_(e){const{debounce:t,disabled:n=!1,id:i,label:r,onInput:o,value:a=""}=e,s=eb((()=>t((({target:e})=>o(e.value.length?e.value:void 0)))),[o,t]);return wb("div",{class:"bio-properties-panel-textfield",children:[wb("label",{for:v_(i),class:"bio-properties-panel-label",children:r}),wb("input",{id:v_(i),type:"text",name:i,spellCheck:"false",autoComplete:"off",disabled:n,class:"bio-properties-panel-input",onInput:s,onFocus:e.onFocus,onBlur:e.onBlur,value:a||""})]})}function m_(e){const{element:t,id:n,description:i,debounce:r,disabled:o,label:a,getValue:s,setValue:c,validate:l}=e,[p,u]=Ky(null),[h,d]=Ky(null);let m=s(t);const f=Wb(m);Qy((()=>{const e=l?l(m):null;u(e)}),[m]);return f===m&&p&&(m=h),wb("div",{class:xb("bio-properties-panel-entry",p?"has-error":""),"data-entry-id":n,children:[wb(d_,{id:n,label:a,value:m,onInput:e=>{const t=l?l(e):null;t?d(e):c(e),u(t)},debounce:r,disabled:o}),wb(e_,{forId:n,element:t,value:i}),p&&wb("div",{class:"bio-properties-panel-error",children:p})]})}function f_(e){return e&&!!e.value}function v_(e){return`bio-properties-panel-${e}`}function g_(e){return function(t){return!1!==e?L(t,d(e)?e:300):t}}g_.$inject=["config.debounceInput"];var y_={debounceInput:["factory",g_]};var b_={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16};var __="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{},x_=t((function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=b_,i=(t=e.exports={}).re=[],r=t.src=[],o=t.t={};let a=0;const s=(e,t,n)=>{const s=a++;__(s,t),o[e]=s,r[s]=t,i[s]=new RegExp(t,n?"g":void 0)};s("NUMERICIDENTIFIER","0|[1-9]\\d*"),s("NUMERICIDENTIFIERLOOSE","[0-9]+"),s("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),s("MAINVERSION",`(${r[o.NUMERICIDENTIFIER]})\\.(${r[o.NUMERICIDENTIFIER]})\\.(${r[o.NUMERICIDENTIFIER]})`),s("MAINVERSIONLOOSE",`(${r[o.NUMERICIDENTIFIERLOOSE]})\\.(${r[o.NUMERICIDENTIFIERLOOSE]})\\.(${r[o.NUMERICIDENTIFIERLOOSE]})`),s("PRERELEASEIDENTIFIER",`(?:${r[o.NUMERICIDENTIFIER]}|${r[o.NONNUMERICIDENTIFIER]})`),s("PRERELEASEIDENTIFIERLOOSE",`(?:${r[o.NUMERICIDENTIFIERLOOSE]}|${r[o.NONNUMERICIDENTIFIER]})`),s("PRERELEASE",`(?:-(${r[o.PRERELEASEIDENTIFIER]}(?:\\.${r[o.PRERELEASEIDENTIFIER]})*))`),s("PRERELEASELOOSE",`(?:-?(${r[o.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${r[o.PRERELEASEIDENTIFIERLOOSE]})*))`),s("BUILDIDENTIFIER","[0-9A-Za-z-]+"),s("BUILD",`(?:\\+(${r[o.BUILDIDENTIFIER]}(?:\\.${r[o.BUILDIDENTIFIER]})*))`),s("FULLPLAIN",`v?${r[o.MAINVERSION]}${r[o.PRERELEASE]}?${r[o.BUILD]}?`),s("FULL",`^${r[o.FULLPLAIN]}$`),s("LOOSEPLAIN",`[v=\\s]*${r[o.MAINVERSIONLOOSE]}${r[o.PRERELEASELOOSE]}?${r[o.BUILD]}?`),s("LOOSE",`^${r[o.LOOSEPLAIN]}$`),s("GTLT","((?:<|>)?=?)"),s("XRANGEIDENTIFIERLOOSE",`${r[o.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),s("XRANGEIDENTIFIER",`${r[o.NUMERICIDENTIFIER]}|x|X|\\*`),s("XRANGEPLAIN",`[v=\\s]*(${r[o.XRANGEIDENTIFIER]})(?:\\.(${r[o.XRANGEIDENTIFIER]})(?:\\.(${r[o.XRANGEIDENTIFIER]})(?:${r[o.PRERELEASE]})?${r[o.BUILD]}?)?)?`),s("XRANGEPLAINLOOSE",`[v=\\s]*(${r[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${r[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${r[o.XRANGEIDENTIFIERLOOSE]})(?:${r[o.PRERELEASELOOSE]})?${r[o.BUILD]}?)?)?`),s("XRANGE",`^${r[o.GTLT]}\\s*${r[o.XRANGEPLAIN]}$`),s("XRANGELOOSE",`^${r[o.GTLT]}\\s*${r[o.XRANGEPLAINLOOSE]}$`),s("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),s("COERCERTL",r[o.COERCE],!0),s("LONETILDE","(?:~>?)"),s("TILDETRIM",`(\\s*)${r[o.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",s("TILDE",`^${r[o.LONETILDE]}${r[o.XRANGEPLAIN]}$`),s("TILDELOOSE",`^${r[o.LONETILDE]}${r[o.XRANGEPLAINLOOSE]}$`),s("LONECARET","(?:\\^)"),s("CARETTRIM",`(\\s*)${r[o.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",s("CARET",`^${r[o.LONECARET]}${r[o.XRANGEPLAIN]}$`),s("CARETLOOSE",`^${r[o.LONECARET]}${r[o.XRANGEPLAINLOOSE]}$`),s("COMPARATORLOOSE",`^${r[o.GTLT]}\\s*(${r[o.LOOSEPLAIN]})$|^$`),s("COMPARATOR",`^${r[o.GTLT]}\\s*(${r[o.FULLPLAIN]})$|^$`),s("COMPARATORTRIM",`(\\s*)${r[o.GTLT]}\\s*(${r[o.LOOSEPLAIN]}|${r[o.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",s("HYPHENRANGE",`^\\s*(${r[o.XRANGEPLAIN]})\\s+-\\s+(${r[o.XRANGEPLAIN]})\\s*$`),s("HYPHENRANGELOOSE",`^\\s*(${r[o.XRANGEPLAINLOOSE]})\\s+-\\s+(${r[o.XRANGEPLAINLOOSE]})\\s*$`),s("STAR","(<|>)?=?\\s*\\*"),s("GTE0","^\\s*>=\\s*0.0.0\\s*$"),s("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}));const w_=["includePrerelease","loose","rtl"];var E_=e=>e?"object"!=typeof e?{loose:!0}:w_.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};const S_=/^[0-9]+$/,C_=(e,t)=>{const n=S_.test(e),i=S_.test(t);return n&&i&&(e=+e,t=+t),e===t?0:n&&!i?-1:i&&!n?1:e<t?-1:1};var R_={compareIdentifiers:C_,rcompareIdentifiers:(e,t)=>C_(t,e)};const{MAX_LENGTH:P_,MAX_SAFE_INTEGER:M_}=b_,{re:T_,t:A_}=x_,{compareIdentifiers:k_}=R_;class O_{constructor(e,t){if(t=E_(t),e instanceof O_){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>P_)throw new TypeError(`version is longer than ${P_} characters`);__("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?T_[A_.LOOSE]:T_[A_.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>M_||this.major<0)throw new TypeError("Invalid major version");if(this.minor>M_||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>M_||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<M_)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(__("SemVer.compare",this.version,this.options,e),!(e instanceof O_)){if("string"==typeof e&&e===this.version)return 0;e=new O_(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof O_||(e=new O_(e,this.options)),k_(this.major,e.major)||k_(this.minor,e.minor)||k_(this.patch,e.patch)}comparePre(e){if(e instanceof O_||(e=new O_(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],i=e.prerelease[t];if(__("prerelease compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return k_(n,i)}while(++t)}compareBuild(e){e instanceof O_||(e=new O_(e,this.options));let t=0;do{const n=this.build[t],i=e.build[t];if(__("prerelease compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return k_(n,i)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}var D_=O_;const{MAX_LENGTH:z_}=b_,{re:N_,t:B_}=x_;var L_=(e,t,n)=>new D_(e,n).compare(new D_(t,n));var j_=(e,t,n)=>0===L_(e,t,n);var I_=(e,t,n)=>L_(e,t,n)>0;var $_=(e,t,n)=>L_(e,t,n)<0;var F_=(e,t,n)=>0!==L_(e,t,n);var H_=(e,t,n)=>L_(e,t,n)>=0;var V_=(e,t,n)=>L_(e,t,n)<=0;var G_=(e,t,n,i)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return j_(e,n,i);case"!=":return F_(e,n,i);case">":return I_(e,n,i);case">=":return H_(e,n,i);case"<":return $_(e,n,i);case"<=":return V_(e,n,i);default:throw new TypeError(`Invalid operator: ${t}`)}};const{re:W_,t:U_}=x_;var q_=X_;function X_(e){var t=this;if(t instanceof X_||(t=new X_),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,i=arguments.length;n<i;n++)t.push(arguments[n]);return t}function Y_(e,t,n){var i=t===e.head?new Q_(n,null,t,e):new Q_(n,t,t.next,e);return null===i.next&&(e.tail=i),null===i.prev&&(e.head=i),e.length++,i}function K_(e,t){e.tail=new Q_(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function Z_(e,t){e.head=new Q_(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Q_(e,t,n,i){if(!(this instanceof Q_))return new Q_(e,t,n,i);this.list=i,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}X_.Node=Q_,X_.create=X_,X_.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},X_.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},X_.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},X_.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)K_(this,arguments[e]);return this.length},X_.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)Z_(this,arguments[e]);return this.length},X_.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},X_.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},X_.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,i=0;null!==n;i++)e.call(t,n.value,i,this),n=n.next},X_.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,i=this.length-1;null!==n;i--)e.call(t,n.value,i,this),n=n.prev},X_.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},X_.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},X_.prototype.map=function(e,t){t=t||this;for(var n=new X_,i=this.head;null!==i;)n.push(e.call(t,i.value,this)),i=i.next;return n},X_.prototype.mapReverse=function(e,t){t=t||this;for(var n=new X_,i=this.tail;null!==i;)n.push(e.call(t,i.value,this)),i=i.prev;return n},X_.prototype.reduce=function(e,t){var n,i=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");i=this.head.next,n=this.head.value}for(var r=0;null!==i;r++)n=e(n,i.value,r),i=i.next;return n},X_.prototype.reduceReverse=function(e,t){var n,i=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");i=this.tail.prev,n=this.tail.value}for(var r=this.length-1;null!==i;r--)n=e(n,i.value,r),i=i.prev;return n},X_.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},X_.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},X_.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new X_;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,r=this.head;null!==r&&i<e;i++)r=r.next;for(;null!==r&&i<t;i++,r=r.next)n.push(r.value);return n},X_.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new X_;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,r=this.tail;null!==r&&i>t;i--)r=r.prev;for(;null!==r&&i>e;i--,r=r.prev)n.push(r.value);return n},X_.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var i=0,r=this.head;null!==r&&i<e;i++)r=r.next;var o=[];for(i=0;r&&i<t;i++)o.push(r.value),r=this.removeNode(r);null===r&&(r=this.tail),r!==this.head&&r!==this.tail&&(r=r.prev);for(i=0;i<n.length;i++)r=Y_(this,r,n[i]);return o},X_.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var i=n.prev;n.prev=n.next,n.next=i}return this.head=t,this.tail=e,this};try{!function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}(X_)}catch(e){}const J_=Symbol("max"),ex=Symbol("length"),tx=Symbol("lengthCalculator"),nx=Symbol("allowStale"),ix=Symbol("maxAge"),rx=Symbol("dispose"),ox=Symbol("noDisposeOnSet"),ax=Symbol("lruList"),sx=Symbol("cache"),cx=Symbol("updateAgeOnGet"),lx=()=>1;const px=(e,t,n)=>{const i=e[sx].get(t);if(i){const t=i.value;if(ux(e,t)){if(dx(e,i),!e[nx])return}else n&&(e[cx]&&(i.value.now=Date.now()),e[ax].unshiftNode(i));return t.value}},ux=(e,t)=>{if(!t||!t.maxAge&&!e[ix])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[ix]&&n>e[ix]},hx=e=>{if(e[ex]>e[J_])for(let t=e[ax].tail;e[ex]>e[J_]&&null!==t;){const n=t.prev;dx(e,t),t=n}},dx=(e,t)=>{if(t){const n=t.value;e[rx]&&e[rx](n.key,n.value),e[ex]-=n.length,e[sx].delete(n.key),e[ax].removeNode(t)}};class mx{constructor(e,t,n,i,r){this.key=e,this.value=t,this.length=n,this.now=i,this.maxAge=r||0}}const fx=(e,t,n,i)=>{let r=n.value;ux(e,r)&&(dx(e,n),e[nx]||(r=void 0)),r&&t.call(i,r.value,r.key,e)};var vx=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[J_]=e.max||1/0;const t=e.length||lx;if(this[tx]="function"!=typeof t?lx:t,this[nx]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[ix]=e.maxAge||0,this[rx]=e.dispose,this[ox]=e.noDisposeOnSet||!1,this[cx]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[J_]=e||1/0,hx(this)}get max(){return this[J_]}set allowStale(e){this[nx]=!!e}get allowStale(){return this[nx]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[ix]=e,hx(this)}get maxAge(){return this[ix]}set lengthCalculator(e){"function"!=typeof e&&(e=lx),e!==this[tx]&&(this[tx]=e,this[ex]=0,this[ax].forEach((e=>{e.length=this[tx](e.value,e.key),this[ex]+=e.length}))),hx(this)}get lengthCalculator(){return this[tx]}get length(){return this[ex]}get itemCount(){return this[ax].length}rforEach(e,t){t=t||this;for(let n=this[ax].tail;null!==n;){const i=n.prev;fx(this,e,n,t),n=i}}forEach(e,t){t=t||this;for(let n=this[ax].head;null!==n;){const i=n.next;fx(this,e,n,t),n=i}}keys(){return this[ax].toArray().map((e=>e.key))}values(){return this[ax].toArray().map((e=>e.value))}reset(){this[rx]&&this[ax]&&this[ax].length&&this[ax].forEach((e=>this[rx](e.key,e.value))),this[sx]=new Map,this[ax]=new q_,this[ex]=0}dump(){return this[ax].map((e=>!ux(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[ax]}set(e,t,n){if((n=n||this[ix])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const i=n?Date.now():0,r=this[tx](t,e);if(this[sx].has(e)){if(r>this[J_])return dx(this,this[sx].get(e)),!1;const o=this[sx].get(e).value;return this[rx]&&(this[ox]||this[rx](e,o.value)),o.now=i,o.maxAge=n,o.value=t,this[ex]+=r-o.length,o.length=r,this.get(e),hx(this),!0}const o=new mx(e,t,r,i,n);return o.length>this[J_]?(this[rx]&&this[rx](e,t),!1):(this[ex]+=o.length,this[ax].unshift(o),this[sx].set(e,this[ax].head),hx(this),!0)}has(e){if(!this[sx].has(e))return!1;const t=this[sx].get(e).value;return!ux(this,t)}get(e){return px(this,e,!0)}peek(e){return px(this,e,!1)}pop(){const e=this[ax].tail;return e?(dx(this,e),e.value):null}del(e){dx(this,this[sx].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const i=e[n],r=i.e||0;if(0===r)this.set(i.k,i.v);else{const e=r-t;e>0&&this.set(i.k,i.v,e)}}}prune(){this[sx].forEach(((e,t)=>px(this,t,!1)))}};class gx{constructor(e,t){if(t=E_(t),e instanceof gx)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new gx(e.raw,t);if(e instanceof Hx)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!Cx(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&Rx(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=bx.get(t);if(n)return n;const i=this.options.loose,r=i?_x[xx.HYPHENRANGELOOSE]:_x[xx.HYPHENRANGE];e=e.replace(r,jx(this.options.includePrerelease)),__("hyphen replace",e),e=e.replace(_x[xx.COMPARATORTRIM],wx),__("comparator trim",e,_x[xx.COMPARATORTRIM]),e=(e=(e=e.replace(_x[xx.TILDETRIM],Ex)).replace(_x[xx.CARETTRIM],Sx)).split(/\s+/).join(" ");const o=i?_x[xx.COMPARATORLOOSE]:_x[xx.COMPARATOR],a=e.split(" ").map((e=>Mx(e,this.options))).join(" ").split(/\s+/).map((e=>Lx(e,this.options))).filter(this.options.loose?e=>!!e.match(o):()=>!0).map((e=>new Hx(e,this.options)));a.length;const s=new Map;for(const e of a){if(Cx(e))return[e];s.set(e.value,e)}s.size>1&&s.has("")&&s.delete("");const c=[...s.values()];return bx.set(t,c),c}intersects(e,t){if(!(e instanceof gx))throw new TypeError("a Range is required");return this.set.some((n=>Px(n,t)&&e.set.some((e=>Px(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new D_(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(Ix(this.set[t],e,this.options))return!0;return!1}}var yx=gx;const bx=new vx({max:1e3}),{re:_x,t:xx,comparatorTrimReplace:wx,tildeTrimReplace:Ex,caretTrimReplace:Sx}=x_,Cx=e=>"<0.0.0-0"===e.value,Rx=e=>""===e.value,Px=(e,t)=>{let n=!0;const i=e.slice();let r=i.pop();for(;n&&i.length;)n=i.every((e=>r.intersects(e,t))),r=i.pop();return n},Mx=(e,t)=>(__("comp",e,t),e=Ox(e,t),__("caret",e),e=Ax(e,t),__("tildes",e),e=zx(e,t),__("xrange",e),e=Bx(e,t),__("stars",e),e),Tx=e=>!e||"x"===e.toLowerCase()||"*"===e,Ax=(e,t)=>e.trim().split(/\s+/).map((e=>kx(e,t))).join(" "),kx=(e,t)=>{const n=t.loose?_x[xx.TILDELOOSE]:_x[xx.TILDE];return e.replace(n,((t,n,i,r,o)=>{let a;return __("tilde",e,t,n,i,r,o),Tx(n)?a="":Tx(i)?a=`>=${n}.0.0 <${+n+1}.0.0-0`:Tx(r)?a=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:o?(__("replaceTilde pr",o),a=`>=${n}.${i}.${r}-${o} <${n}.${+i+1}.0-0`):a=`>=${n}.${i}.${r} <${n}.${+i+1}.0-0`,__("tilde return",a),a}))},Ox=(e,t)=>e.trim().split(/\s+/).map((e=>Dx(e,t))).join(" "),Dx=(e,t)=>{__("caret",e,t);const n=t.loose?_x[xx.CARETLOOSE]:_x[xx.CARET],i=t.includePrerelease?"-0":"";return e.replace(n,((t,n,r,o,a)=>{let s;return __("caret",e,t,n,r,o,a),Tx(n)?s="":Tx(r)?s=`>=${n}.0.0${i} <${+n+1}.0.0-0`:Tx(o)?s="0"===n?`>=${n}.${r}.0${i} <${n}.${+r+1}.0-0`:`>=${n}.${r}.0${i} <${+n+1}.0.0-0`:a?(__("replaceCaret pr",a),s="0"===n?"0"===r?`>=${n}.${r}.${o}-${a} <${n}.${r}.${+o+1}-0`:`>=${n}.${r}.${o}-${a} <${n}.${+r+1}.0-0`:`>=${n}.${r}.${o}-${a} <${+n+1}.0.0-0`):(__("no pr"),s="0"===n?"0"===r?`>=${n}.${r}.${o}${i} <${n}.${r}.${+o+1}-0`:`>=${n}.${r}.${o}${i} <${n}.${+r+1}.0-0`:`>=${n}.${r}.${o} <${+n+1}.0.0-0`),__("caret return",s),s}))},zx=(e,t)=>(__("replaceXRanges",e,t),e.split(/\s+/).map((e=>Nx(e,t))).join(" ")),Nx=(e,t)=>{e=e.trim();const n=t.loose?_x[xx.XRANGELOOSE]:_x[xx.XRANGE];return e.replace(n,((n,i,r,o,a,s)=>{__("xRange",e,n,i,r,o,a,s);const c=Tx(r),l=c||Tx(o),p=l||Tx(a),u=p;return"="===i&&u&&(i=""),s=t.includePrerelease?"-0":"",c?n=">"===i||"<"===i?"<0.0.0-0":"*":i&&u?(l&&(o=0),a=0,">"===i?(i=">=",l?(r=+r+1,o=0,a=0):(o=+o+1,a=0)):"<="===i&&(i="<",l?r=+r+1:o=+o+1),"<"===i&&(s="-0"),n=`${i+r}.${o}.${a}${s}`):l?n=`>=${r}.0.0${s} <${+r+1}.0.0-0`:p&&(n=`>=${r}.${o}.0${s} <${r}.${+o+1}.0-0`),__("xRange return",n),n}))},Bx=(e,t)=>(__("replaceStars",e,t),e.trim().replace(_x[xx.STAR],"")),Lx=(e,t)=>(__("replaceGTE0",e,t),e.trim().replace(_x[t.includePrerelease?xx.GTE0PRE:xx.GTE0],"")),jx=e=>(t,n,i,r,o,a,s,c,l,p,u,h,d)=>`${n=Tx(i)?"":Tx(r)?`>=${i}.0.0${e?"-0":""}`:Tx(o)?`>=${i}.${r}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=Tx(l)?"":Tx(p)?`<${+l+1}.0.0-0`:Tx(u)?`<${l}.${+p+1}.0-0`:h?`<=${l}.${p}.${u}-${h}`:e?`<${l}.${p}.${+u+1}-0`:`<=${c}`}`.trim(),Ix=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(__(e[n].semver),e[n].semver!==Hx.ANY&&e[n].semver.prerelease.length>0){const i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0},$x=Symbol("SemVer ANY");class Fx{static get ANY(){return $x}constructor(e,t){if(t=E_(t),e instanceof Fx){if(e.loose===!!t.loose)return e;e=e.value}__("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===$x?this.value="":this.value=this.operator+this.semver.version,__("comp",this)}parse(e){const t=this.options.loose?Vx[Gx.COMPARATORLOOSE]:Vx[Gx.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new D_(n[2],this.options.loose):this.semver=$x}toString(){return this.value}test(e){if(__("Comparator.test",e,this.options.loose),this.semver===$x||e===$x)return!0;if("string"==typeof e)try{e=new D_(e,this.options)}catch(e){return!1}return G_(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Fx))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new yx(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new yx(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),r=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=G_(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),s=G_(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||r&&o||a||s}}var Hx=Fx;const{re:Vx,t:Gx}=x_;const{ANY:Wx}=Hx;const{ANY:Ux}=Hx;x_.re,x_.src,x_.t;const qx=jy({selectedElement:null,injector:null,getService:()=>null});function Xx(){return(Xx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function Yx(){return(Yx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function Kx(){return(Kx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function Zx(){return(Zx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function Qx(){return(Qx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function Jx(){return(Jx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ew(){return(ew=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function tw(){return(tw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function nw(){return(nw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function iw(){return(iw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function rw(){return(rw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ow(){return(ow=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function aw(){return(aw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function sw(){return(sw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function cw(){return(cw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function lw(){return(lw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function pw(){return(pw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function uw(){return(uw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function hw(){return(hw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function dw(){return(dw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function mw(){return(mw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function fw(){return(fw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function vw(){return(vw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function gw(){return(gw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function yw(){return(yw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function bw(){return(bw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function _w(){return(_w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function xw(){return(xw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ww(){return(ww=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var Ew=({styles:e={},...t})=>Vb("svg",ww({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.975.049C8.195-.111.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.454 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.215-2.282-2.022-5.3-3.217-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.082 11.082 0 0116 5.021zm-3.956 3.946l-3.096 3.097 3.985 3.985-3.913 3.913 3.047 3.048 3.913-3.913 3.988 3.987 3.097-3.096L19.076 16l3.914-3.913-3.048-3.048-3.913 3.913-3.986-3.985zm-.002 1.222l3.988 3.987 3.913-3.913 1.826 1.826-3.913 3.913 3.985 3.986-1.873 1.873-3.985-3.985-3.913 3.913-1.827-1.827 3.914-3.913-3.988-3.987 1.873-1.873z"}));function Sw(){return(Sw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var Cw=({styles:e={},...t})=>Vb("svg",Sw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm-.56 5.772l-7.408 5.231 7.409 5.234v-5.057c2.385 1.687 4.771 3.371 7.157 5.057V10.793l-7.157 5.055v-5.055zm-.865 1.665v7.125l-5.048-3.562 5.048-3.563zm7.161 0v7.132l-5.048-3.566 5.048-3.566z"}));function Rw(){return(Rw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var Pw=({styles:e={},...t})=>Vb("svg",Rw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.97.04h-.127C8.713-.018 2.003 5.334.437 12.286c-1.51 6.123.98 13.005 6.136 16.665 5.125 3.788 12.546 4.105 17.912.623 5.272-3.276 8.33-9.766 7.325-15.916-.904-6.241-5.79-11.7-11.95-13.143A16.082 16.082 0 0015.97.04zm-.181 1.724c.115 0 .23 0 .347.003 6.625-.066 12.823 5.149 13.89 11.69 1.13 5.91-1.908 12.349-7.262 15.138-5.473 3.013-12.866 1.884-17.116-2.726C1.291 21.372.444 13.914 3.802 8.602c2.493-4.112 7.169-6.819 11.987-6.838zm.283 1.554c-.117 0-.234.002-.351.005-6.1 0-11.691 5.049-12.346 11.114-.78 5.684 2.795 11.612 8.218 13.52 5.139 1.943 11.416.101 14.624-4.38 3.461-4.583 3.262-11.538-.596-15.831-2.36-2.747-5.924-4.423-9.549-4.428zm-.078 1.695c.078 0 .156 0 .234.003 5.4 0 10.321 4.556 10.734 9.942.563 5.13-2.958 10.364-7.971 11.678-4.832 1.41-10.457-.935-12.746-5.446-2.463-4.559-1.2-10.795 3.014-13.883a11.072 11.072 0 016.735-2.294zm-5.352 4.266V22.761h10.716V9.279H10.642zm.863.866h8.987v11.75h-8.987v-11.75zm.927 1.323v.862h7.133v-.862h-7.133zm0 2.602v.866h7.133v-.866h-7.133zm0 3.008v.862h7.133v-.862h-7.133zm0 2.717v.863h7.133v-.863h-7.133z"}));function Mw(){return(Mw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var Tw=({styles:e={},...t})=>Vb("svg",Mw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm6.132 4.194c-1.21 2.455-2.422 4.91-3.633 7.364l-4.516-5.875-4.103 12.133 4.6-5.912c1.58 1.81 3.162 3.619 4.744 5.429L22.13 9.215zM14.383 13.1l4.295 5.445 1.073-2.387-1.027 4.131-4.384-5.157-1.778 2.75 1.821-4.782z"}));function Aw(){return(Aw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var kw=({styles:e={},...t})=>Vb("svg",Aw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm.006 3.927c-1.672 4.654-2.734 9.502-4.406 14.155 1.534-1.525 2.872-3.234 4.406-4.759l4.406 4.76c-1.496-4.71-2.91-9.446-4.406-14.156zm.032 2.929c.822 2.586 1.598 5.186 2.42 7.771l-2.42-2.612c-.682.597-2.452 2.884-2.338 2.388.87-2.487 1.447-5.067 2.338-7.547z"}));function Ow(){return(Ow=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var Dw=({styles:e={},...t})=>Vb("svg",Ow({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm1.78 4.093v3.555H9.785v6.714h7.994v3.554l5.829-6.911-5.83-6.912zm.974 2.584l3.61 4.295-3.61 4.294v-1.933h-7.88v-4.688h7.88v-1.968z"}));function zw(){return(zw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var Nw=({styles:e={},...t})=>Vb("svg",zw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm-7.245 5.475v11.06h14.502v-11.06H8.754zm3.222 1.728h8.057c-1.427.878-2.854 2.806-4.281 3.016l-3.776-3.016zm9.554 1.017v6.587H10.48V13.24l5.524 4.414 5.526-4.414z"}));function Bw(){return(Bw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var Lw=({styles:e={},...t})=>Vb("svg",Bw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm.006 3.073l-7.62 5.531 2.91 8.95h9.42l2.91-8.95-7.62-5.53zm0 1.067l6.604 4.794-2.523 7.757h-8.162l-2.522-7.757 6.603-4.794z"}));function jw(){return(jw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var Iw=({styles:e={},...t})=>Vb("svg",jw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M10.638 9.563V23.056h10.724V9.563H10.638zm.863.866h8.995v11.76H11.5V10.43zm.928 1.324v.862h7.139v-.862h-7.14zm0 2.605v.866h7.139v-.866h-7.14zm0 3.01v.863h7.139v-.863h-7.14zm0 2.72v.863h7.139v-.864h-7.14zM15.999.308h-.004l-.188.001h-.011l-.188.004h-.011L15.41.32h-.011l-.187.008h-.005L15.2.33l-.187.01h-.005l-.005.001-.187.013h-.011L14.62.37h-.01l-.186.018h-.011l-.185.02-.005.001h-.006l-.185.022-.005.001h-.005l-.185.025h-.005l-.005.001-.185.027h-.005l-.005.001-.184.029h-.005l-.005.001-.183.031-.006.001-.005.001-.182.033-.006.001-.005.001-.182.035-.005.001-.005.001-.182.038h-.005l-.005.002-.181.04h-.005l-.005.002-.18.042-.006.001-.005.001-.18.044-.005.002h-.005l-.17.045-.152.054-.139.082-.121.106-.1.127-.074.143-.046.155-.017.16.013.16.043.156.07.145.097.13.119.108.137.085.15.058.159.03.16-.001.133-.023.165-.043.168-.041.171-.04.171-.037.172-.036.17-.033.173-.03.17-.03.177-.027.171-.025.175-.022.175-.02.175-.02.176-.016.175-.014.177-.012.176-.01.177-.007.174-.006.177-.003.178-.001h.177l.178.004.174.006.177.007.176.01.177.012.175.014.176.017.175.018.175.02.175.023.171.025.176.027.17.03.174.03.17.033.171.036.154.033.16.02.161-.01.156-.04.146-.069.131-.094.111-.117.087-.135.061-.15.032-.158.002-.16-.027-.16-.057-.15L20 1.023l-.108-.12-.128-.097-.145-.073-.128-.038-.158-.035-.005-.001-.005-.001L19.14.62h-.005l-.005-.002-.182-.035h-.006L18.938.58l-.182-.033h-.006l-.005-.002-.183-.03-.005-.001-.006-.001-.183-.029h-.005l-.006-.001-.184-.027h-.005l-.005-.001-.185-.024h-.005L17.968.43 17.783.41l-.006-.001h-.005l-.185-.02h-.006l-.005-.001L17.39.37h-.005L17.38.368l-.187-.015h-.005l-.005-.001-.187-.013h-.011L16.8.328h-.011L16.6.32h-.011l-.187-.006h-.011L16.204.31h-.011L16.005.31H16zm9.016 2.935l-.16.004-.158.033-.15.062-.134.09-.116.111-.093.132-.067.147-.038.156-.01.161.022.16.05.153.078.141.103.124.102.087.045.034.142.106.137.105.14.11.136.11.135.112.134.115.134.117.13.115.132.122.128.12.127.122.126.125.124.126.124.128.121.13.118.128.118.132.117.133.113.134.113.136.11.136.109.137.109.142.104.14.103.14.101.142.1.144.099.146.095.145.094.147.093.15.092.15.087.149.087.15.084.152.084.155.08.152.08.155.04.081.084.138.11.119.128.096.145.072.155.043.16.013.16-.016.155-.046.144-.074.127-.099.106-.12.083-.14.055-.151.026-.16-.004-.16-.034-.158-.05-.124-.042-.085-.002-.004-.003-.005-.084-.165-.002-.004-.003-.005-.086-.164-.002-.004-.003-.005-.088-.162-.002-.005-.003-.005-.09-.161-.002-.005-.003-.004-.092-.16-.003-.005-.002-.005-.094-.16-.003-.004-.003-.004-.096-.159-.002-.004-.003-.005-.098-.157-.003-.004-.003-.005-.1-.156-.003-.004-.003-.005-.101-.154-.003-.005-.003-.004-.104-.154-.003-.004-.003-.005-.106-.152-.003-.005-.003-.004-.108-.151-.003-.004-.003-.005-.11-.15-.003-.004-.003-.004-.111-.15-.004-.003-.003-.005-.113-.147-.004-.004-.003-.005-.115-.146-.004-.004-.003-.004-.117-.145-.004-.004-.003-.004-.12-.144-.003-.004-.003-.004-.121-.142-.004-.004-.003-.004-.123-.141-.003-.004-.004-.004-.125-.14-.003-.004-.004-.004-.127-.138-.003-.004-.004-.004-.128-.136-.004-.004-.004-.004-.13-.135-.004-.004-.004-.004-.132-.134-.003-.004-.004-.003-.134-.133-.004-.003-.004-.004-.135-.13-.004-.004-.004-.004-.136-.128-.004-.004-.004-.004-.138-.126-.004-.004-.004-.003-.14-.125-.004-.004-.004-.003-.14-.123-.005-.004-.004-.003-.142-.121-.004-.004-.004-.003-.144-.12-.004-.003-.004-.003-.145-.117-.004-.004-.004-.003-.147-.115-.004-.004-.004-.003-.148-.113-.004-.003-.004-.004-.149-.111-.004-.003-.004-.004-.05-.036-.14-.083-.15-.055-.16-.027zm-18.381.344l-.161.008-.157.037-.147.066-.111.074-.04.032-.005.003-.004.004-.145.117-.004.003-.004.004-.144.119-.004.003-.004.004-.142.12-.004.004-.004.004-.141.123-.004.003-.004.004-.14.125-.004.003-.004.004-.138.126-.004.004-.004.004-.136.128-.004.004-.004.004-.135.13-.004.004-.004.003-.134.133-.004.003L4.682 5l-.132.134-.003.004-.004.004-.13.135-.004.004-.004.004-.128.136-.004.004-.004.004-.126.138-.004.004-.003.004-.125.14-.004.004-.003.004-.123.14-.004.005-.003.004-.121.142-.004.004-.003.004-.12.144-.003.004-.003.004-.117.145-.004.004-.003.004-.115.146-.004.005-.003.004-.113.147-.003.005-.004.004-.111.149-.003.004-.004.004-.11.15-.002.005-.003.004-.108.151-.003.004-.003.005-.106.152-.003.005-.003.004-.104.154-.003.004-.003.005-.102.154-.003.005-.002.004-.1.156-.003.005-.003.004-.098.157-.003.005-.003.004-.096.159-.002.004-.003.005-.094.16-.003.004-.002.004-.092.16-.003.005-.003.005-.09.161-.002.005-.003.005-.088.162-.002.005-.003.004-.086.164-.002.005-.002.004-.084.165-.003.005-.002.004-.082.166-.002.004-.003.005-.08.167-.002.004-.002.005-.078.168-.002.004-.002.005-.045.1-.053.153-.023.16.007.16.037.157.065.148.092.132.114.114.134.09.148.064.157.035.161.006.16-.025.152-.054.14-.08.121-.106.1-.126.065-.118.043-.095.074-.16.075-.155.077-.157.08-.155.08-.152.083-.155.085-.152.086-.15.088-.149.091-.15.094-.15.094-.147.095-.145.099-.146.1-.144.1-.142.104-.14.104-.14.11-.142.107-.137.11-.136.114-.136.113-.134.117-.133.118-.132.117-.129.122-.13.124-.127.123-.126.127-.125.127-.122.128-.12.132-.122.13-.115.133-.117.135-.115.135-.111.136-.11.037-.03.117-.11.094-.132.068-.146.04-.156.01-.161-.02-.16-.05-.154-.076-.141-.102-.125-.123-.104-.14-.08-.153-.051-.16-.023zM16 3.595h-.005l-.148.001h-.01l-.147.003h-.011l-.147.005h-.011l-.146.007h-.011l-.146.009h-.011l-.146.01h-.005l-.005.001-.146.012h-.011l-.145.014h-.006l-.005.001-.05.006-.158.031-.15.06-.135.088-.117.111-.094.13-.069.147-.04.156-.01.16.019.16.049.154.076.142.102.125.123.105.14.08.152.051.16.023.134-.003.045-.005.135-.013.133-.01.136-.01.135-.007.137-.006.136-.004.136-.003h.274l.136.003.136.004.136.006.136.007.136.01.133.01.135.013.135.014.135.016.134.018.132.018.134.021.133.023.133.024.133.025.13.027.132.03.132.03.129.031.13.034.129.035.129.036.13.04.126.038.128.042.126.042.128.045.127.047.126.047.12.048.127.051.123.052.006.002.147.048.16.021.16-.009.157-.038.147-.067.131-.093.112-.116.089-.135.062-.149.033-.158.004-.16-.027-.16-.055-.151-.083-.139-.107-.12-.127-.099-.118-.063-.004-.001-.005-.003-.005-.002-.133-.056-.005-.002-.005-.002-.134-.054-.004-.002-.005-.002-.135-.053-.005-.002-.005-.002-.135-.051-.005-.002-.005-.002-.135-.05-.005-.001-.005-.002-.137-.048-.005-.001-.005-.002-.137-.046-.005-.002-.005-.002-.137-.044-.005-.002-.005-.001-.138-.043-.006-.002-.005-.001-.138-.042-.005-.001-.005-.002-.14-.04H19.4l-.005-.002-.14-.038-.005-.001-.005-.002-.14-.036-.005-.001-.005-.001-.141-.035-.005-.001-.005-.001-.142-.033-.005-.001-.005-.001-.142-.031-.005-.002h-.005l-.142-.03-.005-.001-.005-.001-.143-.028h-.005l-.005-.002-.143-.025-.006-.001-.005-.001-.143-.024-.005-.001-.006-.001-.143-.022-.006-.001h-.005l-.144-.022h-.005l-.006-.001-.144-.019h-.005l-.006-.001-.144-.017h-.006l-.005-.001-.145-.016h-.011l-.145-.014H17.1l-.005-.001-.146-.012h-.01l-.146-.01-.006-.001h-.005l-.146-.009h-.011l-.147-.006h-.01L16.32 3.6h-.011l-.147-.003h-.011l-.147-.001H16zm-5.482 1.366l-.16.008-.157.037-.123.053-.06.032-.005.002-.004.003-.128.069-.004.002-.005.003-.126.07-.005.003-.004.002-.126.072-.005.003-.004.003-.125.073-.004.003-.005.003-.124.075-.004.003-.005.002-.123.077-.004.003-.005.003-.122.078-.004.003-.005.003-.121.08-.004.002-.005.003-.12.082-.005.003-.004.003-.12.083-.004.003-.004.003-.118.084-.005.003-.004.003-.118.086-.004.003-.004.003-.117.088-.004.003-.004.003-.116.089-.004.003-.004.004-.114.09-.005.003-.004.003-.113.092-.004.004-.004.003-.113.093-.004.004-.004.003-.111.095-.005.003-.004.004-.11.096-.004.004-.004.003-.11.098-.003.003-.004.004-.108.1-.004.003-.004.003-.107.101-.004.004-.004.003-.106.102-.004.004-.003.004-.105.103-.004.004-.004.004-.103.105-.004.004-.004.003-.102.106-.003.004-.004.004-.1.107-.004.004-.004.004-.099.108-.004.004-.003.004-.098.11-.003.003-.004.004-.096.11-.004.005-.003.004-.095.111-.003.004-.004.004-.093.113-.003.004-.004.004-.092.113-.003.004-.003.005-.09.114-.004.004-.003.004-.089.116-.003.004-.003.004-.088.117-.003.004-.003.004-.086.118-.003.004-.003.005-.084.118-.003.004-.003.005-.083.12-.003.003-.003.005-.082.12-.003.005-.002.004-.068.103-.076.142-.048.154-.018.16.011.161.041.156.07.146.095.13.117.11.136.086.15.06.158.03.162.002.158-.03.15-.057.138-.085.119-.109.082-.105.065-.099.075-.11.077-.113.077-.107.08-.11.08-.108.084-.108.083-.105.086-.106.086-.104.088-.104.089-.101.09-.102.093-.101.093-.099.094-.097.095-.096.098-.097.098-.095.099-.093.1-.092.103-.091.101-.089.104-.088.104-.086.106-.086.106-.083.106-.082.109-.082.108-.079.11-.078.11-.076.112-.076.112-.074.113-.072.113-.071.115-.07.115-.068.118-.067.117-.065.12-.065.054-.029.135-.088.116-.111.094-.132.068-.146.04-.156.009-.161-.02-.16-.05-.153-.078-.142-.102-.125-.123-.103-.141-.079-.153-.051-.16-.022zm13.91 2.116l-.162.008-.157.037-.147.066-.132.092-.113.116-.09.134-.063.148-.034.157-.005.162.025.159.055.152.082.138.086.103.09.09.094.098.092.099.093.1.091.103.089.101.088.104.086.104.086.106.083.105.083.108.08.108.081.11.077.107.077.112.075.111.075.114.072.113.071.113.07.114.068.118.067.115.065.118.064.117.062.117.061.121.059.119.059.122.056.121.054.12.055.125.051.123.051.125.048.123.048.127.047.126.044.125.043.128.042.129.039.126.038.13.022.076.058.15.085.137.11.119.129.096.145.07.155.043.16.013.161-.017.154-.046.144-.075.126-.1.106-.12.082-.14.055-.151.025-.16-.005-.16-.026-.132-.023-.082-.002-.005-.001-.005-.042-.139-.001-.005-.002-.005-.043-.138-.001-.005-.002-.005-.044-.137-.002-.005-.002-.005-.046-.137-.002-.005-.001-.005-.048-.137-.002-.005-.002-.005-.05-.135-.001-.005-.002-.005-.051-.135-.002-.005-.002-.005-.053-.135-.002-.005-.002-.005-.054-.133-.002-.005-.002-.005-.057-.133-.002-.005-.002-.005-.057-.132-.003-.005-.002-.005-.06-.132-.001-.005-.002-.004-.061-.132-.003-.004-.002-.005-.063-.13-.002-.005-.002-.005-.064-.13-.003-.004-.002-.005-.066-.129-.002-.004-.003-.005-.067-.128-.002-.005-.003-.004-.069-.128-.002-.004-.003-.005-.07-.126-.003-.005-.003-.004-.072-.126-.002-.005-.003-.004-.074-.125-.002-.004-.003-.005-.075-.124-.003-.004-.003-.005-.076-.123-.003-.004-.003-.005-.078-.122-.003-.004-.003-.005-.08-.121-.003-.004-.003-.005-.081-.12-.003-.005-.003-.004-.083-.12-.003-.004-.003-.004-.084-.118-.003-.005-.003-.004-.086-.118-.003-.004-.004-.004-.087-.117-.003-.004-.003-.004-.09-.116-.002-.004-.004-.004-.09-.114-.003-.005-.004-.004-.091-.113-.004-.004-.003-.004-.094-.113-.003-.004-.003-.004-.095-.111-.004-.004-.003-.004-.096-.11-.004-.005-.003-.004-.098-.11-.004-.003-.003-.004-.1-.108-.003-.004-.004-.004-.1-.107-.004-.004-.004-.004-.102-.106-.003-.003-.004-.004-.093-.095-.124-.103-.14-.08-.153-.05-.16-.023zM4.45 13.135l-.161.002-.158.032-.15.06-.135.088-.118.11-.094.131-.069.146-.035.129-.026.132v.005l-.002.005-.025.143-.001.005-.001.006-.024.143-.001.005-.001.006-.022.143-.001.006-.001.005-.02.144-.001.005-.001.005-.019.145v.005l-.001.006-.017.144v.006l-.001.005-.016.145v.011l-.014.145v.005l-.001.006-.012.146v.01l-.01.146-.001.006v.005l-.009.146v.011l-.007.146v.011l-.004.147v.011l-.003.147v.01l-.002.148v.01l.001.148v.01l.003.147v.011l.005.147v.01l.007.147v.011l.009.146v.011l.01.146v.01l.013.146v.011l.014.145v.005l.001.006.016.145v.011l.018.144v.006l.001.005.019.144v.006l.001.005.021.144v.005l.002.006.022.143v.006l.002.005.024.143v.005l.002.006.025.143.001.005.001.005.028.143.001.005.001.005.03.142v.005l.002.006.03.141.002.005.001.005.033.142v.005l.002.005.035.14v.006l.002.005.036.14.002.005.001.005.038.14.001.005.002.005.04.14v.005l.002.005.042.138.001.006.002.005.042.138.002.005.002.005.017.054.064.148.09.134.114.114.132.092.148.065.157.037.16.007.16-.023.153-.052.14-.08.123-.104.102-.125.076-.142.049-.153.02-.16-.011-.161-.031-.13-.017-.051-.039-.126-.038-.13-.037-.128-.035-.13-.033-.128-.033-.134-.03-.13-.029-.131-.026-.13-.026-.133-.024-.133-.023-.133-.02-.132-.02-.136-.017-.132-.016-.135-.014-.135-.012-.133-.012-.138-.009-.133-.007-.136-.006-.138-.004-.134-.003-.136v-.274l.003-.136.004-.134.006-.139.007-.136.01-.133.01-.138.013-.132.014-.135.016-.135.017-.132.02-.137.02-.13.023-.134.024-.133.024-.126.016-.16-.014-.161-.044-.155-.072-.145-.098-.128-.12-.108-.137-.084-.15-.057-.16-.029zm26.698 1.601l-.161.01-.157.04-.146.067-.131.093-.112.117-.088.135-.061.149-.033.157-.005.134.006.14.006.176.003.177.001.178-.001.177-.003.178-.006.177-.007.176-.01.177-.012.176-.015.176-.016.173-.018.175-.02.175-.024.174-.025.175-.026.17-.03.174-.03.173-.033.17-.036.172-.037.17-.04.17-.042.172-.043.168-.045.166-.048.169-.05.167-.052.168-.053.164-.056.166-.058.166-.06.16-.062.165-.062.158-.066.165-.068.16-.07.16-.07.158-.075.159-.074.155-.079.158-.08.158-.06.15-.03.158-.001.161.029.159.058.15.085.137.108.119.13.097.144.07.156.044.16.013.16-.017.155-.046.143-.074.127-.1.107-.12.07-.115.083-.164.003-.005.002-.004.082-.166.002-.005.003-.004.08-.167.002-.005.002-.004.078-.168.002-.005.002-.004.076-.169.002-.004.002-.005.074-.17.002-.004.002-.005.072-.17.002-.005.002-.005.07-.171.001-.005.002-.005.068-.172.002-.004.002-.005.065-.173.002-.005.002-.005.063-.173.002-.005.002-.005.06-.174.003-.005.001-.005.06-.175.001-.005.002-.005.057-.176.001-.005.002-.005.055-.177.001-.005.002-.005.052-.177.002-.005.001-.005.051-.178.001-.005.002-.005.048-.179.002-.005v-.005l.047-.179.001-.005.002-.005.044-.18v-.005l.002-.005.042-.18.001-.006.001-.005.04-.181.001-.005.001-.005.037-.182.002-.005v-.005l.036-.182v-.006l.002-.005.033-.182v-.006l.002-.005.03-.183.001-.005.001-.005.029-.184v-.005l.001-.006.027-.184v-.005l.001-.005.024-.185v-.005l.001-.005.022-.185v-.006l.001-.005.02-.185v-.006l.001-.005.017-.186v-.005l.001-.005.015-.187v-.005l.001-.005.013-.187v-.01l.01-.187.001-.006v-.005l.009-.187v-.011l.006-.187V16.7l.004-.188v-.011l.001-.188v-.01l-.001-.188v-.011l-.004-.188v-.011l-.006-.187v-.011l-.007-.145-.022-.16-.05-.152-.08-.141-.103-.124-.125-.102-.141-.077-.153-.05-.16-.02zm-30.21.572l-.161.001-.158.032-.15.06-.136.087-.117.11-.095.131-.068.146-.04.156-.012.133-.001.14v.01l.001.188v.011l.004.188v.011l.006.187v.011l.008.187v.011l.011.187v.005l.001.005.013.187v.01l.016.187v.01l.018.186v.011l.02.185.001.005v.006l.022.185.001.005v.005l.025.185v.005l.001.005.027.184v.006l.001.005.029.184v.005l.001.005.031.183.001.005.001.006.033.182.001.005.001.006.035.182.001.005.001.005.038.182v.005l.002.005.04.181v.005l.002.005.042.18.001.006.001.005.044.18.002.005v.005l.047.18.001.004.002.005.048.179.002.005.001.005.05.178.002.005.001.005.053.177.002.005.001.005.055.177.002.005.001.005.057.176.002.005.001.005.06.175.001.005.002.005.061.174.002.005.002.005.063.173.002.005.002.005.065.173.002.005.002.004.067.172.002.005.002.005.07.171.002.005.002.005.072.17.002.005.002.004.074.17.002.005.002.004.076.169.002.004.002.005.078.168.002.004.002.005.08.167.003.004.002.005.082.166.002.004.003.005.02.04.086.136.11.118.13.095.146.07.156.041.16.012.16-.019.155-.048.142-.075.126-.1.105-.123.08-.14.054-.152.024-.16-.006-.16-.036-.158-.051-.123-.018-.034-.078-.158-.074-.155-.074-.16-.071-.157-.07-.16-.068-.16-.067-.165-.062-.158-.062-.164-.059-.161-.058-.166-.056-.166-.053-.164-.052-.168-.05-.167-.048-.17-.045-.165-.043-.168-.043-.172-.039-.17-.037-.17-.036-.172-.033-.17-.03-.173-.03-.174-.027-.17-.025-.175-.022-.174-.021-.175-.018-.175-.017-.173-.014-.176-.012-.176-.01-.177-.007-.176-.006-.177-.003-.178-.001-.177v-.134l-.013-.16-.044-.156-.072-.144-.097-.129-.12-.108-.137-.085-.15-.057-.159-.028zm26.798 2.024l-.16.007-.157.038-.148.066-.132.092-.113.115-.09.134-.062.148-.03.127-.001.004-.023.134-.024.133-.026.133-.026.13-.03.132-.03.129-.032.134-.033.128-.035.13-.037.128-.038.13-.04.126-.04.128-.044.128-.044.126-.046.126-.048.126-.05.125-.05.125-.051.122-.054.123-.055.122-.056.12-.058.122-.06.12-.061.12-.063.119-.062.116-.067.119-.066.116-.069.115-.069.115-.07.113-.073.113-.074.112-.076.113-.077.112-.077.107-.08.11-.08.107-.085.11-.044.056-.088.135-.06.15-.033.158-.002.16.027.16.057.15.083.138.108.12.128.098.144.072.155.045.16.015.161-.016.155-.044.144-.073.128-.098.09-.099.05-.061.003-.004.003-.005.089-.115.003-.004.003-.005.088-.116.003-.004.003-.005.086-.117.003-.004.003-.005.084-.118.003-.004.003-.005.083-.12.003-.004.003-.004.081-.12.003-.005.003-.004.08-.121.003-.005.003-.004.078-.122.003-.005.003-.004.077-.123.002-.005.003-.004.075-.124.003-.005.003-.004.073-.125.003-.005.003-.004.072-.126.002-.004.003-.005.07-.126.003-.005.002-.005.07-.127.002-.004.002-.005.068-.128.002-.005.002-.004.066-.13.003-.004.002-.005.064-.13.002-.004.003-.005.062-.13.002-.005.003-.005.06-.13.003-.005.002-.005.06-.132.002-.005.002-.005.057-.132.003-.005.002-.005.056-.133.002-.005.002-.005.054-.134.002-.004.002-.005.053-.135.002-.005.002-.005.051-.135.002-.005.002-.005.05-.135.001-.005.002-.005.048-.137.001-.005.002-.005.046-.137.002-.005.002-.005.044-.137.002-.005.002-.005.042-.138.002-.005.001-.006.042-.138.001-.005.002-.005.04-.14v-.005l.002-.005.038-.14.001-.005.002-.005.036-.14.001-.005.001-.005.035-.141.001-.005.001-.005.033-.142.001-.005.001-.005.031-.141.001-.006.002-.005.029-.142v-.005l.002-.005.028-.143v-.005l.002-.005.025-.143.001-.006.001-.005.024-.143.001-.005.001-.006.001-.006.01-.161-.02-.16-.05-.154-.077-.141-.102-.125-.123-.104-.141-.079-.153-.051-.16-.022zM6.841 23.019l-.16.024-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.018.16.011.161.041.156.07.146.077.109.04.048.003.004.003.004.095.111.003.004.004.004.096.11.004.005.003.004.098.109.003.004.004.004.1.108.003.004.003.004.101.107.004.004.003.004.102.105.004.004.004.004.103.105.004.004.004.003.105.104.003.004.004.003.106.102.004.004.004.004.107.1.004.004.004.004.108.099.004.003.004.004.11.098.003.003.004.004.11.096.004.003.005.004.11.095.005.003.004.004.113.093.004.003.004.004.113.091.004.004.005.003.114.09.004.004.004.003.116.089.004.003.004.003.117.088.004.003.004.003.118.086.004.003.005.003.118.084.004.003.005.003.119.083.004.003.005.003.12.081.005.003.004.003.121.08.005.003.004.003.122.078.005.003.004.003.123.076.005.003.004.003.124.075.005.003.004.003.125.073.004.003.005.002.126.073.004.002.005.003.126.07.005.003.004.002.128.07.004.002.005.002.128.067.005.003.004.002.13.066.004.002.005.003.13.064.004.002.005.003.13.062.005.002.004.003.132.06.004.003.005.002.132.06.005.002.005.002.132.057.005.002.005.002.133.057.005.002.005.002.133.054.005.002.005.002.13.05.154.045.16.016.16-.015.156-.045.144-.072.128-.098.108-.12.083-.138.057-.15.028-.16-.003-.16-.032-.159-.061-.149-.088-.135-.11-.117-.132-.094-.12-.058-.124-.049-.126-.051-.122-.051-.122-.054-.12-.054-.126-.058-.119-.057-.12-.06-.12-.06-.118-.063-.117-.064-.119-.066-.116-.066-.115-.068-.115-.07-.113-.07-.115-.074-.112-.074-.11-.075-.11-.076-.112-.08-.11-.08-.109-.081-.106-.082-.104-.082-.106-.086-.105-.087-.101-.086-.105-.091-.1-.09-.1-.091-.1-.094-.097-.094-.1-.098-.093-.095-.096-.1-.093-.098-.092-.101-.089-.1-.09-.102-.088-.104-.036-.043-.114-.114-.133-.091-.148-.065-.157-.036-.161-.006zm15.063 2.701l-.16.014-.156.044-.12.057-.06.034-.12.066-.117.064-.118.062-.12.061-.12.06-.118.057-.126.058-.12.054-.122.054-.122.05-.126.052-.125.05-.124.046-.127.047-.125.044-.129.043-.126.04-.13.042-.128.038-.127.035-.13.036-.131.034-.129.031-.132.03-.13.03-.135.027-.133.026-.13.023-.13.022-.137.021-.132.02-.134.017-.132.015-.138.015-.135.013-.133.01-.138.01-.136.007-.134.006-.136.004-.14.003-.16.018-.155.047-.142.076-.127.1-.105.122-.08.14-.054.151-.025.16.006.16.035.158.064.148.09.134.114.114.133.092.147.065.157.036.134.008.145-.002h.011l.147-.005h.01l.147-.007h.011l.146-.009h.011l.146-.01h.005l.005-.001.146-.012h.011l.145-.014h.005l.006-.001.145-.016h.011l.144-.018h.006l.005-.001.144-.02h.011l.144-.021.005-.001h.006l.143-.023.006-.001h.005l.143-.025h.005l.006-.002.143-.026h.005l.005-.002.143-.027.005-.001.005-.001.142-.03h.005l.005-.002.142-.03.005-.002.005-.001.142-.033.005-.001.005-.001.14-.035.006-.001.005-.001.14-.037h.005l.005-.002.14-.038.005-.002h.005l.14-.04.005-.002.005-.001.138-.042.005-.001.006-.002.138-.043.005-.001.005-.002.137-.044.005-.002.005-.002.137-.046.005-.002.005-.001.137-.048.005-.002.005-.002.135-.05.005-.001.005-.002.135-.051.005-.002.005-.002.135-.053.005-.002.004-.002.134-.054.005-.002.005-.002.133-.057.005-.002.005-.002.132-.057.005-.003.005-.002.132-.06.005-.001.004-.002.131-.061.005-.003.005-.002.13-.062.005-.003.005-.002.13-.064.004-.003.005-.002.128-.066.005-.002.005-.003.128-.067.005-.002.004-.003.127-.069.005-.002.005-.003.126-.07.005-.003.004-.003.065-.037.132-.093.112-.115.089-.135.062-.149.034-.157.003-.161-.026-.16-.055-.15-.082-.14-.107-.12-.127-.1-.144-.073-.154-.046-.16-.016zM6.33 27.127l-.16.023-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.02.16.012.161.041.156.07.146.094.13.096.093.032.026.004.003.004.004.145.117.004.003.004.004.146.115.005.003.004.004.147.113.005.003.004.004.149.111.004.003.004.003.15.11.005.003.004.003.151.108.004.003.005.003.152.106.005.003.004.003.154.104.004.003.005.003.154.102.005.002.004.003.156.1.005.003.004.003.157.098.005.003.004.002.159.096.004.003.005.003.16.094.004.003.004.002.16.092.005.003.005.002.161.09.005.003.005.002.162.088.005.003.004.002.164.086.005.003.004.002.165.084.005.003.004.002.166.082.004.002.005.003.167.08.004.002.005.002.168.078.004.002.005.002.168.076.005.002.005.002.17.074.004.002.005.002.17.072.005.002.005.002.17.07.006.002.005.001.171.068.005.002.005.002.173.065.005.002.005.002.173.063.005.002.005.002.174.06.005.003.005.001.175.06.005.001.005.002.176.057.005.001.005.002.176.055.006.001.005.002.177.052.005.002.005.001.178.05.005.002.005.002.178.048.006.001.005.002.179.046.005.001.005.002.18.044h.005l.005.002.18.042.006.001.005.001.159.035.16.02.16-.01.157-.04.146-.069.13-.094.112-.117.087-.136.06-.149.033-.158.002-.161-.028-.159-.057-.15-.084-.138-.108-.12-.128-.098-.144-.072-.128-.039-.154-.033-.168-.04-.171-.041-.17-.044-.168-.046-.167-.047-.168-.05-.165-.051-.166-.054-.166-.056-.163-.057-.165-.06-.161-.062-.164-.064-.16-.065-.16-.068-.162-.07-.157-.07-.157-.074-.157-.075-.156-.077-.153-.079-.156-.082-.153-.082-.154-.086-.15-.086-.152-.09-.148-.09-.147-.092-.149-.095-.145-.095-.144-.098-.145-.1-.143-.102-.14-.103-.14-.104-.14-.108-.139-.11-.136-.11-.027-.022-.133-.091-.148-.065-.157-.036-.161-.006zm19.215.087l-.16.01-.157.039-.146.067-.11.076-.064.051-.139.11-.14.108-.14.104-.14.103-.143.101-.145.101-.144.098-.145.095-.149.095-.148.093-.147.089-.152.09-.15.086-.154.086-.153.082-.156.082-.153.079-.156.077-.157.075-.158.073-.157.071-.16.07-.16.068-.161.065-.164.064-.161.061-.165.06-.163.058-.166.056-.166.054-.166.051-.167.05-.167.047-.17.046-.168.044-.171.042-.168.039-.17.037-.11.023-.154.047-.143.075-.126.1-.106.122-.081.139-.054.152-.025.16.006.16.035.158.063.148.09.133.114.115.132.092.148.065.157.037.16.007.133-.016.115-.024.005-.001.005-.001.181-.04h.005l.005-.002.18-.042.006-.001.005-.001.18-.044.005-.002.005-.001.18-.046.004-.002h.005l.179-.05h.005l.005-.002.178-.05.005-.002.005-.002.177-.052.005-.002.005-.001.177-.055.005-.002.005-.001.176-.057.005-.002.005-.002.175-.059.005-.001.005-.002.174-.061.005-.002.005-.002.173-.063.005-.002.005-.002.173-.065.004-.002.005-.002.172-.068.005-.002.005-.002.171-.07.005-.001.005-.002.17-.072.005-.002.004-.002.17-.074.005-.002.004-.002.169-.076.004-.002.005-.002.168-.078.004-.002.005-.003.167-.08.004-.002.005-.002.166-.082.004-.002.005-.003.165-.084.004-.002.005-.003.163-.086.005-.002.005-.003.162-.088.005-.002.005-.003.161-.09.005-.002.004-.003.16-.092.005-.003.005-.002.16-.094.004-.003.004-.003.158-.096.005-.002.004-.003.158-.098.004-.003.005-.003.156-.1.004-.003.004-.003.155-.101.005-.003.004-.003.154-.104.004-.003.004-.003.153-.106.004-.003.005-.003.151-.108.004-.003.005-.003.15-.11.004-.003.004-.003.149-.112.004-.003.004-.003.148-.113.004-.004.004-.003.147-.115.004-.004.004-.003.068-.055.116-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.05-.153-.08-.14-.103-.125-.124-.102-.142-.077-.153-.05-.16-.02z"}));function $w(){return($w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var Fw=({styles:e={},...t})=>Vb("svg",$w({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M16.012 9.222c-1.673 4.657-2.735 9.508-4.409 14.164 1.536-1.526 2.874-3.236 4.41-4.762l4.408 4.762c-1.497-4.712-2.911-9.451-4.409-14.164zm.032 2.93c.823 2.588 1.599 5.19 2.421 7.777l-2.42-2.614c-.683.598-2.454 2.886-2.34 2.39.871-2.489 1.448-5.07 2.34-7.552zM16.012.312c-1.448.02-2.93.157-4.302.628-.852.447-.255 1.863.66 1.574 2.255-.608 4.648-.607 6.922-.108.934.075 1.228-1.376.338-1.67C18.451.44 17.227.317 16.012.311zm9.012 2.934c-.913-.104-1.272 1.258-.454 1.648 1.834 1.36 3.293 3.185 4.31 5.22.526.776 1.842.098 1.515-.78a15.522 15.522 0 00-5.06-6.006c-.1-.044-.203-.07-.31-.082zM6.65 3.59c-.762.089-1.24.809-1.805 1.267C3.38 6.295 2.163 8.007 1.37 9.905c-.266.898 1.094 1.484 1.564.675a14.825 14.825 0 014.327-5.56c.476-.515.09-1.419-.612-1.431zm9.362.007c-.698.066-1.689-.16-2.033.635-.282.733.535 1.358 1.217 1.125 1.806-.147 3.63.203 5.293.907.902.255 1.472-1.112.656-1.573-1.6-.735-3.374-1.089-5.133-1.094zm-5.479 1.365c-.835.15-1.517.76-2.21 1.226-1.203.94-2.318 2.061-3.057 3.402-.33.904 1.063 1.552 1.547.723 1.045-1.656 2.596-2.925 4.285-3.873.545-.499.171-1.463-.565-1.478zm13.903 2.115c-.875-.07-1.22 1.173-.501 1.627 1.325 1.34 2.188 3.062 2.748 4.84.468.84 1.869.21 1.557-.699-.604-2.118-1.751-4.097-3.351-5.615a.93.93 0 00-.453-.153zM4.467 13.132c-.822-.07-.996.826-1.046 1.455-.256 1.93-.094 3.933.562 5.769.406.844 1.807.365 1.612-.551a11.498 11.498 0 01-.334-5.808.874.874 0 00-.794-.865zm26.687 1.6c-.746-.037-1.014.785-.879 1.395.043 2.393-.57 4.771-1.66 6.894-.31.884 1.02 1.536 1.53.75a15.632 15.632 0 001.821-8.372.876.876 0 00-.812-.667zm-30.197.571c-.782-.073-1.044.775-.933 1.404.068 2.414.661 4.833 1.809 6.962.534.77 1.842.076 1.505-.798a14.833 14.833 0 01-1.603-6.861.876.876 0 00-.778-.707zm26.787 2.024c-.777-.048-.952.797-1.021 1.392-.354 1.692-1.202 3.231-2.216 4.608-.407.872.925 1.638 1.48.852 1.361-1.733 2.296-3.827 2.582-6.017a.874.874 0 00-.825-.835zM6.857 23.012c-.808.018-1.082 1.122-.47 1.59 1.393 1.607 3.187 2.886 5.194 3.599.91.222 1.43-1.165.598-1.596a11.495 11.495 0 01-4.723-3.396.899.899 0 00-.599-.197zm15.057 2.7c-.81.194-1.504.76-2.325.972-1.203.458-2.5.536-3.758.664-.869.307-.573 1.728.346 1.663 2.201-.034 4.412-.626 6.293-1.778.604-.495.227-1.532-.556-1.521zM6.346 27.118c-.833.008-1.11 1.218-.395 1.617 1.986 1.602 4.358 2.749 6.868 3.226.933.076 1.227-1.376.338-1.67a14.838 14.838 0 01-6.345-3.066.929.929 0 00-.466-.107zm19.208.087c-.766.09-1.241.841-1.922 1.158-1.516.991-3.251 1.58-4.996 2.005-.872.405-.346 1.849.584 1.604 2.543-.526 4.98-1.66 6.963-3.344.47-.52.072-1.42-.63-1.423z"}));function Hw(){return(Hw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var Vw=({styles:e={},...t})=>Vb("svg",Hw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M8.742 10.464v11.072h14.516V10.464H8.742zm3.224 1.73h8.066a69569 69569 0 00-4.034 3.22l-4.032-3.22zm9.565 1.018v6.594H10.469v-6.593L16 17.63l5.532-4.419zM16 0h-.005l-.188.001h-.011l-.188.004h-.011l-.187.006h-.011l-.187.008h-.005L15.2.02l-.187.01h-.005l-.005.001-.187.013h-.011L14.62.06h-.01l-.186.018h-.011l-.185.02-.005.001h-.006l-.185.022-.005.001h-.005l-.185.025h-.005l-.005.001-.185.027h-.005l-.005.001-.184.029h-.005l-.005.001-.183.031-.006.001-.005.001-.182.033-.006.001-.005.001-.182.035-.005.001-.005.001-.182.038h-.005l-.005.002-.181.04h-.005l-.005.002-.18.042-.006.001-.005.001-.18.044-.005.002h-.005l-.17.045-.152.054-.139.082-.121.106-.1.127-.074.143-.046.155-.017.16.013.16.043.156.07.145.097.13.119.108.137.085.15.058.159.03.16-.001.133-.023.165-.043.168-.041.171-.04.171-.037.172-.036.17-.033.173-.03.17-.03.177-.027.171-.025.175-.022.175-.02.175-.02.176-.016.175-.014.177-.012.176-.01.177-.007.174-.006.177-.003L16 1.73h.177l.178.004.174.006.177.007.176.01.177.012.175.014.176.017.175.018.175.02.175.023.171.025.176.027.17.03.174.03.17.033.171.036.154.033.16.02.161-.01.156-.04.146-.069.131-.094.111-.117.087-.135.061-.15.032-.158.002-.16-.027-.16-.057-.15L20 .714l-.108-.12-.128-.097-.145-.073-.128-.038-.158-.035-.005-.001-.005-.001L19.14.31h-.005l-.005-.002-.182-.035h-.006l-.005-.002-.182-.033h-.006l-.005-.002-.183-.03-.005-.001-.006-.001-.183-.029h-.005l-.006-.001-.184-.027h-.005l-.005-.001-.185-.024h-.005L17.968.12 17.783.1l-.006-.001h-.005l-.185-.02h-.006l-.005-.001L17.39.06h-.005L17.38.06l-.187-.015h-.005l-.005-.001-.187-.013h-.011L16.8.02h-.011L16.6.01h-.011l-.187-.006h-.011L16.204 0h-.011L16.005 0H16zm9.015 2.935l-.16.004-.158.033-.15.062-.134.09-.116.111-.093.132-.067.147-.038.156-.01.161.022.16.05.153.078.141.103.124.102.087.045.034.142.106.137.105.14.11.136.11.135.112.134.115.134.117.13.115.132.122.128.12.127.122.126.125.124.126.124.128.121.13.118.128.118.132.117.133.113.134.113.136.11.136.109.137.109.142.104.14.103.14.101.142.1.144.099.146.095.145.094.147.093.15.092.15.087.149.087.15.084.152.084.155.08.152.08.155.04.081.084.138.11.119.128.096.145.072.155.043.16.013.16-.016.155-.046.144-.074.127-.099.106-.12.083-.14.055-.151.026-.16-.004-.16-.034-.158-.05-.124-.042-.085-.002-.004-.003-.005-.084-.165-.002-.004-.003-.005-.086-.164-.002-.004-.003-.005-.088-.162-.002-.005-.003-.005-.09-.161-.002-.005-.003-.004-.092-.16-.003-.005-.002-.005-.094-.16-.003-.004-.003-.004-.096-.159-.002-.004-.003-.005-.098-.157-.003-.004-.003-.005-.1-.156-.003-.004-.003-.005-.101-.154-.003-.005-.003-.004-.104-.154-.003-.004-.003-.005-.106-.152-.003-.005-.003-.004-.108-.151-.003-.004-.003-.005-.11-.15-.003-.004-.003-.004-.111-.15-.004-.003-.003-.005-.113-.147-.004-.004-.003-.005-.115-.146-.004-.004-.003-.004-.117-.145-.004-.004-.003-.004-.12-.144-.003-.004-.003-.004-.121-.142-.004-.004-.003-.004-.123-.141-.003-.004-.004-.004-.125-.14-.003-.004-.004-.004-.127-.138-.003-.004-.004-.004-.128-.136-.004-.004-.004-.004-.13-.135-.004-.004-.004-.004-.132-.134-.003-.004-.004-.003-.134-.133-.004-.003-.004-.004-.135-.13-.004-.004-.004-.004-.136-.128-.004-.004-.004-.004-.138-.126-.004-.004-.004-.003-.14-.125-.004-.004-.004-.003-.14-.123-.005-.004-.004-.003-.142-.121-.004-.004-.004-.003-.144-.12-.004-.003-.004-.003-.145-.117-.004-.004-.004-.003-.147-.115-.004-.004-.004-.003-.148-.113-.004-.003-.004-.004-.149-.111-.004-.003-.004-.004-.05-.036-.14-.083-.15-.055-.16-.027zM6.634 3.28l-.161.008-.157.037-.147.066-.111.074-.04.032-.005.003-.004.004-.145.117-.004.003-.004.004-.144.119-.004.003-.004.004-.142.12-.004.004-.004.004-.141.123-.004.003-.004.004-.14.125-.004.003-.004.004-.138.126-.004.004-.004.004-.136.128-.004.004-.004.004-.135.13-.004.004-.004.003-.134.133-.004.003-.004.004-.132.134-.003.004-.004.004-.13.135-.004.004-.004.004-.128.136-.004.004-.004.004-.126.138-.004.004-.003.004-.125.14-.004.004-.003.004-.123.14-.004.005-.003.004-.121.142-.004.004-.003.004-.12.144-.003.004-.003.004-.117.145-.004.004-.003.004-.115.146-.004.005-.003.004-.113.147-.003.005-.004.004-.111.149-.003.004-.004.004-.11.15-.002.005-.003.004-.108.151-.003.004-.003.005-.106.152-.003.005-.003.004-.104.154-.003.004-.003.005-.102.154-.003.005-.002.004-.1.156-.003.005-.003.004-.098.157-.003.005-.003.004-.096.159-.002.004-.003.005-.094.16-.003.004-.002.004-.092.16-.003.005-.003.005-.09.161-.002.005-.003.005-.088.162-.002.005-.003.004-.086.164-.002.005-.002.004-.084.165-.003.005-.002.004-.082.166-.002.004-.003.005-.08.167-.002.004-.002.005-.078.168-.002.004-.002.005-.045.1-.053.153-.023.16.007.16.037.157.065.148.092.132.114.114.134.09.148.064.157.035.161.006.16-.025.152-.054.14-.08.121-.106.1-.126.065-.118.043-.095.074-.16.075-.155.077-.157.08-.155.08-.152.083-.155.085-.152.086-.15.088-.149.091-.15.094-.15.094-.147.095-.145.099-.146.1-.144.1-.142.104-.14.104-.14.11-.142.107-.137.11-.136.114-.136.113-.134.117-.133.118-.132.117-.129.122-.13.124-.127.123-.126.127-.125.127-.122.128-.12.132-.122.13-.115.133-.117.135-.115.135-.111.136-.11.037-.03.117-.11.094-.132.068-.146.04-.156.01-.161-.02-.16-.05-.154-.076-.141-.102-.125-.123-.104-.14-.08-.153-.051-.16-.023zM16 3.286h-.005l-.148.001h-.01l-.147.003h-.011l-.147.005h-.011l-.146.007h-.011l-.146.009h-.011l-.146.01h-.005l-.005.001-.146.012h-.011l-.145.014h-.006l-.005.001-.05.006-.158.031-.15.06-.135.088-.117.111-.094.13-.069.147-.04.156-.01.16.019.16.049.154.076.142.102.125.123.105.14.08.152.051.16.023.134-.003.045-.005.135-.013.133-.01.136-.01.135-.007.137-.006.136-.004.136-.003h.274l.136.003.136.004.136.006.136.007.136.01.133.01.135.013.135.014.135.016.134.018.132.018.134.021.133.023.133.024.133.025.13.027.132.03.132.03.129.031.13.034.129.035.129.036.13.04.126.038.128.042.126.042.128.045.127.047.126.047.12.048.127.051.123.052.006.002.147.048.16.021.16-.009.157-.038.147-.067.131-.093.112-.116.089-.135.062-.149.033-.158.004-.16-.027-.16-.055-.151-.083-.139-.107-.12-.127-.099-.118-.063-.004-.001-.005-.003-.005-.002-.133-.056-.005-.002-.005-.002-.134-.054-.004-.002-.005-.002-.135-.053-.005-.002-.005-.002-.135-.051-.005-.002-.005-.002-.135-.05-.005-.001-.005-.002-.137-.048-.005-.001-.005-.002-.137-.046-.005-.002-.005-.002-.137-.044-.005-.002-.005-.001-.138-.043-.006-.002-.005-.001-.138-.042-.005-.001-.005-.002-.14-.04H19.4l-.005-.002-.14-.038-.005-.001-.005-.002-.14-.036-.005-.001-.005-.001-.141-.035-.005-.001-.005-.001-.142-.033-.005-.001-.005-.001-.142-.031-.005-.002h-.005l-.142-.03-.005-.001-.005-.001-.143-.028h-.005l-.005-.002-.143-.025-.006-.001-.005-.001-.143-.024-.005-.001-.006-.001-.143-.022-.006-.001h-.005l-.144-.022h-.005l-.006-.001-.144-.019h-.005l-.006-.001-.144-.017h-.006l-.005-.001-.145-.016h-.011l-.145-.014H17.1l-.005-.001-.146-.012h-.01l-.146-.01-.006-.001h-.005l-.146-.009h-.011l-.147-.006h-.01l-.147-.005h-.011l-.147-.003h-.011l-.147-.001H16zm-5.482 1.366l-.16.008-.157.037-.123.053-.06.032-.005.002-.004.003-.128.069-.004.002-.005.003-.126.07-.005.003-.004.002-.126.072-.005.003-.004.003-.125.073-.004.003-.005.003-.124.075-.004.003-.005.002-.123.077-.004.003-.005.003-.122.078-.004.003-.005.003-.121.08-.004.002-.005.003-.12.082-.005.003-.004.003-.12.083-.004.003-.004.003-.118.084-.005.003-.004.003-.118.086-.004.003-.004.003-.117.088-.004.003-.004.003-.116.089-.004.003-.004.004-.114.09-.005.003-.004.003-.113.092-.004.004-.004.003-.113.093-.004.004-.004.003-.111.095-.005.003-.004.004-.11.096-.004.004-.004.003-.11.098-.003.003-.004.004-.108.1-.004.003-.004.003-.107.101-.004.004-.004.003-.106.102-.004.004-.003.004-.105.103-.004.004-.004.004-.103.105-.004.004-.004.003-.102.106-.003.004-.004.004-.1.107-.004.004-.004.004-.099.108-.004.004-.003.004-.098.11-.003.003-.004.004-.096.11-.004.005-.003.004-.095.111-.003.004-.004.004-.093.113-.003.004-.004.004-.092.113-.003.004-.003.005-.09.114-.004.004-.003.004-.089.116-.003.004-.003.004-.088.117-.003.004-.003.004-.086.118-.003.004-.003.005-.084.118-.003.004-.003.005-.083.12-.003.003-.003.005-.082.12-.003.005-.002.004-.068.103-.076.142-.048.154-.018.16.011.161.041.156.07.146.095.13.117.11.136.086.15.06.158.03.162.002.158-.03.15-.057.138-.085.119-.109.082-.105.065-.099.075-.11.077-.113.077-.107.08-.11.08-.108.084-.108.083-.105.086-.106.086-.104.088-.104.089-.101.09-.102.093-.101.093-.099.094-.097.095-.096.098-.097.098-.095.099-.093.1-.092.103-.091.101-.089.104-.088.104-.086.106-.086.106-.083.106-.082.109-.082.108-.079.11-.078.11-.076.112-.076.112-.074.113-.072.113-.071.115-.07.115-.068.118-.067.117-.065.12-.065.054-.029.135-.088.116-.111.094-.132.068-.146.04-.156.009-.161-.02-.16-.05-.153-.078-.142-.102-.125-.123-.103-.141-.079-.153-.051-.16-.022zm13.91 2.116l-.162.008-.157.037-.147.066-.132.092-.113.116-.09.134-.063.148-.034.157-.005.162.025.159.055.152.082.138.086.103.09.09.094.098.092.099.093.1.091.103.089.101.088.104.086.104.086.106.083.105.083.108.08.108.081.11.077.107.077.112.075.111.075.114.072.113.071.113.07.114.068.118.067.115.065.118.064.117.062.117.061.121.059.119.059.122.056.121.054.12.055.125.051.123.051.125.048.123.048.127.047.126.044.125.043.128.042.129.039.126.038.13.022.076.058.15.085.137.11.119.129.096.145.07.155.043.16.013.161-.017.154-.046.144-.075.126-.1.106-.12.082-.14.055-.151.025-.16-.005-.16-.026-.132-.023-.082-.002-.005-.001-.005-.042-.139-.001-.005-.002-.005-.043-.138-.001-.005-.002-.005-.044-.137-.002-.005-.002-.005-.046-.137-.002-.005-.001-.005-.048-.137-.002-.005-.002-.005-.05-.135-.001-.005-.002-.005-.051-.135-.002-.005-.002-.005-.053-.135-.002-.005-.002-.005-.054-.133-.002-.005-.002-.005-.057-.133-.002-.005-.002-.005-.057-.132-.003-.005-.002-.005-.06-.132-.001-.005-.002-.004-.061-.132-.003-.004-.002-.005-.063-.13-.002-.005-.002-.005-.064-.13-.003-.004-.002-.005-.066-.129-.002-.004-.003-.005-.067-.128-.002-.005-.003-.004-.069-.128-.002-.004-.003-.005-.07-.126-.003-.005-.003-.004-.072-.126-.002-.005-.003-.004-.074-.125-.002-.004-.003-.005-.075-.124-.003-.004-.003-.005-.076-.123-.003-.004-.003-.005-.078-.122-.003-.004-.003-.005-.08-.121-.003-.004-.003-.005-.081-.12-.003-.005-.003-.004-.083-.12-.003-.004-.003-.004-.084-.118-.003-.005-.003-.004-.086-.118-.003-.004-.004-.004-.087-.117-.003-.004-.003-.004-.09-.116-.002-.004-.004-.004-.09-.114-.003-.005-.004-.004-.091-.113-.004-.004-.003-.004-.094-.113-.003-.004-.003-.004-.095-.111-.004-.004-.003-.004-.096-.11-.004-.005-.003-.004-.098-.11-.004-.003-.003-.004-.1-.108-.003-.004-.004-.004-.1-.107-.004-.004-.004-.004-.102-.106-.003-.003-.004-.004-.093-.095-.124-.103-.14-.08-.153-.05-.16-.023zM4.45 12.826l-.161.002-.158.032-.15.06-.135.088-.118.11-.094.131-.069.146-.035.129-.026.132v.005l-.002.005-.025.143-.001.005-.001.006-.024.143-.001.005-.001.006-.022.143-.001.006-.001.005-.02.144-.001.005-.001.005-.019.145v.005l-.001.006-.017.144v.006l-.001.005-.016.145v.011l-.014.145v.005l-.001.006-.012.146v.01l-.01.146-.001.006v.005l-.009.146v.011l-.007.146v.011l-.004.147v.011l-.003.147v.01l-.002.148v.01l.001.148v.01l.003.147v.011l.005.147v.01l.007.147v.011l.009.146v.011l.01.146v.01l.013.146v.011l.014.145v.005l.001.006.016.145v.011l.018.144v.006l.001.005.019.144v.006l.001.005.021.144v.005l.002.006.022.143v.006l.002.005.024.143v.005l.002.006.025.143.001.005.001.005.028.143.001.005.001.005.03.142v.005l.002.006.03.141.002.005.001.005.033.142v.005l.002.005.035.14v.006l.002.005.036.14.002.005.001.005.038.14.001.005.002.005.04.14v.005l.002.005.042.138.001.006.002.005.042.138.002.005.002.005.017.054.064.148.09.134.114.114.132.092.148.065.157.037.16.007.16-.023.153-.052.14-.08.123-.104.102-.125.076-.142.049-.153.02-.16-.011-.161-.031-.13-.017-.051-.039-.126-.038-.13-.037-.128-.035-.13-.033-.128-.033-.134-.03-.13-.029-.131-.026-.13-.026-.133-.024-.133-.023-.133-.02-.132-.02-.136-.017-.132-.016-.135-.014-.135-.012-.133-.012-.138-.009-.133-.007-.136-.006-.138-.004-.134-.003-.136v-.274l.003-.136.004-.134.006-.139.007-.136.01-.133.01-.138.013-.132.014-.135.016-.135.017-.132.02-.137.02-.13.023-.134.024-.133.024-.126.016-.16-.014-.161-.044-.155-.072-.145-.098-.128-.12-.108-.137-.084-.15-.057-.16-.029zm26.698 1.601l-.161.01-.157.04-.146.067-.131.093-.112.117-.088.135-.061.149-.033.157-.005.134.006.14.006.176.003.177.001.178-.001.177-.003.178-.006.177-.007.176-.01.177-.012.176-.015.176-.016.173-.018.175-.02.175-.024.174-.025.175-.026.17-.03.174-.03.173-.033.17-.036.172-.037.17-.04.17-.042.172-.043.168-.045.166-.048.169-.05.167-.052.168-.053.164-.056.166-.058.166-.06.16-.062.165-.062.158-.066.165-.068.16-.07.16-.07.158-.075.159-.074.155-.079.158-.08.158-.06.15-.03.158-.001.161.029.159.058.15.085.137.108.119.13.097.144.07.156.044.16.013.16-.017.155-.046.143-.074.127-.1.107-.12.07-.115.083-.164.003-.005.002-.004.082-.166.002-.005.003-.004.08-.167.002-.005.002-.004.078-.168.002-.005.002-.004.076-.169.002-.004.002-.005.074-.17.002-.004.002-.005.072-.17.002-.005.002-.005.07-.171.001-.005.002-.005.068-.172.002-.004.002-.005.065-.173.002-.005.002-.005.063-.173.002-.005.002-.005.06-.174.003-.005.001-.005.06-.175.001-.005.002-.005.057-.176.001-.005.002-.005.055-.177.001-.005.002-.005.052-.177.002-.005.001-.005.051-.178.001-.005.002-.005.048-.179.002-.005v-.005l.047-.179.001-.005.002-.005.044-.18v-.005l.002-.005.042-.18.001-.006.001-.005.04-.181.001-.005.001-.005.037-.182.002-.005v-.005l.036-.182v-.006l.002-.005.033-.182v-.006l.002-.005.03-.183.001-.005.001-.005.029-.184v-.005l.001-.006.027-.184v-.005l.001-.005.024-.185v-.005l.001-.005.022-.185v-.006l.001-.005.02-.185v-.006l.001-.005.017-.186v-.005l.001-.005.015-.187v-.005l.001-.005.013-.187v-.01l.01-.187.001-.006v-.005l.009-.187v-.011l.006-.187v-.011l.004-.188v-.011l.001-.188v-.01l-.001-.188v-.011l-.004-.188v-.011l-.006-.187v-.011l-.007-.145-.022-.16-.05-.152-.08-.141-.103-.124-.125-.102-.141-.077-.153-.05-.16-.02zM.938 15L.777 15l-.158.032-.15.06-.136.087-.117.11-.095.131-.068.146-.04.156-.012.133-.001.14v.01l.001.188v.011l.004.188v.011l.006.187v.011l.008.187v.011l.011.187v.005l.001.005.013.187v.01l.016.187v.01l.018.186v.011l.02.185.001.005v.006l.022.185.001.005v.005l.025.185v.005l.001.005.027.184v.006l.001.005.029.184v.005l.001.005.031.183.001.005.001.006.033.182.001.005.001.006.035.182.001.005.001.005.038.182v.005l.002.005.04.181v.005l.002.005.042.18.001.006.001.005.044.18.002.005v.005l.047.18.001.004.002.005.048.179.002.005.001.005.05.178.002.005.001.005.053.177.002.005.001.005.055.177.002.005.001.005.057.176.002.005.001.005.06.175.001.005.002.005.061.174.002.005.002.005.063.173.002.005.002.005.065.173.002.005.002.004.067.172.002.005.002.005.07.171.002.005.002.005.072.17.002.005.002.004.074.17.002.005.002.004.076.169.002.004.002.005.078.168.002.004.002.005.08.167.003.004.002.005.082.166.002.004.003.005.02.04.086.136.11.118.13.095.146.07.156.041.16.012.16-.019.155-.048.142-.075.126-.1.105-.123.08-.14.054-.152.024-.16-.006-.16-.036-.158-.051-.123-.018-.034-.078-.158L3.1 22.1l-.074-.16-.071-.157-.07-.16-.068-.16-.067-.165-.062-.158-.062-.164-.059-.161-.058-.166-.056-.166-.053-.164-.052-.168-.05-.167-.048-.17-.045-.165-.043-.168-.043-.172-.039-.17-.037-.17-.036-.172-.033-.17-.03-.173-.03-.174-.027-.17-.025-.175-.022-.174-.021-.175-.018-.175-.017-.173-.014-.176-.012-.176-.01-.177-.007-.176-.006-.177-.003-.178L1.73 16v-.134l-.013-.16-.044-.156-.072-.144-.097-.129-.12-.108-.137-.085-.15-.057L.938 15zm26.798 2.024l-.16.007-.157.038-.148.066-.132.092-.113.115-.09.134-.062.148-.03.127-.001.004-.023.134-.024.133-.026.133-.026.13-.03.132-.03.129-.032.134-.033.128-.035.13-.037.128-.038.13-.04.126-.04.128-.044.128-.044.126-.046.126-.048.126-.05.125-.05.125-.051.122-.054.123-.055.122-.056.12-.058.122-.06.12-.061.12-.063.119-.062.116-.067.119-.066.116-.069.115-.069.115-.07.113-.073.113-.074.112-.076.113-.077.112-.077.107-.08.11-.08.107-.085.11-.044.056-.088.135-.06.15-.033.158-.002.16.027.16.057.15.083.138.108.12.128.098.144.072.155.045.16.015.161-.016.155-.044.144-.073.128-.098.09-.099.05-.061.003-.004.003-.005.089-.115.003-.004.003-.005.088-.116.003-.004.003-.005.086-.117.003-.004.003-.005.084-.118.003-.004.003-.005.083-.12.003-.004.003-.004.081-.12.003-.005.003-.004.08-.121.003-.005.003-.004.078-.122.003-.005.003-.004.077-.123.002-.005.003-.004.075-.124.003-.005.003-.004.073-.125.003-.005.003-.004.072-.126.002-.004.003-.005.07-.126.003-.005.002-.005.07-.127.002-.004.002-.005.068-.128.002-.005.002-.004.066-.13.003-.004.002-.005.064-.13.002-.004.003-.005.062-.13.002-.005.003-.005.06-.13.003-.005.002-.005.06-.132.002-.005.002-.005.057-.132.003-.005.002-.005.056-.133.002-.005.002-.005.054-.134.002-.004.002-.005.053-.135.002-.005.002-.005.051-.135.002-.005.002-.005.05-.135.001-.005.002-.005.048-.137.001-.005.002-.005.046-.137.002-.005.002-.005.044-.137.002-.005.002-.005.042-.138.002-.005.001-.006.042-.138.001-.005.002-.005.04-.14V19.4l.002-.005.038-.14.001-.005.002-.005.036-.14.001-.005.001-.005.035-.141.001-.005.001-.005.033-.142.001-.005.001-.005.031-.141.001-.006.002-.005.029-.142v-.005l.002-.005.028-.143v-.005l.002-.005.025-.143.001-.006.001-.005.024-.143.001-.005.001-.006.001-.006.01-.161-.02-.16-.05-.154-.077-.141-.102-.125-.123-.104-.141-.079-.153-.051-.16-.022zM6.841 22.71l-.16.024-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.018.16.011.161.041.156.07.146.077.109.04.048.003.004.003.004.095.111.003.004.004.004.096.11.004.005.003.004.098.109.003.004.004.004.1.108.003.004.003.004.101.107.004.004.003.004.102.105.004.004.004.004.103.105.004.004.004.003.105.104.003.004.004.003.106.102.004.004.004.004.107.1.004.004.004.004.108.099.004.003.004.004.11.098.003.003.004.004.11.096.004.003.005.004.11.095.005.003.004.004.113.093.004.003.004.004.113.091.004.004.005.003.114.09.004.004.004.003.116.089.004.003.004.003.117.088.004.003.004.003.118.086.004.003.005.003.118.084.004.003.005.003.119.083.004.003.005.003.12.081.005.003.004.003.121.08.005.003.004.003.122.078.005.003.004.003.123.076.005.003.004.003.124.075.005.003.004.003.125.073.004.003.005.002.126.073.004.002.005.003.126.07.005.003.004.002.128.07.004.002.005.002.128.067.005.003.004.002.13.066.004.002.005.003.13.064.004.002.005.003.13.062.005.002.004.003.132.06.004.003.005.002.132.06.005.002.005.002.132.057.005.002.005.002.133.057.005.002.005.002.133.054.005.002.005.002.13.05.154.045.16.016.16-.015.156-.045.144-.072.128-.098.108-.12.083-.138.057-.15.028-.16-.003-.16-.032-.159-.061-.149-.088-.135-.11-.117-.132-.094-.12-.058-.124-.049-.126-.051-.122-.051-.122-.054-.12-.054-.126-.058-.119-.057-.12-.06-.12-.06-.118-.063-.117-.064-.119-.066-.116-.066-.115-.068-.115-.07-.113-.07-.115-.074-.112-.074-.11-.075-.11-.076-.112-.08-.11-.08-.109-.081-.106-.082-.104-.082-.106-.086-.105-.087-.101-.086-.105-.091-.1-.09-.1-.091-.1-.094-.097-.094-.1-.098-.093-.095-.096-.1-.093-.098-.092-.101-.089-.1-.09-.102-.088-.104-.036-.043-.114-.114-.133-.091-.148-.065-.157-.036-.161-.006zm15.063 2.701l-.16.014-.156.044-.12.057-.06.034-.12.066-.117.064-.118.062-.12.061-.12.06-.118.057-.126.058-.12.054-.122.054-.122.05-.126.052-.125.05-.124.046-.127.047-.125.044-.129.043-.126.04-.13.042-.128.038-.127.035-.13.036-.131.034-.129.031-.132.03-.13.03-.135.027-.133.026-.13.023-.13.022-.137.021-.132.02-.134.017-.132.015-.138.015-.135.013-.133.01-.138.01-.136.007-.134.006-.136.004-.14.003-.16.018-.155.047-.142.076-.127.1-.105.122-.08.14-.054.151-.025.16.006.16.035.158.064.148.09.134.114.114.133.092.147.065.157.036.134.008.145-.002h.011l.147-.005h.01l.147-.007h.011l.146-.009h.011l.146-.01h.005l.005-.001.146-.012h.011l.145-.014h.005l.006-.001.145-.016h.011l.144-.018h.006l.005-.001.144-.02h.011l.144-.021.005-.001h.006l.143-.023.006-.001h.005l.143-.025h.005l.006-.002.143-.026h.005l.005-.002.143-.027.005-.001.005-.001.142-.03h.005l.005-.002.142-.03.005-.002.005-.001.142-.033.005-.001.005-.001.14-.035.006-.001.005-.001.14-.037h.005l.005-.002.14-.038.005-.002h.005l.14-.04.005-.002.005-.001.138-.042.005-.001.006-.002.138-.043.005-.001.005-.002.137-.044.005-.002.005-.002.137-.046.005-.002.005-.001.137-.048.005-.002.005-.002.135-.05.005-.001.005-.002.135-.051.005-.002.005-.002.135-.053.005-.002.004-.002.134-.054.005-.002.005-.002.133-.057.005-.002.005-.002.132-.057.005-.003.005-.002.132-.06.005-.001.004-.002.131-.061.005-.003.005-.002.13-.062.005-.003.005-.002.13-.064.004-.003.005-.002.128-.066.005-.002.005-.003.128-.067.005-.002.004-.003.127-.069.005-.002.005-.003.126-.07.005-.003.004-.003.065-.037.132-.093.112-.115.089-.135.062-.149.034-.157.003-.161-.026-.16-.055-.15-.082-.14-.107-.12-.127-.1-.144-.073-.154-.046-.16-.016zM6.33 26.818l-.16.023-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.02.16.012.161.041.156.07.146.094.13.096.093.032.026.004.003.004.004.145.117.004.003.004.004.146.115.005.003.004.004.147.113.005.003.004.004.149.111.004.003.004.003.15.11.005.003.004.003.151.108.004.003.005.003.152.106.005.003.004.003.154.104.004.003.005.003.154.102.005.002.004.003.156.1.005.003.004.003.157.098.005.003.004.002.159.096.004.003.005.003.16.094.004.003.004.002.16.092.005.003.005.002.161.09.005.003.005.002.162.088.005.003.004.002.164.086.005.003.004.002.165.084.005.003.004.002.166.082.004.002.005.003.167.08.004.002.005.002.168.078.004.002.005.002.168.076.005.002.005.002.17.074.004.002.005.002.17.072.005.002.005.002.17.07.006.002.005.001.171.068.005.002.005.002.173.065.005.002.005.002.173.063.005.002.005.002.174.06.005.003.005.001.175.06.005.001.005.002.176.057.005.001.005.002.176.055.006.001.005.002.177.052.005.002.005.001.178.05.005.002.005.002.178.048.006.001.005.002.179.046.005.001.005.002.18.044h.005l.005.002.18.042.006.001.005.001.159.035.16.02.16-.01.157-.04.146-.069.13-.094.112-.117.087-.136.06-.149.033-.158.002-.161-.028-.159-.057-.15-.084-.138-.108-.12-.128-.098-.144-.072-.128-.039-.154-.033-.168-.04-.171-.041-.17-.044-.168-.046-.167-.047-.168-.05-.165-.051-.166-.054-.166-.056-.163-.057-.165-.06-.161-.062-.164-.064-.16-.065-.16-.068-.162-.07-.157-.07-.157-.074-.157-.075-.156-.077-.153-.079-.156-.082-.153-.082-.154-.086-.15-.086-.152-.09-.148-.09-.147-.092-.149-.095-.145-.095-.144-.098-.145-.1-.143-.102-.14-.103-.14-.104-.14-.108-.139-.11-.136-.11-.027-.022-.133-.091-.148-.065-.157-.036-.161-.006zm19.215.087l-.16.01-.157.039-.146.067-.11.076-.064.051-.139.11-.14.108-.14.104-.14.103-.143.101-.145.101-.144.098-.145.095-.149.095-.148.093-.147.089-.152.09-.15.086-.154.086-.153.082-.156.082-.153.079-.156.077-.157.075-.158.073-.157.071-.16.07-.16.068-.161.065-.164.064-.161.061-.165.06-.163.058-.166.056-.166.054-.166.051-.167.05-.167.047-.17.046-.168.044-.171.042-.168.039-.17.037-.11.023-.154.047-.143.075-.126.1-.106.122-.081.139-.054.152-.025.16.006.16.035.158.063.148.09.133.114.115.132.092.148.065.157.037.16.007.133-.016.115-.024.005-.001.005-.001.181-.04h.005l.005-.002.18-.042.006-.001.005-.001.18-.044.005-.002.005-.001.18-.046.004-.002h.005l.179-.05h.005l.005-.002.178-.05.005-.002.005-.002.177-.052.005-.002.005-.001.177-.055.005-.002.005-.001.176-.057.005-.002.005-.002.175-.059.005-.001.005-.002.174-.061.005-.002.005-.002.173-.063.005-.002.005-.002.173-.065.004-.002.005-.002.172-.068.005-.002.005-.002.171-.07.005-.001.005-.002.17-.072.005-.002.004-.002.17-.074.005-.002.004-.002.169-.076.004-.002.005-.002.168-.078.004-.002.005-.003.167-.08.004-.002.005-.002.166-.082.004-.002.005-.003.165-.084.004-.002.005-.003.163-.086.005-.002.005-.003.162-.088.005-.002.005-.003.161-.09.005-.002.004-.003.16-.092.005-.003.005-.002.16-.094.004-.003.004-.003.158-.096.005-.002.004-.003.158-.098.004-.003.005-.003.156-.1.004-.003.004-.003.155-.101.005-.003.004-.003.154-.104.004-.003.004-.003.153-.106.004-.003.005-.003.151-.108.004-.003.005-.003.15-.11.004-.003.004-.003.149-.112.004-.003.004-.003.148-.113.004-.004.004-.003.147-.115.004-.004.004-.003.068-.055.116-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.05-.153-.08-.14-.103-.125-.124-.102-.142-.077-.153-.05-.16-.02z"}));function Gw(){return(Gw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var Ww=({styles:e={},...t})=>Vb("svg",Gw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M23.637 13.902l-7.625-5.535-7.624 5.535 2.912 8.956h9.425l2.912-8.956zm-1.017.33l-2.524 7.762H11.93l-2.524-7.762 6.607-4.796 6.608 4.796zM16.012.311c-1.448.02-2.93.157-4.302.628-.852.447-.255 1.863.66 1.574 2.255-.608 4.648-.607 6.922-.108.934.075 1.228-1.376.338-1.67C18.451.44 17.227.317 16.012.311zm9.012 2.934c-.913-.104-1.272 1.258-.454 1.648 1.834 1.36 3.293 3.185 4.31 5.22.526.776 1.842.098 1.515-.78a15.522 15.522 0 00-5.06-6.006c-.1-.044-.203-.07-.31-.082zM6.65 3.59c-.762.089-1.24.809-1.805 1.267C3.38 6.295 2.163 8.007 1.37 9.905c-.266.898 1.094 1.484 1.564.675a14.825 14.825 0 014.327-5.56c.476-.515.09-1.419-.612-1.431zm9.362.007c-.698.066-1.689-.16-2.033.635-.282.733.535 1.358 1.217 1.125 1.806-.147 3.63.203 5.293.907.902.255 1.472-1.112.656-1.573-1.6-.735-3.374-1.089-5.133-1.094zm-5.479 1.365c-.835.15-1.517.76-2.21 1.226-1.203.94-2.318 2.061-3.057 3.402-.33.904 1.063 1.552 1.547.723 1.045-1.656 2.596-2.925 4.285-3.873.545-.499.171-1.463-.565-1.478zm13.903 2.115c-.875-.07-1.22 1.173-.501 1.627 1.325 1.34 2.188 3.062 2.748 4.84.468.84 1.869.21 1.557-.699-.604-2.118-1.751-4.097-3.351-5.615a.93.93 0 00-.453-.153zM4.467 13.132c-.822-.07-.996.826-1.046 1.455-.256 1.93-.094 3.933.562 5.769.406.844 1.807.365 1.612-.551a11.498 11.498 0 01-.334-5.808.874.874 0 00-.794-.865zm26.687 1.6c-.746-.037-1.014.785-.879 1.395.043 2.393-.57 4.771-1.66 6.894-.31.884 1.02 1.536 1.53.75a15.632 15.632 0 001.821-8.372.876.876 0 00-.812-.667zm-30.197.571c-.782-.073-1.044.775-.933 1.404.068 2.414.661 4.833 1.809 6.962.534.77 1.842.076 1.505-.798a14.833 14.833 0 01-1.603-6.861.876.876 0 00-.778-.707zm26.787 2.024c-.777-.048-.952.797-1.021 1.392-.354 1.692-1.202 3.231-2.216 4.608-.407.872.925 1.638 1.48.852 1.361-1.733 2.296-3.827 2.582-6.017a.874.874 0 00-.825-.835zM6.857 23.012c-.808.018-1.082 1.122-.47 1.59 1.393 1.607 3.187 2.886 5.194 3.599.91.222 1.43-1.165.598-1.596a11.495 11.495 0 01-4.723-3.396.899.899 0 00-.599-.197zm15.057 2.7c-.81.194-1.504.76-2.325.972-1.203.458-2.5.536-3.758.664-.869.307-.573 1.728.346 1.663 2.201-.034 4.412-.626 6.293-1.778.604-.495.227-1.532-.556-1.521zM6.346 27.118c-.833.008-1.11 1.218-.395 1.617 1.986 1.602 4.358 2.749 6.868 3.226.933.076 1.227-1.376.338-1.67a14.838 14.838 0 01-6.345-3.066.929.929 0 00-.466-.107zm19.208.087c-.766.09-1.241.841-1.922 1.158-1.516.991-3.251 1.58-4.996 2.005-.872.405-.346 1.849.584 1.604 2.543-.526 4.98-1.66 6.963-3.344.47-.52.072-1.42-.63-1.423z"}));function Uw(){return(Uw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var qw=({styles:e={},...t})=>Vb("svg",Uw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M13.51 9.081v4.428H9.08v4.982h4.428v4.428h4.982V18.49h4.428v-4.982H18.49V9.081h-4.982zm.83.83h3.32v4.428h4.429v3.322H17.66v4.428h-3.32v-4.454H9.91v-3.296h4.428V9.911zM16 0h-.005l-.188.001h-.011l-.188.004h-.011l-.187.006h-.011l-.187.008h-.005L15.2.02l-.187.01h-.005l-.005.001-.187.013h-.011L14.62.06h-.01l-.186.018h-.011l-.185.02-.005.001h-.006l-.185.022-.005.001h-.005l-.185.025h-.005l-.005.001-.185.027h-.005l-.005.001-.184.029h-.005l-.005.001-.183.031-.006.001-.005.001-.182.033-.006.001-.005.001-.182.035-.005.001-.005.001-.182.038h-.005l-.005.002-.181.04h-.005l-.005.002-.18.042-.006.001-.005.001-.18.044-.005.002h-.005l-.17.045-.152.054-.139.082-.121.106-.1.127-.074.143-.046.155-.017.16.013.16.043.156.07.145.097.13.119.108.137.085.15.058.159.03.16-.001.133-.023.165-.043.168-.041.171-.04.171-.037.172-.036.17-.033.173-.03.17-.03.177-.027.171-.025.175-.022.175-.02.175-.02.176-.016.175-.014.177-.012.176-.01.177-.007.174-.006.177-.003L16 1.73h.177l.178.004.174.006.177.007.176.01.177.012.175.014.176.017.175.018.175.02.175.023.171.025.176.027.17.03.174.03.17.033.171.036.154.033.16.02.161-.01.156-.04.146-.069.131-.094.111-.117.087-.135.061-.15.032-.158.002-.16-.027-.16-.057-.15L20 .714l-.108-.12-.128-.097-.145-.073-.128-.038-.158-.035-.005-.001-.005-.001L19.14.31h-.005l-.005-.002-.182-.035h-.006l-.005-.002-.182-.033h-.006l-.005-.002-.183-.03-.005-.001-.006-.001-.183-.029h-.005l-.006-.001-.184-.027h-.005l-.005-.001-.185-.024h-.005L17.968.12 17.783.1l-.006-.001h-.005l-.185-.02h-.006l-.005-.001L17.39.06h-.005L17.38.06l-.187-.015h-.005l-.005-.001-.187-.013h-.011L16.8.02h-.011L16.6.01h-.011l-.187-.006h-.011L16.204 0h-.011L16.005 0H16zm9.015 2.935l-.16.004-.158.033-.15.062-.134.09-.116.111-.093.132-.067.147-.038.156-.01.161.022.16.05.153.078.141.103.124.102.087.045.034.142.106.137.105.14.11.136.11.135.112.134.115.134.117.13.115.132.122.128.12.127.122.126.125.124.126.124.128.121.13.118.128.118.132.117.133.113.134.113.136.11.136.109.137.109.142.104.14.103.14.101.142.1.144.099.146.095.145.094.147.093.15.092.15.087.149.087.15.084.152.084.155.08.152.08.155.04.081.084.138.11.119.128.096.145.072.155.043.16.013.16-.016.155-.046.144-.074.127-.099.106-.12.083-.14.055-.151.026-.16-.004-.16-.034-.158-.05-.124-.042-.085-.002-.004-.003-.005-.084-.165-.002-.004-.003-.005-.086-.164-.002-.004-.003-.005-.088-.162-.002-.005-.003-.005-.09-.161-.002-.005-.003-.004-.092-.16-.003-.005-.002-.005-.094-.16-.003-.004-.003-.004-.096-.159-.002-.004-.003-.005-.098-.157-.003-.004-.003-.005-.1-.156-.003-.004-.003-.005-.101-.154-.003-.005-.003-.004-.104-.154-.003-.004-.003-.005-.106-.152-.003-.005-.003-.004-.108-.151-.003-.004-.003-.005-.11-.15-.003-.004-.003-.004-.111-.15-.004-.003-.003-.005-.113-.147-.004-.004-.003-.005-.115-.146-.004-.004-.003-.004-.117-.145-.004-.004-.003-.004-.12-.144-.003-.004-.003-.004-.121-.142-.004-.004-.003-.004-.123-.141-.003-.004-.004-.004-.125-.14-.003-.004-.004-.004-.127-.138-.003-.004-.004-.004-.128-.136-.004-.004-.004-.004-.13-.135-.004-.004-.004-.004-.132-.134-.003-.004-.004-.003-.134-.133-.004-.003-.004-.004-.135-.13-.004-.004-.004-.004-.136-.128-.004-.004-.004-.004-.138-.126-.004-.004-.004-.003-.14-.125-.004-.004-.004-.003-.14-.123-.005-.004-.004-.003-.142-.121-.004-.004-.004-.003-.144-.12-.004-.003-.004-.003-.145-.117-.004-.004-.004-.003-.147-.115-.004-.004-.004-.003-.148-.113-.004-.003-.004-.004-.149-.111-.004-.003-.004-.004-.05-.036-.14-.083-.15-.055-.16-.027zM6.634 3.28l-.161.008-.157.037-.147.066-.111.074-.04.032-.005.003-.004.004-.145.117-.004.003-.004.004-.144.119-.004.003-.004.004-.142.12-.004.004-.004.004-.141.123-.004.003-.004.004-.14.125-.004.003-.004.004-.138.126-.004.004-.004.004-.136.128-.004.004-.004.004-.135.13-.004.004-.004.003-.134.133-.004.003-.004.004-.132.134-.003.004-.004.004-.13.135-.004.004-.004.004-.128.136-.004.004-.004.004-.126.138-.004.004-.003.004-.125.14-.004.004-.003.004-.123.14-.004.005-.003.004-.121.142-.004.004-.003.004-.12.144-.003.004-.003.004-.117.145-.004.004-.003.004-.115.146-.004.005-.003.004-.113.147-.003.005-.004.004-.111.149-.003.004-.004.004-.11.15-.002.005-.003.004-.108.151-.003.004-.003.005-.106.152-.003.005-.003.004-.104.154-.003.004-.003.005-.102.154-.003.005-.002.004-.1.156-.003.005-.003.004-.098.157-.003.005-.003.004-.096.159-.002.004-.003.005-.094.16-.003.004-.002.004-.092.16-.003.005-.003.005-.09.161-.002.005-.003.005-.088.162-.002.005-.003.004-.086.164-.002.005-.002.004-.084.165-.003.005-.002.004-.082.166-.002.004-.003.005-.08.167-.002.004-.002.005-.078.168-.002.004-.002.005-.045.1-.053.153-.023.16.007.16.037.157.065.148.092.132.114.114.134.09.148.064.157.035.161.006.16-.025.152-.054.14-.08.121-.106.1-.126.065-.118.043-.095.074-.16.075-.155.077-.157.08-.155.08-.152.083-.155.085-.152.086-.15.088-.149.091-.15.094-.15.094-.147.095-.145.099-.146.1-.144.1-.142.104-.14.104-.14.11-.142.107-.137.11-.136.114-.136.113-.134.117-.133.118-.132.117-.129.122-.13.124-.127.123-.126.127-.125.127-.122.128-.12.132-.122.13-.115.133-.117.135-.115.135-.111.136-.11.037-.03.117-.11.094-.132.068-.146.04-.156.01-.161-.02-.16-.05-.154-.076-.141-.102-.125-.123-.104-.14-.08-.153-.051-.16-.023zM16 3.286h-.005l-.148.001h-.01l-.147.003h-.011l-.147.005h-.011l-.146.007h-.011l-.146.009h-.011l-.146.01h-.005l-.005.001-.146.012h-.011l-.145.014h-.006l-.005.001-.05.006-.158.031-.15.06-.135.088-.117.111-.094.13-.069.147-.04.156-.01.16.019.16.049.154.076.142.102.125.123.105.14.08.152.051.16.023.134-.003.045-.005.135-.013.133-.01.136-.01.135-.007.137-.006.136-.004.136-.003h.274l.136.003.136.004.136.006.136.007.136.01.133.01.135.013.135.014.135.016.134.018.132.018.134.021.133.023.133.024.133.025.13.027.132.03.132.03.129.031.13.034.129.035.129.036.13.04.126.038.128.042.126.042.128.045.127.047.126.047.12.048.127.051.123.052.006.002.147.048.16.021.16-.009.157-.038.147-.067.131-.093.112-.116.089-.135.062-.149.033-.158.004-.16-.027-.16-.055-.151-.083-.139-.107-.12-.127-.099-.118-.063-.004-.001-.005-.003-.005-.002-.133-.056-.005-.002-.005-.002-.134-.054-.004-.002-.005-.002-.135-.053-.005-.002-.005-.002-.135-.051-.005-.002-.005-.002-.135-.05-.005-.001-.005-.002-.137-.048-.005-.001-.005-.002-.137-.046-.005-.002-.005-.002-.137-.044-.005-.002-.005-.001-.138-.043-.006-.002-.005-.001-.138-.042-.005-.001-.005-.002-.14-.04H19.4l-.005-.002-.14-.038-.005-.001-.005-.002-.14-.036-.005-.001-.005-.001-.141-.035-.005-.001-.005-.001-.142-.033-.005-.001-.005-.001-.142-.031-.005-.002h-.005l-.142-.03-.005-.001-.005-.001-.143-.028h-.005l-.005-.002-.143-.025-.006-.001-.005-.001-.143-.024-.005-.001-.006-.001-.143-.022-.006-.001h-.005l-.144-.022h-.005l-.006-.001-.144-.019h-.005l-.006-.001-.144-.017h-.006l-.005-.001-.145-.016h-.011l-.145-.014H17.1l-.005-.001-.146-.012h-.01l-.146-.01-.006-.001h-.005l-.146-.009h-.011l-.147-.006h-.01l-.147-.005h-.011l-.147-.003h-.011l-.147-.001H16zm-5.482 1.366l-.16.008-.157.037-.123.053-.06.032-.005.002-.004.003-.128.069-.004.002-.005.003-.126.07-.005.003-.004.002-.126.072-.005.003-.004.003-.125.073-.004.003-.005.003-.124.075-.004.003-.005.002-.123.077-.004.003-.005.003-.122.078-.004.003-.005.003-.121.08-.004.002-.005.003-.12.082-.005.003-.004.003-.12.083-.004.003-.004.003-.118.084-.005.003-.004.003-.118.086-.004.003-.004.003-.117.088-.004.003-.004.003-.116.089-.004.003-.004.004-.114.09-.005.003-.004.003-.113.092-.004.004-.004.003-.113.093-.004.004-.004.003-.111.095-.005.003-.004.004-.11.096-.004.004-.004.003-.11.098-.003.003-.004.004-.108.1-.004.003-.004.003-.107.101-.004.004-.004.003-.106.102-.004.004-.003.004-.105.103-.004.004-.004.004-.103.105-.004.004-.004.003-.102.106-.003.004-.004.004-.1.107-.004.004-.004.004-.099.108-.004.004-.003.004-.098.11-.003.003-.004.004-.096.11-.004.005-.003.004-.095.111-.003.004-.004.004-.093.113-.003.004-.004.004-.092.113-.003.004-.003.005-.09.114-.004.004-.003.004-.089.116-.003.004-.003.004-.088.117-.003.004-.003.004-.086.118-.003.004-.003.005-.084.118-.003.004-.003.005-.083.12-.003.003-.003.005-.082.12-.003.005-.002.004-.068.103-.076.142-.048.154-.018.16.011.161.041.156.07.146.095.13.117.11.136.086.15.06.158.03.162.002.158-.03.15-.057.138-.085.119-.109.082-.105.065-.099.075-.11.077-.113.077-.107.08-.11.08-.108.084-.108.083-.105.086-.106.086-.104.088-.104.089-.101.09-.102.093-.101.093-.099.094-.097.095-.096.098-.097.098-.095.099-.093.1-.092.103-.091.101-.089.104-.088.104-.086.106-.086.106-.083.106-.082.109-.082.108-.079.11-.078.11-.076.112-.076.112-.074.113-.072.113-.071.115-.07.115-.068.118-.067.117-.065.12-.065.054-.029.135-.088.116-.111.094-.132.068-.146.04-.156.009-.161-.02-.16-.05-.153-.078-.142-.102-.125-.123-.103-.141-.079-.153-.051-.16-.022zm13.91 2.116l-.162.008-.157.037-.147.066-.132.092-.113.116-.09.134-.063.148-.034.157-.005.162.025.159.055.152.082.138.086.103.09.09.094.098.092.099.093.1.091.103.089.101.088.104.086.104.086.106.083.105.083.108.08.108.081.11.077.107.077.112.075.111.075.114.072.113.071.113.07.114.068.118.067.115.065.118.064.117.062.117.061.121.059.119.059.122.056.121.054.12.055.125.051.123.051.125.048.123.048.127.047.126.044.125.043.128.042.129.039.126.038.13.022.076.058.15.085.137.11.119.129.096.145.07.155.043.16.013.161-.017.154-.046.144-.075.126-.1.106-.12.082-.14.055-.151.025-.16-.005-.16-.026-.132-.023-.082-.002-.005-.001-.005-.042-.139-.001-.005-.002-.005-.043-.138-.001-.005-.002-.005-.044-.137-.002-.005-.002-.005-.046-.137-.002-.005-.001-.005-.048-.137-.002-.005-.002-.005-.05-.135-.001-.005-.002-.005-.051-.135-.002-.005-.002-.005-.053-.135-.002-.005-.002-.005-.054-.133-.002-.005-.002-.005-.057-.133-.002-.005-.002-.005-.057-.132-.003-.005-.002-.005-.06-.132-.001-.005-.002-.004-.061-.132-.003-.004-.002-.005-.063-.13-.002-.005-.002-.005-.064-.13-.003-.004-.002-.005-.066-.129-.002-.004-.003-.005-.067-.128-.002-.005-.003-.004-.069-.128-.002-.004-.003-.005-.07-.126-.003-.005-.003-.004-.072-.126-.002-.005-.003-.004-.074-.125-.002-.004-.003-.005-.075-.124-.003-.004-.003-.005-.076-.123-.003-.004-.003-.005-.078-.122-.003-.004-.003-.005-.08-.121-.003-.004-.003-.005-.081-.12-.003-.005-.003-.004-.083-.12-.003-.004-.003-.004-.084-.118-.003-.005-.003-.004-.086-.118-.003-.004-.004-.004-.087-.117-.003-.004-.003-.004-.09-.116-.002-.004-.004-.004-.09-.114-.003-.005-.004-.004-.091-.113-.004-.004-.003-.004-.094-.113-.003-.004-.003-.004-.095-.111-.004-.004-.003-.004-.096-.11-.004-.005-.003-.004-.098-.11-.004-.003-.003-.004-.1-.108-.003-.004-.004-.004-.1-.107-.004-.004-.004-.004-.102-.106-.003-.003-.004-.004-.093-.095-.124-.103-.14-.08-.153-.05-.16-.023zM4.45 12.826l-.161.002-.158.032-.15.06-.135.088-.118.11-.094.131-.069.146-.035.129-.026.132v.005l-.002.005-.025.143-.001.005-.001.006-.024.143-.001.005-.001.006-.022.143-.001.006-.001.005-.02.144-.001.005-.001.005-.019.145v.005l-.001.006-.017.144v.006l-.001.005-.016.145v.011l-.014.145v.005l-.001.006-.012.146v.01l-.01.146-.001.006v.005l-.009.146v.011l-.007.146v.011l-.004.147v.011l-.003.147v.01l-.002.148v.01l.001.148v.01l.003.147v.011l.005.147v.01l.007.147v.011l.009.146v.011l.01.146v.01l.013.146v.011l.014.145v.005l.001.006.016.145v.011l.018.144v.006l.001.005.019.144v.006l.001.005.021.144v.005l.002.006.022.143v.006l.002.005.024.143v.005l.002.006.025.143.001.005.001.005.028.143.001.005.001.005.03.142v.005l.002.006.03.141.002.005.001.005.033.142v.005l.002.005.035.14v.006l.002.005.036.14.002.005.001.005.038.14.001.005.002.005.04.14v.005l.002.005.042.138.001.006.002.005.042.138.002.005.002.005.017.054.064.148.09.134.114.114.132.092.148.065.157.037.16.007.16-.023.153-.052.14-.08.123-.104.102-.125.076-.142.049-.153.02-.16-.011-.161-.031-.13-.017-.051-.039-.126-.038-.13-.037-.128-.035-.13-.033-.128-.033-.134-.03-.13-.029-.131-.026-.13-.026-.133-.024-.133-.023-.133-.02-.132-.02-.136-.017-.132-.016-.135-.014-.135-.012-.133-.012-.138-.009-.133-.007-.136-.006-.138-.004-.134-.003-.136v-.274l.003-.136.004-.134.006-.139.007-.136.01-.133.01-.138.013-.132.014-.135.016-.135.017-.132.02-.137.02-.13.023-.134.024-.133.024-.126.016-.16-.014-.161-.044-.155-.072-.145-.098-.128-.12-.108-.137-.084-.15-.057-.16-.029zm26.698 1.601l-.161.01-.157.04-.146.067-.131.093-.112.117-.088.135-.061.149-.033.157-.005.134.006.14.006.176.003.177.001.178-.001.177-.003.178-.006.177-.007.176-.01.177-.012.176-.015.176-.016.173-.018.175-.02.175-.024.174-.025.175-.026.17-.03.174-.03.173-.033.17-.036.172-.037.17-.04.17-.042.172-.043.168-.045.166-.048.169-.05.167-.052.168-.053.164-.056.166-.058.166-.06.16-.062.165-.062.158-.066.165-.068.16-.07.16-.07.158-.075.159-.074.155-.079.158-.08.158-.06.15-.03.158-.001.161.029.159.058.15.085.137.108.119.13.097.144.07.156.044.16.013.16-.017.155-.046.143-.074.127-.1.107-.12.07-.115.083-.164.003-.005.002-.004.082-.166.002-.005.003-.004.08-.167.002-.005.002-.004.078-.168.002-.005.002-.004.076-.169.002-.004.002-.005.074-.17.002-.004.002-.005.072-.17.002-.005.002-.005.07-.171.001-.005.002-.005.068-.172.002-.004.002-.005.065-.173.002-.005.002-.005.063-.173.002-.005.002-.005.06-.174.003-.005.001-.005.06-.175.001-.005.002-.005.057-.176.001-.005.002-.005.055-.177.001-.005.002-.005.052-.177.002-.005.001-.005.051-.178.001-.005.002-.005.048-.179.002-.005v-.005l.047-.179.001-.005.002-.005.044-.18v-.005l.002-.005.042-.18.001-.006.001-.005.04-.181.001-.005.001-.005.037-.182.002-.005v-.005l.036-.182v-.006l.002-.005.033-.182v-.006l.002-.005.03-.183.001-.005.001-.005.029-.184v-.005l.001-.006.027-.184v-.005l.001-.005.024-.185v-.005l.001-.005.022-.185v-.006l.001-.005.02-.185v-.006l.001-.005.017-.186v-.005l.001-.005.015-.187v-.005l.001-.005.013-.187v-.01l.01-.187.001-.006v-.005l.009-.187v-.011l.006-.187v-.011l.004-.188v-.011l.001-.188v-.01l-.001-.188v-.011l-.004-.188v-.011l-.006-.187v-.011l-.007-.145-.022-.16-.05-.152-.08-.141-.103-.124-.125-.102-.141-.077-.153-.05-.16-.02zM.938 15L.777 15l-.158.032-.15.06-.136.087-.117.11-.095.131-.068.146-.04.156-.012.133-.001.14v.01l.001.188v.011l.004.188v.011l.006.187v.011l.008.187v.011l.011.187v.005l.001.005.013.187v.01l.016.187v.01l.018.186v.011l.02.185.001.005v.006l.022.185.001.005v.005l.025.185v.005l.001.005.027.184v.006l.001.005.029.184v.005l.001.005.031.183.001.005.001.006.033.182.001.005.001.006.035.182.001.005.001.005.038.182v.005l.002.005.04.181v.005l.002.005.042.18.001.006.001.005.044.18.002.005v.005l.047.18.001.004.002.005.048.179.002.005.001.005.05.178.002.005.001.005.053.177.002.005.001.005.055.177.002.005.001.005.057.176.002.005.001.005.06.175.001.005.002.005.061.174.002.005.002.005.063.173.002.005.002.005.065.173.002.005.002.004.067.172.002.005.002.005.07.171.002.005.002.005.072.17.002.005.002.004.074.17.002.005.002.004.076.169.002.004.002.005.078.168.002.004.002.005.08.167.003.004.002.005.082.166.002.004.003.005.02.04.086.136.11.118.13.095.146.07.156.041.16.012.16-.019.155-.048.142-.075.126-.1.105-.123.08-.14.054-.152.024-.16-.006-.16-.036-.158-.051-.123-.018-.034-.078-.158L3.1 22.1l-.074-.16-.071-.157-.07-.16-.068-.16-.067-.165-.062-.158-.062-.164-.059-.161-.058-.166-.056-.166-.053-.164-.052-.168-.05-.167-.048-.17-.045-.165-.043-.168-.043-.172-.039-.17-.037-.17-.036-.172-.033-.17-.03-.173-.03-.174-.027-.17-.025-.175-.022-.174-.021-.175-.018-.175-.017-.173-.014-.176-.012-.176-.01-.177-.007-.176-.006-.177-.003-.178L1.73 16v-.134l-.013-.16-.044-.156-.072-.144-.097-.129-.12-.108-.137-.085-.15-.057L.938 15zm26.798 2.024l-.16.007-.157.038-.148.066-.132.092-.113.115-.09.134-.062.148-.03.127-.001.004-.023.134-.024.133-.026.133-.026.13-.03.132-.03.129-.032.134-.033.128-.035.13-.037.128-.038.13-.04.126-.04.128-.044.128-.044.126-.046.126-.048.126-.05.125-.05.125-.051.122-.054.123-.055.122-.056.12-.058.122-.06.12-.061.12-.063.119-.062.116-.067.119-.066.116-.069.115-.069.115-.07.113-.073.113-.074.112-.076.113-.077.112-.077.107-.08.11-.08.107-.085.11-.044.056-.088.135-.06.15-.033.158-.002.16.027.16.057.15.083.138.108.12.128.098.144.072.155.045.16.015.161-.016.155-.044.144-.073.128-.098.09-.099.05-.061.003-.004.003-.005.089-.115.003-.004.003-.005.088-.116.003-.004.003-.005.086-.117.003-.004.003-.005.084-.118.003-.004.003-.005.083-.12.003-.004.003-.004.081-.12.003-.005.003-.004.08-.121.003-.005.003-.004.078-.122.003-.005.003-.004.077-.123.002-.005.003-.004.075-.124.003-.005.003-.004.073-.125.003-.005.003-.004.072-.126.002-.004.003-.005.07-.126.003-.005.002-.005.07-.127.002-.004.002-.005.068-.128.002-.005.002-.004.066-.13.003-.004.002-.005.064-.13.002-.004.003-.005.062-.13.002-.005.003-.005.06-.13.003-.005.002-.005.06-.132.002-.005.002-.005.057-.132.003-.005.002-.005.056-.133.002-.005.002-.005.054-.134.002-.004.002-.005.053-.135.002-.005.002-.005.051-.135.002-.005.002-.005.05-.135.001-.005.002-.005.048-.137.001-.005.002-.005.046-.137.002-.005.002-.005.044-.137.002-.005.002-.005.042-.138.002-.005.001-.006.042-.138.001-.005.002-.005.04-.14V19.4l.002-.005.038-.14.001-.005.002-.005.036-.14.001-.005.001-.005.035-.141.001-.005.001-.005.033-.142.001-.005.001-.005.031-.141.001-.006.002-.005.029-.142v-.005l.002-.005.028-.143v-.005l.002-.005.025-.143.001-.006.001-.005.024-.143.001-.005.001-.006.001-.006.01-.161-.02-.16-.05-.154-.077-.141-.102-.125-.123-.104-.141-.079-.153-.051-.16-.022zM6.841 22.71l-.16.024-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.018.16.011.161.041.156.07.146.077.109.04.048.003.004.003.004.095.111.003.004.004.004.096.11.004.005.003.004.098.109.003.004.004.004.1.108.003.004.003.004.101.107.004.004.003.004.102.105.004.004.004.004.103.105.004.004.004.003.105.104.003.004.004.003.106.102.004.004.004.004.107.1.004.004.004.004.108.099.004.003.004.004.11.098.003.003.004.004.11.096.004.003.005.004.11.095.005.003.004.004.113.093.004.003.004.004.113.091.004.004.005.003.114.09.004.004.004.003.116.089.004.003.004.003.117.088.004.003.004.003.118.086.004.003.005.003.118.084.004.003.005.003.119.083.004.003.005.003.12.081.005.003.004.003.121.08.005.003.004.003.122.078.005.003.004.003.123.076.005.003.004.003.124.075.005.003.004.003.125.073.004.003.005.002.126.073.004.002.005.003.126.07.005.003.004.002.128.07.004.002.005.002.128.067.005.003.004.002.13.066.004.002.005.003.13.064.004.002.005.003.13.062.005.002.004.003.132.06.004.003.005.002.132.06.005.002.005.002.132.057.005.002.005.002.133.057.005.002.005.002.133.054.005.002.005.002.13.05.154.045.16.016.16-.015.156-.045.144-.072.128-.098.108-.12.083-.138.057-.15.028-.16-.003-.16-.032-.159-.061-.149-.088-.135-.11-.117-.132-.094-.12-.058-.124-.049-.126-.051-.122-.051-.122-.054-.12-.054-.126-.058-.119-.057-.12-.06-.12-.06-.118-.063-.117-.064-.119-.066-.116-.066-.115-.068-.115-.07-.113-.07-.115-.074-.112-.074-.11-.075-.11-.076-.112-.08-.11-.08-.109-.081-.106-.082-.104-.082-.106-.086-.105-.087-.101-.086-.105-.091-.1-.09-.1-.091-.1-.094-.097-.094-.1-.098-.093-.095-.096-.1-.093-.098-.092-.101-.089-.1-.09-.102-.088-.104-.036-.043-.114-.114-.133-.091-.148-.065-.157-.036-.161-.006zm15.063 2.701l-.16.014-.156.044-.12.057-.06.034-.12.066-.117.064-.118.062-.12.061-.12.06-.118.057-.126.058-.12.054-.122.054-.122.05-.126.052-.125.05-.124.046-.127.047-.125.044-.129.043-.126.04-.13.042-.128.038-.127.035-.13.036-.131.034-.129.031-.132.03-.13.03-.135.027-.133.026-.13.023-.13.022-.137.021-.132.02-.134.017-.132.015-.138.015-.135.013-.133.01-.138.01-.136.007-.134.006-.136.004-.14.003-.16.018-.155.047-.142.076-.127.1-.105.122-.08.14-.054.151-.025.16.006.16.035.158.064.148.09.134.114.114.133.092.147.065.157.036.134.008.145-.002h.011l.147-.005h.01l.147-.007h.011l.146-.009h.011l.146-.01h.005l.005-.001.146-.012h.011l.145-.014h.005l.006-.001.145-.016h.011l.144-.018h.006l.005-.001.144-.02h.011l.144-.021.005-.001h.006l.143-.023.006-.001h.005l.143-.025h.005l.006-.002.143-.026h.005l.005-.002.143-.027.005-.001.005-.001.142-.03h.005l.005-.002.142-.03.005-.002.005-.001.142-.033.005-.001.005-.001.14-.035.006-.001.005-.001.14-.037h.005l.005-.002.14-.038.005-.002h.005l.14-.04.005-.002.005-.001.138-.042.005-.001.006-.002.138-.043.005-.001.005-.002.137-.044.005-.002.005-.002.137-.046.005-.002.005-.001.137-.048.005-.002.005-.002.135-.05.005-.001.005-.002.135-.051.005-.002.005-.002.135-.053.005-.002.004-.002.134-.054.005-.002.005-.002.133-.057.005-.002.005-.002.132-.057.005-.003.005-.002.132-.06.005-.001.004-.002.131-.061.005-.003.005-.002.13-.062.005-.003.005-.002.13-.064.004-.003.005-.002.128-.066.005-.002.005-.003.128-.067.005-.002.004-.003.127-.069.005-.002.005-.003.126-.07.005-.003.004-.003.065-.037.132-.093.112-.115.089-.135.062-.149.034-.157.003-.161-.026-.16-.055-.15-.082-.14-.107-.12-.127-.1-.144-.073-.154-.046-.16-.016zM6.33 26.818l-.16.023-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.02.16.012.161.041.156.07.146.094.13.096.093.032.026.004.003.004.004.145.117.004.003.004.004.146.115.005.003.004.004.147.113.005.003.004.004.149.111.004.003.004.003.15.11.005.003.004.003.151.108.004.003.005.003.152.106.005.003.004.003.154.104.004.003.005.003.154.102.005.002.004.003.156.1.005.003.004.003.157.098.005.003.004.002.159.096.004.003.005.003.16.094.004.003.004.002.16.092.005.003.005.002.161.09.005.003.005.002.162.088.005.003.004.002.164.086.005.003.004.002.165.084.005.003.004.002.166.082.004.002.005.003.167.08.004.002.005.002.168.078.004.002.005.002.168.076.005.002.005.002.17.074.004.002.005.002.17.072.005.002.005.002.17.07.006.002.005.001.171.068.005.002.005.002.173.065.005.002.005.002.173.063.005.002.005.002.174.06.005.003.005.001.175.06.005.001.005.002.176.057.005.001.005.002.176.055.006.001.005.002.177.052.005.002.005.001.178.05.005.002.005.002.178.048.006.001.005.002.179.046.005.001.005.002.18.044h.005l.005.002.18.042.006.001.005.001.159.035.16.02.16-.01.157-.04.146-.069.13-.094.112-.117.087-.136.06-.149.033-.158.002-.161-.028-.159-.057-.15-.084-.138-.108-.12-.128-.098-.144-.072-.128-.039-.154-.033-.168-.04-.171-.041-.17-.044-.168-.046-.167-.047-.168-.05-.165-.051-.166-.054-.166-.056-.163-.057-.165-.06-.161-.062-.164-.064-.16-.065-.16-.068-.162-.07-.157-.07-.157-.074-.157-.075-.156-.077-.153-.079-.156-.082-.153-.082-.154-.086-.15-.086-.152-.09-.148-.09-.147-.092-.149-.095-.145-.095-.144-.098-.145-.1-.143-.102-.14-.103-.14-.104-.14-.108-.139-.11-.136-.11-.027-.022-.133-.091-.148-.065-.157-.036-.161-.006zm19.215.087l-.16.01-.157.039-.146.067-.11.076-.064.051-.139.11-.14.108-.14.104-.14.103-.143.101-.145.101-.144.098-.145.095-.149.095-.148.093-.147.089-.152.09-.15.086-.154.086-.153.082-.156.082-.153.079-.156.077-.157.075-.158.073-.157.071-.16.07-.16.068-.161.065-.164.064-.161.061-.165.06-.163.058-.166.056-.166.054-.166.051-.167.05-.167.047-.17.046-.168.044-.171.042-.168.039-.17.037-.11.023-.154.047-.143.075-.126.1-.106.122-.081.139-.054.152-.025.16.006.16.035.158.063.148.09.133.114.115.132.092.148.065.157.037.16.007.133-.016.115-.024.005-.001.005-.001.181-.04h.005l.005-.002.18-.042.006-.001.005-.001.18-.044.005-.002.005-.001.18-.046.004-.002h.005l.179-.05h.005l.005-.002.178-.05.005-.002.005-.002.177-.052.005-.002.005-.001.177-.055.005-.002.005-.001.176-.057.005-.002.005-.002.175-.059.005-.001.005-.002.174-.061.005-.002.005-.002.173-.063.005-.002.005-.002.173-.065.004-.002.005-.002.172-.068.005-.002.005-.002.171-.07.005-.001.005-.002.17-.072.005-.002.004-.002.17-.074.005-.002.004-.002.169-.076.004-.002.005-.002.168-.078.004-.002.005-.003.167-.08.004-.002.005-.002.166-.082.004-.002.005-.003.165-.084.004-.002.005-.003.163-.086.005-.002.005-.003.162-.088.005-.002.005-.003.161-.09.005-.002.004-.003.16-.092.005-.003.005-.002.16-.094.004-.003.004-.003.158-.096.005-.002.004-.003.158-.098.004-.003.005-.003.156-.1.004-.003.004-.003.155-.101.005-.003.004-.003.154-.104.004-.003.004-.003.153-.106.004-.003.005-.003.151-.108.004-.003.005-.003.15-.11.004-.003.004-.003.149-.112.004-.003.004-.003.148-.113.004-.004.004-.003.147-.115.004-.004.004-.003.068-.055.116-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.05-.153-.08-.14-.103-.125-.124-.102-.142-.077-.153-.05-.16-.02z",opacity:".98"}));function Xw(){return(Xw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var Yw=({styles:e={},...t})=>Vb("svg",Xw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M16.012 8.816L9.21 21.026h13.606l-6.803-12.21zm0 1.776l5.332 9.57H10.681l5.331-9.57zm0-10.281c-1.448.02-2.93.157-4.302.628-.852.447-.255 1.863.66 1.574 2.255-.608 4.648-.607 6.922-.108.934.075 1.228-1.376.338-1.67C18.451.44 17.227.317 16.012.311zm9.012 2.934c-.913-.104-1.272 1.258-.454 1.648 1.834 1.36 3.293 3.185 4.31 5.22.526.776 1.842.098 1.515-.78a15.522 15.522 0 00-5.06-6.006c-.1-.044-.203-.07-.31-.082zM6.65 3.59c-.762.089-1.24.809-1.805 1.267C3.38 6.295 2.163 8.007 1.37 9.905c-.266.898 1.094 1.484 1.564.675a14.825 14.825 0 014.327-5.56c.476-.515.09-1.419-.612-1.431zm9.362.007c-.698.066-1.689-.16-2.033.635-.282.733.535 1.358 1.217 1.125 1.806-.147 3.63.203 5.293.907.902.255 1.472-1.112.656-1.573-1.6-.735-3.374-1.089-5.133-1.094zm-5.479 1.365c-.835.15-1.517.76-2.21 1.226-1.203.94-2.318 2.061-3.057 3.402-.33.904 1.063 1.552 1.547.723 1.045-1.656 2.596-2.925 4.285-3.873.545-.499.171-1.463-.565-1.478zm13.903 2.115c-.875-.07-1.22 1.173-.501 1.627 1.325 1.34 2.188 3.062 2.748 4.84.468.84 1.869.21 1.557-.699-.604-2.118-1.751-4.097-3.351-5.615a.93.93 0 00-.453-.153zM4.467 13.132c-.822-.07-.996.826-1.046 1.455-.256 1.93-.094 3.933.562 5.769.406.844 1.807.365 1.612-.551a11.498 11.498 0 01-.334-5.808.874.874 0 00-.794-.865zm26.687 1.6c-.746-.037-1.014.785-.879 1.395.043 2.393-.57 4.771-1.66 6.894-.31.884 1.02 1.536 1.53.75a15.632 15.632 0 001.821-8.372.876.876 0 00-.812-.667zm-30.197.571c-.782-.073-1.044.775-.933 1.404.068 2.414.661 4.833 1.809 6.962.534.77 1.842.076 1.505-.798a14.833 14.833 0 01-1.603-6.861.876.876 0 00-.778-.707zm26.787 2.024c-.777-.048-.952.797-1.021 1.392-.354 1.692-1.202 3.231-2.216 4.608-.407.872.925 1.638 1.48.852 1.361-1.733 2.296-3.827 2.582-6.017a.874.874 0 00-.825-.835zM6.857 23.012c-.808.018-1.082 1.122-.47 1.59 1.393 1.607 3.187 2.886 5.194 3.599.91.222 1.43-1.165.598-1.596a11.495 11.495 0 01-4.723-3.396.899.899 0 00-.599-.197zm15.057 2.7c-.81.194-1.504.76-2.325.972-1.203.458-2.5.536-3.758.664-.869.307-.573 1.728.346 1.663 2.201-.034 4.412-.626 6.293-1.778.604-.495.227-1.532-.556-1.521zM6.346 27.118c-.833.008-1.11 1.218-.395 1.617 1.986 1.602 4.358 2.749 6.868 3.226.933.076 1.227-1.376.338-1.67a14.838 14.838 0 01-6.345-3.066.929.929 0 00-.466-.107zm19.208.087c-.766.09-1.241.841-1.922 1.158-1.516.991-3.251 1.58-4.996 2.005-.872.405-.346 1.849.584 1.604 2.543-.526 4.98-1.66 6.963-3.344.47-.52.072-1.42-.63-1.423z"}));function Kw(){return(Kw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var Zw=({styles:e={},...t})=>Vb("svg",Kw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.998 8.406c-3.018-.041-5.92 1.926-7.031 4.727-1.138 2.695-.51 6.012 1.537 8.103 1.99 2.141 5.268 2.93 8.014 1.927 2.878-.98 4.992-3.827 5.068-6.87.153-2.957-1.624-5.88-4.3-7.137a7.552 7.552 0 00-3.288-.75zm0 1.384c2.759-.052 5.373 1.973 6.015 4.655.704 2.578-.482 5.517-2.791 6.867-2.358 1.48-5.682 1.086-7.618-.918-2.043-1.971-2.407-5.381-.84-7.745 1.11-1.763 3.15-2.88 5.234-2.86zm1.962 1.765l-2.074 3.762c-.64.068-.793 1.04-.202 1.3.39.27.696-.18 1.052-.165h3.17v-.865h-3.182l1.993-3.615c-.252-.14-.505-.278-.757-.417zm-1.965-8.268h-.158l-.147.003h-.011l-.147.005h-.011l-.146.007h-.011l-.146.009h-.011l-.146.01h-.005l-.005.001-.146.012h-.011l-.145.014h-.006l-.005.001-.05.006-.158.031-.15.06-.135.088-.117.111-.094.13-.069.147-.04.156-.01.16.019.16.049.154.076.142.102.125.123.105.14.08.152.051.16.023.134-.003.045-.005.135-.013.133-.01.136-.01.135-.007.137-.006.136-.004.136-.003h.274l.136.003.136.004.136.006.136.007.136.01.133.01.135.013.135.014.135.016.134.018.132.018.134.021.133.023.133.024.133.025.13.027.132.03.132.03.129.031.13.034.129.035.129.036.13.04.126.038.128.042.126.042.128.045.127.047.126.048.12.047.127.051.123.052.006.002.147.048.16.021.16-.009.157-.038.147-.067.131-.093.112-.116.089-.135.062-.149.033-.158.004-.16-.027-.16-.055-.151-.083-.138-.107-.121-.127-.099-.118-.063-.004-.001-.005-.003-.005-.002-.133-.056-.005-.002-.005-.002-.134-.054-.004-.002-.005-.002-.135-.053-.005-.002-.005-.002-.135-.051-.005-.002-.005-.002-.135-.05-.005-.001-.005-.002-.137-.048-.005-.001-.005-.002-.137-.046-.005-.002-.005-.002-.137-.044-.005-.002-.005-.001-.138-.043-.005-.002-.006-.001-.138-.042-.005-.001-.005-.002-.14-.04H19.4l-.005-.002-.14-.038-.005-.001-.005-.002-.14-.036-.005-.001-.005-.001-.141-.035-.005-.001-.005-.001-.142-.033-.005-.001-.005-.001-.141-.031-.006-.002h-.005l-.142-.03-.005-.001-.005-.001-.143-.028h-.005l-.005-.001-.143-.026-.006-.001-.005-.001-.143-.024-.005-.001-.006-.001-.143-.022-.006-.001h-.005l-.144-.022h-.005l-.006-.001-.144-.019h-.005l-.006-.001-.144-.017h-.006l-.005-.001-.145-.016h-.011l-.145-.014H17.1l-.005-.001-.146-.012h-.01l-.146-.01-.006-.001h-.005l-.146-.009h-.011l-.147-.006h-.01l-.147-.005h-.011l-.147-.003h-.01l-.148-.001h-.01zM10.357 4.66l-.156.037-.123.053-.06.032-.005.002-.004.003-.128.069-.004.002-.005.003-.126.07-.005.003-.004.002-.126.072-.005.003-.004.003-.125.073-.004.003-.005.003-.124.075-.004.003-.005.002-.123.077-.004.003-.005.003-.122.078-.004.003-.005.003-.121.08-.004.002-.005.003-.12.082-.005.003-.004.003-.12.083-.004.003-.004.003-.118.084-.005.003-.004.003-.118.086-.004.003-.004.003-.117.088-.004.003-.004.003-.116.089-.004.003-.004.004-.114.09-.005.003-.004.003-.113.092-.004.004-.004.003-.113.093-.004.004-.004.003-.111.095-.004.003-.005.004-.11.096-.004.004-.004.003-.109.098-.004.003-.004.004-.108.1-.004.003-.004.003-.107.101-.004.004-.004.003-.106.102-.003.004-.004.004-.105.103-.004.004-.004.004-.103.105-.004.004-.004.003-.102.106-.003.004-.004.004-.1.107-.004.004-.004.004-.099.108-.004.004-.003.004-.098.11-.003.003-.004.004-.096.11-.004.005-.003.004-.095.111-.003.004-.004.004-.093.113-.003.004-.004.004-.092.113-.003.004-.003.005-.09.114-.004.004-.003.004-.089.116-.003.004-.003.004-.088.117-.003.004-.003.005-.086.117-.003.004-.003.005-.084.118-.003.004-.003.005-.083.12-.003.003-.003.005-.082.12-.003.005-.002.004-.068.103-.076.142-.048.154-.018.16.011.161.041.156.07.146.095.13.117.11.136.086.15.06.158.03.162.002.158-.029.15-.058.138-.085.119-.108.082-.106.065-.099.075-.11.077-.113.077-.107.08-.11.08-.108.084-.108.083-.105.086-.106.086-.104.088-.104.089-.101.09-.102.093-.101.093-.099.094-.097.095-.096.098-.097.098-.095.099-.093.1-.092.103-.091.101-.089.104-.088.104-.086.106-.086.106-.083.106-.082.109-.082.108-.079.11-.078.11-.076.112-.076.112-.074.113-.072.113-.071.115-.07.115-.068.118-.067.117-.065.12-.065.054-.029.135-.088.116-.111.094-.132.068-.146.04-.156.009-.161-.02-.16-.05-.153-.078-.142-.102-.125-.123-.103-.141-.079-.153-.051-.16-.022-.16.008zm13.91 2.116l-.158.037-.147.066-.132.092-.113.116-.09.134-.063.148-.034.157-.005.162.026.159.054.152.082.139.086.102.09.09.094.098.093.099.092.1.091.103.089.101.088.104.086.104.086.106.083.105.083.108.08.108.081.11.077.107.077.112.075.111.075.114.072.113.071.113.07.115.068.117.067.115.065.118.064.117.062.118.061.12.059.119.059.122.056.121.054.12.055.125.051.123.051.125.048.123.049.127.046.126.044.125.043.128.042.129.039.126.038.13.022.076.058.15.086.137.109.119.129.096.145.07.155.043.16.013.161-.017.155-.046.143-.074.126-.1.106-.122.082-.138.055-.152.025-.16-.005-.16-.026-.132-.023-.082-.002-.005-.001-.005-.042-.139-.001-.005-.002-.005-.043-.138-.001-.005-.002-.005-.044-.137-.002-.005-.002-.005-.046-.137-.002-.005-.001-.005-.048-.137-.002-.005-.002-.005-.05-.135-.001-.005-.002-.005-.051-.135-.002-.005-.002-.005-.053-.135-.002-.005-.002-.005-.054-.133-.002-.005-.002-.005-.057-.133-.002-.005-.002-.005-.057-.132-.003-.005-.002-.005-.059-.132-.002-.005-.002-.004-.061-.132-.003-.004-.002-.005-.062-.13-.003-.005-.002-.005-.064-.13-.003-.004-.002-.005-.066-.129-.002-.004-.003-.005-.067-.128-.002-.005-.003-.004-.069-.128-.002-.004-.003-.005-.07-.126-.003-.005-.003-.004-.072-.126-.002-.005-.003-.004-.073-.125-.003-.004-.003-.005-.075-.124-.003-.004-.003-.005-.076-.123-.003-.004-.003-.005-.078-.122-.003-.004-.003-.005-.08-.121-.003-.004-.003-.005-.08-.12-.004-.005-.003-.004-.083-.12-.003-.004-.003-.004-.084-.118-.003-.005-.003-.004-.086-.117-.003-.005-.003-.004-.088-.117-.003-.004-.003-.004-.09-.116-.002-.004-.004-.004-.09-.114-.003-.005-.004-.004-.091-.113-.004-.004-.003-.004-.093-.113-.004-.004-.003-.004-.095-.111-.004-.004-.003-.004-.096-.11-.004-.005-.003-.004-.098-.109-.004-.004-.003-.004-.1-.108-.003-.004-.004-.004-.1-.107-.004-.004-.004-.004-.102-.106-.003-.003-.004-.004-.093-.095-.124-.103-.14-.08-.153-.05-.16-.023-.16.008zM4.288 12.828l-.158.032-.15.06-.135.088-.117.11-.095.131-.069.146-.035.129-.026.132v.005l-.002.005-.025.143-.001.005-.001.006-.024.143-.001.005-.001.006-.022.143-.001.006-.001.005-.02.144-.001.005-.001.006-.019.144v.005l-.001.006-.017.144v.006l-.001.005-.016.145v.011l-.014.145v.006l-.001.005-.012.146v.01l-.01.146-.001.006v.005l-.009.146v.011l-.007.146v.011l-.004.147v.011l-.003.147v.01l-.002.148v.01l.001.148v.01l.003.147v.011l.005.147v.01l.007.147v.011l.009.146v.011l.01.146v.01l.013.146v.011l.014.145v.005l.001.006.016.145v.011l.018.144v.006l.001.005.019.144v.006l.001.005.021.144v.005l.002.006.022.143v.006l.002.005.024.143v.005l.002.006.025.143.001.005.001.005.028.143.001.005.001.005.03.142v.005l.002.006.03.141.002.005.001.006.033.14v.006l.002.005.035.14v.006l.002.005.036.14.002.005.001.005.038.14.001.005.002.005.04.14v.005l.002.005.042.138.001.006.002.005.042.138.002.005.002.005.017.054.064.148.09.134.114.114.132.092.148.065.157.037.16.007.16-.023.153-.052.14-.08.123-.103.102-.126.076-.142.049-.153.02-.16-.01-.161-.032-.13-.017-.051-.039-.126-.038-.13-.037-.128-.035-.13-.033-.128-.033-.134-.03-.13-.029-.131-.026-.13-.026-.132-.024-.134-.023-.133-.02-.132-.02-.136-.017-.132-.016-.135-.014-.135-.012-.133-.012-.138-.009-.133-.007-.136-.006-.138-.004-.134-.003-.136v-.274l.003-.136.004-.134.006-.139.007-.136.01-.132.01-.139.013-.132.014-.135.016-.135.017-.132.02-.137.02-.13.023-.134.024-.133.024-.126.016-.16-.014-.161-.044-.155-.072-.145-.098-.128-.12-.108-.137-.084-.15-.057-.16-.029-.16.002zm23.286 4.202l-.156.038-.148.066-.132.092-.113.115-.09.134-.062.148-.03.127-.001.004-.023.134-.024.134-.026.132-.026.13-.03.132-.03.129-.032.134-.033.128-.035.13-.037.128-.038.13-.04.126-.04.128-.044.128-.044.126-.046.126-.048.126-.05.125-.05.125-.051.122-.054.123-.055.122-.056.12-.058.122-.06.12-.061.12-.062.119-.063.116-.067.119-.066.116-.068.115-.07.115-.07.113-.073.113-.074.112-.076.113-.077.112-.077.107-.08.11-.08.108-.085.109-.044.056-.088.135-.06.15-.033.158-.002.16.027.16.057.15.083.138.108.12.128.098.144.072.155.045.16.015.161-.016.155-.044.144-.073.128-.098.09-.099.05-.061.003-.004.003-.005.089-.115.003-.004.003-.005.088-.116.003-.004.003-.005.086-.117.003-.004.003-.005.084-.118.003-.004.003-.005.083-.12.003-.004.003-.004.082-.12.003-.005.002-.004.08-.121.003-.005.003-.004.078-.122.003-.005.003-.004.077-.123.002-.005.003-.004.075-.124.003-.005.003-.004.073-.125.003-.004.003-.005.072-.126.002-.004.003-.005.07-.126.003-.005.002-.005.07-.127.002-.004.002-.005.068-.128.002-.005.002-.004.066-.13.003-.004.002-.005.064-.13.002-.004.003-.005.062-.13.003-.005.002-.005.06-.13.003-.005.002-.005.06-.132.002-.005.002-.005.057-.132.003-.005.002-.005.056-.133.002-.005.002-.005.054-.134.002-.004.002-.005.053-.135.002-.005.002-.005.051-.135.002-.005.002-.005.05-.135.001-.005.002-.005.048-.137.001-.005.002-.005.046-.137.002-.005.002-.005.044-.137.002-.005.002-.005.042-.138.002-.005.002-.006.04-.138.002-.005.002-.005.04-.14V19.4l.002-.005.038-.14.001-.005.002-.005.036-.14.001-.005.001-.005.035-.141.001-.005.001-.005.033-.141.001-.006.001-.005.031-.141.002-.006v-.005l.03-.142.001-.005.001-.005.028-.143v-.005l.002-.005.025-.143.001-.006.001-.005.024-.143.001-.005.001-.006.001-.006.01-.161-.02-.16-.05-.154-.077-.141-.102-.125-.123-.104-.141-.079-.153-.051-.16-.022-.16.007zM6.681 22.734l-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.018.16.011.161.041.156.07.146.077.11.04.047.003.004.003.004.095.111.003.004.004.004.096.11.004.005.003.004.098.109.003.004.004.004.1.108.003.004.003.004.101.107.004.004.003.004.102.106.004.003.004.004.103.105.004.004.004.004.105.103.004.004.003.003.106.102.004.004.004.004.107.1.004.004.004.004.108.099.004.003.004.004.11.098.003.003.004.004.11.096.005.004.004.003.11.095.005.003.004.004.113.093.004.003.004.004.113.091.004.004.005.003.114.09.004.004.004.003.116.089.004.003.004.003.117.088.004.003.004.003.118.086.004.003.005.003.118.084.004.003.005.003.119.083.004.003.005.003.12.081.005.003.004.003.121.08.005.003.004.003.122.078.005.003.004.003.123.076.005.003.004.003.124.075.005.003.004.003.125.073.004.003.005.003.126.072.004.002.005.003.126.07.005.003.004.002.128.07.004.002.005.002.128.068.005.002.004.002.13.066.004.003.005.002.13.064.004.002.005.003.13.062.005.002.004.003.132.06.004.003.005.002.132.06.005.002.005.002.132.057.005.002.005.003.133.056.005.002.005.002.133.054.005.002.005.002.13.05.154.045.16.016.161-.015.155-.045.144-.072.128-.098.108-.12.083-.138.057-.15.028-.16-.003-.16-.032-.158-.061-.15-.088-.135-.11-.117-.132-.094-.12-.058-.124-.049-.126-.051-.122-.051-.122-.054-.12-.054-.126-.058-.119-.057-.12-.06-.12-.06-.118-.063-.117-.064-.119-.066-.116-.066-.115-.068-.115-.07-.113-.07-.115-.074-.112-.074-.11-.075-.11-.076-.112-.079-.11-.08-.109-.082-.106-.082-.104-.082-.106-.086-.105-.087-.101-.086-.105-.091-.1-.09-.1-.091-.1-.094-.097-.094-.1-.098-.093-.095-.096-.1-.093-.098-.092-.101-.089-.1-.09-.102-.088-.104-.036-.043-.114-.114-.133-.091-.148-.065-.157-.036-.161-.006-.16.024zm15.063 2.691l-.156.044-.12.057-.06.034-.12.066-.116.064-.119.062-.12.061-.12.06-.118.057-.126.058-.12.054-.122.054-.122.05-.126.052-.125.05-.124.046-.127.047-.125.044-.129.043-.126.04-.13.042-.128.038-.127.036-.13.035-.131.034-.129.031-.132.03-.13.03-.135.027-.133.026-.13.023-.13.022-.137.021-.132.02-.134.017-.132.015-.138.015-.135.013-.133.01-.138.01-.136.007-.134.006-.136.004-.14.003-.16.018-.155.047-.142.076-.127.1-.105.122-.08.14-.054.151-.025.16.006.16.035.158.064.148.09.134.114.114.133.092.147.065.157.036.134.008.145-.002h.011l.147-.005h.01l.147-.007h.011l.146-.009h.011l.146-.01h.005l.005-.001.146-.012h.011l.145-.014h.005l.006-.001.145-.016h.011l.144-.018h.006l.005-.001.144-.02h.011l.144-.021h.005l.006-.002.143-.022h.006l.005-.002.143-.024h.005l.006-.002.143-.026h.005l.005-.002.143-.027.005-.001.005-.001.142-.03h.005l.005-.002.142-.03.005-.002.005-.001.142-.033.005-.001.005-.001.14-.035.006-.001.005-.001.14-.036.005-.002.005-.001.14-.038.005-.001.005-.002.14-.04h.005l.005-.002.138-.042.005-.001.006-.002.138-.043.005-.001.005-.002.137-.044.005-.002.005-.002.137-.046.005-.002.005-.001.137-.048.005-.002.005-.002.135-.05.005-.001.005-.002.135-.051.005-.002.005-.002.135-.053.005-.002.004-.002.134-.054.005-.002.005-.002.133-.056.005-.003.005-.002.132-.057.005-.002.005-.003.132-.059.005-.002.004-.002.131-.061.005-.003.005-.002.13-.062.005-.003.005-.002.13-.064.004-.002.005-.003.129-.066.004-.002.005-.003.128-.067.005-.002.004-.003.127-.069.005-.002.005-.003.126-.07.005-.003.004-.002.065-.038.132-.093.112-.115.089-.135.062-.149.034-.157.004-.161-.027-.16-.055-.15-.082-.14-.107-.12-.127-.1-.144-.073-.154-.045-.16-.017-.161.014zM15.994 0l-.187.001h-.011l-.188.004h-.011l-.187.006h-.011l-.187.008h-.005L15.2.02l-.187.01h-.005l-.005.001-.187.013h-.01L14.62.06h-.01l-.186.018h-.011l-.185.02-.005.001h-.006l-.185.022-.005.001h-.005l-.185.025h-.005l-.005.001-.184.027h-.006l-.005.001-.184.029h-.005l-.005.001-.183.031-.005.001-.006.001-.182.033-.006.001-.005.001-.182.035-.005.001-.005.001-.182.038h-.005l-.005.002-.181.04h-.005l-.005.002-.18.042-.006.001-.005.001-.18.044-.005.002h-.005l-.17.045-.152.054-.139.082-.121.106-.1.127-.074.143-.046.155-.017.16.013.16.043.156.07.145.097.13.119.108.137.085.15.058.159.03.16-.001.133-.023.165-.043.168-.041.171-.04.171-.037.172-.036.17-.033.173-.03.17-.03.177-.027.171-.025.175-.022.175-.02.175-.02.176-.016.175-.014.177-.012.176-.01.177-.007.174-.006.177-.003L16 1.73h.177l.178.004.174.006.177.007.176.01.177.012.175.014.176.017.175.018.175.02.175.023.171.025.177.027.17.03.173.03.17.033.171.036.154.033.16.02.161-.01.156-.04.146-.069.131-.094.111-.117.088-.135.06-.15.032-.158.002-.16-.027-.16-.057-.15L20 .714l-.108-.12-.128-.097-.144-.073-.129-.038-.158-.035-.005-.001-.005-.001L19.14.31h-.005l-.005-.002-.182-.035h-.006l-.005-.002-.182-.033h-.006l-.005-.002-.183-.03-.005-.001-.005-.001-.184-.029h-.005l-.006-.001-.184-.027h-.005l-.005-.001-.185-.024h-.005L17.968.12 17.783.1l-.006-.001h-.005l-.185-.02h-.006l-.005-.001L17.39.06 17.385.06h-.005l-.187-.015h-.005l-.005-.001-.187-.013h-.01L16.799.02h-.011L16.6.01h-.011l-.187-.006h-.011L16.204 0h-.011L16.005 0h-.01zm8.86 2.939l-.157.033-.15.062-.134.09-.116.111-.093.132-.067.147-.038.156-.01.161.022.16.05.153.078.141.103.124.102.087.045.034.142.106.137.105.14.11.136.11.135.112.134.115.134.117.13.115.132.122.128.12.127.122.127.125.123.126.124.128.121.13.118.128.118.132.117.133.113.134.113.136.11.136.109.137.109.142.104.14.103.14.101.142.1.144.099.146.095.145.094.147.093.15.092.15.087.149.087.15.085.152.083.155.08.152.08.155.04.081.084.138.11.119.128.096.145.072.155.043.16.013.161-.016.155-.046.143-.074.127-.099.106-.12.083-.14.055-.151.026-.16-.004-.16-.034-.158-.05-.124-.042-.085-.002-.004-.003-.005-.084-.165-.002-.004-.003-.005-.086-.164-.002-.004-.003-.005-.088-.162-.002-.005-.003-.005-.09-.161-.002-.005-.003-.004-.092-.16-.002-.005-.003-.005-.094-.16-.003-.004-.003-.004-.096-.159-.002-.004-.003-.005-.098-.157-.003-.004-.003-.005-.1-.156-.003-.004-.002-.005-.102-.154-.003-.005-.003-.004-.104-.154-.003-.004-.003-.005-.106-.152-.003-.004-.003-.005-.108-.151-.003-.004-.003-.005-.11-.15-.003-.004-.003-.004-.111-.15-.004-.003-.003-.005-.113-.147-.004-.004-.003-.005-.115-.146-.004-.004-.003-.004-.117-.145-.004-.004-.003-.004-.12-.144-.003-.004-.003-.004-.121-.142-.003-.004-.004-.004-.123-.141-.003-.004-.004-.004-.125-.14-.003-.004-.004-.004-.127-.138-.003-.004-.004-.004-.128-.136-.004-.004-.004-.004-.13-.135-.004-.004-.003-.004-.133-.134-.003-.004-.004-.003-.134-.133-.004-.003-.004-.004-.135-.13-.004-.004-.004-.004-.136-.128-.004-.004-.004-.004-.138-.126-.004-.004-.004-.003-.14-.125-.004-.004-.004-.003-.14-.123-.005-.004-.004-.003-.142-.121-.004-.004-.004-.003-.144-.12-.004-.003-.004-.003-.145-.117-.004-.004-.004-.003-.147-.115-.004-.004-.004-.003-.148-.113-.004-.003-.004-.004-.149-.111-.004-.003-.004-.004-.05-.036-.14-.083-.15-.055-.16-.027-.16.004zm-18.381.348l-.157.037-.147.066-.111.074-.04.032-.005.003-.004.004-.145.117-.004.003-.004.004-.144.119-.004.003-.004.004-.142.12-.004.004-.004.004-.141.123-.004.003-.004.004-.14.125-.004.003-.004.004-.138.126-.004.004-.004.004-.136.128-.004.004-.004.004-.135.13-.004.004-.004.003-.134.133-.004.003-.004.004-.132.134-.003.004-.004.004-.13.135-.004.004-.004.004-.128.136-.004.004-.004.004-.126.138-.004.004-.003.004-.125.14-.004.004-.003.004-.123.14-.004.005-.003.004-.121.142-.004.004-.003.004-.12.144-.003.004-.003.004-.117.145-.004.004-.003.004-.115.146-.004.005-.003.004-.113.147-.003.005-.004.004-.111.149-.003.004-.004.004-.11.15-.002.005-.003.004-.108.151-.003.005-.003.004-.106.152-.003.005-.003.004-.104.154-.003.004-.003.005-.102.154-.003.005-.002.004-.1.156-.003.005-.003.004-.098.157-.003.005-.003.004-.096.159-.002.004-.003.005-.094.16-.003.004-.002.004-.092.16-.003.005-.003.005-.09.161-.002.005-.003.005-.088.162-.002.005-.003.004-.086.164-.002.005-.002.004-.084.165-.003.005-.002.004-.082.166-.002.005-.003.004-.08.167-.002.004-.002.005-.078.168-.002.004-.002.005-.045.1-.053.153-.023.16.007.16.037.157.065.148.092.132.114.114.134.09.148.064.157.035.161.006.16-.025.152-.054.14-.08.121-.106.1-.126.065-.118.043-.095.074-.16.075-.155.077-.157.08-.155.08-.152.083-.155.085-.152.086-.15.088-.149.091-.15.094-.15.094-.147.095-.145.099-.146.1-.144.1-.142.104-.14.104-.14.11-.142.107-.137.11-.136.114-.136.113-.134.117-.133.118-.132.117-.129.122-.13.124-.127.123-.126.127-.125.127-.122.128-.12.132-.122.13-.115.133-.117.135-.115.135-.111.136-.11.037-.03.117-.11.094-.132.068-.146.04-.156.01-.161-.02-.16-.05-.154-.076-.141-.102-.125-.123-.104-.14-.08-.153-.051-.16-.023-.161.008zm24.514 11.15l-.157.04-.146.067-.131.093-.112.117-.088.135-.061.149-.033.157-.005.134.006.14.006.176.003.177.001.178-.001.177-.003.178-.006.177-.007.176-.01.177-.012.176-.015.176-.016.173-.018.175-.02.175-.024.174-.024.175-.027.17-.03.174-.03.173-.033.17-.036.172-.037.17-.04.17-.042.172-.043.168-.045.166-.048.169-.05.167-.052.168-.053.164-.056.166-.058.166-.06.161-.061.164-.063.158-.066.165-.068.16-.07.16-.07.158-.075.159-.074.155-.078.158-.081.158-.06.15-.03.158-.001.161.029.159.058.15.085.137.108.12.13.096.144.07.156.044.16.013.16-.017.155-.046.143-.074.127-.1.107-.12.07-.115.083-.164.003-.005.002-.004.082-.166.002-.005.003-.004.08-.167.002-.005.002-.004.078-.168.002-.004.002-.005.076-.169.002-.004.002-.005.074-.17.002-.004.002-.005.072-.17.002-.005.002-.005.07-.17.002-.006.001-.005.068-.172.002-.004.002-.005.065-.173.002-.005.002-.005.063-.173.002-.005.002-.005.06-.174.003-.005.001-.005.06-.175.001-.005.002-.005.057-.176.001-.005.002-.005.055-.177.001-.005.002-.005.052-.177.002-.005.001-.005.051-.178.001-.005.002-.005.048-.179.002-.005v-.005l.047-.179.001-.005.002-.005.044-.18v-.005l.002-.005.042-.18.001-.006.001-.005.04-.18.001-.006.001-.005.038-.182v-.005l.002-.005.035-.182v-.006l.002-.005.033-.182v-.006l.002-.005.03-.183.001-.005.001-.005.029-.184v-.005l.001-.006.027-.184v-.005l.001-.005.024-.185v-.005l.001-.005.022-.185v-.006l.001-.005.02-.185v-.006l.001-.005.017-.186v-.005l.001-.005.015-.187v-.005l.001-.005.013-.187v-.01l.01-.187.001-.006v-.005l.009-.187v-.011l.006-.187v-.011l.004-.188v-.011l.001-.188v-.01l-.001-.188v-.011l-.004-.188v-.011l-.006-.187v-.011l-.007-.145-.022-.16-.05-.152-.08-.141-.103-.124-.125-.102-.141-.077-.153-.05-.16-.02-.161.009zM.777 15l-.158.032-.15.06-.136.087-.117.11-.095.131-.068.146-.04.156-.012.133-.001.14v.01l.001.188v.011l.004.188v.011l.006.187v.011l.008.187v.011l.011.187v.005l.001.005.013.187v.01l.016.187v.01l.018.186v.011l.02.185.001.005v.006l.022.185.001.005v.005l.025.185v.005l.001.005.027.184v.006l.001.005.029.184v.005l.001.005.031.183.001.005.001.006.033.182.001.005.001.006.035.182.001.005.001.005.038.182v.005l.002.005.04.181v.005l.002.005.042.18.001.006.001.005.044.18.002.005v.005l.047.18.001.004.002.005.048.179.002.005.001.005.05.178.002.005.001.005.053.177.002.005.001.005.055.177.002.005.001.005.057.176.002.005.001.005.06.175.001.005.002.005.061.174.002.005.002.005.063.173.002.005.002.005.065.173.002.005.002.004.067.172.002.005.002.005.07.171.002.005.002.005.072.17.002.005.002.005.074.169.002.005.002.004.076.169.002.005.002.004.078.168.002.004.002.005.08.167.003.004.002.005.082.166.002.004.003.005.02.04.086.136.11.118.13.095.146.07.156.041.16.012.16-.019.155-.048.142-.075.126-.1.105-.123.08-.14.054-.152.024-.16-.006-.16-.036-.158-.051-.123-.018-.034-.078-.158L3.1 22.1l-.074-.16-.071-.156-.07-.162-.068-.16-.067-.164-.062-.158-.062-.164-.059-.161-.058-.166-.056-.166-.053-.164-.052-.168-.05-.167-.048-.17-.045-.165-.043-.168-.043-.172-.039-.17-.037-.17-.036-.172-.033-.17-.03-.173-.03-.174-.027-.17-.025-.175-.022-.174-.021-.175-.018-.175-.017-.173-.014-.176-.012-.176-.01-.177-.007-.176-.006-.177-.003-.178L1.73 16v-.134l-.013-.16-.044-.156-.072-.144-.097-.129-.12-.108-.137-.085-.15-.057L.938 15 .777 15zM6.17 26.842l-.152.052-.14.08-.122.105-.101.126-.076.142-.048.154-.02.16.012.161.041.156.07.146.094.13.096.093.032.026.004.003.004.004.145.117.004.003.004.004.146.115.005.003.004.004.147.113.005.003.004.004.149.111.004.003.004.003.15.11.005.003.004.003.151.108.005.003.004.003.152.106.005.003.004.003.154.104.004.003.005.003.154.102.005.002.004.003.156.1.005.003.004.003.157.098.005.003.004.002.159.096.004.003.005.003.16.094.004.003.004.002.16.092.005.003.005.002.161.09.005.003.005.003.162.088.005.002.004.002.164.087.005.002.004.002.165.084.005.003.004.002.166.082.004.002.005.003.167.08.004.002.005.002.168.078.004.002.005.002.169.076.004.002.005.002.17.074.004.002.005.002.17.072.005.002.005.002.17.07.006.002.005.001.171.068.005.002.005.002.173.065.005.002.005.002.173.063.005.002.005.002.174.061.005.002.005.001.175.06.005.001.005.002.176.057.005.001.005.002.177.055.005.001.005.002.177.052.005.002.005.001.178.051.005.001.005.002.178.048.006.002h.005l.179.047.005.001.005.002.18.044h.005l.005.002.18.042.006.001.005.001.159.035.16.02.16-.01.157-.04.146-.069.13-.094.112-.117.087-.136.06-.149.033-.158.002-.161-.028-.159-.057-.15-.084-.138-.108-.12-.128-.098-.144-.072-.128-.039-.154-.033-.168-.04-.171-.041-.169-.044-.17-.045-.166-.048-.168-.05-.165-.051-.166-.054-.166-.056-.163-.057-.165-.06-.161-.062-.164-.064-.16-.065-.16-.068-.162-.07-.157-.07-.157-.074-.157-.075-.156-.077-.153-.079-.156-.082-.153-.082-.154-.086-.15-.086-.152-.09-.148-.09-.147-.092-.149-.095-.145-.095-.144-.098-.145-.1-.143-.102-.14-.103-.14-.104-.14-.108-.139-.11-.136-.11-.027-.022-.133-.091-.148-.065-.157-.036-.161-.006-.16.024zm19.214.073l-.156.039-.146.067-.11.076-.064.051-.139.11-.14.108-.14.104-.14.103-.143.101-.145.101-.144.098-.145.095-.149.095-.148.093-.147.089-.152.09-.15.086-.154.086-.153.082-.156.082-.153.079-.156.077-.157.075-.157.073-.158.071-.16.07-.16.068-.161.065-.164.064-.161.061-.165.06-.163.058-.166.056-.166.054-.166.051-.167.05-.167.048-.17.045-.168.044-.171.042-.168.039-.17.037-.11.023-.154.047-.143.075-.126.1-.106.122-.081.139-.054.152-.025.16.006.16.035.158.063.148.09.133.114.115.132.092.148.065.157.037.16.008.133-.017.115-.024h.005l.005-.002.181-.04h.005l.005-.002.18-.042.006-.001.005-.001.18-.044.005-.002h.005l.18-.047.004-.001.005-.002.179-.048.005-.002.005-.001.178-.05.005-.002.005-.002.177-.052.005-.002.005-.001.177-.055.005-.002.005-.001.176-.057.005-.002.005-.002.175-.059.005-.001.005-.002.174-.061.005-.002.005-.002.173-.063.005-.002.005-.002.173-.065.005-.002.004-.002.172-.068.005-.001.005-.002.171-.07.005-.002.005-.002.17-.072.005-.002.005-.002.169-.074.005-.002.004-.002.169-.076.004-.002.005-.002.168-.078.004-.002.005-.002.167-.08.004-.003.005-.002.166-.082.004-.002.005-.003.165-.084.004-.002.005-.002.163-.087.005-.002.005-.002.162-.088.005-.003.005-.003.161-.09.005-.002.004-.003.16-.092.005-.002.005-.003.16-.094.004-.003.004-.003.158-.096.005-.002.004-.003.158-.098.004-.003.005-.003.156-.1.004-.003.004-.002.155-.102.005-.003.004-.003.154-.104.004-.003.005-.003.152-.106.004-.003.005-.003.151-.108.004-.003.005-.003.15-.11.004-.003.004-.003.149-.111.004-.004.004-.003.148-.113.004-.004.004-.003.147-.115.004-.004.004-.003.068-.055.116-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.05-.153-.08-.14-.103-.125-.124-.102-.142-.077-.153-.05-.16-.02-.16.009z"}));function Qw(){return(Qw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var Jw=({styles:e={},...t})=>Vb("svg",Qw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.975.003C8.195-.157.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.408 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.215-2.282-2.022-5.3-3.217-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.082 11.082 0 0116 4.975zm-2.15 3.281v5.534H8.213v4.38h5.636v5.534h4.31V18.17h5.639v-4.38h-5.64V8.256h-4.31zm.865.865h2.583v5.534h5.635v2.65h-5.635v5.533h-2.583v-5.534h-5.64v-2.649h5.64V9.121z"}));function eE(){return(eE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var tE=({styles:e={},...t})=>Vb("svg",eE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm.006 3.521L9.206 20.745h13.598L16.005 8.542zm0 1.775l5.329 9.564H10.677l5.328-9.564z"}));function nE(){return(nE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var iE=({styles:e={},...t})=>Vb("svg",nE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.97.04h-.127C8.713-.018 2.003 5.334.437 12.286c-1.51 6.123.98 13.005 6.136 16.665 5.125 3.788 12.546 4.105 17.912.623 5.272-3.276 8.33-9.766 7.325-15.916-.904-6.241-5.79-11.7-11.95-13.143A16.082 16.082 0 0015.97.04zm-.181 1.724c.115 0 .23 0 .347.003 6.625-.066 12.823 5.149 13.89 11.69 1.13 5.91-1.908 12.349-7.262 15.138-5.473 3.013-12.866 1.884-17.116-2.726C1.291 21.372.444 13.914 3.802 8.602c2.493-4.112 7.169-6.819 11.987-6.838zm.283 1.554c-.117 0-.234.002-.351.005-6.1 0-11.691 5.049-12.346 11.114-.78 5.684 2.795 11.612 8.218 13.52 5.139 1.943 11.416.101 14.624-4.38 3.461-4.583 3.262-11.538-.596-15.831-2.36-2.747-5.924-4.423-9.549-4.428zm-.078 1.695c.078 0 .156 0 .234.003 5.4 0 10.321 4.556 10.734 9.942.563 5.13-2.958 10.364-7.971 11.678-4.832 1.41-10.457-.935-12.746-5.446-2.463-4.559-1.2-10.795 3.014-13.883a11.072 11.072 0 016.735-2.294zm-.137 3.42c-2.965.02-5.792 1.968-6.884 4.722-1.137 2.693-.509 6.007 1.536 8.096 1.988 2.14 5.263 2.929 8.007 1.926 2.875-.98 4.987-3.824 5.063-6.865.154-2.954-1.622-5.875-4.295-7.13a7.545 7.545 0 00-3.427-.75zm.27 1.381c2.708.013 5.249 2.014 5.88 4.652.704 2.576-.481 5.512-2.788 6.862-2.356 1.478-5.677 1.084-7.611-.918-2.042-1.97-2.405-5.376-.839-7.738 1.11-1.762 3.146-2.877 5.229-2.857h.13zm1.831 1.764l-2.072 3.76c-.64.068-.792 1.039-.202 1.298.39.27.696-.18 1.051-.164h3.168v-.864h-3.18l1.992-3.612-.757-.418z"}));function rE(){return(rE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var oE=({styles:e={},...t})=>Vb("svg",rE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.848.001C8.113-.093.931 6.281.125 13.983c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.207C29.105 4.938 23.55.48 17.367.06A16.448 16.448 0 0015.848 0v.001zm.293 1.727c7.113-.099 13.662 5.97 14.077 13.08.56 6.299-3.516 12.735-9.582 14.679-5.798 2.004-12.806-.12-16.283-5.237C.717 19.159.874 11.638 5.016 6.876 7.722 3.638 11.902 1.63 16.14 1.728zm-.415 1.555C9.157 3.258 3.256 9.156 3.278 15.729c-.16 5.965 4.365 11.725 10.293 12.737 5.409 1.065 11.37-1.744 13.775-6.753 2.534-4.986 1.386-11.627-2.953-15.251-2.364-2.077-5.512-3.27-8.667-3.18zm.507 1.692c5.82-.026 11.013 5.318 10.79 11.143-.024 5.3-4.313 10.267-9.636 10.803-5.075.667-10.426-2.588-11.885-7.553-1.535-4.744.494-10.46 4.925-12.885a11.072 11.072 0 015.806-1.508z"}));function aE(){return(aE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function sE(){return(sE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function cE(){return(cE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function lE(){return(lE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function pE(){return(pE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function uE(){return(uE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function hE(){return(hE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function dE(){return(dE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function mE(){return(mE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function fE(){return(fE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function vE(){return(vE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function gE(){return(gE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function yE(){return(yE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function bE(){return(bE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function _E(){return(_E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function xE(){return(xE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function wE(){return(wE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function EE(){return(EE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function SE(){return(SE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function CE(){return(CE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function RE(){return(RE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function PE(){return(PE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ME(){return(ME=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function TE(){return(TE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function AE(){return(AE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function kE(){return(kE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function OE(){return(OE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function DE(){return(DE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function zE(){return(zE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function NE(){return(NE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function BE(){return(BE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function LE(){return(LE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function jE(){return(jE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function IE(){return(IE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function $E(){return($E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function FE(){return(FE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function HE(){return(HE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function VE(){return(VE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var GE={BusinessRuleTask:({styles:e={},...t})=>Vb("svg",Xx({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zM5.296 7.398v12.665h16.87V7.398H5.296zm.718 4.386h15.433v3.44H9.985v-3.432h-.719v3.431H6.014v-3.44zm0 4.158h3.252v3.403H6.014v-3.403zm3.97 0h11.463v3.403H9.985v-3.403z"}),Vb("path",{d:"M6.079 8.209v3.587H21.44V8.209z"})),CallActivity:({styles:e={},...t})=>Vb("svg",Yx({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M24.978 3c3.761 0 6.89 2.979 7.018 6.695l.004.238V22.4c0 3.747-3.05 6.804-6.783 6.93l-.24.003H7.023c-3.761 0-6.89-2.978-7.018-6.695L0 22.4V9.933C0 6.187 3.05 3.13 6.783 3.004L7.023 3h17.955zm0 3.667H7.022c-1.842 0-3.255 1.344-3.35 3.079l-.005.187V22.4c0 1.761 1.35 3.167 3.16 3.262l.195.005L10 25.666V15h12v10.666h2.978c1.842 0 3.255-1.344 3.35-3.079l.005-.187V9.933c0-1.761-1.35-3.166-3.16-3.261l-.195-.005zm-3.732 9.087H10.754v9.912h10.491v-9.912zm-4.475 1.817v2.658h2.658v1.542H16.77v2.658H15.23V21.77H12.57V20.23h2.658V17.57h1.542z"})),Collaboration:({styles:e={},...t})=>Vb("svg",Kx({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("g",{fillRule:"evenodd"},Vb("path",{fillRule:"nonzero",d:"M0 0v8.62h32V0H0zm1.655 7.054v-5.37h28.62v5.37H1.656zM0 23.38V32h32v-8.62H0zm1.655 7.054v-5.37h28.62v5.37H1.656z"}),Vb("path",{d:"M24 8l4 7h-8l4-7zm0 2l-2.28 4h4.56L24 10zM23.5 21h1v3h-1zM23.5 15h1v3h-1zM8 24l-4-7h8l-4 7zm0-2l2.28-4H5.72L8 22zM7.5 8h1v3h-1zM7.5 14h1v3h-1z"}))),ConditionalFlow:({styles:e={},...t})=>Vb("svg",Zx({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M32 .041S20.42 5.95 14.537 8.713c1.26 1.15 2.432 2.392 3.648 3.588-5.703 5.78-3.15 3.303-8.087 8.316l-8.472 1.377L0 32l10.006-1.626.098-.598 1.279-7.873c4.975-5.052 2.403-2.555 8.118-8.346 1.218 1.214 2.43 2.435 3.648 3.648C26.29 11.018 32 .041 32 .041zM9.603 22.397L8.54 28.91 2.03 29.97l1.061-6.515 6.512-1.058z"})),SequenceFlow:({styles:e={},...t})=>Vb("svg",Qx({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M32 .06S20.33 6.014 14.403 8.798c1.27 1.16 2.451 2.41 3.676 3.616L0 30.734 1.325 32l18.08-18.32c1.227 1.223 2.448 2.453 3.676 3.676C26.247 11.12 32 .06 32 .06z"})),DataInput:({styles:e={},...t})=>Vb("svg",Jx({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M20.833 0H3.488v32H28V7.36L20.833 0zm-2.105 1.818v7.507h7.454v20.857H5.306V1.818h13.422zm1.818.493l5.06 5.196h-5.06V2.311zm-9.182.86v3.744H7.081v3.222h4.283v3.743l5.7-5.354-5.7-5.354zm.808 1.868l3.711 3.487-3.71 3.487V9.329H7.888V7.723h4.283V5.039z"})),DataOutput:({styles:e={},...t})=>Vb("svg",tw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M20.833 0H3.488v32H28V7.36L20.833 0zm-2.105 1.818v7.507h7.454v20.857H5.306V1.818h13.422zm1.818.493l5.06 5.196h-5.06V2.311zm-9.182.86v3.744H7.081v3.222h4.283v3.743l5.7-5.354-5.7-5.354z"})),DataObjectReference:({styles:e={},...t})=>Vb("svg",ew({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M21.345 0H4v32h24.512V7.36L21.345 0zM19.24 1.818v7.507h7.454v20.857H5.818V1.818H19.24zm1.818.493l5.06 5.196h-5.06V2.311z"})),DataStoreReference:({styles:e={},...t})=>Vb("svg",nw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M16.008 1c-3.712 0-7.417.306-10.319.939-1.45.316-2.7.71-3.68 1.226C1.065 3.662.297 4.304.061 5.23a.823.823 0 00-.035.15L0 5.502l.017.084c-.012 7.41 0 14.46 0 22.08l.017.082c.203.985.995 1.656 1.975 2.172.98.517 2.23.91 3.68 1.226 2.902.633 6.607.94 10.319.94 3.711 0 7.416-.307 10.318-.94 1.451-.316 2.701-.71 3.68-1.226.98-.516 1.772-1.187 1.975-2.172l.017-.082V5.541a.825.825 0 000-.106v-.016l-.002-.013a.823.823 0 00-.046-.197c-.244-.916-1.007-1.55-1.943-2.044-.98-.516-2.23-.91-3.68-1.226C23.423 1.306 19.718 1 16.006 1zm0 1.646c3.62 0 7.245.308 9.968.901 1.36.297 2.497.67 3.263 1.074.612.323.932.643 1.063.882-.131.24-.451.56-1.063.882-.766.404-1.902.777-3.263 1.074-2.723.594-6.349.901-9.968.901-3.62 0-7.245-.307-9.968-.901-1.361-.297-2.497-.67-3.264-1.074-.611-.322-.931-.642-1.062-.882.13-.24.451-.56 1.062-.882.767-.403 1.903-.777 3.264-1.074 2.723-.593 6.348-.9 9.968-.9zM1.664 7.647c.112.067.227.132.345.194.98.517 2.23.91 3.68 1.226 2.902.633 6.607.94 10.319.94 3.711 0 7.416-.307 10.318-.94 1.451-.316 2.701-.71 3.68-1.226.119-.062.234-.127.346-.194v1.93c-.08.245-.398.619-1.113.995-.766.404-1.902.777-3.263 1.074-2.723.594-6.349.901-9.968.901-3.62 0-7.245-.307-9.968-.9-1.361-.298-2.497-.671-3.264-1.075-.714-.376-1.032-.75-1.112-.995v-1.93zm0 4.187c.112.067.227.132.345.195.98.516 2.23.91 3.68 1.226 2.902.632 6.607.938 10.319.938 3.711 0 7.416-.306 10.318-.938 1.451-.317 2.701-.71 3.68-1.226.119-.063.234-.128.346-.195v1.93c-.08.245-.398.619-1.113.995-.766.404-1.902.777-3.263 1.074-2.723.594-6.349.901-9.968.901-3.62 0-7.245-.307-9.968-.9-1.361-.298-2.497-.67-3.264-1.075-.714-.376-1.032-.75-1.112-.995v-1.93zm0 4.188c.112.067.227.131.345.194.98.516 2.23.91 3.68 1.226 2.902.633 6.607.939 10.319.939 3.711 0 7.416-.306 10.318-.94 1.451-.316 2.701-.709 3.68-1.225.119-.063.234-.127.346-.194V27.47c-.08.245-.398.618-1.113.995-.766.404-1.902.777-3.263 1.074-2.723.594-6.349.9-9.968.9-3.62 0-7.245-.306-9.968-.9-1.361-.297-2.497-.67-3.264-1.074-.714-.377-1.032-.75-1.112-.995V16.022z"})),DefaultFlow:({styles:e={},...t})=>Vb("svg",iw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M32 .06S20.33 6.014 14.403 8.798c1.27 1.16 2.451 2.41 3.676 3.616L6.84 23.804H.046v1.755h5.063L0 30.735 1.325 32l6.357-6.441h7.145v-1.756H9.414l9.99-10.123c1.228 1.223 2.45 2.453 3.677 3.676C26.247 11.12 32 .06 32 .06z"})),CancelEndEvent:({styles:e={},...t})=>Vb("svg",rw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm-3.955 3.918L8.94 12.072l3.985 3.985-3.913 3.913 3.048 3.047 3.913-3.913 3.987 3.987 3.096-3.096-3.987-3.987 3.913-3.913-3.047-3.048-3.913 3.913-3.985-3.985z"})),CompensateEndEvent:({styles:e={},...t})=>Vb("svg",ow({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm-.56 5.744l-7.407 5.23 7.408 5.234v-5.057c2.384 1.687 4.771 3.371 7.157 5.057V10.801l-7.157 5.054v-5.054z"})),ErrorEndEvent:({styles:e={},...t})=>Vb("svg",aw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm6.132 4.166l-3.633 7.363-4.516-5.874-4.102 12.131 4.599-5.91 4.743 5.427 2.909-13.137z"})),EscalationEndEvent:({styles:e={},...t})=>Vb("svg",sw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm.006 3.9c-1.672 4.653-2.733 9.5-4.406 14.153 1.535-1.525 2.872-3.234 4.406-4.759l4.406 4.76c-1.497-4.71-2.91-9.445-4.406-14.155z"})),LinkEndEvent:({styles:e={},...t})=>Vb("svg",cw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.676 0C7.943.007.834 6.45.104 14.16c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 4.958 23.394.313 16.978.032A18.532 18.532 0 0015.676 0zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm1.78 4.065v3.555H9.779v6.713h7.994v3.554l5.828-6.91-5.828-6.912z"})),MessageEndEvent:({styles:e={},...t})=>Vb("svg",lw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.676 0C7.943.007.834 6.45.104 14.16c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 4.958 23.394.313 16.978.032A18.532 18.532 0 0015.676 0zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm-5.91 5.448l6.041 4.9 6.04-4.9H10.084zm-1.34 1.137v9.92h14.513v-9.718l-7.132 5.786-7.381-5.988z"})),MultipleEndEvent:({styles:e={},...t})=>Vb("svg",pw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.676 0C7.943.007.834 6.45.104 14.16c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 4.958 23.394.313 16.978.032A18.529 18.529 0 0015.676 0zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm.011 3.039l-7.619 5.53 2.91 8.95h9.418l2.91-8.95-7.619-5.53z"})),EndEvent:({styles:e={},...t})=>Vb("svg",uw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.84.042C8.654-.01 1.913 5.437.4 12.454-1.057 18.62 1.554 25.495 6.784 29.09c5.076 3.636 12.31 3.92 17.59.544 5.309-3.251 8.435-9.744 7.445-15.921C30.91 7.307 25.795 1.738 19.442.422a16.064 16.064 0 00-3.602-.38zm.382 5.01c5.28-.017 10.13 4.353 10.669 9.61.687 5.025-2.552 10.281-7.423 11.792-4.754 1.617-10.486-.447-12.962-4.856-2.74-4.575-1.574-11.094 2.768-14.27a11.05 11.05 0 016.948-2.276z"})),SignalEndEvent:({styles:e={},...t})=>Vb("svg",hw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm.006 3.492c-2.261 4.07-4.532 8.136-6.797 12.204h13.595L15.999 8.55z"})),TerminateEndEvent:({styles:e={},...t})=>Vb("svg",dw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm.006 2.859c-5.264-.2-9.495 5.551-7.755 10.516 1.366 5.085 8.108 7.436 12.339 4.301 4.455-2.807 4.708-9.943.462-13.058A8.128 8.128 0 0016 7.915z"})),EventSubProcess:({styles:e={},...t})=>Vb("svg",mw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M7.295 4.78h1.779V3.003h-1.78V4.78zm3.558 0h1.779V3.003h-1.78V4.78zm3.557 0h1.78V3.003h-1.78V4.78zm3.558 0h1.78V3.003h-1.78V4.78zm3.558 0h1.779V3.003h-1.779V4.78zm3.558 0c.55.014 1.106-.034 1.654.045l.245-1.762c-.629-.096-1.266-.05-1.9-.061V4.78zM5.732 3.004a5.933 5.933 0 00-.915.093c.111.582.226 1.164.315 1.75.358-.101.947.098.746-.483-.096-.382.164-1.208-.146-1.36zm22.372 2.281c.427.234.812.547 1.13.915.42-.4 1.002-.777 1.33-1.18a5.863 5.863 0 00-1.593-1.289l-.867 1.554zm-25.27-1.44c-.587.354-1.11.811-1.539 1.345.47.333.96.86 1.417 1.077.299-.362.66-.673 1.065-.913-.328-.493-.55-1.055-.944-1.509zM30.515 7.26c-.563.046-.557.342-.378.784.154.25-.097.862.25.85.525-.023 1.14.043 1.612-.032a5.891 5.891 0 00-.362-2.027l-1.122.425zM.268 7.114A6.042 6.042 0 000 9.052h1.78c-.013-.5.047-1.003.208-1.478L.296 7.027l-.026.079-.002.008zM30.22 12.45H32v-1.779h-1.779v1.779zm-30.22.16h1.78v-1.779H0v1.78zm30.22 3.398H32v-1.78h-1.779v1.78zm-30.22.16h1.78v-1.779H0v1.779zm30.22 3.398H32v-1.78h-1.779v1.78zm-30.22.16h1.78v-1.78H0v1.78zm30.22 3.397H32v-1.779h-1.779v1.78zm-30.22.16h1.78v-1.778H0v1.778zm30.137 1.47a4.059 4.059 0 01-.522 1.32c.506.283 1.046.715 1.53.908a5.836 5.836 0 00.744-1.918c-.576-.094-1.209-.264-1.752-.31zm-29.984.51c.157.676.435 1.325.82 1.904l1.486-.977a4.065 4.065 0 01-.577-1.347l-1.73.42zm28.427 1.943c-.371.277-.79.49-1.234.627l.548 1.693a5.84 5.84 0 001.835-.96l-1.082-1.412-.066.05-.001.002zm-26.164 1.47c.567.413 1.21.722 1.886.907.14-.569.343-1.175.444-1.722a4.062 4.062 0 01-1.283-.624l-1.047 1.438zm3.88 1.119h1.779v-1.78h-1.78v1.78zm3.55 0h1.787v-1.78H9.846v1.78zm3.565 0h1.78v-1.78h-1.78v1.78zm3.558 0h1.78v-1.78h-1.78v1.78zm3.451 0h1.743v-1.78h-1.743v1.78zm3.665 0h1.779v-1.78h-1.78v1.78zm-1.922-.545V16.776H9.846V29.25h12.318zM10.967 17.905h10.068V27.97H10.967V17.905zm1.336 3.998v1.711h7.396v-1.711h-7.396z",opacity:".97"})),ComplexGateway:({styles:e={},...t})=>Vb("svg",fw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M16.001 0a1.29 1.29 0 00-.917.373L.373 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.917.372A1.294 1.294 0 0016.002 0zM16 2.181l13.821 13.821L16 29.823 2.179 16.003 16 2.18zm-.327 6.79v.007l-.145.027-.118.08-.083.123-.028.145v4.954L11.793 10.8l-.125-.08-.14-.029-.144.027-.122.082-.46.46-.085.125-.026.142.028.14.08.125 3.505 3.505H9.347l-.001-.002-.145.032-.118.08-.083.122-.028.146v.652l.029.147.082.119.12.08.144.032h4.956L10.8 20.207v-.001l-.084.124-.026.142.028.14.08.124.46.461.126.082.14.029.143-.027.124-.084L15.3 17.69v4.964-.001l.028.147.082.12.12.08.144.031h.652l.148-.03.118-.08.083-.12.028-.146v-4.962l3.505 3.505.126.082.14.027.142-.027.124-.084.461-.46.083-.123s.028-.144.027-.146l-.028-.14-.082-.126-3.496-3.496h4.948l.148-.03.119-.08.082-.12.028-.147v-.652l-.028-.145-.083-.122-.119-.08s-.147-.033-.147-.031h-4.964l3.512-3.512.082-.122.029-.144-.028-.14-.084-.124-.46-.461-.123-.082-.14-.027-.145.027-.122.082-3.507 3.507V9.348l-.028-.146-.082-.122-.12-.08-.147-.029h-.652z"})),EventBasedGateway:({styles:e={},...t})=>Vb("svg",vw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M16 0a1.29 1.29 0 00-.918.373L.371 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.915.372A1.294 1.294 0 0016 0zm-.002 2.181l13.821 13.821-13.821 13.821-13.821-13.82L15.998 2.18zm0 5.876l-.254.185-7.377 5.355 2.915 8.964h9.433l2.915-8.964-7.631-5.54zm0 1.07l6.614 4.8-2.526 7.769h-8.175l-2.526-7.768 6.614-4.802z"})),ExclusiveGateway:({styles:e={},...t})=>Vb("svg",_w({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M16 0a1.29 1.29 0 00-.918.373L.371 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.915.372A1.294 1.294 0 0016 0zm-.002 2.181l13.821 13.821-13.821 13.821-13.821-13.82L15.998 2.18zm-5.162 7.69l-.166.032-.141.096-.532.532s-.097.142-.097.144l-.03.164.032.162.093.144 4.857 4.858-4.855 4.855v-.001L9.9 21l-.03.164.032.162s.093.142.093.144l.531.532.146.095.162.032.164-.03.144-.097 4.855-4.856 4.857 4.857.145.095.162.032.164-.03.144-.097.531-.532.095-.14.033-.168-.033-.162-.095-.146L17.144 16 22 11.144l.095-.14.033-.166-.033-.163-.097-.144-.532-.532-.14-.095-.163-.032-.166.032-.141.095L16 14.855l-4.858-4.858v-.002l-.144-.092-.162-.032z"})),Gateway:({styles:e={},...t})=>Vb("svg",gw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M.373 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.917.373a1.313 1.313 0 00-1.833 0L.373 15.084zm1.806.918L16 2.182l13.821 13.82L16 29.823 2.179 16.003z"})),InclusiveGateway:({styles:e={},...t})=>Vb("svg",yw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M16.001 0a1.29 1.29 0 00-.917.373L.373 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.917.372A1.294 1.294 0 0016.002 0zM16 2.181l13.821 13.821L16 29.823 2.179 16.003 16 2.18zm0 6.379a7.447 7.447 0 00-7.44 7.441A7.447 7.447 0 0016 23.443 7.447 7.447 0 0023.443 16a7.447 7.447 0 00-7.441-7.441zm0 .825a6.61 6.61 0 016.617 6.616A6.61 6.61 0 0116 22.618 6.61 6.61 0 019.385 16 6.61 6.61 0 0116 9.385z"})),ParallelGateway:({styles:e={},...t})=>Vb("svg",bw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M16.001 0a1.29 1.29 0 00-.917.373L.373 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.917.372A1.294 1.294 0 0016.002 0zM16 2.181l13.821 13.821L16 29.823 2.179 16.003 16 2.18zm-.377 5.708l-.168.032-.136.092-.096.14-.032.168v6.868h-6.87l-.002-.002-.166.037-.137.092v-.002l-.095.141-.033.167v.753s.032.169.034.17l.094.138.138.092.167.036h6.87v6.867l-.001-.001.033.17.095.138.138.092s.166.035.167.037h.752l.17-.036.137-.092.095-.137.033-.17v-6.867h6.868l.17-.035.137-.092.095-.137.033-.17v-.753s-.033-.165-.032-.167l-.096-.14-.138-.093s-.17-.037-.17-.035H16.81V8.323l-.033-.168-.094-.14-.138-.092-.17-.034h-.752z"})),Group:({styles:e={},...t})=>Vb("svg",xw({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M6.34.016c-2.333.025-4.684 1.77-5.29 4.17C.608 5.848.88 7.608.804 9.314v2.922h2.041c.038-2.332-.076-4.673.062-7C3.14 3.355 4.869 1.938 6.643 2.04h8.956V.009c-3.086 0-6.173-.02-9.258 0v.007zm13.094 2.023h1.92V.009h-1.92v2.03zm5.756 0c1.265-.069 2.66.045 3.602 1.055 1.036.983 1.201 2.523 1.122 3.91v6.313h2.078c-.03-2.677.062-5.36-.047-8.032-.17-2.743-2.62-5.111-5.215-5.236-.511-.064-1.027-.02-1.54-.033v2.023zM.803 18.319h2.041v-2.026H.804v2.026zm29.11 1.084h2.08v-2.03h-2.08v2.03zM.804 26.148c.004 2.218 1.393 4.366 3.313 5.28 1.728.853 3.681.448 5.521.544.43-.112 1.29.231 1.435-.183v-1.847c-1.788-.043-3.584.094-5.365-.082-1.67-.354-2.919-2.048-2.863-3.844v-3.644H.804v3.777zm29.11-.068c.04 1.961-1.508 3.787-3.381 3.842-1.954.06-3.914.02-5.87.026v2.03c2.118-.042 4.242.08 6.355-.063 2.524-.264 4.818-2.644 4.94-5.323.08-1.039.014-2.085.035-3.126h-2.078v2.613zm-15.006 5.898h1.92v-2.03h-1.92v2.03z"})),CancelIntermediateCatchEvent:Ew,CompensateIntermediateCatchEvent:Cw,ConditionalIntermediateCatchEvent:Pw,ErrorIntermediateCatchEvent:Tw,EscalationIntermediateCatchEvent:kw,LinkIntermediateCatchEvent:Dw,MessageIntermediateCatchEvent:Nw,MultipleIntermediateCatchEvent:Lw,ConditionalIntermediateCatchEventNonInterrupting:Iw,EscalationIntermediateCatchEventNonInterrupting:Fw,MessageIntermediateCatchEventNonInterrupting:Vw,MultipleIntermediateCatchEventNonInterrupting:Ww,ParallelIntermediateCatchEventNonInterrupting:qw,SignalIntermediateCatchEventNonInterrupting:Yw,TimerIntermediateCatchEventNonInterrupting:Zw,ParallelMultipleIntermediateCatchEvent:Jw,SignalIntermediateCatchEvent:tE,TimerIntermediateCatchEvent:iE,IntermediateThrowEvent:oE,CompensateIntermediateThrowEvent:({styles:e={},...t})=>Vb("svg",aE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm-.56 5.772l-7.408 5.231 7.409 5.234v-5.057c2.385 1.687 4.771 3.371 7.157 5.057V10.747l-7.157 5.055v-5.055z"})),EscalationIntermediateThrowEvent:({styles:e={},...t})=>Vb("svg",sE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm.006 3.927c-1.672 4.654-2.734 9.502-4.406 14.155 1.534-1.525 2.872-3.234 4.406-4.759l4.406 4.76c-1.496-4.71-2.91-9.446-4.406-14.156z"})),LinkIntermediateThrowEvent:({styles:e={},...t})=>Vb("svg",cE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm1.78 4.093v3.555H9.785v6.714h7.994v3.554l5.829-6.911-5.83-6.912z"})),MessageIntermediateThrowEvent:({styles:e={},...t})=>Vb("svg",lE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm-5.91 5.475l6.04 4.901 6.042-4.9H10.088zm-1.341 1.138v9.921h14.514V11.79l-7.132 5.787-7.382-5.99z"})),MultipleIntermediateThrowEvent:({styles:e={},...t})=>Vb("svg",pE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm.006 3.073l-7.62 5.532 2.91 8.95h9.42l2.91-8.95-7.62-5.532z"})),SignalIntermediateThrowEvent:({styles:e={},...t})=>Vb("svg",uE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm.006 3.52c-2.261 4.07-4.533 8.136-6.798 12.205h13.596L16.005 8.495z"})),Lane:({styles:e={},...t})=>Vb("svg",hE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M0 7v18.62h32V7H0zm1.655 17.056V8.684h28.62v15.372H1.656z"})),ManualTask:({styles:e={},...t})=>Vb("svg",dE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zm4.43 1.328c-.222.005-.43.09-.606.203-.985.638-4.356 2.977-5.096 3.486-.67.46-1.12 1.153-1.38 1.974-.27.858-.235 1.793-.232 2.576.002.59.016 1.104.17 1.727.22.908.634 1.63 1.23 2.118.597.49 1.363.732 2.23.734 3.038.012 6.078.016 9.119 0 .327-.002.645-.127.848-.37.204-.241.287-.56.291-.914a1.732 1.732 0 00-.097-.625h.327c.335 0 .641-.11.852-.316.21-.206.317-.475.374-.754a1.783 1.783 0 00-.126-1.143 1.18 1.18 0 00.877-.521c.196-.306.257-.666.258-1.025.001-.375-.088-.738-.293-1.033a1.179 1.179 0 00-.958-.512h-.478c.108-.237.156-.505.155-.782-.003-.373-.098-.721-.316-.99a1.21 1.21 0 00-.943-.43c-2.273-.004-4.236.018-6.412.012l-.19-.001c.102-.104.202-.205.312-.314.337-.336.662-.652.83-.869.4-.516.46-1.215.123-1.729-.178-.272-.439-.456-.72-.494a.93.93 0 00-.148-.008zm.029.728l.022.001c.055.008.115.027.209.172.132.201.126.606-.09.884-.079.102-.431.465-.767.8-.337.334-.657.643-.815.836-.153.186-.096.338-.056.435.04.096.085.212.298.263.063.014.066.01.086.012l.066.003c2.429.027 4.986-.004 7.223-.003.194 0 .293.056.379.162.086.105.151.286.153.533 0 .257-.065.467-.155.59-.09.124-.183.182-.37.183-1.706-.001-3.411-.005-5.117-.009v.731c2.23.004 4.461.01 6.692.012.17 0 .265.06.361.2.096.138.164.364.163.615 0 .268-.058.501-.143.634-.085.132-.162.193-.385.195-2.32-.001-4.554-.006-6.688-.003v.73c1.905 0 3.809.003 5.713.001.194.005.316.09.416.26.102.173.151.442.093.728-.04.193-.102.313-.17.38-.067.065-.148.108-.343.108h-5.71l.002.734c1.445 0 2.89-.01 4.334-.001.162 0 .232.041.297.123.064.081.123.238.12.488-.003.244-.061.385-.12.455-.06.07-.127.11-.296.11-3.037.016-6.076.012-9.113 0-.735-.002-1.316-.196-1.77-.568-.454-.372-.793-.935-.986-1.728-.134-.546-.146-.978-.148-1.558-.003-.796-.018-1.664.199-2.354.222-.705.582-1.24 1.096-1.593.75-.515 4.14-2.866 5.079-3.474a.504.504 0 01.241-.087z"})),MessageFlow:({styles:e={},...t})=>Vb("svg",mE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M4.073 26.607l1.295 1.296L1.325 32l-.662-.633L0 30.735l4.073-4.128zm6.953-7.046l1.296 1.296L1.325 32l7.555-7.656-1.295-1.296 1.455-1.474 1.986-2.013zM32 .06s-2.699 5.189-5.417 10.462l-.326.633c-1.14 2.214-2.265 4.407-3.176 6.2-1.228-1.222-2.449-2.452-3.676-3.675l-3.57 3.618-1.297-1.296 3.541-3.588c-.98-.964-1.932-1.958-2.923-2.91l-.753-.706c2.68-1.258 6.533-3.165 9.95-4.876l.617-.309C28.838 1.673 32 .06 32 .06zm-4.126 4.06l-.015.007-.115.057-.048.024-.115.057L17.7 9.172l5.017 4.948 5.157-10z"})),Participant:({styles:e={},...t})=>Vb("svg",fE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M0 5v22.069h32V5H0zm30.276 1.684v18.82H6.62V6.684h23.655zm-28.62 0h3.31v18.82h-3.31V6.684z"})),Process:({styles:e={},...t})=>Vb("svg",vE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{fillRule:"evenodd",d:"M16.177 0l.137.002c.452.009.9.037 1.342.082.346.036.62.303.68.646l.437 2.536c.055.319.296.57.608.655.986.269 1.923.653 2.796 1.14.28.155.624.145.885-.039l2.083-1.47a.775.775 0 01.937.022c.86.699 1.645 1.484 2.343 2.343.22.27.223.653.023.937l-1.439 2.038a.833.833 0 00-.031.896c.512.889.92 1.846 1.204 2.855a.833.833 0 00.653.601l2.435.42c.342.059.61.333.645.679a15.928 15.928 0 01.08 2.064l-.003.114c-.012.382-.038.76-.077 1.134a.775.775 0 01-.645.68l-2.396.412a.835.835 0 00-.656.61 12.511 12.511 0 01-1.2 2.917.832.832 0 00.034.892l1.396 1.978c.2.284.196.667-.023.936a16.104 16.104 0 01-2.343 2.343.775.775 0 01-.937.023l-1.99-1.404a.833.833 0 00-.88-.026c-.907.516-1.886.922-2.916 1.2a.833.833 0 00-.61.656l-.414 2.396a.775.775 0 01-.679.646 16.096 16.096 0 01-3.312 0 .775.775 0 01-.679-.646l-.423-2.452a.834.834 0 00-.598-.636 12.474 12.474 0 01-1.468-.514 12.49 12.49 0 01-1.417-.68.833.833 0 00-.878.03l-2.026 1.43a.775.775 0 01-.937-.023 16.069 16.069 0 01-2.342-2.342.774.774 0 01-.024-.936l1.402-1.986a.833.833 0 00.032-.896 12.507 12.507 0 01-1.214-2.911.833.833 0 00-.655-.606l-2.386-.412a.775.775 0 01-.646-.678 16.097 16.097 0 010-3.314.775.775 0 01.646-.678l2.386-.412a.833.833 0 00.655-.606 12.507 12.507 0 011.214-2.911.833.833 0 00-.032-.896L3.552 6.853a.774.774 0 01.023-.936 16.091 16.091 0 012.343-2.343.775.775 0 01.937-.023l2.03 1.433c.26.177.6.182.874.028.915-.512 1.88-.9 2.87-1.167a.833.833 0 00.612-.656l.424-2.46a.775.775 0 01.679-.645C14.845.032 15.348.004 15.85 0h.326zM16 6.4c-5.302 0-9.6 4.297-9.6 9.599 0 5.302 4.298 9.6 9.6 9.6s9.6-4.298 9.6-9.6-4.298-9.6-9.6-9.6zm-3 4.283c0-1.425 1.637-2.203 2.715-1.29l5.69 4.815c.794.672.794 1.91 0 2.583l-5.69 4.815c-1.078.913-2.715.134-2.715-1.29z"})),ReceiveTask:({styles:e={},...t})=>Vb("svg",gE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zM5.23 7.764v11.577h17.55V7.764H5.23zm1.816.758h13.917l-6.959 4.577-6.958-4.577zm-1.06.21l8.018 5.274 8.018-5.275v9.853H5.987V8.73z"})),ScriptTask:({styles:e={},...t})=>Vb("svg",yE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zm2.99 3.077l-.077.045-.026.015c-1.09.646-1.84 1.239-2.336 1.818-.496.579-.735 1.162-.742 1.725-.014 1.119.812 1.958 1.544 2.708.732.75 1.385 1.456 1.446 2.041.032.298-.039.598-.364 1.008-.324.408-.911.897-1.85 1.445l-1.388.808h8.56l.101-.059c.996-.58 1.667-1.116 2.094-1.655.429-.54.603-1.107.547-1.638-.11-1.052-.967-1.818-1.688-2.556-.721-.739-1.306-1.436-1.298-2.092.004-.331.132-.7.535-1.171.402-.47 1.08-1.02 2.119-1.636l1.362-.806h-8.54zm.241.867h5.271a6.83 6.83 0 00-1.113 1.01c-.496.58-.736 1.163-.743 1.726-.014 1.119.812 1.958 1.544 2.708.732.75 1.385 1.456 1.446 2.041.032.298-.039.598-.364 1.008-.312.393-.872.862-1.753 1.386H8.728c.367-.286.658-.566.88-.847.43-.54.604-1.107.548-1.638-.11-1.052-.968-1.818-1.688-2.556-.721-.739-1.306-1.435-1.298-2.092.004-.331.132-.7.534-1.171.389-.454 1.04-.984 2.021-1.575zm-1.233 1.48v.4h4.12v-.4h-4.12zm-.154 2.158v.4H12.6v-.4H8.34zm1.931 2.158v.4h4.126v-.4H10.27zm.59 2.158v.4h4.276v-.4h-4.276z"})),SendTask:({styles:e={},...t})=>Vb("svg",bE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zm-1.38 3.16l8.332 4.717L21.78 8.16H5.114zm.021 1.745v9.309H21.8V9.905l-8.353 4.655-8.31-4.655z"})),ServiceTask:({styles:e={},...t})=>Vb("svg",_E({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zm1.22 1.681V7.84c-.329.093-.63.223-.914.382l-.83-.82-1.554 1.561.83.82c-.16.288-.285.594-.372.911l-1.177.002v2.2l1.189-.004c.109.431.345.819.58 1.165v-1.898l-1.038.004v-.737l1.034-.002.058-.294c.084-.429.252-.838.493-1.203l.165-.25-.727-.718.523-.526.728.719.247-.165c.379-.25.793-.417 1.206-.505l.291-.06-.002-1.01h.75L9.19 8.417H11.16c-.185-.221-.951-.508-1.237-.588L9.93 6.68H7.713zm2.078 2.105l.003 1.158a4.19 4.19 0 00-.915.383l-.83-.821-1.553 1.562.83.82c-.16.288-.286.593-.373.91l-1.176.003v2.2l1.188-.004c.094.326.224.624.383.905l-.85.847 1.57 1.543.847-.843c.29.161.599.286.919.373v1.198c.756.006 1.56.003 2.206.003V17.81a4.19 4.19 0 00.915-.383l.847.835 1.554-1.56-.848-.836c.16-.288.286-.594.373-.912l1.152-.007V12.75l-1.165.007a4.09 4.09 0 00-.382-.905l.805-.807-1.57-1.546-.804.806a4.16 4.16 0 00-.915-.372l.007-1.147H9.792zm.732.73h.751l-.006 1.005.297.058c.43.085.844.252 1.21.492l.25.162.701-.704.528.52-.702.704.169.25c.248.374.412.779.505 1.196l.061.292 1.016-.006v.737l-1.01.006-.058.292c-.085.43-.252.838-.494 1.205l-.165.25.744.733-.523.525-.743-.734-.248.165c-.378.247-.789.418-1.203.503l-.294.058v1.067h-.745v-1.059l-.295-.057a3.395 3.395 0 01-1.21-.492l-.248-.162-.747.743-.528-.52.747-.744-.17-.25a3.546 3.546 0 01-.506-1.196l-.06-.291-1.04.004v-.738l1.034-.002.058-.294c.085-.428.252-.837.493-1.203l.165-.25-.726-.718.522-.526.728.72.248-.166a3.546 3.546 0 011.205-.504l.292-.06-.003-1.01zm.388 2.685a1.65 1.65 0 00-1.645 1.645c0 .904.74 1.645 1.645 1.645a1.65 1.65 0 001.645-1.645 1.65 1.65 0 00-1.645-1.645zm0 .73a.91.91 0 01.915.915.91.91 0 01-.915.914.91.91 0 01-.915-.914.91.91 0 01.915-.915z"})),CompensateStartEvent:({styles:e={},...t})=>Vb("svg",xE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.995.001C9.705-.084 3.643 3.964 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994 0zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626C2.101 23.171.377 16.07 2.848 10.44c2.14-5.205 7.515-8.774 13.147-8.708zm-.566 9.03l-7.415 5.235 7.415 5.238v-5.062c2.386 1.689 4.775 3.375 7.163 5.062V10.761l-7.163 5.058v-5.058zm-.866 1.666v7.13L9.51 15.993l5.052-3.565zm7.166 0v7.137l-5.052-3.568 5.052-3.569z"})),ConditionalStartEvent:({styles:e={},...t})=>Vb("svg",wE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M16 0C7.174 0 0 7.174 0 16s7.174 16 16 16 16-7.174 16-16S24.826 0 16 0zm0 1.73c7.892 0 14.27 6.378 14.27 14.27 0 7.891-6.379 14.27-14.27 14.27S1.73 23.891 1.73 16C1.73 8.108 8.108 1.73 16 1.73zm-5.362 7.523v13.493h10.724V9.253H10.638zm.863.866h8.995V21.88H11.501V10.12zm.928 1.324v.863h7.139v-.863h-7.139zm0 2.605v.867h7.139v-.867h-7.139zm0 3.01v.864h7.139v-.863h-7.139zm0 2.72v.863h7.139v-.863h-7.139z"})),ErrorStartEvent:({styles:e={},...t})=>Vb("svg",EE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.995.005C9.705-.08 3.643 3.968 1.257 9.78-1.235 15.49.06 22.581 4.42 27.034c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994.005zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626-4.814-3.838-6.538-10.939-4.067-16.57 2.14-5.205 7.515-8.774 13.147-8.708zm6.13 7.45l-3.635 7.37-4.52-5.88c-1.37 4.048-2.738 8.095-4.106 12.143l4.603-5.917 4.748 5.433 2.91-13.149zm-7.754 3.889l4.299 5.449 1.073-2.39-1.028 4.135-4.387-5.16-1.78 2.75 1.823-4.784z"})),EscalationStartEvent:({styles:e={},...t})=>Vb("svg",SE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.995.001C9.705-.084 3.643 3.964 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994 0zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626C2.101 23.171.377 16.07 2.848 10.44c2.14-5.205 7.515-8.774 13.147-8.708zm0 7.183c-1.674 4.658-2.736 9.509-4.41 14.166 1.535-1.526 2.874-3.236 4.41-4.763l4.41 4.763c-1.499-4.713-2.913-9.453-4.41-14.166zm.032 2.931c.822 2.588 1.598 5.19 2.42 7.778l-2.42-2.615c-.683.598-2.455 2.887-2.34 2.39.871-2.489 1.448-5.07 2.34-7.553z"})),MessageStartEvent:({styles:e={},...t})=>Vb("svg",CE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.995.001C9.705-.084 3.643 3.964 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994 0zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626C2.101 23.171.377 16.07 2.848 10.44c2.14-5.205 7.515-8.774 13.147-8.708zm-7.257 8.732v11.069h14.513v-11.07H8.738zm3.224 1.73h8.064c-1.428.878-2.857 2.807-4.285 3.018l-3.779-3.019zm9.562 1.017v6.593H10.465V13.21l5.528 4.417 5.53-4.418z"})),MultipleStartEvent:({styles:e={},...t})=>Vb("svg",RE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.995.001C9.705-.084 3.643 3.964 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994 0zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626C2.101 23.171.377 16.07 2.848 10.44c2.14-5.205 7.515-8.774 13.147-8.708zm0 6.328l-7.626 5.536c.97 2.986 1.942 5.971 2.913 8.957h9.426l2.912-8.957-7.625-5.536zm0 1.068l6.609 4.798-2.525 7.763H11.91l-2.524-7.763 6.609-4.798z"})),ConditionalStartEventNonInterrupting:({styles:e={},...t})=>Vb("svg",PE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M10.632 9.189V22.68h10.723V9.189H10.632zm.862.865h8.994v11.76H11.494v-11.76zm.928 1.324v.863h7.138v-.863h-7.138zm0 2.605v.866h7.138v-.866h-7.138zm0 3.01v.863h7.138v-.863h-7.138zm0 2.72v.862h7.138v-.863h-7.138zM16.12 0h-.232l-.22.004h-.012l-.221.006h-.012l-.22.01h-.012l-.22.013h-.012l-.22.016h-.012l-.22.019h-.005l-.006.001-.22.021h-.006l-.005.001-.22.025h-.011l-.22.028h-.005l-.006.002-.219.03h-.005l-.006.001-.218.033-.006.001-.006.001-.217.036-.006.001-.006.001-.217.039-.006.001-.006.001-.216.042-.006.001-.006.001-.215.045-.006.001-.006.002-.215.047-.006.002-.006.001-.214.05-.006.002-.006.002-.115.029-.152.053-.14.081-.122.106-.1.126-.075.143-.047.154-.018.16.012.16.042.156.07.145.095.13.118.11.137.086.15.059.158.03h.161l.132-.022.11-.028.202-.047.203-.046.208-.043.202-.039.206-.037.206-.034.205-.03.208-.03.205-.025.209-.023.208-.02.21-.017.209-.015.207-.011.21-.009.21-.006.207-.003h.21l.21.002.207.005.207.008.212.011.207.014.208.017.209.019.208.022.205.025.206.028.207.03.208.035.205.036.202.039.052.01.16.018.16-.012.156-.042.146-.07.13-.096.109-.119.085-.136.06-.15.03-.159v-.16l-.03-.16-.059-.15-.086-.136-.109-.118-.13-.096-.145-.07-.128-.038-.057-.011-.006-.002h-.006l-.216-.042-.006-.001-.006-.001-.217-.039H18.9l-.006-.002-.217-.035-.006-.001-.006-.001-.218-.032-.006-.001-.006-.001-.218-.03h-.006l-.006-.001-.219-.027h-.011l-.22-.024-.005-.001h-.006l-.22-.021h-.006l-.006-.001-.22-.017-.005-.001h-.006L17.06.03h-.012l-.22-.012h-.012l-.22-.01h-.012l-.22-.005h-.012L16.132 0h-.012zm8.715 2.783l-.157.034-.149.063-.134.089-.116.112-.092.132-.067.147-.038.157-.008.16.021.16.051.153.079.141.103.124.102.087.052.038h.001l.087.064v.001l.082.061.002.001.076.059h.001l.084.065.082.066.002.001.079.063.002.002.077.063.081.067.002.002.077.065.076.065.001.002.08.07.078.07h.002l.075.068.077.072.002.001.073.069.077.073.072.07.002.001.077.076.07.07v.001l.075.076.07.073.002.001.074.079.002.002.069.074.069.075.074.082.07.08.002.001.068.079h.001l.067.079.068.082.065.078.001.002.068.083.067.084.063.081.001.002.067.087.002.002.063.084.001.001.064.087.008.01.008.01.095.12.093.121.09.119.087.119.088.122.086.123.084.12.081.122.001.002.084.126.08.126.08.127.077.126.079.131.074.127.075.131.073.131.07.13.07.133.069.133.045.09.086.137.109.119.13.096.144.07.156.042.16.013.16-.017.155-.047.143-.075.126-.1.106-.121.082-.14.054-.151.025-.16-.005-.16-.035-.158-.05-.124-.048-.095-.002-.004-.002-.004-.073-.14-.002-.005-.002-.004-.074-.14-.002-.004-.002-.004-.076-.14-.002-.003-.002-.004-.077-.139-.003-.004-.002-.004-.078-.138-.003-.004-.002-.003-.08-.137-.002-.004-.003-.004-.081-.136-.002-.004-.003-.004-.083-.136-.002-.003-.002-.004-.085-.135-.002-.004-.003-.003-.085-.134-.003-.004-.002-.004-.087-.132-.003-.004-.003-.004-.088-.132-.003-.003-.002-.004-.09-.13-.003-.005-.003-.003-.091-.13-.003-.004-.002-.004-.093-.129-.003-.003-.003-.004-.094-.128-.003-.004-.003-.003-.095-.127-.003-.004-.003-.004-.097-.125-.003-.004-.003-.004-.09-.114-.06-.082-.003-.003-.002-.003-.069-.091-.002-.004-.002-.003-.07-.09-.003-.003-.002-.003-.07-.09-.003-.003-.002-.003-.071-.09-.002-.003-.003-.002-.072-.089-.002-.003-.002-.003-.073-.088-.002-.003-.002-.002-.074-.087-.002-.003-.002-.003-.074-.086-.003-.003-.002-.003-.074-.086-.003-.002-.002-.003-.075-.085-.003-.003-.002-.002-.076-.084-.002-.003-.003-.003-.076-.083-.002-.003-.003-.003-.077-.082-.002-.003-.003-.002-.077-.082-.003-.003-.003-.002-.078-.081-.002-.003-.003-.003-.078-.08-.003-.002-.003-.003-.079-.08-.002-.002-.003-.002-.08-.08-.002-.002-.003-.002-.08-.078-.003-.003-.003-.002-.08-.077-.003-.003-.003-.002-.082-.077-.002-.002-.003-.002-.082-.076-.003-.002-.002-.003-.083-.075-.003-.002-.002-.003-.084-.074-.002-.002-.003-.002-.084-.074-.003-.002-.002-.002-.085-.073-.002-.002-.003-.003-.085-.071-.003-.003-.002-.002-.086-.07-.003-.003-.002-.002-.086-.07-.003-.003-.003-.002-.086-.07-.003-.002-.003-.002-.087-.069-.002-.002-.003-.002-.088-.068-.002-.002-.003-.002-.088-.067-.003-.003-.003-.002-.088-.066-.003-.002-.003-.002-.089-.066-.003-.002-.003-.002-.057-.042-.14-.082-.15-.055-.16-.026-.16.004zM6.377 3.21l-.157.037-.148.066-.111.074-.007.006-.003.002-.003.002-.086.069-.003.002-.002.002-.086.07-.003.002-.002.002-.086.07-.002.003-.003.002-.085.071-.002.002-.003.003-.084.071-.003.003-.002.002-.084.072-.003.003-.002.002-.083.073-.003.003-.002.002-.083.074-.002.002-.003.003-.082.074-.003.003-.002.002-.081.076-.003.002-.003.002-.08.077-.003.002-.003.003-.08.076-.002.003-.003.002-.08.078-.002.002-.003.003-.079.078-.002.003-.003.002-.078.08-.003.002-.002.002-.078.08-.002.003-.003.002-.077.08-.003.004-.002.002-.077.081-.002.003-.003.003-.076.082-.002.002-.003.003-.075.082-.002.003-.003.003-.074.083-.003.003-.002.003-.074.084-.003.003-.002.002-.074.085-.002.003-.002.003-.073.085-.003.003-.002.003-.072.086-.002.003-.003.003-.071.087-.003.003-.002.002-.07.088-.003.003-.002.003-.07.088-.003.003-.002.003-.07.09-.002.002-.002.003-.069.09-.002.003-.003.003-.068.09-.002.003-.002.003-.067.092-.003.003-.002.003-.067.092-.002.003-.002.003-.066.092-.002.003-.002.004-.066.093-.002.003-.002.003-.065.094-.002.003-.002.004-.064.094-.002.003-.002.004-.063.095-.002.003-.002.003-.063.097-.002.003-.002.003-.046.073-.05.07-.003.002-.002.003-.067.093-.003.003-.002.003-.066.094-.002.003-.002.003-.066.094-.002.003-.002.003-.064.094-.002.004-.002.003-.064.094-.002.004-.002.003-.062.095-.002.003-.002.003-.062.096-.002.003-.002.003-.06.096-.003.003-.002.003-.06.096-.001.004-.002.003-.059.096-.002.004-.002.003-.058.097-.002.003-.001.003-.057.098-.002.003-.002.003-.056.098-.002.003-.002.003-.055.098-.002.004-.001.003-.055.098-.001.004-.002.003-.054.099-.001.003-.002.003-.052.1-.002.002-.002.004-.051.1-.002.002-.002.004-.05.1-.002.003-.002.003-.05.1v.003l-.002.004-.05.1v.003l-.002.004-.048.1-.002.004-.001.003-.047.101-.002.003-.001.004-.013.027-.052.152-.024.16.006.16.037.157.064.148.091.133.114.114.134.09.147.065.157.036.162.006.159-.024.152-.053.14-.08.122-.105.1-.126.066-.117.01-.023.044-.095.045-.095.002-.003.042-.087.048-.097.048-.095v-.001l.048-.092.001-.001.047-.09.05-.093.002-.002.049-.09.052-.092.001-.002.051-.089.001-.002.051-.087.053-.088.001-.002.055-.091.057-.091.057-.09.001-.002.057-.089.055-.083.001-.002.06-.09.06-.088.062-.089.001-.001.06-.084.063-.088.065-.089.017-.023.016-.025.06-.094.059-.09v-.002l.058-.086.057-.086.001-.001.062-.09.062-.088.001-.002.06-.085.002-.002.06-.082.063-.087.064-.084.002-.002.061-.08.065-.084.064-.08v-.001l.067-.083.067-.082.07-.083.069-.08.063-.074.074-.083.068-.077.002-.002.07-.076.07-.075.072-.077.001-.001.067-.07.076-.078.002-.002.07-.07.075-.075.002-.002.072-.07.075-.072.002-.002.073-.069.074-.068.001-.001.08-.073.076-.068.002-.002.072-.063v-.001l.078-.067.079-.068.002-.001.08-.068.002-.002.077-.063.082-.066.001-.001.075-.06.002-.002.006-.004.117-.111.094-.131.068-.146.04-.156.01-.161-.019-.16-.049-.154-.076-.141-.102-.125-.123-.105-.14-.079-.153-.052-.16-.023-.16.007zm24.596 11.088l-.156.04-.146.067-.131.094-.112.117-.087.135-.061.15-.033.157-.004.134.007.142.005.152.004.15.002.149v.153l.001.011v.015l.004.11.002.11v.002l.002.106v.321l-.003.102-.002.106-.004.107-.005.105-.006.106-.006.106-.008.106v.002l-.008.103v.002l-.01.1-.01.105-.01.105-.013.105-.012.099v.002l-.014.108-.014.1-.016.105-.016.103v.002l-.017.099-.018.104-.019.103v.002l-.019.097-.02.104-.022.103v.001l-.022.098-.023.103v.002l-.024.096-.025.103v.002l-.024.096-.027.102v.003l-.026.093v.001l-.029.103v.002l-.03.099-.028.097v.002l-.03.095-.03.096v.001l-.033.1-.031.095v.002l-.035.1v.003l-.034.094v.003l-.035.096v.001l-.034.09v.002l-.038.098-.036.093v.002l-.038.095-.079.194-.08.188-.085.189-.087.19-.09.184-.092.183-.095.184-.05.093-.064.148-.034.158-.005.16.026.16.054.151.082.14.106.12.127.1.143.075.154.046.16.017.161-.013.156-.042.144-.071.13-.096.109-.119.072-.112.053-.099.003-.005.003-.006.102-.195.003-.006.003-.006.098-.196.003-.006.003-.006.096-.197.002-.006.003-.006.093-.2.002-.006.003-.006.09-.2.002-.006.003-.007.086-.202.003-.006.002-.006.084-.203.002-.005.001-.005.04-.102.002-.003.001-.003.04-.103.001-.003.001-.003.04-.103v-.004l.001-.003.039-.103v-.003l.002-.003.037-.104.001-.003.001-.003.037-.104v-.004l.002-.003.035-.104.002-.003v-.004l.035-.104.002-.004v-.003l.034-.105.002-.003v-.003l.034-.105v-.004l.002-.003.032-.106.001-.003.001-.003.031-.106.001-.003.001-.004.031-.106.001-.003.001-.004.03-.106v-.003l.002-.004.028-.107.001-.003.001-.003.028-.107.001-.004.001-.003.027-.107.001-.004v-.003l.027-.108.001-.003v-.004l.026-.108.001-.003v-.004l.025-.108.001-.003v-.004l.025-.108v-.004l.001-.003.023-.109v-.003l.001-.004.022-.109v-.003l.002-.004.02-.109.001-.004v-.003l.02-.11.002-.003v-.004l.02-.11v-.007l.019-.11v-.003l.001-.004.017-.11v-.004l.001-.003.017-.11v-.008l.016-.11v-.004l.001-.004.015-.11v-.008l.015-.111v-.008l.013-.111v-.007l.013-.112v-.007l.011-.112v-.004l.001-.004.01-.112v-.007l.01-.112v-.008l.008-.112v-.008l.007-.113v-.007l.007-.113v-.008l.005-.113v-.007l.005-.114v-.007l.003-.114v-.007l.003-.114v-.129l.001-.114v-.13l-.003-.114v-.008l-.003-.115v-.007l-.003-.102v-.155l-.003-.158v-.01l-.004-.158v-.01l-.006-.158v-.01l-.007-.148-.023-.16-.051-.152-.08-.14-.103-.124-.125-.102-.142-.077-.153-.05-.16-.02-.161.01zm-30.213.66l-.157.034-.149.063-.134.09-.115.113-.092.132-.067.147-.037.156-.009.134.001.11V15.95l.006.22v.012l.01.22v.012l.012.22v.006l.001.006.015.22v.005l.001.006.018.22.001.006v.006l.022.219v.006l.001.006.024.219.001.006v.006l.028.218.001.006v.006l.031.218.001.006.001.006.033.218.001.006.001.005.037.218v.006l.002.005.04.217v.006l.001.006.043.216.001.006.001.006.046.216v.005l.002.006.048.215.002.006.001.006.051.214.002.006v.006l.055.214.002.005.001.006.057.213.002.006.001.005.06.213.002.005.001.006.063.212.002.005.001.006.066.21.002.006.002.006.068.21.002.005.002.005.07.21.003.005.002.005.074.208.002.006.002.005.077.207.002.006.002.005.08.206.002.005.002.006.082.204.002.006.002.005.086.204.002.005.002.006.088.202.002.005.003.006.09.2.003.006.002.005.094.2.002.006.003.005.096.199.002.005.003.005.03.062.086.137.11.118.128.097.145.07.156.043.16.013.16-.017.155-.047.143-.074.127-.1.106-.121.081-.14.055-.15.025-.16-.005-.161-.034-.158-.05-.124-.028-.055-.092-.19-.087-.188-.087-.192-.083-.19-.08-.193-.078-.194-.076-.196-.073-.195-.07-.197-.067-.198-.065-.199-.063-.2-.059-.2-.056-.2-.055-.204-.05-.201-.049-.202-.046-.205-.043-.206-.04-.203-.038-.207-.034-.204-.032-.207-.028-.205-.026-.207-.023-.208-.02-.207-.018-.207-.014-.208-.011-.207-.009-.208-.005-.207-.002-.104-.017-.16-.046-.155-.074-.143-.1-.126-.121-.107-.139-.081-.152-.055-.159-.025-.161.004zm24.585 11.83l-.156.039-.146.068-.11.076-.015.012-.163.129-.166.127-.168.125-.17.124-.17.12-.172.118-.173.115-.176.114-.177.111-.18.11-.178.105-.182.104-.182.101-.184.1-.184.095-.189.095-.186.09-.188.089-.19.086-.19.082-.193.081-.195.078-.191.074-.197.073-.195.07-.196.065-.198.064-.198.061-.2.058-.2.055-.2.052-.2.049-.151.035-.153.05-.141.078-.125.103-.103.124-.078.14-.05.154-.022.16.009.16.038.157.067.147.093.132.116.112.134.089.149.062.158.034.16.003.133-.02.158-.035.006-.002.006-.001.213-.052.006-.002.007-.001.212-.056.006-.001.006-.002.212-.058.006-.002.006-.002.211-.061.006-.002.006-.002.21-.064.006-.002.006-.002.21-.067.005-.002.006-.002.208-.07.006-.002.006-.003.207-.073.006-.002.006-.002.206-.077.006-.002.005-.002.206-.08.005-.001.006-.003.204-.082.006-.002.005-.002.203-.085.006-.003.005-.002.202-.088.006-.002.005-.003.2-.09.006-.003.006-.003.2-.093.005-.003.005-.002.198-.096.006-.003.005-.003.197-.099.005-.002.005-.003.196-.102.005-.002.005-.003.195-.105.005-.002.005-.003.193-.107.005-.003.005-.003.191-.11.005-.003.005-.003.19-.112.005-.003.005-.003.189-.115.005-.003.005-.003.187-.117.005-.003.004-.004.186-.12.005-.003.004-.003.184-.122.005-.003.005-.004.182-.125.004-.003.005-.003.18-.128.005-.003.005-.003.179-.13.004-.003.005-.004.177-.132.004-.004.005-.003.175-.135.005-.003.004-.004.173-.137.005-.003.004-.004.019-.015.115-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.052-.153-.079-.14-.103-.124-.125-.102-.142-.078-.153-.05-.16-.02-.16.01zm-19.17.054l-.153.051-.14.079-.124.103-.103.125-.077.141-.05.153-.02.16.009.161.04.156.067.147.093.131.095.094.047.04.005.004.005.004.17.14.005.004.005.004.172.137.004.004.005.003.086.067.003.002.003.002.087.067.003.002.003.002.088.066.002.003.003.002.089.065.002.002.003.002.09.065.002.002.003.002.09.064.002.002.003.002.09.063.003.002.003.002.09.063.003.002.003.002.092.062.002.002.003.002.092.061.003.002.003.002.092.06.003.003.003.001.093.06.003.002.003.002.093.06.003.001.003.002.094.058.003.002.003.002.095.058.003.001.003.002.095.057.003.002.003.002.095.056.003.002.003.002.096.055.004.002.003.001.096.055.003.002.003.002.098.053.003.002.003.002.097.053.004.002.003.001.098.053.003.001.003.002.099.052.003.001.003.002.1.05.003.002.003.002.1.05.003.002.003.001.1.05h.003l.004.003.1.048.004.001.003.002.101.048.003.001.004.002.101.046.004.002.003.001.102.046.004.002.003.001.103.045.003.002.003.001.103.045.004.001.003.002.104.043.003.001.004.002.104.042.003.002.004.001.104.042.004.001.003.002.105.04.004.002.003.001.106.04.003.002h.004l.106.04.004.001.003.002.107.038.003.001.004.001.107.038.003.001.004.001.107.037.004.001.004.001.108.036.003.001.004.001.108.035.004.001.003.001.11.034.003.001.004.001.109.033.004.002h.003l.11.033h.004l.003.002.11.031.004.001.004.001.084.023.081.028.004.001.003.001.109.037.003.001.004.001.109.036.003.001.004.001.109.035h.003l.004.002.11.033.003.001.003.001.11.033.003.001.004.001.109.031.004.002h.003l.11.031.003.001.004.001.11.03h.003l.003.001.11.029h.004l.003.002.11.027.003.001.004.001.11.027h.003l.004.001.004.001.16.022.16-.008.157-.038.147-.067.132-.092.112-.116.09-.134.062-.149.034-.157.004-.161-.025-.16-.055-.151-.082-.139-.107-.12-.127-.1-.143-.074-.124-.04h-.003l-.104-.025-.103-.026h-.002l-.095-.026h-.001l-.101-.027h-.002l-.1-.028h-.002l-.103-.03-.104-.032-.097-.03h-.002l-.103-.033-.102-.033-.101-.034-.106-.036-.027-.01-.027-.007-.107-.03-.104-.029-.104-.03h-.002l-.097-.03-.102-.032-.102-.032-.102-.034-.103-.035-.096-.034-.1-.036-.101-.037h-.002l-.094-.036-.096-.037-.097-.04h-.002l-.099-.04-.098-.042h-.002l-.092-.04-.097-.043-.095-.043-.097-.044h-.002l-.09-.043-.094-.045-.094-.046-.093-.047-.09-.046-.096-.05-.088-.047-.002-.001-.09-.049-.094-.052-.002-.002-.087-.049-.087-.05h-.002l-.088-.053h-.001l-.09-.055-.086-.052-.002-.001-.089-.055-.084-.054h-.002l-.09-.059h-.001l-.085-.056-.001-.001-.084-.056-.082-.056h-.001l-.086-.06-.082-.058H7.79l-.086-.062-.002-.002-.08-.058-.081-.06h-.001l-.085-.064-.002-.002-.076-.058-.002-.002-.082-.064-.161-.128-.162-.133-.04-.034-.132-.092-.147-.066-.157-.038-.16-.008-.16.022z"})),EscalationStartEventNonInterrupting:({styles:e={},...t})=>Vb("svg",ME({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M16 9.209c-1.674 4.655-2.735 9.504-4.408 14.16 1.534-1.526 2.873-3.235 4.407-4.761l4.408 4.76c-1.497-4.71-2.91-9.448-4.408-14.16zm.031 2.93c.822 2.586 1.598 5.187 2.42 7.774l-2.42-2.614c-.682.598-2.453 2.886-2.34 2.389.873-2.488 1.45-5.068 2.34-7.55zM16.132.364c-1.51.016-3.055.139-4.492.614-.854.442-.266 1.861.651 1.578 2.266-.58 4.656-.596 6.944-.144.935.063 1.21-1.391.318-1.674-1.118-.26-2.274-.361-3.42-.374zm8.865 2.777c-.931-.1-1.262 1.29-.425 1.666 1.863 1.364 3.222 3.298 4.322 5.296.617.737 1.875-.145 1.398-.979-1.184-2.275-2.808-4.384-4.923-5.866a.863.863 0 00-.372-.117zM6.55 3.564c-.734.078-1.196.762-1.735 1.206C3.552 6.02 2.55 7.511 1.681 9.053c-.31.533-.71 1.33-.03 1.767.615.432 1.282-.132 1.446-.742.796-1.475 1.746-2.89 2.934-4.08.43-.548 1.292-.822 1.34-1.595a.874.874 0 00-.822-.839zm24.582 11.078c-.771-.033-1.004.82-.873 1.437.13 2.395-.471 4.797-1.615 6.897-.33.876.984 1.559 1.512.785a14.276 14.276 0 001.761-8.54.865.865 0 00-.785-.579zm-30.195.666c-.774-.06-1.032.785-.905 1.407.117 2.41.732 4.81 1.858 6.945.528.774 1.84.09 1.51-.786A15.932 15.932 0 011.728 16a.876.876 0 00-.79-.692zm24.57 11.817c-.762.099-1.243.835-1.919 1.16-1.514 1.002-3.237 1.632-4.978 2.092-.864.423-.307 1.855.616 1.591 2.528-.578 4.93-1.75 6.913-3.421.469-.522.07-1.42-.631-1.422zm-19.16.042c-.845.001-1.12 1.228-.395 1.628 1.665 1.401 3.667 2.348 5.76 2.912.618.178 1.482.565 1.893-.177.355-.628-.226-1.297-.87-1.326-1.972-.515-3.912-1.285-5.5-2.594-.26-.213-.522-.472-.888-.443z"})),MessageStartEventNonInterrupting:({styles:e={},...t})=>Vb("svg",TE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M8.746 10.393v11.064h14.506V10.393H8.746zm3.223 1.728h8.06c-1.428.879-2.856 2.807-4.283 3.018l-3.777-3.018zm9.557 1.018v6.59H10.473v-6.59l5.525 4.416 5.528-4.416zM16.132 0c-1.51.016-3.055.139-4.492.614-.854.442-.266 1.861.651 1.578 2.266-.58 4.656-.596 6.944-.144.935.063 1.21-1.391.318-1.674-1.118-.26-2.274-.361-3.42-.374zm8.865 2.777c-.931-.1-1.262 1.29-.425 1.666 1.863 1.364 3.222 3.298 4.322 5.296.617.737 1.875-.145 1.398-.979-1.184-2.275-2.808-4.384-4.923-5.866a.863.863 0 00-.372-.117zM6.55 3.2c-.734.078-1.196.762-1.735 1.206C3.552 5.656 2.55 7.147 1.681 8.69c-.31.533-.71 1.33-.03 1.767.615.432 1.282-.132 1.446-.742.796-1.475 1.746-2.89 2.934-4.08.43-.548 1.292-.822 1.34-1.595a.874.874 0 00-.822-.839zm24.582 11.078c-.771-.033-1.004.82-.873 1.437.13 2.395-.471 4.797-1.615 6.897-.33.876.984 1.559 1.512.785a14.276 14.276 0 001.761-8.54.865.865 0 00-.785-.579zm-30.195.666c-.774-.06-1.032.785-.905 1.407.117 2.41.732 4.81 1.858 6.945.528.774 1.84.09 1.51-.786a15.932 15.932 0 01-1.672-6.874.876.876 0 00-.79-.692zm24.57 11.817c-.762.099-1.243.835-1.919 1.16-1.514 1.002-3.237 1.632-4.978 2.092-.864.423-.307 1.855.616 1.591 2.528-.578 4.93-1.75 6.913-3.421.469-.522.07-1.42-.631-1.422zm-19.16.042c-.845.001-1.12 1.228-.395 1.628 1.665 1.401 3.667 2.348 5.76 2.912.618.178 1.482.565 1.893-.177.355-.628-.226-1.297-.87-1.326-1.972-.515-3.912-1.285-5.5-2.594-.26-.213-.522-.472-.888-.443z"})),MultipleStartEventNonInterrupting:({styles:e={},...t})=>Vb("svg",AE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M23.621 13.524L16 7.99l-7.622 5.534 2.911 8.952h9.422l2.911-8.952zm-1.016.33l-2.523 7.759h-8.165l-2.524-7.76L16 9.059l6.606 4.796zM16.132 0c-1.51.016-3.055.139-4.492.614-.854.442-.266 1.861.651 1.578 2.266-.58 4.656-.596 6.944-.144.935.063 1.21-1.391.318-1.674-1.118-.26-2.274-.361-3.42-.374zm8.865 2.777c-.931-.1-1.262 1.29-.425 1.666 1.863 1.364 3.222 3.298 4.322 5.296.617.737 1.875-.145 1.398-.979-1.184-2.275-2.808-4.384-4.923-5.866a.863.863 0 00-.372-.117zM6.55 3.2c-.734.078-1.196.762-1.735 1.206C3.552 5.656 2.55 7.147 1.681 8.69c-.31.533-.71 1.33-.03 1.767.615.432 1.282-.132 1.446-.742.796-1.475 1.746-2.89 2.934-4.08.43-.548 1.292-.822 1.34-1.595a.874.874 0 00-.822-.839zm24.582 11.078c-.771-.033-1.004.82-.873 1.437.13 2.395-.471 4.797-1.615 6.897-.33.876.984 1.559 1.512.785a14.276 14.276 0 001.761-8.54.865.865 0 00-.785-.579zm-30.195.666c-.774-.06-1.032.785-.905 1.407.117 2.41.732 4.81 1.858 6.945.528.774 1.84.09 1.51-.786a15.932 15.932 0 01-1.672-6.874.876.876 0 00-.79-.692zm24.57 11.817c-.762.099-1.243.835-1.919 1.16-1.514 1.002-3.237 1.632-4.978 2.092-.864.423-.307 1.855.616 1.591 2.528-.578 4.93-1.75 6.913-3.421.469-.522.07-1.42-.631-1.422zm-19.16.042c-.845.001-1.12 1.228-.395 1.628 1.665 1.401 3.667 2.348 5.76 2.912.618.178 1.482.565 1.893-.177.355-.628-.226-1.297-.87-1.326-1.972-.515-3.912-1.285-5.5-2.594-.26-.213-.522-.472-.888-.443z"})),ParallelMultipleStartEventNonInterrupting:({styles:e={},...t})=>Vb("svg",kE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M13.503 9.016v4.428H9.075v4.98h4.428v4.428h4.98v-4.427h4.428v-4.981h-4.427V9.016h-4.981zm.83.83h3.32v4.428h4.428v3.32h-4.428v4.428h-3.32v-4.454H9.905v-3.294h4.428V9.846zM16.12 0h-.232l-.22.004h-.012l-.221.006h-.012l-.22.01h-.012l-.22.013h-.012l-.22.016h-.012l-.22.019h-.005l-.006.001-.22.021h-.006l-.005.001-.22.025h-.011l-.22.028h-.005l-.006.002-.219.03h-.005l-.006.001-.218.033-.006.001-.006.001-.217.036-.006.001-.006.001-.217.039-.006.001-.006.001-.216.042-.006.001-.006.001-.215.045-.006.001-.006.002-.215.047-.006.002-.006.001-.214.05-.006.002-.006.002-.115.029-.152.053-.14.081-.122.106-.1.126-.075.143-.047.154-.018.16.012.16.042.156.07.145.095.13.118.11.137.086.15.059.158.03h.161l.132-.022.11-.028.202-.047.203-.046.208-.043.202-.039.206-.037.206-.034.205-.03.208-.03.205-.025.209-.023.208-.02.21-.017.209-.015.207-.011.21-.009.21-.006.207-.003h.21l.21.002.207.005.207.008.212.011.207.014.208.017.209.019.208.022.205.025.206.028.207.03.208.035.205.036.202.039.052.01.16.018.16-.012.156-.042.146-.07.13-.096.109-.119.085-.136.06-.15.03-.159v-.16l-.03-.16-.059-.15-.086-.136-.109-.118-.13-.096-.145-.07-.128-.038-.057-.011-.006-.002h-.006l-.216-.042-.006-.001-.006-.001-.217-.039H18.9l-.006-.002-.217-.035-.006-.001-.006-.001-.218-.032-.006-.001-.006-.001-.218-.03h-.006l-.006-.001-.219-.027h-.011l-.22-.024-.005-.001h-.006l-.22-.021h-.006l-.006-.001-.22-.017-.005-.001h-.006L17.06.03h-.012l-.22-.012h-.012l-.22-.01h-.012l-.22-.005h-.012L16.132 0h-.012zm8.715 2.783l-.157.034-.149.063-.134.089-.116.112-.092.132-.067.147-.038.157-.008.16.021.16.051.153.079.141.103.124.102.087.052.038h.001l.087.064v.001l.082.061.002.001.076.059h.001l.084.065.082.066.002.001.079.063.002.002.077.063.081.067.002.002.077.065.076.065.001.002.08.07.078.07h.002l.075.068.077.072.002.001.073.069.077.073.072.07.002.001.077.076.07.07v.001l.075.076.07.073.002.001.074.079.002.002.069.074.069.075.074.082.07.08.002.001.068.079h.001l.067.079.068.082.065.078.001.002.068.083.067.084.063.081.001.002.067.087.002.002.063.084.001.001.064.087.008.01.008.01.095.12.093.121.09.119.087.119.088.122.086.123.084.12.081.122.001.002.084.126.08.126.08.127.077.126.079.131.074.127.075.131.073.131.07.13.07.133.069.133.045.09.086.137.109.119.13.096.144.07.156.042.16.013.16-.017.155-.047.143-.075.126-.1.106-.121.082-.14.054-.151.025-.16-.005-.16-.035-.158-.05-.124-.048-.095-.002-.004-.002-.004-.073-.14-.002-.005-.002-.004-.074-.14-.002-.004-.002-.004-.076-.14-.002-.003-.002-.004-.077-.139-.003-.004-.002-.004-.078-.138-.003-.004-.002-.003-.08-.137-.002-.004-.003-.004-.081-.136-.002-.004-.003-.004-.083-.136-.002-.003-.002-.004-.085-.135-.002-.004-.003-.003-.085-.134-.003-.004-.002-.004-.087-.132-.003-.004-.003-.004-.088-.132-.003-.003-.002-.004-.09-.13-.003-.005-.003-.003-.091-.13-.003-.004-.002-.004-.093-.129-.003-.003-.003-.004-.094-.128-.003-.004-.003-.003-.095-.127-.003-.004-.003-.004-.097-.125-.003-.004-.003-.004-.09-.114-.06-.082-.003-.003-.002-.003-.069-.091-.002-.004-.002-.003-.07-.09-.003-.003-.002-.003-.07-.09-.003-.003-.002-.003-.071-.09-.002-.003-.003-.002-.072-.089-.002-.003-.002-.003-.073-.088-.002-.003-.002-.002-.074-.087-.002-.003-.002-.003-.074-.086-.003-.003-.002-.003-.074-.086-.003-.002-.002-.003-.075-.085-.003-.003-.002-.002-.076-.084-.002-.003-.003-.003-.076-.083-.002-.003-.003-.003-.077-.082-.002-.003-.003-.002-.077-.082-.003-.003-.003-.002-.078-.081-.002-.003-.003-.003-.078-.08-.003-.002-.003-.003-.079-.08-.002-.002-.003-.002-.08-.08-.002-.002-.003-.002-.08-.078-.003-.003-.003-.002-.08-.077-.003-.003-.003-.002-.082-.077-.002-.002-.003-.002-.082-.076-.003-.002-.002-.003-.083-.075-.003-.002-.002-.003-.084-.074-.002-.002-.003-.002-.084-.074-.003-.002-.002-.002-.085-.073-.002-.002-.003-.003-.085-.071-.003-.003-.002-.002-.086-.07-.003-.003-.002-.002-.086-.07-.003-.003-.003-.002-.086-.07-.003-.002-.003-.002-.087-.069-.002-.002-.003-.002-.088-.068-.002-.002-.003-.002-.088-.067-.003-.003-.003-.002-.088-.066-.003-.002-.003-.002-.089-.066-.003-.002-.003-.002-.057-.042-.14-.082-.15-.055-.16-.026-.16.004zM6.377 3.21l-.157.037-.148.066-.111.074-.007.006-.003.002-.003.002-.086.069-.003.002-.002.002-.086.07-.003.002-.002.002-.086.07-.002.003-.003.002-.085.071-.002.002-.003.003-.084.071-.003.003-.002.002-.084.072-.003.003-.002.002-.083.073-.003.003-.002.002-.083.074-.002.002-.003.003-.082.074-.003.003-.002.002-.081.076-.003.002-.003.002-.08.077-.003.002-.003.003-.08.076-.002.003-.003.002-.08.078-.002.002-.003.003-.079.078-.002.003-.003.002-.078.08-.003.002-.002.002-.078.08-.002.003-.003.002-.077.08-.003.004-.002.002-.077.081-.002.003-.003.003-.076.082-.002.002-.003.003-.075.082-.002.003-.003.003-.074.083-.003.003-.002.003-.074.084-.003.003-.002.002-.074.085-.002.003-.002.003-.073.085-.003.003-.002.003-.072.086-.002.003-.003.003-.071.087-.003.003-.002.002-.07.088-.003.003-.002.003-.07.088-.003.003-.002.003-.07.09-.002.002-.002.003-.069.09-.002.003-.003.003-.068.09-.002.003-.002.003-.067.092-.003.003-.002.003-.067.092-.002.003-.002.003-.066.092-.002.003-.002.004-.066.093-.002.003-.002.003-.065.094-.002.003-.002.004-.064.094-.002.003-.002.004-.063.095-.002.003-.002.003-.063.097-.002.003-.002.003-.046.073-.05.07-.003.002-.002.003-.067.093-.003.003-.002.003-.066.094-.002.003-.002.003-.066.094-.002.003-.002.003-.064.094-.002.004-.002.003-.064.094-.002.004-.002.003-.062.095-.002.003-.002.003-.062.096-.002.003-.002.003-.06.096-.003.003-.002.003-.06.096-.001.004-.002.003-.059.096-.002.004-.002.003-.058.097-.002.003-.001.003-.057.098-.002.003-.002.003-.056.098-.002.003-.002.003-.055.098-.002.004-.001.003-.055.098-.001.004-.002.003-.054.099-.001.003-.002.003-.052.1-.002.002-.002.004-.051.1-.002.002-.002.004-.05.1-.002.003-.002.003-.05.1v.003l-.002.004-.05.1v.003l-.002.004-.048.1-.002.004-.001.003-.047.101-.002.003-.001.004-.013.027-.052.152-.024.16.006.16.037.157.064.148.091.133.114.114.134.09.147.065.157.036.162.006.159-.024.152-.053.14-.08.122-.105.1-.126.066-.117.01-.023.044-.095.045-.095.002-.003.042-.087.048-.097.048-.095v-.001l.048-.092.001-.001.047-.09.05-.093.002-.002.049-.09.052-.092.001-.002.051-.089.001-.002.051-.087.053-.088.001-.002.055-.091.057-.091.057-.09.001-.002.057-.089.055-.083.001-.002.06-.09.06-.088.062-.089.001-.001.06-.084.063-.088.065-.089.017-.023.016-.025.06-.094.059-.09v-.002l.058-.086.057-.086.001-.001.062-.09.062-.088.001-.002.06-.085.002-.002.06-.082.063-.087.064-.084.002-.002.061-.08.065-.084.064-.08v-.001l.067-.083.067-.082.07-.083.069-.08.063-.074.074-.083.068-.077.002-.002.07-.076.07-.075.072-.077.001-.001.067-.07.076-.078.002-.002.07-.07.075-.075.002-.002.072-.07.075-.072.002-.002.073-.069.074-.068.001-.001.08-.073.076-.068.002-.002.072-.063v-.001l.078-.067.079-.068.002-.001.08-.068.002-.002.077-.063.082-.066.001-.001.075-.06.002-.002.006-.004.117-.111.094-.131.068-.146.04-.156.01-.161-.019-.16-.049-.154-.076-.141-.102-.125-.123-.105-.14-.079-.153-.052-.16-.023-.16.007zm24.596 11.088l-.156.04-.146.067-.131.094-.112.117-.087.135-.061.15-.033.157-.004.134.007.142.005.152.004.15.002.149v.153l.001.011v.015l.004.11.002.11v.002l.002.106v.321l-.003.102-.002.106-.004.107-.005.105-.006.106-.006.106-.008.106v.002l-.008.103v.002l-.01.1-.01.105-.01.105-.013.105-.012.099v.002l-.014.108-.014.1-.016.105-.016.103v.002l-.017.099-.018.104-.019.103v.002l-.019.097-.02.104-.022.103v.001l-.022.098-.023.103v.002l-.024.096-.025.103v.002l-.024.096-.027.102v.003l-.026.093v.001l-.029.103v.002l-.03.099-.028.097v.002l-.03.095-.03.096v.001l-.033.1-.031.095v.002l-.035.1v.003l-.034.094v.003l-.035.096v.001l-.034.09v.002l-.038.098-.036.093v.002l-.038.095-.079.194-.08.188-.085.189-.087.19-.09.184-.092.183-.095.184-.05.093-.064.148-.034.158-.005.16.026.16.054.151.082.14.106.12.127.1.143.075.154.046.16.017.161-.013.156-.042.144-.071.13-.096.109-.119.072-.112.053-.099.003-.005.003-.006.102-.195.003-.006.003-.006.098-.196.003-.006.003-.006.096-.197.002-.006.003-.006.093-.2.002-.006.003-.006.09-.2.002-.006.003-.007.086-.202.003-.006.002-.006.084-.203.002-.005.001-.005.04-.102.002-.003.001-.003.04-.103.001-.003.001-.003.04-.103v-.004l.001-.003.039-.103v-.003l.002-.003.037-.104.001-.003.001-.003.037-.104v-.004l.002-.003.035-.104.002-.003v-.004l.035-.104.002-.004v-.003l.034-.105.002-.003v-.003l.034-.105v-.004l.002-.003.032-.106.001-.003.001-.003.031-.106.001-.003.001-.004.031-.106.001-.003.001-.004.03-.106v-.003l.002-.004.028-.107.001-.003.001-.003.028-.107.001-.004.001-.003.027-.107.001-.004v-.003l.027-.108.001-.003v-.004l.026-.108.001-.003v-.004l.025-.108.001-.003v-.004l.025-.108v-.004l.001-.003.023-.109v-.003l.001-.004.022-.109v-.003l.002-.004.02-.109.001-.004v-.003l.02-.11.002-.003v-.004l.02-.11v-.007l.019-.11v-.003l.001-.004.017-.11v-.004l.001-.003.017-.11v-.008l.016-.11v-.004l.001-.004.015-.11v-.008l.015-.111v-.008l.013-.111v-.007l.013-.112v-.007l.011-.112v-.004l.001-.004.01-.112v-.007l.01-.112v-.008l.008-.112v-.008l.007-.113v-.007l.007-.113v-.008l.005-.113v-.007l.005-.114v-.007l.003-.114v-.007l.003-.114v-.129l.001-.114v-.13l-.003-.114v-.008l-.003-.115v-.007l-.003-.102v-.155l-.003-.158v-.01l-.004-.158v-.01l-.006-.158v-.01l-.007-.148-.023-.16-.051-.152-.08-.14-.103-.124-.125-.102-.142-.077-.153-.05-.16-.02-.161.01zm-30.213.66l-.157.034-.149.063-.134.09-.115.113-.092.132-.067.147-.037.156-.009.134.001.11V15.95l.006.22v.012l.01.22v.012l.012.22v.006l.001.006.015.22v.005l.001.006.018.22.001.006v.006l.022.219v.006l.001.006.024.219.001.006v.006l.028.218.001.006v.006l.031.218.001.006.001.006.033.218.001.006.001.005.037.218v.006l.002.005.04.217v.006l.001.006.043.216.001.006.001.006.046.216v.005l.002.006.048.215.002.006.001.006.051.214.002.006v.006l.055.214.002.005.001.006.057.213.002.006.001.005.06.213.002.005.001.006.063.212.002.005.001.006.066.21.002.006.002.006.068.21.002.005.002.005.07.21.003.005.002.005.074.208.002.006.002.005.077.207.002.006.002.005.08.206.002.005.002.006.082.204.002.006.002.005.086.204.002.005.002.006.088.202.002.005.003.006.09.2.003.006.002.005.094.2.002.006.003.005.096.199.002.005.003.005.03.062.086.137.11.118.128.097.145.07.156.043.16.013.16-.017.155-.047.143-.074.127-.1.106-.121.081-.14.055-.15.025-.16-.005-.161-.034-.158-.05-.124-.028-.055-.092-.19-.087-.188-.087-.192-.083-.19-.08-.193-.078-.194-.076-.196-.073-.195-.07-.197-.067-.198-.065-.199-.063-.2-.059-.2-.056-.2-.055-.204-.05-.201-.049-.202-.046-.205-.043-.206-.04-.203-.038-.207-.034-.204-.032-.207-.028-.205-.026-.207-.023-.208-.02-.207-.018-.207-.014-.208-.011-.207-.009-.208-.005-.207-.002-.104-.017-.16-.046-.155-.074-.143-.1-.126-.121-.107-.139-.081-.152-.055-.159-.025-.161.004zm24.585 11.83l-.156.039-.146.068-.11.076-.015.012-.163.129-.166.127-.168.125-.17.124-.17.12-.172.118-.173.115-.176.114-.177.111-.18.11-.178.105-.182.104-.182.101-.184.1-.184.095-.189.095-.186.09-.188.089-.19.086-.19.082-.193.081-.195.078-.191.074-.197.073-.195.07-.196.065-.198.064-.198.061-.2.058-.2.055-.2.052-.2.049-.151.035-.153.05-.141.078-.125.103-.103.124-.078.14-.05.154-.022.16.009.16.038.157.067.147.093.132.116.112.134.089.149.062.158.034.16.003.133-.02.158-.035.006-.002.006-.001.213-.052.006-.002.007-.001.212-.056.006-.001.006-.002.212-.058.006-.002.006-.002.211-.061.006-.002.006-.002.21-.064.006-.002.006-.002.21-.067.005-.002.006-.002.208-.07.006-.002.006-.003.207-.073.006-.002.006-.002.206-.077.006-.002.005-.002.206-.08.005-.001.006-.003.204-.082.006-.002.005-.002.203-.085.006-.003.005-.002.202-.088.006-.002.005-.003.2-.09.006-.003.006-.003.2-.093.005-.003.005-.002.198-.096.006-.003.005-.003.197-.099.005-.002.005-.003.196-.102.005-.002.005-.003.195-.105.005-.002.005-.003.193-.107.005-.003.005-.003.191-.11.005-.003.005-.003.19-.112.005-.003.005-.003.189-.115.005-.003.005-.003.187-.117.005-.003.004-.004.186-.12.005-.003.004-.003.184-.122.005-.003.005-.004.182-.125.004-.003.005-.003.18-.128.005-.003.005-.003.179-.13.004-.003.005-.004.177-.132.004-.004.005-.003.175-.135.005-.003.004-.004.173-.137.005-.003.004-.004.019-.015.115-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.052-.153-.079-.14-.103-.124-.125-.102-.142-.078-.153-.05-.16-.02-.16.01zm-19.17.054l-.153.051-.14.079-.124.103-.103.125-.077.141-.05.153-.02.16.009.161.04.156.067.147.093.131.095.094.047.04.005.004.005.004.17.14.005.004.005.004.172.137.004.004.005.003.086.067.003.002.003.002.087.067.003.002.003.002.088.066.002.003.003.002.089.065.002.002.003.002.09.065.002.002.003.002.09.064.002.002.003.002.09.063.003.002.003.002.09.063.003.002.003.002.092.062.002.002.003.002.092.061.003.002.003.002.092.06.003.003.003.001.093.06.003.002.003.002.093.06.003.001.003.002.094.058.003.002.003.002.095.058.003.001.003.002.095.057.003.002.003.002.095.056.003.002.003.002.096.055.004.002.003.001.096.055.003.002.003.002.098.053.003.002.003.002.097.053.004.002.003.001.098.053.003.001.003.002.099.052.003.001.003.002.1.05.003.002.003.002.1.05.003.002.003.001.1.05h.003l.004.003.1.048.004.001.003.002.101.048.003.001.004.002.101.046.004.002.003.001.102.046.004.002.003.001.103.045.003.002.003.001.103.045.004.001.003.002.104.043.003.001.004.002.104.042.003.002.004.001.104.042.004.001.003.002.105.04.004.002.003.001.106.04.003.002h.004l.106.04.004.001.003.002.107.038.003.001.004.001.107.038.003.001.004.001.107.037.004.001.004.001.108.036.003.001.004.001.108.035.004.001.003.001.11.034.003.001.004.001.109.033.004.002h.003l.11.033h.004l.003.002.11.031.004.001.004.001.084.023.081.028.004.001.003.001.109.037.003.001.004.001.109.036.003.001.004.001.109.035h.003l.004.002.11.033.003.001.003.001.11.033.003.001.004.001.109.031.004.002h.003l.11.031.003.001.004.001.11.03h.003l.003.001.11.029h.004l.003.002.11.027.003.001.004.001.11.027h.003l.004.001.004.001.16.022.16-.008.157-.038.147-.067.132-.092.112-.116.09-.134.062-.149.034-.157.004-.161-.025-.16-.055-.151-.082-.139-.107-.12-.127-.1-.143-.074-.124-.04h-.003l-.104-.025-.103-.026h-.002l-.095-.026h-.001l-.101-.027h-.002l-.1-.028h-.002l-.103-.03-.104-.032-.097-.03h-.002l-.103-.033-.102-.033-.101-.034-.106-.036-.027-.01-.027-.007-.107-.03-.104-.029-.104-.03h-.002l-.097-.03-.102-.032-.102-.032-.102-.034-.103-.035-.096-.034-.1-.036-.101-.037h-.002l-.094-.036-.096-.037-.097-.04h-.002l-.099-.04-.098-.042h-.002l-.092-.04-.097-.043-.095-.043-.097-.044h-.002l-.09-.043-.094-.045-.094-.046-.093-.047-.09-.046-.096-.05-.088-.047-.002-.001-.09-.049-.094-.052-.002-.002-.087-.049-.087-.05h-.002l-.088-.053h-.001l-.09-.055-.086-.052-.002-.001-.089-.055-.084-.054h-.002l-.09-.059h-.001l-.085-.056-.001-.001-.084-.056-.082-.056h-.001l-.086-.06-.082-.058H7.79l-.086-.062-.002-.002-.08-.058-.081-.06h-.001l-.085-.064-.002-.002-.076-.058-.002-.002-.082-.064-.161-.128-.162-.133-.04-.034-.132-.092-.147-.066-.157-.038-.16-.008-.16.022z",opacity:".98"})),SignalStartEventNonInterrupting:({styles:e={},...t})=>Vb("svg",OE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M16.007 8.82L9.21 21.022h13.596L16.007 8.82zm0 1.775l5.328 9.563H10.68l5.327-9.563zM16.14.386c-1.571.236-4.195-.284-4.9 1.381.619 1.703 2.745.069 4.085.365 1.421-.13 2.84.2 4.235.259C21.27.784 18.19.344 17 .413a20.456 20.456 0 00-.86-.027zM25 3.162c-2.19.694.401 2.26 1.181 3.094 1.083 1.152 1.954 2.484 2.715 3.864 1.48 1.005 1.845-1.26.81-2.03-1.158-1.897-2.613-3.704-4.513-4.89l-.192-.038zm-18.438.423c-1.793.712-2.909 2.548-4.01 4.061-.773.814-2.211 3.653.005 3.211 1.123-1.469 1.87-3.306 3.267-4.614.664-.7 2.73-2.013.738-2.658zm24.57 11.072c-1.659.435-.468 2.667-.99 3.895a13.427 13.427 0 01-1.497 4.435c-.23 1.659 1.991 1.165 2.018-.199a14.277 14.277 0 001.254-7.552.865.865 0 00-.785-.579zm-30.18.666c-1.677.386-.633 2.667-.608 3.876.371 1.623.792 3.35 1.79 4.696 2.382.321.571-2.338.292-3.492a15.92 15.92 0 01-.684-4.39.877.877 0 00-.79-.69zm24.558 11.81c-1.755.865-3.303 2.266-5.274 2.765-1.162-.016-3.074 1.271-1.331 2.102 2.66-.447 5.163-1.733 7.236-3.445.472-.506.06-1.432-.631-1.421zm-19.151.043c-2.004.786.416 2.405 1.43 2.913 1.608.904 3.379 1.636 5.208 1.877 1.77-.804-.228-2.094-1.357-2.073-1.75-.537-3.403-1.396-4.798-2.586l-.227-.104-.256-.027z"})),TimerStartEventNonInterrupting:({styles:e={},...t})=>Vb("svg",DE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.991 8.7c-3.018-.042-5.92 1.925-7.03 4.725-1.138 2.695-.509 6.011 1.537 8.102 1.99 2.142 5.267 2.93 8.013 1.927 2.877-.98 4.99-3.826 5.067-6.87.153-2.956-1.624-5.88-4.299-7.135a7.551 7.551 0 00-3.288-.75zm0 1.383c2.758-.052 5.372 1.972 6.014 4.654.704 2.578-.482 5.516-2.79 6.867-2.358 1.48-5.682 1.085-7.617-.919-2.043-1.97-2.407-5.38-.84-7.743 1.11-1.764 3.149-2.88 5.233-2.86zm1.962 1.764l-2.074 3.762c-.64.068-.793 1.04-.202 1.3.39.27.696-.18 1.052-.165h3.17v-.865h-3.182l1.993-3.614-.757-.418zM16.12.358h-.232l-.22.004h-.012l-.221.006h-.012l-.22.01h-.012l-.22.013h-.012l-.22.016h-.012l-.22.019h-.005l-.006.001-.22.021h-.006l-.005.001-.22.025h-.011l-.22.028h-.005l-.006.002-.219.03h-.005l-.006.001-.218.033-.006.001-.006.001-.217.036-.006.001-.006.001-.217.039-.006.001-.006.001-.216.042-.006.001-.006.001-.215.045-.006.001-.006.002-.215.047-.006.002-.006.001-.214.05-.006.002-.006.002-.115.029-.152.053-.14.081-.122.106-.1.126-.075.143-.047.154-.018.16.012.16.042.156.07.145.095.13.118.11.137.086.15.059.158.03h.161l.132-.022.11-.028.202-.047.203-.046.208-.043.202-.039.206-.037.206-.034.205-.03.208-.03.205-.025.209-.023.208-.02.21-.017.209-.015.207-.011.21-.009.21-.006.207-.003h.21l.21.002.207.005.207.008.212.011.207.014.208.017.209.019.208.022.205.025.206.028.207.03.208.035.205.036.202.039.052.01.16.018.16-.012.156-.042.146-.07.13-.096.109-.119.085-.136.06-.15.03-.159v-.16l-.03-.16-.059-.15-.086-.136L19.823.9l-.13-.096-.145-.07-.128-.038-.057-.011-.006-.002h-.006L19.135.64l-.006-.001-.006-.001-.217-.039H18.9l-.006-.002-.217-.035-.006-.001-.006-.001-.218-.032-.006-.001-.006-.001-.218-.03h-.006l-.006-.001-.219-.027h-.011l-.22-.024-.005-.001h-.006l-.22-.021h-.006L17.512.42l-.22-.017-.005-.001h-.006l-.22-.015h-.012l-.22-.012h-.012l-.22-.01h-.012l-.22-.005h-.012l-.221-.003h-.012zm8.715 2.783l-.157.034-.149.063-.134.089-.116.112-.092.132-.067.147-.038.157-.008.16.021.16.051.153.079.141.103.124.102.087.052.038h.001l.087.064v.001l.082.061.002.001.076.059h.001l.084.065.082.066.002.001.079.063.002.002.077.063.081.067.002.002.077.065.076.065.001.002.08.07.078.07h.002l.075.068.077.072.002.001.073.069.077.073.072.07.002.001.077.076.07.07v.001l.075.076.07.073.002.001.074.079.002.002.069.074.069.075.074.082.07.08.002.001.068.079h.001l.067.079.068.082.065.078.001.002.068.083.067.084.063.081.001.002.067.087.002.002.063.084.001.001.064.087.008.01.008.01.095.12.093.121.09.119.087.119.088.122.086.123.084.12.081.122.001.002.084.126.08.126.08.127.077.126.079.131.074.127.075.131.073.131.07.13.07.133.069.133.045.09.086.137.109.119.13.096.144.07.156.042.16.013.16-.017.155-.047.143-.075.126-.1.106-.121.082-.14.054-.151.025-.16-.005-.16-.035-.158-.05-.124-.048-.095-.002-.004-.002-.004-.073-.14-.002-.005-.002-.004-.074-.14-.002-.004-.002-.004-.076-.14-.002-.003-.002-.004-.077-.139-.003-.004-.002-.004-.078-.138-.003-.004-.002-.003-.08-.137-.002-.004-.003-.004-.081-.136-.002-.004-.003-.004-.083-.136-.002-.003-.002-.004-.085-.135-.002-.004-.003-.003-.085-.134-.003-.004-.002-.004-.087-.132-.003-.004-.003-.004-.088-.132-.003-.003-.002-.004-.09-.13-.003-.005-.003-.003-.091-.13-.003-.004-.002-.004-.093-.129-.003-.003-.003-.004-.094-.128-.003-.004-.003-.003-.095-.127-.003-.004-.003-.004-.097-.125-.003-.004-.003-.004-.09-.114-.06-.082-.003-.003-.002-.003-.069-.091-.002-.004-.002-.003-.07-.09-.003-.003-.002-.003-.07-.09-.003-.003-.002-.003-.071-.09-.002-.003-.003-.002-.072-.089-.002-.003-.002-.003-.073-.088-.002-.003-.002-.002-.074-.087-.002-.003-.002-.003-.074-.086-.003-.003-.002-.003-.074-.086-.003-.002-.002-.003-.075-.085-.003-.003-.002-.002-.076-.084-.002-.003-.003-.003-.076-.083-.002-.003-.003-.003-.077-.082-.002-.003-.003-.002-.077-.082-.003-.003-.003-.002-.078-.081-.002-.003-.003-.003-.078-.08-.003-.002-.003-.003-.079-.08-.002-.002-.003-.002-.08-.08-.002-.002-.003-.002-.08-.078-.003-.003-.003-.002-.08-.077-.003-.003-.003-.002-.082-.077-.002-.002-.003-.002-.082-.076-.003-.002-.002-.003-.083-.075-.003-.002-.002-.003-.084-.074-.002-.002-.003-.002-.084-.074-.003-.002-.002-.002-.085-.073-.002-.002-.003-.003-.085-.071-.003-.003-.002-.002-.086-.07-.003-.003-.002-.002-.086-.07-.003-.003-.003-.002-.086-.07-.003-.002-.003-.002-.087-.069-.002-.002-.003-.002-.088-.068-.002-.002-.003-.002-.088-.067-.003-.003-.003-.002-.088-.066-.003-.002-.003-.002-.089-.066-.003-.002-.003-.002-.057-.042-.14-.082-.15-.055-.16-.026-.16.004zm-18.458.426l-.157.037-.148.066-.111.074-.007.006-.003.002-.003.002-.086.069-.003.002-.002.002-.086.07-.003.002-.002.002-.086.07-.002.003-.003.002-.085.071-.002.002-.003.003-.084.071-.003.003-.002.002-.084.072-.003.003-.002.002-.083.073-.003.003-.002.002-.083.074-.002.002-.003.003-.082.074-.003.003-.002.002-.081.076-.003.002-.003.002-.08.077-.003.002-.003.003-.08.076-.002.003-.003.002-.08.078-.002.002-.003.003-.079.078-.002.003-.003.002-.078.08-.003.002-.002.002-.078.08-.002.003-.003.002-.077.08-.003.004-.002.002-.077.081-.002.003-.003.003-.076.082-.002.002-.003.003-.075.082-.002.003-.003.003-.074.083-.003.003-.002.003-.074.084-.003.003-.002.002-.074.085-.002.003-.002.003-.073.085-.003.003-.002.003-.072.086-.002.003-.003.003-.071.087-.003.003-.002.002-.07.088-.003.003-.002.003-.07.088-.003.003-.002.003-.07.09-.002.002-.002.003-.069.09-.002.003-.003.003-.068.09-.002.003-.002.003-.067.092-.003.003-.002.003-.067.092-.002.003-.002.003-.066.092-.002.003-.002.004-.066.093-.002.003-.002.003-.065.094-.002.003-.002.004-.064.094-.002.003-.002.004-.063.095-.002.003-.002.003-.063.097-.002.003-.002.003-.046.073-.05.07-.003.002-.002.003-.067.093-.003.003-.002.003-.066.094-.002.003-.002.003-.066.094-.002.003-.002.003-.064.094-.002.004-.002.003-.064.094-.002.004-.002.003-.062.095-.002.003-.002.003-.062.096-.002.003-.002.003-.06.096-.003.003-.002.003-.06.096-.001.004-.002.003-.059.096-.002.004-.002.003-.058.097-.002.003-.001.003-.057.098-.002.003-.002.003-.056.098-.002.003-.002.003-.055.098-.002.004-.001.003-.055.098-.001.004-.002.003-.054.099-.001.003-.002.003-.052.1-.002.002-.002.004-.051.1-.002.002-.002.004-.05.1-.002.003-.002.003-.05.1v.003l-.002.004-.05.1V9.5l-.002.004-.048.1-.002.004-.001.003-.047.101-.002.003-.001.004-.013.027-.052.152-.024.16.006.16.037.157.064.148.091.133.114.114.134.09.147.065.157.036.162.006.159-.024.152-.053.14-.08.122-.105.1-.126.066-.117.01-.023.044-.095.045-.095.002-.003.042-.087.048-.097.048-.095v-.001l.048-.092.001-.001.047-.09.05-.093.002-.002.049-.09.052-.092.001-.002.051-.089.001-.002.051-.087.053-.088.001-.002.055-.091.057-.091.057-.09.001-.002.057-.089.055-.083.001-.002.06-.09.06-.088.062-.089.001-.001.06-.084.063-.088.065-.089.017-.023.016-.025.06-.094.059-.09v-.002l.058-.086.057-.086.001-.001.062-.09.062-.088.001-.002.06-.085.002-.002.06-.082.063-.087.064-.084.002-.002.061-.08.065-.084.064-.08v-.001l.067-.083.067-.082.07-.083.069-.08.063-.074.074-.083.068-.077.002-.002.07-.076.07-.075.072-.077.001-.001.067-.07.076-.078.002-.002.07-.07.075-.075.002-.002.072-.07.075-.072.002-.002.073-.069.074-.068.001-.001.08-.073.076-.068.002-.002.072-.063v-.001l.078-.067.079-.068.002-.001.08-.068.002-.002.077-.063.082-.066.001-.001.075-.06.002-.002.006-.004.117-.111.094-.131.068-.146.04-.156.01-.161-.019-.16-.049-.154-.076-.141-.102-.125-.123-.105-.14-.079-.153-.052-.16-.023-.16.007zm24.596 11.088l-.156.04-.146.067-.131.094-.112.117-.087.135-.061.15-.033.157-.004.134.007.142.005.152.004.15.002.149v.153l.001.011v.015l.004.11.002.11v.002l.002.106v.321l-.003.102-.002.106-.004.107-.005.105-.006.106-.006.106-.008.106v.002l-.008.103v.002l-.01.1-.01.105-.01.105-.013.105-.012.099v.002l-.014.108-.014.1-.016.105-.016.103v.002l-.017.099-.018.104-.019.103v.002l-.019.097-.02.104-.022.103v.001l-.022.098-.023.103v.002l-.024.096-.025.103v.002l-.024.096-.027.102v.003l-.026.093v.001l-.029.103v.002l-.03.099-.028.097v.002l-.03.095-.03.096v.001l-.033.1-.031.095v.002l-.035.1v.003l-.034.094v.003l-.035.096v.001l-.034.09v.002l-.038.098-.036.093v.002l-.038.095-.079.194-.08.188-.085.189-.087.19-.09.184-.092.183-.095.184-.05.093-.064.148-.034.158-.005.16.026.16.054.151.082.14.106.12.127.1.143.075.154.046.16.017.161-.013.156-.042.144-.071.13-.096.109-.119.072-.112.053-.099.003-.005.003-.006.102-.195.003-.006.003-.006.098-.196.003-.006.003-.006.096-.197.002-.006.003-.006.093-.2.002-.006.003-.006.09-.2.002-.006.003-.007.086-.202.003-.006.002-.006.084-.203.002-.005.001-.005.04-.102.002-.003.001-.003.04-.103.001-.003.001-.003.04-.103v-.004l.001-.003.039-.103v-.003l.002-.003.037-.104.001-.003.001-.003.037-.104v-.004l.002-.003.035-.104.002-.003v-.004l.035-.104.002-.004v-.003l.034-.105.002-.003v-.003l.034-.105v-.004l.002-.003.032-.106.001-.003.001-.003.031-.106.001-.003.001-.004.031-.106.001-.003.001-.004.03-.106v-.003l.002-.004.028-.107.001-.003.001-.003.028-.107.001-.004.001-.003.027-.107.001-.004v-.003l.027-.108.001-.003v-.004l.026-.108.001-.003v-.004l.025-.108.001-.003v-.004l.025-.108v-.004l.001-.003.023-.109v-.003l.001-.004.022-.109v-.003l.002-.004.02-.109.001-.004v-.003l.02-.11.002-.003v-.004l.02-.11v-.007l.019-.11v-.003l.001-.004.017-.11v-.004l.001-.003.017-.11v-.008l.016-.11v-.004l.001-.004.015-.11v-.008l.015-.111v-.008l.013-.111v-.007l.013-.112v-.007l.011-.112v-.004l.001-.004.01-.112v-.007l.01-.112v-.008l.008-.112v-.008l.007-.113v-.007l.007-.113v-.008l.005-.113v-.007l.005-.114v-.007l.003-.114v-.007l.003-.114v-.129l.001-.114v-.13l-.003-.114V16.5l-.003-.115v-.007l-.003-.102v-.155l-.003-.158v-.01l-.004-.158v-.01l-.006-.158v-.01l-.007-.148-.023-.16-.051-.152-.08-.14-.103-.124-.125-.102-.142-.077-.153-.05-.16-.02-.161.01zm-30.213.66l-.157.034-.149.063-.134.09-.115.113-.092.132-.067.147-.037.156-.009.134.001.11V16.308l.006.22v.012l.01.22v.012l.012.22v.006l.001.006.015.22v.005l.001.006.018.22.001.006v.006l.022.219v.006l.001.006.024.219.001.006v.006l.028.218.001.006v.006l.031.218.001.006.001.006.033.218.001.006.001.005.037.218v.006l.002.005.04.217v.006l.001.006.043.216.001.006.001.006.046.216v.005l.002.006.048.215.002.006.001.006.051.214.002.006v.006l.055.214.002.005.001.006.057.213.002.006.001.005.06.213.002.005.001.006.063.212.002.005.001.006.066.21.002.006.002.006.068.21.002.005.002.005.07.21.003.005.002.005.074.208.002.006.002.005.077.207.002.006.002.005.08.206.002.005.002.006.082.204.002.006.002.005.086.204.002.005.002.006.088.202.002.005.003.006.09.2.003.006.002.005.094.2.002.006.003.005.096.199.002.005.003.005.03.062.086.137.11.118.128.097.145.07.156.043.16.013.16-.017.155-.047.143-.074.127-.1.106-.121.081-.14.055-.15.025-.16-.005-.161-.034-.158-.05-.124-.028-.055-.092-.19-.087-.188-.087-.192-.083-.19-.08-.193-.078-.194-.076-.196-.073-.195-.07-.197-.067-.198-.065-.199-.063-.2-.059-.2-.056-.2-.055-.204-.05-.201-.049-.202-.046-.205-.043-.206-.04-.203-.038-.207-.034-.204-.032-.207-.028-.205-.026-.207-.023-.208-.02-.207-.018-.207-.014-.208-.011-.207-.009-.208-.005-.207-.002-.104-.017-.16-.046-.155-.074-.143-.1-.126-.121-.107-.139-.081-.152-.055-.159-.025-.161.004zm24.585 11.83l-.156.039-.146.068-.11.076-.015.012-.163.129-.166.127-.168.125-.17.124-.17.12-.172.118-.173.115-.176.114-.177.111-.18.11-.178.105-.182.104-.182.101-.184.1-.184.095-.189.095-.186.09-.188.089-.19.086-.19.082-.193.081-.195.078-.191.074-.197.073-.195.07-.196.065-.198.064-.198.061-.2.058-.2.055-.2.052-.2.049-.151.035-.153.05-.141.078-.125.103-.103.124-.078.14-.05.154-.022.16.009.16.038.157.067.147.093.132.116.112.134.089.149.062.158.034.16.003.133-.02.158-.035.006-.002.006-.001.213-.052.006-.002.007-.001.212-.056.006-.001.006-.002.212-.058.006-.002.006-.002.211-.061.006-.002.006-.002.21-.064.006-.002.006-.002.21-.067.005-.002.006-.002.208-.07.006-.002.006-.003.207-.073.006-.002.006-.002.206-.077.006-.002.005-.002.206-.08.005-.001.006-.003.204-.082.006-.002.005-.002.203-.085.006-.003.005-.002.202-.088.006-.002.005-.003.2-.09.006-.003.006-.003.2-.093.005-.003.005-.002.198-.096.006-.003.005-.003.197-.099.005-.002.005-.003.196-.102.005-.002.005-.003.195-.105.005-.002.005-.003.193-.107.005-.003.005-.003.191-.11.005-.003.005-.003.19-.112.005-.003.005-.003.189-.115.005-.003.005-.003.187-.117.005-.003.004-.004.186-.12.005-.003.004-.003.184-.122.005-.003.005-.004.182-.125.004-.003.005-.003.18-.128.005-.003.005-.003.179-.13.004-.003.005-.004.177-.132.004-.004.005-.003.175-.135.005-.003.004-.004.173-.137.005-.003.004-.004.019-.015.115-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.052-.153-.079-.14-.103-.124-.125-.102-.142-.078-.153-.05-.16-.02-.16.01zm-19.17.054l-.153.051-.14.079-.124.103-.103.125-.077.141-.05.153-.02.16.009.161.04.156.067.147.093.131.095.094.047.04.005.004.005.004.17.14.005.004.005.004.172.137.004.004.005.003.086.067.003.002.003.002.087.067.003.002.003.002.088.066.002.003.003.002.089.065.002.002.003.002.09.065.002.002.003.002.09.064.002.002.003.002.09.063.003.002.003.002.09.063.003.002.003.002.092.062.002.002.003.002.092.061.003.002.003.002.092.06.003.003.003.001.093.06.003.002.003.002.093.06.003.001.003.002.094.058.003.002.003.002.095.058.003.001.003.002.095.057.003.002.003.002.095.056.003.002.003.002.096.055.004.002.003.001.096.055.003.002.003.002.098.053.003.002.003.002.097.053.004.002.003.001.098.053.003.001.003.002.099.052.003.001.003.002.1.05.003.002.003.002.1.05.003.002.003.001.1.05h.003l.004.003.1.048.004.001.003.002.101.048.003.001.004.002.101.046.004.002.003.001.102.046.004.002.003.001.103.045.003.002.003.001.103.045.004.001.003.002.104.043.003.001.004.002.104.042.003.002.004.001.104.042.004.001.003.002.105.04.004.002.003.001.106.04.003.002h.004l.106.04.004.001.003.002.107.038.003.001.004.001.107.038.003.001.004.001.107.037.004.001.004.001.108.036.003.001.004.001.108.035.004.001.003.001.11.034.003.001.004.001.109.033.004.002h.003l.11.033h.004l.003.002.11.031.004.001.004.001.084.023.081.028.004.001.003.001.109.037.003.001.004.001.109.036.003.001.004.001.109.035h.003l.004.002.11.033.003.001.003.001.11.033.003.001.004.001.109.031.004.002h.003l.11.031.003.001.004.001.11.03h.003l.003.001.11.029h.004l.003.002.11.027.003.001.004.001.11.027h.003l.004.001.004.001.16.022.16-.008.157-.038.147-.067.132-.092.112-.116.09-.134.062-.149.034-.157.004-.161-.025-.16-.055-.151-.082-.139-.107-.12-.127-.1-.143-.074-.124-.04h-.003l-.104-.025-.103-.026h-.002l-.095-.026h-.001l-.101-.027h-.002l-.1-.028h-.002l-.103-.03-.104-.032-.097-.03h-.002l-.103-.033-.102-.033-.101-.034-.106-.036-.027-.01-.027-.007-.107-.03-.104-.029-.104-.03h-.002l-.097-.03-.102-.032-.102-.032-.102-.034-.103-.035-.096-.034-.1-.036-.101-.037h-.002l-.094-.036-.096-.037-.097-.04h-.002l-.099-.04-.098-.042h-.002l-.092-.04-.097-.043-.095-.043-.097-.044h-.002l-.09-.043-.094-.045-.094-.046-.093-.047-.09-.046-.096-.05-.088-.047-.002-.001-.09-.049-.094-.052-.002-.002-.087-.049-.087-.05h-.002l-.088-.053h-.001l-.09-.055-.086-.052-.002-.001-.089-.055-.084-.054h-.002l-.09-.059h-.001l-.085-.056-.001-.001-.084-.056-.082-.056h-.001l-.086-.06-.082-.058H7.79l-.086-.062-.002-.002-.08-.058-.081-.06h-.001l-.085-.064-.002-.002-.076-.058-.002-.002-.082-.064-.161-.128-.162-.133-.04-.034-.132-.092-.147-.066-.157-.038-.16-.008-.16.022z"})),CancelBoundaryEvent:Ew,CompensateBoundaryEvent:Cw,ConditionalBoundaryEvent:Pw,ErrorBoundaryEvent:Tw,EscalationBoundaryEvent:kw,LinkBoundaryEvent:Dw,MessageBoundaryEvent:Nw,MultipleBoundaryEvent:Lw,BoundaryEvent:oE,ConditionalBoundaryEventNonInterrupting:Iw,EscalationBoundaryEventNonInterrupting:Fw,MessageBoundaryEventNonInterrupting:Vw,MultipleBoundaryEventNonInterrupting:Ww,ParallelBoundaryEventNonInterrupting:qw,SignalBoundaryEventNonInterrupting:Yw,TimerBoundaryEventNonInterrupting:Zw,ParallelMultipleBoundaryEvent:Jw,SignalBoundaryEvent:tE,TimerBoundaryEvent:iE,StartEvent:({styles:e={},...t})=>Vb("svg",zE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.847.004C9.61-.016 3.624 4.014 1.257 9.78-1.235 15.49.06 22.581 4.42 27.034c4.193 4.513 11.101 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.268.403-6.228-3.26-12.441-8.87-15.154A15.924 15.924 0 0015.846.004zm.439 1.729c6.105.033 11.856 4.45 13.435 10.359 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.625-4.814-3.84-6.538-10.94-4.067-16.57 2.14-5.206 7.515-8.775 13.147-8.71.097-.001.194-.002.29-.001z"})),ParallelMultipleStartEvent:({styles:e={},...t})=>Vb("svg",NE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.847 0C9.61-.02 3.624 4.01 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.101 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.268.403-6.228-3.26-12.441-8.87-15.154A15.924 15.924 0 0015.846 0zm.439 1.729c6.105.033 11.856 4.45 13.435 10.359 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.625C2.101 23.17.377 16.07 2.848 10.44c2.134-5.2 7.522-8.78 13.147-8.71.097-.001.194-.002.29-.001zM13.504 9.08v4.427H9.077v4.98h4.427v4.427h4.98v-4.427h4.428v-4.98h-4.427V9.08h-4.98zm.83.83h3.32v4.427h4.428v3.32h-4.427v4.427h-3.32v-4.453H9.906v-3.294h4.427V9.91z"})),SignalStartEvent:({styles:e={},...t})=>Vb("svg",BE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M15.995.005C9.705-.08 3.643 3.968 1.257 9.78-1.235 15.49.06 22.581 4.42 27.034c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994.005zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626-4.814-3.838-6.538-10.939-4.067-16.57 2.14-5.205 7.515-8.774 13.147-8.708zm0 6.776L9.19 20.724H22.8L15.995 8.511zm0 1.777l5.332 9.572H10.662l5.333-9.572z"})),TimerStartEvent:({styles:e={},...t})=>Vb("svg",LE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M16 0C7.174 0 0 7.174 0 16s7.174 16 16 16 16-7.174 16-16S24.826 0 16 0zm0 1.73c7.892 0 14.27 6.378 14.27 14.27 0 7.891-6.379 14.27-14.27 14.27S1.73 23.891 1.73 16C1.73 8.108 8.108 1.73 16 1.73zm-.143 6.676c-2.967.02-5.797 1.97-6.89 4.727-1.138 2.695-.51 6.012 1.537 8.102 1.99 2.142 5.268 2.932 8.014 1.928 2.878-.98 4.992-3.827 5.068-6.87.153-2.957-1.624-5.881-4.3-7.137a7.552 7.552 0 00-3.43-.75zm.27 1.383c2.71.012 5.254 2.015 5.886 4.656.704 2.577-.482 5.517-2.791 6.867-2.358 1.48-5.682 1.085-7.618-.918-2.043-1.971-2.407-5.381-.84-7.745 1.11-1.763 3.15-2.88 5.234-2.86h.13zm1.833 1.765l-2.074 3.763c-.64.068-.793 1.04-.202 1.3.39.27.696-.18 1.052-.165h3.17v-.865h-3.181l1.992-3.615-.757-.418z"})),CollapsedSubProcess:({styles:e={},...t})=>Vb("svg",jE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M5.637 3A5.644 5.644 0 000 8.637v15.417a5.644 5.644 0 005.637 5.637h20.726A5.644 5.644 0 0032 24.054V8.637A5.644 5.644 0 0026.363 3H5.637zm0 1.778h20.726a3.83 3.83 0 013.859 3.859v15.417a3.83 3.83 0 01-3.859 3.858h-4.201V16.695H9.838v11.217H5.637a3.83 3.83 0 01-3.859-3.858V8.637a3.83 3.83 0 013.859-3.859zm5.33 13.046h10.066v10.065H10.967V17.824zm4.189 1.431V22.06H12.35v1.689h2.804V26.554h1.69V23.749h2.804V22.06h-2.804V19.255h-1.69z"})),ExpandedSubProcess:({styles:e={},...t})=>Vb("svg",IE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M5.636 3A5.642 5.642 0 000 8.636v15.418a5.643 5.643 0 005.636 5.636h20.728A5.643 5.643 0 0032 24.054V8.636A5.642 5.642 0 0026.364 3H5.636zm0 1.778h20.728a3.83 3.83 0 013.858 3.858v15.418a3.83 3.83 0 01-3.858 3.858h-4.203V16.723H9.84v11.189H5.636a3.83 3.83 0 01-3.858-3.858V8.636a3.83 3.83 0 013.858-3.858zm5.331 13.074h10.066v10.06H10.967v-10.06zm1.336 3.996v1.711h7.394v-1.71h-7.394z"})),Task:({styles:e={},...t})=>Vb("svg",$E({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M6.494 2.667C2.916 2.667 0 5.57 0 9.142v13.383C0 26.097 2.916 29 6.494 29h19.012C29.084 29 32 26.097 32 22.525V9.142c0-3.572-2.916-6.475-6.494-6.475H6.494zm0 2h19.012c2.509 0 4.494 1.98 4.494 4.475v13.383C30 25.02 28.015 27 25.506 27H6.494C3.985 27 2 25.02 2 22.525V9.142c0-2.495 1.985-4.475 4.494-4.475z"})),TextAnnotation:({styles:e={},...t})=>Vb("svg",FE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M22.087 0v31.647H32v-1.788h-8.125V1.788H32V0h-9.913zm-2.924 13.999l-2.737 2.167 2.167 2.738 2.738-2.167-2.168-2.738zm-5.475 4.335L10.95 20.5l2.168 2.738 2.737-2.168-2.167-2.737zm-5.475 4.335l-2.738 2.167 2.168 2.738 2.737-2.168-2.167-2.737zm-5.476 4.335L0 29.17l2.167 2.738 2.738-2.168-2.168-2.737z"})),Transaction:({styles:e={},...t})=>Vb("svg",HE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{d:"M5.422 3A5.424 5.424 0 000 8.422v15.822a5.424 5.424 0 005.422 5.423h21.156A5.424 5.424 0 0032 24.244V8.422A5.424 5.424 0 0026.578 3H5.422zm0 1.244h21.156a4.155 4.155 0 014.178 4.178v15.822a4.155 4.155 0 01-4.178 4.178H5.422a4.155 4.155 0 01-4.178-4.178V8.422a4.155 4.155 0 014.178-4.178zm1.056 1.778a3.373 3.373 0 00-3.367 3.366v13.89a3.373 3.373 0 003.367 3.366h19.044a3.373 3.373 0 003.367-3.366V9.388a3.373 3.373 0 00-3.367-3.366H6.478zm0 1.245h19.044c1.187 0 2.122.935 2.122 2.121v13.89a2.104 2.104 0 01-2.122 2.122H6.478a2.104 2.104 0 01-2.122-2.122V9.388c0-1.186.935-2.121 2.122-2.121z"})),UserTask:({styles:e={},...t})=>Vb("svg",VE({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),Vb("path",{fillRule:"evenodd",d:"M10.263 7.468c-1.698 0-2.912 1.305-2.915 2.791v.001c0 .45.121.924.311 1.352.138.309.308.593.516.82-1.235.423-2.683 1.119-3.414 2.49l-.04.075v4.44h11.083v-4.44l-.04-.074c-.72-1.352-2.136-2.047-3.36-2.471.597-.608.774-1.392.774-2.192-.004-1.487-1.218-2.792-2.915-2.792zm-1.16 1.583c.08 0 .165.003.26.008.757.045 1.012.181 1.207.31.196.13.334.252.851.268.404-.016.598-.087.737-.169.056-.033.103-.067.152-.1.128.275.197.578.198.893 0 .894-.154 1.52-.975 2.034l.08.604c.171.052.348.11.527.171.025.105.054.242.073.387.02.153.029.311.016.43a.422.422 0 01-.056.19c-.417.417-1.157.66-1.908.66-.75 0-1.49-.243-1.908-.66a.422.422 0 01-.056-.19 1.949 1.949 0 01.016-.43c.02-.146.049-.284.074-.388.177-.062.352-.118.521-.17l.048-.648a.616.616 0 00-.126-.118c-.183-.138-.405-.44-.562-.793-.157-.353-.254-.757-.254-1.08 0-.387.105-.758.297-1.079l.11-.04c.143-.046.339-.09.679-.09zm-1.448 4.304l-.002.014c-.025.185-.04.387-.018.589.021.202.074.42.248.593.595.594 1.494.857 2.382.857.889 0 1.788-.263 2.382-.857.174-.174.227-.391.249-.593a2.496 2.496 0 00-.018-.59l-.002-.01c.903.396 1.776.963 2.258 1.81v3.599H13.53v-2.538h-.67v2.538H7.651v-2.538h-.67v2.538H5.39v-3.599c.483-.849 1.359-1.416 2.264-1.813zM6.495 3C2.914 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.01C28.016 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5z"}))};function WE(e){const{type:t}=e;let n=qE(t);const i=function(e){const t=vr(e).eventDefinitions;return t&&t[0]}(e);if(i)return n=`${function(e){return qE(e.$type).replace("EventDefinition","")}(i)}${n}`,(mr(e,"bpmn:StartEvent")&&!kr(e)||mr(e,"bpmn:BoundaryEvent")&&!function(e){const t=vr(e);return t&&!1!==t.cancelActivity}(e))&&(n=`${n}NonInterrupting`),n;mr(e,"bpmn:SubProcess")&&!mr(e,"bpmn:Transaction")&&(n=Or(e)?`Event${n}`:`${Ar(e)&&!function(e){return!e.parent}(e)?"Expanded":"Collapsed"}${n}`);return function(e){const t=vr(e),n=vr(e.source);if(!mr(e,"bpmn:SequenceFlow")||!n)return!1;return n.default&&n.default===t&&(mr(n,"bpmn:Gateway")||mr(n,"bpmn:Activity"))}(e)&&(n="DefaultFlow"),function(e){const t=vr(e),n=vr(e.source);if(!mr(e,"bpmn:SequenceFlow")||!n)return!1;return t.conditionExpression&&mr(n,"bpmn:Activity")}(e)&&(n="ConditionalFlow"),n}const UE={getElementLabel:e=>mr(e,"bpmn:Process")?vr(e).name:Nr(e),getElementIcon:e=>{const t=WE(e);return GE[t]},getTypeLabel:e=>WE(e).replace(/(\B[A-Z])/g," $1").replace(/(\bNon Interrupting)/g,"($1)")};function qE(e){return e.split(":")[1]}function XE(e){const{element:t,injector:n,getProviders:i,layoutConfig:r,descriptionConfig:o}=e,a=n.get("canvas"),s=n.get("elementRegistry"),c=n.get("eventBus"),[l,p]=Ky({selectedElement:t}),u=l.selectedElement,h=e=>{if(!e)return;let t=e;t&&"label"===t.type&&(t=t.labelTarget),p({...l,selectedElement:t}),c.fire("propertiesPanel.updated",{element:t})};Qy((()=>{const e=e=>{const t=e.newSelection[0],n=a.getRootElement();(function(e){return e&&(e.isImplicit||"__implicitroot"===e.id)})(n)||h(t||n)};return c.on("selection.changed",e),()=>{c.off("selection.changed",e)}}),[]),Qy((()=>{const e=e=>{const t=function(e,t){return mb(e,(e=>e===t))}(e.elements,u);t&&function(e,t){return e&&t.get(e.id)}(t,s)&&h(t)};return c.on("elements.changed",e),()=>{c.off("elements.changed",e)}}),[u]),Qy((()=>{const e=e=>{const t=e.element;h(t)};return c.on("root.added",e),()=>{c.off("root.added",e)}}),[u]),Qy((()=>{const e=()=>{h(u)};return c.on("propertiesPanel.providersChanged",e),()=>{c.off("propertiesPanel.providersChanged",e)}}),[u]),Qy((()=>{const e=()=>{h(u)};return c.on("elementTemplates.changed",e),()=>{c.off("elementTemplates.changed",e)}}),[u]);const d={selectedElement:u,injector:n,getService:(e,t)=>n.get(e,t)},m=i(u),f=eb((()=>function(e,t,n){return fb(e,(function(e,i){n=t(n,e,i)})),n}(m,(function(e,t){return t.getGroups(u)(e)}),[])),[m,u]);return wb(qx.Provider,{value:d,children:wb(Jb,{element:u,headerProvider:UE,groups:f,layoutConfig:r,layoutChanged:e=>{c.fire("propertiesPanel.layoutChanged",{layout:e})},descriptionConfig:o,descriptionLoaded:e=>{c.fire("propertiesPanel.descriptionLoaded",{description:e})}})})}class YE{constructor(e,t,n){const{parent:i,layout:r,description:o}=e||{};this._eventBus=n,this._injector=t,this._layoutConfig=r,this._descriptionConfig=o,this._container=ce('<div style="height: 100%" class="bio-properties-panel-container" input-handle-modified-keys="y,z"></div>'),n.on("diagram.init",(()=>{i&&this.attachTo(i)})),n.on("diagram.destroy",(()=>{this.detach()})),n.on("root.added",(e=>{const{element:t}=e;this._render(t)}))}attachTo(e){if(!e)throw new Error("container required");"string"==typeof e&&(e=ue(e)),this.detach(),e.appendChild(this._container),this._eventBus.fire("propertiesPanel.attach")}detach(){const e=this._container.parentNode;e&&(e.removeChild(this._container),this._eventBus.fire("propertiesPanel.detach"))}registerProvider(e,t){t||(t=e,e=1e3),"function"==typeof t.getGroups?(this._eventBus.on("propertiesPanel.getProviders",e,(function(e){e.providers.push(t)})),this._eventBus.fire("propertiesPanel.providersChanged")):console.error("Properties provider does not implement #getGroups(element) API")}_getProviders(){const e=this._eventBus.createEvent({type:"propertiesPanel.getProviders",providers:[]});return this._eventBus.fire(e),e.providers}_render(e){const t=this._injector.get("canvas");e||(e=t.getRootElement()),function(e){return e&&(e.isImplicit||"__implicitroot"===e.id)}(e)||(Ly(wb(XE,{element:e,injector:this._injector,getProviders:this._getProviders.bind(this),layoutConfig:this._layoutConfig,descriptionConfig:this._descriptionConfig}),this._container),this._eventBus.fire("propertiesPanel.rendered"))}_destroy(){this._container&&(Ly(null,this._container),this._eventBus.fire("propertiesPanel.destroyed"))}}YE.$inject=["config.propertiesPanel","injector","eventBus"];class KE{constructor(e){this._commandStack=e}preExecute(e){const t=this._commandStack;fb(e,(function(e){t.execute(e.cmd,e.context)}))}}KE.$inject=["commandStack"];const ZE={"properties-panel.multi-command-executor":KE};function QE(e,t){e.on("diagram.init",(function(){fb(ZE,(function(e,n){t.registerHandler(n,e)}))}))}QE.$inject=["eventBus","commandStack"];var JE={__depends__:[{__init__:[QE]},y_],__init__:["propertiesPanel"],propertiesPanel:["type",YE]};function eS(e,t){const{getService:n}=tb(qx);return n(e,t)}function tS(e){const{autoFocusEntry:t,element:n,getOptions:i}=e,r=i(n),o=Wb(r);return Qy((()=>{if(t&&o&&r.length>o.length){const e=ue(`[data-entry-id="${t}"]`),n=ue(".bio-properties-panel-input",e);n&&n.select()}}),[r]),wb(a_,{...e})}function nS(e){return oS(e,"bpmn:ErrorEventDefinition")}function iS(e){return oS(e,"bpmn:TimerEventDefinition")}function rS(e){const t=nS(e);return t&&t.get("errorRef")}function oS(e,t){return mb(vr(e).get("eventDefinitions")||[],(function(e){return mr(e,t)}))}function aS(e){return mr(e,"bpmn:ReceiveTask")?vr(e):oS(e,"bpmn:MessageEventDefinition")}function sS(e){const t=aS(e);return t&&t.get("messageRef")}function cS(e){return oS(e,"bpmn:LinkEventDefinition")}function lS(e){return oS(e,"bpmn:SignalEventDefinition")}function pS(e){const t=lS(e);return t&&t.get("signalRef")}function uS(e){return oS(e,"bpmn:EscalationEventDefinition")}function hS(e){const t=uS(e);return t&&t.get("escalationRef")}function dS(e){return oS(e,"bpmn:CompensateEventDefinition")}function mS(e){const{element:t}=e;return function(e){return fr(e,["bpmn:EndEvent","bpmn:IntermediateThrowEvent"])&&!!dS(e)}(t)?[{id:"waitForCompletion",component:wb(fS,{element:t}),isEdited:i_},{id:"activityRef",component:wb(vS,{element:t}),isEdited:s_}]:[]}function fS(e){const{element:t}=e,n=eS("commandStack"),i=eS("translate"),r=dS(t);return n_({element:t,id:"waitForCompletion",label:i("Wait for completion"),getValue:()=>r.get("waitForCompletion"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:r,properties:{waitForCompletion:e}})}})}function vS(e){const{element:t}=e,n=eS("commandStack"),i=eS("elementRegistry"),r=eS("translate"),o=dS(t);return tS({element:t,id:"activityRef",label:r("Activity reference"),getValue:()=>{const e=function(e){const t=dS(e);return t&&t.get("activityRef")}(t);return e&&e.get("id")},setValue:e=>{const r=e?vr(i.get(e)):void 0;n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{activityRef:r}})},getOptions:()=>{let e=[{value:"",label:r("<none>")}];const n=function(e){let t=vr(e).$parent,n=bS(t);mr(t,"bpmn:SubProcess")&&t.triggeredByEvent&&(t=t.$parent,t&&(n=[...n,...bS(t)]));return n}(t);var i;return(i=n,gb(i,(e=>(e.name||"").toLowerCase()))).forEach((function(t){e.push({value:t.id,label:_S(t)})})),e}})}function gS(e,t){const{flowElements:n}=e;return n.filter((function(e){return mr(e,t)}))}function yS(e,t){return mr(e,"bpmn:CallActivity")||mr(e,"bpmn:SubProcess")&&!e.triggeredByEvent&&!e.isForCompensation||function(e,t){const{id:n}=e;return!!mb(t,(function(e){const{attachedToRef:t}=e,i=dS(e);return t&&i&&t.id===n}))}(e,t)}function bS(e){const t=function(e){return gS(e,"bpmn:Activity")}(e),n=function(e){return gS(e,"bpmn:BoundaryEvent")}(e);return t.filter((function(e){return yS(e,n)}))}function _S(e){const{id:t,name:n}=e;return`${n?n+" ":""}(id=${t})`}const xS="text/plain";function wS(e){const{element:t}=e,n=[{id:"documentation",component:wb(ES,{element:t}),isEdited:u_}];return function(e){return mr(e,"bpmn:Participant")&&e.businessObject.get("processRef")}(t)&&n.push({id:"processDocumentation",component:wb(SS,{element:t}),isEdited:u_}),n}function ES(e){const{element:t}=e,n=eS("bpmnFactory"),i=eS("commandStack"),r=eS("translate"),o=eS("debounceInput"),a=RS(vr(t)),s=PS(t,vr(t),n,i);return p_({element:t,id:"documentation",label:r("Element documentation"),getValue:a,setValue:s,debounce:o})}function SS(e){const{element:t}=e,n=eS("bpmnFactory"),i=eS("commandStack"),r=eS("translate"),o=eS("debounceInput"),a=vr(t).processRef,s=RS(a),c=PS(t,a,n,i);return p_({element:t,id:"processDocumentation",label:r("Process documentation"),getValue:s,setValue:c,debounce:o})}function CS(e){return e.find((function(e){return(e.textFormat||xS)===xS}))}function RS(e){return function(){const t=CS(e&&e.get("documentation"));return t&&t.text}}function PS(e,t,n,i){return function(r){let o=CS(t&&t.get("documentation"));return o?r?i.execute("element.updateModdleProperties",{element:e,moddleElement:o,properties:{text:r}}):i.execute("element.updateModdleProperties",{element:e,moddleElement:t,properties:{documentation:vb(t.get("documentation"),o)}}):r?(o=n.create("bpmn:Documentation",{text:r}),i.execute("element.updateModdleProperties",{element:e,moddleElement:t,properties:{documentation:[...t.get("documentation"),o]}})):void 0}}function MS(e,t,n,i){const r=i.create(e,t);return n&&(r.$parent=n),r}function TS(e){return new r([32,32,1]).nextPrefixed(e)}function AS(e){let t=e;for(;t.$parent;)t=t.$parent;return t}function kS(e,t){const n=AS(e);return i=n.get("rootElements"),r=t,(i||[]).filter((e=>mr(e,r)));var i,r}function OS(e,t,n){return kS(e,t).find((e=>e.id===n))}const DS="create-new";function zS(e){const{element:t}=e;if(!function(e){return fr(e,["bpmn:StartEvent","bpmn:BoundaryEvent","bpmn:EndEvent"])&&!!nS(e)}(t))return[];const n=rS(t);let i=[{id:"errorRef",component:wb(NS,{element:t}),isEdited:s_}];return n&&(i=[...i,{id:"errorName",component:wb(BS,{element:t}),isEdited:f_},{id:"errorCode",component:wb(LS,{element:t}),isEdited:f_}]),i}function NS(e){const{element:t}=e,n=eS("bpmnFactory"),i=eS("commandStack"),r=eS("translate"),o=nS(t);return tS({element:t,id:"errorRef",label:r("Global error reference"),autoFocusEntry:"errorName",getValue:()=>{const e=rS(t);return e?e.get("id"):""},setValue:e=>{const r=AS(o),a=[];let s;return e===DS&&(s=MS("bpmn:Error",{name:TS("Error_")},r,n),e=s.get("id"),a.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:r,properties:{rootElements:[...r.get("rootElements"),s]}}})),s=s||OS(o,"bpmn:Error",e),a.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{errorRef:s}}}),i.execute("properties-panel.multi-command-executor",a)},getOptions:()=>{let e=[{value:"",label:r("<none>")},{value:DS,label:r("Create new ...")}];const n=kS(vr(t),"bpmn:Error");var i;return(i=n,gb(i,(e=>(e.name||"").toLowerCase()))).forEach((t=>{e.push({value:t.get("id"),label:t.get("name")})})),e}})}function BS(e){const{element:t}=e,n=eS("commandStack"),i=eS("translate"),r=eS("debounceInput"),o=rS(t);return m_({element:t,id:"errorName",label:i("Name"),getValue:()=>o.get("name"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{name:e}}),debounce:r})}function LS(e){const{element:t}=e,n=eS("commandStack"),i=eS("translate"),r=eS("debounceInput"),o=rS(t);return m_({element:t,id:"errorCode",label:i("Code"),getValue:()=>o.get("errorCode"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{errorCode:e}}),debounce:r})}const jS="create-new";function IS(e){const{element:t}=e;if(!function(e){return mr(e,"bpmn:Event")&&!!uS(e)}(t))return[];const n=hS(t);let i=[{id:"escalationRef",component:wb($S,{element:t}),isEdited:s_}];return n&&(i=[...i,{id:"escalationName",component:wb(FS,{element:t}),isEdited:f_},{id:"escalationCode",component:wb(HS,{element:t}),isEdited:f_}]),i}function $S(e){const{element:t}=e,n=eS("bpmnFactory"),i=eS("commandStack"),r=eS("translate"),o=uS(t);return tS({element:t,id:"escalationRef",label:r("Global escalation reference"),autoFocusEntry:"escalationName",getValue:()=>{const e=hS(t);return e&&e.get("id")},setValue:e=>{const r=AS(o),a=[];let s;if(e===jS){const i=TS("Escalation_");s=MS("bpmn:Escalation",{id:i,name:i},r,n),e=s.get("id"),a.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:r,properties:{rootElements:[...r.get("rootElements"),s]}}})}return s=s||OS(o,"bpmn:Escalation",e),a.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{escalationRef:s}}}),i.execute("properties-panel.multi-command-executor",a)},getOptions:()=>{let e=[{value:"",label:r("<none>")},{value:jS,label:r("Create new ...")}];const n=kS(vr(t),"bpmn:Escalation");var i;return(i=n,gb(i,(e=>(e.name||"").toLowerCase()))).forEach((t=>{e.push({value:t.get("id"),label:t.get("name")})})),e}})}function FS(e){const{element:t}=e,n=eS("commandStack"),i=eS("translate"),r=eS("debounceInput"),o=hS(t);return m_({element:t,id:"escalationName",label:i("Name"),getValue:()=>o.get("name"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{name:e}}),debounce:r})}function HS(e){const{element:t}=e,n=eS("commandStack"),i=eS("translate"),r=eS("debounceInput"),o=hS(t);return m_({element:t,id:"escalationCode",label:i("Code"),getValue:()=>o.get("escalationCode"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{escalationCode:e}}),debounce:r})}function VS(e){const{element:t}=e;return mr(t,"bpmn:Process")||function(e){return mr(e,"bpmn:Participant")&&e.businessObject.get("processRef")}(t)?[{id:"isExecutable",component:wb(GS,{element:t}),isEdited:i_}]:[]}function GS(e){const{element:t}=e,n=eS("modeling"),i=eS("commandStack"),r=eS("translate");let o,a;if(a=e=>{n.updateProperties(t,{isExecutable:e})},o=e=>e.businessObject.isExecutable,mr(t,"bpmn:Participant")){const e=t.businessObject.get("processRef");a=n=>{i.execute("element.updateModdleProperties",{element:t,moddleElement:e,properties:{isExecutable:n}})},o=()=>e.get("isExecutable")}return n_({element:t,id:"isExecutable",label:r("Executable"),getValue:o,setValue:a})}const WS=/\s/,US=/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i,qS=/^[a-z_][\w-.]*$/i;function XS(e,t,n){const i=e.$model.ids.assigned(t);return t?i&&i!==e?n("ID must be unique."):function(e,t){if(n=e,WS.test(n))return t("ID must not contain spaces.");var n;if(!qS.test(e))return US.test(e)?t("ID must not contain prefix."):t("ID must be a valid QName.")}(t,n):n("ID must not be empty.")}function YS(e){const{element:t}=e;return[{id:"id",component:wb(KS,{element:t}),isEdited:f_}]}function KS(e){const{element:t}=e,n=eS("modeling"),i=eS("debounceInput"),r=eS("translate");return m_({element:t,id:"id",label:r(mr(t,"bpmn:Participant")?"Participant ID":"ID"),getValue:e=>e.businessObject.id,setValue:e=>{n.updateProperties(t,{id:e})},debounce:i,validate:e=>XS(vr(t),e,r)})}function ZS(e){const{element:t}=e;return function(e){return fr(e,["bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"])&&!!cS(e)}(t)?[{id:"linkName",component:wb(QS,{element:t}),isEdited:f_}]:[]}function QS(e){const{element:t}=e,n=eS("commandStack"),i=eS("translate"),r=eS("debounceInput"),o=cS(t);return m_({element:t,id:"linkName",label:i("Name"),getValue:()=>o.get("name"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{name:e}})},debounce:r})}const JS="create-new";function eC(e){const{element:t}=e;if(!function(e){return mr(e,"bpmn:ReceiveTask")||fr(e,["bpmn:StartEvent","bpmn:EndEvent","bpmn:IntermediateThrowEvent","bpmn:BoundaryEvent","bpmn:IntermediateCatchEvent"])&&!!aS(e)}(t))return[];const n=sS(t);let i=[{id:"messageRef",component:wb(tC,{element:t}),isEdited:s_}];return n&&(i=[...i,{id:"messageName",component:wb(nC,{element:t}),isEdited:f_}]),i}function tC(e){const{element:t}=e,n=eS("bpmnFactory"),i=eS("commandStack"),r=eS("translate"),o=aS(t);return tS({element:t,id:"messageRef",label:r("Global message reference"),autoFocusEntry:"messageName",getValue:()=>{const e=sS(t);return e?e.get("id"):""},setValue:e=>{const r=AS(o),a=[];let s;if(e===JS){const i=TS("Message_");s=MS("bpmn:Message",{id:i,name:i},r,n),e=s.get("id"),a.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:r,properties:{rootElements:[...r.get("rootElements"),s]}}})}return s=s||OS(o,"bpmn:Message",e),a.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{messageRef:s}}}),i.execute("properties-panel.multi-command-executor",a)},getOptions:()=>{let e=[{value:"",label:r("<none>")},{value:JS,label:r("Create new ...")}];const n=kS(vr(t),"bpmn:Message");var i;return(i=n,gb(i,(e=>(e.name||"").toLowerCase()))).forEach((t=>{e.push({value:t.get("id"),label:t.get("name")})})),e}})}function nC(e){const{element:t}=e,n=eS("commandStack"),i=eS("translate"),r=eS("debounceInput"),o=sS(t);return m_({element:t,id:"messageName",label:i("Name"),getValue:()=>o.get("name"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{name:e}}),debounce:r})}function iC(e){const{element:t}=e;if(!function(e){const t=cC(e);return!!t&&mr(t,"bpmn:MultiInstanceLoopCharacteristics")}(t))return[];return[{id:"loopCardinality",component:wb(rC,{element:t}),isEdited:f_},{id:"completionCondition",component:wb(oC,{element:t}),isEdited:f_}]}function rC(e){const{element:t}=e,n=eS("bpmnFactory"),i=eS("debounceInput"),r=eS("commandStack"),o=eS("translate");return m_({element:t,id:"loopCardinality",label:o("Loop cardinality"),getValue:()=>function(e){return aC(function(e){return sC(e,"loopCardinality")}(e))}(t),setValue:e=>r.execute("element.updateModdleProperties",lC(t,"loopCardinality",e,n)),debounce:i})}function oC(e){const{element:t}=e,n=eS("bpmnFactory"),i=eS("debounceInput"),r=eS("commandStack"),o=eS("translate");return m_({element:t,id:"completionCondition",label:o("Completion condition"),getValue:()=>function(e){return aC(function(e){return sC(e,"completionCondition")}(e))}(t),setValue:e=>r.execute("element.updateModdleProperties",lC(t,"completionCondition",e,n)),debounce:i})}function aC(e){return e&&e.get("body")}function sC(e,t){const n=cC(e);return n&&n.get(t)}function cC(e){return vr(e).loopCharacteristics}function lC(e,t,n,i){const r=cC(e),o={};if(!n)return o[t]=void 0,{element:e,moddleElement:r,properties:o};const a=r.get(t);return a?{element:e,moddleElement:a,properties:{body:n}}:(o[t]=function(e,t,n){return MS("bpmn:FormalExpression",{body:t},e,n)}(r,n,i),{element:e,moddleElement:r,properties:o})}function pC(e){const{element:t}=e;return mr(t,"bpmn:Collaboration")?[]:[{id:"name",component:wb(uC,{element:t}),isEdited:f_}]}function uC(e){const{element:t}=e,n=eS("modeling"),i=eS("debounceInput"),r=eS("canvas"),o=eS("bpmnFactory"),a=eS("translate");let s={element:t,id:"name",label:a("Name"),debounce:i,setValue:e=>{n.updateProperties(t,{name:e})},getValue:e=>e.businessObject.name};return mr(t,"bpmn:TextAnnotation")?s={...s,setValue:e=>{n.updateProperties(t,{text:e})},getValue:e=>e.businessObject.text}:mr(t,"bpmn:Group")?s={...s,setValue:e=>{const i=vr(t);i.categoryValueRef||function(e,t,n){const i=function(e,t){const n=t.create("bpmn:CategoryValue"),i=t.create("bpmn:Category",{categoryValue:[n]});return 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)}}(e.get("rootElements"),i),vr(i).$parent=e,vr(n).$parent=i,n}(vr(t).$parent,n);e.categoryValueRef=i}(i,r.getRootElement(),o),n.updateLabel(t,e)},getValue:e=>{const t=vr(e).categoryValueRef;return t&&t.value}}:mr(t,"bpmn:Participant")&&(s.label=a("Participant Name")),m_(s)}function hC(e){const{element:t}=e;return function(e){return mr(e,"bpmn:Participant")&&e.businessObject.get("processRef")}(t)?[{id:"processId",component:wb(mC,{element:t}),isEdited:f_},{id:"processName",component:wb(dC,{element:t}),isEdited:f_}]:[]}function dC(e){const{element:t}=e,n=eS("commandStack"),i=eS("translate"),r=eS("debounceInput"),o=t.businessObject.get("processRef");return m_({element:t,id:"processName",label:i("Process name"),getValue:()=>o.get("name"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{name:e}})},debounce:r})}function mC(e){const{element:t}=e,n=eS("commandStack"),i=eS("translate"),r=eS("debounceInput"),o=t.businessObject.get("processRef");return m_({element:t,id:"processId",label:i("Process ID"),getValue:()=>o.get("id"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{id:e}})},debounce:r,validate:e=>XS(o,e,i)})}const fC="create-new";function vC(e){const{element:t}=e;if(!function(e){return mr(e,"bpmn:Event")&&!!lS(e)}(t))return[];const n=pS(t);let i=[{id:"signalRef",component:wb(gC,{element:t}),isEdited:s_}];return n&&(i=[...i,{id:"signalName",component:wb(yC,{element:t}),isEdited:f_}]),i}function gC(e){const{element:t}=e,n=eS("bpmnFactory"),i=eS("commandStack"),r=eS("translate"),o=lS(t);return tS({element:t,id:"signalRef",label:r("Global signal reference"),autoFocusEntry:"signalName",getValue:()=>{const e=pS(t);return e?e.get("id"):""},setValue:e=>{const r=AS(o),a=[];let s;if(e===fC){const i=TS("Signal_");s=MS("bpmn:Signal",{id:i,name:i},r,n),e=s.get("id"),a.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:r,properties:{rootElements:[...r.get("rootElements"),s]}}})}return s=s||OS(o,"bpmn:Signal",e),a.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{signalRef:s}}}),i.execute("properties-panel.multi-command-executor",a)},getOptions:()=>{let e=[{value:"",label:r("<none>")},{value:fC,label:r("Create new ...")}];const n=kS(vr(t),"bpmn:Signal");var i;return(i=n,gb(i,(e=>(e.name||"").toLowerCase()))).forEach((t=>{e.push({value:t.get("id"),label:t.get("name")})})),e}})}function yC(e){const{element:t}=e,n=eS("commandStack"),i=eS("translate"),r=eS("debounceInput"),o=pS(t);return m_({element:t,id:"signalName",label:i("Name"),getValue:()=>o.get("name"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{name:e}}),debounce:r})}function bC(e){const{element:t,listener:n,idPrefix:i}=e;let{timerEventDefinition:r}=e;if(!r){r=iS(vr(t))}const o=function(e){if(!e)return;return void 0!==e.get("timeDate")?"timeDate":void 0!==e.get("timeCycle")?"timeCycle":void 0!==e.get("timeDuration")?"timeDuration":void 0}(r);if(!function(e){return fr(e,["bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:BoundaryEvent"])&&!!iS(e)}(t)&&!function(e){return e&&mr(e,"camunda:TaskListener")&&iS(e)}(n))return[];const a=[];return a.push({id:EC(i,"timerEventDefinitionType"),component:wb(_C,{element:t,timerEventDefinition:r,timerEventDefinitionType:o}),isEdited:s_}),o&&a.push({id:EC(i,"timerEventDefinitionValue"),component:wb(xC,{element:t,timerEventDefinition:r,timerEventDefinitionType:o}),isEdited:f_}),a}function _C(e){const{element:t,timerEventDefinition:n,timerEventDefinitionType:i}=e,r=eS("commandStack"),o=eS("bpmnFactory"),a=eS("translate");return a_({element:t,id:"timerEventDefinitionType",label:a("Type"),getValue:()=>i||"",setValue:e=>{if(e===i)return;const a=o.create("bpmn:FormalExpression",{body:void 0});a.$parent=n;const s={timeDuration:void 0,timeDate:void 0,timeCycle:void 0};""!==e&&(s[e]=a),r.execute("element.updateModdleProperties",{element:t,moddleElement:n,properties:s})},getOptions:e=>[{value:"",label:a("<none>")},{value:"timeDate",label:a("Date")},{value:"timeDuration",label:a("Duration")},{value:"timeCycle",label:a("Cycle")}]})}function xC(e){const{element:t,timerEventDefinition:n,timerEventDefinitionType:i}=e,r=eS("commandStack"),o=eS("translate"),a=eS("debounceInput"),s=n.get(i);return m_({element:t,id:"timerEventDefinitionValue",label:o("Value"),getValue:()=>s&&s.get("body"),setValue:e=>{r.execute("element.updateModdleProperties",{element:t,moddleElement:s,properties:{body:e}})},debounce:a,description:wC(i,o)})}function wC(e,t){switch(e){case"timeDate":return wb("div",{children:[wb("p",{children:t("A specific point in time defined as ISO 8601 combined date and time representation.")}),wb("ul",{children:[wb("li",{children:[wb("code",{children:"2019-10-01T12:00:00Z"})," - ",t("UTC time")]}),wb("li",{children:[wb("code",{children:"2019-10-02T08:09:40+02:00"})," - ",t("UTC plus 2 hours zone offset")]})]}),wb("a",{href:"https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-date",target:"_blank",rel:"noopener",children:t("Documentation: Timer events")})]});case"timeCycle":return wb("div",{children:[wb("p",{children:t("A cycle defined as ISO 8601 repeating intervals format.")}),wb("ul",{children:[wb("li",{children:[wb("code",{children:"R5/PT10S"})," - ",t("every 10 seconds, up to 5 times")]}),wb("li",{children:[wb("code",{children:"R/P1D"})," - ",t("every day, infinitely")]})]}),wb("a",{href:"https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-cycle",target:"_blank",rel:"noopener",children:t("Documentation: Timer events")})]});case"timeDuration":return wb("div",{children:[wb("p",{children:t("A time duration defined as ISO 8601 durations format.")}),wb("ul",{children:[wb("li",{children:[wb("code",{children:"PT15S"})," - ",t("15 seconds")]}),wb("li",{children:[wb("code",{children:"PT1H30M"})," - ",t("1 hour and 30 minutes")]}),wb("li",{children:[wb("code",{children:"P14D"})," - ",t("14 days")]})]}),wb("a",{href:"https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-duration",target:"_blank",rel:"noopener",children:t("Documentation: Timer events")})]})}}function EC(e,t){return e?e+t:t}function SC(e){return{id:"general",label:"General",entries:[...pC({element:e}),...YS({element:e}),...hC({element:e}),...VS({element:e})],component:Yb}}function CC(e){const t={label:"Compensation",id:"compensation",component:Yb,entries:[...mS({element:e})]};return t.entries.length?t:null}function RC(e){return{id:"documentation",label:"Documentation",entries:[...wS({element:e})],component:Yb}}function PC(e){const t={id:"error",label:"Error",component:Yb,entries:[...zS({element:e})]};return t.entries.length?t:null}function MC(e){const t={id:"message",label:"Message",component:Yb,entries:[...eC({element:e})]};return t.entries.length?t:null}function TC(e){const t={id:"signal",label:"Signal",component:Yb,entries:[...vC({element:e})]};return t.entries.length?t:null}function AC(e){const t={label:"Link",id:"link",component:Yb,entries:[...ZS({element:e})]};return t.entries.length?t:null}function kC(e){const t={id:"escalation",label:"Escalation",component:Yb,entries:[...IS({element:e})]};return t.entries.length?t:null}function OC(e){const t={label:"Timer",id:"timer",component:Yb,entries:[...bC({element:e})]};return t.entries.length?t:null}function DC(e){const t={label:"Multi-instance",id:"multiInstance",component:Yb,entries:[...iC({element:e})]};return t.entries.length?t:null}class zC{constructor(e){e.registerProvider(this)}getGroups(e){return t=>t=t.concat(function(e){return[SC(e),RC(e),CC(e),PC(e),AC(e),MC(e),DC(e),TC(e),kC(e),OC(e)].filter((e=>null!==e))}(e))}}zC.$inject=["propertiesPanel"];var NC,BC={__init__:["bpmnPropertiesProvider"],bpmnPropertiesProvider:["type",zC]},LC={};function jC(e,t,n){if(3===e.nodeType){var i="textContent"in e?e.textContent:e.nodeValue||"";if(!1!==jC.options.trim){var r=0===t||t===n.length-1;if((!(i=i.match(/^[\s\n]+$/g)&&"all"!==jC.options.trim?" ":i.replace(/(^[\s\n]+|[\s\n]+$)/g,"all"===jC.options.trim||r?"":" "))||" "===i)&&n.length>1&&r)return null}return i}if(1!==e.nodeType)return null;var o=String(e.nodeName).toLowerCase();if("script"===o&&!jC.options.allowScripts)return null;var a,s,c=jC.h(o,function(e){var t=e&&e.length;if(!t)return null;for(var n={},i=0;i<t;i++){var r=e[i],o=r.name,a=r.value;"on"===o.substring(0,2)&&jC.options.allowEvents&&(a=new Function(a)),n[o]=a}return n}(e.attributes),(s=(a=e.childNodes)&&Array.prototype.map.call(a,jC).filter($C))&&s.length?s:null);return jC.visitor&&jC.visitor(c),c}var IC,$C=function(e){return e},FC={};function HC(e){var t=(e.type||"").toLowerCase(),n=HC.map;n&&n.hasOwnProperty(t)?(e.type=n[t],e.props=Object.keys(e.props||{}).reduce((function(t,n){var i;return t[(i=n,i.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=e.props[n],t}),{})):e.type=t.replace(/[^a-z0-9-]/i,"")}function VC(e={}){this._injectOriginModule(e),Bg.call(this,e)}return function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.setReviver=function(e){IC=e},t.prototype.shouldComponentUpdate=function(e){var t=this.props;return e.wrap!==t.wrap||e.type!==t.type||e.markup!==t.markup},t.prototype.setComponents=function(e){if(this.map={},e)for(var t in e)if(e.hasOwnProperty(t)){var n=t.replace(/([A-Z]+)([A-Z][a-z0-9])|([a-z0-9]+)([A-Z])/g,"$1$3-$2$4").toLowerCase();this.map[n]=e[t]}},t.prototype.render=function(e){var t=e.wrap;void 0===t&&(t=!0);var n,i=e.type,r=e.markup,o=e.components,a=e.reviver,s=e.onError,c=e["allow-scripts"],l=e["allow-events"],p=e.trim,u=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===t.indexOf(i)&&(n[i]=e[i]);return n}(e,["wrap","type","markup","components","reviver","onError","allow-scripts","allow-events","trim"]),h=a||this.reviver||this.constructor.prototype.reviver||IC||fy;this.setComponents(o);var d={allowScripts:c,allowEvents:l,trim:p};try{n=function(e,t,n,i,r){var o=function(e,t){var n,i,r,o,a="html"===t?"text/html":"application/xml";"html"===t?(o="body",r="<!DOCTYPE html>\n<html><body>"+e+"</body></html>"):(o="xml",r='<?xml version="1.0" encoding="UTF-8"?>\n<xml>'+e+"</xml>");try{n=(new DOMParser).parseFromString(r,a)}catch(e){i=e}if(n||"html"!==t||((n=NC||(NC=function(){if(document.implementation&&document.implementation.createHTMLDocument)return document.implementation.createHTMLDocument("");var e=document.createElement("iframe");return e.style.cssText="position:absolute; left:0; top:-999em; width:1px; height:1px; overflow:hidden;",e.setAttribute("sandbox","allow-forms"),document.body.appendChild(e),e.contentWindow.document}())).open(),n.write(r),n.close()),n){var s=n.getElementsByTagName(o)[0],c=s.firstChild;return e&&!c&&(s.error="Document parse failed."),c&&"parsererror"===String(c.nodeName).toLowerCase()&&(c.removeChild(c.firstChild),c.removeChild(c.lastChild),s.error=c.textContent||c.nodeValue||i||"Unknown error",s.removeChild(c)),s}}(e,t);if(o&&o.error)throw new Error(o.error);var a=o&&o.body||o;HC.map=i||FC;var s=a&&function(e,t,n,i){return jC.visitor=t,jC.h=n,jC.options=i||LC,jC(e)}(a,HC,n,r);return HC.map=null,s&&s.props&&s.props.children||null}(r,i,h,this.map,d)}catch(e){s?s({error:e}):"undefined"!=typeof console&&console.error&&console.error("preact-markup: "+e)}if(!1===t)return n||null;var m=u.hasOwnProperty("className")?"className":"class",f=u[m];return f?f.splice?f.splice(0,0,"markup"):"string"==typeof f?u[m]+=" markup":"object"==typeof f&&(f.markup=!0):u[m]="markup",h("div",u,n||null)}}(yy),document.createElement("form"),n(VC,Bg),VC.prototype._injectOriginModule=function(e){this._modules=[].concat(this._modules,e&&e.disableAdjustOrigin?Jg:ny)},VC.prototype._extensionModules=[Xg,ly,JE,BC],VC.prototype._modules=[].concat(Bg.prototype._modules,VC.prototype._extensionModules),VC}));