/plugin/subconfhelper/ |
H A D | admin.php | 63 $_config = &plugin_load( 'helper', 'subconfhelper_config' ); 64 $_config->configuration( $this->meta, array( $file )); 66 while (list($key) = each($_config->setting)) { 68 if ($_config->setting[$key]->update($input)) { 71 if ($_config->setting[$key]->error()) $_error = true; 73 if( $_changed && !$_error && $_config->save_settings( $vhost )) { 137 $_config = &plugin_load( 'helper', 'subconfhelper_config'); 139 $_config->configuration( $meta, array( $file )); 141 if ($_config->locked) 152 foreach( $_config->setting as $setting ) {
|
/plugin/combo/resources/library/bootstrap/5.0.1/ |
H A D | bootstrap.min.js | 6 !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(s){if("default"!==s){var i=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:function(){return t[s]}})}})),e.default=t,Object.freeze(e)}var s=e(t);const i={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const s=[];let i=t.parentNode;for(;i&&i.nodeType===Node.ELEMENT_NODE&&3!==i.nodeType;)i.matches(e)&&s.push(i),i=i.parentNode;return s},prev(t,e){let s=t.previousElementSibling;for(;s;){if(s.matches(e))return[s];s=s.previousElementSibling}return[]},next(t,e){let s=t.nextElementSibling;for(;s;){if(s.matches(e))return[s];s=s.nextElementSibling}return[]}},n=t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t},o=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let s=t.getAttribute("href");if(!s||!s.includes("#")&&!s.startsWith("."))return null;s.includes("#")&&!s.startsWith("#")&&(s="#"+s.split("#")[1]),e=s&&"#"!==s?s.trim():null}return e},r=t=>{const e=o(t);return e&&document.querySelector(e)?e:null},a=t=>{const e=o(t);return e?document.querySelector(e):null},l=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:s}=window.getComputedStyle(t);const i=Number.parseFloat(e),n=Number.parseFloat(s);return i||n?(e=e.split(",")[0],s=s.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(s))):0},c=t=>{t.dispatchEvent(new Event("transitionend"))},h=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),d=t=>h(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?i.findOne(t):null,u=(t,e)=>{let s=!1;const i=e+5;t.addEventListener("transitionend",(function e(){s=!0,t.removeEventListener("transitionend",e)})),setTimeout(()=>{s||c(t)},i)},g=(t,e,s)=>{Object.keys(s).forEach(i=>{const n=s[i],o=e[i],r=o&&h(o)?"element":null==(a=o)?""+a:{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase();var a;if(!new RegExp(n).test(r))throw new TypeError(`${t.toUpperCase()}: Option "${i}" provided type "${r}" but expected type "${n}".`)})},f=t=>{if(!t)return!1;if(t.style&&t.parentNode&&t.parentNode.style){const e=getComputedStyle(t),s=getComputedStyle(t.parentNode);return"none"!==e.display&&"none"!==s.display&&"hidden"!==e.visibility}return!1},p=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),m=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?m(t.parentNode):null},_=()=>{},b=t=>t.offsetHeight,v=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},y=()=>"rtl"===document.documentElement.dir,w=t=>{var e;e=()=>{const e=v();if(e){const s=t.NAME,i=e.fn[s];e.fn[s]=t.jQueryInterface,e.fn[s].Constructor=t,e.fn[s].noConflict=()=>(e.fn[s]=i,t.jQueryInterface)}},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()},E=t=>{"function"==typeof t&&t()},T=new Map;var A={set(t,e,s){T.has(t)||T.set(t,new Map);const i=T.get(t);i.has(e)||0===i.size?i.set(e,s):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(t,e)=>T.has(t)&&T.get(t).get(e)||null,remove(t,e){if(!T.has(t))return;const s=T.get(t);s.delete(e),0===s.size&&T.delete(t)}};const k=/[^.]*(?=\..*)\.|.*/,L=/\..*/,C=/::\d+$/,D={};let N=1;const S={mouseenter:"mouseover",mouseleave:"mouseout"},O=/^(mouseenter|mouseleave)/i,I=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function x(t,e){return e&&`${e}::${N++}`||t.uidEvent||N++}function j(t){const e=x(t);return t.uidEvent=e,D[e]=D[e]||{},D[e]}function P(t,e,s=null){const i=Object.keys(t);for(let n=0,o=i.length;n<o;n++){const o=t[i[n]];if(o.originalHandler===e&&o.delegationSelector===s)return o}return null}function M(t,e,s){const i="string"==typeof e,n=i?s:e;let o=B(t);return I.has(o)||(o=t),[i,n,o]}function H(t,e,s,i,n){if("string"!=typeof e||!t)return;if(s||(s=i,i=null),O.test(e)){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};i?i=t(i):s=t(s)}const[o,r,a]=M(e,s,i),l=j(t),c=l[a]||(l[a]={}),h=P(c,r,o?s:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=x(r,e.replace(k,"")),u=o?function(t,e,s){return function i(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(let a=o.length;a--;)if(o[a]===r)return n.delegateTarget=r,i.oneOff&&$.off(t,n.type,e,s),s.apply(r,[n]);return null}}(t,s,i):function(t,e){return function s(i){return i.delegateTarget=t,s.oneOff&&$.off(t,i.type,e),e.apply(t,[i])}}(t,s);u.delegationSelector=o?s:null,u.originalHandler=r,u.oneOff=n,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function R(t,e,s,i,n){const o=P(e[s],i,n);o&&(t.removeEventListener(s,o,Boolean(n)),delete e[s][o.uidEvent])}function B(t){return t=t.replace(L,""),S[t]||t}const $={on(t,e,s,i){H(t,e,s,i,!1)},one(t,e,s,i){H(t,e,s,i,!0)},off(t,e,s,i){if("string"!=typeof e||!t)return;const[n,o,r]=M(e,s,i),a=r!==e,l=j(t),c=e.startsWith(".");if(void 0!==o){if(!l||!l[r])return;return void R(t,l,r,o,n?s:null)}c&&Object.keys(l).forEach(s=>{!function(t,e,s,i){const n=e[s]||{};Object.keys(n).forEach(o=>{if(o.includes(i)){const i=n[o];R(t,e,s,i.originalHandler,i.delegationSelector)}})}(t,l,s,e.slice(1))});const h=l[r]||{};Object.keys(h).forEach(s=>{const i=s.replace(C,"");if(!a||e.includes(i)){const e=h[s];R(t,l,r,e.originalHandler,e.delegationSelector)}})},trigger(t,e,s){if("string"!=typeof e||!t)return null;const i=v(),n=B(e),o=e!==n,r=I.has(n);let a,l=!0,c=!0,h=!1,d=null;return o&&i&&(a=i.Event(e,s),i(t).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),h=a.isDefaultPrevented()),r?(d=document.createEvent("HTMLEvents"),d.initEvent(n,l,!0)):d=new CustomEvent(e,{bubbles:l,cancelable:!0}),void 0!==s&&Object.keys(s).forEach(t=>{Object.defineProperty(d,t,{get:()=>s[t]})}),h&&d.preventDefault(),c&&t.dispatchEvent(d),d.defaultPrevented&&void 0!==a&&a.preventDefault(),d}};class z{constructor(t){(t=d(t))&&(this._element=t,A.set(this._element,this.constructor.DATA_KEY,this))}dispose(){A.remove(this._element,this.constructor.DATA_KEY),$.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(t=>{this[t]=null})}_queueCallback(t,e,s=!0){if(!s)return void E(t);const i=l(e);$.one(e,"transitionend",()=>E(t)),u(e,i)}static getInstance(t){return A.get(t,this.DATA_KEY)}static get VERSION(){return"5.0.1"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return"bs."+this.NAME}static get EVENT_KEY(){return"."+this.DATA_KEY}}class U extends z{static get NAME(){return"alert"}close(t){const e=t?this._getRootElement(t):this._element,s=this._triggerCloseEvent(e);null===s||s.defaultPrevented||this._removeElement(e)}_getRootElement(t){return a(t)||t.closest(".alert")}_triggerCloseEvent(t){return $.trigger(t,"close.bs.alert")}_removeElement(t){t.classList.remove("show");const e=t.classList.contains("fade");this._queueCallback(()=>this._destroyElement(t),t,e)}_destroyElement(t){t.parentNode&&t.parentNode.removeChild(t),$.trigger(t,"closed.bs.alert")}static jQueryInterface(t){return this.each((function(){let e=A.get(this,"bs.alert");e||(e=new U(this)),"close"===t&&e[t](this)}))}static handleDismiss(t){return function(e){e&&e.preventDefault(),t.close(this)}}}$.on(document,"click.bs.alert.data-api",'[data-bs-dismiss="alert"]',U.handleDismiss(new U)),w(U);class q extends z{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){let e=A.get(this,"bs.button");e||(e=new q(this)),"toggle"===t&&e[t]()}))}}function F(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function W(t){return t.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}$.on(document,"click.bs.button.data-api",'[data-bs-toggle="button"]',t=>{t.preventDefault();const e=t.target.closest('[data-bs-toggle="button"]');let s=A.get(e,"bs.button");s||(s=new q(e)),s.toggle()}),w(q);const K={setDataAttribute(t,e,s){t.setAttribute("data-bs-"+W(e),s)},removeDataAttribute(t,e){t.removeAttribute("data-bs-"+W(e))},getDataAttributes(t){if(!t)return{};const e={};return Object.keys(t.dataset).filter(t=>t.startsWith("bs")).forEach(s=>{let i=s.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=F(t.dataset[s])}),e},getDataAttribute:(t,e)=>F(t.getAttribute("data-bs-"+W(e))),offset(t){const e=t.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},position:t=>({top:t.offsetTop,left:t.offsetLeft})},V={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},Q={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},X="next",Y="prev",G="left",Z="right";class J extends z{constructor(t,e){super(t),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._indicatorsElement=i.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return V}static get NAME(){return"carousel"}next(){this._isSliding||this._slide(X)}nextWhenVisible(){!document.hidden&&f(this._element)&&this.next()}prev(){this._isSliding||this._slide(Y)}pause(t){t||(this._isPaused=!0),i.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(c(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=i.findOne(".active.carousel-item",this._element);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding)return void $.one(this._element,"slid.bs.carousel",()=>this.to(t));if(e===t)return this.pause(),void this.cycle();const s=t>e?X:Y;this._slide(s,this._items[t])}_getConfig(t){return t={...V,...t},g("carousel",t,Q),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=40)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e&&this._slide(e>0?Z:G)}_addEventListeners(){this._config.keyboard&&$.on(this._element,"keydown.bs.carousel",t=>this._keydown(t)),"hover"===this._config.pause&&($.on(this._element,"mouseenter.bs.carousel",t=>this.pause(t)),$.on(this._element,"mouseleave.bs.carousel",t=>this.cycle(t))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const t=t=>{!this._pointerEvent||"pen"!==t.pointerType&&"touch"!==t.pointerType?this._pointerEvent||(this.touchStartX=t.touches[0].clientX):this.touchStartX=t.clientX},e=t=>{this.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this.touchStartX},s=t=>{!this._pointerEvent||"pen"!==t.pointerType&&"touch"!==t.pointerType||(this.touchDeltaX=t.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(t=>this.cycle(t),500+this._config.interval))};i.find(".carousel-item img",this._element).forEach(t=>{$.on(t,"dragstart.bs.carousel",t=>t.preventDefault())}),this._pointerEvent?($.on(this._element,"pointerdown.bs.carousel",e=>t(e)),$.on(this._element,"pointerup.bs.carousel",t=>s(t)),this._element.classList.add("pointer-event")):($.on(this._element,"touchstart.bs.carousel",e=>t(e)),$.on(this._element,"touchmove.bs.carousel",t=>e(t)),$.on(this._element,"touchend.bs.carousel",t=>s(t)))}_keydown(t){/input|textarea/i.test(t.target.tagName)||("ArrowLeft"===t.key?(t.preventDefault(),this._slide(Z)):"ArrowRight"===t.key&&(t.preventDefault(),this._slide(G)))}_getItemIndex(t){return this._items=t&&t.parentNode?i.find(".carousel-item",t.parentNode):[],this._items.indexOf(t)}_getItemByOrder(t,e){const s=t===X,i=t===Y,n=this._getItemIndex(e),o=this._items.length-1;if((i&&0===n||s&&n===o)&&!this._config [all...] |
H A D | bootstrap.min.js.map | 1 {"version":3,"sources":["../../js/src/dom/selector-engine.js","../../js/src/util/index.js","../../js/src/dom/data.js","../../js/src/dom/event-handler.js","../../js/src/base-component.js","../../js/src/alert.js","../../js/src/button.js","../../js/src/dom/manipulator.js","../../js/src/carousel.js","../../js/src/collapse.js","../../js/src/dropdown.js","../../js/src/util/scrollbar.js","../../js/src/util/backdrop.js","../../js/src/modal.js","../../js/src/offcanvas.js","../../js/src/util/sanitizer.js","../../js/src/tooltip.js","../../js/src/popover.js","../../js/src/scrollspy.js","../../js/src/tab.js","../../js/src/toast.js","../../js/index.umd.js"],"names":["SelectorEngine","find","selector","element","document","documentElement","concat","Element","prototype","querySelectorAll","call","findOne","querySelector","children","filter","child","matches","parents","ancestor","parentNode","nodeType","Node","ELEMENT_NODE","push","prev","previous","previousElementSibling","next","nextElementSibling","getUID","prefix","Math","floor","random","getElementById","getSelector","getAttribute","hrefAttr","includes","startsWith","split","trim","getSelectorFromElement","getElementFromSelector","getTransitionDurationFromElement","transitionDuration","transitionDelay","window","getComputedStyle","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","triggerTransitionEnd","dispatchEvent","Event","isElement","obj","jquery","getElement","length","emulateTransitionEnd","duration","called","emulatedDuration","addEventListener","listener","removeEventListener","setTimeout","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","toString","match","toLowerCase","RegExp","test","TypeError","toUpperCase","isVisible","style","elementStyle","parentNodeStyle","display","visibility","isDisabled","classList","contains","disabled","hasAttribute","findShadowRoot","attachShadow","getRootNode","root","ShadowRoot","noop","reflow","offsetHeight","getjQuery","jQuery","body","isRTL","dir","defineJQueryPlugin","plugin","callback","$","name","NAME","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","readyState","execute","elementMap","Map","Data","set","key","instance","has","instanceMap","get","size","console","error","Array","from","remove","delete","namespaceRegex","stripNameRegex","stripUidRegex","eventRegistry","uidEvent","customEvents","mouseenter","mouseleave","customEventsRegex","nativeEvents","Set","getUidEvent","uid","getEvent","findHandler","events","handler","delegationSelector","uidEventList","i","len","event","originalHandler","normalizeParams","originalTypeEvent","delegationFn","delegation","typeEvent","getTypeEvent","addHandler","oneOff","wrapFn","relatedTarget","delegateTarget","this","handlers","previousFn","replace","domElements","target","EventHandler","off","type","apply","bootstrapDelegationHandler","bootstrapHandler","removeHandler","Boolean","on","one","inNamespace","isNamespace","elementEvent","namespace","storeElementEvent","handlerKey","removeNamespacedHandlers","slice","keyHandlers","trigger","args","isNative","jQueryEvent","bubbles","nativeDispatch","defaultPrevented","evt","isPropagationStopped","isImmediatePropagationStopped","isDefaultPrevented","createEvent","initEvent","CustomEvent","cancelable","defineProperty","preventDefault","BaseComponent","constructor","_element","DATA_KEY","dispose","EVENT_KEY","getOwnPropertyNames","propertyName","_queueCallback","isAnimated","[object Object]","VERSION","Error","Alert","close","rootElement","_getRootElement","customEvent","_triggerCloseEvent","_removeElement","closest","_destroyElement","removeChild","each","data","alertInstance","handleDismiss","Button","toggle","setAttribute","normalizeData","val","normalizeDataKey","chr","button","Manipulator","setDataAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","dataset","pureKey","charAt","getDataAttribute","offset","rect","getBoundingClientRect","top","scrollTop","left","scrollLeft","position","offsetTop","offsetLeft","Default","interval","keyboard","slide","pause","wrap","touch","DefaultType","ORDER_NEXT","ORDER_PREV","DIRECTION_LEFT","DIRECTION_RIGHT","Carousel","super","_items","_interval","_activeElement","_isPaused","_isSliding","touchTimeout","touchStartX","touchDeltaX","_config","_getConfig","_indicatorsElement","_touchSupported","navigator","maxTouchPoints","_pointerEvent","PointerEvent","_addEventListeners","_slide","nextWhenVisible","hidden","cycle","clearInterval","_updateInterval","setInterval","visibilityState","bind","to","index","activeIndex","_getItemIndex","order","_handleSwipe","absDeltax","abs","direction","_keydown","_addTouchEventListeners","start","pointerType","touches","clientX","move","end","clearTimeout","itemImg","e","add","tagName","indexOf","_getItemByOrder","activeElement","isNext","isPrev","lastItemIndex","itemIndex","_triggerSlideEvent","eventDirectionName","targetIndex","fromIndex","_setActiveIndicatorElement","activeIndicator","indicators","parseInt","elementInterval","defaultInterval","directionOrOrder","_directionToOrder","activeElementIndex","nextElement","nextElementIndex","isCycling","directionalClassName","orderClassName","_orderToDirection","triggerSlidEvent","completeCallBack","action","ride","carouselInterface","slideIndex","dataApiClickHandler","carousels","parent","Collapse","_isTransitioning","_triggerArray","id","toggleList","elem","filterElement","foundElem","_selector","_parent","_getParent","_addAriaAndCollapsedClass","hide","show","actives","activesData","container","tempActiveData","elemActive","collapseInterface","dimension","_getDimension","setTransitioning","scrollSize","triggerArrayLength","isTransitioning","selected","triggerArray","isOpen","triggerData","REGEXP_KEYDOWN","PLACEMENT_TOP","PLACEMENT_TOPEND","PLACEMENT_BOTTOM","PLACEMENT_BOTTOMEND","PLACEMENT_RIGHT","PLACEMENT_LEFT","boundary","reference","popperConfig","autoClose","Dropdown","_popper","_menu","_getMenuElement","_inNavbar","_detectNavbar","getParentFromElement","Popper","referenceElement","_getPopperConfig","isDisplayStatic","modifiers","modifier","enabled","createPopper","focus","_completeHide","destroy","update","_getPlacement","parentDropdown","isEnd","getPropertyValue","_getOffset","map","popperData","defaultBsPopperConfig","placement","options","_selectMenuItem","items","dropdownInterface","toggles","context","composedPath","isMenuTarget","clickEvent","isActive","stopPropagation","getToggleButton","clearMenus","getInstance","click","dataApiKeydownHandler","getWidth","documentWidth","clientWidth","innerWidth","width","_disableOverFlow","_setElementAttributes","calculatedValue","actualValue","overflow","styleProp","scrollbarWidth","reset","_resetElementAttributes","removeProperty","clickCallback","Backdrop","_isAppended","_append","_getElement","_emulateAnimation","backdrop","createElement","className","appendChild","backdropTransitionDuration","Modal","_dialog","_backdrop","_initializeBackDrop","_isShown","_ignoreBackdropClick","_isAnimated","showEvent","scrollBarHide","_adjustDialog","_setEscapeEvent","_setResizeEvent","_showBackdrop","_showElement","_hideModal","htmlElement","handleUpdate","modalBody","_enforceFocus","_triggerBackdropTransition","_resetAdjustments","scrollBarReset","currentTarget","isModalOverflowing","scrollHeight","clientHeight","overflowY","modalTransitionDuration","getScrollBarWidth","isBodyOverflowing","paddingLeft","paddingRight","scroll","Offcanvas","_enforceFocusOnElement","blur","undefined","allReadyOpen","el","uriAttrs","SAFE_URL_PATTERN","DATA_URL_PATTERN","allowedAttribute","attr","allowedAttributeList","attrName","nodeName","nodeValue","regExp","attrRegex","sanitizeHtml","unsafeHtml","allowList","sanitizeFn","createdDocument","DOMParser","parseFromString","allowlistKeys","elements","elName","attributeList","allowedAttributes","innerHTML","BSCLS_PREFIX_REGEX","DISALLOWED_ATTRIBUTES","animation","template","title","delay","html","fallbackPlacements","customClass","sanitize","AttachmentMap","AUTO","TOP","RIGHT","BOTTOM","LEFT","*","a","area","b","br","col","code","div","em","hr","h1","h2","h3","h4","h5","h6","img","li","ol","p","pre","s","small","span","sub","sup","strong","u","ul","HIDE","HIDDEN","SHOW","SHOWN","INSERTED","CLICK","FOCUSIN","FOCUSOUT","MOUSEENTER","MOUSELEAVE","Tooltip","_isEnabled","_timeout","_hoverState","_activeTrigger","tip","_setListeners","enable","disable","toggleEnabled","_initializeOnDelegatedTarget","_isWithActiveTrigger","_enter","_leave","getTipElement","_hideModalHandler","isWithContent","shadowRoot","isInTheDom","ownerDocument","tipId","setContent","attachment","_getAttachment","_addAttachmentClass","prevHoverState","_cleanTipClass","getTitle","setElementContent","content","textContent","updateAttachment","dataKey","_getDelegateConfig","phase","_handlePopperPlacementChange","onFirstUpdate","eventIn","eventOut","_fixTitle","originalTitleType","dataAttributes","dataAttr","tabClass","token","tClass","state","popper","Popover","_getContent","method","ScrollSpy","_scrollElement","_offsets","_targets","_activeTarget","_scrollHeight","_process","refresh","autoMethod","offsetMethod","offsetBase","_getScrollTop","_getScrollHeight","targetSelector","targetBCR","height","item","sort","pageYOffset","max","_getOffsetHeight","innerHeight","maxScroll","_activate","_clear","queries","link","join","listGroup","navItem","node","spy","Tab","listElement","itemSelector","hideEvent","complete","active","_transitionComplete","dropdownChild","dropdownElement","dropdown","autohide","Toast","_hasMouseInteraction","_hasKeyboardInteraction","_clearTimeout","_maybeScheduleHide","_onInteraction","isInteracting"],"mappings":";;;;;ykBAaA,MAEMA,EAAiB,CACrBC,KAAI,CAACC,EAAUC,EAAUC,SAASC,kBACzB,GAAGC,UAAUC,QAAQC,UAAUC,iBAAiBC,KAAKP,EAASD,IAGvES,QAAO,CAACT,EAAUC,EAAUC,SAASC,kBAC5BE,QAAQC,UAAUI,cAAcF,KAAKP,EAASD,GAGvDW,SAAQ,CAACV,EAASD,IACT,GAAGI,UAAUH,EAAQU,UACzBC,OAAOC,GAASA,EAAMC,QAAQd,IAGnCe,QAAQd,EAASD,GACf,MAAMe,EAAU,GAEhB,IAAIC,EAAWf,EAAQgB,WAEvB,KAAOD,GAAYA,EAASE,WAAaC,KAAKC,cArBhC,IAqBgDJ,EAASE,UACjEF,EAASF,QAAQd,IACnBe,EAAQM,KAAKL,GAGfA,EAAWA,EAASC,WAGtB,OAAOF,GAGTO,KAAKrB,EAASD,GACZ,IAAIuB,EAAWtB,EAAQuB,uBAEvB,KAAOD,GAAU,CACf,GAAIA,EAAST,QAAQd,GACnB,MAAO,CAACuB,GAGVA,EAAWA,EAASC,uBAGtB,MAAO,IAGTC,KAAKxB,EAASD,GACZ,IAAIyB,EAAOxB,EAAQyB,mBAEnB,KAAOD,GAAM,CACX,GAAIA,EAAKX,QAAQd,GACf,MAAO,CAACyB,GAGVA,EAAOA,EAAKC,mBAGd,MAAO,KC1CLC,EAASC,IACb,G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WACH3gB,KAAKugB,wBAA0BI,EAMnC,GAAIA,EAEF,YADA3gB,KAAKwgB,gBAIP,MAAMrV,EAAchM,EAAMW,cACtBE,KAAK4C,WAAauI,GAAenL,KAAK4C,SAAS3H,SAASkQ,IAI5DnL,KAAKygB,qBAGP5F,gBACEva,EAAaQ,GAAGd,KAAK4C,SAjLI,yBA2BC,4BAsJiD,IAAM5C,KAAK8M,QACtFxM,EAAaQ,GAAGd,KAAK4C,SAjLA,qBAiL2BzD,GAASa,KAAK0gB,eAAevhB,GAAO,IACpFmB,EAAaQ,GAAGd,KAAK4C,SAjLD,oBAiL2BzD,GAASa,KAAK0gB,eAAevhB,GAAO,IACnFmB,EAAaQ,GAAGd,KAAK4C,SAjLF,mBAiL2BzD,GAASa,KAAK0gB,eAAevhB,GAAO,IAClFmB,EAAaQ,GAAGd,KAAK4C,SAjLD,oBAiL2BzD,GAASa,KAAK0gB,eAAevhB,GAAO,IAGrFqhB,gBACE9W,aAAa1J,KAAKya,UAClBza,KAAKya,SAAW,KAKIrX,uBAAC3J,GACrB,OAAOuG,KAAKiE,MAAK,WACf,IAAIC,EAAOlH,EAAKM,IAAI0C,KApMT,YA2MX,GAJKkE,IACHA,EAAO,IAAImc,GAAMrgB,KAHe,iBAAXvG,GAAuBA,IAMxB,iBAAXA,EAAqB,CAC9B,QAA4B,IAAjByK,EAAKzK,GACd,MAAM,IAAIc,UAAW,oBAAmBd,MAG1CyK,EAAKzK,GAAQuG,kBAarB/D,EAAmBokB,ICjOJ,CACb9c,MAAAA,EACAc,OAAAA,EACAwC,SAAAA,EACAqF,SAAAA,GACAyC,SAAAA,GACAsE,MAAAA,GACAiC,UAAAA,GACAqI,QAAAA,GACAG,UAAAA,GACAgC,IAAAA,GACAW,MAAAA,GACA9F,QAAAA","sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NODE_TEXT = 3\n\nconst SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector))\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector)\n },\n\n children(element, selector) {\n return [].concat(...element.children)\n .filter(child => child.matches(selector))\n },\n\n parents(element, selector) {\n const parents = []\n\n let ancestor = element.parentNode\n\n while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {\n if (ancestor.matches(selector)) {\n parents.push(ancestor)\n }\n\n ancestor = ancestor.parentNode\n }\n\n return parents\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous]\n }\n\n previous = previous.previousElementSibling\n }\n\n return []\n },\n\n next(element, selector) {\n let next = element.nextElementSibling\n\n while (next) {\n if (next.matches(selector)) {\n return [next]\n }\n\n next = next.nextElementSibling\n }\n\n return []\n }\n}\n\nexport default SelectorEngine\n","import SelectorEngine from '../dom/selector-engine'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = `#${hrefAttr.split('#')[1]}`\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => {\n if (!obj || typeof obj !== 'object') {\n return false\n }\n\n if (typeof obj.jquery !== 'undefined') {\n obj = obj[0]\n }\n\n return typeof obj.nodeType !== 'undefined'\n}\n\nconst getElement = obj => {\n if (isElement(obj)) { // it's a jQuery object or a node element\n return obj.jquery ? obj[0] : obj\n }\n\n if (typeof obj === 'string' && obj.length > 0) {\n return SelectorEngine.findOne(obj)\n }\n\n return null\n}\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nconst execute = callback => {\n if (typeof callback === 'function') {\n callback()\n }\n}\n\nexport {\n getElement,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n isDisabled,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin,\n execute\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst elementMap = new Map()\n\nexport default {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)\n\n // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n return\n }\n\n instanceMap.set(key, instance)\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null\n }\n\n return null\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return\n }\n\n const instanceMap = elementMap.get(element)\n\n instanceMap.delete(key)\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element)\n }\n }\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { getjQuery } from '../util/index'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/\nconst stripNameRegex = /\\..*/\nconst stripUidRegex = /::\\d+$/\nconst eventRegistry = {} // Events storage\nlet uidEvent = 1\nconst customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n}\nconst customEventsRegex = /^(mouseenter|mouseleave)/i\nconst nativeEvents = new Set([\n 'click',\n 'dblclick',\n 'mouseup',\n 'mousedown',\n 'contextmenu',\n 'mousewheel',\n 'DOMMouseScroll',\n 'mouseover',\n 'mouseout',\n 'mousemove',\n 'selectstart',\n 'selectend',\n 'keydown',\n 'keypress',\n 'keyup',\n 'orientationchange',\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'touchcancel',\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointerleave',\n 'pointercancel',\n 'gesturestart',\n 'gesturechange',\n 'gestureend',\n 'focus',\n 'blur',\n 'change',\n 'reset',\n 'select',\n 'submit',\n 'focusin',\n 'focusout',\n 'load',\n 'unload',\n 'beforeunload',\n 'resize',\n 'move',\n 'DOMContentLoaded',\n 'readystatechange',\n 'error',\n 'abort',\n 'scroll'\n])\n\n/**\n * ------------------------------------------------------------------------\n * Private methods\n * ------------------------------------------------------------------------\n */\n\nfunction getUidEvent(element, uid) {\n return (uid && `${uid}::${uidEvent++}`) || element.uidEvent || uidEvent++\n}\n\nfunction getEvent(element) {\n const uid = getUidEvent(element)\n\n element.uidEvent = uid\n eventRegistry[uid] = eventRegistry[uid] || {}\n\n return eventRegistry[uid]\n}\n\nfunction bootstrapHandler(element, fn) {\n return function handler(event) {\n event.delegateTarget = element\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn)\n }\n\n return fn.apply(element, [event])\n }\n}\n\nfunction bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector)\n\n for (let { target } = event; target && target !== this; target = target.parentNode) {\n for (let i = domElements.length; i--;) {\n if (domElements[i] === target) {\n event.delegateTarget = target\n\n if (handler.oneOff) {\n // eslint-disable-next-line unicorn/consistent-destructuring\n EventHandler.off(element, event.type, selector, fn)\n }\n\n return fn.apply(target, [event])\n }\n }\n }\n\n // To please ESLint\n return null\n }\n}\n\nfunction findHandler(events, handler, delegationSelector = null) {\n const uidEventList = Object.keys(events)\n\n for (let i = 0, len = uidEventList.length; i < len; i++) {\n const event = events[uidEventList[i]]\n\n if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {\n return event\n }\n }\n\n return null\n}\n\nfunction normalizeParams(originalTypeEvent, handler, delegationFn) {\n const delegation = typeof handler === 'string'\n const originalHandler = delegation ? delegationFn : handler\n\n let typeEvent = getTypeEvent(originalTypeEvent)\n const isNative = nativeEvents.has(typeEvent)\n\n if (!isNative) {\n typeEvent = originalTypeEvent\n }\n\n return [delegation, originalHandler, typeEvent]\n}\n\nfunction addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n if (!handler) {\n handler = delegationFn\n delegationFn = null\n }\n\n // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position\n // this prevents the handler from being dispatched the same way as mouseover or mouseout does\n if (customEventsRegex.test(originalTypeEvent)) {\n const wrapFn = fn => {\n return function (event) {\n if (!event.relatedTarget || (event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget))) {\n return fn.call(this, event)\n }\n }\n }\n\n if (delegationFn) {\n delegationFn = wrapFn(delegationFn)\n } else {\n handler = wrapFn(handler)\n }\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn)\n const events = getEvent(element)\n const handlers = events[typeEvent] || (events[typeEvent] = {})\n const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null)\n\n if (previousFn) {\n previousFn.oneOff = previousFn.oneOff && oneOff\n\n return\n }\n\n const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''))\n const fn = delegation ?\n bootstrapDelegationHandler(element, handler, delegationFn) :\n bootstrapHandler(element, handler)\n\n fn.delegationSelector = delegation ? handler : null\n fn.originalHandler = originalHandler\n fn.oneOff = oneOff\n fn.uidEvent = uid\n handlers[uid] = fn\n\n element.addEventListener(typeEvent, fn, delegation)\n}\n\nfunction removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector)\n\n if (!fn) {\n return\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector))\n delete events[typeEvent][fn.uidEvent]\n}\n\nfunction removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {}\n\n Object.keys(storeElementEvent).forEach(handlerKey => {\n if (handlerKey.includes(namespace)) {\n const event = storeElementEvent[handlerKey]\n\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector)\n }\n })\n}\n\nfunction getTypeEvent(event) {\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n event = event.replace(stripNameRegex, '')\n return customEvents[event] || event\n}\n\nconst EventHandler = {\n on(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, false)\n },\n\n one(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, true)\n },\n\n off(element, originalTypeEvent, handler, delegationFn) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn)\n const inNamespace = typeEvent !== originalTypeEvent\n const events = getEvent(element)\n const isNamespace = originalTypeEvent.startsWith('.')\n\n if (typeof originalHandler !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!events || !events[typeEvent]) {\n return\n }\n\n removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null)\n return\n }\n\n if (isNamespace) {\n Object.keys(events).forEach(elementEvent => {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1))\n })\n }\n\n const storeElementEvent = events[typeEvent] || {}\n Object.keys(storeElementEvent).forEach(keyHandlers => {\n const handlerKey = keyHandlers.replace(stripUidRegex, '')\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n const event = storeElementEvent[keyHandlers]\n\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector)\n }\n })\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null\n }\n\n const $ = getjQuery()\n const typeEvent = getTypeEvent(event)\n const inNamespace = event !== typeEvent\n const isNative = nativeEvents.has(typeEvent)\n\n let jQueryEvent\n let bubbles = true\n let nativeDispatch = true\n let defaultPrevented = false\n let evt = null\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args)\n\n $(element).trigger(jQueryEvent)\n bubbles = !jQueryEvent.isPropagationStopped()\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped()\n defaultPrevented = jQueryEvent.isDefaultPrevented()\n }\n\n if (isNative) {\n evt = document.createEvent('HTMLEvents')\n evt.initEvent(typeEvent, bubbles, true)\n } else {\n evt = new CustomEvent(event, {\n bubbles,\n cancelable: true\n })\n }\n\n // merge custom information in our event\n if (typeof args !== 'undefined') {\n Object.keys(args).forEach(key => {\n Object.defineProperty(evt, key, {\n get() {\n return args[key]\n }\n })\n })\n }\n\n if (defaultPrevented) {\n evt.preventDefault()\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt)\n }\n\n if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {\n jQueryEvent.preventDefault()\n }\n\n return evt\n }\n}\n\nexport default EventHandler\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\nimport {\n emulateTransitionEnd,\n execute,\n getElement,\n getTransitionDurationFromElement\n} from './util/index'\nimport EventHandler from './dom/event-handler'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst VERSION = '5.0.1'\n\nclass BaseComponent {\n constructor(element) {\n element = getElement(element)\n\n if (!element) {\n return\n }\n\n this._element = element\n Data.set(this._element, this.constructor.DATA_KEY, this)\n }\n\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY)\n EventHandler.off(this._element, this.constructor.EVENT_KEY)\n\n Object.getOwnPropertyNames(this).forEach(propertyName => {\n this[propertyName] = null\n })\n }\n\n _queueCallback(callback, element, isAnimated = true) {\n if (!isAnimated) {\n execute(callback)\n return\n }\n\n const transitionDuration = getTransitionDurationFromElement(element)\n EventHandler.one(element, 'transitionend', () => execute(callback))\n\n emulateTransitionEnd(element, transitionDuration)\n }\n\n /** Static */\n\n static getInstance(element) {\n return Data.get(element, this.DATA_KEY)\n }\n\n static get VERSION() {\n return VERSION\n }\n\n static get NAME() {\n throw new Error('You have to implement the static method \"NAME\", for each component!')\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`\n }\n}\n\nexport default BaseComponent\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getElementFromSelector\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'alert'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst SELECTOR_DISMISS = '[data-bs-dismiss=\"alert\"]'\n\nconst EVENT_CLOSE = `close${EVENT_KEY}`\nconst EVENT_CLOSED = `closed${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_ALERT = 'alert'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Alert extends BaseComponent {\n // Getters\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n close(element) {\n const rootElement = element ? this._getRootElement(element) : this._element\n const customEvent = this._triggerCloseEvent(rootElement)\n\n if (customEvent === null || customEvent.defaultPrevented) {\n return\n }\n\n this._removeElement(rootElement)\n }\n\n // Private\n\n _getRootElement(element) {\n return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`)\n }\n\n _triggerCloseEvent(element) {\n return EventHandler.trigger(element, EVENT_CLOSE)\n }\n\n _removeElement(element) {\n element.classList.remove(CLASS_NAME_SHOW)\n\n const isAnimated = element.classList.contains(CLASS_NAME_FADE)\n this._queueCallback(() => this._destroyElement(element), element, isAnimated)\n }\n\n _destroyElement(element) {\n if (element.parentNode) {\n element.parentNode.removeChild(element)\n }\n\n EventHandler.trigger(element, EVENT_CLOSED)\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.get(this, DATA_KEY)\n\n if (!data) {\n data = new Alert(this)\n }\n\n if (config === 'close') {\n data[config](this)\n }\n })\n }\n\n static handleDismiss(alertInstance) {\n return function (event) {\n if (event) {\n event.preventDefault()\n }\n\n alertInstance.close(this)\n }\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()))\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Alert to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Alert)\n\nexport default Alert\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defineJQueryPlugin } from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'button'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst CLASS_NAME_ACTIVE = 'active'\n\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"button\"]'\n\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Button extends BaseComponent {\n // Getters\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE))\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.get(this, DATA_KEY)\n\n if (!data) {\n data = new Button(this)\n }\n\n if (config === 'toggle') {\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {\n event.preventDefault()\n\n const button = event.target.closest(SELECTOR_DATA_TOGGLE)\n\n let data = Data.get(button, DATA_KEY)\n if (!data) {\n data = new Button(button)\n }\n\n data.toggle()\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Button to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Button)\n\nexport default Button\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true\n }\n\n if (val === 'false') {\n return false\n }\n\n if (val === Number(val).toString()) {\n return Number(val)\n }\n\n if (val === '' || val === 'null') {\n return null\n }\n\n return val\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n\n Object.keys(element.dataset)\n .filter(key => key.startsWith('bs'))\n .forEach(key => {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n attributes[pureKey] = normalizeData(element.dataset[key])\n })\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect()\n\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n }\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n }\n }\n}\n\nexport default Manipulator\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getElementFromSelector,\n isRTL,\n isVisible,\n reflow,\n triggerTransitionEnd,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'carousel'\nconst DATA_KEY = 'bs.carousel'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst ARROW_LEFT_KEY = 'ArrowLeft'\nconst ARROW_RIGHT_KEY = 'ArrowRight'\nconst TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch\nconst SWIPE_THRESHOLD = 40\n\nconst Default = {\n interval: 5000,\n keyboard: true,\n slide: false,\n pause: 'hover',\n wrap: true,\n touch: true\n}\n\nconst DefaultType = {\n interval: '(number|boolean)',\n keyboard: 'boolean',\n slide: '(boolean|string)',\n pause: '(string|boolean)',\n wrap: 'boolean',\n touch: 'boolean'\n}\n\nconst ORDER_NEXT = 'next'\nconst ORDER_PREV = 'prev'\nconst DIRECTION_LEFT = 'left'\nconst DIRECTION_RIGHT = 'right'\n\nconst EVENT_SLIDE = `slide${EVENT_KEY}`\nconst EVENT_SLID = `slid${EVENT_KEY}`\nconst EVENT_KEYDOWN = `keydown${EVENT_KEY}`\nconst EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`\nconst EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`\nconst EVENT_TOUCHSTART = `touchstart${EVENT_KEY}`\nconst EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}`\nconst EVENT_TOUCHEND = `touchend${EVENT_KEY}`\nconst EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}`\nconst EVENT_POINTERUP = `pointerup${EVENT_KEY}`\nconst EVENT_DRAG_START = `dragstart${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_CAROUSEL = 'carousel'\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_SLIDE = 'slide'\nconst CLASS_NAME_END = 'carousel-item-end'\nconst CLASS_NAME_START = 'carousel-item-start'\nconst CLASS_NAME_NEXT = 'carousel-item-next'\nconst CLASS_NAME_PREV = 'carousel-item-prev'\nconst CLASS_NAME_POINTER_EVENT = 'pointer-event'\n\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_ACTIVE_ITEM = '.active.carousel-item'\nconst SELECTOR_ITEM = '.carousel-item'\nconst SELECTOR_ITEM_IMG = '.carousel-item img'\nconst SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'\nconst SELECTOR_INDICATORS = '.carousel-indicators'\nconst SELECTOR_INDICATOR = '[data-bs-target]'\nconst SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'\nconst SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]'\n\nconst POINTER_TYPE_TOUCH = 'touch'\nconst POINTER_TYPE_PEN = 'pen'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\nclass Carousel extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._items = null\n this._interval = null\n this._activeElement = null\n this._isPaused = false\n this._isSliding = false\n this.touchTimeout = null\n this.touchStartX = 0\n this.touchDeltaX = 0\n\n this._config = this._getConfig(config)\n this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element)\n this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0\n this._pointerEvent = Boolean(window.PointerEvent)\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n next() {\n if (!this._isSliding) {\n this._slide(ORDER_NEXT)\n }\n }\n\n nextWhenVisible() {\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden && isVisible(this._element)) {\n this.next()\n }\n }\n\n prev() {\n if (!this._isSliding) {\n this._slide(ORDER_PREV)\n }\n }\n\n pause(event) {\n if (!event) {\n this._isPaused = true\n }\n\n if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {\n triggerTransitionEnd(this._element)\n this.cycle(true)\n }\n\n clearInterval(this._interval)\n this._interval = null\n }\n\n cycle(event) {\n if (!event) {\n this._isPaused = false\n }\n\n if (this._interval) {\n clearInterval(this._interval)\n this._interval = null\n }\n\n if (this._config && this._config.interval && !this._isPaused) {\n this._updateInterval()\n\n this._interval = setInterval(\n (document.visibilityState ? this.nextWhenVisible : this.next).bind(this),\n this._config.interval\n )\n }\n }\n\n to(index) {\n this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)\n const activeIndex = this._getItemIndex(this._activeElement)\n\n if (index > this._items.length - 1 || index < 0) {\n return\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.to(index))\n return\n }\n\n if (activeIndex === index) {\n this.pause()\n this.cycle()\n return\n }\n\n const order = index > activeIndex ?\n ORDER_NEXT :\n ORDER_PREV\n\n this._slide(order, this._items[index])\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _handleSwipe() {\n const absDeltax = Math.abs(this.touchDeltaX)\n\n if (absDeltax <= SWIPE_THRESHOLD) {\n return\n }\n\n const direction = absDeltax / this.touchDeltaX\n\n this.touchDeltaX = 0\n\n if (!direction) {\n return\n }\n\n this._slide(direction > 0 ? DIRECTION_RIGHT : DIRECTION_LEFT)\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event))\n }\n\n if (this._config.pause === 'hover') {\n EventHandler.on(this._element, EVENT_MOUSEENTER, event => this.pause(event))\n EventHandler.on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event))\n }\n\n if (this._config.touch && this._touchSupported) {\n this._addTouchEventListeners()\n }\n }\n\n _addTouchEventListeners() {\n const start = event => {\n if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {\n this.touchStartX = event.clientX\n } else if (!this._pointerEvent) {\n this.touchStartX = event.touches[0].clientX\n }\n }\n\n const move = event => {\n // ensure swiping with one touch and not pinching\n this.touchDeltaX = event.touches && event.touches.length > 1 ?\n 0 :\n event.touches[0].clientX - this.touchStartX\n }\n\n const end = event => {\n if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {\n this.touchDeltaX = event.clientX - this.touchStartX\n }\n\n this._handleSwipe()\n if (this._config.pause === 'hover') {\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n\n this.pause()\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout)\n }\n\n this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config [all...] |
/plugin/elasticsearch/vendor/ruflin/elastica/src/ |
H A D | Client.php | 31 protected $_config; 81 $this->_config = $configuration; 114 $this->_config->set($key, $value); 129 return $this->_config->get($key); 150 $value = $this->_config->getAll(); 175 if ($this->_config->has('headers')) { 176 $headers = $this->_config->get('headers'); 181 $this->_config->set('headers', $headers); 191 if ($this->_config->has('headers')) { 192 $headers = $this->_config 30 protected $_config; global() variable in Elastica\\Client [all...] |
/plugin/combo/resources/library/bootstrap/4.5.0/ |
H A D | bootstrap.min.js | 6 !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t=t||self).bootstrap={},t.jQuery,t.Popper)}(this,(function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e,n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;function l(t){var n=this,i=!1;return e(this).one(c.TRANSITION_END,(function(){i=!0})),setTimeout((function(){i||c.triggerTransitionEnd(n)}),t),this}var c={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var n=e(t).css("transition-duration"),i=e(t).css("transition-delay"),o=parseFloat(n),s=parseFloat(i);return o||s?(n=n.split(",")[0],i=i.split(",")[0],1e3*(parseFloat(n)+parseFloat(i))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){e(t).trigger("transitionend")},supportsTransitionEnd:function(){return Boolean("transitionend")},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],s=e[i],r=s&&c.isElement(s)?"element":null===(a=s)||"undefined"==typeof a?""+a:{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(r))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+r+'" but expected type "'+o+'".')}var a},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?c.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if("undefined"==typeof e)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};c.jQueryDetection(),e.fn.emulateTransitionEnd=l,e.event.special[c.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var h="alert",u=e.fn[h],d=function(){function t(t){this._element=t}var n=t.prototype;return n.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},n.dispose=function(){e.removeData(this._element,"bs.alert"),this._element=null},n._getRootElement=function(t){var n=c.getSelectorFromElement(t),i=!1;return n&&(i=document.querySelector(n)),i||(i=e(t).closest(".alert")[0]),i},n._triggerCloseEvent=function(t){var n=e.Event("close.bs.alert");return e(t).trigger(n),n},n._removeElement=function(t){var n=this;if(e(t).removeClass("show"),e(t).hasClass("fade")){var i=c.getTransitionDurationFromElement(t);e(t).one(c.TRANSITION_END,(function(e){return n._destroyElement(t,e)})).emulateTransitionEnd(i)}else this._destroyElement(t)},n._destroyElement=function(t){e(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.alert");o||(o=new t(this),i.data("bs.alert",o)),"close"===n&&o[n](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),t}();e(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',d._handleDismiss(new d)),e.fn[h]=d._jQueryInterface,e.fn[h].Constructor=d,e.fn[h].noConflict=function(){return e.fn[h]=u,d._jQueryInterface};var f=e.fn.button,g=function(){function t(t){this._element=t}var n=t.prototype;return n.toggle=function(){var t=!0,n=!0,i=e(this._element).closest('[data-toggle="buttons"]')[0];if(i){var o=this._element.querySelector('input:not([type="hidden"])');if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains("active"))t=!1;else{var s=i.querySelector(".active");s&&e(s).removeClass("active")}t&&("checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains("active")),e(o).trigger("change")),o.focus(),n=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(n&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),t&&e(this._element).toggleClass("active"))},n.dispose=function(){e.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.button");i||(i=new t(this),e(this).data("bs.button",i)),"toggle"===n&&i[n]()}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),t}();e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=t.target,i=n;if(e(n).hasClass("btn")||(n=e(n).closest(".btn")[0]),!n||n.hasAttribute("disabled")||n.classList.contains("disabled"))t.preventDefault();else{var o=n.querySelector('input:not([type="hidden"])');if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))return void t.preventDefault();"LABEL"===i.tagName&&o&&"checkbox"===o.type&&t.preventDefault(),g._jQueryInterface.call(e(n),"toggle")}})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=e(t.target).closest(".btn")[0];e(n).toggleClass("focus",/^focus(in)?$/.test(t.type))})),e(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e<n;e++){var i=t[e],o=i.querySelector('input:not([type="hidden"])');o.checked||o.hasAttribute("checked")?i.classList.add("active"):i.classList.remove("active")}for(var s=0,r=(t=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;s<r;s++){var a=t[s];"true"===a.getAttribute("aria-pressed")?a.classList.add("active"):a.classList.remove("active")}})),e.fn.button=g._jQueryInterface,e.fn.button.Constructor=g,e.fn.button.noConflict=function(){return e.fn.button=f,g._jQueryInterface};var m="carousel",p=".bs.carousel",_=e.fn[m],v={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},b={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},y={TOUCH:"touch",PEN:"pen"},E=function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(".carousel-indicators"),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var n=t.prototype;return n.next=function(){this._isSliding||this._slide("next")},n.nextWhenVisible=function(){!document.hidden&&e(this._element).is(":visible")&&"hidden"!==e(this._element).css("visibility")&&this.next()},n.prev=function(){this._isSliding||this._slide("prev")},n.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(c.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},n.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(t){var n=this;this._activeElement=this._element.querySelector(".active.carousel-item");var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)e(this._element).one("slid.bs.carousel",(function(){return n.to(t)}));else{if(i===t)return this.pause(),void this.cycle();var o=t>i?"next":"prev";this._slide(o,this._items[t])}},n.dispose=function(){e(this._element).off(p),e.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},n._getConfig=function(t){return t=a(a({},v),t),c.typeCheckConfig(m,t,b),t},n._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},n._addEventListeners=function(){var t=this;this._config.keyboard&&e(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&e(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var n=function(e){t._pointerEvent&&y[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},i=function(e){t._pointerEvent&&y[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};e(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(e(this._element).on("pointerdown.bs.carousel",(function(t){return n(t)})),e(this._element).on("pointerup.bs.carousel",(function(t){return i(t)})),this._element.classList.add("pointer-event")):(e(this._element).on("touchstart.bs.carousel",(function(t){return n(t)})),e(this._element).on("touchmove.bs.carousel",(function(e){return function(e){e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),e(this._element).on("touchend.bs.carousel",(function(t){return i(t)})))}},n._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},n._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},n._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),s=this._items.length-1;if((i&&0===o||n&&o===s)&&!this._config [all...] |
/plugin/combo/resources/library/bootstrap/4.4.1/ |
H A D | bootstrap.min.js | 6 !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t=t||self).bootstrap={},t.jQuery,t.Popper)}(this,function(t,g,u){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function s(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function l(o){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?e(Object(r),!0).forEach(function(t){var e,n,i;e=o,i=r[n=t],n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(r,t))})}return o}g=g&&g.hasOwnProperty("default")?g.default:g,u=u&&u.hasOwnProperty("default")?u.default:u;var n="transitionend";function o(t){var e=this,n=!1;return g(this).one(_.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||_.triggerTransitionEnd(e)},t),this}var _={TRANSITION_END:"bsTransitionEnd",getUID:function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=g(t).css("transition-duration"),n=g(t).css("transition-delay"),i=parseFloat(e),o=parseFloat(n);return i||o?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){g(t).trigger(n)},supportsTransitionEnd:function(){return Boolean(n)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],r=e[i],s=r&&_.isElement(r)?"element":(a=r,{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(o).test(s))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+s+'" but expected type "'+o+'".')}var a},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"!=typeof t.getRootNode)return t instanceof ShadowRoot?t:t.parentNode?_.findShadowRoot(t.parentNode):null;var e=t.getRootNode();return e instanceof ShadowRoot?e:null},jQueryDetection:function(){if("undefined"==typeof g)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=g.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||4<=t[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};_.jQueryDetection(),g.fn.emulateTransitionEnd=o,g.event.special[_.TRANSITION_END]={bindType:n,delegateType:n,handle:function(t){if(g(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var r="alert",a="bs.alert",c="."+a,h=g.fn[r],f={CLOSE:"close"+c,CLOSED:"closed"+c,CLICK_DATA_API:"click"+c+".data-api"},d="alert",m="fade",p="show",v=function(){function i(t){this._element=t}var t=i.prototype;return t.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},t.dispose=function(){g.removeData(this._element,a),this._element=null},t._getRootElement=function(t){var e=_.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n=n||g(t).closest("."+d)[0]},t._triggerCloseEvent=function(t){var e=g.Event(f.CLOSE);return g(t).trigger(e),e},t._removeElement=function(e){var n=this;if(g(e).removeClass(p),g(e).hasClass(m)){var t=_.getTransitionDurationFromElement(e);g(e).one(_.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(t)}else this._destroyElement(e)},t._destroyElement=function(t){g(t).detach().trigger(f.CLOSED).remove()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(a);e||(e=new i(this),t.data(a,e)),"close"===n&&e[n](this)})},i._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},s(i,null,[{key:"VERSION",get:function(){return"4.4.1"}}]),i}();g(document).on(f.CLICK_DATA_API,'[data-dismiss="alert"]',v._handleDismiss(new v)),g.fn[r]=v._jQueryInterface,g.fn[r].Constructor=v,g.fn[r].noConflict=function(){return g.fn[r]=h,v._jQueryInterface};var y="button",E="bs.button",C="."+E,T=".data-api",b=g.fn[y],S="active",D="btn",I="focus",w='[data-toggle^="button"]',A='[data-toggle="buttons"]',N='[data-toggle="button"]',O='[data-toggle="buttons"] .btn',k='input:not([type="hidden"])',P=".active",L=".btn",j={CLICK_DATA_API:"click"+C+T,FOCUS_BLUR_DATA_API:"focus"+C+T+" blur"+C+T,LOAD_DATA_API:"load"+C+T},H=function(){function n(t){this._element=t}var t=n.prototype;return t.toggle=function(){var t=!0,e=!0,n=g(this._element).closest(A)[0];if(n){var i=this._element.querySelector(k);if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains(S))t=!1;else{var o=n.querySelector(P);o&&g(o).removeClass(S)}else"checkbox"===i.type?"LABEL"===this._element.tagName&&i.checked===this._element.classList.contains(S)&&(t=!1):t=!1;t&&(i.checked=!this._element.classList.contains(S),g(i).trigger("change")),i.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(S)),t&&g(this._element).toggleClass(S))},t.dispose=function(){g.removeData(this._element,E),this._element=null},n._jQueryInterface=function(e){return this.each(function(){var t=g(this).data(E);t||(t=new n(this),g(this).data(E,t)),"toggle"===e&&t[e]()})},s(n,null,[{key:"VERSION",get:function(){return"4.4.1"}}]),n}();g(document).on(j.CLICK_DATA_API,w,function(t){var e=t.target;if(g(e).hasClass(D)||(e=g(e).closest(L)[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{var n=e.querySelector(k);if(n&&(n.hasAttribute("disabled")||n.classList.contains("disabled")))return void t.preventDefault();H._jQueryInterface.call(g(e),"toggle")}}).on(j.FOCUS_BLUR_DATA_API,w,function(t){var e=g(t.target).closest(L)[0];g(e).toggleClass(I,/^focus(in)?$/.test(t.type))}),g(window).on(j.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(O)),e=0,n=t.length;e<n;e++){var i=t[e],o=i.querySelector(k);o.checked||o.hasAttribute("checked")?i.classList.add(S):i.classList.remove(S)}for(var r=0,s=(t=[].slice.call(document.querySelectorAll(N))).length;r<s;r++){var a=t[r];"true"===a.getAttribute("aria-pressed")?a.classList.add(S):a.classList.remove(S)}}),g.fn[y]=H._jQueryInterface,g.fn[y].Constructor=H,g.fn[y].noConflict=function(){return g.fn[y]=b,H._jQueryInterface};var R="carousel",x="bs.carousel",F="."+x,U=".data-api",W=g.fn[R],q={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},M={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},K="next",Q="prev",B="left",V="right",Y={SLIDE:"slide"+F,SLID:"slid"+F,KEYDOWN:"keydown"+F,MOUSEENTER:"mouseenter"+F,MOUSELEAVE:"mouseleave"+F,TOUCHSTART:"touchstart"+F,TOUCHMOVE:"touchmove"+F,TOUCHEND:"touchend"+F,POINTERDOWN:"pointerdown"+F,POINTERUP:"pointerup"+F,DRAG_START:"dragstart"+F,LOAD_DATA_API:"load"+F+U,CLICK_DATA_API:"click"+F+U},z="carousel",X="active",$="slide",G="carousel-item-right",J="carousel-item-left",Z="carousel-item-next",tt="carousel-item-prev",et="pointer-event",nt=".active",it=".active.carousel-item",ot=".carousel-item",rt=".carousel-item img",st=".carousel-item-next, .carousel-item-prev",at=".carousel-indicators",lt="[data-slide], [data-slide-to]",ct='[data-ride="carousel"]',ht={TOUCH:"touch",PEN:"pen"},ut=function(){function r(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(at),this._touchSupported="ontouchstart"in document.documentElement||0<navigator.maxTouchPoints,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var t=r.prototype;return t.next=function(){this._isSliding||this._slide(K)},t.nextWhenVisible=function(){!document.hidden&&g(this._element).is(":visible")&&"hidden"!==g(this._element).css("visibility")&&this.next()},t.prev=function(){this._isSliding||this._slide(Q)},t.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(st)&&(_.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},t.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},t.to=function(t){var e=this;this._activeElement=this._element.querySelector(it);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)g(this._element).one(Y.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=n<t?K:Q;this._slide(i,this._items[t])}},t.dispose=function(){g(this._element).off(F),g.removeData(this._element,x),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},t._getConfig=function(t){return t=l({},q,{},t),_.typeCheckConfig(R,t,M),t},t._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;(this.touchDeltaX=0)<e&&this.prev(),e<0&&this.next()}},t._addEventListeners=function(){var e=this;this._config.keyboard&&g(this._element).on(Y.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&g(this._element).on(Y.MOUSEENTER,function(t){return e.pause(t)}).on(Y.MOUSELEAVE,function(t){return e.cycle(t)}),this._config.touch&&this._addTouchEventListeners()},t._addTouchEventListeners=function(){var e=this;if(this._touchSupported){var n=function(t){e._pointerEvent&&ht[t.originalEvent.pointerType.toUpperCase()]?e.touchStartX=t.originalEvent.clientX:e._pointerEvent||(e.touchStartX=t.originalEvent.touches[0].clientX)},i=function(t){e._pointerEvent&&ht[t.originalEvent.pointerType.toUpperCase()]&&(e.touchDeltaX=t.originalEvent.clientX-e.touchStartX),e._handleSwipe(),"hover"===e._config.pause&&(e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval))};g(this._element.querySelectorAll(rt)).on(Y.DRAG_START,function(t){return t.preventDefault()}),this._pointerEvent?(g(this._element).on(Y.POINTERDOWN,function(t){return n(t)}),g(this._element).on(Y.POINTERUP,function(t){return i(t)}),this._element.classList.add(et)):(g(this._element).on(Y.TOUCHSTART,function(t){return n(t)}),g(this._element).on(Y.TOUCHMOVE,function(t){return function(t){t.originalEvent.touches&&1<t.originalEvent.touches.length?e.touchDeltaX=0:e.touchDeltaX=t.originalEvent.touches[0].clientX-e.touchStartX}(t)}),g(this._element).on(Y.TOUCHEND,function(t){return i(t)}))}},t._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},t._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(ot)):[],this._items.indexOf(t)},t._getItemByDirection=function(t,e){var n=t===K,i=t===Q,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config [all...] |
H A D | bootstrap.min.js.map | 1 {"version":3,"sources":["../../js/src/util.js","../../js/src/alert.js","../../js/src/button.js","../../js/src/carousel.js","../../js/src/collapse.js","../../js/src/dropdown.js","../../js/src/modal.js","../../js/src/tools/sanitizer.js","../../js/src/tooltip.js","../../js/src/popover.js","../../js/src/scrollspy.js","../../js/src/tab.js","../../js/src/toast.js"],"names":["TRANSITION_END","transitionEndEmulator","duration","_this","this","called","$","one","Util","setTimeout","triggerTransitionEnd","getUID","prefix","Math","random","document","getElementById","getSelectorFromElement","element","selector","getAttribute","hrefAttr","trim","querySelector","err","getTransitionDurationFromElement","transitionDuration","css","transitionDelay","floatTransitionDuration","parseFloat","floatTransitionDelay","split","reflow","offsetHeight","trigger","supportsTransitionEnd","Boolean","isElement","obj","nodeType","typeCheckConfig","componentName","config","configTypes","property","Object","prototype","hasOwnProperty","call","expectedTypes","value","valueType","toString","match","toLowerCase","RegExp","test","Error","toUpperCase","findShadowRoot","documentElement","attachShadow","getRootNode","ShadowRoot","parentNode","root","jQueryDetection","TypeError","version","fn","jquery","emulateTransitionEnd","event","special","bindType","delegateType","handle","target","is","handleObj","handler","apply","arguments","NAME","DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","Event","CLOSE","CLOSED","CLICK_DATA_API","ClassName","Alert","_element","close","rootElement","_getRootElement","_triggerCloseEvent","isDefaultPrevented","_removeElement","dispose","removeData","parent","closest","closeEvent","removeClass","hasClass","_destroyElement","detach","remove","_jQueryInterface","each","$element","data","_handleDismiss","alertInstance","preventDefault","on","Constructor","noConflict","DATA_API_KEY","Selector","FOCUS_BLUR_DATA_API","LOAD_DATA_API","Button","toggle","triggerChangeEvent","addAriaPressed","input","type","checked","classList","contains","activeElement","tagName","focus","hasAttribute","setAttribute","toggleClass","button","inputBtn","window","buttons","slice","querySelectorAll","i","len","length","add","Default","interval","keyboard","slide","pause","wrap","touch","DefaultType","Direction","SLIDE","SLID","KEYDOWN","MOUSEENTER","MOUSELEAVE","TOUCHSTART","TOUCHMOVE","TOUCHEND","POINTERDOWN","POINTERUP","DRAG_START","PointerType","TOUCH","PEN","Carousel","_items","_interval","_activeElement","_isPaused","_isSliding","touchTimeout","touchStartX","touchDeltaX","_config","_getConfig","_indicatorsElement","_touchSupported","navigator","maxTouchPoints","_pointerEvent","PointerEvent","MSPointerEvent","_addEventListeners","next","_slide","nextWhenVisible","hidden","prev","cycle","clearInterval","setInterval","visibilityState","bind","to","index","activeIndex","_getItemIndex","direction","off","_objectSpread2","_handleSwipe","absDeltax","abs","_this2","_keydown","_addTouchEventListeners","_this3","start","originalEvent","pointerType","clientX","touches","end","clearTimeout","e","move","which","indexOf","_getItemByDirection","isNextDirection","isPrevDirection","lastItemIndex","itemIndex","_triggerSlideEvent","relatedTarget","eventDirectionName","targetIndex","fromIndex","slideEvent","from","_setActiveIndicatorElement","indicators","nextIndicator","children","addClass","directionalClassName","orderClassName","_this4","activeElementIndex","nextElement","nextElementIndex","isCycling","slidEvent","nextElementInterval","parseInt","defaultInterval","action","ride","_dataApiClickHandler","slideIndex","carousels","$carousel","SHOW","SHOWN","HIDE","HIDDEN","Dimension","Collapse","_isTransitioning","_triggerArray","id","toggleList","elem","filterElement","filter","foundElem","_selector","push","_parent","_getParent","_addAriaAndCollapsedClass","hide","show","actives","activesData","not","startEvent","dimension","_getDimension","style","attr","setTransitioning","scrollSize","getBoundingClientRect","triggerArrayLength","isTransitioning","_getTargetFromElement","triggerArray","isOpen","$this","currentTarget","$trigger","selectors","$target","REGEXP_KEYDOWN","ARROW_UP_KEYCODE","CLICK","KEYDOWN_DATA_API","KEYUP_DATA_API","AttachmentMap","offset","flip","boundary","reference","display","popperConfig","Dropdown","_popper","_menu","_getMenuElement","_inNavbar","_detectNavbar","disabled","isActive","_clearMenus","usePopper","showEvent","_getParentFromElement","Popper","referenceElement","_getPopperConfig","body","noop","hideEvent","destroy","update","scheduleUpdate","stopPropagation","constructor","_getPlacement","$parentDropdown","placement","_getOffset","offsets","modifiers","enabled","preventOverflow","boundariesElement","applyStyle","toggles","context","clickEvent","dropdownMenu","_dataApiKeydownHandler","items","item","backdrop","HIDE_PREVENTED","FOCUSIN","RESIZE","CLICK_DISMISS","KEYDOWN_DISMISS","MOUSEUP_DISMISS","MOUSEDOWN_DISMISS","Modal","_dialog","_backdrop","_isShown","_isBodyOverflowing","_ignoreBackdropClick","_scrollbarWidth","_checkScrollbar","_setScrollbar","_adjustDialog","_setEscapeEvent","_setResizeEvent","_showBackdrop","_showElement","transition","_hideModal","forEach","htmlElement","handleUpdate","_triggerBackdropTransition","hideEventPrevented","defaultPrevented","modalTransitionDuration","modalBody","Node","ELEMENT_NODE","appendChild","removeAttribute","scrollTop","_enforceFocus","transitionComplete","shownEvent","_this5","has","_this6","_this7","_this8","_resetAdjustments","_resetScrollbar","_removeBackdrop","callback","_this9","animate","createElement","className","appendTo","backdropTransitionDuration","callbackRemove","isModalOverflowing","scrollHeight","clientHeight","paddingLeft","paddingRight","rect","left","right","innerWidth","_getScrollbarWidth","_this10","fixedContent","stickyContent","actualPadding","calculatedPadding","actualMargin","marginRight","calculatedMargin","padding","elements","margin","scrollDiv","scrollbarWidth","width","clientWidth","removeChild","_this11","uriAttrs","DefaultWhitelist","*","a","area","b","br","col","code","div","em","hr","h1","h2","h3","h4","h5","h6","img","li","ol","p","pre","s","small","span","sub","sup","strong","u","ul","SAFE_URL_PATTERN","DATA_URL_PATTERN","sanitizeHtml","unsafeHtml","whiteList","sanitizeFn","createdDocument","DOMParser","parseFromString","whitelistKeys","keys","_loop","el","elName","nodeName","attributeList","attributes","whitelistedAttributes","concat","allowedAttributeList","attrName","nodeValue","regExp","attrRegex","l","allowedAttribute","innerHTML","CLASS_PREFIX","BSCLS_PREFIX_REGEX","DISALLOWED_ATTRIBUTES","animation","template","title","delay","html","container","fallbackPlacement","sanitize","AUTO","TOP","RIGHT","BOTTOM","LEFT","HoverState","INSERTED","FOCUSOUT","Trigger","Tooltip","_isEnabled","_timeout","_hoverState","_activeTrigger","tip","_setListeners","enable","disable","toggleEnabled","dataKey","_getDelegateConfig","click","_isWithActiveTrigger","_enter","_leave","getTipElement","_hideModalHandler","isWithContent","shadowRoot","isInTheDom","ownerDocument","tipId","setContent","attachment","_getAttachment","addAttachmentClass","_getContainer","complete","_fixTransition","prevHoverState","_cleanTipClass","getTitle","setElementContent","content","text","empty","append","behavior","arrow","onCreate","originalPlacement","_handlePopperPlacementChange","onUpdate","find","eventIn","eventOut","_fixTitle","titleType","dataAttributes","dataAttr","key","$tip","tabClass","join","popperData","popperInstance","instance","popper","initConfigAnimation","Popover","_getContent","method","ACTIVATE","SCROLL","OffsetMethod","ScrollSpy","_scrollElement","_offsets","_targets","_activeTarget","_scrollHeight","_process","refresh","autoMethod","offsetMethod","offsetBase","_getScrollTop","_getScrollHeight","map","targetSelector","targetBCR","height","top","sort","pageYOffset","max","_getOffsetHeight","innerHeight","maxScroll","_activate","_clear","queries","$link","parents","node","scrollSpys","$spy","Tab","previous","listElement","itemSelector","makeArray","hiddenEvent","_transitionComplete","active","dropdownChild","dropdownElement","dropdownToggleList","autohide","Toast","_close"],"mappings":";;;;;kvCAeA,IAAMA,EAAiB,gBAsBvB,SAASC,EAAsBC,GAAU,IAAAC,EAAAC,KACnCC,GAAS,EAYb,OAVAC,EAAEF,MAAMG,IAAIC,EAAKR,eAAgB,WAC/BK,GAAS,IAGXI,WAAW,WACJJ,GACHG,EAAKE,qBAAqBP,IAE3BD,GAEIE,KAcT,IAAMI,EAAO,CAEXR,eAAgB,kBAEhBW,OAJW,SAIJC,GACL,KAEEA,MAvDU,IAuDGC,KAAKC,UACXC,SAASC,eAAeJ,KACjC,OAAOA,GAGTK,uBAZW,SAYYC,GACrB,IAAIC,EAAWD,EAAQE,aAAa,eAEpC,IAAKD,GAAyB,MAAbA,EAAkB,CACjC,IAAME,EAAWH,EAAQE,aAAa,QACtCD,EAAWE,GAAyB,MAAbA,EAAmBA,EAASC,OAAS,GAG9D,IACE,OAAOP,SAASQ,cAAcJ,GAAYA,EAAW,KACrD,MAAOK,GACP,OAAO,OAIXC,iCA3BW,SA2BsBP,GAC/B,IAAKA,EACH,OAAO,EAIT,IAAIQ,EAAqBpB,EAAEY,GAASS,IAAI,uBACpCC,EAAkBtB,EAAEY,GAASS,IAAI,oBAE/BE,EAA0BC,WAAWJ,GACrCK,EAAuBD,WAAWF,GAGxC,OAAKC,GAA4BE,GAKjCL,EAAqBA,EAAmBM,MAAM,KAAK,GACnDJ,EAAkBA,EAAgBI,MAAM,KAAK,GA7FjB,KA+FpBF,WAAWJ,GAAsBI,WAAWF,KAP3C,GAUXK,OAnDW,SAmDJf,GACL,OAAOA,EAAQgB,cAGjBxB,qBAvDW,SAuDUQ,GACnBZ,EAAEY,GAASiB,QAAQnC,IA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ExBsgB,OAMGjb,iBAAP,SAAwBpE,GACtB,OAAOvC,KAAK4G,KAAK,WACf,IAAMC,EAAW3G,EAAEF,MACf8G,EAAaD,EAASC,KAAK7B,IAQ/B,GALK6B,IACHA,EAAO,IAAIggB,EAAM9mB,KAHgB,iBAAXuC,GAAuBA,GAI7CsE,EAASC,KAAK7B,GAAU6B,IAGJ,iBAAXvE,EAAqB,CAC9B,GAA4B,oBAAjBuE,EAAKvE,GACd,MAAM,IAAIyB,UAAJ,oBAAkCzB,EAAlC,KAGRuE,EAAKvE,GAAQvC,kDAhJjB,MArDuB,4CAyDvB,OAAOyJ,mCAIP,OAAOP,YAoJXhJ,EAAEgE,GAAGc,IAAoB8hB,GAAMngB,iBAC/BzG,EAAEgE,GAAGc,IAAMmC,YAAc2f,GACzB5mB,EAAEgE,GAAGc,IAAMoC,WAAc,WAEvB,OADAlH,EAAEgE,GAAGc,IAAQG,GACN2hB,GAAMngB","sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.4.1): util.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\n\n/**\n * ------------------------------------------------------------------------\n * Private TransitionEnd Helpers\n * ------------------------------------------------------------------------\n */\n\nconst TRANSITION_END = 'transitionend'\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nfunction toType(obj) {\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\nfunction getSpecialTransitionEndEvent() {\n return {\n bindType: TRANSITION_END,\n delegateType: TRANSITION_END,\n handle(event) {\n if ($(event.target).is(this)) {\n return event.handleObj.handler.apply(this, arguments) // eslint-disable-line prefer-rest-params\n }\n return undefined // eslint-disable-line no-undefined\n }\n }\n}\n\nfunction transitionEndEmulator(duration) {\n let called = false\n\n $(this).one(Util.TRANSITION_END, () => {\n called = true\n })\n\n setTimeout(() => {\n if (!called) {\n Util.triggerTransitionEnd(this)\n }\n }, duration)\n\n return this\n}\n\nfunction setTransitionEndSupport() {\n $.fn.emulateTransitionEnd = transitionEndEmulator\n $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst Util = {\n\n TRANSITION_END: 'bsTransitionEnd',\n\n getUID(prefix) {\n do {\n // eslint-disable-next-line no-bitwise\n prefix += ~~(Math.random() * MAX_UID) // \"~~\" acts like a faster Math.floor() here\n } while (document.getElementById(prefix))\n return prefix\n },\n\n getSelectorFromElement(element) {\n let selector = element.getAttribute('data-target')\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href')\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : ''\n }\n\n try {\n return document.querySelector(selector) ? selector : null\n } catch (err) {\n return null\n }\n },\n\n getTransitionDurationFromElement(element) {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let transitionDuration = $(element).css('transition-duration')\n let transitionDelay = $(element).css('transition-delay')\n\n const floatTransitionDuration = parseFloat(transitionDuration)\n const floatTransitionDelay = parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n },\n\n reflow(element) {\n return element.offsetHeight\n },\n\n triggerTransitionEnd(element) {\n $(element).trigger(TRANSITION_END)\n },\n\n // TODO: Remove in v5\n supportsTransitionEnd() {\n return Boolean(TRANSITION_END)\n },\n\n isElement(obj) {\n return (obj[0] || obj).nodeType\n },\n\n typeCheckConfig(componentName, config, configTypes) {\n for (const property in configTypes) {\n if (Object.prototype.hasOwnProperty.call(configTypes, property)) {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && Util.isElement(value)\n ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n }\n }\n },\n\n findShadowRoot(element) {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return Util.findShadowRoot(element.parentNode)\n },\n\n jQueryDetection() {\n if (typeof $ === 'undefined') {\n throw new TypeError('Bootstrap\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\'s JavaScript.')\n }\n\n const version = $.fn.jquery.split(' ')[0].split('.')\n const minMajor = 1\n const ltMajor = 2\n const minMinor = 9\n const minPatch = 1\n const maxMajor = 4\n\n if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {\n throw new Error('Bootstrap\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')\n }\n }\n}\n\nUtil.jQueryDetection()\nsetTransitionEndSupport()\n\nexport default Util\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.4.1): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'alert'\nconst VERSION = '4.4.1'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst Selector = {\n DISMISS : '[data-dismiss=\"alert\"]'\n}\n\nconst Event = {\n CLOSE : `close${EVENT_KEY}`,\n CLOSED : `closed${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n}\n\nconst ClassName = {\n ALERT : 'alert',\n FADE : 'fade',\n SHOW : 'show'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Alert {\n constructor(element) {\n this._element = element\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n // Public\n\n close(element) {\n let rootElement = this._element\n if (element) {\n rootElement = this._getRootElement(element)\n }\n\n const customEvent = this._triggerCloseEvent(rootElement)\n\n if (customEvent.isDefaultPrevented()) {\n return\n }\n\n this._removeElement(rootElement)\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n this._element = null\n }\n\n // Private\n\n _getRootElement(element) {\n const selector = Util.getSelectorFromElement(element)\n let parent = false\n\n if (selector) {\n parent = document.querySelector(selector)\n }\n\n if (!parent) {\n parent = $(element).closest(`.${ClassName.ALERT}`)[0]\n }\n\n return parent\n }\n\n _triggerCloseEvent(element) {\n const closeEvent = $.Event(Event.CLOSE)\n\n $(element).trigger(closeEvent)\n return closeEvent\n }\n\n _removeElement(element) {\n $(element).removeClass(ClassName.SHOW)\n\n if (!$(element).hasClass(ClassName.FADE)) {\n this._destroyElement(element)\n return\n }\n\n const transitionDuration = Util.getTransitionDurationFromElement(element)\n\n $(element)\n .one(Util.TRANSITION_END, (event) => this._destroyElement(element, event))\n .emulateTransitionEnd(transitionDuration)\n }\n\n _destroyElement(element) {\n $(element)\n .detach()\n .trigger(Event.CLOSED)\n .remove()\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $element = $(this)\n let data = $element.data(DATA_KEY)\n\n if (!data) {\n data = new Alert(this)\n $element.data(DATA_KEY, data)\n }\n\n if (config === 'close') {\n data[config](this)\n }\n })\n }\n\n static _handleDismiss(alertInstance) {\n return function (event) {\n if (event) {\n event.preventDefault()\n }\n\n alertInstance.close(this)\n }\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document).on(\n Event.CLICK_DATA_API,\n Selector.DISMISS,\n Alert._handleDismiss(new Alert())\n)\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Alert._jQueryInterface\n$.fn[NAME].Constructor = Alert\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Alert._jQueryInterface\n}\n\nexport default Alert\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.4.1): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'button'\nconst VERSION = '4.4.1'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst ClassName = {\n ACTIVE : 'active',\n BUTTON : 'btn',\n FOCUS : 'focus'\n}\n\nconst Selector = {\n DATA_TOGGLE_CARROT : '[data-toggle^=\"button\"]',\n DATA_TOGGLES : '[data-toggle=\"buttons\"]',\n DATA_TOGGLE : '[data-toggle=\"button\"]',\n DATA_TOGGLES_BUTTONS : '[data-toggle=\"buttons\"] .btn',\n INPUT : 'input:not([type=\"hidden\"])',\n ACTIVE : '.active',\n BUTTON : '.btn'\n}\n\nconst Event = {\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`,\n FOCUS_BLUR_DATA_API : `focus${EVENT_KEY}${DATA_API_KEY} ` +\n `blur${EVENT_KEY}${DATA_API_KEY}`,\n LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Button {\n constructor(element) {\n this._element = element\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n // Public\n\n toggle() {\n let triggerChangeEvent = true\n let addAriaPressed = true\n const rootElement = $(this._element).closest(\n Selector.DATA_TOGGLES\n )[0]\n\n if (rootElement) {\n const input = this._element.querySelector(Selector.INPUT)\n\n if (input) {\n if (input.type === 'radio') {\n if (input.checked &&\n this._element.classList.contains(ClassName.ACTIVE)) {\n triggerChangeEvent = false\n } else {\n const activeElement = rootElement.querySelector(Selector.ACTIVE)\n\n if (activeElement) {\n $(activeElement).removeClass(ClassName.ACTIVE)\n }\n }\n } else if (input.type === 'checkbox') {\n if (this._element.tagName === 'LABEL' && input.checked === this._element.classList.contains(ClassName.ACTIVE)) {\n triggerChangeEvent = false\n }\n } else {\n // if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input\n triggerChangeEvent = false\n }\n\n if (triggerChangeEvent) {\n input.checked = !this._element.classList.contains(ClassName.ACTIVE)\n $(input).trigger('change')\n }\n\n input.focus()\n addAriaPressed = false\n }\n }\n\n if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {\n if (addAriaPressed) {\n this._element.setAttribute('aria-pressed',\n !this._element.classList.contains(ClassName.ACTIVE))\n }\n\n if (triggerChangeEvent) {\n $(this._element).toggleClass(ClassName.ACTIVE)\n }\n }\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n this._element = null\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n\n if (!data) {\n data = new Button(this)\n $(this).data(DATA_KEY, data)\n }\n\n if (config === 'toggle') {\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => {\n let button = event.target\n\n if (!$(button).hasClass(ClassName.BUTTON)) {\n button = $(button).closest(Selector.BUTTON)[0]\n }\n\n if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {\n event.preventDefault() // work around Firefox bug #1540995\n } else {\n const inputBtn = button.querySelector(Selector.INPUT)\n\n if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {\n event.preventDefault() // work around Firefox bug #1540995\n return\n }\n\n Button._jQueryInterface.call($(button), 'toggle')\n }\n })\n .on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => {\n const button = $(event.target).closest(Selector.BUTTON)[0]\n $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type))\n })\n\n$(window).on(Event.LOAD_DATA_API, () => {\n // ensure correct active class is set to match the controls' actual values/states\n\n // find all checkboxes/readio buttons inside data-toggle groups\n let buttons = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLES_BUTTONS))\n for (let i = 0, len = buttons.length; i < len; i++) {\n const button = buttons[i]\n const input = button.querySelector(Selector.INPUT)\n if (input.checked || input.hasAttribute('checked')) {\n button.classList.add(ClassName.ACTIVE)\n } else {\n button.classList.remove(ClassName.ACTIVE)\n }\n }\n\n // find all button toggles\n buttons = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE))\n for (let i = 0, len = buttons.length; i < len; i++) {\n const button = buttons[i]\n if (button.getAttribute('aria-pressed') === 'true') {\n button.classList.add(ClassName.ACTIVE)\n } else {\n button.classList.remove(ClassName.ACTIVE)\n }\n }\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Button._jQueryInterface\n$.fn[NAME].Constructor = Button\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Button._jQueryInterface\n}\n\nexport default Button\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.4.1): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'carousel'\nconst VERSION = '4.4.1'\nconst DATA_KEY = 'bs.carousel'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst ARROW_LEFT_KEYCODE = 37 // KeyboardEvent.which value for left arrow key\nconst ARROW_RIGHT_KEYCODE = 39 // KeyboardEvent.which value for right arrow key\nconst TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch\nconst SWIPE_THRESHOLD = 40\n\nconst Default = {\n interval : 5000,\n keyboard : true,\n slide : false,\n pause : 'hover',\n wrap : true,\n touch : true\n}\n\nconst DefaultType = {\n interval : '(number|boolean)',\n keyboard : 'boolean',\n slide : '(boolean|string)',\n pause : '(string|boolean)',\n wrap : 'boolean',\n touch : 'boolean'\n}\n\nconst Direction = {\n NEXT : 'next',\n PREV : 'prev',\n LEFT : 'left',\n RIGHT : 'right'\n}\n\nconst Event = {\n SLIDE : `slide${EVENT_KEY}`,\n SLID : `slid${EVENT_KEY}`,\n KEYDOWN : `keydown${EVENT_KEY}`,\n MOUSEENTER : `mouseenter${EVENT_KEY}`,\n MOUSELEAVE : `mouseleave${EVENT_KEY}`,\n TOUCHSTART : `touchstart${EVENT_KEY}`,\n TOUCHMOVE : `touchmove${EVENT_KEY}`,\n TOUCHEND : `touchend${EVENT_KEY}`,\n POINTERDOWN : `pointerdown${EVENT_KEY}`,\n POINTERUP : `pointerup${EVENT_KEY}`,\n DRAG_START : `dragstart${EVENT_KEY}`,\n LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n}\n\nconst ClassName = {\n CAROUSEL : 'carousel',\n ACTIVE : 'active',\n SLIDE : 'slide',\n RIGHT : 'carousel-item-right',\n LEFT : 'carousel-item-left',\n NEXT : 'carousel-item-next',\n PREV : 'carousel-item-prev',\n ITEM : 'carousel-item',\n POINTER_EVENT : 'pointer-event'\n}\n\nconst Selector = {\n ACTIVE : '.active',\n ACTIVE_ITEM : '.active.carousel-item',\n ITEM : '.carousel-item',\n ITEM_IMG : '.carousel-item img',\n NEXT_PREV : '.carousel-item-next, .carousel-item-prev',\n INDICATORS : '.carousel-indicators',\n DATA_SLIDE : '[data-slide], [data-slide-to]',\n DATA_RIDE : '[data-ride=\"carousel\"]'\n}\n\nconst PointerType = {\n TOUCH : 'touch',\n PEN : 'pen'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\nclass Carousel {\n constructor(element, config) {\n this._items = null\n this._interval = null\n this._activeElement = null\n this._isPaused = false\n this._isSliding = false\n this.touchTimeout = null\n this.touchStartX = 0\n this.touchDeltaX = 0\n\n this._config = this._getConfig(config)\n this._element = element\n this._indicatorsElement = this._element.querySelector(Selector.INDICATORS)\n this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0\n this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent)\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n next() {\n if (!this._isSliding) {\n this._slide(Direction.NEXT)\n }\n }\n\n nextWhenVisible() {\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden &&\n ($(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden')) {\n this.next()\n }\n }\n\n prev() {\n if (!this._isSliding) {\n this._slide(Direction.PREV)\n }\n }\n\n pause(event) {\n if (!event) {\n this._isPaused = true\n }\n\n if (this._element.querySelector(Selector.NEXT_PREV)) {\n Util.triggerTransitionEnd(this._element)\n this.cycle(true)\n }\n\n clearInterval(this._interval)\n this._interval = null\n }\n\n cycle(event) {\n if (!event) {\n this._isPaused = false\n }\n\n if (this._interval) {\n clearInterval(this._interval)\n this._interval = null\n }\n\n if (this._config.interval && !this._isPaused) {\n this._interval = setInterval(\n (document.visibilityState ? this.nextWhenVisible : this.next).bind(this),\n this._config.interval\n )\n }\n }\n\n to(index) {\n this._activeElement = this._element.querySelector(Selector.ACTIVE_ITEM)\n\n const activeIndex = this._getItemIndex(this._activeElement)\n\n if (index > this._items.length - 1 || index < 0) {\n return\n }\n\n if (this._isSliding) {\n $(this._element).one(Event.SLID, () => this.to(index))\n return\n }\n\n if (activeIndex === index) {\n this.pause()\n this.cycle()\n return\n }\n\n const direction = index > activeIndex\n ? Direction.NEXT\n : Direction.PREV\n\n this._slide(direction, this._items[index])\n }\n\n dispose() {\n $(this._element).off(EVENT_KEY)\n $.removeData(this._element, DATA_KEY)\n\n this._items = null\n this._config = null\n this._element = null\n this._interval = null\n this._isPaused = null\n this._isSliding = null\n this._activeElement = null\n this._indicatorsElement = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _handleSwipe() {\n const absDeltax = Math.abs(this.touchDeltaX)\n\n if (absDeltax <= SWIPE_THRESHOLD) {\n return\n }\n\n const direction = absDeltax / this.touchDeltaX\n\n this.touchDeltaX = 0\n\n // swipe left\n if (direction > 0) {\n this.prev()\n }\n\n // swipe right\n if (direction < 0) {\n this.next()\n }\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n $(this._element)\n .on(Event.KEYDOWN, (event) => this._keydown(event))\n }\n\n if (this._config.pause === 'hover') {\n $(this._element)\n .on(Event.MOUSEENTER, (event) => this.pause(event))\n .on(Event.MOUSELEAVE, (event) => this.cycle(event))\n }\n\n if (this._config.touch) {\n this._addTouchEventListeners()\n }\n }\n\n _addTouchEventListeners() {\n if (!this._touchSupported) {\n return\n }\n\n const start = (event) => {\n if (this._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {\n this.touchStartX = event.originalEvent.clientX\n } else if (!this._pointerEvent) {\n this.touchStartX = event.originalEvent.touches[0].clientX\n }\n }\n\n const move = (event) => {\n // ensure swiping with one touch and not pinching\n if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {\n this.touchDeltaX = 0\n } else {\n this.touchDeltaX = event.originalEvent.touches[0].clientX - this.touchStartX\n }\n }\n\n const end = (event) => {\n if (this._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {\n this.touchDeltaX = event.originalEvent.clientX - this.touchStartX\n }\n\n this._handleSwipe()\n if (this._config.pause === 'hover') {\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n\n this.pause()\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout)\n }\n this.touchTimeout = setTimeout((event) => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config [all...] |
/plugin/codemirror/dist/modes/ |
H A D | yacas.min.js.map | 1 …_config","_parserConfig","words","str","obj","split","i","length","bodiedOps","pFloatForm","pIdent…
|
H A D | z80.min.js.map | 1 …_config","parserConfig","ez80","keywords1","keywords2","variables1","variables2","errors","numbers…
|
H A D | pig.min.js.map | 1 …_config","parserConfig","keywords","builtins","types","multiLineStrings","isOperatorChar","chain",…
|
H A D | mathematica.min.js.map | 1 …_config","_parserConfig","Identifier","pBase","pFloat","pFloatBase","pPrecision","reBaseForm","Reg…
|
H A D | stex.min.js.map | 1 …_config","parserConfig","pushCommand","state","command","cmdState","push","peekCommand","length","…
|
H A D | haskell.min.js.map | 1 …_config","modeConfig","switchState","source","setState","f","smallRE","largeRE","digitRE","hexitRE…
|
H A D | gas.min.js.map | 1 …_config","parserConfig","custom","lineCommentStartSymbol","directives",".abort",".align",".altmacr…
|
H A D | mllike.min.js.map | 1 …_config","parserConfig","words","as","do","else","end","exception","fun","functor","if","in","incl…
|
H A D | dylan.min.js.map | 1 …_config","words","unnamedDefinition","namedDefinition","typeParameterizedDefinition","otherParamet…
|
/plugin/davcal/fullcalendar-3.10.5/ |
H A D | moment.js | 360 this._config = config; 1884 parentConfig = locales[name]._config; 1887 parentConfig = locales[config.parentLocale]._config; 1927 parentConfig = tmpLocale._config;
|
/plugin/bpmnio/vendor/dmn-js/dist/ |
H A D | dmn-viewer.production.min.js | 10 */function lo(e){var t=Lt('<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;">'+ao+"</a>");e.appendChild(t),Rt.bind(t,"click",(function(e){!function(){uo||(uo=Lt(po),Nt.bind(uo,".backdrop","click",(function(e){document.body.removeChild(uo)})));document.body.appendChild(uo)}(),e.preventDefault()}))}class co extends oo{constructor(e,t){super(e,t),this.node=null}componentDidMount(){lo(this.node)}render(){return zi(1,"div",null,null,1,null,null,(e=>this.node=e))}}function ho(e){return e.join(";")}var uo,po='<div class="bjs-powered-by-lightbox" style="'+ho(["z-index: 1001","position: fixed","top: 0","left: 0","right: 0","bottom: 0"])+'"><div class="backdrop" style="'+ho(["width: 100%","height: 100%","background: rgba(40,40,40,0.2)"])+'"></div><div class="notice" style="'+ho(["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;">'+ao+'</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>';var fo=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),s="";for(r=0;r<Math.floor(i);r++){s=Math.floor(Math.random()*n).toString(n)+s}if(o){var a=Math.pow(n,o);s=Math.floor(Math.random()*a).toString(n)+s}var l=parseInt(s,n);return l!==1/0&&l>=Math.pow(2,e)?t(e,n):s};t.rack=function(e,n,i){var r=function(r){var s=0;do{if(s++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var a=t(e,n)}while(Object.hasOwnProperty.call(o,a));return o[a]=r,a},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 go(e){if(!(this instanceof go))return new go(e);e=e||[128,36,1],this._seed=e.length?fo.rack(e[0],e[1],e[2]):e}go.prototype.next=function(e){return this._seed(e||!0)},go.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},go.prototype.claim=function(e,t){this._seed.set(e,t||!0)},go.prototype.assigned=function(e){return this._seed.get(e)||!1},go.prototype.unclaim=function(e){delete this._seed.hats[e]},go.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};var mo=new go,yo="hsl(225, 10%, 15%)";function vo(e,t,n,i,o,s){sn.call(this,t);var a=mo.next(),l=i.computeStyle,c={},h=e&&e.defaultFillColor||"white",u=e&&e.defaultStrokeColor||yo,d=e&&e.defaultLabelColor;function p(e,t,n){var i=e+"-"+bo(t)+"-"+bo(n)+"-"+a;return c[i]||function(e,t,n,i){if("association-start"===t){var r=vn("path");un(r,{d:"M 11 5 L 1 10 L 11 15"}),f(e,{element:r,attrs:{fill:"none",stroke:i,strokeWidth:1.5},ref:{x:1,y:10},scale:.5})}else if("association-end"===t){var o=vn("path");un(o,{d:"M 1 5 L 11 10 L 1 15"}),f(e,{element:o,attrs:{fill:"none",stroke:i,strokeWidth:1.5},ref:{x:12,y:10},scale:.5})}else if("information-requirement-end"===t){var s=vn("path");un(s,{d:"M 1 5 L 11 10 L 1 15 Z"}),f(e,{element:s,attrs:{fill:i,stroke:"none"},ref:{x:11,y:10},scale:1})}else if("knowledge-requirement-end"===t){var a=vn("path");un(a,{d:"M 1 3 L 11 10 L 1 17"}),f(e,{element:a,attrs:{fill:"none",stroke:i,strokeWidth:2},ref:{x:11,y:10},scale:.8})}else if("authority-requirement-end"===t){var l=vn("circle");un(l,{cx:3,cy:3,r:3}),f(e,{element:l,attrs:{fill:i,stroke:"none"},ref:{x:3,y:3},scale:.9})}}(i,e,0,n),"url(#"+i+")"}function f(e,t){var n=b({strokeWidth:1,strokeLinecap:"round",strokeDasharray:"none"},t.attrs),i=t.ref||{x:0,y:0},r=t.scale||1;"none"===n.strokeDasharray&&(n.strokeDasharray=[1e4,1]);var o=vn("marker");un(t.element,n),an(o,t.element),un(o,{id:e,viewBox:"0 0 20 20",refX:i.x,refY:i.y,markerWidth:20*r,markerHeight:20*r,orient:"auto"});var a=It("defs",s._svg);a||(a=vn("defs"),an(s._svg,a)),an(a,o),c[e]=o}function g(e,t,n,i,o,s){r(o)&&(s=o,o=0),o=o||0,s=l(s,{stroke:yo,strokeWidth:2,fill:"white"});var a=vn("rect");return un(a,{x:o,y:o,width:t-2*o,height:n-2*o,rx:i,ry:i}),un(a,s),an(e,a),a}function m(e,t,n){var i=o.createText(t||"",n);return bt(i,"class","djs-label"),an(e,i),i}function y(e,t,n,i){var r=function(e){return vi(e).name}(t);return m(e,r,i=b({box:t,align:n,padding:5,style:{fill:_o(t,d,u)}},i))}function v(e,t,n){n=l(n,["no-fill"],{strokeWidth:2,stroke:yo});var i=vn("path");return un(i,{d:t}),un(i,n),an(e,i),i}var w={"dmn:Decision":function(e,t){var n=g(e,t.width,t.height,0,{stroke:xo(t,u),fill:ko(t,h)});return y(e,t,"center-middle"),n},"dmn:KnowledgeSource":function(e,t){var i=v(e,n.getScaledPath("KNOWLEDGE_SOURCE",{xScaleFactor:1.021,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.075}}),{strokeWidth:2,fill:ko(t,h),stroke:xo(t,u)});return y(e,t,"center-middle"),i},"dmn:BusinessKnowledgeModel":function(e,t){var i=v(e,n.getScaledPath("BUSINESS_KNOWLEDGE_MODEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.3}}),{strokeWidth:2,fill:ko(t,h),stroke:xo(t,u)});return y(e,t,"center-middle"),i},"dmn:InputData":function(e,t){var n=g(e,t.width,t.height,22,{stroke:xo(t,u),fill:ko(t,h)});return y(e,t,"center-middle"),n},"dmn:TextAnnotation":function(e,t){var i=g(e,t.width,t.height,0,0,{fill:"none",stroke:"none"});return v(e,n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:0}}),{stroke:xo(t,u)}),m(e,wo(t).text||"",{style:{fill:_o(t,d,u)},box:t,align:"left-top",padding:5}),i},"dmn:Association":function(e,t){var n=wo(t),i=ko(t,h),r=xo(t,u),o={stroke:r,strokeDasharray:"0.5, 5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"};return"One"!==n.associationDirection&&"Both"!==n.associationDirection||(o.markerEnd=p("association-end",i,r)),"Both"===n.associationDirection&&(o.markerStart=p("association-start",i,r)),x(e,t.waypoints,o)},"dmn:InformationRequirement":function(e,t){var n=ko(t,h),i=xo(t,u),r={stroke:i,strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round",markerEnd:p("information-requirement-end",n,i)};return x(e,t.waypoints,r)},"dmn:KnowledgeRequirement":function(e,t){var n=ko(t,h),i=xo(t,u),r={stroke:i,strokeWidth:1,strokeDasharray:5,strokeLinecap:"round",strokeLinejoin:"round",markerEnd:p("knowledge-requirement-end",n,i)};return x(e,t.waypoints,r)},"dmn:AuthorityRequirement":function(e,t){var n=ko(t,h),i=xo(t,u),r={stroke:i,strokeWidth:1.5,strokeDasharray:5,strokeLinecap:"round",strokeLinejoin:"round",markerEnd:p("authority-requirement-end",n,i)};return x(e,t.waypoints,r)}};function x(e,t,n){var i=Bn(t,n=l(n,["no-fill"],{stroke:yo,strokeWidth:2,fill:"none"}));return an(e,i),i}this.canRender=function(e){return yi(e,"dmn:DMNElement")||yi(e,"dmn:InformationRequirement")||yi(e,"dmn:KnowledgeRequirement")||yi(e,"dmn:AuthorityRequirement")},this.drawShape=function(e,t){var n=w[t.type];return n?n(e,t):sn.prototype.drawShape.apply(this,[e,t])},this.drawConnection=function(e,t){var n=t.type,i=w[n];return i?i(e,t):sn.prototype.drawConnection.apply(this,[e,t])}}function wo(e){return e.businessObject}function bo(e){return e.replace(/[^0-9a-zA-z]+/g,"_")}function xo(e,t){return t}function ko(e,t){return t}function _o(e,t,n){return t||xo(0,n)}rn(vo,sn),vo.$inject=["config.drdRenderer","eventBus","pathMap","styles","textRenderer","canvas"];var So=0,Co={width:150,height:50};function Eo(e,t){var n;t.textContent=e;try{var i,r=""===e;return t.textContent=r?"dummy":e,i={width:(n=t.getBBox()).width+2*n.x,height:n.height},r&&(i.width=0),i}catch(e){return console.log(e),{width:0,height:0}}}function Mo(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=Eo(o,n)).width=o?i.width:0," "===o||""===o||i.width<Math.round(t)||o.length<2)return Ao(e,o,r,i);o=Ro(o,i.width,t)}}function Ao(e,t,n,i){if(t.length<n.length){var r=n.slice(t.length).trim();e.unshift(r)}return{width:i.width,height:i.height,text:t}}var Do="";function Ro(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!==Do||r.pop();break}r.push(n),o+=n.length}var s=r[r.length-1];return s&&s===Do&&(r[r.length-1]="-"),r.join("")}(e,i);return r||(r=e.slice(0,Math.max(Math.round(i-1),1))),r}function Oo(e){this._config=b({},{size:Co,padding:So,style:{},align:"center-top"},e||{})}Oo.prototype.createText=function(e,t){return this.layoutText(e,t).element},Oo.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},Oo.prototype.layoutText=function(e,t){var n=b({},this._config.size,t.box),i=b({},this._config.style,t.style),o=function(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}(t.align||this._config.align),s=function(e){return r(e)?b({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,l=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(i),c=e.split(/\u00AD?\r?\n/),h=[],p=n.width-s.left-s.right,f=vn("text");for(un(f,{x:0,y:0}),un(f,i),an(function(){var e=document.getElementById("helper-svg");return e||(un(e=vn("svg"),{id:"helper-svg"}),wt(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}(),f);c.length;)h.push(Mo(c,p,f));"middle"===o.vertical&&(s.top=s.bottom=0);var g=d(h,(function(e,t,n){return e+(l||t.height)}),0)+s.top+s.bottom,m=d(h,(function(e,t,n){return t.width>e?t.width:e}),0),y=s.top;"middle"===o.vertical&&(y+=(n.height-g)/2),y-=(l||h[0].height)/4;var v=vn("text");return un(v,i),u(h,(function(e){var t;switch(y+=l||e.height,o.horizontal){case"left":t=s.left;break;case"right":t=(a?m:p)-s.right-e.width;break;default:t=Math.max(((a?m:p)-e.width)/2+s.left,0)}var n=vn("tspan");un(n,{x:t,y:y}),n.textContent=e.text,an(v,n)})),An(f),{dimensions:{width:m,height:g},element:v}};function To(e){var t=b({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=b({},t,{fontSize:n},e&&e.externalStyle||{}),r=new Oo({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}}To.$inject=["config.textRenderer"];var No=/\{([^{}]+)\}/g,Po=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var qo={__init__:["drdRenderer"],drdRenderer:["type",vo],textRenderer:["type",To],pathMap:["type",function(){this.pathMap={KNOWLEDGE_SOURCE:{d:"m {mx},{my} l 0,{e.y0} c {e.x0},{e.y1} {e.x1},-{e.y2} {e.x2},-{e.y3} c {e.x3},-{e.y4} {e.x4},{e.y5} {e.x5},{e.y6} l 0,-{e.y7}z",width:100,height:65,widthElements:[29.8,48.4,67.2,12.2,19.8,30.8],heightElements:[55.3,19.7,4.2,6.7,2.3,1.6,6.2,54.6]},BUSINESS_KNOWLEDGE_MODEL:{d:"m {mx},{my} l {e.x0},-{e.y0} l {e.x1},0 l 0,{e.y1} l -{e.x2},{e.y2} l -{e.x3},0z",width:125,height:45,widthElements:[13.8,109.2,13.8,109.1],heightElements:[13.2,29.8,13.2]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",width:10,height:30,widthElements:[10],heightElements:[30]}},this.getRawPath=function(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var n,i,r=this.pathMap[e];t.abspos?(n=t.abspos.x,i=t.abspos.y):(n=t.containerWidth*t.position.mx,i=t.containerHeight*t.position.my);var o={};if(t.position){for(var s=t.containerHeight/r.height*t.yScaleFactor,a=t.containerWidth/r.width*t.xScaleFactor,l=0;l<r.heightElements.length;l++)o["y"+l]=r.heightElements[l]*s;for(var c=0;c<r.widthElements.length;c++)o["x"+c]=r.widthElements[c]*a}var h,u,d=(h=r.d,u={mx:n,my:i,e:o},String(h).replace(No,(function(e,t){return function(e,t,n){var i=n;return t.replace(Po,(function(e,t,n,r,o){t=t||r,i&&(t in i&&(i=i[t]),"function"==typeof i&&o&&(i=i()))})),i=(null==i||i==n?e:i)+""}(e,t,u)})));return d}}]};function Bo(e,t,n,i){this._eventBus=e,this._canvas=t,this._elementRegistry=i,this._elementFactory=n}function Lo(e,t){return b({id:e.id,type:e.$type,businessObject:e},t)}function Io(e){return e.split("#").pop()}Bo.$inject=["eventBus","canvas","elementFactory","elementRegistry"],Bo.prototype.root=function(e){var t=this._elementFactory.createRoot(Lo(e));return this._canvas.setRootElement(t),t},Bo.prototype.add=function(e){var t,n,i,r,o,s,a=this._elementFactory,l=this._canvas,c=this._eventBus,h=e.di;if(h.$instanceOf("dmndi:DMNShape"))s=h.bounds,o=Lo(e,{x:Math.round(s.x),y:Math.round(s.y),width:Math.round(s.width),height:Math.round(s.height)}),t=a.createShape(o),l.addShape(t),c.fire("drdElement.added",{element:t,di:h});else{if(!h.$instanceOf("dmndi:DMNEdge"))throw new Error("unknown di for element "+e.id);n=function(e){var t=e.waypoint;if(t)return function(e,t){let n=[];return u(e,(function(e,i){n.push(t(e,i))})),n}(t,(function(e){var t={x:e.x,y:e.y};return b({original:t},t)}))}(h),i=this._getSource(e),r=this._getTarget(e),i&&r&&(o=Lo(e,{hidden:!1,source:i,target:r,waypoints:n}),t=a.createConnection(o),l.addConnection(t),c.fire("drdElement.added",{element:t,di:h}))}return t},Bo.prototype._getSource=function(e){var t,n;if(yi(e,"dmn:Association")?n=e.sourceRef:yi(e,"dmn:InformationRequirement")?n=e.requiredDecision||e.requiredInput:yi(e,"dmn:KnowledgeRequirement")?n=e.requiredKnowledge:yi(e,"dmn:AuthorityRequirement")&&(n=e.requiredDecision||e.requiredInput||e.requiredAuthority),n&&(t=n.href),t)return this._getShape(Io(t))},Bo.prototype._getTarget=function(e){return yi(e,"dmn:Association")?e.targetRef&&this._getShape(Io(e.targetRef.href)):this._getShape(e.$parent.id)},Bo.prototype._getShape=function(e){return this._elementRegistry.get(e)};var Fo={__depends__:[qo,{drdImporter:["type",Bo]}]};var jo={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]};function Vo(e){return e.originalEvent||e.srcEvent}function $o(e,t){return(Vo(e)||e).button===t}function zo(e){return $o(e,0)}function Ho(e){return!0}function Wo(e){return zo(e)||function(e){return $o(e,1)}(e)}function Uo(e,t,n){var i=this;function r(n,i,r){var o,s;(function(e,t){var n=l[e]||zo;return!n(t)})(n,i)||(r?s=t.getGraphics(r):(o=i.delegateTarget||i.target)&&(s=o,r=t.get(s)),s&&r&&!1===e.fire(n,{element:r,gfx:s,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var o={};function s(e){return o[e]}var a={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},l={"element.contextmenu":Ho,"element.mousedown":Wo,"element.mouseup":Wo,"element.click":Wo,"element.dblclick":Wo};var c="svg, .djs-element";function h(e,t,n,i){var s=o[n]=function(e){r(n,e)};i&&(l[n]=i),s.$delegate=Nt.bind(e,c,t,s)}function d(e,t,n){var i=s(n);i&&Nt.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){!function(e){u(a,(function(t,n){d(e,n,t)}))}(e.svg)})),e.on("canvas.init",(function(e){!function(e){u(a,(function(t,n){h(e,n,t)}))}(e.svg)})),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 p=m("djs-hit djs-hit-stroke"),f=m("djs-hit djs-hit-click-stroke"),g={all:m("djs-hit djs-hit-all"),"click-stroke":f,stroke:p,"no-move":m("djs-hit djs-hit-no-move")};function m(e,t){return t=b({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function y(e,t){var n=g[t];if(!n)throw new Error("invalid hit type <"+t+">");return un(e,n),e}function v(e,t){an(e,t)}this.removeHits=function(e){var t;u((t=".djs-hit",(e||document).querySelectorAll(t)),An)},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=Bn(t);return y(n,"stroke"),v(e,n),n},this.createBoxHit=function(e,t,n){n=b({x:0,y:0},n);var i=vn("rect");return y(i,t),un(i,n),v(e,i),i},this.updateDefaultHit=function(e,t){var n=It(".djs-hit",t);if(n)return e.waypoints?Ln(n,e.waypoints):un(n,{width:e.width,height:e.height}),n},this.fire=r,this.triggerMouseEvent=function(e,t,n){var i=a[e];if(!i)throw new Error("unmapped DOM event name <"+e+">");return r(i,t,n)},this.mouseHandler=s,this.registerEvent=h,this.unregisterEvent=d}Uo.$inject=["eventBus","elementRegistry","styles"];var Go={__init__:["interactionEvents"],interactionEvents:["type",Uo]};function Ko(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)}))}Ko.$inject=["eventBus","canvas"],Ko.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})}},Ko.prototype.get=function(){return this._selectedElements},Ko.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},Ko.prototype.select=function(e,t){var n=this._selectedElements,r=n.slice();i(e)||(e=e?[e]:[]);var o=this._canvas,s=o.getRootElement();e=e.filter((function(e){var t=o.findRoot(e);return s===t})),t?u(e,(function(e){-1===n.indexOf(e)&&n.push(e)})):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:n})};var Xo="hover",Yo="selected";function Jo(e,t){function n(t,n){e.addMarker(t,n)}function i(t,n){e.removeMarker(t,n)}this._canvas=e,t.on("element.hover",(function(e){n(e.element,Xo)})),t.on("element.out",(function(e){i(e.element,Xo)})),t.on("selection.changed",(function(e){var t=e.oldSelection,r=e.newSelection;u(t,(function(e){-1===r.indexOf(e)&&i(e,Yo)})),u(r,(function(e){-1===t.indexOf(e)&&n(e,Yo)}))}))}function Qo(e,t,n,r){e.on("create.end",500,(function(e){var n=e.context,r=n.canExecute,o=n.elements,s=(n.hints||{}).autoSelect;if(r){if(!1===s)return;i(s)?t.select(s):t.select(o.filter(Zo))}})),e.on("connect.end",500,(function(e){var n=e.context.connection;n&&t.select(n)})),e.on("shape.move.end",500,(function(e){var n=e.previousSelection||[],i=r.get(e.context.shape.id);c(n,(function(e){return i.id===e.id}))||t.select(i)})),e.on("element.click",(function(e){if(zo(e)){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,s=function(e){var t=Vo(e)||e;return zo(e)&&t.shiftKey}(e);if(r&&o)return s?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,s)}}))}function Zo(e){return!e.hidden}Jo.$inject=["canvas","eventBus"],Qo.$inject=["eventBus","selection","canvas","elementRegistry"];var es={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Go],selection:["type",Ko],selectionVisuals:["type",Jo],selectionBehavior:["type",Qo]};function ts(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}ts.prototype.next=function(){return this._prefix+ ++this._counter};var ns=new ts("ov");function is(e,t,n,i){var r,o;this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=ns,this._overlayDefaults=b({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(r=n.getContainer(),wt(o=Lt('<div class="djs-overlay-container" />'),{position:"absolute",width:0,height:0}),r.insertBefore(o,r.firstChild),o),this._init()}function rs(e,t,n){wt(e,{left:t+"px",top:n+"px"})}function os(e,t){e.style.display=!1===t?"none":""}function ss(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}is.$inject=["config.overlays","eventBus","canvas","elementRegistry"],is.prototype.get=function(e){if(a(e)&&(e={id:e}),a(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?h(t.overlays,f({type:e.type})):t.overlays.slice():[]}return e.type?h(this._overlays,f({type:e.type})):e.id?this._overlays[e.id]:null},is.prototype.add=function(e,t,n){if(r(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=b({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},is.prototype.remove=function(e){var t=this.get(e)||[];i(t)||(t=[t]);var n=this;u(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(Ft(e.html),Ft(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)}}))},is.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},is.prototype.show=function(){os(this._overlayRoot)},is.prototype.hide=function(){os(this._overlayRoot,!1)},is.prototype.clear=function(){this._overlays={},this._overlayContainers=[],St(this._overlayRoot)},is.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var o=In(t);i=o.x,r=o.y}rs(n,i,r),bt(e.html,"data-container-id",t.id)},is.prototype._updateOverlay=function(e){var t,n,i=e.position,r=e.htmlContainer,o=e.element,s=i.left,a=i.top;void 0!==i.right&&(t=o.waypoints?In(o).width:o.width,s=-1*i.right+t);void 0!==i.bottom&&(n=o.waypoints?In(o).height:o.height,a=-1*i.bottom+n);rs(r,s||0,a||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},is.prototype._createOverlayContainer=function(e){var t=Lt('<div class="djs-overlays" />');wt(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},is.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";ss(this._overlayRoot,n)},is.prototype._getOverlayContainer=function(e,t){var n=c(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},is.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)),a(o)&&(o=Lt(o)),n=this._getOverlayContainer(r),wt(t=Lt('<div class="djs-overlay" data-overlay-id="'+i+'">'),{position:"absolute"}),t.appendChild(o),e.type&&kt(t).add("djs-overlay-"+e.type),os(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())},is.prototype._updateOverlayVisibilty=function(e,t){var i=e.show,r=this._canvas.findRoot(e.element),o=i&&i.minZoom,s=i&&i.maxZoom,a=e.htmlContainer,l=!0;(r!==this._canvas.getRootElement()||i&&(n(o)&&o>t.scale||n(s)&&s<t.scale))&&(l=!1),os(a,l),this._updateOverlayScale(e,t)},is.prototype._updateOverlayScale=function(e,t){var i,r,o,s=e.scale,a=e.htmlContainer,l="";!0!==s&&(!1===s?(i=1,r=1):(i=s.min,r=s.max),n(i)&&t.scale<i&&(o=(1/t.scale||1)*i),n(r)&&t.scale>r&&(o=(1/t.scale||1)*r)),n(o)&&(l="scale("+o+","+o+")"),ss(a,l)},is.prototype._updateOverlaysVisibilty=function(e){var t=this;u(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},is.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;u(t.get({element:n}),(function(e){t.remove(e.id)}));var i=t._getOverlayContainer(n);if(i){Ft(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&&(u(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&&kt(n.html)[e.add?"add":"remove"](e.marker)})),e.on("root.set",(function(){t._updateOverlaysVisibilty(t._canvas.viewbox())})),e.on("diagram.clear",this.clear,this)};var as={__init__:["overlays"],overlays:["type",is]};function ls(e,t,n){this._eventBus=e,this._canvas=t,this._translate=n,e.on("diagram.init",(function(){this._init()}),this),e.on("import.done",(function(e){e.error||this.update()}),this),this.HTML_MARKUP='<div class="dmn-definitions"><div class="dmn-definitions-name" title="'+this._translate("Definition name")+'" spellcheck="false"></div><div class="dmn-definitions-id" title="'+this._translate("Definition ID")+'" spellcheck="false"></div></div>'}function cs(e,t){function n(e,n){kt(t.getContainer()).toggle(e,n)}e.on("palette.create",(function(){n("with-palette",!0)})),e.on("palette.changed",(function(e){n("with-palette-two-column",e.twoColumn)}))}ls.$inject=["eventBus","canvas","translate"],ls.prototype._init=function(){var e=this._canvas,t=this._eventBus,n=e.getContainer(),i=this._container=Lt(this.HTML_MARKUP);n.appendChild(i),this.nameElement=It(".dmn-definitions-name",this._container),this.idElement=It(".dmn-definitions-id",this._container),Nt.bind(i,".dmn-definitions-name, .dmn-definitions-id","mousedown",(function(e){e.stopPropagation()})),t.fire("definitionIdView.create",{html:i})},ls.prototype.update=function(){var e=this._canvas.getRootElement().businessObject;this.nameElement.textContent=e.name,this.idElement.textContent=e.id},cs.$inject=["eventBus","canvas"];var hs={__depends__:[jo],__init__:["definitionPropertiesView","definitionPropertiesPaletteAdapter"],definitionPropertiesView:["type",ls],definitionPropertiesPaletteAdapter:["type",cs]},us=[{className:"dmn-icon-decision-table",matches:function(e){var t=vi(e);return yi(t,"dmn:Decision")&&yi(t.decisionLogic,"dmn:DecisionTable")},title:"Open decision table"},{className:"dmn-icon-literal-expression",matches:function(e){return yi(wi(e),"dmn:LiteralExpression")},title:"Open literal expression"}];class ds{constructor(e,t,n,i,r){this._injector=e,this._eventBus=t,this._overlays=n,this._translate=r,this._config=i||{enabled:!0},t.on(["shape.added"],(({element:e})=>{for(let t=0;t<us.length;t++){const{matches:n,className:i,title:r}=us[t];n&&n(e)&&this.addOverlay(e,i,r)}}))}addOverlay(e,t,n){const i=!1!==this._config.enabled,r=this._getOverlayNode(t,n,i),o=this._overlays.add(e,{position:{top:2,left:2},html:r});i&&(kt(r).add("interactive"),this.bindEventListener(e,r,o))}_getOverlayNode(e,t,n){const i=document.createElement("div");if(i.className="drill-down-overlay",!n){const t=document.createElement("span");return t.className=e,i.appendChild(t),i}const r=document.createElement("button");return r.type="button",r.className=e,r.title=this._translate(t),i.appendChild(r),i}bindEventListener(e,t,n){const i=this._overlays,r=this._eventBus,o=i._overlayRoot;Nt.bind(o,'[data-overlay-id="'+n+'"]',"click",(()=>{!1!==r.fire("drillDown.click",{element:e})&&this.drillDown(e)}))}drillDown(e){const t=this._injector.get("_parent",!1);if(!t)return!1;const n=t.getView(e.businessObject);return!!n&&(t.open(n),!0)}}ds.$inject=["injector","eventBus","overlays","config.drillDown","translate"];var ps={__depends__:[as,jo],__init__:["drillDown"],drillDown:["type",ds]}; 16 */function fs(e){this._container=this._createContainer(),lo(this._container),this._init(this._container,e)}rn(fs,mi),fs.prototype.saveSVG=jt((function(e){var t=this;return new Promise((function(e){var n=t.get("canvas"),i=n.getActiveLayer(),r=It("defs",n._svg),o=Mn(i),s=r&&r.outerHTML||"",a=i.getBBox();e({svg:'<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- created with dmn-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="'+a.width+'" height="'+a.height+'" viewBox="'+a.x+" "+a.y+" "+a.width+" "+a.height+'" version="1.1">'+s+o+"</svg>"})}))})),fs.prototype.getModules=function(){return this._modules},fs.prototype.destroy=function(){mi.prototype.destroy.call(this),Ft(this._container)},fs.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},fs.prototype.off=function(e,t){this.get("eventBus").off(e,t)},fs.prototype._init=function(e,t){var{additionalModules:n,canvas:i,...r}=t,o={...r,canvas:{...i,container:e},modules:[...[{drd:["value",this]}],...t.modules||this.getModules(),...n||[]]};mi.call(this,o),t&&t.container&&this.attachTo(t.container)},fs.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},fs.prototype._createContainer=function(){return Lt('<div class="dmn-drd-container"></div>')},fs.prototype.open=function(e){var t=this;return new Promise(((n,i)=>{var r;try{return t._definitions&&t.clear(),t._definitions=e,function(e,t,n){var i,r=e.get("drdImporter"),o=e.get("eventBus"),s=[];o.fire("import.start",{definitions:t});try{!function(e){new xi({root:function(e){return r.root(e)},element:function(e,t){return r.add(e,t)},error:function(e,t){s.push({message:e,context:t})}}).handleDefinitions(e)}(t)}catch(e){i=e}o.fire("import.done",{error:i,warnings:s}),n(i,s)}(t,e,(function(e,t){e?(e.warnings=t||[],i(e)):n({warnings:t||[]})}))}catch(e){r=e}r?(r.warnings=r.warnings||[],i(r)):n({warnings:[]})}))},fs.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach();var t=this._container;e.appendChild(t),this._emit("attach",{}),this.get("canvas").resized()},fs.prototype.detach=function(){var e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},fs.prototype._modules=[Fo,jo,es,as,hs,ps];class gs{constructor(e){b(this,e),ys(this,"businessObject",{writable:!0})}}const ms={root:class extends gs{constructor(e){super(e),ys(this,"rows",{enumerable:!0,value:this.rows||[]}),ys(this,"cols",{enumerable:!0,value:this.cols||[]})}},row:class extends gs{constructor(e){super(e),ys(this,"root",{writable:!0}),ys(this,"cells",{enumerable:!0,value:this.cells||[]})}},col:class extends gs{constructor(e){super(e),ys(this,"root",{writable:!0}),ys(this,"cells",{enumerable:!0,value:this.cells||[]})}},cell:class extends gs{constructor(e){super(e),ys(this,"row",{writable:!0}),ys(this,"col",{writable:!0})}}};function ys(e,t,n){Object.defineProperty(e,t,n)}let vs=class{constructor(e){this._eventBus=e,this._elements={},e.on("table.clear",this.clear.bind(this))}add(e,t){const{id:n}=e;this._elements[n]=e}remove(e){const t=e.id||e;delete this._elements[t]}get(e){return this._elements[e]}getAll(){return ws(this._elements)}forEach(e){ws(this._elements).forEach((t=>e(t)))}filter(e){return ws(this._elements).filter((t=>e(t)))}clear(){this._elements={}}updateId(e,t){this._validateId(t),"string"==typeof e&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t}),this.remove(e),e.id=t,this.add(e)}_validateId(e){if(!e)throw new Error("element must have an id");if(this._elements[e])throw new Error("element with id "+e+" already added")}};function ws(e){return Object.keys(e).map((function(t){return e[t]}))}vs.$inject=["eventBus"];let bs=class{constructor(e){this._listeners={},e.on("elements.changed",(({elements:e})=>{this.elementsChanged(e)})),e.on("root.remove",(t=>{const n=t.root.id;this._listeners[n]&&e.once("root.add",(e=>{const t=e.root.id;this.updateId(n,t)}))})),e.on("element.updateId",(({element:e,newId:t})=>{this.updateId(e.id,t)}))}elementsChanged(e){const t={},n=e.length;for(let i=0;i<n;i++){const{id:n}=e[i];if(t[n])return;t[n]=!0;const r=this._listeners[n]&&this._listeners[n].length;if(r)for(let e=0;e<r;e++)this._listeners[n][e]&&this._listeners[n][e]()}}onElementsChanged(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e][this._listeners[e].length]=t}offElementsChanged(e,t){if(this._listeners[e])if(t){const n=this._listeners[e].indexOf(t);-1!==n&&this._listeners[e].splice(n,1)}else this._listeners[e].length=0}updateId(e,t){this._listeners[e]&&(this._listeners[t]=this._listeners[e],delete this._listeners[e])}};bs.$inject=["eventBus"];class xs extends oo{constructor(e){super(e);const t=this._injector=e.injector;this._sheet=t.get("sheet"),this._changeSupport=t.get("changeSupport"),this._components=t.get("components"),this._eventBus=t.get("eventBus");const n=t.get("throttle");this.onElementsChanged=this.onElementsChanged.bind(this),this.onScroll=n(this.onScroll.bind(this))}onElementsChanged(){this.forceUpdate()}onScroll(){this._eventBus.fire("sheet.scroll")}getChildContext(){return{changeSupport:this._changeSupport,components:this._components,injector:this._injector}}componentWillMount(){const{id:e}=this._sheet.getRoot();this._changeSupport.onElementsChanged(e,this.onElementsChanged)}componentWillUnmount(){const{id:e}=this._sheet.getRoot();this._changeSupport.offElementsChanged(e,this.onElementsChanged)}render(){const{rows:e,cols:t}=this._sheet.getRoot(),n=this._components.getComponents("table.before"),i=this._components.getComponents("table.after"),r=this._components.getComponent("table.head"),o=this._components.getComponent("table.body"),s=this._components.getComponent("table.foot");return zi(1,"div","tjs-container",[n&&n.map(((e,t)=>Hi(2,e,null,t))),zi(1,"div","tjs-table-container",zi(1,"table","tjs-table",[r&&Hi(2,r,{rows:e,cols:t}),o&&Hi(2,o,{rows:e,cols:t}),s&&Hi(2,s,{rows:e,cols:t})],0),2,{onScroll:this.onScroll}),i&&i.map(((e,t)=>Hi(2,e,null,t)))],0)}}let ks=class{constructor(e,t,n,i,r){const{container:o}=n;this._container=o,i.on("root.added",(()=>{eo(Hi(2,xs,{injector:r}),o)})),i.on("root.remove",(()=>{eo(null,o)}))}getContainer(){return this._container}};ks.$inject=["changeSupport","components","config.renderer","eventBus","injector"];var _s={__init__:["changeSupport","components","renderer"],changeSupport:["type",bs],components:["type",class{constructor(){this._listeners={}}getComponent(e,t){const n=this._listeners[e];if(!n)return;let i;for(let e=0;e<n.length&&(i=n[e].callback(t),!i);e++);return i}getComponents(e,t){const n=this._listeners[e],i=[];if(!n)return i;for(let e=0;e<n.length;e++){const r=n[e].callback(t);r&&i.push(r)}return i.length,i}onGetComponent(e,t,n){if(s(t)&&(n=t,t=1e3),!o(t))throw new Error("priority must be a number");const i=this._getListeners(e);let r,a;const l={priority:t,callback:n};for(a=0;r=i[a];a++)if(r.priority<t)return void i.splice(a,0,l);i.push(l)}offGetComponent(e,t){const n=this._getListeners(e);let i,r,o;if(t)for(o=n.length-1;i=n[o];o--)r=i.callback,r===t&&n.splice(o,1);else n.length=0}_getListeners(e){let t=this._listeners[e];return t||(this._listeners[e]=t=[]),t}}],renderer:["type",ks]};class Ss{constructor(e,t){this._elementRegistry=e,this._eventBus=t,this._root=null,t.on("table.clear",(()=>{this.setRoot(null)}))}setRoot(e){if(this._root){const e=this._root;this._eventBus.fire("root.remove",{root:e}),this._root=null,this._eventBus.fire("root.removed",{root:e})}e&&this._eventBus.fire("root.add",{root:e}),this._root=e,e&&this._eventBus.fire("root.added",{root:e})}getRoot(){return this._root||this.setRoot({id:"__implicitroot",rows:[],cols:[]}),this._root}addRow(e,t){const n=this.getRoot();if(n.cols.length!=e.cells.length)throw new Error("number of cells is not equal to number of cols");return void 0===t&&(t=n.rows.length),Cs(t,n.rows,e),e.root=n,this._elementRegistry.add(e),e.cells.forEach(((i,r)=>{this._elementRegistry.add(i),i.row=e,i.col=n.cols[r],Cs(t,n.cols[r].cells,i)})),this._eventBus.fire("row.add",{row:e}),e}removeRow(e){const t=this.getRoot();"string"==typeof e&&(e=this._elementRegistry.get(e));const n=t.rows.indexOf(e);-1!==n&&(Es(n,t.rows),e.root=void 0,this._elementRegistry.remove(e),e.cells.forEach(((e,i)=>{this._elementRegistry.remove(e),e.col=void 0,Es(n,t.cols[i].cells)})),this._eventBus.fire("row.remove",{row:e}))}addCol(e,t){const n=this.getRoot();if(this._elementRegistry.add(e),n.rows.length!=e.cells.length)throw new Error("number of cells is not equal to number of rows");return void 0===t&&(t=n.cols.length),Cs(t,n.cols,e),e.root=n,e.cells.forEach(((i,r)=>{this._elementRegistry.add(i),i.col=e,i.row=n.rows[r],Cs(t,n.rows[r].cells,i)})),this._eventBus.fire("col.add",{col:e}),e}removeCol(e){const t=this.getRoot();"string"==typeof e&&(e=this._elementRegistry.get(e));const n=t.cols.indexOf(e);-1!==n&&(Es(n,t.cols),e.root=void 0,this._elementRegistry.remove(e),e.cells.forEach(((e,i)=>{this._elementRegistry.remove(e),e.row=void 0,Es(n,t.rows[i].cells)})),this._eventBus.fire("col.remove",{col:e}))}resized(){this._eventBus.fire("sheet.resized")}}function Cs(e,t,n){return t.splice(e,0,n)}function Es(e,t){return t.splice(e,1)}function Ms(e=!0){const t="number"==typeof e?e:e?300:0;return t?e=>function(e,t){let n=!1;return function(...i){n||(e(...i),n=!0,setTimeout((()=>{n=!1}),t))}}(e,t):e=>e}Ss.$inject=["elementRegistry","eventBus"],Ms.$inject=["config.throttle"];var As={__depends__:[_s],__init__:["elementFactory","sheet"],elementFactory:["type",class{constructor(){this._uid=12}create(e,t={}){return t.id||(t.id=e+"_"+this._uid++),function(e,t){const n=ms[e];if(!n)throw new Error("unknown type "+e);return new n(t)}(e,t)}createRoot(e){return this.create("root",e)}createRow(e){return this.create("row",e)}createCol(e){return this.create("col",e)}createCell(e){return this.create("cell",e)}}],elementRegistry:["type",vs],eventBus:["type",_],sheet:["type",Ss],throttle:["factory",Ms]};class Ds{constructor(e={}){let{injector:t}=e;if(!t){let{modules:n,config:i}=this._init(e);t=function(e,t){const n=[{config:["value",e]},As].concat(t||[]),i=new tn(n);return i.init(),i}(i,n)}this.get=t.get,this.invoke=t.invoke,this.get("eventBus").fire("table.init"),this.get("eventBus").fire("diagram.init")}_init(e){let{modules:t,...n}=e;return{modules:t,config:n}}destroy(){const e=this.get("eventBus");e.fire("table.destroy"),e.fire("diagram.destroy")}clear(){const e=this.get("eventBus");e.fire("table.clear"),e.fire("diagram.clear")}}function Rs(e){if(!e)return"<null>";const t=e.id?` id="${e.id}"`:"";return`<${e.$type}${t} />`}function Os(e,t){function n(t,n,i){if(t.gfx)throw new Error(`already rendered ${Rs(t)}`);return e.element(t,n,i)}function i(e,t,i){u(e,(function(e){n(e,t,i)}))}function r(e,t,i){u(e,(function(e){n(e,t,i)}))}return{handleDecision:function(t){t.id||(t.id="decision");const o=t.decisionLogic;if(!o)throw new Error(`no table for ${Rs(t)}`);{if(!o.output)throw new Error(`missing output for ${Rs(o)}`);const t=(c=o,e.table(c));o.input&&i(o.input,t,o),i(o.output,t,o),s=o.rule,a=t,l=o,u(s,(function(e){n(e,a,l),r(e.inputEntry,e),r(e.outputEntry,e)}))}var s,a,l,c}}}function Ts(e,t){const{elements:n,index:i}=e;return i[t]?e:{elements:[...n,t],index:{...i,[t]:!0}}}function Ns(...e){let t={elements:[],index:{}};return e.forEach((function(e){const n=typeof e;"string"===n&&e.length>0?t=Ts(t,e):"object"===n&&null!==e&&Object.keys(e).forEach((function(n){e[n]&&(t=Ts(t,n))}))})),function(e,t){return e.elements.join(t)}(t," ")}function Ps(e){return qs(e.constructor,e)}function qs(e,t){const n=e.$inject;if(!n)return;const{injector:i}=t.context,r=[...n,function(...e){for(const i in e){const r=n[i],o=e[i];t[r]=o}}];i.invoke(r)}function Bs(e,t){Object.keys(t).forEach((function(n){if("$inject"===n||"__init"===n)return;const i=t[n];"constructor"===n&&i.call(e,e.props,e.context);const r=e[n];if(void 0!==r){if("function"!=typeof r)throw new Error(`failed to mixin <${n}>: cannot combine with non-fn component value`);e[n]=function(e,...t){return function(...n){let i;return t.forEach((function(t){if(i=t.call(e,...n),void 0!==i)return!1})),i}.bind(e)}(e,r,i)}else e[n]=i.bind(e)})),"$inject"in t&&qs(t,e),"__init"in t&&t.__init.call(e,e.props,e.context)}const Ls={getSelectionClasses(){const{selected:e,selectedSecondary:t,focussed:n}=this.state;return Ns({selected:e,"selected-secondary":t,focussed:n})},selectionChanged(e){this.setState(e)},componentWillUpdate(e){e.elementId!==this.props.elementId&&this.updateSelectionSubscription(!1)},componentDidUpdate(e){e.elementId!==this.props.elementId&&this.updateSelectionSubscription(!0)},componentDidMount(){this.updateSelectionSubscription(!0)},componentWillUnmount(){this.updateSelectionSubscription(!1)},updateSelectionSubscription(e){const{elementId:t}=this.props;t&&t&&this.eventBus[e?"on":"off"](`selection.${t}.changed`,this.selectionChanged)},$inject:["eventBus"]};class Is extends oo{constructor(e,t){super(e,t),Bs(this,Ls),Ps(this)}getRenderProps(...e){const{className:t,elementId:n,coords:i,...r}=this.props,o={className:Ns(...e,this.getSelectionClasses(),t)};return n&&(o["data-element-id"]=n),i&&(o["data-coords"]=i),{...o,...r}}}class Fs extends Is{constructor(e,t){super(e,t),this.state={}}render(){const{children:e}=this.props;return Ui(zi(1,"td",null,e,0,{...this.getRenderProps("cell")}))}}const js={slotFill(e,t){const{type:n,context:i,...r}=e,o=this.components.getComponent(n,i)||t;return o?Ui(Hi(2,o,{...i,...r})):null},slotFills(e){const{type:t,context:n,...i}=e;return this.components.getComponents(t,n).map((e=>Ui(Hi(2,e,{...n,...i}))))},$inject:["components"]};class Vs extends oo{constructor(e,t){super(e,t),Bs(this,js),Ps(this)}componentDidMount(){this.changeSupport.onElementsChanged(this.getRoot(),this.onElementsChanged)}componentWillUnmount(){this.changeSupport.offElementsChanged(this.getRoot(),this.onElementsChanged)}onElementsChanged=()=>{this.forceUpdate()};getRoot(){return this.sheet.getRoot()}render(){const e=(this.getRoot().businessObject.get("annotationsWidth")||400)+"px";return zi(1,"th","annotation header",[this.slotFills({type:"cell-inner",context:{cellType:"annotations",col:this.sheet.getRoot(),minWidth:400}}),this.translate("Annotations")],0,{style:{width:e}})}}function $s(e){const{row:t}=e,{id:n,description:i}=t.businessObject;return Hi(2,Fs,{className:"annotation",elementId:n,children:i||"-"})}function zs(e){e.onGetComponent("cell",(({cellType:e})=>"after-label-cells"===e?Vs:"after-rule-cells"===e?$s:void 0))}Vs.$inject=["changeSupport","sheet","translate"],zs.$inject=["components"];var Hs={__init__:["annotationsProvider"],annotationsProvider:["type",zs]};function Ws(e,t){return b({id:e.id,type:e.$type,businessObject:e},t)}class Us{constructor(e,t,n){this._elementFactory=e,this._eventBus=t,this._sheet=n}add(e){let t;if(yi(e,"dmn:DecisionTable"))t=this._elementFactory.createRoot(Ws(e)),this._sheet.setRoot(t);else if(yi(e,"dmn:InputClause"))t=this._elementFactory.createCol(Ws(e)),this._sheet.addCol(t);else if(yi(e,"dmn:OutputClause"))t=this._elementFactory.createCol(Ws(e)),this._sheet.addCol(t);else if(yi(e,"dmn:DecisionRule")){e.inputEntry||(e.inputEntry=[]),e.outputEntry||(e.outputEntry=[]);const n=[...e.inputEntry,...e.outputEntry].map((e=>this._elementFactory.createCell(Ws(e))));t=this._elementFactory.createRow(b(Ws(e),{cells:n})),this._sheet.addRow(t)}return this._eventBus.fire("dmnElement.added",{element:t}),t}}Us.$inject=["elementFactory","eventBus","sheet"];var Gs={__depends__:[{__depends__:[jo],tableImporter:["type",Us]},_s]};class Ks extends oo{constructor(e,t){super(e,t),Bs(this,js),this._sheet=t.injector.get("sheet"),this._changeSupport=t.changeSupport}onElementsChanged=()=>{this.forceUpdate()};componentWillMount(){const e=this._sheet.getRoot();this._changeSupport.onElementsChanged(e.id,this.onElementsChanged)}componentWillUnmount(){const e=this._sheet.getRoot();this._changeSupport.offElementsChanged(e.id,this.onElementsChanged)}render(){const e=this._sheet.getRoot();if(!yi(e,"dmn:DMNElement"))return null;const t=vi(e),n=t.input,i=t.output;return zi(1,"thead",null,zi(1,"tr",null,[zi(1,"th","index-column"),this.slotFills({type:"cell",context:{cellType:"before-label-cells"}}),n&&n.map(((e,t)=>{const i=e.width||"192px";return this.slotFill({type:"cell",context:{cellType:"input-header",input:e,index:t,inputsLength:n.length,width:i},key:e.id},Xs)})),i.map(((e,t)=>this.slotFill({type:"cell",context:{cellType:"output-header",output:e,index:t,outputsLength:i.length},key:e.id},Ys))),this.slotFills({type:"cell",context:{cellType:"after-label-cells"}})],0),2)}}function Xs(e,t){const{input:n,className:i,index:r}=e,{label:o,inputExpression:s,inputValues:a}=n,l=t.injector.get("translate");return zi(1,"th",(i||"")+" input-cell",[zi(1,"div","clause",l(0===r?"When":"And"),0),o?zi(1,"div","input-label",o,0,{title:l("Input label: ")+o}):zi(1,"div","input-expression",s.text,0,{title:l("Input expression: ")+s.text}),zi(1,"div","input-variable",a&&a.text||s.typeRef,0,{title:a&&a.text?l("Input values"):l("Input type")})],0,{"data-col-id":n.id},n.id)}function Ys(e,t){const{output:n,className:i,index:r}=e,{label:o,name:s,outputValues:a,typeRef:l}=n,c=t.injector.get("translate");return zi(1,"th",(i||"")+" output-cell",[zi(1,"div","clause",c(0===r?"Then":"And"),0),o?zi(1,"div","output-label",o,0,{title:c("Output label")}):zi(1,"div","output-name",s,0,{title:c("Output name")}),zi(1,"div","output-variable",a&&a.text||l,0,{title:a&&a.text?c("Output values"):c("Output type")})],0,null,n.id)}function Js(e){e.onGetComponent("table.head",(()=>Ks))}Js.$inject=["components"];var Qs={__init__:["decisionTableHeadProvider"],decisionTableHeadProvider:["type",Js]};class Zs extends oo{constructor(e,t){super(e,t),this._translate=t.injector.get("translate"),Ps(this)}render(){const e=this.sheet.getRoot();if(!yi(e,"dmn:DMNElement"))return null;const{name:t}=e.businessObject.$parent,n=this.components.getComponent("hit-policy")||ea;return zi(1,"div","decision-table-properties",[zi(1,"div","decision-table-name",t,0,{title:this._translate("Decision name: ")+t}),zi(1,"div","decision-table-header-separator"),Hi(2,n)],4)}}function ea(){return null}Zs.$inject=["sheet","components"];class ta{constructor(e){e.onGetComponent("table.before",500,(()=>Zs))}}ta.$inject=["components"];var na={__init__:["decisionTableProperties"],decisionTableProperties:["type",ta]};class ia extends oo{render(){const{row:e,rowIndex:t}=this.props,{components:n}=this.context,i=n.getComponents("cell-inner",{cellType:"rule-index",row:e,rowIndex:t});return zi(1,"td","rule-index",[i&&i.map((n=>Hi(2,n,{row:e,rowIndex:t}))),t+1],0,{"data-element-id":e.id,"data-row-id":e.id})}}class ra{constructor(e){e.onGetComponent("cell",(({cellType:e})=>{if("before-rule-cells"===e)return ia}))}}ra.$inject=["components"];var oa={__init__:["decisionRuleIndices"],decisionRuleIndices:["type",ra]};const sa=[{label:"FEEL",value:"feel"}];class aa{constructor(e){this._injector=e;const t=e.get("config.expressionLanguages")||{};this._config={options:sa,defaults:{editor:"feel"}},t.options&&(this._config.options=t.options);const n=this._getLegacyDefaults();b(this._config class in rl.e [all...] |
H A D | dmn-navigated-viewer.production.min.js | 10 */function uo(e){var t=Ft('<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;">'+ho+"</a>");e.appendChild(t),Nt.bind(t,"click",(function(e){!function(){go||(go=Ft(mo),Bt.bind(go,".backdrop","click",(function(e){document.body.removeChild(go)})));document.body.appendChild(go)}(),e.preventDefault()}))}class po extends lo{constructor(e,t){super(e,t),this.node=null}componentDidMount(){uo(this.node)}render(){return Ui(1,"div",null,null,1,null,null,(e=>this.node=e))}}function fo(e){return e.join(";")}var go,mo='<div class="bjs-powered-by-lightbox" style="'+fo(["z-index: 1001","position: fixed","top: 0","left: 0","right: 0","bottom: 0"])+'"><div class="backdrop" style="'+fo(["width: 100%","height: 100%","background: rgba(40,40,40,0.2)"])+'"></div><div class="notice" style="'+fo(["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;">'+ho+'</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>';var vo=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),s="";for(r=0;r<Math.floor(i);r++){s=Math.floor(Math.random()*n).toString(n)+s}if(o){var a=Math.pow(n,o);s=Math.floor(Math.random()*a).toString(n)+s}var l=parseInt(s,n);return l!==1/0&&l>=Math.pow(2,e)?t(e,n):s};t.rack=function(e,n,i){var r=function(r){var s=0;do{if(s++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var a=t(e,n)}while(Object.hasOwnProperty.call(o,a));return o[a]=r,a},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 yo(e){if(!(this instanceof yo))return new yo(e);e=e||[128,36,1],this._seed=e.length?vo.rack(e[0],e[1],e[2]):e}yo.prototype.next=function(e){return this._seed(e||!0)},yo.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},yo.prototype.claim=function(e,t){this._seed.set(e,t||!0)},yo.prototype.assigned=function(e){return this._seed.get(e)||!1},yo.prototype.unclaim=function(e){delete this._seed.hats[e]},yo.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};var wo=new yo,bo="hsl(225, 10%, 15%)";function xo(e,t,n,i,o,s){cn.call(this,t);var a=wo.next(),l=i.computeStyle,c={},h=e&&e.defaultFillColor||"white",u=e&&e.defaultStrokeColor||bo,d=e&&e.defaultLabelColor;function p(e,t,n){var i=e+"-"+So(t)+"-"+So(n)+"-"+a;return c[i]||function(e,t,n,i){if("association-start"===t){var r=xn("path");fn(r,{d:"M 11 5 L 1 10 L 11 15"}),f(e,{element:r,attrs:{fill:"none",stroke:i,strokeWidth:1.5},ref:{x:1,y:10},scale:.5})}else if("association-end"===t){var o=xn("path");fn(o,{d:"M 1 5 L 11 10 L 1 15"}),f(e,{element:o,attrs:{fill:"none",stroke:i,strokeWidth:1.5},ref:{x:12,y:10},scale:.5})}else if("information-requirement-end"===t){var s=xn("path");fn(s,{d:"M 1 5 L 11 10 L 1 15 Z"}),f(e,{element:s,attrs:{fill:i,stroke:"none"},ref:{x:11,y:10},scale:1})}else if("knowledge-requirement-end"===t){var a=xn("path");fn(a,{d:"M 1 3 L 11 10 L 1 17"}),f(e,{element:a,attrs:{fill:"none",stroke:i,strokeWidth:2},ref:{x:11,y:10},scale:.8})}else if("authority-requirement-end"===t){var l=xn("circle");fn(l,{cx:3,cy:3,r:3}),f(e,{element:l,attrs:{fill:i,stroke:"none"},ref:{x:3,y:3},scale:.9})}}(i,e,0,n),"url(#"+i+")"}function f(e,t){var n=_({strokeWidth:1,strokeLinecap:"round",strokeDasharray:"none"},t.attrs),i=t.ref||{x:0,y:0},r=t.scale||1;"none"===n.strokeDasharray&&(n.strokeDasharray=[1e4,1]);var o=xn("marker");fn(t.element,n),hn(o,t.element),fn(o,{id:e,viewBox:"0 0 20 20",refX:i.x,refY:i.y,markerWidth:20*r,markerHeight:20*r,orient:"auto"});var a=Vt("defs",s._svg);a||(a=xn("defs"),hn(s._svg,a)),hn(a,o),c[e]=o}function g(e,t,n,i,o,s){r(o)&&(s=o,o=0),o=o||0,s=l(s,{stroke:bo,strokeWidth:2,fill:"white"});var a=xn("rect");return fn(a,{x:o,y:o,width:t-2*o,height:n-2*o,rx:i,ry:i}),fn(a,s),hn(e,a),a}function m(e,t,n){var i=o.createText(t||"",n);return _t(i,"class","djs-label"),hn(e,i),i}function v(e,t,n,i){var r=function(e){return xi(e).name}(t);return m(e,r,i=_({box:t,align:n,padding:5,style:{fill:Eo(t,d,u)}},i))}function y(e,t,n){n=l(n,["no-fill"],{strokeWidth:2,stroke:bo});var i=xn("path");return fn(i,{d:t}),fn(i,n),hn(e,i),i}var w={"dmn:Decision":function(e,t){var n=g(e,t.width,t.height,0,{stroke:ko(t,u),fill:Co(t,h)});return v(e,t,"center-middle"),n},"dmn:KnowledgeSource":function(e,t){var i=y(e,n.getScaledPath("KNOWLEDGE_SOURCE",{xScaleFactor:1.021,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.075}}),{strokeWidth:2,fill:Co(t,h),stroke:ko(t,u)});return v(e,t,"center-middle"),i},"dmn:BusinessKnowledgeModel":function(e,t){var i=y(e,n.getScaledPath("BUSINESS_KNOWLEDGE_MODEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.3}}),{strokeWidth:2,fill:Co(t,h),stroke:ko(t,u)});return v(e,t,"center-middle"),i},"dmn:InputData":function(e,t){var n=g(e,t.width,t.height,22,{stroke:ko(t,u),fill:Co(t,h)});return v(e,t,"center-middle"),n},"dmn:TextAnnotation":function(e,t){var i=g(e,t.width,t.height,0,0,{fill:"none",stroke:"none"});return y(e,n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:0}}),{stroke:ko(t,u)}),m(e,_o(t).text||"",{style:{fill:Eo(t,d,u)},box:t,align:"left-top",padding:5}),i},"dmn:Association":function(e,t){var n=_o(t),i=Co(t,h),r=ko(t,u),o={stroke:r,strokeDasharray:"0.5, 5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"};return"One"!==n.associationDirection&&"Both"!==n.associationDirection||(o.markerEnd=p("association-end",i,r)),"Both"===n.associationDirection&&(o.markerStart=p("association-start",i,r)),b(e,t.waypoints,o)},"dmn:InformationRequirement":function(e,t){var n=Co(t,h),i=ko(t,u),r={stroke:i,strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round",markerEnd:p("information-requirement-end",n,i)};return b(e,t.waypoints,r)},"dmn:KnowledgeRequirement":function(e,t){var n=Co(t,h),i=ko(t,u),r={stroke:i,strokeWidth:1,strokeDasharray:5,strokeLinecap:"round",strokeLinejoin:"round",markerEnd:p("knowledge-requirement-end",n,i)};return b(e,t.waypoints,r)},"dmn:AuthorityRequirement":function(e,t){var n=Co(t,h),i=ko(t,u),r={stroke:i,strokeWidth:1.5,strokeDasharray:5,strokeLinecap:"round",strokeLinejoin:"round",markerEnd:p("authority-requirement-end",n,i)};return b(e,t.waypoints,r)}};function b(e,t,n){var i=jn(t,n=l(n,["no-fill"],{stroke:bo,strokeWidth:2,fill:"none"}));return hn(e,i),i}this.canRender=function(e){return bi(e,"dmn:DMNElement")||bi(e,"dmn:InformationRequirement")||bi(e,"dmn:KnowledgeRequirement")||bi(e,"dmn:AuthorityRequirement")},this.drawShape=function(e,t){var n=w[t.type];return n?n(e,t):cn.prototype.drawShape.apply(this,[e,t])},this.drawConnection=function(e,t){var n=t.type,i=w[n];return i?i(e,t):cn.prototype.drawConnection.apply(this,[e,t])}}function _o(e){return e.businessObject}function So(e){return e.replace(/[^0-9a-zA-z]+/g,"_")}function ko(e,t){return t}function Co(e,t){return t}function Eo(e,t,n){return t||ko(0,n)}Yt(xo,cn),xo.$inject=["config.drdRenderer","eventBus","pathMap","styles","textRenderer","canvas"];var Mo=0,Ao={width:150,height:50};function Ro(e,t){var n;t.textContent=e;try{var i,r=""===e;return t.textContent=r?"dummy":e,i={width:(n=t.getBBox()).width+2*n.x,height:n.height},r&&(i.width=0),i}catch(e){return console.log(e),{width:0,height:0}}}function To(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=Ro(o,n)).width=o?i.width:0," "===o||""===o||i.width<Math.round(t)||o.length<2)return Do(e,o,r,i);o=No(o,i.width,t)}}function Do(e,t,n,i){if(t.length<n.length){var r=n.slice(t.length).trim();e.unshift(r)}return{width:i.width,height:i.height,text:t}}var Oo="";function No(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!==Oo||r.pop();break}r.push(n),o+=n.length}var s=r[r.length-1];return s&&s===Oo&&(r[r.length-1]="-"),r.join("")}(e,i);return r||(r=e.slice(0,Math.max(Math.round(i-1),1))),r}function Po(e){this._config=_({},{size:Ao,padding:Mo,style:{},align:"center-top"},e||{})}Po.prototype.createText=function(e,t){return this.layoutText(e,t).element},Po.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},Po.prototype.layoutText=function(e,t){var n=_({},this._config.size,t.box),i=_({},this._config.style,t.style),o=function(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}(t.align||this._config.align),s=function(e){return r(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,l=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(i),c=e.split(/\u00AD?\r?\n/),h=[],p=n.width-s.left-s.right,f=xn("text");for(fn(f,{x:0,y:0}),fn(f,i),hn(function(){var e=document.getElementById("helper-svg");return e||(fn(e=xn("svg"),{id:"helper-svg"}),xt(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}(),f);c.length;)h.push(To(c,p,f));"middle"===o.vertical&&(s.top=s.bottom=0);var g=d(h,(function(e,t,n){return e+(l||t.height)}),0)+s.top+s.bottom,m=d(h,(function(e,t,n){return t.width>e?t.width:e}),0),v=s.top;"middle"===o.vertical&&(v+=(n.height-g)/2),v-=(l||h[0].height)/4;var y=xn("text");return fn(y,i),u(h,(function(e){var t;switch(v+=l||e.height,o.horizontal){case"left":t=s.left;break;case"right":t=(a?m:p)-s.right-e.width;break;default:t=Math.max(((a?m:p)-e.width)/2+s.left,0)}var n=xn("tspan");fn(n,{x:t,y:v}),n.textContent=e.text,hn(y,n)})),Dn(f),{dimensions:{width:m,height:g},element:y}};function qo(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 Po({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}}qo.$inject=["config.textRenderer"];var Bo=/\{([^{}]+)\}/g,Lo=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var Io={__init__:["drdRenderer"],drdRenderer:["type",xo],textRenderer:["type",qo],pathMap:["type",function(){this.pathMap={KNOWLEDGE_SOURCE:{d:"m {mx},{my} l 0,{e.y0} c {e.x0},{e.y1} {e.x1},-{e.y2} {e.x2},-{e.y3} c {e.x3},-{e.y4} {e.x4},{e.y5} {e.x5},{e.y6} l 0,-{e.y7}z",width:100,height:65,widthElements:[29.8,48.4,67.2,12.2,19.8,30.8],heightElements:[55.3,19.7,4.2,6.7,2.3,1.6,6.2,54.6]},BUSINESS_KNOWLEDGE_MODEL:{d:"m {mx},{my} l {e.x0},-{e.y0} l {e.x1},0 l 0,{e.y1} l -{e.x2},{e.y2} l -{e.x3},0z",width:125,height:45,widthElements:[13.8,109.2,13.8,109.1],heightElements:[13.2,29.8,13.2]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",width:10,height:30,widthElements:[10],heightElements:[30]}},this.getRawPath=function(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var n,i,r=this.pathMap[e];t.abspos?(n=t.abspos.x,i=t.abspos.y):(n=t.containerWidth*t.position.mx,i=t.containerHeight*t.position.my);var o={};if(t.position){for(var s=t.containerHeight/r.height*t.yScaleFactor,a=t.containerWidth/r.width*t.xScaleFactor,l=0;l<r.heightElements.length;l++)o["y"+l]=r.heightElements[l]*s;for(var c=0;c<r.widthElements.length;c++)o["x"+c]=r.widthElements[c]*a}var h,u,d=(h=r.d,u={mx:n,my:i,e:o},String(h).replace(Bo,(function(e,t){return function(e,t,n){var i=n;return t.replace(Lo,(function(e,t,n,r,o){t=t||r,i&&(t in i&&(i=i[t]),"function"==typeof i&&o&&(i=i()))})),i=(null==i||i==n?e:i)+""}(e,t,u)})));return d}}]};function jo(e,t,n,i){this._eventBus=e,this._canvas=t,this._elementRegistry=i,this._elementFactory=n}function Fo(e,t){return _({id:e.id,type:e.$type,businessObject:e},t)}function Vo(e){return e.split("#").pop()}jo.$inject=["eventBus","canvas","elementFactory","elementRegistry"],jo.prototype.root=function(e){var t=this._elementFactory.createRoot(Fo(e));return this._canvas.setRootElement(t),t},jo.prototype.add=function(e){var t,n,i,r,o,s,a=this._elementFactory,l=this._canvas,c=this._eventBus,h=e.di;if(h.$instanceOf("dmndi:DMNShape"))s=h.bounds,o=Fo(e,{x:Math.round(s.x),y:Math.round(s.y),width:Math.round(s.width),height:Math.round(s.height)}),t=a.createShape(o),l.addShape(t),c.fire("drdElement.added",{element:t,di:h});else{if(!h.$instanceOf("dmndi:DMNEdge"))throw new Error("unknown di for element "+e.id);n=function(e){var t=e.waypoint;if(t)return f(t,(function(e){var t={x:e.x,y:e.y};return _({original:t},t)}))}(h),i=this._getSource(e),r=this._getTarget(e),i&&r&&(o=Fo(e,{hidden:!1,source:i,target:r,waypoints:n}),t=a.createConnection(o),l.addConnection(t),c.fire("drdElement.added",{element:t,di:h}))}return t},jo.prototype._getSource=function(e){var t,n;if(bi(e,"dmn:Association")?n=e.sourceRef:bi(e,"dmn:InformationRequirement")?n=e.requiredDecision||e.requiredInput:bi(e,"dmn:KnowledgeRequirement")?n=e.requiredKnowledge:bi(e,"dmn:AuthorityRequirement")&&(n=e.requiredDecision||e.requiredInput||e.requiredAuthority),n&&(t=n.href),t)return this._getShape(Vo(t))},jo.prototype._getTarget=function(e){return bi(e,"dmn:Association")?e.targetRef&&this._getShape(Vo(e.targetRef.href)):this._getShape(e.$parent.id)},jo.prototype._getShape=function(e){return this._elementRegistry.get(e)};var $o={__depends__:[Io,{drdImporter:["type",jo]}]};var zo={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]};function Ho(e){return e.originalEvent||e.srcEvent}function Wo(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 Uo(e,t){return(Ho(e)||e).button===t}function Go(e){return Uo(e,0)}function Ko(e){return!0}function Xo(e){return Go(e)||function(e){return Uo(e,1)}(e)}function Yo(e,t,n){var i=this;function r(n,i,r){var o,s;(function(e,t){var n=l[e]||Go;return!n(t)})(n,i)||(r?s=t.getGraphics(r):(o=i.delegateTarget||i.target)&&(s=o,r=t.get(s)),s&&r&&!1===e.fire(n,{element:r,gfx:s,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var o={};function s(e){return o[e]}var a={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},l={"element.contextmenu":Ko,"element.mousedown":Xo,"element.mouseup":Xo,"element.click":Xo,"element.dblclick":Xo};var c="svg, .djs-element";function h(e,t,n,i){var s=o[n]=function(e){r(n,e)};i&&(l[n]=i),s.$delegate=Bt.bind(e,c,t,s)}function d(e,t,n){var i=s(n);i&&Bt.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){!function(e){u(a,(function(t,n){d(e,n,t)}))}(e.svg)})),e.on("canvas.init",(function(e){!function(e){u(a,(function(t,n){h(e,n,t)}))}(e.svg)})),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 p=m("djs-hit djs-hit-stroke"),f=m("djs-hit djs-hit-click-stroke"),g={all:m("djs-hit djs-hit-all"),"click-stroke":f,stroke:p,"no-move":m("djs-hit djs-hit-no-move")};function m(e,t){return t=_({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function v(e,t){var n=g[t];if(!n)throw new Error("invalid hit type <"+t+">");return fn(e,n),e}function y(e,t){hn(e,t)}this.removeHits=function(e){var t;u((t=".djs-hit",(e||document).querySelectorAll(t)),Dn)},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=jn(t);return v(n,"stroke"),y(e,n),n},this.createBoxHit=function(e,t,n){n=_({x:0,y:0},n);var i=xn("rect");return v(i,t),fn(i,n),y(e,i),i},this.updateDefaultHit=function(e,t){var n=Vt(".djs-hit",t);if(n)return e.waypoints?Fn(n,e.waypoints):fn(n,{width:e.width,height:e.height}),n},this.fire=r,this.triggerMouseEvent=function(e,t,n){var i=a[e];if(!i)throw new Error("unmapped DOM event name <"+e+">");return r(i,t,n)},this.mouseHandler=s,this.registerEvent=h,this.unregisterEvent=d}Yo.$inject=["eventBus","elementRegistry","styles"];var Jo={__init__:["interactionEvents"],interactionEvents:["type",Yo]};function Qo(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)}))}Qo.$inject=["eventBus","canvas"],Qo.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})}},Qo.prototype.get=function(){return this._selectedElements},Qo.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},Qo.prototype.select=function(e,t){var n=this._selectedElements,r=n.slice();i(e)||(e=e?[e]:[]);var o=this._canvas,s=o.getRootElement();e=e.filter((function(e){var t=o.findRoot(e);return s===t})),t?u(e,(function(e){-1===n.indexOf(e)&&n.push(e)})):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:n})};var Zo="hover",es="selected";function ts(e,t){function n(t,n){e.addMarker(t,n)}function i(t,n){e.removeMarker(t,n)}this._canvas=e,t.on("element.hover",(function(e){n(e.element,Zo)})),t.on("element.out",(function(e){i(e.element,Zo)})),t.on("selection.changed",(function(e){var t=e.oldSelection,r=e.newSelection;u(t,(function(e){-1===r.indexOf(e)&&i(e,es)})),u(r,(function(e){-1===t.indexOf(e)&&n(e,es)}))}))}function ns(e,t,n,r){e.on("create.end",500,(function(e){var n=e.context,r=n.canExecute,o=n.elements,s=(n.hints||{}).autoSelect;if(r){if(!1===s)return;i(s)?t.select(s):t.select(o.filter(is))}})),e.on("connect.end",500,(function(e){var n=e.context.connection;n&&t.select(n)})),e.on("shape.move.end",500,(function(e){var n=e.previousSelection||[],i=r.get(e.context.shape.id);c(n,(function(e){return i.id===e.id}))||t.select(i)})),e.on("element.click",(function(e){if(Go(e)){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,s=function(e){var t=Ho(e)||e;return Go(e)&&t.shiftKey}(e);if(r&&o)return s?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,s)}}))}function is(e){return!e.hidden}ts.$inject=["canvas","eventBus"],ns.$inject=["eventBus","selection","canvas","elementRegistry"];var rs={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Jo],selection:["type",Qo],selectionVisuals:["type",ts],selectionBehavior:["type",ns]};function os(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}os.prototype.next=function(){return this._prefix+ ++this._counter};var ss=new os("ov");function as(e,t,n,i){var r,o;this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=ss,this._overlayDefaults=_({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(r=n.getContainer(),xt(o=Ft('<div class="djs-overlay-container" />'),{position:"absolute",width:0,height:0}),r.insertBefore(o,r.firstChild),o),this._init()}function ls(e,t,n){xt(e,{left:t+"px",top:n+"px"})}function cs(e,t){e.style.display=!1===t?"none":""}function hs(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}as.$inject=["config.overlays","eventBus","canvas","elementRegistry"],as.prototype.get=function(e){if(a(e)&&(e={id:e}),a(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?h(t.overlays,m({type:e.type})):t.overlays.slice():[]}return e.type?h(this._overlays,m({type:e.type})):e.id?this._overlays[e.id]:null},as.prototype.add=function(e,t,n){if(r(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},as.prototype.remove=function(e){var t=this.get(e)||[];i(t)||(t=[t]);var n=this;u(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&($t(e.html),$t(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)}}))},as.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},as.prototype.show=function(){cs(this._overlayRoot)},as.prototype.hide=function(){cs(this._overlayRoot,!1)},as.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Et(this._overlayRoot)},as.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var o=Vn(t);i=o.x,r=o.y}ls(n,i,r),_t(e.html,"data-container-id",t.id)},as.prototype._updateOverlay=function(e){var t,n,i=e.position,r=e.htmlContainer,o=e.element,s=i.left,a=i.top;void 0!==i.right&&(t=o.waypoints?Vn(o).width:o.width,s=-1*i.right+t);void 0!==i.bottom&&(n=o.waypoints?Vn(o).height:o.height,a=-1*i.bottom+n);ls(r,s||0,a||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},as.prototype._createOverlayContainer=function(e){var t=Ft('<div class="djs-overlays" />');xt(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},as.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";hs(this._overlayRoot,n)},as.prototype._getOverlayContainer=function(e,t){var n=c(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},as.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)),a(o)&&(o=Ft(o)),n=this._getOverlayContainer(r),xt(t=Ft('<div class="djs-overlay" data-overlay-id="'+i+'">'),{position:"absolute"}),t.appendChild(o),e.type&&kt(t).add("djs-overlay-"+e.type),cs(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())},as.prototype._updateOverlayVisibilty=function(e,t){var i=e.show,r=this._canvas.findRoot(e.element),o=i&&i.minZoom,s=i&&i.maxZoom,a=e.htmlContainer,l=!0;(r!==this._canvas.getRootElement()||i&&(n(o)&&o>t.scale||n(s)&&s<t.scale))&&(l=!1),cs(a,l),this._updateOverlayScale(e,t)},as.prototype._updateOverlayScale=function(e,t){var i,r,o,s=e.scale,a=e.htmlContainer,l="";!0!==s&&(!1===s?(i=1,r=1):(i=s.min,r=s.max),n(i)&&t.scale<i&&(o=(1/t.scale||1)*i),n(r)&&t.scale>r&&(o=(1/t.scale||1)*r)),n(o)&&(l="scale("+o+","+o+")"),hs(a,l)},as.prototype._updateOverlaysVisibilty=function(e){var t=this;u(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},as.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;u(t.get({element:n}),(function(e){t.remove(e.id)}));var i=t._getOverlayContainer(n);if(i){$t(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&&(u(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&&kt(n.html)[e.add?"add":"remove"](e.marker)})),e.on("root.set",(function(){t._updateOverlaysVisibilty(t._canvas.viewbox())})),e.on("diagram.clear",this.clear,this)};var us={__init__:["overlays"],overlays:["type",as]};function ds(e,t,n){this._eventBus=e,this._canvas=t,this._translate=n,e.on("diagram.init",(function(){this._init()}),this),e.on("import.done",(function(e){e.error||this.update()}),this),this.HTML_MARKUP='<div class="dmn-definitions"><div class="dmn-definitions-name" title="'+this._translate("Definition name")+'" spellcheck="false"></div><div class="dmn-definitions-id" title="'+this._translate("Definition ID")+'" spellcheck="false"></div></div>'}function ps(e,t){function n(e,n){kt(t.getContainer()).toggle(e,n)}e.on("palette.create",(function(){n("with-palette",!0)})),e.on("palette.changed",(function(e){n("with-palette-two-column",e.twoColumn)}))}ds.$inject=["eventBus","canvas","translate"],ds.prototype._init=function(){var e=this._canvas,t=this._eventBus,n=e.getContainer(),i=this._container=Ft(this.HTML_MARKUP);n.appendChild(i),this.nameElement=Vt(".dmn-definitions-name",this._container),this.idElement=Vt(".dmn-definitions-id",this._container),Bt.bind(i,".dmn-definitions-name, .dmn-definitions-id","mousedown",(function(e){e.stopPropagation()})),t.fire("definitionIdView.create",{html:i})},ds.prototype.update=function(){var e=this._canvas.getRootElement().businessObject;this.nameElement.textContent=e.name,this.idElement.textContent=e.id},ps.$inject=["eventBus","canvas"];var fs={__depends__:[zo],__init__:["definitionPropertiesView","definitionPropertiesPaletteAdapter"],definitionPropertiesView:["type",ds],definitionPropertiesPaletteAdapter:["type",ps]},gs=[{className:"dmn-icon-decision-table",matches:function(e){var t=xi(e);return bi(t,"dmn:Decision")&&bi(t.decisionLogic,"dmn:DecisionTable")},title:"Open decision table"},{className:"dmn-icon-literal-expression",matches:function(e){return bi(_i(e),"dmn:LiteralExpression")},title:"Open literal expression"}];class ms{constructor(e,t,n,i,r){this._injector=e,this._eventBus=t,this._overlays=n,this._translate=r,this._config=i||{enabled:!0},t.on(["shape.added"],(({element:e})=>{for(let t=0;t<gs.length;t++){const{matches:n,className:i,title:r}=gs[t];n&&n(e)&&this.addOverlay(e,i,r)}}))}addOverlay(e,t,n){const i=!1!==this._config.enabled,r=this._getOverlayNode(t,n,i),o=this._overlays.add(e,{position:{top:2,left:2},html:r});i&&(kt(r).add("interactive"),this.bindEventListener(e,r,o))}_getOverlayNode(e,t,n){const i=document.createElement("div");if(i.className="drill-down-overlay",!n){const t=document.createElement("span");return t.className=e,i.appendChild(t),i}const r=document.createElement("button");return r.type="button",r.className=e,r.title=this._translate(t),i.appendChild(r),i}bindEventListener(e,t,n){const i=this._overlays,r=this._eventBus,o=i._overlayRoot;Bt.bind(o,'[data-overlay-id="'+n+'"]',"click",(()=>{!1!==r.fire("drillDown.click",{element:e})&&this.drillDown(e)}))}drillDown(e){const t=this._injector.get("_parent",!1);if(!t)return!1;const n=t.getView(e.businessObject);return!!n&&(t.open(n),!0)}}ms.$inject=["injector","eventBus","overlays","config.drillDown","translate"];var vs={__depends__:[us,zo],__init__:["drillDown"],drillDown:["type",ms]}; 16 */function ys(e){this._container=this._createContainer(),uo(this._container),this._init(this._container,e)}function ws(e,t){return{x:e.x-t.x,y:e.y-t.y}}function bs(e){return Math.log(e)/Math.log(10)}function xs(e,t){var n=bs(e.min),i=bs(e.max);return(Math.abs(n)+Math.abs(i))/t}Yt(ys,wi),ys.prototype.saveSVG=zt((function(e){var t=this;return new Promise((function(e){var n=t.get("canvas"),i=n.getActiveLayer(),r=Vt("defs",n._svg),o=Tn(i),s=r&&r.outerHTML||"",a=i.getBBox();e({svg:'<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- created with dmn-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="'+a.width+'" height="'+a.height+'" viewBox="'+a.x+" "+a.y+" "+a.width+" "+a.height+'" version="1.1">'+s+o+"</svg>"})}))})),ys.prototype.getModules=function(){return this._modules},ys.prototype.destroy=function(){wi.prototype.destroy.call(this),$t(this._container)},ys.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},ys.prototype.off=function(e,t){this.get("eventBus").off(e,t)},ys.prototype._init=function(e,t){var{additionalModules:n,canvas:i,...r}=t,o={...r,canvas:{...i,container:e},modules:[...[{drd:["value",this]}],...t.modules||this.getModules(),...n||[]]};wi.call(this,o),t&&t.container&&this.attachTo(t.container)},ys.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},ys.prototype._createContainer=function(){return Ft('<div class="dmn-drd-container"></div>')},ys.prototype.open=function(e){var t=this;return new Promise(((n,i)=>{var r;try{return t._definitions&&t.clear(),t._definitions=e,function(e,t,n){var i,r=e.get("drdImporter"),o=e.get("eventBus"),s=[];o.fire("import.start",{definitions:t});try{!function(e){new ki({root:function(e){return r.root(e)},element:function(e,t){return r.add(e,t)},error:function(e,t){s.push({message:e,context:t})}}).handleDefinitions(e)}(t)}catch(e){i=e}o.fire("import.done",{error:i,warnings:s}),n(i,s)}(t,e,(function(e,t){e?(e.warnings=t||[],i(e)):n({warnings:t||[]})}))}catch(e){r=e}r?(r.warnings=r.warnings||[],i(r)):n({warnings:[]})}))},ys.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach();var t=this._container;e.appendChild(t),this._emit("attach",{}),this.get("canvas").resized()},ys.prototype.detach=function(){var e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},ys.prototype._modules=[$o,zo,rs,us,fs,vs];var _s=Math.sign||function(e){return e>=0?1:-1},Ss={min:.2,max:4};function ks(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=x(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)}))}ks.$inject=["config.zoomScroll","eventBus","canvas"],ks.prototype.scroll=function(e){this._canvas.scroll(e)},ks.prototype.reset=function(){this._canvas.zoom("fit-viewport")},ks.prototype.zoom=function(e,t){var n=xs(Ss,20);this._totalDelta+=e,Math.abs(this._totalDelta)>.1&&(this._zoom(e,t,n),this._totalDelta=0)},ks.prototype._handleWheel=function(e){if(!Mt(e.target,".djs-scrollable",!0)){var t=this._container;e.preventDefault();var n,i=e.ctrlKey||/mac/i.test(navigator.platform)&&e.metaKey,r=e.shiftKey,o=-1*this._scale;if(o*=i?0===e.deltaMode?.02:.32:0===e.deltaMode?1:16,i){var s=t.getBoundingClientRect(),a={x:e.clientX-s.left,y:e.clientY-s.top};n=Math.sqrt(Math.pow(e.deltaY,2)+Math.pow(e.deltaX,2))*_s(e.deltaY)*o,this.zoom(n,a)}else n=r?{dx:o*e.deltaY,dy:0}:{dx:o*e.deltaX,dy:o*e.deltaY},this.scroll(n)}},ks.prototype.stepZoom=function(e,t){var n=xs(Ss,10);this._zoom(e,t,n)},ks.prototype._zoom=function(e,t,n){var i=this._canvas,r=e>0?1:-1,o=bs(i.zoom()),s=Math.round(o/n)*n;s+=n*r;var a,l,c=Math.pow(10,s);i.zoom((a=Ss,l=c,Math.max(a.min,Math.min(a.max,l))),t)},ks.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,i=this._enabled;return void 0===e&&(e=!i),i!==e&&Nt[e?"bind":"unbind"](t,"wheel",n,!1),this._enabled=e,e},ks.prototype._init=function(e){this.toggle(e)};var Cs={__init__:["zoomScroll"],zoomScroll:["type",ks]},Es=/^djs-cursor-.*$/;function Ms(e){var t=kt(document.body);t.removeMatching(Es),e&&t.add("djs-cursor-"+e)}var As=5e3;function Rs(e,t){var n;function i(i){var r,o=n.start,s=n.button,a=Wo(i),l=ws(a,o);(!n.dragging&&(r=l,Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2))>15)&&(n.dragging=!0,0===s&&function(e,t){function n(){return!1}t=t||"element.click",e.once(t,As,n)}(e),Ms("grab")),n.dragging)&&(l=ws(a,n.last||n.start),t.scroll({dx:l.x,dy:l.y}),n.last=a);i.preventDefault()}function r(e){Nt.unbind(document,"mousemove",i),Nt.unbind(document,"mouseup",r),n=null,Ms(null)}e.on("element.mousedown",500,(function(e){return function(e){if(Mt(e.target,".djs-draggable"))return;var t=e.button;if(t>=2||e.ctrlKey||e.shiftKey||e.altKey)return;return n={button:t,start:Wo(e)},Nt.bind(document,"mousemove",i),Nt.bind(document,"mouseup",r),!0}(e.originalEvent)})),this.isActive=function(){return!!n}}Rs.$inject=["eventBus","canvas"];var Ts={__init__:["moveCanvas"],moveCanvas:["type",Rs]},Ds={"&":"&","<":"<",">":">",'"':""","'":"'"};function Os(e,t){return-1!==(e=i(e)?e:[e]).indexOf(t.key)||-1!==e.indexOf(t.code)}function Ns(e,t,n,i){this._open=!1,this._results={},this._eventMaps=[],this._cachedRootElement=null,this._cachedSelection=null,this._cachedViewbox=null,this._canvas=e,this._eventBus=t,this._selection=n,this._translate=i,this._container=this._getBoxHtml(),this._searchInput=Vt(Ns.INPUT_SELECTOR,this._container),this._resultsContainer=Vt(Ns.RESULTS_CONTAINER_SELECTOR,this._container),this._canvas.getContainer().appendChild(this._container),t.on(["canvas.destroy","diagram.destroy","drag.init","elements.changed"],this.close,this)}function Ps(e,t,n){var i=function(e){var t="";return e.forEach((function(e){var n,i=(n=""+(n=e.value||e.matched||e.normal))&&n.replace(/[&<>"']/g,(function(e){return Ds[e]})),r=e.match||e.matched;t+=r?'<b class="'+Ns.RESULT_HIGHLIGHT_CLASS+'">'+i+"</b>":i})),""!==t?t:null}(t),r=Ft(n);r.innerHTML=i,e.appendChild(r)}Ns.$inject=["canvas","eventBus","selection","translate"],Ns.prototype._bindEvents=function(){var e=this;function t(t,n,i,r){e._eventMaps.push({el:t,type:i,listener:Bt.bind(t,n,i,r)})}t(document,"html","click",(function(t){e.close(!1)})),t(this._container,Ns.INPUT_SELECTOR,"click",(function(e){e.stopPropagation(),e.delegateTarget.focus()})),t(this._container,Ns.RESULT_SELECTOR,"mouseover",(function(t){t.stopPropagation(),e._scrollToNode(t.delegateTarget),e._preselect(t.delegateTarget)})),t(this._container,Ns.RESULT_SELECTOR,"click",(function(t){t.stopPropagation(),e._select(t.delegateTarget)})),t(this._container,Ns.INPUT_SELECTOR,"keydown",(function(e){Os("ArrowUp",e)&&e.preventDefault(),Os("ArrowDown",e)&&e.preventDefault()})),t(this._container,Ns.INPUT_SELECTOR,"keyup",(function(t){if(Os("Escape",t))return e.close();if(Os("Enter",t)){var n=e._getCurrentResult();return n?e._select(n):e.close(!1)}return Os("ArrowUp",t)?e._scrollToDirection(!0):Os("ArrowDown",t)?e._scrollToDirection():void(Os(["ArrowLeft","ArrowRight"],t)||e._search(t.delegateTarget.value))}))},Ns.prototype._unbindEvents=function(){this._eventMaps.forEach((function(e){Bt.unbind(e.el,e.type,e.listener)}))},Ns.prototype._search=function(e){var t=this;if(this._clearResults(),e&&""!==e){var n=this._searchProvider.find(e);if((n=n.filter((function(e){return!t._canvas.getRootElements().includes(e.element)}))).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=Vt(Ns.RESULT_SELECTOR,this._resultsContainer);this._scrollToNode(i),this._preselect(i)}else this._selection.select(null)}},Ns.prototype._scrollToDirection=function(e){var t=this._getCurrentResult();if(t){var n=e?t.previousElementSibling:t.nextElementSibling;n&&(this._scrollToNode(n),this._preselect(n))}},Ns.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)}},Ns.prototype._clearResults=function(){Et(this._resultsContainer),this._results={},this._eventBus.fire("searchPad.cleared")},Ns.prototype._getCurrentResult=function(){return Vt(Ns.RESULT_SELECTED_SELECTOR,this._resultsContainer)},Ns.prototype._createResultNode=function(e,t){var n=Ft(Ns.RESULT_HTML);return e.primaryTokens.length>0&&Ps(n,e.primaryTokens,Ns.RESULT_PRIMARY_HTML),Ps(n,e.secondaryTokens,Ns.RESULT_SECONDARY_HTML),_t(n,Ns.RESULT_ID_ATTRIBUTE,t),this._resultsContainer.appendChild(n),n},Ns.prototype.registerProvider=function(e){this._searchProvider=e},Ns.prototype.open=function(){if(!this._searchProvider)throw new Error("no search provider registered");this.isOpen()||(this._cachedRootElement=this._canvas.getRootElement(),this._cachedSelection=this._selection.get(),this._cachedViewbox=this._canvas.viewbox(),this._selection.select(null),this._bindEvents(),this._open=!0,kt(this._canvas.getContainer()).add("djs-search-open"),kt(this._container).add("open"),this._searchInput.focus(),this._eventBus.fire("searchPad.opened"))},Ns.prototype.close=function(e=!0){this.isOpen()&&(e&&(this._cachedRootElement&&this._canvas.setRootElement(this._cachedRootElement),this._cachedSelection&&this._selection.select(this._cachedSelection),this._cachedViewbox&&this._canvas.viewbox(this._cachedViewbox),this._eventBus.fire("searchPad.restored")),this._cachedRootElement=null,this._cachedSelection=null,this._cachedViewbox=null,this._unbindEvents(),this._open=!1,kt(this._canvas.getContainer()).remove("djs-search-open"),kt(this._container).remove("open"),this._clearResults(),this._searchInput.value="",this._searchInput.blur(),this._eventBus.fire("searchPad.closed"),this._canvas.restoreFocus())},Ns.prototype.toggle=function(){this.isOpen()?this.close():this.open()},Ns.prototype.isOpen=function(){return this._open},Ns.prototype._preselect=function(e){var t=this._getCurrentResult();if(e!==t){t&&kt(t).remove(Ns.RESULT_SELECTED_CLASS);var n=_t(e,Ns.RESULT_ID_ATTRIBUTE),i=this._results[n].element;kt(e).add(Ns.RESULT_SELECTED_CLASS),this._canvas.scrollToElement(i,{top:300}),this._selection.select(i),this._eventBus.fire("searchPad.preselected",i)}},Ns.prototype._select=function(e){var t=_t(e,Ns.RESULT_ID_ATTRIBUTE),n=this._results[t].element;this._cachedSelection=null,this._cachedViewbox=null,this.close(!1),this._canvas.scrollToElement(n,{top:300}),this._selection.select(n),this._eventBus.fire("searchPad.selected",n)},Ns.prototype._getBoxHtml=function(){const e=Ft(Ns.BOX_HTML),t=Vt(Ns.INPUT_SELECTOR,e);return t&&t.setAttribute("aria-label",this._translate("Search in diagram")),e},Ns.CONTAINER_SELECTOR=".djs-search-container",Ns.INPUT_SELECTOR=".djs-search-input input",Ns.RESULTS_CONTAINER_SELECTOR=".djs-search-results",Ns.RESULT_SELECTOR=".djs-search-result",Ns.RESULT_SELECTED_CLASS="djs-search-result-selected",Ns.RESULT_SELECTED_SELECTOR="."+Ns.RESULT_SELECTED_CLASS,Ns.RESULT_ID_ATTRIBUTE="data-result-id",Ns.RESULT_HIGHLIGHT_CLASS="djs-search-highlight",Ns.BOX_HTML='<div class="djs-search-container djs-scrollable">\n <div class="djs-search-input">\n <svg class="djs-search-icon" width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.0325 8.5H9.625L13.3675 12.25L12.25 13.3675L8.5 9.625V9.0325L8.2975 8.8225C7.4425 9.5575 6.3325 10 5.125 10C2.4325 10 0.25 7.8175 0.25 5.125C0.25 2.4325 2.4325 0.25 5.125 0.25C7.8175 0.25 10 2.4325 10 5.125C10 6.3325 9.5575 7.4425 8.8225 8.2975L9.0325 8.5ZM1.75 5.125C1.75 6.9925 3.2575 8.5 5.125 8.5C6.9925 8.5 8.5 6.9925 8.5 5.125C8.5 3.2575 6.9925 1.75 5.125 1.75C3.2575 1.75 1.75 3.2575 1.75 5.125Z" fill="#22242A"/>\n </svg>\n <input type="text" spellcheck="false" />\n </div>\n <div class="djs-search-results" />\n</div>',Ns.RESULT_HTML='<div class="djs-search-result"></div>',Ns.RESULT_PRIMARY_HTML='<div class="djs-search-result-primary"></div>',Ns.RESULT_SECONDARY_HTML='<p class="djs-search-result-secondary"></p>';var qs={__depends__:[zo,us,rs],searchPad:["type",Ns]};function Bs(e){var t=e.businessObject,n=function(e){return bi(e,"dmn:Decision")||bi(e,"dmn:BusinessKnowledgeModel")||bi(e,"dmn:InputData")||bi(e,"dmn:KnowledgeSource")?"name":bi(e,"dmn:TextAnnotation")?"text":void 0}(t);if(n)return t[n]||""}function Ls(e,t,n){this._elementRegistry=e,this._canvas=n,t.registerProvider(this)}function Is(e){return h(e,(function(e){return!!e.matched})).length>0}function js(e,t){const n=[],i=e;if(!e)return n;e=e.toLowerCase(),t=t.toLowerCase();const 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}Ls.$inject=["elementRegistry","searchPad","canvas"],Ls.prototype.find=function(e){const t=this._canvas.getRootElement();let n=this._elementRegistry.filter((function(e){return!e.labelTarget}));return n=h(n,(function(e){return e!==t})),n=f(n,(function(t){return{primaryTokens:js(Bs(t),e),secondaryTokens:js(t.id,e),element:t}})),n=h(n,(function(e){return Is(e.primaryTokens)||Is(e.secondaryTokens)})),n=g(n,(function(e){return Bs(e.element)+e.element.id})),n};var Fs={__depends__:[qs],__init__:["dmnSearch"],dmnSearch:["type",Ls]};function Vs(e){ys.call(this,e)}Yt(Vs,ys),Vs.prototype._navigationModules=[Cs,Ts,Fs],Vs.prototype._modules=[].concat(Vs.prototype._modules,Vs.prototype._navigationModules);class $s{constructor(e){_(this,e),Hs(this,"businessObject",{writable:!0})}}const zs={root:class extends $s{constructor(e){super(e),Hs(this,"rows",{enumerable:!0,value:this.rows||[]}),Hs(this,"cols",{enumerable:!0,value:this.cols||[]})}},row:class extends $s{constructor(e){super(e),Hs(this,"root",{writable:!0}),Hs(this,"cells",{enumerable:!0,value:this.cells||[]})}},col:class extends $s{constructor(e){super(e),Hs(this,"root",{writable:!0}),Hs(this,"cells",{enumerable:!0,value:this.cells||[]})}},cell:class extends $s{constructor(e){super(e),Hs(this,"row",{writable:!0}),Hs(this,"col",{writable:!0})}}};function Hs(e,t,n){Object.defineProperty(e,t,n)}let Ws=class{constructor(e){this._eventBus=e,this._elements={},e.on("table.clear",this.clear.bind(this))}add(e,t){const{id:n}=e;this._elements[n]=e}remove(e){const t=e.id||e;delete this._elements[t]}get(e){return this._elements[e]}getAll(){return Us(this._elements)}forEach(e){Us(this._elements).forEach((t=>e(t)))}filter(e){return Us(this._elements).filter((t=>e(t)))}clear(){this._elements={}}updateId(e,t){this._validateId(t),"string"==typeof e&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t}),this.remove(e),e.id=t,this.add(e)}_validateId(e){if(!e)throw new Error("element must have an id");if(this._elements[e])throw new Error("element with id "+e+" already added")}};function Us(e){return Object.keys(e).map((function(t){return e[t]}))}Ws.$inject=["eventBus"];let Gs=class{constructor(e){this._listeners={},e.on("elements.changed",(({elements:e})=>{this.elementsChanged(e)})),e.on("root.remove",(t=>{const n=t.root.id;this._listeners[n]&&e.once("root.add",(e=>{const t=e.root.id;this.updateId(n,t)}))})),e.on("element.updateId",(({element:e,newId:t})=>{this.updateId(e.id,t)}))}elementsChanged(e){const t={},n=e.length;for(let i=0;i<n;i++){const{id:n}=e[i];if(t[n])return;t[n]=!0;const r=this._listeners[n]&&this._listeners[n].length;if(r)for(let e=0;e<r;e++)this._listeners[n][e]&&this._listeners[n][e]()}}onElementsChanged(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e][this._listeners[e].length]=t}offElementsChanged(e,t){if(this._listeners[e])if(t){const n=this._listeners[e].indexOf(t);-1!==n&&this._listeners[e].splice(n,1)}else this._listeners[e].length=0}updateId(e,t){this._listeners[e]&&(this._listeners[t]=this._listeners[e],delete this._listeners[e])}};Gs.$inject=["eventBus"];class Ks extends lo{constructor(e){super(e);const t=this._injector=e.injector;this._sheet=t.get("sheet"),this._changeSupport=t.get("changeSupport"),this._components=t.get("components"),this._eventBus=t.get("eventBus");const n=t.get("throttle");this.onElementsChanged=this.onElementsChanged.bind(this),this.onScroll=n(this.onScroll.bind(this))}onElementsChanged(){this.forceUpdate()}onScroll(){this._eventBus.fire("sheet.scroll")}getChildContext(){return{changeSupport:this._changeSupport,components:this._components,injector:this._injector}}componentWillMount(){const{id:e}=this._sheet.getRoot();this._changeSupport.onElementsChanged(e,this.onElementsChanged)}componentWillUnmount(){const{id:e}=this._sheet.getRoot();this._changeSupport.offElementsChanged(e,this.onElementsChanged)}render(){const{rows:e,cols:t}=this._sheet.getRoot(),n=this._components.getComponents("table.before"),i=this._components.getComponents("table.after"),r=this._components.getComponent("table.head"),o=this._components.getComponent("table.body"),s=this._components.getComponent("table.foot");return Ui(1,"div","tjs-container",[n&&n.map(((e,t)=>Gi(2,e,null,t))),Ui(1,"div","tjs-table-container",Ui(1,"table","tjs-table",[r&&Gi(2,r,{rows:e,cols:t}),o&&Gi(2,o,{rows:e,cols:t}),s&&Gi(2,s,{rows:e,cols:t})],0),2,{onScroll:this.onScroll}),i&&i.map(((e,t)=>Gi(2,e,null,t)))],0)}}let Xs=class{constructor(e,t,n,i,r){const{container:o}=n;this._container=o,i.on("root.added",(()=>{io(Gi(2,Ks,{injector:r}),o)})),i.on("root.remove",(()=>{io(null,o)}))}getContainer(){return this._container}};Xs.$inject=["changeSupport","components","config.renderer","eventBus","injector"];var Ys={__init__:["changeSupport","components","renderer"],changeSupport:["type",Gs],components:["type",class{constructor(){this._listeners={}}getComponent(e,t){const n=this._listeners[e];if(!n)return;let i;for(let e=0;e<n.length&&(i=n[e].callback(t),!i);e++);return i}getComponents(e,t){const n=this._listeners[e],i=[];if(!n)return i;for(let e=0;e<n.length;e++){const r=n[e].callback(t);r&&i.push(r)}return i.length,i}onGetComponent(e,t,n){if(s(t)&&(n=t,t=1e3),!o(t))throw new Error("priority must be a number");const i=this._getListeners(e);let r,a;const l={priority:t,callback:n};for(a=0;r=i[a];a++)if(r.priority<t)return void i.splice(a,0,l);i.push(l)}offGetComponent(e,t){const n=this._getListeners(e);let i,r,o;if(t)for(o=n.length-1;i=n[o];o--)r=i.callback,r===t&&n.splice(o,1);else n.length=0}_getListeners(e){let t=this._listeners[e];return t||(this._listeners[e]=t=[]),t}}],renderer:["type",Xs]};class Js{constructor(e,t){this._elementRegistry=e,this._eventBus=t,this._root=null,t.on("table.clear",(()=>{this.setRoot(null)}))}setRoot(e){if(this._root){const e=this._root;this._eventBus.fire("root.remove",{root:e}),this._root=null,this._eventBus.fire("root.removed",{root:e})}e&&this._eventBus.fire("root.add",{root:e}),this._root=e,e&&this._eventBus.fire("root.added",{root:e})}getRoot(){return this._root||this.setRoot({id:"__implicitroot",rows:[],cols:[]}),this._root}addRow(e,t){const n=this.getRoot();if(n.cols.length!=e.cells.length)throw new Error("number of cells is not equal to number of cols");return void 0===t&&(t=n.rows.length),Qs(t,n.rows,e),e.root=n,this._elementRegistry.add(e),e.cells.forEach(((i,r)=>{this._elementRegistry.add(i),i.row=e,i.col=n.cols[r],Qs(t,n.cols[r].cells,i)})),this._eventBus.fire("row.add",{row:e}),e}removeRow(e){const t=this.getRoot();"string"==typeof e&&(e=this._elementRegistry.get(e));const n=t.rows.indexOf(e);-1!==n&&(Zs(n,t.rows),e.root=void 0,this._elementRegistry.remove(e),e.cells.forEach(((e,i)=>{this._elementRegistry.remove(e),e.col=void 0,Zs(n,t.cols[i].cells)})),this._eventBus.fire("row.remove",{row:e}))}addCol(e,t){const n=this.getRoot();if(this._elementRegistry.add(e),n.rows.length!=e.cells.length)throw new Error("number of cells is not equal to number of rows");return void 0===t&&(t=n.cols.length),Qs(t,n.cols,e),e.root=n,e.cells.forEach(((i,r)=>{this._elementRegistry.add(i),i.col=e,i.row=n.rows[r],Qs(t,n.rows[r].cells,i)})),this._eventBus.fire("col.add",{col:e}),e}removeCol(e){const t=this.getRoot();"string"==typeof e&&(e=this._elementRegistry.get(e));const n=t.cols.indexOf(e);-1!==n&&(Zs(n,t.cols),e.root=void 0,this._elementRegistry.remove(e),e.cells.forEach(((e,i)=>{this._elementRegistry.remove(e),e.row=void 0,Zs(n,t.rows[i].cells)})),this._eventBus.fire("col.remove",{col:e}))}resized(){this._eventBus.fire("sheet.resized")}}function Qs(e,t,n){return t.splice(e,0,n)}function Zs(e,t){return t.splice(e,1)}function ea(e=!0){const t="number"==typeof e?e:e?300:0;return t?e=>function(e,t){let n=!1;return function(...i){n||(e(...i),n=!0,setTimeout((()=>{n=!1}),t))}}(e,t):e=>e}Js.$inject=["elementRegistry","eventBus"],ea.$inject=["config.throttle"];var ta={__depends__:[Ys],__init__:["elementFactory","sheet"],elementFactory:["type",class{constructor(){this._uid=12}create(e,t={}){return t.id||(t.id=e+"_"+this._uid++),function(e,t){const n=zs[e];if(!n)throw new Error("unknown type "+e);return new n(t)}(e,t)}createRoot(e){return this.create("root",e)}createRow(e){return this.create("row",e)}createCol(e){return this.create("col",e)}createCell(e){return this.create("cell",e)}}],elementRegistry:["type",Ws],eventBus:["type",C],sheet:["type",Js],throttle:["factory",ea]};class na{constructor(e={}){let{injector:t}=e;if(!t){let{modules:n,config:i}=this._init(e);t=function(e,t){const n=[{config:["value",e]},ta].concat(t||[]),i=new sn(n);return i.init(),i}(i,n)}this.get=t.get,this.invoke=t.invoke,this.get("eventBus").fire("table.init"),this.get("eventBus").fire("diagram.init")}_init(e){let{modules:t,...n}=e;return{modules:t,config:n}}destroy(){const e=this.get("eventBus");e.fire("table.destroy"),e.fire("diagram.destroy")}clear(){const e=this.get("eventBus");e.fire("table.clear"),e.fire("diagram.clear")}}function ia(e){if(!e)return"<null>";const t=e.id?` id="${e.id}"`:"";return`<${e.$type}${t} />`}function ra(e,t){function n(t,n,i){if(t.gfx)throw new Error(`already rendered ${ia(t)}`);return e.element(t,n,i)}function i(e,t,i){u(e,(function(e){n(e,t,i)}))}function r(e,t,i){u(e,(function(e){n(e,t,i)}))}return{handleDecision:function(t){t.id||(t.id="decision");const o=t.decisionLogic;if(!o)throw new Error(`no table for ${ia(t)}`);{if(!o.output)throw new Error(`missing output for ${ia(o)}`);const t=(c=o,e.table(c));o.input&&i(o.input,t,o),i(o.output,t,o),s=o.rule,a=t,l=o,u(s,(function(e){n(e,a,l),r(e.inputEntry,e),r(e.outputEntry,e)}))}var s,a,l,c}}}function oa(e,t){const{elements:n,index:i}=e;return i[t]?e:{elements:[...n,t],index:{...i,[t]:!0}}}function sa(...e){let t={elements:[],index:{}};return e.forEach((function(e){const n=typeof e;"string"===n&&e.length>0?t=oa(t,e):"object"===n&&null!==e&&Object.keys(e).forEach((function(n){e[n]&&(t=oa(t,n))}))})),function(e,t){return e.elements.join(t)}(t," ")}function aa(e){return la(e.constructor,e)}function la(e,t){const n=e.$inject;if(!n)return;const{injector:i}=t.context,r=[...n,function(...e){for(const i in e){const r=n[i],o=e[i];t[r]=o}}];i.invoke(r)}function ca(e,t){Object.keys(t).forEach((function(n){if("$inject"===n||"__init"===n)return;const i=t[n];"constructor"===n&&i.call(e,e.props,e.context);const r=e[n];if(void 0!==r){if("function"!=typeof r)throw new Error(`failed to mixin <${n}>: cannot combine with non-fn component value`);e[n]=function(e,...t){return function(...n){let i;return t.forEach((function(t){if(i=t.call(e,...n),void 0!==i)return!1})),i}.bind(e)}(e,r,i)}else e[n]=i.bind(e)})),"$inject"in t&&la(t,e),"__init"in t&&t.__init.call(e,e.props,e.context)}const ha={getSelectionClasses(){const{selected:e,selectedSecondary:t,focussed:n}=this.state;return sa({selected:e,"selected-secondary":t,focussed:n})},selectionChanged(e){this.setState(e)},componentWillUpdate(e){e.elementId!==this.props.elementId&&this.updateSelectionSubscription(!1)},componentDidUpdate(e){e.elementId!==this.props.elementId&&this.updateSelectionSubscription(!0)},componentDidMount(){this.updateSelectionSubscription(!0)},componentWillUnmount(){this.updateSelectionSubscription(!1)},updateSelectionSubscription(e){const{elementId:t}=this.props;t&&t&&this.eventBus[e?"on":"off"](`selection.${t}.changed`,this.selectionChanged)},$inject:["eventBus"]};class ua extends lo{constructor(e,t){super(e,t),ca(this,ha),aa(this)}getRenderProps(...e){const{className:t,elementId:n,coords:i,...r}=this.props,o={className:sa(...e,this.getSelectionClasses(),t)};return n&&(o["data-element-id"]=n),i&&(o["data-coords"]=i),{...o,...r}}}class da extends ua{constructor(e,t){super(e,t),this.state={}}render(){const{children:e}=this.props;return Xi(Ui(1,"td",null,e,0,{...this.getRenderProps("cell")}))}}const pa={slotFill(e,t){const{type:n,context:i,...r}=e,o=this.components.getComponent(n,i)||t;return o?Xi(Gi(2,o,{...i,...r})):null},slotFills(e){const{type:t,context:n,...i}=e;return this.components.getComponents(t,n).map((e=>Xi(Gi(2,e,{...n,...i}))))},$inject:["components"]};class fa extends lo{constructor(e,t){super(e,t),ca(this,pa),aa(this)}componentDidMount(){this.changeSupport.onElementsChanged(this.getRoot(),this.onElementsChanged)}componentWillUnmount(){this.changeSupport.offElementsChanged(this.getRoot(),this.onElementsChanged)}onElementsChanged=()=>{this.forceUpdate()};getRoot(){return this.sheet.getRoot()}render(){const e=(this.getRoot().businessObject.get("annotationsWidth")||400)+"px";return Ui(1,"th","annotation header",[this.slotFills({type:"cell-inner",context:{cellType:"annotations",col:this.sheet.getRoot(),minWidth:400}}),this.translate("Annotations")],0,{style:{width:e}})}}function ga(e){const{row:t}=e,{id:n,description:i}=t.businessObject;return Gi(2,da,{className:"annotation",elementId:n,children:i||"-"})}function ma(e){e.onGetComponent("cell",(({cellType:e})=>"after-label-cells"===e?fa:"after-rule-cells"===e?ga:void 0))}fa.$inject=["changeSupport","sheet","translate"],ma.$inject=["components"];var va={__init__:["annotationsProvider"],annotationsProvider:["type",ma]};function ya(e,t){return _({id:e.id,type:e.$type,businessObject:e},t)}class wa{constructor(e,t,n){this._elementFactory=e,this._eventBus=t,this._sheet=n}add(e){let t;if(bi(e,"dmn:DecisionTable"))t=this._elementFactory.createRoot(ya(e)),this._sheet.setRoot(t);else if(bi(e,"dmn:InputClause"))t=this._elementFactory.createCol(ya(e)),this._sheet.addCol(t);else if(bi(e,"dmn:OutputClause"))t=this._elementFactory.createCol(ya(e)),this._sheet.addCol(t);else if(bi(e,"dmn:DecisionRule")){e.inputEntry||(e.inputEntry=[]),e.outputEntry||(e.outputEntry=[]);const n=[...e.inputEntry,...e.outputEntry].map((e=>this._elementFactory.createCell(ya(e))));t=this._elementFactory.createRow(_(ya(e),{cells:n})),this._sheet.addRow(t)}return this._eventBus.fire("dmnElement.added",{element:t}),t}}wa.$inject=["elementFactory","eventBus","sheet"];var ba={__depends__:[{__depends__:[zo],tableImporter:["type",wa]},Ys]};class xa extends lo{constructor(e,t){super(e,t),ca(this,pa),this._sheet=t.injector.get("sheet"),this._changeSupport=t.changeSupport}onElementsChanged=()=>{this.forceUpdate()};componentWillMount(){const e=this._sheet.getRoot();this._changeSupport.onElementsChanged(e.id,this.onElementsChanged)}componentWillUnmount(){const e=this._sheet.getRoot();this._changeSupport.offElementsChanged(e.id,this.onElementsChanged)}render(){const e=this._sheet.getRoot();if(!bi(e,"dmn:DMNElement"))return null;const t=xi(e),n=t.input,i=t.output;return Ui(1,"thead",null,Ui(1,"tr",null,[Ui(1,"th","index-column"),this.slotFills({type:"cell",context:{cellType:"before-label-cells"}}),n&&n.map(((e,t)=>{const i=e.width||"192px";return this.slotFill({type:"cell",context:{cellType:"input-header",input:e,index:t,inputsLength:n.length,width:i},key:e.id},_a)})),i.map(((e,t)=>this.slotFill({type:"cell",context:{cellType:"output-header",output:e,index:t,outputsLength:i.length},key:e.id},Sa))),this.slotFills({type:"cell",context:{cellType:"after-label-cells"}})],0),2)}}function _a(e,t){const{input:n,className:i,index:r}=e,{label:o,inputExpression:s,inputValues:a}=n,l=t.injector.get("translate");return Ui(1,"th",(i||"")+" input-cell",[Ui(1,"div","clause",l(0===r?"When":"And"),0),o?Ui(1,"div","input-label",o,0,{title:l("Input label: ")+o}):Ui(1,"div","input-expression",s.text,0,{title:l("Input expression: ")+s.text}),Ui(1,"div","input-variable",a&&a.text||s.typeRef,0,{title:a&&a.text?l("Input values"):l("Input type")})],0,{"data-col-id":n.id},n.id)}function Sa(e,t){const{output:n,className:i,index:r}=e,{label:o,name:s,outputValues:a,typeRef:l}=n,c=t.injector.get("translate");return Ui(1,"th",(i||"")+" output-cell",[Ui(1,"div","clause",c(0===r?"Then":"And"),0),o?Ui(1,"div","output-label",o,0,{title:c("Output label")}):Ui(1,"div","output-name",s,0,{title:c("Output name")}),Ui(1,"div","output-variable",a&&a.text||l,0,{title:a&&a.text?c("Output values"):c("Output type")})],0,null,n.id)}function ka(e){e.onGetComponent("table.head",(()=>xa))}ka.$inject=["components"];var Ca={__init__:["decisionTableHeadProvider"],decisionTableHeadProvider:["type",ka]};class Ea extends lo{constructor(e,t){super(e,t),this._translate=t.injector.get("translate"),aa(this)}render(){const e=this.sheet.getRoot();if(!bi(e,"dmn:DMNElement"))return null;const{name:t}=e.businessObject.$parent,n=this.components.getComponent("hit-policy")||Ma;return Ui(1,"div","decision-table-properties",[Ui(1,"div","decision-table-name",t,0,{title:this._translate("Decision name: ")+t}),Ui(1,"div","decision-table-header-separator"),Gi(2,n)],4)}}function Ma(){return null}Ea.$inject=["sheet","components"];class Aa{constructor(e){e.onGetComponent("table.before",500,(()=>Ea))}}Aa.$inject=["components"];var Ra={__init__:["decisionTableProperties"],decisionTableProperties:["type",Aa]};class Ta extends lo{render(){const{row:e,rowIndex:t}=this.props,{components:n}=this.context,i=n.getComponents("cell-inner",{cellType:"rule-index",row:e,rowIndex:t});return Ui(1,"td","rule-index",[i&&i.map((n=>Gi(2,n,{row:e,rowIndex:t}))),t+1],0,{"data-element-id":e.id,"data-row-id":e.id})}}class Da{constructor(e){e.onGetComponent("cell",(({cellType:e})=>{if("before-rule-cells"===e)return Ta}))}}Da.$inject=["components"];var Oa={__init__:["decisionRuleIndices"],decisionRuleIndices:["type",Da]};const Na=[{label:"FEEL",value:"feel"}];class Pa{constructor(e){this._injector=e;const t=e.get("config.expressionLanguages")||{};this._config={options:Na,defaults:{editor:"feel"}},t.options&&(this._config.options=t.options);const n=this._getLegacyDefaults();_(this._config class in Ol.e [all...] |
H A D | dmn-modeler.production.min.js | 15 */function Is(e){var t=Gt('<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;">'+js+"</a>");e.appendChild(t),zt.bind(t,"click",(function(e){!function(){Ns||(Ns=Gt(qs),Wt.bind(Ns,".backdrop","click",(function(e){document.body.removeChild(Ns)})));document.body.appendChild(Ns)}(),e.preventDefault()}))}class Bs extends Ds{constructor(e,t){super(e,t),this.node=null}componentDidMount(){Is(this.node)}render(){return vr(1,"div",null,null,1,null,null,(e=>this.node=e))}}function Ls(e){return e.join(";")}var Ns,qs='<div class="bjs-powered-by-lightbox" style="'+Ls(["z-index: 1001","position: fixed","top: 0","left: 0","right: 0","bottom: 0"])+'"><div class="backdrop" style="'+Ls(["width: 100%","height: 100%","background: rgba(40,40,40,0.2)"])+'"></div><div class="notice" style="'+Ls(["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;">'+js+'</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>';var Vs=new un,Fs="hsl(225, 10%, 15%)";function zs(e,t,n,i,o,r){Mn.call(this,t);var a=Vs.next(),l=i.computeStyle,c={},u=e&&e.defaultFillColor||"white",h=e&&e.defaultStrokeColor||Fs,d=e&&e.defaultLabelColor;function p(e,t,n){var i=e+"-"+Hs(t)+"-"+Hs(n)+"-"+a;return c[i]||function(e,t,n,i){if("association-start"===t){var o=Qn("path");jn(o,{d:"M 11 5 L 1 10 L 11 15"}),f(e,{element:o,attrs:{fill:"none",stroke:i,strokeWidth:1.5},ref:{x:1,y:10},scale:.5})}else if("association-end"===t){var r=Qn("path");jn(r,{d:"M 1 5 L 11 10 L 1 15"}),f(e,{element:r,attrs:{fill:"none",stroke:i,strokeWidth:1.5},ref:{x:12,y:10},scale:.5})}else if("information-requirement-end"===t){var s=Qn("path");jn(s,{d:"M 1 5 L 11 10 L 1 15 Z"}),f(e,{element:s,attrs:{fill:i,stroke:"none"},ref:{x:11,y:10},scale:1})}else if("knowledge-requirement-end"===t){var a=Qn("path");jn(a,{d:"M 1 3 L 11 10 L 1 17"}),f(e,{element:a,attrs:{fill:"none",stroke:i,strokeWidth:2},ref:{x:11,y:10},scale:.8})}else if("authority-requirement-end"===t){var l=Qn("circle");jn(l,{cx:3,cy:3,r:3}),f(e,{element:l,attrs:{fill:i,stroke:"none"},ref:{x:3,y:3},scale:.9})}}(i,e,0,n),"url(#"+i+")"}function f(e,t){var n=M({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 s=Qn("marker");jn(t.element,n),An(s,t.element),jn(s,{id:e,viewBox:"0 0 20 20",refX:i.x,refY:i.y,markerWidth:20*o,markerHeight:20*o,orient:"auto"});var a=Zt("defs",r._svg);a||(a=Qn("defs"),An(r._svg,a)),An(a,s),c[e]=s}function g(e,t,n,i,o,r){s(o)&&(r=o,o=0),o=o||0,r=l(r,{stroke:Fs,strokeWidth:2,fill:"white"});var a=Qn("rect");return jn(a,{x:o,y:o,width:t-2*o,height:n-2*o,rx:i,ry:i}),jn(a,r),An(e,a),a}function m(e,t,n){var i=o.createText(t||"",n);return Pt(i,"class","djs-label"),An(e,i),i}function v(e,t,n,i){var o=function(e){return fn(e).name}(t);return m(e,o,i=M({box:t,align:n,padding:5,style:{fill:Xs(t,d,h)}},i))}function y(e,t,n){n=l(n,["no-fill"],{strokeWidth:2,stroke:Fs});var i=Qn("path");return jn(i,{d:t}),jn(i,n),An(e,i),i}var x={"dmn:Decision":function(e,t){var n=g(e,t.width,t.height,0,{stroke:Ws(t,h),fill:Us(t,u)});return v(e,t,"center-middle"),n},"dmn:KnowledgeSource":function(e,t){var i=y(e,n.getScaledPath("KNOWLEDGE_SOURCE",{xScaleFactor:1.021,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.075}}),{strokeWidth:2,fill:Us(t,u),stroke:Ws(t,h)});return v(e,t,"center-middle"),i},"dmn:BusinessKnowledgeModel":function(e,t){var i=y(e,n.getScaledPath("BUSINESS_KNOWLEDGE_MODEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.3}}),{strokeWidth:2,fill:Us(t,u),stroke:Ws(t,h)});return v(e,t,"center-middle"),i},"dmn:InputData":function(e,t){var n=g(e,t.width,t.height,22,{stroke:Ws(t,h),fill:Us(t,u)});return v(e,t,"center-middle"),n},"dmn:TextAnnotation":function(e,t){var i=g(e,t.width,t.height,0,0,{fill:"none",stroke:"none"});return y(e,n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:0}}),{stroke:Ws(t,h)}),m(e,Qs(t).text||"",{style:{fill:Xs(t,d,h)},box:t,align:"left-top",padding:5}),i},"dmn:Association":function(e,t){var n=Qs(t),i=Us(t,u),o=Ws(t,h),r={stroke:o,strokeDasharray:"0.5, 5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"};return"One"!==n.associationDirection&&"Both"!==n.associationDirection||(r.markerEnd=p("association-end",i,o)),"Both"===n.associationDirection&&(r.markerStart=p("association-start",i,o)),b(e,t.waypoints,r)},"dmn:InformationRequirement":function(e,t){var n=Us(t,u),i=Ws(t,h),o={stroke:i,strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round",markerEnd:p("information-requirement-end",n,i)};return b(e,t.waypoints,o)},"dmn:KnowledgeRequirement":function(e,t){var n=Us(t,u),i=Ws(t,h),o={stroke:i,strokeWidth:1,strokeDasharray:5,strokeLinecap:"round",strokeLinejoin:"round",markerEnd:p("knowledge-requirement-end",n,i)};return b(e,t.waypoints,o)},"dmn:AuthorityRequirement":function(e,t){var n=Us(t,u),i=Ws(t,h),o={stroke:i,strokeWidth:1.5,strokeDasharray:5,strokeLinecap:"round",strokeLinejoin:"round",markerEnd:p("authority-requirement-end",n,i)};return b(e,t.waypoints,o)}};function b(e,t,n){var i=ci(t,n=l(n,["no-fill"],{stroke:Fs,strokeWidth:2,fill:"none"}));return An(e,i),i}this.canRender=function(e){return hn(e,"dmn:DMNElement")||hn(e,"dmn:InformationRequirement")||hn(e,"dmn:KnowledgeRequirement")||hn(e,"dmn:AuthorityRequirement")},this.drawShape=function(e,t){var n=x[t.type];return n?n(e,t):Mn.prototype.drawShape.apply(this,[e,t])},this.drawConnection=function(e,t){var n=t.type,i=x[n];return i?i(e,t):Mn.prototype.drawConnection.apply(this,[e,t])}}function Qs(e){return e.businessObject}function Hs(e){return e.replace(/[^0-9a-zA-z]+/g,"_")}function Ws(e,t){return t}function Us(e,t){return t}function Xs(e,t,n){return t||Ws(0,n)}yn(zs,Mn),zs.$inject=["config.drdRenderer","eventBus","pathMap","styles","textRenderer","canvas"];var Ks=0,Gs={width:150,height:50};function Ys(e,t){var n;t.textContent=e;try{var i,o=""===e;return t.textContent=o?"dummy":e,i={width:(n=t.getBBox()).width+2*n.x,height:n.height},o&&(i.width=0),i}catch(e){return console.log(e),{width:0,height:0}}}function Zs(e,t,n){for(var i,o=e.shift(),r=o;;){if((i=Ys(r,n)).width=r?i.width:0," "===r||""===r||i.width<Math.round(t)||r.length<2)return Js(e,r,o,i);r=ta(r,i.width,t)}}function Js(e,t,n,i){if(t.length<n.length){var o=n.slice(t.length).trim();e.unshift(o)}return{width:i.width,height:i.height,text:t}}var ea="";function ta(e,t,n){var i=Math.max(e.length*(n/t),1),o=function(e,t){var n,i=e.split(/(\s|-|\u00AD)/g),o=[],r=0;if(i.length>1)for(;n=i.shift();){if(!(n.length+r<t)){"-"!==n&&n!==ea||o.pop();break}o.push(n),r+=n.length}var s=o[o.length-1];return s&&s===ea&&(o[o.length-1]="-"),o.join("")}(e,i);return o||(o=e.slice(0,Math.max(Math.round(i-1),1))),o}function na(e){this._config=M({},{size:Gs,padding:Ks,style:{},align:"center-top"},e||{})}na.prototype.createText=function(e,t){return this.layoutText(e,t).element},na.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},na.prototype.layoutText=function(e,t){var n=M({},this._config.size,t.box),i=M({},this._config.style,t.style),o=function(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}(t.align||this._config.align),r=function(e){return s(e)?M({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,l=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(i),c=e.split(/\u00AD?\r?\n/),u=[],h=n.width-r.left-r.right,d=Qn("text");for(jn(d,{x:0,y:0}),jn(d,i),An(function(){var e=document.getElementById("helper-svg");return e||(jn(e=Qn("svg"),{id:"helper-svg"}),At(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}(),d);c.length;)u.push(Zs(c,h,d));"middle"===o.vertical&&(r.top=r.bottom=0);var g=f(u,(function(e,t,n){return e+(l||t.height)}),0)+r.top+r.bottom,m=f(u,(function(e,t,n){return t.width>e?t.width:e}),0),v=r.top;"middle"===o.vertical&&(v+=(n.height-g)/2),v-=(l||u[0].height)/4;var y=Qn("text");return jn(y,i),p(u,(function(e){var t;switch(v+=l||e.height,o.horizontal){case"left":t=r.left;break;case"right":t=(a?m:h)-r.right-e.width;break;default:t=Math.max(((a?m:h)-e.width)/2+r.left,0)}var n=Qn("tspan");jn(n,{x:t,y:v}),n.textContent=e.text,An(y,n)})),ti(d),{dimensions:{width:m,height:g},element:y}};function ia(e){var t=M({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=M({},t,{fontSize:n},e&&e.externalStyle||{}),o=new na({style:t});this.getExternalLabelBounds=function(e,t){var n=o.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=o.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 o.createText(e,t||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return i}}ia.$inject=["config.textRenderer"];var oa=/\{([^{}]+)\}/g,ra=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var sa={__init__:["drdRenderer"],drdRenderer:["type",zs],textRenderer:["type",ia],pathMap:["type",function(){this.pathMap={KNOWLEDGE_SOURCE:{d:"m {mx},{my} l 0,{e.y0} c {e.x0},{e.y1} {e.x1},-{e.y2} {e.x2},-{e.y3} c {e.x3},-{e.y4} {e.x4},{e.y5} {e.x5},{e.y6} l 0,-{e.y7}z",width:100,height:65,widthElements:[29.8,48.4,67.2,12.2,19.8,30.8],heightElements:[55.3,19.7,4.2,6.7,2.3,1.6,6.2,54.6]},BUSINESS_KNOWLEDGE_MODEL:{d:"m {mx},{my} l {e.x0},-{e.y0} l {e.x1},0 l 0,{e.y1} l -{e.x2},{e.y2} l -{e.x3},0z",width:125,height:45,widthElements:[13.8,109.2,13.8,109.1],heightElements:[13.2,29.8,13.2]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",width:10,height:30,widthElements:[10],heightElements:[30]}},this.getRawPath=function(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var n,i,o=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 r={};if(t.position){for(var s=t.containerHeight/o.height*t.yScaleFactor,a=t.containerWidth/o.width*t.xScaleFactor,l=0;l<o.heightElements.length;l++)r["y"+l]=o.heightElements[l]*s;for(var c=0;c<o.widthElements.length;c++)r["x"+c]=o.widthElements[c]*a}var u,h,d=(u=o.d,h={mx:n,my:i,e:r},String(u).replace(oa,(function(e,t){return function(e,t,n){var i=n;return t.replace(ra,(function(e,t,n,o,r){t=t||o,i&&(t in i&&(i=i[t]),"function"==typeof i&&r&&(i=i()))})),i=(null==i||i==n?e:i)+""}(e,t,h)})));return d}}]};function aa(e,t,n,i){this._eventBus=e,this._canvas=t,this._elementRegistry=i,this._elementFactory=n}function la(e,t){return M({id:e.id,type:e.$type,businessObject:e},t)}function ca(e){return e.split("#").pop()}aa.$inject=["eventBus","canvas","elementFactory","elementRegistry"],aa.prototype.root=function(e){var t=this._elementFactory.createRoot(la(e));return this._canvas.setRootElement(t),t},aa.prototype.add=function(e){var t,n,i,o,r,s,a=this._elementFactory,l=this._canvas,c=this._eventBus,u=e.di;if(u.$instanceOf("dmndi:DMNShape"))s=u.bounds,r=la(e,{x:Math.round(s.x),y:Math.round(s.y),width:Math.round(s.width),height:Math.round(s.height)}),t=a.createShape(r),l.addShape(t),c.fire("drdElement.added",{element:t,di:u});else{if(!u.$instanceOf("dmndi:DMNEdge"))throw new Error("unknown di for element "+e.id);n=function(e){var t=e.waypoint;if(t)return v(t,(function(e){var t={x:e.x,y:e.y};return M({original:t},t)}))}(u),i=this._getSource(e),o=this._getTarget(e),i&&o&&(r=la(e,{hidden:!1,source:i,target:o,waypoints:n}),t=a.createConnection(r),l.addConnection(t),c.fire("drdElement.added",{element:t,di:u}))}return t},aa.prototype._getSource=function(e){var t,n;if(hn(e,"dmn:Association")?n=e.sourceRef:hn(e,"dmn:InformationRequirement")?n=e.requiredDecision||e.requiredInput:hn(e,"dmn:KnowledgeRequirement")?n=e.requiredKnowledge:hn(e,"dmn:AuthorityRequirement")&&(n=e.requiredDecision||e.requiredInput||e.requiredAuthority),n&&(t=n.href),t)return this._getShape(ca(t))},aa.prototype._getTarget=function(e){return hn(e,"dmn:Association")?e.targetRef&&this._getShape(ca(e.targetRef.href)):this._getShape(e.$parent.id)},aa.prototype._getShape=function(e){return this._elementRegistry.get(e)};var ua={__depends__:[sa,{drdImporter:["type",aa]}]};var ha={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]};function da(e){e&&"function"==typeof e.stopPropagation&&e.stopPropagation()}function pa(e){return e.originalEvent||e.srcEvent}function fa(e){da(e),da(pa(e))}function ga(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 ma(){return/mac/i.test(navigator.platform)}function va(e,t){return(pa(e)||e).button===t}function ya(e){return va(e,0)}function xa(e){var t=pa(e)||e;return!!ya(e)&&(ma()?t.metaKey:t.ctrlKey)}function ba(e){var t=pa(e)||e;return ya(e)&&t.shiftKey}function _a(e){return!0}function wa(e){return ya(e)||function(e){return va(e,1)}(e)}function Ca(e,t,n){var i=this;function o(n,i,o){var r,s;(function(e,t){var n=l[e]||ya;return!n(t)})(n,i)||(o?s=t.getGraphics(o):(r=i.delegateTarget||i.target)&&(s=r,o=t.get(s)),s&&o&&!1===e.fire(n,{element:o,gfx:s,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var r={};function s(e){return r[e]}var a={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},l={"element.contextmenu":_a,"element.mousedown":wa,"element.mouseup":wa,"element.click":wa,"element.dblclick":wa};var c="svg, .djs-element";function u(e,t,n,i){var s=r[n]=function(e){o(n,e)};i&&(l[n]=i),s.$delegate=Wt.bind(e,c,t,s)}function h(e,t,n){var i=s(n);i&&Wt.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){!function(e){p(a,(function(t,n){h(e,n,t)}))}(e.svg)})),e.on("canvas.init",(function(e){!function(e){p(a,(function(t,n){u(e,n,t)}))}(e.svg)})),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 d=m("djs-hit djs-hit-stroke"),f=m("djs-hit djs-hit-click-stroke"),g={all:m("djs-hit djs-hit-all"),"click-stroke":f,stroke:d,"no-move":m("djs-hit djs-hit-no-move")};function m(e,t){return t=M({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function v(e,t){var n=g[t];if(!n)throw new Error("invalid hit type <"+t+">");return jn(e,n),e}function y(e,t){An(e,t)}this.removeHits=function(e){p(Jt(".djs-hit",e),ti)},this.createDefaultHit=function(e,t){var n,i=e.waypoints,o=e.isFrame;return i?this.createWaypointsHit(t,i):(n=o?"stroke":"all",this.createBoxHit(t,n,{width:e.width,height:e.height}))},this.createWaypointsHit=function(e,t){var n=ci(t);return v(n,"stroke"),y(e,n),n},this.createBoxHit=function(e,t,n){n=M({x:0,y:0},n);var i=Qn("rect");return v(i,t),jn(i,n),y(e,i),i},this.updateDefaultHit=function(e,t){var n=Zt(".djs-hit",t);if(n)return e.waypoints?ui(n,e.waypoints):jn(n,{width:e.width,height:e.height}),n},this.fire=o,this.triggerMouseEvent=function(e,t,n){var i=a[e];if(!i)throw new Error("unmapped DOM event name <"+e+">");return o(i,t,n)},this.mouseHandler=s,this.registerEvent=u,this.unregisterEvent=h}Ca.$inject=["eventBus","elementRegistry","styles"];var Oa={__init__:["interactionEvents"],interactionEvents:["type",Ca]};function ka(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)}))}ka.$inject=["eventBus","canvas"],ka.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})}},ka.prototype.get=function(){return this._selectedElements},ka.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},ka.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();r(e)||(e=e?[e]:[]);var o=this._canvas,s=o.getRootElement();e=e.filter((function(e){var t=o.findRoot(e);return s===t})),t?p(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 Ea="hover",Sa="selected";function Ra(e,t){function n(t,n){e.addMarker(t,n)}function i(t,n){e.removeMarker(t,n)}this._canvas=e,t.on("element.hover",(function(e){n(e.element,Ea)})),t.on("element.out",(function(e){i(e.element,Ea)})),t.on("selection.changed",(function(e){var t=e.oldSelection,o=e.newSelection;p(t,(function(e){-1===o.indexOf(e)&&function(e){i(e,Sa)}(e)})),p(o,(function(e){-1===t.indexOf(e)&&function(e){n(e,Sa)}(e)}))}))}function Ta(e,t,n,i){e.on("create.end",500,(function(e){var n=e.context,i=n.canExecute,o=n.elements,s=(n.hints||{}).autoSelect;if(i){if(!1===s)return;r(s)?t.select(s):t.select(o.filter(Ma))}})),e.on("connect.end",500,(function(e){var n=e.context.connection;n&&t.select(n)})),e.on("shape.move.end",500,(function(e){var n=e.previousSelection||[],o=i.get(e.context.shape.id);h(n,(function(e){return o.id===e.id}))||t.select(o)})),e.on("element.click",(function(e){if(ya(e)){var i=e.element;i===n.getRootElement()&&(i=null);var o=t.isSelected(i),r=t.get().length>1,s=ba(e);if(o&&r)return s?t.deselect(i):t.select(i);o?t.deselect(i):t.select(i,s)}}))}function Ma(e){return!e.hidden}Ra.$inject=["canvas","eventBus"],Ta.$inject=["eventBus","selection","canvas","elementRegistry"];var Aa={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Oa],selection:["type",ka],selectionVisuals:["type",Ra],selectionBehavior:["type",Ta]};function Pa(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}Pa.prototype.next=function(){return this._prefix+ ++this._counter};var Da=new Pa("ov");function $a(e,t,n,i){var o,r;this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=Da,this._overlayDefaults=M({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(o=n.getContainer(),At(r=Gt('<div class="djs-overlay-container" />'),{position:"absolute",width:0,height:0}),o.insertBefore(r,o.firstChild),r),this._init()}function ja(e,t,n){At(e,{left:t+"px",top:n+"px"})}function Ia(e,t){e.style.display=!1===t?"none":""}function Ba(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}$a.$inject=["config.overlays","eventBus","canvas","elementRegistry"],$a.prototype.get=function(e){if(c(e)&&(e={id:e}),c(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?d(t.overlays,C({type:e.type})):t.overlays.slice():[]}return e.type?d(this._overlays,C({type:e.type})):e.id?this._overlays[e.id]:null},$a.prototype.add=function(e,t,n){if(s(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=M({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},$a.prototype.remove=function(e){var t=this.get(e)||[];r(t)||(t=[t]);var n=this;p(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(en(e.html),en(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)}}))},$a.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},$a.prototype.show=function(){Ia(this._overlayRoot)},$a.prototype.hide=function(){Ia(this._overlayRoot,!1)},$a.prototype.clear=function(){this._overlays={},this._overlayContainers=[],It(this._overlayRoot)},$a.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,o=t.y;if(t.waypoints){var r=mi(t);i=r.x,o=r.y}ja(n,i,o),Pt(e.html,"data-container-id",t.id)},$a.prototype._updateOverlay=function(e){var t,n,i=e.position,o=e.htmlContainer,r=e.element,s=i.left,a=i.top;void 0!==i.right&&(t=r.waypoints?mi(r).width:r.width,s=-1*i.right+t);void 0!==i.bottom&&(n=r.waypoints?mi(r).height:r.height,a=-1*i.bottom+n);ja(o,s||0,a||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},$a.prototype._createOverlayContainer=function(e){var t=Gt('<div class="djs-overlays" />');At(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},$a.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Ba(this._overlayRoot,n)},$a.prototype._getOverlayContainer=function(e,t){var n=h(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},$a.prototype._addOverlay=function(e){var t,n,i=e.id,o=e.element,r=e.html;r.get&&r.constructor.prototype.jquery&&(r=r.get(0)),c(r)&&(r=Gt(r)),n=this._getOverlayContainer(o),At(t=Gt('<div class="djs-overlay" data-overlay-id="'+i+'">'),{position:"absolute"}),t.appendChild(r),e.type&&$t(t).add("djs-overlay-"+e.type),Ia(t,this._canvas.findRoot(o)===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())},$a.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,o=this._canvas.findRoot(e.element),r=n&&n.minZoom,s=n&&n.maxZoom,a=e.htmlContainer,l=!0;(o!==this._canvas.getRootElement()||n&&(i(r)&&r>t.scale||i(s)&&s<t.scale))&&(l=!1),Ia(a,l),this._updateOverlayScale(e,t)},$a.prototype._updateOverlayScale=function(e,t){var n,o,r,s=e.scale,a=e.htmlContainer,l="";!0!==s&&(!1===s?(n=1,o=1):(n=s.min,o=s.max),i(n)&&t.scale<n&&(r=(1/t.scale||1)*n),i(o)&&t.scale>o&&(r=(1/t.scale||1)*o)),i(r)&&(l="scale("+r+","+r+")"),Ba(a,l)},$a.prototype._updateOverlaysVisibilty=function(e){var t=this;p(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},$a.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;p(t.get({element:n}),(function(e){t.remove(e.id)}));var i=t._getOverlayContainer(n);if(i){en(i.html);var o=t._overlayContainers.indexOf(i);-1!==o&&t._overlayContainers.splice(o,1)}})),e.on("element.changed",500,(function(e){var n=e.element,i=t._getOverlayContainer(n,!0);i&&(p(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&&$t(n.html)[e.add?"add":"remove"](e.marker)})),e.on("root.set",(function(){t._updateOverlaysVisibilty(t._canvas.viewbox())})),e.on("diagram.clear",this.clear,this)};var La={__init__:["overlays"],overlays:["type",$a]};function Na(e,t,n){this._eventBus=e,this._canvas=t,this._translate=n,e.on("diagram.init",(function(){this._init()}),this),e.on("import.done",(function(e){e.error||this.update()}),this),this.HTML_MARKUP='<div class="dmn-definitions"><div class="dmn-definitions-name" title="'+this._translate("Definition name")+'" spellcheck="false"></div><div class="dmn-definitions-id" title="'+this._translate("Definition ID")+'" spellcheck="false"></div></div>'}function qa(e,t){function n(e,n){$t(t.getContainer()).toggle(e,n)}e.on("palette.create",(function(){n("with-palette",!0)})),e.on("palette.changed",(function(e){n("with-palette-two-column",e.twoColumn)}))}Na.$inject=["eventBus","canvas","translate"],Na.prototype._init=function(){var e=this._canvas,t=this._eventBus,n=e.getContainer(),i=this._container=Gt(this.HTML_MARKUP);n.appendChild(i),this.nameElement=Zt(".dmn-definitions-name",this._container),this.idElement=Zt(".dmn-definitions-id",this._container),Wt.bind(i,".dmn-definitions-name, .dmn-definitions-id","mousedown",(function(e){e.stopPropagation()})),t.fire("definitionIdView.create",{html:i})},Na.prototype.update=function(){var e=this._canvas.getRootElement().businessObject;this.nameElement.textContent=e.name,this.idElement.textContent=e.id},qa.$inject=["eventBus","canvas"];var Va={__depends__:[ha],__init__:["definitionPropertiesView","definitionPropertiesPaletteAdapter"],definitionPropertiesView:["type",Na],definitionPropertiesPaletteAdapter:["type",qa]},Fa=[{className:"dmn-icon-decision-table",matches:function(e){var t=fn(e);return hn(t,"dmn:Decision")&&hn(t.decisionLogic,"dmn:DecisionTable")},title:"Open decision table"},{className:"dmn-icon-literal-expression",matches:function(e){return hn(mn(e),"dmn:LiteralExpression")},title:"Open literal expression"}];class za{constructor(e,t,n,i,o){this._injector=e,this._eventBus=t,this._overlays=n,this._translate=o,this._config=i||{enabled:!0},t.on(["shape.added"],(({element:e})=>{for(let t=0;t<Fa.length;t++){const{matches:n,className:i,title:o}=Fa[t];n&&n(e)&&this.addOverlay(e,i,o)}}))}addOverlay(e,t,n){const i=!1!==this._config.enabled,o=this._getOverlayNode(t,n,i),r=this._overlays.add(e,{position:{top:2,left:2},html:o});i&&($t(o).add("interactive"),this.bindEventListener(e,o,r))}_getOverlayNode(e,t,n){const i=document.createElement("div");if(i.className="drill-down-overlay",!n){const t=document.createElement("span");return t.className=e,i.appendChild(t),i}const o=document.createElement("button");return o.type="button",o.className=e,o.title=this._translate(t),i.appendChild(o),i}bindEventListener(e,t,n){const i=this._overlays,o=this._eventBus,r=i._overlayRoot;Wt.bind(r,'[data-overlay-id="'+n+'"]',"click",(()=>{!1!==o.fire("drillDown.click",{element:e})&&this.drillDown(e)}))}drillDown(e){const t=this._injector.get("_parent",!1);if(!t)return!1;const n=t.getView(e.businessObject);return!!n&&(t.open(n),!0)}}za.$inject=["injector","eventBus","overlays","config.drillDown","translate"];var Qa={__depends__:[La,ha],__init__:["drillDown"],drillDown:["type",za]}; 176 `}var td=["contextPad.close","canvas.viewbox.changing","commandStack.changed"];function nd(e,t,n,o){this._eventBus=t,this._canvas=n,this._search=o,this._current=null;var r=i(e&&e.scale)?e.scale:{min:1,max:1};this._config={scale:r},t.on("diagram.destroy",(()=>{this.close()})),t.on("element.changed",(e=>{const t=this.isOpen()&&this._current.target;e.element===t&&this.refresh()}))}function id(e,t){return od(t)-od(e)}function od(e){return e.reduce(((e,t)=>e+function(e){if(!e.match)return 0;return e.start?1.37:e.wordStart?1.13:1}(t)),0)}function rd(e="",t=""){return e.localeCompare(t)}function sd(e){return e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")}nd.$inject=["config.popupMenu","eventBus","canvas","search"],nd.prototype._render=function(){const{position:e,providerId:t,entries:n,headerEntries:i,emptyPlaceholder:o,options:r}=this._current,s=Object.entries(n).map((([e,t])=>({id:e,...t}))),a=Object.entries(i).map((([e,t])=>({id:e,...t}))),l=e&&(t=>this._ensureVisible(t,e)),c=this._updateScale(this._current.container);mh(Ch` 191 `,this._current.container)},nd.prototype.open=function(e,t,n,i){if(!e)throw new Error("target is missing");if(!t)throw new Error("providers for <"+t+"> not found");if(!n)throw new Error("position is missing");this.isOpen()&&this.close();const{entries:o,headerEntries:r,emptyPlaceholder:s}=this._getContext(e,t);this._current={position:n,providerId:t,target:e,entries:o,headerEntries:r,emptyPlaceholder:s,container:this._createContainer({provider:t}),options:i},this._emit("open"),this._bindAutoClose(),this._render()},nd.prototype.refresh=function(){if(!this.isOpen())return;const{target:e,providerId:t}=this._current,{entries:n,headerEntries:i,emptyPlaceholder:o}=this._getContext(e,t);this._current={...this._current,entries:n,headerEntries:i,emptyPlaceholder:o},this._emit("refresh"),this._render()},nd.prototype._getContext=function(e,t){const n=this._getProviders(t);if(!n||!n.length)throw new Error("provider for <"+t+"> not found");const i=this._getEntries(e,n),o=this._getHeaderEntries(e,n);return{entries:i,headerEntries:o,emptyPlaceholder:this._getEmptyPlaceholder(n),empty:!(Object.keys(i).length||Object.keys(o).length)}},nd.prototype.close=function(){this.isOpen()&&(this._emit("close"),this.reset(),this._canvas.restoreFocus(),this._current=null)},nd.prototype.reset=function(){const e=this._current.container;mh(null,e),en(e)},nd.prototype._emit=function(e,t){this._eventBus.fire(`popupMenu.${e}`,t)},nd.prototype._onOpened=function(){this._emit("opened")},nd.prototype._onClosed=function(){this._emit("closed")},nd.prototype._createContainer=function(e){var t=this._canvas.getContainer();const n=Gt(`<div class="djs-popup-parent djs-scrollable" data-popup=${e.provider}></div>`);return t.appendChild(n),n},nd.prototype._bindAutoClose=function(){this._eventBus.once(td,this.close,this)},nd.prototype._unbindAutoClose=function(){this._eventBus.off(td,this.close,this)},nd.prototype._updateScale=function(){var e,t,n=this._canvas.zoom(),o=this._config.scale,r=n;return!0!==o&&(!1===o?(e=1,t=1):(e=o.min,t=o.max),i(e)&&n<e&&(r=e),i(t)&&n>t&&(r=t)),r},nd.prototype._ensureVisible=function(e,t){var n=document.documentElement.getBoundingClientRect(),i=e.getBoundingClientRect(),o={},r=t.x,s=t.y;return t.x+i.width>n.width&&(o.x=!0),t.y+i.height>n.height&&(o.y=!0),o.x&&o.y?(r=t.x-i.width,s=t.y-i.height):o.x?(r=t.x-i.width,s=t.y):o.y&&t.y<i.height?(r=t.x,s=10):o.y&&(r=t.x,s=t.y-i.height),t.y<n.top&&(s=t.y+i.height),{x:r,y:s}},nd.prototype.isEmpty=function(e,t){if(!e)throw new Error("target is missing");if(!t)throw new Error("provider ID is missing");const n=this._getProviders(t);return!n||!n.length||this._getContext(e,t).empty},nd.prototype.registerProvider=function(e,t,n){n||(n=t,t=1e3),this._eventBus.on("popupMenu.getProviders."+e,t,(function(e){e.providers.push(n)}))},nd.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"popupMenu.getProviders."+e,providers:[]});return this._eventBus.fire(t),t.providers},nd.prototype._getEntries=function(e,t){var n={};return p(t,(function(t){if(t.getPopupMenuEntries){var i=t.getPopupMenuEntries(e);l(i)?n=i(n):p(i,(function(e,t){n[t]=e}))}else p(t.getEntries(e),(function(e){var t=e.id;if(!t)throw new Error("entry ID is missing");n[t]=P(e,["id"])}))})),n},nd.prototype._getHeaderEntries=function(e,t){var n={};return p(t,(function(t){if(t.getPopupMenuHeaderEntries){var i=t.getPopupMenuHeaderEntries(e);l(i)?n=i(n):p(i,(function(e,t){n[t]=e}))}else{if(!t.getHeaderEntries)return;p(t.getHeaderEntries(e),(function(e){var t=e.id;if(!t)throw new Error("entry ID is missing");n[t]=P(e,["id"])}))}})),n},nd.prototype._getEmptyPlaceholder=function(e){const t=e.find((e=>l(e.getEmptyPlaceholder)));return t&&t.getEmptyPlaceholder()},nd.prototype.isOpen=function(){return!!this._current},nd.prototype.trigger=function(e,t,n="click"){if(e.preventDefault(),!t){let n=Pt(Bt(e.delegateTarget||e.target,".entry",!0),"data-id");t={id:n,...this._getEntry(n)}}const i=t.action;if(!1!==this._emit("trigger",{entry:t,event:e}))if(l(i)){if("click"===n)return i(e,t)}else if(i[n])return i[n](e,t)},nd.prototype._getEntry=function(e){var t=this._current.entries[e]||this._current.headerEntries[e];if(!t)throw new Error("entry not found");return t};var ad={search:["value",function(e,t,n){const{keys:i}=n,o=t.trim().toLowerCase().split(/\s+/);return e.flatMap((e=>{const t=function(e,t,n){const{matchedWords:i,tokens:o}=n.reduce(((n,i)=>{const o=e[i],{tokens:r,matchedWords:s}=function(e,t){if(!e)return{tokens:[],matchedWords:{}};const n=[],i={},o=t.map(sd).flatMap((e=>["(?<wordStart>\\b"+e+")",e])).join("|"),r=new RegExp(o,"ig");let s,a=0;for(;s=r.exec(e);){const[t]=s;s.index>a&&n.push({value:e.slice(a,s.index),index:a}),n.push({value:t,index:s.index,match:!0,wordStart:!!s.groups.wordStart,start:0===s.index}),i[t.toLowerCase()]=!0,a=s.index+t.length}a<e.length&&n.push({value:e.slice(a),index:a});return{tokens:n,matchedWords:i}}(o,t);return{tokens:{...n.tokens,[i]:r},matchedWords:{...n.matchedWords,...s}}}),{matchedWords:{},tokens:{}});if(Object.keys(i).length!==t.length)return null;return o}(e,o,i);return t?{item:e,tokens:t}:[]})).sort(function(e){return(t,n)=>{for(const i of e){const e=id(t.tokens[i],n.tokens[i]);if(0!==e)return e;const o=rd(t.item[i],n.item[i]);if(0!==o)return o}return 0}}(i))}]},ld={__depends__:[ad],__init__:["popupMenu"],popupMenu:["type",nd]},cd=Math.round;function ud(e,t){this._modeling=e,this._eventBus=t}function hd(e,t){t.on("replace.end",500,(function(t){const{newElement:n,hints:i={}}=t;!1!==i.select&&e.select(n)}))}ud.$inject=["modeling","eventBus"],ud.prototype.replaceElement=function(e,t,n){if(e.waypoints)return null;var i=this._modeling,o=this._eventBus;o.fire("replace.start",{element:e,attrs:t,hints:n});var r=t.width||e.width,s=t.height||e.height,a=t.x||e.x,l=t.y||e.y,c=cd(a+r/2),u=cd(l+s/2),h=i.replaceShape(e,M({},t,{x:c,y:u,width:r,height:s}),n);return o.fire("replace.end",{element:e,newElement:h,hints:n}),h},hd.$inject=["selection","eventBus"];var dd={__init__:["replace","replaceSelectionBehavior"],replaceSelectionBehavior:["type",hd],replace:["type",ud]};function pd(e,t,n,i){this.replaceElement=function(n,i,o){o=o||{};var r=i.type,s=n.businessObject,a=e.create(r),l={type:r,businessObject:a};if(l.width=n.width,l.height=n.height,a.name=s.name,i.table){var c=e.create("dmn:DecisionTable");c.$parent=a;var u=e.create("dmn:OutputClause");u.typeRef="string",u.$parent=c,c.output=[u];var h=e.create("dmn:InputClause");h.$parent=c;var d=e.create("dmn:LiteralExpression",{typeRef:"string"});h.inputExpression=d,d.$parent=h,c.input=[h],fd(a,c,e)}if(i.expression){var p=e.create("dmn:LiteralExpression"),f=e.create("dmn:InformationItem",{name:s.name});fd(a,p,e,f)}return t.replaceElement(n,l,o)}}function fd(e,t,n,i){if(hn(e,"dmn:Decision"))e.decisionLogic=t,t.$parent=e;else if(hn(e,"dmn:BusinessKnowledgeModel")){var o=n.create("dmn:FunctionDefinition",{body:t});e.encapsulatedLogic=o,o.$parent=e,t.$parent=o}i&&(e.variable=i,i.$parent=e)}pd.$inject=["drdFactory","replace","selection","modeling"];var gd={__depends__:[dd,Aa],drdReplace:["type",pd]},md=[{label:"Empty",actionName:"replace-with-empty-decision",className:"dmn-icon-clear",target:{type:"dmn:Decision",table:!1,expression:!1}},{label:"Decision table",actionName:"replace-with-decision-table",className:"dmn-icon-decision-table",target:{type:"dmn:Decision",table:!0,expression:!1}},{label:"Literal expression",actionName:"replace-with-literal-expression",className:"dmn-icon-literal-expression",target:{type:"dmn:Decision",table:!1,expression:!0}}],vd=[{label:"Empty",actionName:"replace-with-empty",className:"dmn-icon-clear",target:{type:"dmn:BusinessKnowledgeModel",table:!1,expression:!1}},{label:"Literal Expression",actionName:"replace-with-literal-expression",className:"dmn-icon-literal-expression",target:{type:"dmn:BusinessKnowledgeModel",table:!1,expression:!0}}];function yd(e,t,n,i,o,r){this._popupMenu=e,this._modeling=t,this._moddle=n,this._drdReplace=i,this._rules=o,this._translate=r,this.register()}yd.$inject=["popupMenu","modeling","moddle","drdReplace","rules","translate"],yd.prototype.register=function(){this._popupMenu.registerProvider("dmn-replace",this)},yd.prototype.getEntries=function(e){var t,n,i=e.businessObject;return this._rules.allowed("shape.replace",{element:e})?hn(i,"dmn:Decision")?(n=mn(i),t=d(md,(function(e){var t="replace-with-empty-decision"===e.actionName&&n,i="replace-with-decision-table"===e.actionName&&!hn(n,"dmn:DecisionTable"),o="replace-with-literal-expression"===e.actionName&&!hn(n,"dmn:LiteralExpression");return t||i||o})),this._createEntries(e,t)):hn(i,"dmn:BusinessKnowledgeModel")?(n=mn(i),t=d(vd,(function(e){var t="replace-with-empty"===e.actionName&&n,i="replace-with-decision-table"===e.actionName&&!hn(n,"dmn:DecisionTable"),o="replace-with-literal-expression"===e.actionName&&!hn(n,"dmn:LiteralExpression");return t||i||o})),this._createEntries(e,t)):[]:[]},yd.prototype._createEntries=function(e,t){var n=[],i=this;return p(t,(function(t){var o=i._createMenuEntry(t,e);n.push(o)})),n},yd.prototype._createMenuEntry=function(e,t,n){var i=this._drdReplace.replaceElement;return n=n||function(){return i(t,e.target)},{label:(0,this._translate)(e.label),className:e.className,id:e.actionName,action:n}},yd.prototype.getHeaderEntries=function(e){return[]};var xd={__depends__:[ha,ld,gd],__init__:["replaceMenuProvider"],replaceMenuProvider:["type",yd]};function bd(e,t,n,i,o,r,s,a,l,c,u,h){u=u||{},t.registerProvider(this),this._contextPad=t,this._modeling=n,this._elementFactory=i,this._connect=o,this._create=r,this._rules=s,this._popupMenu=a,this._canvas=l,this._translate=c,!1!==u.autoPlace&&(this._autoPlace=h.get("autoPlace",!1)),e.on("create.end",250,(function(e){var n=e.context.shape;if(xa(e)){var i=t.getEntries(n);i.replace&&i.replace.action.click(e,n)}}))}bd.$inject=["eventBus","contextPad","modeling","elementFactory","connect","create","rules","popupMenu","canvas","translate","config.contextPad","injector"],bd.prototype.getContextPadEntries=function(e){var t=this._modeling,n=this._elementFactory,i=this._connect,o=this._create,s=this._popupMenu,a=this._contextPad,l=this._rules,c=this._translate,u=this._autoPlace,h={};if("label"===e.type)return h;var d=e.businessObject;function p(e,t,n){i.start(e,t,n)}function f(e,t,i,r){function s(t,i){var s=n.createShape(M({type:e},r));o.start(t,s,{source:i,hints:{connectionTarget:i}})}var a=u?function(t,i){var o=n.createShape(M({type:e},r));u.append(i,o,{connectionTarget:i})}:s;return{group:"model",className:t,title:i,action:{dragstart:s,click:a}}}hn(d,"dmn:Decision")&&M(h,{"append.decision":f("dmn:Decision","dmn-icon-decision",c("Append decision"))}),gn(d,["dmn:BusinessKnowledgeModel","dmn:Decision","dmn:KnowledgeSource"])&&M(h,{"append.knowledge-source":f("dmn:KnowledgeSource","dmn-icon-knowledge-source",c("Append knowledge source"))}),gn(d,["dmn:BusinessKnowledgeModel","dmn:Decision"])&&M(h,{"append.business-knowledge-model":f("dmn:BusinessKnowledgeModel","dmn-icon-business-knowledge",c("Append business knowledge model"))}),gn(d,["dmn:Decision","dmn:KnowledgeSource"])&&M(h,{"append.input-data":f("dmn:InputData","dmn-icon-input-data",c("Append input data"))}),hn(d,"dmn:DRGElement")&&M(h,{"append.text-annotation":f("dmn:TextAnnotation","dmn-icon-text-annotation",c("Add text annotation")),connect:{group:"connect",className:"dmn-icon-connection-multi",title:c("Connect to other element"),action:{click:p,dragstart:p}}}),hn(d,"dmn:TextAnnotation")&&M(h,{connect:{group:"connect",className:"dmn-icon-connection-multi",title:c("Connect to other element"),action:{click:p,dragstart:p}}}),s.isEmpty(e,"dmn-replace")||M(h,{replace:{group:"edit",className:"dmn-icon-screw-wrench",title:c("Change type"),action:{click:function(e,t){var n=M(function(e){var t=a.getPad(e).html.getBoundingClientRect();return{x:t.left,y:t.bottom+5}}(t),{cursor:{x:e.x,y:e.y}});s.open(t,"dmn-replace",n)}}}});var g=l.allowed("elements.delete",{elements:[e]});return r(g)&&(g=g[0]===e),g&&M(h,{delete:{group:"edit",className:"dmn-icon-trash",title:c("Delete"),action:{click:function(n){t.removeElements([e])}}}}),h};var _d={__depends__:[ha,du,Aa,yu,zu,xd],__init__:["contextPadProvider"],contextPadProvider:["type",bd]};function wd(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)}wd.$inject=["injector","canvas","graphicsFactory","elementFactory"],wd.prototype.drawPreview=function(e,t,n){n=n||{};var i,o,r,s=e.connectionPreviewGfx,a=e.getConnection,l=n.source,c=n.target,u=n.waypoints,h=n.connectionStart,d=n.connectionEnd,p=n.noLayout,f=n.noCropping,g=n.noNoop,m=this;s||(s=e.connectionPreviewGfx=this.createConnectionPreviewGfx()),Nn(s),a||(a=e.getConnection=(o=function(e,t,n){return m.getConnection(e,t,n)},r={},function(e){var t=JSON.stringify(e),n=r[t];return n||(n=r[t]=o.apply(null,arguments)),n})),t&&(i=a(t,l,c)),i?(i.waypoints=u||[],this._layouter&&!p&&(i.waypoints=this._layouter.layoutConnection(i,{source:l,target:c,connectionStart:h,connectionEnd:d,waypoints:n.waypoints||i.waypoints})),i.waypoints&&i.waypoints.length||(i.waypoints=[l?mo(l):h,c?mo(c):d]),this._connectionDocking&&(l||c)&&!f&&(i.waypoints=this._connectionDocking.getCroppedWaypoints(i,l,c)),this._graphicsFactory.drawConnection(s,i,{stroke:"var(--element-dragger-color)"})):!g&&this.drawNoopPreview(s,n)},wd.prototype.drawNoopPreview=function(e,t){var n=t.source,i=t.target,o=t.connectionStart||mo(n),r=t.connectionEnd||mo(i),s=this.cropWaypoints(o,r,n,i);An(e,this.createNoopConnection(s[0],s[1]))},wd.prototype.cropWaypoints=function(e,t,n,i){var o=this._graphicsFactory,r=n&&o.getShapePath(n),s=i&&o.getShapePath(i),a=o.getConnectionPath({waypoints:[e,t]});return[e=n&&yo(r,a,!0)||e,t=i&&yo(s,a,!1)||t]},wd.prototype.cleanUp=function(e){e&&e.connectionPreviewGfx&&ti(e.connectionPreviewGfx)},wd.prototype.getConnection=function(e){var t=function(e){return s(e)?e:{}}(e);return this._elementFactory.createConnection(t)},wd.prototype.createConnectionPreviewGfx=function(){var e=Qn("g");return jn(e,{pointerEvents:"none"}),Bn(e).add("djs-dragger"),An(this._canvas.getActiveLayer(),e),e},wd.prototype.createNoopConnection=function(e,t){return ci([e,t],{stroke:"#333",strokeDasharray:[1],strokeWidth:2,"pointer-events":"none"})};var Cd={__init__:["connectionPreview"],connectionPreview:["type",wd]};const Od=/\s/,kd=/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i,Ed=/^[a-z_][\w-.]*$/i,Sd=/\$\{([^}]*)\}/g;function Rd(e,t){const n=e.$model.ids.assigned(t);return t?n&&n!==e?"Element must have unique ID.":function(e){if(e=function(e){return e.replace(Sd,"$1")}(e),function(e){return Od.test(e)}(e))return"Id must not contain spaces.";if(!Ed.test(e))return kd.test(e)?"Id must not contain prefix.":"Id must be a valid QName."}(t):"Element must have ID."}function Td(e,t,n,i,o){this._eventBus=e,this._modeling=t,this._canvas=n,this._definitionPropertiesView=i,this._translate=o,e.on("definitionIdView.create",(function(e){this._container=e.html;var t=Zt(".dmn-definitions-name",this._container),n=Zt(".dmn-definitions-id",this._container);this._setup(t,"name"),this._setup(n,"id")}),this)}Td.$inject=["eventBus","modeling","canvas","definitionPropertiesView","translate"],Td.prototype.update=function(e,t){var n=this._canvas.getRootElement(),i={};if(i[e]=t,"id"===e){var o=Rd(fn(n),t);if(o)return void this._addErrorMessage(o);this._clearErrorMessage()}this._modeling.updateProperties(n,i)},Td.prototype._setup=function(e,t){var n=this;e.setAttribute("contenteditable",!0),e.addEventListener("input",R((function(e){var i=e.target.value||e.target.textContent;n.update(t,i.trim())}),300)),e.addEventListener("keydown",(function(t){13===t.keyCode&&(e.blur(),window.getSelection().removeAllRanges())})),e.addEventListener("blur",(function(){n._clearErrorMessage(),n._definitionPropertiesView.update()}))},Td.prototype._addErrorMessage=function(e){const t='<span class="dmn-definitions-error-message">'+this._translate(e)+"</span>";var n=Zt(".dmn-definitions-id",this._container);this._clearErrorMessage(),$t(n).add("dmn-definitions-error"),n.parentElement.appendChild(Gt(t))},Td.prototype._clearErrorMessage=function(){var e=Zt(".dmn-definitions-id",this._container);if($t(e).has("dmn-definitions-error")){$t(e).remove("dmn-definitions-error");const t=Zt(".dmn-definitions-error-message",this._container);e.parentNode.removeChild(t)}};var Md={__depends__:[Va],__init__:["definitionPropertiesEdit","definitionPropertiesPaletteAdapter"],definitionPropertiesEdit:["type",Td],definitionPropertiesPaletteAdapter:["type",qa]},Ad={horizontal:["x","width"],vertical:["y","height"]};function Pd(e,t){this._modeling=e,this._filters=[],this.registerFilter((function(e){var n=t.allowed("elements.distribute",{elements:e});return r(n)?n:n?e:[]}))}Pd.$inject=["modeling","rules"],Pd.prototype.registerFilter=function(e){if("function"!=typeof e)throw new Error("the filter has to be a function");this._filters.push(e)},Pd.prototype.trigger=function(e,t){var n,i,o=this._modeling;if(!(e.length<3||(this._setOrientation(t),i=this._filterElements(e),(n=this._createGroups(i)).length<=2)))return o.distributeElements(n,this._axis,this._dimension),n},Pd.prototype._filterElements=function(e){var t=this._filters,n=this._axis,i=this._dimension,o=[].concat(e);return t.length?(p(t,(function(e){o=e(o,n,i)})),o):e},Pd.prototype._createGroups=function(e){var t=[],n=this,i=this._axis,o=this._dimension;if(!i)throw new Error('must have a defined "axis" and "dimension"');return p(w(e,i),(function(e,r){var s,a=n._findRange(e,i,o),l=t[t.length-1];l&&n._hasIntersection(l.range,a)?t[t.length-1].elements.push(e):(s={range:a,elements:[e]},t.push(s))})),t},Pd.prototype._setOrientation=function(e){var t=Ad[e];this._axis=t[0],this._dimension=t[1]},Pd.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)},Pd.prototype._findRange=function(e){var t=e[this._axis];return{min:t+5,max:t+e[this._dimension]-5}};var Dd={__init__:["distributeElements"],distributeElements:["type",Pd]};function $d(e){e.registerFilter((function(e){return d(e,(function(e){var t=gn(e,["dmn:AuthorityRequirement","dmn:InformationRequirement","dmn:KnowledgeRequirement","dmn:Association","dmn:TextAnnotation"]);return!(e.labelTarget||t)}))}))}$d.$inject=["distributeElements"];var jd={__depends__:[Dd],__init__:["drdDistributeElements"],drdDistributeElements:["type",$d]},Id="is not a registered action";function Bd(e,t){this._actions={};var n=this;e.on("diagram.init",(function(){n._registerDefaultActions(t),e.fire("editorActions.init",{editorActions:n})}))}function Ld(e,t){return new Error(e+" "+t)}Bd.$inject=["eventBus","injector"],Bd.prototype._registerDefaultActions=function(e){var t=e.get("commandStack",!1),n=e.get("modeling",!1),i=e.get("selection",!1),o=e.get("zoomScroll",!1),s=e.get("copyPaste",!1),a=e.get("canvas",!1),l=e.get("rules",!1),c=e.get("keyboardMove",!1),u=e.get("keyboardMoveSelection",!1);t&&(this.register("undo",(function(){t.undo()})),this.register("redo",(function(){t.redo()}))),s&&i&&this.register("copy",(function(){var e=i.get();if(e.length)return s.copy(e)})),s&&this.register("paste",(function(){s.paste()})),o&&this.register("stepZoom",(function(e){o.stepZoom(e.value)})),a&&this.register("zoom",(function(e){a.zoom(e.value)})),n&&i&&l&&this.register("removeSelection",(function(){var e=i.get();if(e.length){var t,o=l.allowed("elements.delete",{elements:e});!1!==o&&(t=r(o)?o:e).length&&n.removeElements(t.slice())}})),c&&this.register("moveCanvas",(function(e){c.moveCanvas(e)})),u&&this.register("moveSelection",(function(e){u.moveSelection(e.direction,e.accelerated)}))},Bd.prototype.trigger=function(e,t){if(!this._actions[e])throw Ld(e,Id);return this._actions[e](t)},Bd.prototype.register=function(e,t){var n=this;if("string"==typeof e)return this._registerAction(e,t);p(e,(function(e,t){n._registerAction(t,e)}))},Bd.prototype._registerAction=function(e,t){if(this.isRegistered(e))throw Ld(e,"is already registered");this._actions[e]=t},Bd.prototype.unregister=function(e){if(!this.isRegistered(e))throw Ld(e,Id);this._actions[e]=void 0},Bd.prototype.getActions=function(){return Object.keys(this._actions)},Bd.prototype.isRegistered=function(e){return!!this._actions[e]};var Nd={__init__:["editorActions"],editorActions:["type",Bd]};function qd(e){e.invoke(Bd,this)}yn(qd,Bd),qd.$inject=["injector"],qd.prototype._registerDefaultActions=function(e){Bd.prototype._registerDefaultActions.call(this,e);const t=e.get("canvas",!1),n=e.get("elementRegistry",!1),i=e.get("selection",!1),o=e.get("lassoTool",!1),r=e.get("handTool",!1),s=e.get("directEditing",!1),a=e.get("distributeElements",!1),l=e.get("alignElements",!1),c=e.get("searchPad",!1);t&&n&&i&&this._registerAction("selectElements",(function(){var e=t.getRootElement(),o=n.filter((function(t){return t!==e}));return i.select(o),o})),i&&a&&this._registerAction("distributeElements",(function(e){var t=i.get(),n=e.type;t.length>2&&a.trigger(t,n)})),i&&l&&this._registerAction("alignElements",(function(e){var t=i.get(),n=e.type;t.length>1&&l.trigger(t,n)})),o&&this._registerAction("lassoTool",(function(){o.toggle()})),r&&this._registerAction("handTool",(function(){r.toggle()})),i&&s&&this._registerAction("directEditing",(function(){var e=i.get();e.length&&s.activate(e[0])})),i&&c&&this._registerAction("find",(function(){c.toggle()}))};var Vd={__depends__:[Nd],editorActions:["type",qd]};function Fd(e){return e.dmnDI&&e.dmnDI.diagrams&&e.dmnDI.diagrams[0]}function zd(e,t,n,i){n.on("import.start",(({definitions:n})=>{Fd(n)||function(n){var o=n.dmnDI;o||(o=e.create("dmndi:DMNDI"),n.set("dmnDI",o));var r=e.create("dmndi:DMNDiagram");o.set("diagrams",[r]);var s=0;p(n.get("drgElement"),(function(n){if(hn(n,"dmn:Decision")){var o=t._getDefaultSize(n),a=e.createDiShape(n,{x:150+30*s,y:150+30*s,width:o.width,height:o.height});i.updateDiParent(a,r),s++}}))}(n)}))}zd.$inject=["drdFactory","elementFactory","eventBus","drdUpdater"];var Qd={__init__:["diGenerator"],diGenerator:["type",zd]};function Hd(e,t,n){return n||(n="round"),Math[n](e/t)*t}function Wd(e,t,n){var i=!n||!1!==n.active;this._eventBus=t;var o=this;t.on("diagram.init",800,(function(){o.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(!(!o.active||n&&pl(n))){var i=t.context,r=i.gridSnappingContext;r||(r=i.gridSnappingContext={}),["x","y"].forEach((function(n){var i={},r=function(e,t,n){var i=e.context,o=e.shape,r=i.gridSnappingContext,s=r.snapLocation,l=r.snapOffset;if(l&&a(l[t]))return l[t];l||(l=r.snapOffset={});a(l[t])||(l[t]=0);if(!o)return l[t];n.get(o.id)||(Ud(t)?l[t]+=o[t]+o.width/2:l[t]+=o[t]+o.height/2);if(!s)return l[t];"x"===t?/left/.test(s)?l[t]-=o.width/2:/right/.test(s)&&(l[t]+=o.width/2):/top/.test(s)?l[t]-=o.height/2:/bottom/.test(s)&&(l[t]+=o.height/2);return l[t]}(t,n,e);r&&(i.offset=r);var s=function(e,t){var n=e.context,i=n.createConstraints,o=n.resizeConstraints||{},r=n.gridSnappingContext,s=r.snapConstraints;if(s&&s[t])return s[t];s||(s=r.snapConstraints={});s[t]||(s[t]={});var a=n.direction;i&&(Ud(t)?(s.x.min=i.left,s.x.max=i.right):(s.y.min=i.top,s.y.max=i.bottom));var l=o.min,c=o.max;l&&(Ud(t)?Kd(a)?s.x.max=l.left:s.x.min=l.right:Xd(a)?s.y.max=l.top:s.y.min=l.bottom);c&&(Ud(t)?Kd(a)?s.x.min=c.left:s.x.max=c.right:Xd(a)?s.y.min=c.top:s.y.max=c.bottom);return s[t]}(t,n);s&&M(i,s),eu(t,n)||o.snapEvent(t,n,i)}))}}))}function Ud(e){return"x"===e}function Xd(e){return-1!==e.indexOf("n")}function Kd(e){return-1!==e.indexOf("w")}Wd.prototype.snapEvent=function(e,t,n){tu(e,t,this.snapValue(e[t],n))},Wd.prototype.getGridSpacing=function(){return 10},Wd.prototype.snapValue=function(e,t){var n,i,o=0;return t&&t.offset&&(o=t.offset),e=Hd(e+=o,10),t&&t.min&&a(n=t.min)&&(n=Hd(n+o,10,"ceil"),e=Math.max(e,n)),t&&t.max&&a(i=t.max)&&(i=Hd(i+o,10,"floor"),e=Math.min(e,i)),e-=o},Wd.prototype.isActive=function(){return this.active},Wd.prototype.setActive=function(e){this.active=e,this._eventBus.fire("gridSnapping.toggle",{active:e})},Wd.prototype.toggleActive=function(){this.setActive(!this.active)},Wd.$inject=["elementRegistry","eventBus","config.gridSnapping"];function Gd(e){this._eventBus=e}function Yd(e){return function(t,n,i,o,r){(l(t)||a(t))&&(r=o,o=i,i=n,n=t,t=null),this.on(t,e,n,i,o,r)}}function Zd(e,t){Gd.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 o=t.shape,r=t.newBounds;c(i)?t.newBounds=n.snapComplex(r,i):t.newBounds=n.snapSimple(o,r)}}))}Gd.$inject=["eventBus"],Gd.prototype.on=function(e,t,n,i,o,c){if((l(t)||a(t))&&(c=o,o=i,i=n,n=t,t=null),l(n)&&(c=o,o=i,i=n,n=1e3),s(o)&&(c=o,o=!1),!l(i))throw new Error("handlerFn must be a function");r(e)||(e=[e]);var u=this._eventBus;p(e,(function(e){var r=["commandStack",e,t].filter((function(e){return e})).join(".");u.on(r,n,o?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(i,c):i,c)}))},Gd.prototype.canExecute=Yd("canExecute"),Gd.prototype.preExecute=Yd("preExecute"),Gd.prototype.preExecuted=Yd("preExecuted"),Gd.prototype.execute=Yd("execute"),Gd.prototype.executed=Yd("executed"),Gd.prototype.postExecute=Yd("postExecute"),Gd.prototype.postExecuted=Yd("postExecuted"),Gd.prototype.revert=Yd("revert"),Gd.prototype.reverted=Yd("reverted"),Zd.$inject=["eventBus","gridSnapping","modeling"],yn(Zd,Gd),Zd.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},Zd.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},Zd.prototype.snapHorizontally=function(e,t){var n=this._gridSnapping,i=/w/.test(t),o=/e/.test(t),r={};return r.width=n.snapValue(e.width,{min:e.width}),o&&(i?(r.x=n.snapValue(e.x,{max:e.x}),r.width+=n.snapValue(e.x-r.x,{min:e.x-r.x})):e.x=e.x+e.width-r.width),M(e,r),e},Zd.prototype.snapVertically=function(e,t){var n=this._gridSnapping,i=/n/.test(t),o=/s/.test(t),r={};return r.height=n.snapValue(e.height,{min:e.height}),i&&(o?(r.y=n.snapValue(e.y,{max:e.y}),r.height+=n.snapValue(e.y-r.y,{min:e.y-r.y})):e.y=e.y+e.height-r.height),M(e,r),e};function Jd(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))}))}Jd.$inject=["eventBus","gridSnapping"];var ep={__depends__:[{__init__:["gridSnappingResizeBehavior","gridSnappingSpaceToolBehavior"],gridSnappingResizeBehavior:["type",Zd],gridSnappingSpaceToolBehavior:["type",Jd]}],__init__:["gridSnapping"],gridSnapping:["type",Wd]},tp="keyboard.keydown",np="Keyboard binding is now implicit; explicit binding to an element got removed. For more information, see https://github.com/bpmn-io/diagram-js/issues/661";function ip(e,t){var n=this;this._config 21 var t,n;this._container=this._createContainer(),t=this._container,n=xn('<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" style="position global() class in cy.e [all...] |
/plugin/bpmnio/vendor/bpmn-js/dist/ |
H A D | bpmn-navigated-viewer.production.min.js | 2 !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).BpmnJS=t()}(this,(function(){"use strict";function e(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}const t=Object.prototype.toString,n=Object.prototype.hasOwnProperty;function i(e){return void 0===e}function r(e){return void 0!==e}function o(e){return"[object Array]"===t.call(e)}function a(e){return"[object Object]"===t.call(e)}function s(e){return"[object Number]"===t.call(e)}function l(e){const n=t.call(e);return"[object Function]"===n||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n}function p(e){return"[object String]"===t.call(e)}function c(e,t){return n.call(e,t)}function u(e,t){const n=v(t);let i;return f(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function h(e,t){const n=v(t);let i=[];return f(e,(function(e,t){n(e,t)&&i.push(e)})),i}function f(e,t){let n,r;if(i(e))return;const a=o(e)?b:x;for(let i in e)if(c(e,i)&&(n=e[i],r=t(n,a(i)),!1===r))return n}function m(e,t,n){return f(e,(function(e,i){n=t(n,e,i)})),n}function d(e,t){return!!m(e,(function(e,n,i){return e&&t(n,i)}),!0)}function y(e,t){return!!u(e,t)}function g(e){return function(t){return d(e,(function(e,n){return t[n]===e}))}}function v(e){return l(e)?e:t=>t===e}function x(e){return e}function b(e){return Number(e)}function w(e,t){return e.bind(t)}function E(e,...t){return Object.assign(e,...t)}function _(e,t){var n=this;t=t||1e3,e.on(["render.shape","render.connection"],t,(function(e,t){var i=e.type,r=t.element,o=t.gfx,a=t.attrs;if(n.canRender(r))return"render.shape"===i?n.drawShape(o,r,a):n.drawConnection(o,r,a)})),e.on(["render.getShapePath","render.getConnectionPath"],t,(function(e,t){if(n.canRender(t))return"render.getShapePath"===e.type?n.getShapePath(t):n.getConnectionPath(t)}))}function A(e,t){var n=k(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function k(e){return e&&e.businessObject||e}function R(e){return e&&e.di}function S(e,t){return!A(e,"bpmn:CallActivity")&&(A(e,"bpmn:SubProcess")?!(!(t=t||R(e))||!A(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded:!A(e,"bpmn:Participant")||!!k(e).processRef)}function C(e){if(A(e,"bpmn:Participant")||A(e,"bpmn:Lane")){var t=R(e).isHorizontal;return void 0===t||t}}_.prototype.canRender=function(e){},_.prototype.drawShape=function(e,t){},_.prototype.drawConnection=function(e,t){},_.prototype.getShapePath=function(e){},_.prototype.getConnectionPath=function(e){};var M={width:90,height:20};function P(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)],r=function(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)];return{x:n.x+(i.x-n.x)/2,y:n.y+(i.y-n.y)/2}}(e),o=Math.atan((i.y-n.y)/(i.x-n.x)),a=r.x,s=r.y;return Math.abs(o)<Math.PI/2?s-=15:a+=15,{x:a,y:s}}function N(e,t){var n,i,r,o=e.label;return o&&o.bounds?(r=o.bounds,i={width:Math.max(M.width,r.width),height:r.height},n={x:r.x+r.width/2,y:r.y+r.height/2}):(n=function(e){return e.waypoints?P(e.waypoints):A(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+M.height/2}:{x:e.x+e.width/2,y:e.y+e.height+M.height/2}}(t),i=M),E({x:n.x-i.width/2,y:n.y-i.height/2},i)}function T(e){var t=e.businessObject,n=function(e){return A(e,"bpmn:FlowElement")||A(e,"bpmn:Participant")||A(e,"bpmn:Lane")||A(e,"bpmn:SequenceFlow")||A(e,"bpmn:MessageFlow")||A(e,"bpmn:DataInput")||A(e,"bpmn:DataOutput")?"name":A(e,"bpmn:TextAnnotation")?"text":A(e,"bpmn:Group")?"categoryValueRef":void 0}(t);if(n)return"categoryValueRef"===n?function(e){var t=e.categoryValueRef;return t&&t.value||""}(t):t[n]||""}function D(e,t){return function(e,t){t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}(e,t))}(t,e),e}var B={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":2,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":2,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function O(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=B[i];r?(2===r&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function L(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return B[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);O(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)O(e,i,t[i])}(e,t);return e}const I=Object.prototype.toString;function F(e){return new j(e)}function j(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}j.prototype.add=function(e){return this.list.add(e),this},j.prototype.remove=function(e){return"[object RegExp]"==I.call(e)?this.removeMatching(e):(this.list.remove(e),this)},j.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},j.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},j.prototype.array=function(){return Array.from(this.list)},j.prototype.has=j.prototype.contains=function(e){return this.list.contains(e)};var V="http://www.w3.org/2000/svg",W='<svg xmlns="'+V+'"';function z(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(V)&&(e=W+e.substring(4)):(e=W+">"+e+"</svg>",t=!0);var n=function(e){var t;return(t=new DOMParser).async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function $(e,t){var n;return"<"===(e=e.trim()).charAt(0)?(n=z(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(V,e),t&&L(n,t),n}var G=null;function H(){return null===G&&(G=$("svg")),G}function K(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}function U(e){return H().createSVGTransform()}var q=/([&<>]{1})/g,Y=/([\n\r"]{1})/g,X={"&":"&","<":"<",">":">",'"':"'"};function Z(e,t){return e.replace(t,(function(e,t){return X[t]||t}))}function J(e,t){var n,i,r,o,a;switch(e.nodeType){case 3:t.push(Z(e.textContent,q));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n<i;++n)o=r.item(n),t.push(" ",o.name,'="',Z(o.value,Y),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,i=(a=e.childNodes).length;n<i;++n)J(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",Z(e.nodeValue,q),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function Q(e,t){return function(e){for(var t=e.firstChild,n=[];t;)J(t,n),t=t.nextSibling;return n.join("")}(e)}function ee(e){var t=e.parentNode;return t&&t.removeChild(e),e}function te(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function ne(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(te(e,i))}(n,t)),n.consolidate()}function ie(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function re(e){return["L",e.x,e.y]}function oe(e,t){const n=e.length,i=[(r=e[0],["M",r.x,r.y])];var r,o,a,s;for(let r=1;r<n;r++){const n=e[r-1],l=e[r],p=e[r+1];if(!p||!t){i.push(re(l));continue}const c=Math.min(t,se(l.x-n.x,l.y-n.y),se(p.x-l.x,p.y-l.y));if(!c){i.push(re(l));continue}const u=ae(l,n,c),h=ae(l,n,.5*c),f=ae(l,p,c),m=ae(l,p,.5*c);i.push(re(u)),i.push((a=m,s=f,["C",(o=h).x,o.y,a.x,a.y,s.x,s.y]))}return i}function ae(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=n/se(i,r);return{x:e.x+i*o,y:e.y+r*o}}function se(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function le(e,t,n){s(t)&&(n=t,t=null),t||(t={});const i=$("path",t);return s(n)&&(i.dataset.cornerRadius=String(n)),pe(i,e)}function pe(e,t){return L(e,{d:ie(oe(t,parseInt(e.dataset.cornerRadius,10)||0))}),e}var ce="hsl(225, 10%, 15%)";function ue(e,t){return y(e.eventDefinitions,(function(e){return e.$type===t}))}function he(e,t,n){var i=R(e);return n||i.get("color:background-color")||i.get("bioc:fill")||t||"white"}function fe(e,t,n){var i=R(e);return n||i.get("color:border-color")||i.get("bioc:stroke")||t||ce}function me(e,t,n,i){var r=R(e).get("label");return i||r&&r.get("color:color")||t||fe(e,n)}function de(e,t={}){return{width:ye(e,t),height:ge(e,t)}}function ye(e,t={}){return c(t,"width")?t.width:e.width}function ge(e,t={}){return c(t,"height")?t.height:e.height}function ve(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const xe=Object.prototype.toString,be=Object.prototype.hasOwnProperty;function we(e,t){return be.call(e,t)}function Ee(e,t){let n,i;if(void 0===e)return;const r=function(e){return"[object Array]"===xe.call(e)}(e)?Ae:_e;for(let o in e)if(we(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function _e(e){return e}function Ae(e){return Number(e)}function ke(e,...t){const n=e.style;return Ee(t,(function(e){e&&Ee(e,(function(e,t){n[t]=e}))})),e}function Re(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}const Se=Object.prototype.toString;function Ce(e){return new Me(e)}function Me(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Pe(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Ne(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}Me.prototype.add=function(e){return this.list.add(e),this},Me.prototype.remove=function(e){return"[object RegExp]"==Se.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Me.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Me.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Me.prototype.array=function(){return Array.from(this.list)},Me.prototype.has=Me.prototype.contains=function(e){return this.list.contains(e)};var Te,De,Be,Oe={};function Le(){Te=window.addEventListener?"addEventListener":"attachEvent",De=window.removeEventListener?"removeEventListener":"detachEvent",Be="addEventListener"!==Te?"on":""}var Ie=ve({__proto__:null,bind:Oe.bind=function(e,t,n,i){return Te||Le(),e[Te](Be+t,n,i||!1),n},unbind:Oe.unbind=function(e,t,n,i){return De||Le(),e[De](Be+t,n,i||!1),n},default:Oe},[Oe]),Fe=["focus","blur"];var je,Ve={bind:function(e,t,n,i,r){return-1!==Fe.indexOf(n)&&(r=!0),Ie.bind(e,n,(function(n){var r=n.target||n.srcElement;n.delegateTarget=Ne(r,t,!0),n.delegateTarget&&i.call(e,n)}),r)},unbind:function(e,t,n,i){return-1!==Fe.indexOf(t)&&(i=!0),Ie.unbind(e,t,n,i)}},We=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var i=n[1];if("body"==i){return(r=t.createElement("html")).innerHTML=e,r.removeChild(r.lastChild)}var r,o=Object.prototype.hasOwnProperty.call($e,i)?$e[i]:$e._default,a=o[0],s=o[1],l=o[2];(r=t.createElement("div")).innerHTML=s+e+l;for(;a--;)r=r.lastChild;if(r.firstChild==r.lastChild)return r.removeChild(r.firstChild);var p=t.createDocumentFragment();for(;r.firstChild;)p.appendChild(r.removeChild(r.firstChild));return p},ze=!1;"undefined"!=typeof document&&((je=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',ze=!je.getElementsByTagName("link").length,je=void 0);var $e={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:ze?[1,"X<div>","</div>"]:[0,"",""]};$e.td=$e.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],$e.option=$e.optgroup=[1,'<select multiple="multiple">',"</select>"],$e.thead=$e.tbody=$e.colgroup=$e.caption=$e.tfoot=[1,"<table>","</table>"],$e.polyline=$e.ellipse=$e.polygon=$e.circle=$e.text=$e.line=$e.path=$e.rect=$e.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var Ge=We;function He(e,t){return(t=t||document).querySelector(e)}function Ke(e){e.parentNode&&e.parentNode.removeChild(e)}function Ue(e,t,n,i,r){var o=U();o.setTranslate(t,n);var a=U();a.setRotate(i||0,0,0);var s=U();s.setScale(1,1),ne(e,[o,a,s])}function qe(e,t,n){var i=U();i.setTranslate(t,n),ne(e,i)}var Ye=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var t=e.exports=function(e,n){if(n||(n=16),void 0===e&&(e=128),e<=0)return"0";for(var i=Math.log(Math.pow(2,e))/Math.log(n),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,e/r))/Math.log(n)*r;var o=i-Math.floor(i),a="";for(r=0;r<Math.floor(i);r++){a=Math.floor(Math.random()*n).toString(n)+a}if(o){var s=Math.pow(n,o);a=Math.floor(Math.random()*s).toString(n)+a}var l=parseInt(a,n);return l!==1/0&&l>=Math.pow(2,e)?t(e,n):a};t.rack=function(e,n,i){var r=function(r){var a=0;do{if(a++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var s=t(e,n)}while(Object.hasOwnProperty.call(o,s));return o[s]=r,s},o=r.hats={};return r.get=function(e){return r.hats[e]},r.set=function(e,t){return r.hats[e]=t,r},r.bits=e||128,r.base=n||16,r}}));function Xe(e){if(!(this instanceof Xe))return new Xe(e);e=e||[128,36,1],this._seed=e.length?Ye.rack(e[0],e[1],e[2]):e}Xe.prototype.next=function(e){return this._seed(e||!0)},Xe.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},Xe.prototype.claim=function(e,t){this._seed.set(e,t||!0)},Xe.prototype.assigned=function(e){return this._seed.get(e)||!1},Xe.prototype.unclaim=function(e){delete this._seed.hats[e]},Xe.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};var Ze=new Xe,Je=.95;function Qe(e,t,n,i,r,o,s){_.call(this,t,s);var l=e&&e.defaultFillColor,p=e&&e.defaultStrokeColor,c=e&&e.defaultLabelColor;function u(e){return n.computeStyle(e,{strokeLinecap:"round",strokeLinejoin:"round",stroke:ce,strokeWidth:2,fill:"white"})}function h(e){return n.computeStyle(e,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:ce,strokeWidth:2})}function m(e,t){var{ref:n={x:0,y:0},scale:i=1,element:o,parentGfx:a=r._svg}=t,s=$("marker",{id:e,viewBox:"0 0 20 20",refX:n.x,refY:n.y,markerWidth:20*i,markerHeight:20*i,orient:"auto"});D(s,o);var l=He(":scope > defs",a);l||D(a,l=$("defs")),D(l,s)}function d(e,t,n,i){var r=Ze.nextPrefixed("marker-");return function(e,t,n,i,r){if("sequenceflow-end"===n){m(t,{element:$("path",{d:"M 1 5 L 11 10 L 1 15 Z",...u({fill:r,stroke:r,strokeWidth:1})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("messageflow-start"===n){m(t,{element:$("circle",{cx:6,cy:6,r:3.5,...u({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:6,y:6},parentGfx:e})}if("messageflow-end"===n){m(t,{element:$("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...u({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:8.5,y:5},parentGfx:e})}if("association-start"===n){m(t,{element:$("path",{d:"M 11 5 L 1 10 L 11 15",...h({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:1,y:10},scale:.5,parentGfx:e})}if("association-end"===n){m(t,{element:$("path",{d:"M 1 5 L 11 10 L 1 15",...h({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("conditional-flow-marker"===n){m(t,{element:$("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...u({fill:i,stroke:r})}),ref:{x:-1,y:10},scale:.5,parentGfx:e})}if("conditional-default-flow-marker"===n){m(t,{element:$("path",{d:"M 6 4 L 10 16",...u({stroke:r,fill:"none"})}),ref:{x:0,y:10},scale:.5,parentGfx:e})}}(e,r,t,n,i),"url(#"+r+")"}function y(e,t,n,i,r={}){a(i)&&(r=i,i=0),i=i||0,r=u(r);var o=$("circle",{cx:t/2,cy:n/2,r:Math.round((t+n)/4-i),...r});return D(e,o),o}function g(e,t,n,i,r,o){a(r)&&(o=r,r=0),r=r||0,o=u(o);var s=$("rect",{x:r,y:r,width:t-2*r,height:n-2*r,rx:i,ry:i,...o});return D(e,s),s}function v(e,t,n,i){var r=le(t,n=h(n),i);return D(e,r),r}function x(e,t,n){return v(e,t,n,5)}function b(e,t,n){n=h(n);var i=$("path",{...n,d:t});return D(e,i),i}function w(e,t,n,i){return b(t,n,E({"data-marker":e},i))}function M(e){return be[e]}function P(e){return function(t,n,i){return M(e)(t,n,i)}}var N=function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:r?he(t,l,n.fill):fe(t,p,n.stroke),strokeWidth:1})},B=function(e,t,n={}){var r=y(e,t.width,t.height,.2*t.height,{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:2});b(e,i.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),{stroke:fe(t,p,n.stroke),strokeWidth:2});for(var o=0;o<12;o++){var a=i.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),s=t.width/2,c=t.height/2;b(e,a,{strokeWidth:1,stroke:fe(t,p,n.stroke),transform:"rotate("+30*o+","+c+","+s+")"})}return r},O=function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},I=function(e,t,n={}){return b(e,i.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},j=function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},V=function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},W=function(e,t,n={},r){var o=b(e,i.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{fill:r?fe(t,p,n.stroke):"none",stroke:fe(t,p,n.stroke),strokeWidth:1});return function(e,t){var n=U();n.setRotate(t,0,0),ne(e,n)}(o,45),o},z=function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.22,my:.5}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},G=function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},H=function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),strokeWidth:1})},K=function(e,t,n={}){return b(e,i.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},q=function(e,t,n={}){return y(e,t.width,t.height,8,{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:4})};function Y(e,t,n={}){var i=k(e),r=function(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}(i);return i.get("eventDefinitions")&&i.get("eventDefinitions").length>1?i.get("parallelMultiple")?K(t,e,n,r):H(t,e,n,r):ue(i,"bpmn:MessageEventDefinition")?N(t,e,n,r):ue(i,"bpmn:TimerEventDefinition")?B(t,e,n,r):ue(i,"bpmn:ConditionalEventDefinition")?I(t,e,n,r):ue(i,"bpmn:SignalEventDefinition")?G(t,e,n,r):ue(i,"bpmn:EscalationEventDefinition")?O(t,e,n,r):ue(i,"bpmn:LinkEventDefinition")?j(t,e,n,r):ue(i,"bpmn:ErrorEventDefinition")?V(t,e,n,r):ue(i,"bpmn:CancelEventDefinition")?W(t,e,n,r):ue(i,"bpmn:CompensateEventDefinition")?z(t,e,n,r):ue(i,"bpmn:TerminateEventDefinition")?q(t,e,n,r):null}var X={ParticipantMultiplicityMarker:function(e,t,n={}){var r=ye(t,n),o=ge(t,n);w("participant-multiplicity",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2-6)/r,my:(o-15)/o}}),{strokeWidth:2,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},SubProcessMarker:function(e,t,n={}){qe(g(e,14,14,0,{strokeWidth:1,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)}),t.width/2-7.5,t.height-20),w("sub-process",e,i.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2-7.5)/t.width,my:(t.height-20)/t.height}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},ParallelMarker:function(e,t,n){var r=ye(t,n),o=ge(t,n);w("parallel",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.parallel)/r,my:(o-20)/o}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},SequentialMarker:function(e,t,n){w("sequential",e,i.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.seq)/t.width,my:(t.height-19)/t.height}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},CompensationMarker:function(e,t,n){w("compensation",e,i.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.compensation)/t.width,my:(t.height-13)/t.height}}),{strokeWidth:1,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},LoopMarker:function(e,t,n){var r=ye(t,n),o=ge(t,n);w("loop",e,i.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.loop)/r,my:(o-7)/o}}),{strokeWidth:1.5,fill:"none",stroke:fe(t,p,n.stroke),strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){var r=ye(t,n),o=ge(t,n);w("adhoc",e,i.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.adhoc)/r,my:(o-15)/o}}),{strokeWidth:1,fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke)})}};function Z(e,t,n,i){X[e](t,n,i)}function J(e,t,n,i={}){i={fill:i.fill,stroke:i.stroke,width:ye(t,i),height:ge(t,i)};var r=k(t),o=n&&n.includes("SubProcessMarker");i=o?{...i,seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{...i,seq:-5,parallel:-6,compensation:-27,loop:0,adhoc:10},f(n,(function(n){Z(n,e,t,i)})),r.get("isForCompensation")&&Z("CompensationMarker",e,t,i),A(r,"bpmn:AdHocSubProcess")&&Z("AdhocMarker",e,t,i);var a=r.get("loopCharacteristics"),s=a&&a.get("isSequential");a&&(void 0===s&&Z("LoopMarker",e,t,i),!1===s&&Z("ParallelMarker",e,t,i),!0===s&&Z("SequentialMarker",e,t,i))}function Q(e,t,n={}){n=E({size:{width:100}},n);var i=o.createText(t||"",n);return F(i).add("djs-label"),D(e,i),i}function ee(e,t,n,i={}){var r=k(t),o=de({x:t.x,y:t.y,width:t.width,height:t.height},i);return Q(e,r.name,{align:n,box:o,padding:7,style:{fill:me(t,c,p,i.stroke)}})}function te(e,t,n,i={}){var r=C(n),o=Q(e,t,{box:{height:30,width:r?ge(n,i):ye(n,i)},align:"center-middle",style:{fill:me(n,c,p,i.stroke)}});r&&Ue(o,0,-(-1*ge(n,i)),270)}function ie(e,t,n={}){var{width:i,height:r}=de(t,n);return g(e,i,r,10,{...n,fill:he(t,l,n.fill),fillOpacity:Je,stroke:fe(t,p,n.stroke)})}function re(e,t,n={}){var i=k(t),r=he(t,l,n.fill),o=fe(t,p,n.stroke);return"One"!==i.get("associationDirection")&&"Both"!==i.get("associationDirection")||(n.markerEnd=d(e,"association-end",r,o)),"Both"===i.get("associationDirection")&&(n.markerStart=d(e,"association-start",r,o)),n=et(n,["markerStart","markerEnd"]),x(e,t.waypoints,{...n,stroke:o,strokeDasharray:"0, 5"})}function oe(e,t,n={}){var r=he(t,l,n.fill),o=fe(t,p,n.stroke),a=b(e,i.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:r,fillOpacity:Je,stroke:o});(function(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection})(k(t))&&b(e,i.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.33,my:(t.height-18)/t.height}}),{strokeWidth:2,fill:r,stroke:o});return a}function ae(e,t,n={}){return y(e,t.width,t.height,{fillOpacity:Je,...n,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})}function se(e,t,n={}){return function(e,t,n,i){var r=t/2,o=n/2,a=[{x:r,y:0},{x:t,y:o},{x:r,y:n},{x:0,y:o}].map((function(e){return e.x+","+e.y})).join(" ");i=u(i);var s=$("polygon",{...i,points:a});return D(e,s),s}(e,t.width,t.height,{fill:he(t,l,n.fill),fillOpacity:Je,stroke:fe(t,p,n.stroke)})}function pe(e,t,n={}){var i=g(e,ye(t,n),ge(t,n),0,{fill:he(t,l,n.fill),fillOpacity:n.fillOpacity||Je,stroke:fe(t,p,n.stroke),strokeWidth:1.5}),r=k(t);A(r,"bpmn:Lane")&&te(e,r.get("name"),t,n);return i}function ve(e,t,n={}){var i=ie(e,t,n);(function(e){return e&&!!k(e).triggeredByEvent})(t)&&L(i,{strokeDasharray:"0, 5.5",strokeWidth:2.5});var r=S(t);return ee(e,t,r?"center-top":"center-middle",n),J(e,t,r?void 0:["SubProcessMarker"],n),i}function xe(e,t,n={}){var i=ie(e,t,n);return ee(e,t,"center-middle",n),J(e,t,void 0,n),i}var be=this.handlers={"bpmn:AdHocSubProcess":function(e,t,n={}){return ve(e,t,n=S(t)?et(n,["fill","stroke","width","height"]):et(n,["fill","stroke"]))},"bpmn:Association":function(e,t,n={}){return re(e,t,n=et(n,["fill","stroke"]))},"bpmn:BoundaryEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=et(n,["fill","stroke"]);var r=k(t).get("cancelActivity");n={strokeWidth:1.5,fill:he(t,l,n.fill),fillOpacity:1,stroke:fe(t,p,n.stroke)},r||(n.strokeDasharray="6");var o=ae(e,t,n);return y(e,t.width,t.height,3,{...n,fill:"none"}),i&&Y(t,e,n),o},"bpmn:BusinessRuleTask":function(e,t,n={}){var r=xe(e,t,n=et(n,["fill","stroke"]));return L(b(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}})),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),L(b(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}})),{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:CallActivity":function(e,t,n={}){return n=et(n,["fill","stroke"]),ve(e,t,{strokeWidth:5,...n})},"bpmn:ComplexGateway":function(e,t,n={}){var r=se(e,t,n=et(n,["fill","stroke"]));return b(e,i.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:DataInput":function(e,t,n={}){n=et(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=oe(e,t,n);return b(e,r,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:1}),o},"bpmn:DataInputAssociation":function(e,t,n={}){return n=et(n,["fill","stroke"]),re(e,t,{...n,markerEnd:d(e,"association-end",he(t,l,n.fill),fe(t,p,n.stroke))})},"bpmn:DataObject":function(e,t,n={}){return oe(e,t,n=et(n,["fill","stroke"]))},"bpmn:DataObjectReference":P("bpmn:DataObject"),"bpmn:DataOutput":function(e,t,n={}){n=et(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=oe(e,t,n);return b(e,r,{strokeWidth:1,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)}),o},"bpmn:DataOutputAssociation":function(e,t,n={}){return n=et(n,["fill","stroke"]),re(e,t,{...n,markerEnd:d(e,"association-end",he(t,l,n.fill),fe(t,p,n.stroke))})},"bpmn:DataStoreReference":function(e,t,n={}){return n=et(n,["fill","stroke"]),b(e,i.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{fill:he(t,l,n.fill),fillOpacity:Je,stroke:fe(t,p,n.stroke),strokeWidth:2})},"bpmn:EndEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=et(n,["fill","stroke"]);var r=ae(e,t,{...n,strokeWidth:4});return i&&Y(t,e,n),r},"bpmn:EventBasedGateway":function(e,t,n={}){n=et(n,["fill","stroke"]);var r=k(t),o=se(e,t,n);y(e,t.width,t.height,.2*t.height,{fill:he(t,"none",n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1});var a=r.get("eventGatewayType"),s=!!r.get("instantiate");if("Parallel"===a){var l=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}});b(e,l,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:1})}else"Exclusive"===a&&(s||y(e,t.width,t.height,.26*t.height,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:1}),function(){var r=i.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}});b(e,r,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:2})}());return o},"bpmn:ExclusiveGateway":function(e,t,n={}){var r=se(e,t,n=et(n,["fill","stroke"])),o=i.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return R(t).get("isMarkerVisible")&&b(e,o,{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:Gateway":function(e,t,n={}){return se(e,t,n=et(n,["fill","stroke"]))},"bpmn:Group":function(e,t,n={}){return n=et(n,["fill","stroke","width","height"]),g(e,t.width,t.height,10,{stroke:fe(t,p,n.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:ye(t,n),height:ge(t,n)})},"bpmn:InclusiveGateway":function(e,t,n={}){var i=se(e,t,n=et(n,["fill","stroke"]));return y(e,t.width,t.height,.24*t.height,{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:2.5}),i},"bpmn:IntermediateEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=et(n,["fill","stroke"]);var r=ae(e,t,{...n,strokeWidth:1.5});return y(e,t.width,t.height,3,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:1.5}),i&&Y(t,e,n),r},"bpmn:IntermediateCatchEvent":P("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":P("bpmn:IntermediateEvent"),"bpmn:Lane":function(e,t,n={}){return n=et(n,["fill","stroke","width","height"]),pe(e,t,{...n,fillOpacity:.25})},"bpmn:ManualTask":function(e,t,n={}){var r=xe(e,t,n=et(n,["fill","stroke"]));return b(e,i.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:.5}),r},"bpmn:MessageFlow":function(e,t,n={}){n=et(n,["fill","stroke"]);var r=k(t),o=R(t),a=he(t,l,n.fill),s=fe(t,p,n.stroke),c=x(e,t.waypoints,{markerEnd:d(e,"messageflow-end",a,s),markerStart:d(e,"messageflow-start",a,s),stroke:s,strokeDasharray:"10, 11",strokeWidth:1.5});if(r.get("messageRef")){var u=c.getPointAtLength(c.getTotalLength()/2),h=i.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:u.x,y:u.y}}),f={strokeWidth:1};"initiating"===o.get("messageVisibleKind")?(f.fill=a,f.stroke=s):(f.fill=s,f.stroke=a);var m=b(e,h,f),y=Q(e,r.get("messageRef").get("name"),{align:"center-top",fitBox:!0,style:{fill:s}}),g=m.getBBox(),v=y.getBBox();Ue(y,u.x-v.width/2,u.y+g.height/2+10,0)}return c},"bpmn:ParallelGateway":function(e,t,n={}){var r=se(e,t,n=et(n,["fill","stroke"]));return b(e,i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:Participant":function(e,t,n={}){var i=pe(e,t,n=et(n,["fill","stroke","width","height"])),r=S(t),o=C(t),a=k(t),s=a.get("name");if(r){v(e,o?[{x:30,y:0},{x:30,y:ge(t,n)}]:[{x:0,y:30},{x:ye(t,n),y:30}],{stroke:fe(t,p,n.stroke),strokeWidth:1.5}),te(e,s,t,n)}else{var l=de(t,n);o||(l.height=ye(t,n),l.width=ge(t,n));var u=Q(e,s,{box:l,align:"center-middle",style:{fill:me(t,c,p,n.stroke)}});if(!o)Ue(u,0,-(-1*ge(t,n)),270)}return a.get("participantMultiplicity")&&Z("ParticipantMultiplicityMarker",e,t,n),i},"bpmn:ReceiveTask":function(e,t,n={}){n=et(n,["fill","stroke"]);var r,o=k(t),a=xe(e,t,n);return o.get("instantiate")?(y(e,28,28,4.4,{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),r=i.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):r=i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),b(e,r,{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),a},"bpmn:ScriptTask":function(e,t,n={}){var r=xe(e,t,n=et(n,["fill","stroke"]));return b(e,i.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:SendTask":function(e,t,n={}){var r=xe(e,t,n=et(n,["fill","stroke"]));return b(e,i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{fill:fe(t,p,n.stroke),stroke:he(t,l,n.fill),strokeWidth:1}),r},"bpmn:SequenceFlow":function(e,t,n={}){n=et(n,["fill","stroke"]);var i=he(t,l,n.fill),r=fe(t,p,n.stroke),o=x(e,t.waypoints,{markerEnd:d(e,"sequenceflow-end",i,r),stroke:r}),a=k(t),{source:s}=t;if(s){var c=k(s);a.get("conditionExpression")&&A(c,"bpmn:Activity")&&L(o,{markerStart:d(e,"conditional-flow-marker",i,r)}),c.get("default")&&(A(c,"bpmn:Gateway")||A(c,"bpmn:Activity"))&&c.get("default")===a&&L(o,{markerStart:d(e,"conditional-default-flow-marker",i,r)})}return o},"bpmn:ServiceTask":function(e,t,n={}){var r=xe(e,t,n=et(n,["fill","stroke"]));return y(e,10,10,{fill:he(t,l,n.fill),stroke:"none",transform:"translate(6, 6)"}),b(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),y(e,10,10,{fill:he(t,l,n.fill),stroke:"none",transform:"translate(11, 10)"}),b(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:StartEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=et(n,["fill","stroke"]),k(t).get("isInterrupting")||(n={...n,strokeDasharray:"6"});var r=ae(e,t,n);return i&&Y(t,e,n),r},"bpmn:SubProcess":function(e,t,n={}){return ve(e,t,n=S(t)?et(n,["fill","stroke","width","height"]):et(n,["fill","stroke"]))},"bpmn:Task":function(e,t,n={}){return xe(e,t,n=et(n,["fill","stroke"]))},"bpmn:TextAnnotation":function(e,t,n={}){n=et(n,["fill","stroke","width","height"]);var{width:r,height:o}=de(t,n),a=g(e,r,o,0,0,{fill:"none",stroke:"none"});return b(e,i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:0,my:0}}),{stroke:fe(t,p,n.stroke)}),Q(e,k(t).get("text")||"",{align:"left-top",box:de(t,n),padding:7,style:{fill:me(t,c,p,n.stroke)}}),a},"bpmn:Transaction":function(e,t,i={}){i=S(t)?et(i,["fill","stroke","width","height"]):et(i,["fill","stroke"]);var r=ve(e,t,{strokeWidth:1.5,...i}),o=n.style(["no-fill","no-events"],{stroke:fe(t,p,i.stroke),strokeWidth:1.5});return S(t)||(i={}),g(e,ye(t,i),ge(t,i),7,3,o),r},"bpmn:UserTask":function(e,t,n={}){var r=xe(e,t,n=et(n,["fill","stroke"]));return b(e,i.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:.5}),b(e,i.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:.5}),b(e,i.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:.5}),r},label:function(e,t,n={}){return function(e,t,n={}){var i={width:90,height:30,x:t.width/2+t.x,y:t.height/2+t.y};return Q(e,T(t),{box:i,fitBox:!0,style:E({},o.getExternalStyle(),{fill:me(t,c,p,n.stroke)})})}(e,t,n)}};this._drawPath=b,this._renderer=M}function et(e,t=[]){return t.reduce(((t,n)=>(e[n]&&(t[n]=e[n]),t)),{})}e(Qe,_),Qe.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Qe.prototype.canRender=function(e){return A(e,"bpmn:BaseElement")},Qe.prototype.drawShape=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},Qe.prototype.drawConnection=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},Qe.prototype.getShapePath=function(e){return A(e,"bpmn:Event")?function(e){var t=e.x+e.width/2,n=e.y+e.height/2,i=e.width/2;return ie([["M",t,n],["m",0,-i],["a",i,i,0,1,1,0,2*i],["a",i,i,0,1,1,0,-2*i],["z"]])}(e):A(e,"bpmn:Activity")?function(e,t){var n=e.x,i=e.y,r=e.width,o=e.height;return ie([["M",n+t,i],["l",r-2*t,0],["a",t,t,0,0,1,t,t],["l",0,o-2*t],["a",t,t,0,0,1,-t,t],["l",2*t-r,0],["a",t,t,0,0,1,-t,-t],["l",0,2*t-o],["a",t,t,0,0,1,t,-t],["z"]])}(e,10):A(e,"bpmn:Gateway")?function(e){var t=e.width/2,n=e.height/2;return ie([["M",e.x+t,e.y],["l",t,n],["l",-t,n],["l",-t,-n],["z"]])}(e):function(e){var t=e.x,n=e.y,i=e.width;return ie([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])}(e)};var tt={width:150,height:50};function nt(e,t){var n;t.textContent=e;try{var i,r=""===e;return t.textContent=r?"dummy":e,i={width:(n=t.getBBox()).width+2*n.x,height:n.height},r&&(i.width=0),i}catch(e){return console.log(e),{width:0,height:0}}}function it(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=nt(o,n)).width=o?i.width:0," "===o||""===o||i.width<Math.round(t)||o.length<2)return rt(e,o,r,i);o=at(o,i.width,t)}}function rt(e,t,n,i){if(t.length<n.length){var r=n.slice(t.length).trim();e.unshift(r)}return{width:i.width,height:i.height,text:t}}var ot="";function at(e,t,n){var i=Math.max(e.length*(n/t),1),r=function(e,t){var n,i=e.split(/(\s|-|\u00AD)/g),r=[],o=0;if(i.length>1)for(;n=i.shift();){if(!(n.length+o<t)){"-"!==n&&n!==ot||r.pop();break}r.push(n),o+=n.length}var a=r[r.length-1];return a&&a===ot&&(r[r.length-1]="-"),r.join("")}(e,i);return r||(r=e.slice(0,Math.max(Math.round(i-1),1))),r}function st(e){this._config=E({},{size:tt,padding:0,style:{},align:"center-top"},e||{})}st.prototype.createText=function(e,t){return this.layoutText(e,t).element},st.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},st.prototype.layoutText=function(e,t){var n=E({},this._config.size,t.box),i=E({},this._config.style,t.style),r=function(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}(t.align||this._config.align),o=function(e){return a(e)?E({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}(void 0!==t.padding?t.padding:this._config.padding),s=t.fitBox||!1,l=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(i),p=e.split(/\u00AD?\r?\n/),c=[],u=n.width-o.left-o.right,h=$("text");for(L(h,{x:0,y:0}),L(h,i),D(function(){var e=document.getElementById("helper-svg");return e||(L(e=$("svg"),{id:"helper-svg"}),ke(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}(),h);p.length;)c.push(it(p,u,h));"middle"===r.vertical&&(o.top=o.bottom=0);var d=m(c,(function(e,t,n){return e+(l||t.height)}),0)+o.top+o.bottom,y=m(c,(function(e,t,n){return t.width>e?t.width:e}),0),g=o.top;"middle"===r.vertical&&(g+=(n.height-d)/2),g-=(l||c[0].height)/4;var v=$("text");return L(v,i),f(c,(function(e){var t;switch(g+=l||e.height,r.horizontal){case"left":t=o.left;break;case"right":t=(s?y:u)-o.right-e.width;break;default:t=Math.max(((s?y:u)-e.width)/2+o.left,0)}var n=$("tspan");L(n,{x:t,y:g}),n.textContent=e.text,D(v,n)})),ee(h),{dimensions:{width:y,height:d},element:v}};function lt(e){var t=E({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=E({},t,{fontSize:n},e&&e.externalStyle||{}),r=new st({style:t});this.getExternalLabelBounds=function(e,t){var n=r.getDimensions(t,{box:{width:90,height:30},style:i});return{x:Math.round(e.x+e.width/2-n.width/2),y:Math.round(e.y),width:Math.ceil(n.width),height:Math.ceil(n.height)}},this.getTextAnnotationBounds=function(e,n){var i=r.getDimensions(n,{box:e,style:t,align:"left-top",padding:5});return{x:e.x,y:e.y,width:e.width,height:Math.max(30,Math.round(i.height))}},this.createText=function(e,t){return r.createText(e,t||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return i}}lt.$inject=["config.textRenderer"];var pt=/\{([^{}]+)\}/g,ct=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var ut={__init__:["bpmnRenderer"],bpmnRenderer:["type",Qe],textRenderer:["type",lt],pathMap:["type",function(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var n,i,r=this.pathMap[e];t.abspos?(n=t.abspos.x,i=t.abspos.y):(n=t.containerWidth*t.position.mx,i=t.containerHeight*t.position.my);var o={};if(t.position){for(var a=t.containerHeight/r.height*t.yScaleFactor,s=t.containerWidth/r.width*t.xScaleFactor,l=0;l<r.heightElements.length;l++)o["y"+l]=r.heightElements[l]*a;for(var p=0;p<r.widthElements.length;p++)o["x"+p]=r.widthElements[p]*s}var c,u,h=(c=r.d,u={mx:n,my:i,e:o},String(c).replace(pt,(function(e,t){return function(e,t,n){var i=n;return t.replace(ct,(function(e,t,n,r,o){t=t||r,i&&(t in i&&(i=i[t]),"function"==typeof i&&o&&(i=i()))})),i=(null==i||i==n?e:i)+""}(e,t,u)})));return h}}]};var ht={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]};function ft(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function mt(e){return t={x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2},{x:Math.round(t.x),y:Math.round(t.y)};var t}function dt(e){for(var t=e.waypoints,n=t.reduce((function(e,n,i){var r,o,a=t[i-1];if(a){var s=e[e.length-1],l=s&&s.endLength||0,p=(r=a,o=n,Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)));e.push({start:a,end:n,startLength:l,endLength:l+p,length:p})}return e}),[]),i=n.reduce((function(e,t){return e+t.length}),0),r=i/2,o=0,a=n[o];a.endLength<r;)a=n[++o];var s=(r-a.startLength)/a.length;return{x:a.start.x+(a.end.x-a.start.x)*s,y:a.start.y+(a.end.y-a.start.y)*s}}function yt(e){return a(t=e)&&c(t,"waypoints")?dt(e):mt(e);var t}function gt(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function vt(e,t,n){return E({id:e.id,type:e.$type,businessObject:e,di:t},n)}function xt(e,t,n){var i=e.waypoint;return!i||i.length<2?[yt(t),yt(n)]:i.map((function(e){return{x:e.x,y:e.y}}))}function bt(e,t,n){return new Error(`element ${gt(t)} referenced by ${gt(e)}#${n} not yet drawn`)}function wt(e,t,n,i,r){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._textRenderer=r}wt.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],wt.prototype.add=function(e,t,n){var i,r,o,a,s,l,p;if(A(t,"bpmndi:BPMNPlane")){var c=A(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};i=this._elementFactory.createRoot(vt(e,t,c)),this._canvas.addRootElement(i)}else if(A(t,"bpmndi:BPMNShape")){var u=!S(e,t),h=function(e){return A(e,"bpmn:Group")}(e);r=n&&(n.hidden||n.collapsed);var f=t.bounds;i=this._elementFactory.createShape(vt(e,t,{collapsed:u,hidden:r,x:Math.round(f.x),y:Math.round(f.y),width:Math.round(f.width),height:Math.round(f.height),isFrame:h})),A(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,i),A(e,"bpmn:Lane")&&(o=0),A(e,"bpmn:DataStoreReference")&&(a=n,s=yt(f),l=s.x,p=s.y,l>=a.x&&l<=a.x+a.width&&p>=a.y&&p<=a.y+a.height||(n=this._canvas.findRoot(n))),this._canvas.addShape(i,n,o)}else{if(!A(t,"bpmndi:BPMNEdge"))throw new Error(`unknown di ${gt(t)} for element ${gt(e)}`);var m=this._getSource(e),d=this._getTarget(e);r=n&&(n.hidden||n.collapsed),i=this._elementFactory.createConnection(vt(e,t,{hidden:r,source:m,target:d,waypoints:xt(t,m,d)})),A(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(i,n,o)}return function(e){return A(e,"bpmn:Event")||A(e,"bpmn:Gateway")||A(e,"bpmn:DataStoreReference")||A(e,"bpmn:DataObjectReference")||A(e,"bpmn:DataInput")||A(e,"bpmn:DataOutput")||A(e,"bpmn:SequenceFlow")||A(e,"bpmn:MessageFlow")||A(e,"bpmn:Group")}(e)&&T(i)&&this.addLabel(e,t,i),this._eventBus.fire("bpmnElement.added",{element:i}),i},wt.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${gt(e)}#attachedToRef`);var i=this._elementRegistry.get(n.id),r=i&&i.attachers;if(!i)throw bt(e,n,"attachedToRef");t.host=i,r||(i.attachers=r=[]),-1===r.indexOf(t)&&r.push(t)},wt.prototype.addLabel=function(e,t,n){var i,r,o;return i=N(t,n),(r=T(n))&&(i=this._textRenderer.getExternalLabelBounds(i,r)),o=this._elementFactory.createLabel(vt(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!T(n),x:Math.round(i.x),y:Math.round(i.y),width:Math.round(i.width),height:Math.round(i.height)})),this._canvas.addShape(o,n.parent)},wt.prototype._getConnectedElement=function(e,t){var n,i,r=e.$type;if(i=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===r&&(i=i&&i[0]),("source"===t&&"bpmn:DataOutputAssociation"===r||"target"===t&&"bpmn:DataInputAssociation"===r)&&(i=e.$parent),n=i&&this._getElement(i))return n;throw i?bt(e,i,t+"Ref"):new Error(`${gt(e)}#${t} Ref not specified`)},wt.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},wt.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},wt.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};var Et={__depends__:[ut,{__depends__:[ht],bpmnImporter:["type",wt]}]};function _t(e,t){var n,i,r,a;return t=!!t,o(e)||(e=[e]),f(e,(function(e){var o=e;e.waypoints&&!t&&(o=_t(e.waypoints,!0));var s=o.x,l=o.y,p=o.height||0,c=o.width||0;(s<n||void 0===n)&&(n=s),(l<i||void 0===i)&&(i=l),(s+c>r||void 0===r)&&(r=s+c),(l+p>a||void 0===a)&&(a=l+p)})),{x:n,y:i,height:a-i,width:r-n}}function At(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function kt(e){return!(!e||!e.isFrame)}function Rt(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}Rt.prototype.next=function(){return this._prefix+ ++this._counter};var St=new Rt("ov");function Ct(e,t,n,i){var r,o;this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=St,this._overlayDefaults=E({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(r=n.getContainer(),ke(o=Ge('<div class="djs-overlay-container" />'),{position:"absolute",width:0,height:0}),r.insertBefore(o,r.firstChild),o),this._init()}function Mt(e,t,n){ke(e,{left:t+"px",top:n+"px"})}function Pt(e,t){e.style.display=!1===t?"none":""}function Nt(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}Ct.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Ct.prototype.get=function(e){if(p(e)&&(e={id:e}),p(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?h(t.overlays,g({type:e.type})):t.overlays.slice():[]}return e.type?h(this._overlays,g({type:e.type})):e.id?this._overlays[e.id]:null},Ct.prototype.add=function(e,t,n){if(a(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var i=this._ids.next();return n=E({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},Ct.prototype.remove=function(e){var t=this.get(e)||[];o(t)||(t=[t]);var n=this;f(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(Ke(e.html),Ke(e.htmlContainer),delete e.htmlContainer,delete e.element,delete n._overlays[e.id]),t){var i=t.overlays.indexOf(e);-1!==i&&t.overlays.splice(i,1)}}))},Ct.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},Ct.prototype.show=function(){Pt(this._overlayRoot)},Ct.prototype.hide=function(){Pt(this._overlayRoot,!1)},Ct.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Pe(this._overlayRoot)},Ct.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var o=_t(t);i=o.x,r=o.y}Mt(n,i,r),Re(e.html,"data-container-id",t.id)},Ct.prototype._updateOverlay=function(e){var t,n,i=e.position,r=e.htmlContainer,o=e.element,a=i.left,s=i.top;void 0!==i.right&&(t=o.waypoints?_t(o).width:o.width,a=-1*i.right+t);void 0!==i.bottom&&(n=o.waypoints?_t(o).height:o.height,s=-1*i.bottom+n);Mt(r,a||0,s||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Ct.prototype._createOverlayContainer=function(e){var t=Ge('<div class="djs-overlays" />');ke(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Ct.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Nt(this._overlayRoot,n)},Ct.prototype._getOverlayContainer=function(e,t){var n=u(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},Ct.prototype._addOverlay=function(e){var t,n,i=e.id,r=e.element,o=e.html;o.get&&o.constructor.prototype.jquery&&(o=o.get(0)),p(o)&&(o=Ge(o)),n=this._getOverlayContainer(r),ke(t=Ge('<div class="djs-overlay" data-overlay-id="'+i+'">'),{position:"absolute"}),t.appendChild(o),e.type&&Ce(t).add("djs-overlay-"+e.type),Pt(t,this._canvas.findRoot(r)===this._canvas.getRootElement()),e.htmlContainer=t,n.overlays.push(e),n.html.appendChild(t),this._overlays[i]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Ct.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,i=this._canvas.findRoot(e.element),o=n&&n.minZoom,a=n&&n.maxZoom,s=e.htmlContainer,l=!0;(i!==this._canvas.getRootElement()||n&&(r(o)&&o>t.scale||r(a)&&a<t.scale))&&(l=!1),Pt(s,l),this._updateOverlayScale(e,t)},Ct.prototype._updateOverlayScale=function(e,t){var n,i,o,a=e.scale,s=e.htmlContainer,l="";!0!==a&&(!1===a?(n=1,i=1):(n=a.min,i=a.max),r(n)&&t.scale<n&&(o=(1/t.scale||1)*n),r(i)&&t.scale>i&&(o=(1/t.scale||1)*i)),r(o)&&(l="scale("+o+","+o+")"),Nt(s,l)},Ct.prototype._updateOverlaysVisibilty=function(e){var t=this;f(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},Ct.prototype._init=function(){var e=this._eventBus,t=this;e.on("canvas.viewbox.changing",(function(e){t.hide()})),e.on("canvas.viewbox.changed",(function(e){var n;n=e.viewbox,t._updateRoot(n),t._updateOverlaysVisibilty(n),t.show()})),e.on(["shape.remove","connection.remove"],(function(e){var n=e.element;f(t.get({element:n}),(function(e){t.remove(e.id)}));var i=t._getOverlayContainer(n);if(i){Ke(i.html);var r=t._overlayContainers.indexOf(i);-1!==r&&t._overlayContainers.splice(r,1)}})),e.on("element.changed",500,(function(e){var n=e.element,i=t._getOverlayContainer(n,!0);i&&(f(i.overlays,(function(e){t._updateOverlay(e)})),t._updateOverlayContainer(i))})),e.on("element.marker.update",(function(e){var n=t._getOverlayContainer(e.element,!0);n&&Ce(n.html)[e.add?"add":"remove"](e.marker)})),e.on("root.set",(function(){t._updateOverlaysVisibilty(t._canvas.viewbox())})),e.on("diagram.clear",this.clear,this)};var Tt={__init__:["overlays"],overlays:["type",Ct]};function Dt(e,t,n,i){e.on("element.changed",(function(i){var r=i.element;(r.parent||r===t.getRootElement())&&(i.gfx=n.getGraphics(r)),i.gfx&&e.fire(At(r)+".changed",i)})),e.on("elements.changed",(function(t){var n=t.elements;n.forEach((function(t){e.fire("element.changed",{element:t})})),i.updateContainments(n)})),e.on("shape.changed",(function(e){i.update("shape",e.element,e.gfx)})),e.on("connection.changed",(function(e){i.update("connection",e.element,e.gfx)}))}Dt.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var Bt={__init__:["changeSupport"],changeSupport:["type",Dt]};function Ot(e){this._eventBus=e}function Lt(e){return function(t,n,i,r,o){(l(t)||s(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}}function It(e,t){t.invoke(Ot,this),this.executed((function(t){var n=t.context;n.rootElement?e.setRootElement(n.rootElement):n.rootElement=e.getRootElement()})),this.revert((function(t){var n=t.context;n.rootElement&&e.setRootElement(n.rootElement)}))}Ot.$inject=["eventBus"],Ot.prototype.on=function(e,t,n,i,r,p){if((l(t)||s(t))&&(p=r,r=i,i=n,n=t,t=null),l(n)&&(p=r,r=i,i=n,n=1e3),a(r)&&(p=r,r=!1),!l(i))throw new Error("handlerFn must be a function");o(e)||(e=[e]);var c=this._eventBus;f(e,(function(e){var o=["commandStack",e,t].filter((function(e){return e})).join(".");c.on(o,n,r?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(i,p):i,p)}))},Ot.prototype.canExecute=Lt("canExecute"),Ot.prototype.preExecute=Lt("preExecute"),Ot.prototype.preExecuted=Lt("preExecuted"),Ot.prototype.execute=Lt("execute"),Ot.prototype.executed=Lt("executed"),Ot.prototype.postExecute=Lt("postExecute"),Ot.prototype.postExecuted=Lt("postExecuted"),Ot.prototype.revert=Lt("revert"),Ot.prototype.reverted=Lt("reverted"),e(It,Ot),It.$inject=["canvas","injector"];var Ft={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",It]},jt={"&":"&","<":"<",">":">",'"':""","'":"'"};var Vt="_plane";function Wt(e){var t=e.id;return A(e,"bpmn:SubProcess")?function(e){return e+Vt}(t):t}function zt(e,t,n){var i=Ge('<ul class="bjs-breadcrumbs"></ul>'),r=n.getContainer(),o=Ce(r);r.appendChild(i);var a=[];function s(e){e&&(a=function(e){for(var t=k(e),n=[],i=t;i;i=i.$parent)(A(i,"bpmn:SubProcess")||A(i,"bpmn:Process"))&&n.push(i);return n.reverse()}(e));var r=a.flatMap((function(e){var i=n.findRoot(Wt(e))||n.findRoot(e.id);if(!i&&A(e,"bpmn:Process")){var r=t.find((function(t){var n=k(t);return n&&n.get("processRef")===e}));i=r&&n.findRoot(r.id)}if(!i)return[];var o,a=(o=""+(o=e.name||e.id))&&o.replace(/[&<>"']/g,(function(e){return jt[e]})),s=Ge('<li><span class="bjs-crumb"><a title="'+a+'">'+a+"</a></span></li>");return s.addEventListener("click",(function(){n.setRootElement(i)})),s}));i.innerHTML="";var s=r.length>1;o.toggle("bjs-breadcrumbs-shown",s),r.forEach((function(e){i.appendChild(e)}))}e.on("element.changed",(function(e){var t=k(e.element);u(a,(function(e){return e===t}))&&s()})),e.on("root.set",(function(e){s(e.element)}))}function $t(e,t){var n=null,i=new Gt;e.on("root.set",(function(e){var r=e.element,o=t.viewbox(),a=i.get(r);if(i.set(n,{x:o.x,y:o.y,zoom:o.scale}),n=r,A(r,"bpmn:SubProcess")||a){a=a||{x:0,y:0,zoom:1};var s=(o.x-a.x)*o.scale,l=(o.y-a.y)*o.scale;0===s&&0===l||t.scroll({dx:s,dy:l}),a.zoom!==o.scale&&t.zoom(a.zoom,{x:0,y:0})}})),e.on("diagram.clear",(function(){i.clear(),n=null}))}function Gt(){this._entries=[],this.set=function(e,t){var n=!1;for(var i in this._entries)if(this._entries[i][0]===e){this._entries[i][1]=t,n=!0;break}n||this._entries.push([e,t])},this.get=function(e){for(var t in this._entries)if(this._entries[t][0]===e)return this._entries[t][1];return null},this.clear=function(){this._entries.length=0},this.remove=function(e){var t=-1;for(var n in this._entries)if(this._entries[n][0]===e){t=n;break}-1!==t&&this._entries.splice(t,1)}}zt.$inject=["eventBus","elementRegistry","canvas"],$t.$inject=["eventBus","canvas"];var Ht=180,Kt=160;function Ut(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,(function(e,t){n._handleImport(t.definitions)}))}function qt(e){return A(e,"bpmndi:BPMNDiagram")?e:qt(e.$parent)}Ut.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach((function(e){e.plane&&e.plane.bpmnElement&&(t._processToDiagramMap[e.plane.bpmnElement.id]=e)})),e.diagrams.filter((e=>e.plane)).flatMap((e=>t._createNewDiagrams(e.plane))).forEach((function(e){t._movePlaneElementsToOrigin(e.plane)}))}},Ut.prototype._createNewDiagrams=function(e){var t=this,n=[],i=[];e.get("planeElement").forEach((function(t){var r=t.bpmnElement;if(r){var o=r.$parent;A(r,"bpmn:SubProcess")&&!t.isExpanded&&n.push(r),function(e,t){var n=e.$parent;if(!A(n,"bpmn:SubProcess")||n===t.bpmnElement)return!1;if(function(e,t){return y(t,(function(t){return A(e,t)}))}(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))return!1;return!0}(r,e)&&i.push({diElement:t,parent:o})}}));var r=[];return n.forEach((function(e){if(!t._processToDiagramMap[e.id]){var n=t._createDiagram(e);t._processToDiagramMap[e.id]=n,r.push(n)}})),i.forEach((function(e){for(var i=e.diElement,r=e.parent;r&&-1===n.indexOf(r);)r=r.$parent;if(r){var o=t._processToDiagramMap[r.id];t._moveToDiPlane(i,o.plane)}})),r},Ut.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=function(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach((function(e){if(e.bounds){var n=ft(e.bounds);t.top=Math.min(n.top,t.top),t.left=Math.min(n.left,t.left)}})),function(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}(t)}(e),i=n.x-Ht,r=n.y-Kt;t.forEach((function(e){e.waypoint?e.waypoint.forEach((function(e){e.x=e.x-i,e.y=e.y-r})):e.bounds&&(e.bounds.x=e.bounds.x-i,e.bounds.y=e.bounds.y-r)}))},Ut.prototype._moveToDiPlane=function(e,t){var n=qt(e).plane.get("planeElement");n.splice(n.indexOf(e),1),t.get("planeElement").push(e)},Ut.prototype._createDiagram=function(e){var t=this._moddle.create("bpmndi:BPMNPlane",{bpmnElement:e}),n=this._moddle.create("bpmndi:BPMNDiagram",{plane:t});return t.$parent=n,t.bpmnElement=e,n.$parent=this._definitions,this._definitions.diagrams.push(n),n},Ut.$inject=["eventBus","moddle"];var Yt=250;function Xt(e,t,n,i,r){Ot.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=i,this._translate=r;var o=this;this.executed("shape.toggleCollapse",Yt,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.reverted("shape.toggleCollapse",Yt,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.executed(["shape.create","shape.move","shape.delete"],Yt,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;o._canDrillDown(i)&&o._addOverlay(i),o._updateDrilldownOverlay(t),o._updateDrilldownOverlay(n),o._updateDrilldownOverlay(i)}),!0),this.reverted(["shape.create","shape.move","shape.delete"],Yt,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;o._canDrillDown(i)&&o._addOverlay(i),o._updateDrilldownOverlay(t),o._updateDrilldownOverlay(n),o._updateDrilldownOverlay(i)}),!0),t.on("import.render.complete",(function(){n.filter((function(e){return o._canDrillDown(e)})).map((function(e){o._addOverlay(e)}))}))}e(Xt,Ot),Xt.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},Xt.prototype._canDrillDown=function(e){var t=this._canvas;return A(e,"bpmn:SubProcess")&&t.findRoot(Wt(e))},Xt.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=k(e),i=t.get({element:n.id,type:"drilldown"})[0];if(i){var r=n&&n.get("flowElements")&&n.get("flowElements").length;Ce(i.html).toggle("bjs-drilldown-empty",!r)}},Xt.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,i=k(e);n.get({element:e,type:"drilldown"}).length&&this._removeOverlay(e);var r=Ge('<button type="button" class="bjs-drilldown"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg></button>'),o=i.get("name")||i.get("id"),a=this._translate("Open {element}",{element:o});r.setAttribute("title",a),r.addEventListener("click",(function(){t.setRootElement(t.findRoot(Wt(e)))})),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:r}),this._updateOverlayVisibility(e)},Xt.prototype._removeOverlay=function(e){this._overlays.remove({element:e,type:"drilldown"})},Xt.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];var Zt={__depends__:[Tt,Bt,Ft],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",zt],drilldownCentering:["type",$t],drilldownOverlayBehavior:["type",Xt],subprocessCompatibility:["type",Ut]};function Jt(e){return e.originalEvent||e.srcEvent}function Qt(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function en(e,t){return(Jt(e)||e).button===t}function tn(e){return en(e,0)}function nn(e){return!0}function rn(e){return tn(e)||function(e){return en(e,1)}(e)}function on(e,t,n){var i=this;function r(n,i,r){var o,a;(function(e,t){var n=l[e]||tn;return!n(t)})(n,i)||(r?a=t.getGraphics(r):(o=i.delegateTarget||i.target)&&(a=o,r=t.get(a)),a&&r&&!1===e.fire(n,{element:r,gfx:a,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var o={};function a(e){return o[e]}var s={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},l={"element.contextmenu":nn,"element.mousedown":rn,"element.mouseup":rn,"element.click":rn,"element.dblclick":rn};function p(e,t,n,i){var a=o[n]=function(e){r(n,e)};i&&(l[n]=i),a.$delegate=Ve.bind(e,"svg, .djs-element",t,a)}function c(e,t,n){var i=a(n);i&&Ve.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){var t;t=e.svg,f(s,(function(e,n){c(t,n,e)}))})),e.on("canvas.init",(function(e){var t;t=e.svg,f(s,(function(e,n){p(t,n,e)}))})),e.on(["shape.added","connection.added"],(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.createHit",{element:n,gfx:i})})),e.on(["shape.changed","connection.changed"],500,(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.updateHit",{element:n,gfx:i})})),e.on("interactionEvents.createHit",500,(function(e){var t=e.element,n=e.gfx;i.createDefaultHit(t,n)})),e.on("interactionEvents.updateHit",(function(e){var t=e.element,n=e.gfx;i.updateDefaultHit(t,n)}));var u=d("djs-hit djs-hit-stroke"),h=d("djs-hit djs-hit-click-stroke"),m={all:d("djs-hit djs-hit-all"),"click-stroke":h,stroke:u,"no-move":d("djs-hit djs-hit-no-move")};function d(e,t){return t=E({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function y(e,t){var n=m[t];if(!n)throw new Error("invalid hit type <"+t+">");return L(e,n),e}function g(e,t){D(e,t)}this.removeHits=function(e){var t;f((t=".djs-hit",(e||document).querySelectorAll(t)),ee)},this.createDefaultHit=function(e,t){var n,i=e.waypoints,r=e.isFrame;return i?this.createWaypointsHit(t,i):(n=r?"stroke":"all",this.createBoxHit(t,n,{width:e.width,height:e.height}))},this.createWaypointsHit=function(e,t){var n=le(t);return y(n,"stroke"),g(e,n),n},this.createBoxHit=function(e,t,n){n=E({x:0,y:0},n);var i=$("rect");return y(i,t),L(i,n),g(e,i),i},this.updateDefaultHit=function(e,t){var n=He(".djs-hit",t);if(n)return e.waypoints?pe(n,e.waypoints):L(n,{width:e.width,height:e.height}),n},this.fire=r,this.triggerMouseEvent=function(e,t,n){var i=s[e];if(!i)throw new Error("unmapped DOM event name <"+e+">");return r(i,t,n)},this.mouseHandler=a,this.registerEvent=p,this.unregisterEvent=c}on.$inject=["eventBus","elementRegistry","styles"];var an={__init__:["interactionEvents"],interactionEvents:["type",on]};function sn(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=[];var n=this;e.on(["shape.remove","connection.remove"],(function(e){var t=e.element;n.deselect(t)})),e.on(["diagram.clear","root.set"],(function(e){n.select(null)}))}sn.$inject=["eventBus","canvas"],sn.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(-1!==n){var i=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:t})}},sn.prototype.get=function(){return this._selectedElements},sn.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},sn.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();o(e)||(e=e?[e]:[]);var r=this._canvas,a=r.getRootElement();e=e.filter((function(e){var t=r.findRoot(e);return a===t})),t?f(e,(function(e){-1===n.indexOf(e)&&n.push(e)})):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:n})};var ln="hover",pn="selected";function cn(e,t){function n(t,n){e.addMarker(t,n)}function i(t,n){e.removeMarker(t,n)}this._canvas=e,t.on("element.hover",(function(e){n(e.element,ln)})),t.on("element.out",(function(e){i(e.element,ln)})),t.on("selection.changed",(function(e){var t=e.oldSelection,r=e.newSelection;f(t,(function(e){-1===r.indexOf(e)&&i(e,pn)})),f(r,(function(e){-1===t.indexOf(e)&&n(e,pn)}))}))}function un(e,t,n,i){e.on("create.end",500,(function(e){var n=e.context,i=n.canExecute,r=n.elements,a=(n.hints||{}).autoSelect;if(i){if(!1===a)return;o(a)?t.select(a):t.select(r.filter(hn))}})),e.on("connect.end",500,(function(e){var n=e.context.connection;n&&t.select(n)})),e.on("shape.move.end",500,(function(e){var n=e.previousSelection||[],r=i.get(e.context.shape.id);u(n,(function(e){return r.id===e.id}))||t.select(r)})),e.on("element.click",(function(e){if(tn(e)){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,a=function(e){var t=Jt(e)||e;return tn(e)&&t.shiftKey}(e);if(r&&o)return a?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,a)}}))}function hn(e){return!e.hidden}cn.$inject=["canvas","eventBus"],un.$inject=["eventBus","selection","canvas","elementRegistry"];var fn={__init__:["selectionVisuals","selectionBehavior"],__depends__:[an],selection:["type",sn],selectionVisuals:["type",cn],selectionBehavior:["type",un]};const mn=/^class[ {]/;function dn(e){return Array.isArray(e)}function yn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function gn(...e){1===e.length&&dn(e[0])&&(e=e[0]);const t=(e=[...e]).pop();return t.$inject=e,t}const vn=/constructor\s*[^(]*\(\s*([^)]*)\)/m,xn=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,bn=/\/\*([^*]*)\*\//m;function wn(e){if("function"!=typeof e)throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(function(e){return mn.test(e.toString())}(e)?vn:xn);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map((e=>{const t=e.match(bn);return(t&&t[1]||e).trim()}))||[]}function En(e,t){const n=t||{get:function(e,t){if(i.push(e),!1===t)return null;throw s(`No provider for "${e}"!`)}},i=[],r=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(e){const t=i.join(" -> ");return i.length=0,new Error(t?`${e} (Resolving: ${t})`:e)};function l(e,t){if(!r[e]&&e.includes(".")){const t=e.split(".");let n=l(t.shift());for(;t.length;)n=n[t.shift()];return n}if(yn(o,e))return o[e];if(yn(r,e)){if(-1!==i.indexOf(e))throw i.push(e),s("Cannot resolve circular dependency!");return i.push(e),o[e]=r[e][0](r[e][1]),i.pop(),o[e]}return n.get(e,t)}function p(e,t){if(void 0===t&&(t={}),"function"!=typeof e){if(!dn(e))throw s(`Cannot invoke "${e}". Expected a function!`);e=gn(e.slice())}return{fn:e,dependencies:(e.$inject||wn(e)).map((e=>yn(t,e)?t[e]:l(e)))}}function c(e){const{fn:t,dependencies:n}=p(e);return new(Function.prototype.bind.call(t,null,...n))}function u(e,t,n){const{fn:i,dependencies:r}=p(e,n);return i.apply(t,r)}function h(e){return gn((t=>e.get(t)))}function f(e,t){if(t&&t.length){const n=Object.create(null),i=Object.create(null),o=[],a=[],s=[];let l,p,c,u;for(let e in r)l=r[e],-1!==t.indexOf(e)&&("private"===l[2]?(p=o.indexOf(l[3]),-1===p?(c=l[3].createChild([],t),u=h(c),o.push(l[3]),a.push(c),s.push(u),n[e]=[u,e,"private",c]):n[e]=[s[p],e,"private",a[p]]):n[e]=[l[2],l[1]],i[e]=!0),"factory"!==l[2]&&"type"!==l[2]||!l[1].$scope||t.forEach((t=>{-1!==l[1].$scope.indexOf(t)&&(n[e]=[l[2],l[1]],i[t]=!0)}));t.forEach((e=>{if(!i[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')})),e.unshift(n)}return new En(e,a)}const m={factory:u,type:c,value:function(e){return e}};function d(e,t){const n=e.__init__||[];return function(){n.forEach((e=>{"string"==typeof e?t.get(e):t.invoke(e)}))}}function y(e){const t=e.__exports__;if(t){const n=e.__modules__,i=Object.keys(e).reduce(((t,n)=>("__exports__"!==n&&"__modules__"!==n&&"__init__"!==n&&"__depends__"!==n&&(t[n]=e[n]),t)),Object.create(null)),o=f((n||[]).concat(i)),a=gn((function(e){return o.get(e)}));t.forEach((function(e){r[e]=[a,e,"private",o]}));const s=(e.__init__||[]).slice();return s.unshift((function(){o.init()})),d(e=Object.assign({},e,{__init__:s}),o)}return Object.keys(e).forEach((function(t){if("__init__"===t||"__depends__"===t)return;const n=e[t];if("private"===n[2])return void(r[t]=n);const i=n[0],o=n[1];r[t]=[m[i],_n(i,o),i]})),d(e,a)}function g(e,t){return-1!==e.indexOf(t)||-1!==(e=(t.__depends__||[]).reduce(g,e)).indexOf(t)?e:e.concat(t)}this.get=l,this.invoke=u,this.instantiate=c,this.createChild=f,this.init=function(e){const t=e.reduce(g,[]).map(y);let n=!1;return function(){n||(n=!0,t.forEach((e=>e())))}}(e)}function _n(e,t){return"value"!==e&&dn(t)&&(t=gn(t.slice())),t}function An(e,t){_.call(this,e,1),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=t.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}e(An,_),An.prototype.canRender=function(){return!0},An.prototype.drawShape=function(e,t,n){var i=$("rect");return L(i,{x:0,y:0,width:t.width||0,height:t.height||0}),kt(t)?L(i,E({},this.FRAME_STYLE,n||{})):L(i,E({},this.SHAPE_STYLE,n||{})),D(e,i),i},An.prototype.drawConnection=function(e,t,n){var i=le(t.waypoints,E({},this.CONNECTION_STYLE,n||{}));return D(e,i),i},An.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width;return ie([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])},An.prototype.getConnectionPath=function(e){var t,n,i=e.waypoints,r=[];for(t=0;n=i[t];t++)n=n.original||n,r.push([0===t?"M":"L",n.x,n.y]);return ie(r)},An.$inject=["eventBus","styles"];var kn={__init__:["defaultRenderer"],defaultRenderer:["type",An],styles:["type",function(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(e,t,n){return E(this.style(t,n),{class:e})},this.style=function(t,n){o(t)||n||(n=t,t=[]);var i=m(t,(function(t,n){return E(t,e[n]||{})}),{});return n?E(i,n):i},this.computeStyle=function(e,n,i){return o(n)||(i=n,n=[]),t.style(n||[],E({},i,e||{}))}}]};function Rn(e,t){return Math.round(e*t)/t}function Sn(e){return s(e)?e+"px":e}function Cn(e,t,n){const i=$("g");F(i).add(t);const r=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]||null),i}const Mn={shape:["x","y","width","height"],connection:["waypoints"]};function Pn(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}function Nn(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}Pn.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],Pn.prototype._init=function(e){const t=this._eventBus,n=this._container=function(e){const t=(e=E({},{width:"100%",height:"100%"},e)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),ke(n,{position:"relative",overflow:"hidden",width:Sn(e.width),height:Sn(e.height)}),t.appendChild(n),n}(e),i=this._svg=$("svg");L(i,{width:"100%",height:"100%"}),Re(i,"tabindex",0),e.autoFocus&&t.on("element.hover",(()=>{this.restoreFocus()})),t.on("element.mousedown",500,(e=>{this.focus()})),i.addEventListener("focusin",(()=>{this._setFocused(!0)})),i.addEventListener("focusout",(()=>{this._setFocused(!1)})),D(n,i);const r=this._viewport=Cn(i,"viewport");e.deferUpdate&&(this._viewboxChanged=function(e,t){let n,i,r,o;function a(n){let a=Date.now(),p=n?0:o+t-a;if(p>0)return s(p);e.apply(r,i),l()}function s(e){n=setTimeout(a,e)}function l(){n&&clearTimeout(n),n=o=i=r=void 0}function p(...e){o=Date.now(),i=e,r=this,n||s(t)}return p.flush=function(){n&&a(!0),l()},p.cancel=l,p}(w(this._viewboxChanged,this),300)),t.on("diagram.init",(()=>{t.fire("canvas.init",{svg:i,viewport:r})})),t.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","root.set"],(()=>{delete this._cachedViewbox})),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)},Pn.prototype._destroy=function(){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});const e=this._container.parentNode;e&&e.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._rootElement,delete this._viewport},Pn.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},Pn.prototype._clear=function(){this._elementRegistry.getAll().forEach((e=>{const t=At(e);"root"===t?this.removeRootElement(e):this._removeElement(e,t)})),this._planes=[],this._rootElement=null,delete this._cachedViewbox},Pn.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},Pn.prototype.restoreFocus=function(){document.activeElement===document.body&&this.focus()},Pn.prototype.isFocused=function(){return this._focused},Pn.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},Pn.prototype.getLayer=function(e,t){if(!e)throw new Error("must specify a name");let n=this._layers[e];if(n||(n=this._layers[e]=this._createLayer(e,t)),void 0!==t&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group},Pn.prototype._getChildIndex=function(e){return m(this._layers,(function(t,n){return n.visible&&e>=n.index&&t++,t}),0)},Pn.prototype._createLayer=function(e,t){void 0===t&&(t=1);const n=this._getChildIndex(t);return{group:Cn(this._viewport,"layer-"+e,n),index:t,visible:!0}},Pn.prototype.showLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=this._viewport,i=t.group,r=t.index;if(t.visible)return i;const o=this._getChildIndex(r);return n.insertBefore(i,n.childNodes[o]||null),t.visible=!0,i},Pn.prototype.hideLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=t.group;return t.visible?(ee(n),t.visible=!1,n):n},Pn.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],ee(t.group))},Pn.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},Pn.prototype.findRoot=function(e){if("string"==typeof e&&(e=this._elementRegistry.get(e)),!e)return;const t=this._findPlaneForRoot(function(e){for(;e.parent;)e=e.parent;return e}(e))||{};return t.rootElement},Pn.prototype.getRootElements=function(){return this._planes.map((function(e){return e.rootElement}))},Pn.prototype._findPlaneForRoot=function(e){return u(this._planes,(function(t){return t.rootElement===e}))},Pn.prototype.getContainer=function(){return this._container},Pn.prototype._updateMarker=function(e,t,n){let i;e.id||(e=this._elementRegistry.get(e)),e.markers=e.markers||new Set,i=this._elementRegistry._elements[e.id],i&&(f([i.gfx,i.secondaryGfx],(function(i){i&&(n?(e.markers.add(t),F(i).add(t)):(e.markers.delete(t),F(i).remove(t)))})),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},Pn.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},Pn.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},Pn.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),!!e.markers&&e.markers.has(t)},Pn.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},Pn.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},Pn.prototype.addRootElement=function(e){const t=this._rootsIdx++;e||(e={id:"__implicitroot_"+t,children:[],isImplicit:!0});const n=e.layer="root-"+t;this._ensureValid("root",e);const i=this.getLayer(n,0);return this.hideLayer(n),this._addRoot(e,i),this._planes.push({rootElement:e,layer:i}),e},Pn.prototype.removeRootElement=function(e){"string"==typeof e&&(e=this._elementRegistry.get(e));if(this._findPlaneForRoot(e))return this._removeRoot(e),this._removeLayer(e.layer),this._planes=this._planes.filter((function(t){return t.rootElement!==e})),this._rootElement===e&&(this._rootElement=null),e},Pn.prototype.setRootElement=function(e){if(e===this._rootElement)return e;let t;if(!e)throw new Error("rootElement required");return t=this._findPlaneForRoot(e),t||(e=this.addRootElement(e)),this._setRoot(e),e},Pn.prototype._removeRoot=function(e){const t=this._elementRegistry,n=this._eventBus;n.fire("root.remove",{element:e}),n.fire("root.removed",{element:e}),t.remove(e)},Pn.prototype._addRoot=function(e,t){const n=this._elementRegistry,i=this._eventBus;i.fire("root.add",{element:e}),n.add(e,t),i.fire("root.added",{element:e,gfx:t})},Pn.prototype._setRoot=function(e,t){const n=this._rootElement;n&&(this._elementRegistry.updateGraphics(n,null,!0),this.hideLayer(n.layer)),e&&(t||(t=this._findPlaneForRoot(e).layer),this._elementRegistry.updateGraphics(e,this._svg,!0),this.showLayer(e.layer)),this._rootElement=e,this._eventBus.fire("root.set",{element:e})},Pn.prototype._ensureValid=function(e,t){if(!t.id)throw new Error("element must have an id");if(this._elementRegistry.get(t.id))throw new Error("element <"+t.id+"> already exists");const n=Mn[e],i=d(n,(function(e){return void 0!==t[e]}));if(!i)throw new Error("must supply { "+n.join(", ")+" } with "+e)},Pn.prototype._setParent=function(e,t,n){!function(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}(t.children,e,n),e.parent=t},Pn.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();const r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),r.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);const a=o.create(e,t,i);return this._elementRegistry.add(t,a),o.update(e,t,a),r.fire(e+".added",{element:t,gfx:a}),t},Pn.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},Pn.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},Pn.prototype._removeElement=function(e,t){const n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(e=n.get(e.id||e))return r.fire(t+".remove",{element:e}),i.remove(e),function(e,t){if(!e||!t)return-1;var n=e.indexOf(t);-1!==n&&e.splice(n,1)}(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},Pn.prototype.removeShape=function(e){return this._removeElement(e,"shape")},Pn.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},Pn.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},Pn.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},Pn.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},Pn.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let i,r,o,a,s,l,p;return e?(this._changeViewbox((function(){s=Math.min(n.width/e.width,n.height/e.height);const i=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);ne(t,i)})),e):(o=this._rootElement?this.getActiveLayer():null,i=o&&o.getBBox()||{},a=ne(t),r=a?a.matrix:function(e,t,n,i,r,o){var a=H().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return K(a,e);case 6:return K(a,{a:e,b:t,c:n,d:i,e:r,f:o})}}(),s=Rn(r.a,1e3),l=Rn(-r.e||0,1e3),p=Rn(-r.f||0,1e3),e=this._cachedViewbox={x:l?l/s:0,y:p?p/s:0,width:n.width/s,height:n.height/s,scale:s,inner:{width:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:n})},Pn.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox((function(){e=E({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),Nn(t,n)})),{x:n.e,y:n.f}},Pn.prototype.scrollToElement=function(e,t){let n=100;"string"==typeof e&&(e=this._elementRegistry.get(e));const i=this.findRoot(e);if(i!==this.getRootElement()&&this.setRootElement(i),i===e)return;t||(t={}),"number"==typeof t&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};const r=_t(e),o=ft(r),a=this.viewbox(),s=this.zoom();let l,p;a.y+=t.top/s,a.x+=t.left/s,a.width-=(t.right+t.left)/s,a.height-=(t.bottom+t.top)/s;const c=ft(a);if(r.width<a.width&&r.height<a.height){const e=Math.max(0,o.right-c.right),t=Math.min(0,o.left-c.left),n=Math.max(0,o.bottom-c.bottom),i=Math.min(0,o.top-c.top);l=e||t,p=n||i}else l=r.x-a.x,p=r.y-a.y;this.scroll({dx:-l*s,dy:-p*s})},Pn.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if("fit-viewport"===e)return this._fitViewport(t);let n,i;return this._changeViewbox((function(){"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)})),Rn(i.a,1e3)},Pn.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,i=t.inner;let r,o;return i.x>=0&&i.y>=0&&i.x+i.width<=n.width&&i.y+i.height<=n.height&&!e?o={x:0,y:0,width:Math.max(i.width+i.x,n.width),height:Math.max(i.height+i.y,n.height)}:(r=Math.min(1,n.width/i.width,n.height/i.height),o={x:i.x+(e?i.width/2-n.width/r/2:0),y:i.y+(e?i.height/2-n.height/r/2:0),width:n.width/r,height:n.height/r}),this.viewbox(o),this.viewbox(!1).scale},Pn.prototype._setZoom=function(e,t){const n=this._svg,i=this._viewport,r=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,l,p,c;l=i.getCTM();const u=l.a;return t?(a=E(o,t),s=a.matrixTransform(l.inverse()),p=r.translate(s.x,s.y).scale(1/u*e).translate(-s.x,-s.y),c=l.multiply(p)):c=r.scale(e),Nn(this._viewport,c),c},Pn.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},Pn.prototype.getAbsoluteBBox=function(e){const t=this.viewbox();let n;if(e.waypoints){n=this.getGraphics(e).getBBox()}else n=e;return{x:n.x*t.scale-t.x*t.scale,y:n.y*t.scale-t.y*t.scale,width:n.width*t.scale,height:n.height*t.scale}},Pn.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Tn="data-element-id";function Dn(e){this._elements={},this._eventBus=e}function Bn(e,t,n){var i=function(e,t,n,i){var r=n.inverse;return Object.defineProperty(e,"remove",{value:function(e){var n=this.indexOf(e);return-1!==n&&(this.splice(n,1),t.unset(e,r,i)),e}}),Object.defineProperty(e,"contains",{value:function(e){return-1!==this.indexOf(e)}}),Object.defineProperty(e,"add",{value:function(e,n){var o=this.indexOf(e);if(void 0===n){if(-1!==o)return;n=this.length}-1!==o&&this.splice(o,1),this.splice(n,0,e),-1===o&&t.set(e,r,i)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:i}),i.length&&i.forEach((function(i){e.set(i,t.inverse,n)}))}function On(e,t){if(!(this instanceof On))return new On(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Dn.$inject=["eventBus"],Dn.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),L(t,Tn,i),n&&L(n,Tn,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},Dn.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(L(i.gfx,Tn,""),i.secondaryGfx&&L(i.secondaryGfx,Tn,""),delete t[n])},Dn.prototype.updateId=function(e,t){this._validateId(t),"string"==typeof e&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t});var n=this.getGraphics(e),i=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,i)},Dn.prototype.updateGraphics=function(e,t,n){var i=e.id||e,r=this._elements[i];return n?r.secondaryGfx=t:r.gfx=t,t&&L(t,Tn,i),t},Dn.prototype.get=function(e){var t;t="string"==typeof e?e:e&&L(e,Tn);var n=this._elements[t];return n&&n.element},Dn.prototype.filter=function(e){var t=[];return this.forEach((function(n,i){e(n,i)&&t.push(n)})),t},Dn.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),i=0;i<n.length;i++){var r=t[n[i]],o=r.element;if(e(o,r.gfx))return o}},Dn.prototype.getAll=function(){return this.filter((function(e){return e}))},Dn.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach((function(n){var i=t[n],r=i.element,o=i.gfx;return e(r,o)}))},Dn.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},Dn.prototype._validateId=function(e){if(!e)throw new Error("element must have an id");if(this._elements[e])throw new Error("element with id "+e+" already added")},On.prototype.bind=function(e,t){if("string"==typeof t){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?Bn(this,t,e):function(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var o=r;r=null,o&&e.unset(o,i,n),r=t,e.set(r,i,n)}}})}(this,t,e)},On.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return function(e){return!0===e.__refs_collection}(n)||Bn(this,t,e),n},On.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},On.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},On.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Ln=new On({name:"children",enumerable:!0,collection:!0},{name:"parent"}),In=new On({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Fn=new On({name:"attachers",collection:!0},{name:"host"}),jn=new On({name:"outgoing",collection:!0},{name:"source"}),Vn=new On({name:"incoming",collection:!0},{name:"target"});function Wn(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(e){var t=this.label,n=this.labels;!e&&t?n.remove(t):n.add(e,0)}}),Ln.bind(this,"parent"),In.bind(this,"labels"),jn.bind(this,"outgoing"),Vn.bind(this,"incoming")}function zn(){Wn.call(this),Ln.bind(this,"children"),Fn.bind(this,"host"),Fn.bind(this,"attachers")}function $n(){Wn.call(this),Ln.bind(this,"children")}function Gn(){zn.call(this),In.bind(this,"labelTarget")}function Hn(){Wn.call(this),jn.bind(this,"source"),Vn.bind(this,"target")}e(zn,Wn),e($n,zn),e(Gn,zn),e(Hn,Wn);var Kn={connection:Hn,shape:zn,label:Gn,root:$n};function Un(){this._uid=12}Un.prototype.createRoot=function(e){return this.create("root",e)},Un.prototype.createLabel=function(e){return this.create("label",e)},Un.prototype.createShape=function(e){return this.create("shape",e)},Un.prototype.createConnection=function(e){return this.create("connection",e)},Un.prototype.create=function(e,t){return(t=E({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=Kn[e];if(!n)throw new Error("unknown type: <"+e+">");return E(new n,t)}(e,t)};var qn="__fn",Yn=Array.prototype.slice;function Xn(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function Zn(){}function Jn(e,t){this._eventBus=e,this._elementRegistry=t}function Qn(e,t,n){var i=n||t.firstChild;e!==i&&t.insertBefore(e,i)}Xn.prototype.on=function(e,t,n,i){if(e=o(e)?e:[e],l(t)&&(i=n,n=t,t=1e3),!s(t))throw new Error("priority must be a number");var r=n;i&&((r=w(n,i))[qn]=n[qn]||n);var a=this;e.forEach((function(e){a._addListener(e,{priority:t,callback:r,next:null})}))},Xn.prototype.once=function(e,t,n,i){var r=this;if(l(t)&&(i=n,n=t,t=1e3),!s(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var t=n.apply(i,arguments);return r.off(e,o),t}o[qn]=n,this.on(e,t,o)},Xn.prototype.off=function(e,t){e=o(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},Xn.prototype.createEvent=function(e){var t=new Zn;return t.init(e),t},Xn.prototype.fire=function(e,t){var n,i,r,o;if(o=Yn.call(arguments),"object"==typeof e&&(e=(t=e).type),!e)throw new Error("no event type specified");if(i=this._listeners[e]){n=t instanceof Zn?t:this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{r=this._invokeListeners(n,o,i)}finally{e!==a&&(n.type=a)}return void 0===r&&n.defaultPrevented&&(r=!1),r}},Xn.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},Xn.prototype._destroy=function(){this._listeners={}},Xn.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},Xn.prototype._invokeListener=function(e,t,n){var i;if(n.callback.__isTomb)return i;try{i=function(e,t){return e.apply(null,t)}(n.callback,t),void 0!==i&&(e.returnValue=i,e.stopPropagation()),!1===i&&e.preventDefault()}catch(e){if(!this.handleError(e))throw console.error("unhandled error in event listener",e),e}return i},Xn.prototype._addListener=function(e,t){var n,i=this._getListeners(e);if(i){for(;i;){if(i.priority<t.priority)return t.next=i,void(n?n.next=t:this._setListeners(e,t));n=i,i=i.next}n.next=t}else this._setListeners(e,t)},Xn.prototype._getListeners=function(e){return this._listeners[e]},Xn.prototype._setListeners=function(e,t){this._listeners[e]=t},Xn.prototype._removeListener=function(e,t){var n,i,r,o=this._getListeners(e);if(t)for(;o;)n=o.next,(r=o.callback)!==t&&r[qn]!==t||(i?i.next=n:this._setListeners(e,n)),i=o,o=n;else this._setListeners(e,null)},Zn.prototype.stopPropagation=function(){this.cancelBubble=!0},Zn.prototype.preventDefault=function(){this.defaultPrevented=!0},Zn.prototype.init=function(e){E(this,e||{})},Jn.$inject=["eventBus","elementRegistry"],Jn.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=function(e){return e.parentNode.childNodes[1]}(n),t||(F(t=$("g")).add("djs-children"),D(n.parentNode,t))):t=n,t},Jn.prototype._clear=function(e){var t=function(e){return e.childNodes[0]}(e);return Pe(t),t},Jn.prototype._createContainer=function(e,t,n,i){var r=$("g");F(r).add("djs-group"),void 0!==n?Qn(r,t,t.childNodes[n]):D(t,r);var o=$("g");F(o).add("djs-element"),F(o).add("djs-"+e),i&&F(o).add("djs-frame"),D(r,o);var a=$("g");return F(a).add("djs-visual"),D(o,a),o},Jn.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,kt(t))},Jn.prototype.updateContainments=function(e){var t,n=this,i=this._elementRegistry;t=m(e,(function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e}),{}),f(t,(function(e){var t=e.children;if(t){var r=n._getChildrenContainer(e);f(t.slice().reverse(),(function(e){Qn(i.getGraphics(e).parentNode,r)}))}}))},Jn.prototype.drawShape=function(e,t,n={}){return this._eventBus.fire("render.shape",{gfx:e,element:t,attrs:n})},Jn.prototype.getShapePath=function(e){return this._eventBus.fire("render.getShapePath",e)},Jn.prototype.drawConnection=function(e,t,n={}){return this._eventBus.fire("render.connection",{gfx:e,element:t,attrs:n})},Jn.prototype.getConnectionPath=function(e){return this._eventBus.fire("render.getConnectionPath",e)},Jn.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if("shape"===e)this.drawShape(i,t),qe(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(i,t)}t.hidden?L(n,"display","none"):L(n,"display","block")}},Jn.prototype.remove=function(e){ee(this._elementRegistry.getGraphics(e).parentNode)};var ei={__depends__:[kn],__init__:["canvas"],canvas:["type",Pn],elementRegistry:["type",Dn],elementFactory:["type",Un],eventBus:["type",Xn],graphicsFactory:["type",Jn]};function ti(e){return function(e){var t=new En(e);return t.init(),t}([{config:["value",e=e||{}]},ei].concat(e.modules||[]))}function ni(e,t){this._injector=t||ti(e),this.get("eventBus").fire("diagram.init")}function ii(){}function ri(e,t){this.model=e,this.properties=t}ni.prototype.get=function(e,t){return this._injector.get(e,t)},ni.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},ni.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},ni.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")},ii.prototype.get=function(e){return this.$model.properties.get(this,e)},ii.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},ri.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(ii.prototype);f(e.properties,(function(e){e.isMany||void 0===e.default||(i[e.name]=e.default)})),n.defineModel(i,t),n.defineDescriptor(i,e);var r=e.ns.name;function o(e){n.define(this,"$type",{value:r,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),f(e,w((function(e,t){this.set(t,e)}),this))}return o.prototype=i,o.hasType=i.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var oi={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},ai={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function si(e,t){var n=ai[e];return n?n(t):t}function li(e){return!!oi[e]}function pi(e){return!!ai[e]}function ci(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function ui(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function hi(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,f(e,w(this.registerPackage,this))}function fi(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function mi(e){this.model=e}function di(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function yi(e){return e.replace(/^:/,"")}function gi(e,t={}){this.properties=new mi(this),this.factory=new ri(this,this.properties),this.registry=new hi(e,this.properties),this.typeCache={},this.config=t}ui.prototype.build=function(){return function(e,t){let n={},i=Object(e);return f(t,(function(t){t in i&&(n[t]=e[t])})),n}(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},ui.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},ui.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,o=this.propertiesByName,a=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=r.indexOf(e);if(-1===s)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,a),o[i.name]=o[i.localName]=t},ui.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=ci(r[0],i),a=ci(r[1],o.prefix).name,s=this.propertiesByName[a];if(!s)throw new Error("refined property <"+a+"> not found");this.replaceProperty(s,e,n),delete e.redefines},ui.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},ui.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},ui.prototype.setBodyProperty=function(e,t){if(t&&this.bodyProperty)throw new Error("body property defined multiple times (<"+this.bodyProperty.ns.name+">, <"+e.ns.name+">)");this.bodyProperty=e},ui.prototype.setIdProperty=function(e,t){if(t&&this.idProperty)throw new Error("id property defined multiple times (<"+this.idProperty.ns.name+">, <"+e.ns.name+">)");this.idProperty=e},ui.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},ui.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},ui.prototype.hasProperty=function(e){return this.propertiesByName[e]},ui.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(f(e.properties,w((function(n){n=E({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var i=n.replaces,r=n.redefines;i||r?this.redefineProperty(n,i||r,i):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))}),this)),i.push(e),n[r]=e)},hi.prototype.getPackage=function(e){return this.packageMap[e]},hi.prototype.getPackages=function(){return this.packages},hi.prototype.registerPackage=function(e){e=E({},e);var t=this.packageMap;fi(t,e,"prefix"),fi(t,e,"uri"),f(e.types,w((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},hi.prototype.registerType=function(e,t){var n=ci((e=E({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:E(e.meta||{})})).name,t.prefix),i=n.name,r={};f(e.properties,w((function(e){var t=ci(e.name,n.prefix),i=t.name;li(e.type)||(e.type=ci(e.type,t.prefix).name),E(e,{ns:t,name:i}),r[i]=e}),this)),E(e,{ns:n,name:i,propertiesByName:r}),f(e.extends,w((function(e){var t=ci(e,n.prefix),r=this.typeMap[t.name];r.traits=r.traits||[],r.traits.push(i)}),this)),this.definePackage(e,t),this.typeMap[i]=e},hi.prototype.mapTypes=function(e,t,n){var i=li(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(n,i){var o=ci(n,li(n)?"":e.prefix);r.mapTypes(o,t,i)}function a(e){return o(e,!0)}if(!i)throw new Error("unknown type <"+e.name+">");f(i.superClass,n?a:function(e){return o(e,!1)}),t(i,!n),f(i.traits,a)},hi.prototype.getEffectiveDescriptor=function(e){var t=ci(e),n=new ui(t);this.mapTypes(t,(function(e,t){n.addTrait(e,t)}));var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},hi.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},mi.prototype.set=function(e,t,n){if(!p(t)||!t.length)throw new TypeError("property name must be a non-empty string");var i=this.getProperty(e,t),r=i&&i.name;void 0===n?i?delete e[r]:delete e.$attrs[yi(t)]:i?r in e?e[r]=n:di(e,i,n):e.$attrs[yi(t)]=n},mi.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[yi(t)];var i=n.name;return!e[i]&&n.isMany&&di(e,n,[]),e[i]},mi.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;delete(n=E({},n,{get:function(){return i}})).value}Object.defineProperty(e,t,n)},mi.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},mi.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},mi.prototype.getProperty=function(e,t){var n=this.model,i=n.getPropertyDescriptor(e,t);if(i)return i;if(t.includes(":"))return null;const r=n.config.strict;if(void 0!==r){const n=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(r)throw n;"undefined"!=typeof console&&console.warn(n)}return null},gi.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},gi.prototype.getType=function(e){var t=this.typeCache,n=p(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},gi.prototype.createAny=function(e,t,n){var o=ci(e),s={$type:e,$instanceOf:function(e){return e===this.$type},get:function(e){return this[e]},set:function(e,t){!function(e,t,n){let o=e;f(t,(function(e,a){if("number"!=typeof e&&"string"!=typeof e)throw new Error("illegal key type: "+typeof e+". Key should be of type number or string.");if("constructor"===e)throw new Error("illegal key: constructor");if("__proto__"===e)throw new Error("illegal key: __proto__");let s=t[a+1],l=o[e];r(s)&&null==l&&(l=o[e]=isNaN(+s)?{}:[]),i(s)?i(n)?delete o[e]:o[e]=n:o=l}))}(this,[e],t)}},l={name:e,isGeneric:!0,ns:{prefix:o.prefix,localName:o.localName,uri:t}};return this.properties.defineDescriptor(s,l),this.properties.defineModel(s,this),this.properties.define(s,"get",{enumerable:!1,writable:!0}),this.properties.define(s,"set",{enumerable:!1,writable:!0}),this.properties.define(s,"$parent",{enumerable:!1,writable:!0}),this.properties.define(s,"$instanceOf",{enumerable:!1,writable:!0}),f(n,(function(e,t){a(e)&&void 0!==e.value?s[e.name]=e.value:s[t]=e})),s},gi.prototype.getPackage=function(e){return this.registry.getPackage(e)},gi.prototype.getPackages=function(){return this.registry.getPackages()},gi.prototype.getElementDescriptor=function(e){return e.$descriptor},gi.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},gi.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},gi.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var vi=String.fromCharCode,xi=Object.prototype.hasOwnProperty,bi=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,wi={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function Ei(e,t,n,i){return i?xi.call(wi,i)?wi[i]:"&"+i+";":vi(t||parseInt(n,16))}function _i(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(bi,Ei):e}Object.keys(wi).forEach((function(e){wi[e.toUpperCase()]=wi[e]}));var Ai="non-whitespace outside of root node";function ki(e){return new Error(e)}function Ri(e){return"missing namespace for prefix <"+e+">"}function Si(e){return{get:e,enumerable:!0}}function Ci(e){var t,n={};for(t in e)n[t]=e[t];return n}function Mi(e){return e+"$uri"}function Pi(){return{line:0,column:0}}function Ni(e){throw e}function Ti(e){if(!this)return new Ti(e);var t,n,i,r,o,a,s,l,p,c=e&&e.proxy,u=Ni,h=Pi,f=!1,m=!1,d=null,y=!1;function g(e){e instanceof Error||(e=ki(e)),d=e,u(e,h)}function v(e){o&&(e instanceof Error||(e=ki(e)),o(e,h))}this.on=function(e,p){if("function"!=typeof p)throw ki("required args <name, cb>");switch(e){case"openTag":n=p;break;case"text":t=p;break;case"closeTag":i=p;break;case"error":u=p;break;case"warn":o=p;break;case"cdata":r=p;break;case"attention":l=p;break;case"question":s=p;break;case"comment":a=p;break;default:throw ki("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw ki("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return m=!0,p=n,this},this.parse=function(e){if("string"!=typeof e)throw ki("required args <xml=string>");return d=null,function(e){var o,u,d,x,b,w,E,_,A,k,R,S=m?[]:null,C=m?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[Mi(n)]=t;return i}(p):null,M=[],P=0,N=!1,T=!1,D=0,B=0,O="",L=0;function I(){if(null!==R)return R;var e,t,n,i,r,o,a,s,l,c,u,h=m&&C.xmlns,d=m&&f?[]:null,y=L,g=O,x=g.length,b={},w={};e:for(;y<x;y++)if(l=!1,!(32===(c=g.charCodeAt(y))||c<14&&c>8)){for((c<65||c>122||c>90&&c<97)&&95!==c&&58!==c&&(v("illegal first char attribute name"),l=!0),u=y+1;u<x;u++)if(!((c=g.charCodeAt(u))>96&&c<123||c>64&&c<91||c>47&&c<59||46===c||45===c||95===c)){if(32===c||c<14&&c>8){v("missing attribute value"),y=u;continue e}if(61===c)break;v("illegal attribute name char"),l=!0}if("xmlns:xmlns"===(s=g.substring(y,u))&&(v("illegal declaration of xmlns"),l=!0),34===(c=g.charCodeAt(u+1)))-1===(u=g.indexOf('"',y=u+2))&&-1!==(u=g.indexOf("'",y))&&(v("attribute value quote missmatch"),l=!0);else if(39===c)-1===(u=g.indexOf("'",y=u+2))&&-1!==(u=g.indexOf('"',y))&&(v("attribute value quote missmatch"),l=!0);else for(v("missing attribute value quotes"),l=!0,u+=1;u<x&&!(32===(c=g.charCodeAt(u+1))||c<14&&c>8);u++);for(-1===u&&(v("missing closing quotes"),u=x,l=!0),l||(o=g.substring(y,u)),y=u;u+1<x&&!(32===(c=g.charCodeAt(u+1))||c<14&&c>8);u++)y===u&&(v("illegal character after attribute end"),l=!0);if(y=u+1,!l)if(s in w)v("attribute <"+s+"> already defined");else if(w[s]=!0,m)if(f){if(null!==(r="xmlns"===s?"xmlns":120===s.charCodeAt(0)&&"xmlns:"===s.substr(0,6)?s.substr(6):null)){if(e=_i(o),t=Mi(r),!(a=p[e])){if("xmlns"===r||t in C&&C[t]!==e)do{a="ns"+P++}while(void 0!==C[a]);else a=r;p[e]=a}C[r]!==a&&(i||(C=Ci(C),i=!0),C[r]=a,"xmlns"===r&&(C[Mi(a)]=e,h=a),C[t]=e),b[s]=o;continue}d.push(s,o)}else-1!==(c=s.indexOf(":"))?(n=C[s.substring(0,c)])?b[s=h===n?s.substr(c+1):n+s.substr(c)]=o:v(Ri(s.substring(0,c))):b[s]=o;else b[s]=o}if(f)for(y=0,x=d.length;y<x;y++){if(s=d[y++],o=d[y],-1!==(c=s.indexOf(":"))){if(!(n=C[s.substring(0,c)])){v(Ri(s.substring(0,c)));continue}s=h===n?s.substr(c+1):n+s.substr(c)}b[s]=o}return R=b}function F(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,o=0,a=0,s=B;D>=a&&(t=i.exec(e))&&!((s=t[0].length+t.index)>D);)r+=1,a=s;return-1==D?(o=s,n=e.substring(B)):0===B?n=e.substring(B,D):(o=D-a,n=-1==B?e.substring(D):e.substring(D,B+1)),{data:n,line:r,column:o}}h=F,c&&(k=Object.create({},{name:Si((function(){return _})),originalName:Si((function(){return A})),attrs:Si(I),ns:Si((function(){return C}))}));for(;-1!==B;){if(-1===(D=60===e.charCodeAt(B)?B:e.indexOf("<",B)))return M.length?g("unexpected end of file"):0===B?g("missing start tag"):void(B<e.length&&e.substring(B).trim()&&v(Ai));if(B!==D)if(M.length){if(t&&(t(e.substring(B,D),_i,h),y))return}else if(e.substring(B,D).trim()&&(v(Ai),y))return;if(33===(b=e.charCodeAt(D+1))){if(91===(x=e.charCodeAt(D+2))&&"CDATA["===e.substr(D+3,6)){if(-1===(B=e.indexOf("]]>",D)))return g("unclosed cdata");if(r&&(r(e.substring(D+9,B),h),y))return;B+=3;continue}if(45===x&&45===e.charCodeAt(D+3)){if(-1===(B=e.indexOf("--\x3e",D)))return g("unclosed comment");if(a&&(a(e.substring(D+4,B),_i,h),y))return;B+=3;continue}}if(63!==b){for(u=D+1;;u++){if(w=e.charCodeAt(u),isNaN(w))return B=-1,g("unclosed tag");if(34===w)u=-1!==(x=e.indexOf('"',u+1))?x:u;else if(39===w)u=-1!==(x=e.indexOf("'",u+1))?x:u;else if(62===w){B=u;break}}if(33!==b){if(R={},47===b){if(N=!1,T=!0,!M.length)return g("missing open tag");if(u=_=M.pop(),x=D+2+u.length,e.substring(D+2,x)!==u)return g("closing tag mismatch");for(;x<B;x++)if(!(32===(b=e.charCodeAt(x))||b>8&&b<14))return g("close tag")}else{if(47===e.charCodeAt(B-1)?(u=_=e.substring(D+1,B-1),N=!0,T=!0):(u=_=e.substring(D+1,B),N=!0,T=!1),!(b>96&&b<123||b>64&&b<91||95===b||58===b))return g("illegal first char nodeName");for(x=1,d=u.length;x<d;x++)if(!((b=u.charCodeAt(x))>96&&b<123||b>64&&b<91||b>47&&b<59||45===b||95===b||46==b)){if(32===b||b<14&&b>8){_=u.substring(0,x),R=null;break}return g("invalid nodeName")}T||M.push(_)}if(m){if(o=C,N&&(T||S.push(o),null===R&&(f=-1!==u.indexOf("xmlns",x))&&(L=x,O=u,I(),f=!1)),A=_,-1!==(b=_.indexOf(":"))){if(!(E=C[_.substring(0,b)]))return g("missing namespace on <"+A+">");_=_.substr(b+1)}else E=C.xmlns;E&&(_=E+":"+_)}if(N&&(L=x,O=u,n&&(c?n(k,_i,T,h):n(_,I,_i,T,h),y)))return;if(T){if(i&&(i(c?k:_,_i,N,h),y))return;m&&(C=N?o:S.pop())}B+=1}else{if(l&&(l(e.substring(D,B+1),_i,h),y))return;B+=1}}else{if(-1===(B=e.indexOf("?>",D)))return g("unclosed question");if(s&&(s(e.substring(D,B+2),h),y))return;B+=2}}}(e),h=Pi,y=!1,d},this.stop=function(){y=!0}}function Di(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var Bi={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},Oi="property";function Li(e){return e.xml&&e.xml.serialize}function Ii(e,t){return Di(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function Fi(e){return new Error(e)}function ji(e){return e.$descriptor}function Vi(e){E(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw Fi("expected element");var t,n=this.elementsById,i=ji(e).idProperty;if(i&&(t=e.get(i.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw Fi("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function Wi(){}function zi(){}function $i(){}function Gi(e,t){this.property=e,this.context=t}function Hi(e,t){this.element=t,this.propertyDesc=e}function Ki(){}function Ui(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function qi(e,t,n){Ui.call(this,e,t,n)}function Yi(e,t,n){this.model=e,this.context=n}function Xi(e){e instanceof gi&&(e={model:e}),E(this,{lax:!1},e)}Wi.prototype.handleEnd=function(){},Wi.prototype.handleText=function(){},Wi.prototype.handleNode=function(){},zi.prototype=Object.create(Wi.prototype),zi.prototype.handleNode=function(){return this},$i.prototype=Object.create(Wi.prototype),$i.prototype.handleText=function(e){this.body=(this.body||"")+e},Gi.prototype=Object.create($i.prototype),Gi.prototype.handleNode=function(e){if(this.element)throw Fi("expected no sub nodes");return this.element=this.createReference(e),this},Gi.prototype.handleEnd=function(){this.element.id=this.body},Gi.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},Hi.prototype=Object.create($i.prototype),Hi.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=si(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},Ki.prototype=Object.create($i.prototype),Ki.prototype.handleNode=function(e){var t=this,n=this.element;return n?t=this.handleChild(e):(n=this.element=this.createElement(e),this.context.addElement(n)),t},Ui.prototype=Object.create(Ki.prototype),Ui.prototype.addReference=function(e){this.context.addReference(e)},Ui.prototype.handleText=function(e){if(!ji(this.element).bodyProperty)throw Fi("unexpected body text <"+e+">");$i.prototype.handleText.call(this,e)},Ui.prototype.handleEnd=function(){var e=this.body,t=this.element,n=ji(t).bodyProperty;n&&void 0!==e&&(e=si(n.type,e),t.set(n.name,e))},Ui.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=ji(i),o=this.context,a=new i({}),s=this.model;return f(n,(function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?f(e.split(" "),(function(e){o.addReference({element:a,property:i.ns.name,id:e})})):o.addReference({element:a,property:i.ns.name,id:e}):(i?e=si(i.type,e):"xmlns"===n?n=":"+n:(t=ci(n,r.ns.prefix),s.getPackage(t.prefix)&&o.addWarning({message:"unknown attribute <"+n+">",element:a,property:n,value:e})),a.set(n,e))})),a},Ui.prototype.getPropertyForNode=function(e){var t=ci(e.name),n=this.type,i=this.model,r=ji(n),o=t.name,a=r.propertiesByName[o];if(a&&!a.isAttr){const t=function(e){const t=Li(e);return t!==Oi&&(t||null)}(a);if(t){const n=e.attributes[t];if(n){const t=function(e,t,n){const i=ci(e,t.xmlns),r=ci(`${t[i.prefix]||i.prefix}:${i.localName}`);return function(e,t){var n=e.name,i=e.localName,r=t&&t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(r,n.getPackage(r.prefix))}(n,e.ns,i);return E({},a,{effectiveType:ji(i.getType(t)).name})}}return a}var s=i.getPackage(t.prefix);if(s){const e=Ii(t,s),n=i.getType(e);if(a=u(r.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})))return E({},a,{effectiveType:ji(n).name})}else if(a=u(r.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})))return a;throw Fi("unrecognized element <"+t.name+">")},Ui.prototype.toString=function(){return"ElementDescriptor["+ji(this.type).name+"]"},Ui.prototype.valueHandler=function(e,t){return new Hi(e,t)},Ui.prototype.referenceHandler=function(e){return new Gi(e,this.context)},Ui.prototype.handler=function(e){return"Element"===e?new Yi(this.model,e,this.context):new Ui(this.model,e,this.context)},Ui.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,pi(n=t.effectiveType||t.type))return this.valueHandler(t,i);var o=(r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==o&&(t.isMany?i.get(t.name).push(o):i.set(t.name,o),t.isReference?(E(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},qi.prototype=Object.create(Ui.prototype),qi.prototype.createElement=function(e){var t=e.name,n=ci(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),a=o&&Ii(n,o)||t;if(!r.hasType(a))throw Fi("unexpected element <"+e.originalName+">");return Ui.prototype.createElement.call(this,e)},Yi.prototype=Object.create(Ki.prototype),Yi.prototype.createElement=function(e){var t=e.name,n=ci(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},Yi.prototype.handleChild=function(e){var t=new Yi(this.model,"Element",this.context).handleNode(e),n=this.element,i=t.element;return void 0!==i&&((n.$children=n.$children||[]).push(i),i.$parent=n),t},Yi.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},Xi.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof Ui?(i=t,t={}):"string"==typeof t?(i=this.handler(t),t={}):"string"==typeof i&&(i=this.handler(i));var r=this.model,o=this.lax,a=new Vi(E({},t,{rootHandler:i})),s=new Ti({proxy:!0}),l=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function p(e,t,n){var i=t(),r=i.line,o=i.column,s=i.data;"<"===s.charAt(0)&&-1!==s.indexOf(" ")&&(s=s.slice(0,s.indexOf(" "))+">");var l="unparsable content "+(s?s+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return a.addWarning({message:l,error:e}),!0;throw Fi(l)}function c(e,t){return p(e,t,!0)}i.context=a,l.push(i);var u=/^<\?xml /i,h=/ encoding="([^"]+)"/i,f=/^utf-8$/i;function m(e,t){try{l.peek().handleText(e)}catch(e){c(e,t)}}var d=r.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),Object.entries(Bi).reduce((function(e,[t,n]){return e[n]=t,e}),r.config&&r.config.nsMap||{}));return s.ns(d).on("openTag",(function(e,t,n,i){var r=e.attrs||{},a=Object.keys(r).reduce((function(e,n){var i=t(r[n]);return e[n]=i,e}),{});!function(e,t){var n=l.peek();try{l.push(n.handleNode(e))}catch(e){p(e,t,o)&&l.push(new zi)}}({name:e.name,originalName:e.originalName,attributes:a,ns:e.ns},i)})).on("question",(function(e){if(u.test(e)){var t=h.exec(e),n=t&&t[1];n&&!f.test(n)&&a.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}})).on("closeTag",(function(){l.pop().handleEnd()})).on("cdata",m).on("text",(function(e,t,n){!function(e,t){e.trim()&&m(e,t)}(t(e),n)})).on("error",p).on("warn",c),new Promise((function(t,n){var r;try{s.parse(e),function(){var e,t,n=a.elementsById,i=a.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],s=ji(r).propertiesByName[t.property];if(o||a.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),s.isMany){var l=r.get(s.name),p=l.indexOf(t);-1===p&&(p=l.length),o?l[p]=o:l.splice(p,1)}else r.set(s.name,o)}}()}catch(e){r=e}var o=i.element;r||o||(r=Fi("failed to parse document as <"+i.type.$descriptor.name+">"));var l=a.warnings,p=a.references,c=a.elementsById;return r?(r.warnings=l,n(r)):t({rootElement:o,elementsById:c,references:p,warnings:l})}))},Xi.prototype.handler=function(e){return new qi(this.model,e)};var Zi=/<|>|'|"|&|\n\r|\n/g,Ji=/<|>|&/g;function Qi(e){this.prefixMap={},this.uriMap={},this.used={},this.wellknown=[],this.custom=[],this.parent=e,this.defaultPrefixMap=e&&e.defaultPrefixMap||{}}function er(e,t){return Di(t)?(n=e).charAt(0).toLowerCase()+n.slice(1):e;var n}function tr(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function nr(e){return p(e)?e:(e.prefix?e.prefix+":":"")+e.localName}Qi.prototype.mapDefaultPrefixes=function(e){this.defaultPrefixMap=e},Qi.prototype.defaultUriByPrefix=function(e){return this.defaultPrefixMap[e]},Qi.prototype.byUri=function(e){return this.uriMap[e]||this.parent&&this.parent.byUri(e)},Qi.prototype.add=function(e,t){this.uriMap[e.uri]=e,t?this.wellknown.push(e):this.custom.push(e),this.mapPrefix(e.prefix,e.uri)},Qi.prototype.uriByPrefix=function(e){return this.prefixMap[e||"xmlns"]||this.parent&&this.parent.uriByPrefix(e)},Qi.prototype.mapPrefix=function(e,t){this.prefixMap[e||"xmlns"]=t},Qi.prototype.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},Qi.prototype.logUsed=function(e){var t=e.uri,n=this.getNSKey(e);this.used[n]=this.byUri(t),this.parent&&this.parent.logUsed(e)},Qi.prototype.getUsed=function(e){return[].concat(this.wellknown,this.custom).filter((e=>{var t=this.getNSKey(e);return this.used[t]}))};var ir={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},rr={"<":"lt",">":"gt","&":"amp"};function or(e,t,n){return(e=p(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function ar(e){this.tagName=e}function sr(){}function lr(e){this.tagName=e}function pr(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function cr(e,t,n){pr.call(this,e,t),this.serialization=n}function ur(){this.value="",this.write=function(e){this.value+=e}}function hr(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function fr(e){return e=E({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new ur,r=new hr(i,e.format);e.preamble&&r.append('<?xml version="1.0" encoding="UTF-8"?>\n');var o=new pr,a=t.$model;if(o.getNamespaces().mapDefaultPrefixes(function(e){const t=e.config&&e.config.nsMap||{},n={};for(const e in Bi)n[e]=Bi[e];for(const e in t){n[t[e]]=e}for(const t of e.getPackages())n[t.prefix]=t.uri;return n}(a)),o.build(t).serializeTo(r),!n)return i.value}}}function mr(e,t){gi.call(this,e,t)}ar.prototype.build=function(e){return this.element=e,this},ar.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},sr.prototype.serializeValue=sr.prototype.serializeTo=function(e){e.append(this.escape?or(this.value,Ji,rr):this.value)},sr.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(Ji)&&(this.escape=!0),this},tr(lr,sr),lr.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},pr.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,o=i.isGeneric;return t=o?this.parseGenericNsAttributes(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),o?this.parseGenericContainments(e):(n=function(e){return h(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!c(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)}))}(e),this.parseAttributes(h(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return h(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},pr.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?E({localName:t.ns.localName},e):E({localName:er(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},pr.prototype.nsPropertyTagName=function(e){return function(e,t){return E({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},pr.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},pr.prototype.nsAttributeName=function(e){var t;if(t=p(e)?ci(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:E({localName:t.localName},n)},pr.prototype.parseGenericNsAttributes=function(e){return Object.entries(e).filter((([t,n])=>!t.startsWith("$")&&this.parseNsAttribute(e,t,n))).map((([e,t])=>({name:e,value:t})))},pr.prototype.parseGenericContainments=function(e){var t=e.$body;t&&this.body.push((new sr).build({type:"String"},t));var n=e.$children;n&&f(n,(e=>{this.body.push(new pr(this).build(e))}))},pr.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=ci(t);if("xmlns"===o.prefix&&(i={prefix:o.localName,uri:n}),o.prefix||"xmlns"!==o.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var a=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(a)}},pr.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,i=[];return f(n,(function(n,r){var o=t.parseNsAttribute(e,r,n);o&&i.push(o)})),i},pr.prototype.parseGenericAttributes=function(e,t){var n=this;f(t,(function(t){try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){"undefined"!=typeof console&&console.warn(`missing namespace information for <${t.name}=${t.value}> on`,e,n)}}))},pr.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;f(e,(function(e){var r=i.get(e.name),o=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new sr).build(e,r[0]));else if(pi(e.type))f(r,(function(i){n.push(new lr(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(o)f(r,(function(i){n.push(new ar(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var a=Li(e);f(r,(function(i){var r;r=a?a===Oi?new pr(t,e):new cr(t,e,a):new pr(t),n.push(r.build(i))}))}}))},pr.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new Qi(t):n=t),n},pr.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,o=e.prefix;return i.byUri(r)&&!n||i.add(e,t),i.mapPrefix(o,r),e},pr.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.getNamespaces(t),a=e.prefix,s=e.uri;if(!a&&!s)return{localName:e.localName};if(r=o.defaultUriByPrefix(a),!(s=s||r||o.uriByPrefix(a)))throw new Error("no namespace uri given for prefix <"+a+">");if((e=o.byUri(s))||a||(e=this.logNamespace({uri:s},r===s,!0)),!e){for(n=a,i=1;o.uriByPrefix(n);)n=a+"_"+i++;e=this.logNamespace({prefix:n,uri:s},r===s)}return a&&o.mapPrefix(a,s),e},pr.prototype.parseAttributes=function(e){var t=this,n=this.element;f(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];f(i,(function(e){r.push(e.id)})),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},pr.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),nr(e)},pr.prototype.addAttribute=function(e,t){var n=this.attrs;p(t)&&(t=or(t,Zi,ir));var i=function(e,t){const n=v(t);let i=o(e)?-1:void 0;return f(e,(function(e,t){if(n(e,t))return i=t,!1})),i}(n,(function(t){return t.name.localName===e.localName&&t.name.uri===e.uri&&t.name.prefix===e.prefix})),r={name:e,value:t};-1!==i?n.splice(i,1,r):n.push(r)},pr.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=function(e){return e.getUsed().filter((function(e){return"xml"!==e.prefix})).map((function(e){return{name:"xmlns"+(e.prefix?":"+e.prefix:""),value:e.uri}}))}(n).concat(t)),f(t,(function(t){e.append(" ").append(nr(t.name)).append('="').append(t.value).append('"')}))},pr.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==sr;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),f(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},tr(cr,pr),cr.prototype.parseNsAttributes=function(e){var t=pr.prototype.parseNsAttributes.call(this,e).filter((e=>e.name!==this.serialization)),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),o=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(this.serialization),(i.prefix?i.prefix+":":"")+o+n.ns.localName),t},cr.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},mr.prototype=Object.create(gi.prototype),mr.prototype.fromXML=function(e,t,n){p(t)||(n=t,t="bpmn:Definitions");var i=new Xi(E({model:this,lax:!0},n)),r=i.handler(t);return i.fromXML(e,r)},mr.prototype.toXML=function(e,t){var n=new fr(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(e){return i(e)}}))};const dr={bpmn:{name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",prefix:"bpmn",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],enumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],xml:{tagAlias:"lowerCase",typePrefix:"t"}},bpmndi:{name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",prefix:"bpmndi",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],enumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[]},dc:{name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",prefix:"dc",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],associations:[]},di:{name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",prefix:"di",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],associations:[],xml:{tagAlias:"lowerCase"}},bioc:{name:"bpmn.io colors for BPMN",uri:"http://bpmn.io/schema/bpmn/biocolor/1.0",prefix:"bioc",types:[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]},color:{name:"BPMN in Color",uri:"http://www.omg.org/spec/BPMN/non-normative/color/1.0",prefix:"color",types:[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]}};function yr(e,t){return new mr(E({},dr,e),t)}function gr(e,t){return e.$instanceOf(t)}function vr(e){var t={},n=[],i={};function r(e,t){return function(n){e(n,t)}}function o(e){t[e.id]=e}function a(t,n){try{var r=i[t.id]&&function(t,n){if(t.gfx)throw new Error(`already rendered ${gt(t)}`);return e.element(t,i[t.id],n)}(t,n);return o(t),r}catch(e){s(e.message,{element:t,error:e}),console.error(`failed to import ${gt(t)}`,e)}}function s(t,n){e.error(t,n)}var l=this.registerDi=function(e){var t,n=e.bpmnElement;n?i[n.id]?s(`multiple DI elements defined for ${gt(n)}`,{element:n}):(i[n.id]=e,c(t=n,"di")||Object.defineProperty(t,"di",{enumerable:!1,get:function(){throw new Error("Tried to access di from the businessObject. The di is available through the diagram element only. For more information, see https://github.com/bpmn-io/bpmn-js/issues/1472")}})):s(`no bpmnElement referenced in ${gt(e)}`,{element:e})};function p(e){var t;t=e.plane,l(t),f(t.planeElement,m)}function m(e){l(e)}this.handleDefinitions=function(o,a){var c=o.diagrams;if(a&&-1===c.indexOf(a))throw new Error("diagram not part of <bpmn:Definitions />");if(!a&&c&&c.length&&(a=c[0]),!a)throw new Error("no diagram to display");i={},p(a);var m=a.plane;if(!m)throw new Error(`no plane for ${gt(a)}`);var v=m.bpmnElement;if(!v){if(v=function(e){return u(e.rootElements,(function(e){return gr(e,"bpmn:Process")||gr(e,"bpmn:Collaboration")}))}(o),!v)throw new Error("no process or collaboration to display");s(`correcting missing bpmnElement on ${gt(m)} to ${gt(v)}`),m.bpmnElement=v,l(m)}var x,b,w=function(t,n){return e.root(t,i[t.id],n)}(v,m);if(gr(v,"bpmn:Process")||gr(v,"bpmn:SubProcess"))y(v,w);else{if(!gr(v,"bpmn:Collaboration"))throw new Error(`unsupported bpmnElement for ${gt(m)}: ${gt(v)}`);b=w,f((x=v).participants,r(P,b)),E(x.artifacts,b),n.push((function(){!function(e,t){f(e,r(g,t))}(x.messageFlows,b)})),function(e,n){var i=h(e,(function(e){return!t[e.id]&&gr(e,"bpmn:Process")&&e.laneSets}));i.forEach(r(y,n))}(o.rootElements,w)}d(n)};var d=this.handleDeferred=function(){for(;n.length;)n.shift()()};function y(e,t){M(e,t),_(e.ioSpecification,t),E(e.artifacts,t),o(e)}function g(e,t){a(e,t)}function v(e,t){a(e,t)}function x(e,t){a(e,t)}function b(e,t){a(e,t)}function w(e,t){a(e,t)}function E(e,t){f(e,(function(e){gr(e,"bpmn:Association")?n.push((function(){w(e,t)})):w(e,t)}))}function _(e,t){e&&(f(e.dataInputs,r(x,t)),f(e.dataOutputs,r(b,t)))}var A=this.handleSubProcess=function(e,t){M(e,t),E(e.artifacts,t)};function k(e,t){var i=a(e,t);gr(e,"bpmn:SubProcess")&&A(e,i||t),gr(e,"bpmn:Activity")&&_(e.ioSpecification,t),n.push((function(){f(e.dataInputAssociations,r(v,t)),f(e.dataOutputAssociations,r(v,t))}))}function R(e,t){a(e,t)}function S(e,t){n.push((function(){var n=a(e,t);e.childLaneSet&&C(e.childLaneSet,n||t),function(e){f(e.flowNodeRef,(function(t){var n=t.get("lanes");n&&n.push(e)}))}(e)}))}function C(e,t){f(e.lanes,r(S,t))}function M(e,t){!function(e,t){f(e,(function(e){gr(e,"bpmn:SequenceFlow")?n.push((function(){!function(e,t){a(e,t)}(e,t)})):gr(e,"bpmn:BoundaryEvent")?n.unshift((function(){k(e,t)})):gr(e,"bpmn:FlowNode")?k(e,t):gr(e,"bpmn:DataObject")||(gr(e,"bpmn:DataStoreReference")||gr(e,"bpmn:DataObjectReference")?R(e,t):s(`unrecognized flowElement ${gt(e)} in context ${gt(t&&t.businessObject)}`,{element:e,context:t}))}))}(e.flowElements,t),e.laneSets&&function(e,t){f(e,r(C,t))}(e.laneSets,t)}function P(e,t){var n=a(e,t),i=e.processRef;i&&y(i,n||t)}}function xr(e,t,n){var i,r,o,a=[];function s(e,t){var n=new vr({root:function(e,t){return i.add(e,t)},element:function(e,t,n){return i.add(e,t,n)},error:function(e,t){a.push({message:e,context:t})}});t=t||e.diagrams&&e.diagrams[0];var r=function(e,t){if(!t||!t.plane)return;var n,i=t.plane.bpmnElement,r=i;A(i,"bpmn:Process")||A(i,"bpmn:Collaboration")||(r=function(e){var t=e;for(;t;){if(A(t,"bpmn:Process"))return t;t=t.$parent}} 22 function(e){const t=Ge('<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+Er+"</a>");ke(He("svg",t),_r),ke(t,Ar,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(t),Ie.bind(t,"click",(function(e){Mr(),e.preventDefault()}))}(this._container)}function Nr(e,t){return e.warnings=t,e}e(Pr,ni),Pr.prototype.importXML=async function(e,t){const n=this;let i=[];try{let o;e=this._emit("import.parse.start",{xml:e})||e;try{o=await this._moddle.fromXML(e,"bpmn:Definitions")}catch(e){throw this._emit("import.parse.complete",{error:e}),e}let a=o.rootElement;const s=o.references,l=o.warnings,p=o.elementsById;i=i.concat(l),a=this._emit("import.parse.complete",(r={error:null,definitions:a,elementsById:p,references:s,warnings:i},n.get("eventBus").createEvent(r)))||a;const c=await this.importDefinitions(a,t);return i=i.concat(c.warnings),this._emit("import.done",{error:null,warnings:i}),{warnings:i}}catch(e){let t=e;throw i=i.concat(t.warnings||[]),Nr(t,i),t=function(e){const t=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);t&&(e.message="unparsable content <"+t[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+t[2]);return e}(t),this._emit("import.done",{error:t,warnings:t.warnings}),t}var r},Pr.prototype.importDefinitions=async function(e,t){this._setDefinitions(e);return{warnings:(await this.open(t)).warnings}},Pr.prototype.open=async function(e){const t=this._definitions;let n=e;if(!t){const e=new Error("no XML imported");throw Nr(e,[]),e}if("string"==typeof e&&(n=function(e,t){if(!t)return null;return u(e.diagrams,(function(e){return e.id===t}))||null}(t,e),!n)){const t=new Error("BPMNDiagram <"+e+"> not found");throw Nr(t,[]),t}try{this.clear()}catch(e){throw Nr(e,[]),e}const{warnings:i}=await xr(this,t,n);return{warnings:i}},Pr.prototype.saveXML=async function(e){e=e||{};let t,n,i=this._definitions;try{if(!i)throw new Error("no definitions loaded");i=this._emit("saveXML.start",{definitions:i})||i;n=(await this._moddle.toXML(i,e)).xml,n=this._emit("saveXML.serialized",{xml:n})||n}catch(e){t=e}const r=t?{error:t}:{xml:n};if(this._emit("saveXML.done",r),t)throw t;return r},Pr.prototype.saveSVG=async function(){let e,t;this._emit("saveSVG.start");try{const t=this.get("canvas"),n=t.getActiveLayer(),i=He(":scope > defs",t._svg),r=Q(n),o=i?"<defs>"+Q(i)+"</defs>":"",a=n.getBBox();e='<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- created with bpmn-js / http://bpmn.io --\x3e\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a.width+'" height="'+a.height+'" viewBox="'+a.x+" "+a.y+" "+a.width+" "+a.height+'" version="1.1">'+o+r+"</svg>"}catch(e){t=e}if(this._emit("saveSVG.done",{error:t,svg:e}),t)throw t;return{svg:e}},Pr.prototype._setDefinitions=function(e){this._definitions=e},Pr.prototype.getModules=function(){return this._modules},Pr.prototype.clear=function(){this.getDefinitions()&&ni.prototype.clear.call(this)},Pr.prototype.destroy=function(){ni.prototype.destroy.call(this),Ke(this._container)},Pr.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},Pr.prototype.off=function(e,t){this.get("eventBus").off(e,t)},Pr.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=He(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},Pr.prototype.getDefinitions=function(){return this._definitions},Pr.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},Pr.prototype._init=function(e,t,n){const i=n.modules||this.getModules(n),r=n.additionalModules||[],o=[].concat([{bpmnjs:["value",this],moddle:["value",t]}],i,r),a=E(function(e,t){let n={};return f(Object(e),(function(e,i){-1===t.indexOf(i)&&(n[i]=e)})),n}(n,["additionalModules"]),{canvas:E({},n.canvas,{container:e}),modules:o});ni.call(this,a),n&&n.container&&this.attachTo(n.container)},Pr.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},Pr.prototype._createContainer=function(e){const t=Ge('<div class="bjs-container"></div>');return ke(t,{width:Dr(e.width),height:Dr(e.height),position:e.position}),t},Pr.prototype._createModdle=function(e){return new yr(E({},this._moddleExtensions,e.moddleExtensions))},Pr.prototype._modules=[];const Tr={width:"100%",height:"100%",position:"relative"};function Dr(e){return e+(s(e)?"px":"")}function Br(e){Pr.call(this,e)}e(Br,Pr),Br.prototype._modules=[Et,Zt,Tt,fn,ht],Br.prototype._moddleExtensions={};var Or=["c","C"],Lr=["v","V"],Ir=["y","Y"],Fr=["z","Z"];function jr(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function Vr(e,t){return-1!==(e=o(e)?e:[e]).indexOf(t.key)||-1!==e.indexOf(t.code)}function Wr(e){return e.shiftKey}var zr="keyboard.keydown",$r="Keyboard binding is now implicit; explicit binding to an element got removed. For more information, see https://github.com/bpmn-io/diagram-js/issues/661";function Gr(e,t){var n=this;this._config=e=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()})),e.bindTo&&console.error("unsupported configuration <keyboard.bindTo>",new Error($r));var i=e&&!1!==e.bind;t.on("canvas.init",(function(e){n._target=e.svg,i&&n.bind(),n._fire("init")}))}Gr.$inject=["config.keyboard","eventBus"],Gr.prototype._keydownHandler=function(e){this._keyHandler(e,zr)},Gr.prototype._keyupHandler=function(e){this._keyHandler(e,"keyboard.keyup")},Gr.prototype._keyHandler=function(e,t){if(!this._isEventIgnored(e)){var n={keyEvent:e};this._eventBus.fire(t||zr,n)&&e.preventDefault()}},Gr.prototype._isEventIgnored=function(e){return!1},Gr.prototype.bind=function(e){e&&console.error("unsupported argument <node>",new Error($r)),this.unbind(),e=this._node=this._target,Ie.bind(e,"keydown",this._keydownHandler),Ie.bind(e,"keyup",this._keyupHandler),this._fire("bind")},Gr.prototype.getBinding=function(){return this._node},Gr.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),Ie.unbind(e,"keydown",this._keydownHandler),Ie.unbind(e,"keyup",this._keyupHandler)),this._node=null},Gr.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})},Gr.prototype.addListener=function(e,t,n){l(e)&&(n=t,t=e,e=1e3),this._eventBus.on(n||zr,e,t)},Gr.prototype.removeListener=function(e,t){this._eventBus.off(t||zr,e)},Gr.prototype.hasModifier=function(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey},Gr.prototype.isCmd=jr,Gr.prototype.isShift=Wr,Gr.prototype.isKey=Vr;function Hr(e,t){var n=this;e.on("editorActions.init",500,(function(e){var i=e.editorActions;n.registerBindings(t,i)}))}Hr.$inject=["eventBus","keyboard"],Hr.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}n("undo",(function(e){if(function(e){return jr(e)&&!Wr(e)&&Vr(Fr,e)}(e.keyEvent))return t.trigger("undo"),!0})),n("redo",(function(e){if(function(e){return jr(e)&&(Vr(Ir,e)||Vr(Fr,e)&&Wr(e))}(e.keyEvent))return t.trigger("redo"),!0})),n("copy",(function(e){if(function(e){return jr(e)&&Vr(Or,e)}(e.keyEvent))return t.trigger("copy"),!0})),n("paste",(function(e){if(function(e){return jr(e)&&Vr(Lr,e)}(e.keyEvent))return t.trigger("paste"),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(Vr(["+","Add","="],n)&&jr(n))return t.trigger("stepZoom",{value:1}),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(Vr(["-","Subtract"],n)&&jr(n))return t.trigger("stepZoom",{value:-1}),!0})),n("zoom",(function(e){var n=e.keyEvent;if(Vr("0",n)&&jr(n))return t.trigger("zoom",{value:1}),!0})),n("removeSelection",(function(e){if(Vr(["Backspace","Delete","Del"],e.keyEvent))return t.trigger("removeSelection"),!0}))};var Kr={__init__:["keyboard","keyboardBindings"],keyboard:["type",Gr],keyboardBindings:["type",Hr]},Ur={moveSpeed:50,moveSpeedAccelerated:200};function qr(e,t,n){var i=this;this._config=E({},Ur,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})}}qr.$inject=["config.keyboardMove","keyboard","canvas"];var Yr={__depends__:[Kr],__init__:["keyboardMove"],keyboardMove:["type",qr]},Xr=/^djs-cursor-.*$/;function Zr(e){var t=Ce(document.body);t.removeMatching(Xr),e&&t.add("djs-cursor-"+e)}function Jr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Qr(e,t){var n;function i(e){return a(e.originalEvent)}function r(i){var r,o=n.start,a=n.button,s=Qt(i),l=Jr(s,o);(!n.dragging&&(r=l,Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2))>15)&&(n.dragging=!0,0===a&&function(e,t){function n(){return!1}t=t||"element.click",e.once(t,5e3,n)}(e),Zr("grab")),n.dragging)&&(l=Jr(s,n.last||n.start),t.scroll({dx:l.x,dy:l.y}),n.last=s);i.preventDefault()}function o(e){Ie.unbind(document,"mousemove",r),Ie.unbind(document,"mouseup",o),n=null,Zr(null)}function a(e){if(!Ne(e.target,".djs-draggable")){var t=e.button;if(!(t>=2||e.ctrlKey||e.shiftKey||e.altKey))return n={button:t,start:Qt(e)},Ie.bind(document,"mousemove",r),Ie.bind(document,"mouseup",o),!0}}e.on("canvas.focus.changed",(function(t){t.focused?e.on("element.mousedown",500,i):e.off("element.mousedown",i)})),this.isActive=function(){return!!n}}Qr.$inject=["eventBus","canvas"];var eo={__init__:["moveCanvas"],moveCanvas:["type",Qr]};function to(e){return Math.log(e)/Math.log(10)}function no(e,t){var n=to(e.min),i=to(e.max);return(Math.abs(n)+Math.abs(i))/t}var io=Math.sign||function(e){return e>=0?1:-1},ro={min:.2,max:4};function oo(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=w(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||.75;var i=this;t.on("canvas.focus.changed",(function(t){i._init(t.focused&&!1!==e.enabled)}))}oo.$inject=["config.zoomScroll","eventBus","canvas"],oo.prototype.scroll=function(e){this._canvas.scroll(e)},oo.prototype.reset=function(){this._canvas.zoom("fit-viewport")},oo.prototype.zoom=function(e,t){var n=no(ro,20);this._totalDelta+=e,Math.abs(this._totalDelta)>.1&&(this._zoom(e,t,n),this._totalDelta=0)},oo.prototype._handleWheel=function(e){if(this._canvas.isFocused()){var t=this._container;e.preventDefault();var n,i=e.ctrlKey||/mac/i.test(navigator.platform)&&e.metaKey,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))*io(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)}},oo.prototype.stepZoom=function(e,t){var n=no(ro,10);this._zoom(e,t,n)},oo.prototype._zoom=function(e,t,n){var i=this._canvas,r=e>0?1:-1,o=to(i.zoom()),a=Math.round(o/n)*n;a+=n*r;var s,l,p=Math.pow(10,a);i.zoom((s=ro,l=p,Math.max(s.min,Math.min(s.max,l))),t)},oo.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,i=this._enabled;return void 0===e&&(e=!i),i!==e&&Ie[e?"bind":"unbind"](t,"wheel",n,!1),this._enabled=e,e},oo.prototype._init=function(e){this.toggle(e)};var ao={__init__:["zoomScroll"],zoomScroll:["type",oo]};function so(e){Br.call(this,e)}return e(so,Br),so.prototype._navigationModules=[Yr,eo,ao],so.prototype._modules=[].concat(Br.prototype._modules,so.prototype._navigationModules),so}));
|
H A D | bpmn-viewer.production.min.js | 2 !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).BpmnJS=t()}(this,(function(){"use strict";function e(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}const t=Object.prototype.toString,n=Object.prototype.hasOwnProperty;function i(e){return void 0===e}function r(e){return void 0!==e}function o(e){return"[object Array]"===t.call(e)}function a(e){return"[object Object]"===t.call(e)}function s(e){return"[object Number]"===t.call(e)}function l(e){const n=t.call(e);return"[object Function]"===n||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n}function p(e){return"[object String]"===t.call(e)}function c(e,t){return n.call(e,t)}function u(e,t){const n=v(t);let i;return f(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function h(e,t){const n=v(t);let i=[];return f(e,(function(e,t){n(e,t)&&i.push(e)})),i}function f(e,t){let n,r;if(i(e))return;const a=o(e)?w:x;for(let i in e)if(c(e,i)&&(n=e[i],r=t(n,a(i)),!1===r))return n}function m(e,t,n){return f(e,(function(e,i){n=t(n,e,i)})),n}function d(e,t){return!!m(e,(function(e,n,i){return e&&t(n,i)}),!0)}function y(e,t){return!!u(e,t)}function g(e){return function(t){return d(e,(function(e,n){return t[n]===e}))}}function v(e){return l(e)?e:t=>t===e}function x(e){return e}function w(e){return Number(e)}function b(e,t){return e.bind(t)}function E(e,...t){return Object.assign(e,...t)}function _(e,t){var n=this;t=t||1e3,e.on(["render.shape","render.connection"],t,(function(e,t){var i=e.type,r=t.element,o=t.gfx,a=t.attrs;if(n.canRender(r))return"render.shape"===i?n.drawShape(o,r,a):n.drawConnection(o,r,a)})),e.on(["render.getShapePath","render.getConnectionPath"],t,(function(e,t){if(n.canRender(t))return"render.getShapePath"===e.type?n.getShapePath(t):n.getConnectionPath(t)}))}function A(e,t){var n=R(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function R(e){return e&&e.businessObject||e}function k(e){return e&&e.di}function S(e,t){return!A(e,"bpmn:CallActivity")&&(A(e,"bpmn:SubProcess")?!(!(t=t||k(e))||!A(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded:!A(e,"bpmn:Participant")||!!R(e).processRef)}function C(e){if(A(e,"bpmn:Participant")||A(e,"bpmn:Lane")){var t=k(e).isHorizontal;return void 0===t||t}}_.prototype.canRender=function(e){},_.prototype.drawShape=function(e,t){},_.prototype.drawConnection=function(e,t){},_.prototype.getShapePath=function(e){},_.prototype.getConnectionPath=function(e){};var M={width:90,height:20};function P(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)],r=function(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)];return{x:n.x+(i.x-n.x)/2,y:n.y+(i.y-n.y)/2}}(e),o=Math.atan((i.y-n.y)/(i.x-n.x)),a=r.x,s=r.y;return Math.abs(o)<Math.PI/2?s-=15:a+=15,{x:a,y:s}}function N(e,t){var n,i,r,o=e.label;return o&&o.bounds?(r=o.bounds,i={width:Math.max(M.width,r.width),height:r.height},n={x:r.x+r.width/2,y:r.y+r.height/2}):(n=function(e){return e.waypoints?P(e.waypoints):A(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+M.height/2}:{x:e.x+e.width/2,y:e.y+e.height+M.height/2}}(t),i=M),E({x:n.x-i.width/2,y:n.y-i.height/2},i)}function T(e){var t=e.businessObject,n=function(e){return A(e,"bpmn:FlowElement")||A(e,"bpmn:Participant")||A(e,"bpmn:Lane")||A(e,"bpmn:SequenceFlow")||A(e,"bpmn:MessageFlow")||A(e,"bpmn:DataInput")||A(e,"bpmn:DataOutput")?"name":A(e,"bpmn:TextAnnotation")?"text":A(e,"bpmn:Group")?"categoryValueRef":void 0}(t);if(n)return"categoryValueRef"===n?function(e){var t=e.categoryValueRef;return t&&t.value||""}(t):t[n]||""}function D(e,t){return function(e,t){t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}(e,t))}(t,e),e}var B={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":2,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":2,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function O(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=B[i];r?(2===r&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function L(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return B[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);O(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)O(e,i,t[i])}(e,t);return e}const I=Object.prototype.toString;function F(e){return new j(e)}function j(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}j.prototype.add=function(e){return this.list.add(e),this},j.prototype.remove=function(e){return"[object RegExp]"==I.call(e)?this.removeMatching(e):(this.list.remove(e),this)},j.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},j.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},j.prototype.array=function(){return Array.from(this.list)},j.prototype.has=j.prototype.contains=function(e){return this.list.contains(e)};var V="http://www.w3.org/2000/svg",W='<svg xmlns="'+V+'"';function $(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(V)&&(e=W+e.substring(4)):(e=W+">"+e+"</svg>",t=!0);var n=function(e){var t;return(t=new DOMParser).async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function z(e,t){var n;return"<"===(e=e.trim()).charAt(0)?(n=$(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(V,e),t&&L(n,t),n}var G=null;function H(){return null===G&&(G=z("svg")),G}function K(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}function U(e){return H().createSVGTransform()}var q=/([&<>]{1})/g,Y=/([\n\r"]{1})/g,X={"&":"&","<":"<",">":">",'"':"'"};function Z(e,t){return e.replace(t,(function(e,t){return X[t]||t}))}function J(e,t){var n,i,r,o,a;switch(e.nodeType){case 3:t.push(Z(e.textContent,q));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n<i;++n)o=r.item(n),t.push(" ",o.name,'="',Z(o.value,Y),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,i=(a=e.childNodes).length;n<i;++n)J(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",Z(e.nodeValue,q),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function Q(e,t){return function(e){for(var t=e.firstChild,n=[];t;)J(t,n),t=t.nextSibling;return n.join("")}(e)}function ee(e){var t=e.parentNode;return t&&t.removeChild(e),e}function te(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function ne(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(te(e,i))}(n,t)),n.consolidate()}function ie(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function re(e){return["L",e.x,e.y]}function oe(e,t){const n=e.length,i=[(r=e[0],["M",r.x,r.y])];var r,o,a,s;for(let r=1;r<n;r++){const n=e[r-1],l=e[r],p=e[r+1];if(!p||!t){i.push(re(l));continue}const c=Math.min(t,se(l.x-n.x,l.y-n.y),se(p.x-l.x,p.y-l.y));if(!c){i.push(re(l));continue}const u=ae(l,n,c),h=ae(l,n,.5*c),f=ae(l,p,c),m=ae(l,p,.5*c);i.push(re(u)),i.push((a=m,s=f,["C",(o=h).x,o.y,a.x,a.y,s.x,s.y]))}return i}function ae(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=n/se(i,r);return{x:e.x+i*o,y:e.y+r*o}}function se(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function le(e,t,n){s(t)&&(n=t,t=null),t||(t={});const i=z("path",t);return s(n)&&(i.dataset.cornerRadius=String(n)),pe(i,e)}function pe(e,t){return L(e,{d:ie(oe(t,parseInt(e.dataset.cornerRadius,10)||0))}),e}var ce="hsl(225, 10%, 15%)";function ue(e,t){return y(e.eventDefinitions,(function(e){return e.$type===t}))}function he(e,t,n){var i=k(e);return n||i.get("color:background-color")||i.get("bioc:fill")||t||"white"}function fe(e,t,n){var i=k(e);return n||i.get("color:border-color")||i.get("bioc:stroke")||t||ce}function me(e,t,n,i){var r=k(e).get("label");return i||r&&r.get("color:color")||t||fe(e,n)}function de(e,t={}){return{width:ye(e,t),height:ge(e,t)}}function ye(e,t={}){return c(t,"width")?t.width:e.width}function ge(e,t={}){return c(t,"height")?t.height:e.height}function ve(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const xe=Object.prototype.toString,we=Object.prototype.hasOwnProperty;function be(e,t){return we.call(e,t)}function Ee(e,t){let n,i;if(void 0===e)return;const r=function(e){return"[object Array]"===xe.call(e)}(e)?Ae:_e;for(let o in e)if(be(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function _e(e){return e}function Ae(e){return Number(e)}function Re(e,...t){const n=e.style;return Ee(t,(function(e){e&&Ee(e,(function(e,t){n[t]=e}))})),e}function ke(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}const Se=Object.prototype.toString;function Ce(e){return new Me(e)}function Me(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Pe(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}Me.prototype.add=function(e){return this.list.add(e),this},Me.prototype.remove=function(e){return"[object RegExp]"==Se.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Me.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Me.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Me.prototype.array=function(){return Array.from(this.list)},Me.prototype.has=Me.prototype.contains=function(e){return this.list.contains(e)};var Ne,Te,De,Be={};function Oe(){Ne=window.addEventListener?"addEventListener":"attachEvent",Te=window.removeEventListener?"removeEventListener":"detachEvent",De="addEventListener"!==Ne?"on":""}var Le=ve({__proto__:null,bind:Be.bind=function(e,t,n,i){return Ne||Oe(),e[Ne](De+t,n,i||!1),n},unbind:Be.unbind=function(e,t,n,i){return Te||Oe(),e[Te](De+t,n,i||!1),n},default:Be},[Be]),Ie=["focus","blur"];var Fe,je={bind:function(e,t,n,i,r){return-1!==Ie.indexOf(n)&&(r=!0),Le.bind(e,n,(function(n){var r=n.target||n.srcElement;n.delegateTarget=function(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}(r,t,!0),n.delegateTarget&&i.call(e,n)}),r)},unbind:function(e,t,n,i){return-1!==Ie.indexOf(t)&&(i=!0),Le.unbind(e,t,n,i)}},Ve=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var i=n[1];if("body"==i){return(r=t.createElement("html")).innerHTML=e,r.removeChild(r.lastChild)}var r,o=Object.prototype.hasOwnProperty.call($e,i)?$e[i]:$e._default,a=o[0],s=o[1],l=o[2];(r=t.createElement("div")).innerHTML=s+e+l;for(;a--;)r=r.lastChild;if(r.firstChild==r.lastChild)return r.removeChild(r.firstChild);var p=t.createDocumentFragment();for(;r.firstChild;)p.appendChild(r.removeChild(r.firstChild));return p},We=!1;"undefined"!=typeof document&&((Fe=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',We=!Fe.getElementsByTagName("link").length,Fe=void 0);var $e={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:We?[1,"X<div>","</div>"]:[0,"",""]};$e.td=$e.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],$e.option=$e.optgroup=[1,'<select multiple="multiple">',"</select>"],$e.thead=$e.tbody=$e.colgroup=$e.caption=$e.tfoot=[1,"<table>","</table>"],$e.polyline=$e.ellipse=$e.polygon=$e.circle=$e.text=$e.line=$e.path=$e.rect=$e.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var ze=Ve;function Ge(e,t){return(t=t||document).querySelector(e)}function He(e){e.parentNode&&e.parentNode.removeChild(e)}function Ke(e,t,n,i,r){var o=U();o.setTranslate(t,n);var a=U();a.setRotate(i||0,0,0);var s=U();s.setScale(1,1),ne(e,[o,a,s])}function Ue(e,t,n){var i=U();i.setTranslate(t,n),ne(e,i)}var qe=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var t=e.exports=function(e,n){if(n||(n=16),void 0===e&&(e=128),e<=0)return"0";for(var i=Math.log(Math.pow(2,e))/Math.log(n),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,e/r))/Math.log(n)*r;var o=i-Math.floor(i),a="";for(r=0;r<Math.floor(i);r++){a=Math.floor(Math.random()*n).toString(n)+a}if(o){var s=Math.pow(n,o);a=Math.floor(Math.random()*s).toString(n)+a}var l=parseInt(a,n);return l!==1/0&&l>=Math.pow(2,e)?t(e,n):a};t.rack=function(e,n,i){var r=function(r){var a=0;do{if(a++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var s=t(e,n)}while(Object.hasOwnProperty.call(o,s));return o[s]=r,s},o=r.hats={};return r.get=function(e){return r.hats[e]},r.set=function(e,t){return r.hats[e]=t,r},r.bits=e||128,r.base=n||16,r}}));function Ye(e){if(!(this instanceof Ye))return new Ye(e);e=e||[128,36,1],this._seed=e.length?qe.rack(e[0],e[1],e[2]):e}Ye.prototype.next=function(e){return this._seed(e||!0)},Ye.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},Ye.prototype.claim=function(e,t){this._seed.set(e,t||!0)},Ye.prototype.assigned=function(e){return this._seed.get(e)||!1},Ye.prototype.unclaim=function(e){delete this._seed.hats[e]},Ye.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};var Xe=new Ye,Ze=.95;function Je(e,t,n,i,r,o,s){_.call(this,t,s);var l=e&&e.defaultFillColor,p=e&&e.defaultStrokeColor,c=e&&e.defaultLabelColor;function u(e){return n.computeStyle(e,{strokeLinecap:"round",strokeLinejoin:"round",stroke:ce,strokeWidth:2,fill:"white"})}function h(e){return n.computeStyle(e,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:ce,strokeWidth:2})}function m(e,t){var{ref:n={x:0,y:0},scale:i=1,element:o,parentGfx:a=r._svg}=t,s=z("marker",{id:e,viewBox:"0 0 20 20",refX:n.x,refY:n.y,markerWidth:20*i,markerHeight:20*i,orient:"auto"});D(s,o);var l=Ge(":scope > defs",a);l||D(a,l=z("defs")),D(l,s)}function d(e,t,n,i){var r=Xe.nextPrefixed("marker-");return function(e,t,n,i,r){if("sequenceflow-end"===n){m(t,{element:z("path",{d:"M 1 5 L 11 10 L 1 15 Z",...u({fill:r,stroke:r,strokeWidth:1})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("messageflow-start"===n){m(t,{element:z("circle",{cx:6,cy:6,r:3.5,...u({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:6,y:6},parentGfx:e})}if("messageflow-end"===n){m(t,{element:z("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...u({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:8.5,y:5},parentGfx:e})}if("association-start"===n){m(t,{element:z("path",{d:"M 11 5 L 1 10 L 11 15",...h({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:1,y:10},scale:.5,parentGfx:e})}if("association-end"===n){m(t,{element:z("path",{d:"M 1 5 L 11 10 L 1 15",...h({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("conditional-flow-marker"===n){m(t,{element:z("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...u({fill:i,stroke:r})}),ref:{x:-1,y:10},scale:.5,parentGfx:e})}if("conditional-default-flow-marker"===n){m(t,{element:z("path",{d:"M 6 4 L 10 16",...u({stroke:r,fill:"none"})}),ref:{x:0,y:10},scale:.5,parentGfx:e})}}(e,r,t,n,i),"url(#"+r+")"}function y(e,t,n,i,r={}){a(i)&&(r=i,i=0),i=i||0,r=u(r);var o=z("circle",{cx:t/2,cy:n/2,r:Math.round((t+n)/4-i),...r});return D(e,o),o}function g(e,t,n,i,r,o){a(r)&&(o=r,r=0),r=r||0,o=u(o);var s=z("rect",{x:r,y:r,width:t-2*r,height:n-2*r,rx:i,ry:i,...o});return D(e,s),s}function v(e,t,n,i){var r=le(t,n=h(n),i);return D(e,r),r}function x(e,t,n){return v(e,t,n,5)}function w(e,t,n){n=h(n);var i=z("path",{...n,d:t});return D(e,i),i}function b(e,t,n,i){return w(t,n,E({"data-marker":e},i))}function M(e){return we[e]}function P(e){return function(t,n,i){return M(e)(t,n,i)}}var N=function(e,t,n={},r){return w(e,i.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:r?he(t,l,n.fill):fe(t,p,n.stroke),strokeWidth:1})},B=function(e,t,n={}){var r=y(e,t.width,t.height,.2*t.height,{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:2});w(e,i.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),{stroke:fe(t,p,n.stroke),strokeWidth:2});for(var o=0;o<12;o++){var a=i.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),s=t.width/2,c=t.height/2;w(e,a,{strokeWidth:1,stroke:fe(t,p,n.stroke),transform:"rotate("+30*o+","+c+","+s+")"})}return r},O=function(e,t,n={},r){return w(e,i.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},I=function(e,t,n={}){return w(e,i.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},j=function(e,t,n={},r){return w(e,i.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},V=function(e,t,n={},r){return w(e,i.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},W=function(e,t,n={},r){var o=w(e,i.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{fill:r?fe(t,p,n.stroke):"none",stroke:fe(t,p,n.stroke),strokeWidth:1});return function(e,t){var n=U();n.setRotate(t,0,0),ne(e,n)}(o,45),o},$=function(e,t,n={},r){return w(e,i.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.22,my:.5}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},G=function(e,t,n={},r){return w(e,i.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:r?fe(t,p,n.stroke):he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},H=function(e,t,n={},r){return w(e,i.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),{fill:r?fe(t,p,n.stroke):he(t,l,n.fill),strokeWidth:1})},K=function(e,t,n={}){return w(e,i.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1})},q=function(e,t,n={}){return y(e,t.width,t.height,8,{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:4})};function Y(e,t,n={}){var i=R(e),r=function(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}(i);return i.get("eventDefinitions")&&i.get("eventDefinitions").length>1?i.get("parallelMultiple")?K(t,e,n,r):H(t,e,n,r):ue(i,"bpmn:MessageEventDefinition")?N(t,e,n,r):ue(i,"bpmn:TimerEventDefinition")?B(t,e,n,r):ue(i,"bpmn:ConditionalEventDefinition")?I(t,e,n,r):ue(i,"bpmn:SignalEventDefinition")?G(t,e,n,r):ue(i,"bpmn:EscalationEventDefinition")?O(t,e,n,r):ue(i,"bpmn:LinkEventDefinition")?j(t,e,n,r):ue(i,"bpmn:ErrorEventDefinition")?V(t,e,n,r):ue(i,"bpmn:CancelEventDefinition")?W(t,e,n,r):ue(i,"bpmn:CompensateEventDefinition")?$(t,e,n,r):ue(i,"bpmn:TerminateEventDefinition")?q(t,e,n,r):null}var X={ParticipantMultiplicityMarker:function(e,t,n={}){var r=ye(t,n),o=ge(t,n);b("participant-multiplicity",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2-6)/r,my:(o-15)/o}}),{strokeWidth:2,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},SubProcessMarker:function(e,t,n={}){Ue(g(e,14,14,0,{strokeWidth:1,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)}),t.width/2-7.5,t.height-20),b("sub-process",e,i.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2-7.5)/t.width,my:(t.height-20)/t.height}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},ParallelMarker:function(e,t,n){var r=ye(t,n),o=ge(t,n);b("parallel",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.parallel)/r,my:(o-20)/o}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},SequentialMarker:function(e,t,n){b("sequential",e,i.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.seq)/t.width,my:(t.height-19)/t.height}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},CompensationMarker:function(e,t,n){b("compensation",e,i.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.compensation)/t.width,my:(t.height-13)/t.height}}),{strokeWidth:1,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})},LoopMarker:function(e,t,n){var r=ye(t,n),o=ge(t,n);b("loop",e,i.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.loop)/r,my:(o-7)/o}}),{strokeWidth:1.5,fill:"none",stroke:fe(t,p,n.stroke),strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){var r=ye(t,n),o=ge(t,n);b("adhoc",e,i.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.adhoc)/r,my:(o-15)/o}}),{strokeWidth:1,fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke)})}};function Z(e,t,n,i){X[e](t,n,i)}function J(e,t,n,i={}){i={fill:i.fill,stroke:i.stroke,width:ye(t,i),height:ge(t,i)};var r=R(t),o=n&&n.includes("SubProcessMarker");i=o?{...i,seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{...i,seq:-5,parallel:-6,compensation:-27,loop:0,adhoc:10},f(n,(function(n){Z(n,e,t,i)})),r.get("isForCompensation")&&Z("CompensationMarker",e,t,i),A(r,"bpmn:AdHocSubProcess")&&Z("AdhocMarker",e,t,i);var a=r.get("loopCharacteristics"),s=a&&a.get("isSequential");a&&(void 0===s&&Z("LoopMarker",e,t,i),!1===s&&Z("ParallelMarker",e,t,i),!0===s&&Z("SequentialMarker",e,t,i))}function Q(e,t,n={}){n=E({size:{width:100}},n);var i=o.createText(t||"",n);return F(i).add("djs-label"),D(e,i),i}function ee(e,t,n,i={}){var r=R(t),o=de({x:t.x,y:t.y,width:t.width,height:t.height},i);return Q(e,r.name,{align:n,box:o,padding:7,style:{fill:me(t,c,p,i.stroke)}})}function te(e,t,n,i={}){var r=C(n),o=Q(e,t,{box:{height:30,width:r?ge(n,i):ye(n,i)},align:"center-middle",style:{fill:me(n,c,p,i.stroke)}});r&&Ke(o,0,-(-1*ge(n,i)),270)}function ie(e,t,n={}){var{width:i,height:r}=de(t,n);return g(e,i,r,10,{...n,fill:he(t,l,n.fill),fillOpacity:Ze,stroke:fe(t,p,n.stroke)})}function re(e,t,n={}){var i=R(t),r=he(t,l,n.fill),o=fe(t,p,n.stroke);return"One"!==i.get("associationDirection")&&"Both"!==i.get("associationDirection")||(n.markerEnd=d(e,"association-end",r,o)),"Both"===i.get("associationDirection")&&(n.markerStart=d(e,"association-start",r,o)),n=Qe(n,["markerStart","markerEnd"]),x(e,t.waypoints,{...n,stroke:o,strokeDasharray:"0, 5"})}function oe(e,t,n={}){var r=he(t,l,n.fill),o=fe(t,p,n.stroke),a=w(e,i.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:r,fillOpacity:Ze,stroke:o});(function(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection})(R(t))&&w(e,i.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.33,my:(t.height-18)/t.height}}),{strokeWidth:2,fill:r,stroke:o});return a}function ae(e,t,n={}){return y(e,t.width,t.height,{fillOpacity:Ze,...n,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)})}function se(e,t,n={}){return function(e,t,n,i){var r=t/2,o=n/2,a=[{x:r,y:0},{x:t,y:o},{x:r,y:n},{x:0,y:o}].map((function(e){return e.x+","+e.y})).join(" ");i=u(i);var s=z("polygon",{...i,points:a});return D(e,s),s}(e,t.width,t.height,{fill:he(t,l,n.fill),fillOpacity:Ze,stroke:fe(t,p,n.stroke)})}function pe(e,t,n={}){var i=g(e,ye(t,n),ge(t,n),0,{fill:he(t,l,n.fill),fillOpacity:n.fillOpacity||Ze,stroke:fe(t,p,n.stroke),strokeWidth:1.5}),r=R(t);A(r,"bpmn:Lane")&&te(e,r.get("name"),t,n);return i}function ve(e,t,n={}){var i=ie(e,t,n);(function(e){return e&&!!R(e).triggeredByEvent})(t)&&L(i,{strokeDasharray:"0, 5.5",strokeWidth:2.5});var r=S(t);return ee(e,t,r?"center-top":"center-middle",n),J(e,t,r?void 0:["SubProcessMarker"],n),i}function xe(e,t,n={}){var i=ie(e,t,n);return ee(e,t,"center-middle",n),J(e,t,void 0,n),i}var we=this.handlers={"bpmn:AdHocSubProcess":function(e,t,n={}){return ve(e,t,n=S(t)?Qe(n,["fill","stroke","width","height"]):Qe(n,["fill","stroke"]))},"bpmn:Association":function(e,t,n={}){return re(e,t,n=Qe(n,["fill","stroke"]))},"bpmn:BoundaryEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=Qe(n,["fill","stroke"]);var r=R(t).get("cancelActivity");n={strokeWidth:1.5,fill:he(t,l,n.fill),fillOpacity:1,stroke:fe(t,p,n.stroke)},r||(n.strokeDasharray="6");var o=ae(e,t,n);return y(e,t.width,t.height,3,{...n,fill:"none"}),i&&Y(t,e,n),o},"bpmn:BusinessRuleTask":function(e,t,n={}){var r=xe(e,t,n=Qe(n,["fill","stroke"]));return L(w(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}})),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),L(w(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}})),{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:CallActivity":function(e,t,n={}){return n=Qe(n,["fill","stroke"]),ve(e,t,{strokeWidth:5,...n})},"bpmn:ComplexGateway":function(e,t,n={}){var r=se(e,t,n=Qe(n,["fill","stroke"]));return w(e,i.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:DataInput":function(e,t,n={}){n=Qe(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=oe(e,t,n);return w(e,r,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:1}),o},"bpmn:DataInputAssociation":function(e,t,n={}){return n=Qe(n,["fill","stroke"]),re(e,t,{...n,markerEnd:d(e,"association-end",he(t,l,n.fill),fe(t,p,n.stroke))})},"bpmn:DataObject":function(e,t,n={}){return oe(e,t,n=Qe(n,["fill","stroke"]))},"bpmn:DataObjectReference":P("bpmn:DataObject"),"bpmn:DataOutput":function(e,t,n={}){n=Qe(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=oe(e,t,n);return w(e,r,{strokeWidth:1,fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke)}),o},"bpmn:DataOutputAssociation":function(e,t,n={}){return n=Qe(n,["fill","stroke"]),re(e,t,{...n,markerEnd:d(e,"association-end",he(t,l,n.fill),fe(t,p,n.stroke))})},"bpmn:DataStoreReference":function(e,t,n={}){return n=Qe(n,["fill","stroke"]),w(e,i.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{fill:he(t,l,n.fill),fillOpacity:Ze,stroke:fe(t,p,n.stroke),strokeWidth:2})},"bpmn:EndEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=Qe(n,["fill","stroke"]);var r=ae(e,t,{...n,strokeWidth:4});return i&&Y(t,e,n),r},"bpmn:EventBasedGateway":function(e,t,n={}){n=Qe(n,["fill","stroke"]);var r=R(t),o=se(e,t,n);y(e,t.width,t.height,.2*t.height,{fill:he(t,"none",n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1});var a=r.get("eventGatewayType"),s=!!r.get("instantiate");if("Parallel"===a){var l=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}});w(e,l,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:1})}else"Exclusive"===a&&(s||y(e,t.width,t.height,.26*t.height,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:1}),function(){var r=i.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}});w(e,r,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:2})}());return o},"bpmn:ExclusiveGateway":function(e,t,n={}){var r=se(e,t,n=Qe(n,["fill","stroke"])),o=i.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return k(t).get("isMarkerVisible")&&w(e,o,{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:Gateway":function(e,t,n={}){return se(e,t,n=Qe(n,["fill","stroke"]))},"bpmn:Group":function(e,t,n={}){return n=Qe(n,["fill","stroke","width","height"]),g(e,t.width,t.height,10,{stroke:fe(t,p,n.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:ye(t,n),height:ge(t,n)})},"bpmn:InclusiveGateway":function(e,t,n={}){var i=se(e,t,n=Qe(n,["fill","stroke"]));return y(e,t.width,t.height,.24*t.height,{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:2.5}),i},"bpmn:IntermediateEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=Qe(n,["fill","stroke"]);var r=ae(e,t,{...n,strokeWidth:1.5});return y(e,t.width,t.height,3,{fill:"none",stroke:fe(t,p,n.stroke),strokeWidth:1.5}),i&&Y(t,e,n),r},"bpmn:IntermediateCatchEvent":P("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":P("bpmn:IntermediateEvent"),"bpmn:Lane":function(e,t,n={}){return n=Qe(n,["fill","stroke","width","height"]),pe(e,t,{...n,fillOpacity:.25})},"bpmn:ManualTask":function(e,t,n={}){var r=xe(e,t,n=Qe(n,["fill","stroke"]));return w(e,i.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:.5}),r},"bpmn:MessageFlow":function(e,t,n={}){n=Qe(n,["fill","stroke"]);var r=R(t),o=k(t),a=he(t,l,n.fill),s=fe(t,p,n.stroke),c=x(e,t.waypoints,{markerEnd:d(e,"messageflow-end",a,s),markerStart:d(e,"messageflow-start",a,s),stroke:s,strokeDasharray:"10, 11",strokeWidth:1.5});if(r.get("messageRef")){var u=c.getPointAtLength(c.getTotalLength()/2),h=i.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:u.x,y:u.y}}),f={strokeWidth:1};"initiating"===o.get("messageVisibleKind")?(f.fill=a,f.stroke=s):(f.fill=s,f.stroke=a);var m=w(e,h,f),y=Q(e,r.get("messageRef").get("name"),{align:"center-top",fitBox:!0,style:{fill:s}}),g=m.getBBox(),v=y.getBBox();Ke(y,u.x-v.width/2,u.y+g.height/2+10,0)}return c},"bpmn:ParallelGateway":function(e,t,n={}){var r=se(e,t,n=Qe(n,["fill","stroke"]));return w(e,i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:Participant":function(e,t,n={}){var i=pe(e,t,n=Qe(n,["fill","stroke","width","height"])),r=S(t),o=C(t),a=R(t),s=a.get("name");if(r){v(e,o?[{x:30,y:0},{x:30,y:ge(t,n)}]:[{x:0,y:30},{x:ye(t,n),y:30}],{stroke:fe(t,p,n.stroke),strokeWidth:1.5}),te(e,s,t,n)}else{var l=de(t,n);o||(l.height=ye(t,n),l.width=ge(t,n));var u=Q(e,s,{box:l,align:"center-middle",style:{fill:me(t,c,p,n.stroke)}});if(!o)Ke(u,0,-(-1*ge(t,n)),270)}return a.get("participantMultiplicity")&&Z("ParticipantMultiplicityMarker",e,t,n),i},"bpmn:ReceiveTask":function(e,t,n={}){n=Qe(n,["fill","stroke"]);var r,o=R(t),a=xe(e,t,n);return o.get("instantiate")?(y(e,28,28,4.4,{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),r=i.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):r=i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),w(e,r,{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),a},"bpmn:ScriptTask":function(e,t,n={}){var r=xe(e,t,n=Qe(n,["fill","stroke"]));return w(e,i.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:SendTask":function(e,t,n={}){var r=xe(e,t,n=Qe(n,["fill","stroke"]));return w(e,i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{fill:fe(t,p,n.stroke),stroke:he(t,l,n.fill),strokeWidth:1}),r},"bpmn:SequenceFlow":function(e,t,n={}){n=Qe(n,["fill","stroke"]);var i=he(t,l,n.fill),r=fe(t,p,n.stroke),o=x(e,t.waypoints,{markerEnd:d(e,"sequenceflow-end",i,r),stroke:r}),a=R(t),{source:s}=t;if(s){var c=R(s);a.get("conditionExpression")&&A(c,"bpmn:Activity")&&L(o,{markerStart:d(e,"conditional-flow-marker",i,r)}),c.get("default")&&(A(c,"bpmn:Gateway")||A(c,"bpmn:Activity"))&&c.get("default")===a&&L(o,{markerStart:d(e,"conditional-default-flow-marker",i,r)})}return o},"bpmn:ServiceTask":function(e,t,n={}){var r=xe(e,t,n=Qe(n,["fill","stroke"]));return y(e,10,10,{fill:he(t,l,n.fill),stroke:"none",transform:"translate(6, 6)"}),w(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),y(e,10,10,{fill:he(t,l,n.fill),stroke:"none",transform:"translate(11, 10)"}),w(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:StartEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=Qe(n,["fill","stroke"]),R(t).get("isInterrupting")||(n={...n,strokeDasharray:"6"});var r=ae(e,t,n);return i&&Y(t,e,n),r},"bpmn:SubProcess":function(e,t,n={}){return ve(e,t,n=S(t)?Qe(n,["fill","stroke","width","height"]):Qe(n,["fill","stroke"]))},"bpmn:Task":function(e,t,n={}){return xe(e,t,n=Qe(n,["fill","stroke"]))},"bpmn:TextAnnotation":function(e,t,n={}){n=Qe(n,["fill","stroke","width","height"]);var{width:r,height:o}=de(t,n),a=g(e,r,o,0,0,{fill:"none",stroke:"none"});return w(e,i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:0,my:0}}),{stroke:fe(t,p,n.stroke)}),Q(e,R(t).get("text")||"",{align:"left-top",box:de(t,n),padding:7,style:{fill:me(t,c,p,n.stroke)}}),a},"bpmn:Transaction":function(e,t,i={}){i=S(t)?Qe(i,["fill","stroke","width","height"]):Qe(i,["fill","stroke"]);var r=ve(e,t,{strokeWidth:1.5,...i}),o=n.style(["no-fill","no-events"],{stroke:fe(t,p,i.stroke),strokeWidth:1.5});return S(t)||(i={}),g(e,ye(t,i),ge(t,i),7,3,o),r},"bpmn:UserTask":function(e,t,n={}){var r=xe(e,t,n=Qe(n,["fill","stroke"]));return w(e,i.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:.5}),w(e,i.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{fill:he(t,l,n.fill),stroke:fe(t,p,n.stroke),strokeWidth:.5}),w(e,i.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{fill:fe(t,p,n.stroke),stroke:fe(t,p,n.stroke),strokeWidth:.5}),r},label:function(e,t,n={}){return function(e,t,n={}){var i={width:90,height:30,x:t.width/2+t.x,y:t.height/2+t.y};return Q(e,T(t),{box:i,fitBox:!0,style:E({},o.getExternalStyle(),{fill:me(t,c,p,n.stroke)})})}(e,t,n)}};this._drawPath=w,this._renderer=M}function Qe(e,t=[]){return t.reduce(((t,n)=>(e[n]&&(t[n]=e[n]),t)),{})}e(Je,_),Je.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Je.prototype.canRender=function(e){return A(e,"bpmn:BaseElement")},Je.prototype.drawShape=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},Je.prototype.drawConnection=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},Je.prototype.getShapePath=function(e){return A(e,"bpmn:Event")?function(e){var t=e.x+e.width/2,n=e.y+e.height/2,i=e.width/2;return ie([["M",t,n],["m",0,-i],["a",i,i,0,1,1,0,2*i],["a",i,i,0,1,1,0,-2*i],["z"]])}(e):A(e,"bpmn:Activity")?function(e,t){var n=e.x,i=e.y,r=e.width,o=e.height;return ie([["M",n+t,i],["l",r-2*t,0],["a",t,t,0,0,1,t,t],["l",0,o-2*t],["a",t,t,0,0,1,-t,t],["l",2*t-r,0],["a",t,t,0,0,1,-t,-t],["l",0,2*t-o],["a",t,t,0,0,1,t,-t],["z"]])}(e,10):A(e,"bpmn:Gateway")?function(e){var t=e.width/2,n=e.height/2;return ie([["M",e.x+t,e.y],["l",t,n],["l",-t,n],["l",-t,-n],["z"]])}(e):function(e){var t=e.x,n=e.y,i=e.width;return ie([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])}(e)};var et={width:150,height:50};function tt(e,t){var n;t.textContent=e;try{var i,r=""===e;return t.textContent=r?"dummy":e,i={width:(n=t.getBBox()).width+2*n.x,height:n.height},r&&(i.width=0),i}catch(e){return console.log(e),{width:0,height:0}}}function nt(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=tt(o,n)).width=o?i.width:0," "===o||""===o||i.width<Math.round(t)||o.length<2)return it(e,o,r,i);o=ot(o,i.width,t)}}function it(e,t,n,i){if(t.length<n.length){var r=n.slice(t.length).trim();e.unshift(r)}return{width:i.width,height:i.height,text:t}}var rt="";function ot(e,t,n){var i=Math.max(e.length*(n/t),1),r=function(e,t){var n,i=e.split(/(\s|-|\u00AD)/g),r=[],o=0;if(i.length>1)for(;n=i.shift();){if(!(n.length+o<t)){"-"!==n&&n!==rt||r.pop();break}r.push(n),o+=n.length}var a=r[r.length-1];return a&&a===rt&&(r[r.length-1]="-"),r.join("")}(e,i);return r||(r=e.slice(0,Math.max(Math.round(i-1),1))),r}function at(e){this._config=E({},{size:et,padding:0,style:{},align:"center-top"},e||{})}at.prototype.createText=function(e,t){return this.layoutText(e,t).element},at.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},at.prototype.layoutText=function(e,t){var n=E({},this._config.size,t.box),i=E({},this._config.style,t.style),r=function(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}(t.align||this._config.align),o=function(e){return a(e)?E({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}(void 0!==t.padding?t.padding:this._config.padding),s=t.fitBox||!1,l=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(i),p=e.split(/\u00AD?\r?\n/),c=[],u=n.width-o.left-o.right,h=z("text");for(L(h,{x:0,y:0}),L(h,i),D(function(){var e=document.getElementById("helper-svg");return e||(L(e=z("svg"),{id:"helper-svg"}),Re(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}(),h);p.length;)c.push(nt(p,u,h));"middle"===r.vertical&&(o.top=o.bottom=0);var d=m(c,(function(e,t,n){return e+(l||t.height)}),0)+o.top+o.bottom,y=m(c,(function(e,t,n){return t.width>e?t.width:e}),0),g=o.top;"middle"===r.vertical&&(g+=(n.height-d)/2),g-=(l||c[0].height)/4;var v=z("text");return L(v,i),f(c,(function(e){var t;switch(g+=l||e.height,r.horizontal){case"left":t=o.left;break;case"right":t=(s?y:u)-o.right-e.width;break;default:t=Math.max(((s?y:u)-e.width)/2+o.left,0)}var n=z("tspan");L(n,{x:t,y:g}),n.textContent=e.text,D(v,n)})),ee(h),{dimensions:{width:y,height:d},element:v}};function st(e){var t=E({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=E({},t,{fontSize:n},e&&e.externalStyle||{}),r=new at({style:t});this.getExternalLabelBounds=function(e,t){var n=r.getDimensions(t,{box:{width:90,height:30},style:i});return{x:Math.round(e.x+e.width/2-n.width/2),y:Math.round(e.y),width:Math.ceil(n.width),height:Math.ceil(n.height)}},this.getTextAnnotationBounds=function(e,n){var i=r.getDimensions(n,{box:e,style:t,align:"left-top",padding:5});return{x:e.x,y:e.y,width:e.width,height:Math.max(30,Math.round(i.height))}},this.createText=function(e,t){return r.createText(e,t||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return i}}st.$inject=["config.textRenderer"];var lt=/\{([^{}]+)\}/g,pt=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var ct={__init__:["bpmnRenderer"],bpmnRenderer:["type",Je],textRenderer:["type",st],pathMap:["type",function(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var n,i,r=this.pathMap[e];t.abspos?(n=t.abspos.x,i=t.abspos.y):(n=t.containerWidth*t.position.mx,i=t.containerHeight*t.position.my);var o={};if(t.position){for(var a=t.containerHeight/r.height*t.yScaleFactor,s=t.containerWidth/r.width*t.xScaleFactor,l=0;l<r.heightElements.length;l++)o["y"+l]=r.heightElements[l]*a;for(var p=0;p<r.widthElements.length;p++)o["x"+p]=r.widthElements[p]*s}var c,u,h=(c=r.d,u={mx:n,my:i,e:o},String(c).replace(lt,(function(e,t){return function(e,t,n){var i=n;return t.replace(pt,(function(e,t,n,r,o){t=t||r,i&&(t in i&&(i=i[t]),"function"==typeof i&&o&&(i=i()))})),i=(null==i||i==n?e:i)+""}(e,t,u)})));return h}}]};var ut={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]};function ht(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function ft(e){return t={x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2},{x:Math.round(t.x),y:Math.round(t.y)};var t}function mt(e){for(var t=e.waypoints,n=t.reduce((function(e,n,i){var r,o,a=t[i-1];if(a){var s=e[e.length-1],l=s&&s.endLength||0,p=(r=a,o=n,Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)));e.push({start:a,end:n,startLength:l,endLength:l+p,length:p})}return e}),[]),i=n.reduce((function(e,t){return e+t.length}),0)/2,r=0,o=n[r];o.endLength<i;)o=n[++r];var a=(i-o.startLength)/o.length;return{x:o.start.x+(o.end.x-o.start.x)*a,y:o.start.y+(o.end.y-o.start.y)*a}}function dt(e){return a(t=e)&&c(t,"waypoints")?mt(e):ft(e);var t}function yt(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function gt(e,t,n){return E({id:e.id,type:e.$type,businessObject:e,di:t},n)}function vt(e,t,n){var i=e.waypoint;return!i||i.length<2?[dt(t),dt(n)]:i.map((function(e){return{x:e.x,y:e.y}}))}function xt(e,t,n){return new Error(`element ${yt(t)} referenced by ${yt(e)}#${n} not yet drawn`)}function wt(e,t,n,i,r){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._textRenderer=r}wt.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],wt.prototype.add=function(e,t,n){var i,r,o,a,s,l,p;if(A(t,"bpmndi:BPMNPlane")){var c=A(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};i=this._elementFactory.createRoot(gt(e,t,c)),this._canvas.addRootElement(i)}else if(A(t,"bpmndi:BPMNShape")){var u=!S(e,t),h=function(e){return A(e,"bpmn:Group")}(e);r=n&&(n.hidden||n.collapsed);var f=t.bounds;i=this._elementFactory.createShape(gt(e,t,{collapsed:u,hidden:r,x:Math.round(f.x),y:Math.round(f.y),width:Math.round(f.width),height:Math.round(f.height),isFrame:h})),A(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,i),A(e,"bpmn:Lane")&&(o=0),A(e,"bpmn:DataStoreReference")&&(a=n,s=dt(f),l=s.x,p=s.y,l>=a.x&&l<=a.x+a.width&&p>=a.y&&p<=a.y+a.height||(n=this._canvas.findRoot(n))),this._canvas.addShape(i,n,o)}else{if(!A(t,"bpmndi:BPMNEdge"))throw new Error(`unknown di ${yt(t)} for element ${yt(e)}`);var m=this._getSource(e),d=this._getTarget(e);r=n&&(n.hidden||n.collapsed),i=this._elementFactory.createConnection(gt(e,t,{hidden:r,source:m,target:d,waypoints:vt(t,m,d)})),A(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(i,n,o)}return function(e){return A(e,"bpmn:Event")||A(e,"bpmn:Gateway")||A(e,"bpmn:DataStoreReference")||A(e,"bpmn:DataObjectReference")||A(e,"bpmn:DataInput")||A(e,"bpmn:DataOutput")||A(e,"bpmn:SequenceFlow")||A(e,"bpmn:MessageFlow")||A(e,"bpmn:Group")}(e)&&T(i)&&this.addLabel(e,t,i),this._eventBus.fire("bpmnElement.added",{element:i}),i},wt.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${yt(e)}#attachedToRef`);var i=this._elementRegistry.get(n.id),r=i&&i.attachers;if(!i)throw xt(e,n,"attachedToRef");t.host=i,r||(i.attachers=r=[]),-1===r.indexOf(t)&&r.push(t)},wt.prototype.addLabel=function(e,t,n){var i,r,o;return i=N(t,n),(r=T(n))&&(i=this._textRenderer.getExternalLabelBounds(i,r)),o=this._elementFactory.createLabel(gt(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!T(n),x:Math.round(i.x),y:Math.round(i.y),width:Math.round(i.width),height:Math.round(i.height)})),this._canvas.addShape(o,n.parent)},wt.prototype._getConnectedElement=function(e,t){var n,i,r=e.$type;if(i=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===r&&(i=i&&i[0]),("source"===t&&"bpmn:DataOutputAssociation"===r||"target"===t&&"bpmn:DataInputAssociation"===r)&&(i=e.$parent),n=i&&this._getElement(i))return n;throw i?xt(e,i,t+"Ref"):new Error(`${yt(e)}#${t} Ref not specified`)},wt.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},wt.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},wt.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};var bt={__depends__:[ct,{__depends__:[ut],bpmnImporter:["type",wt]}]};function Et(e,t){var n,i,r,a;return t=!!t,o(e)||(e=[e]),f(e,(function(e){var o=e;e.waypoints&&!t&&(o=Et(e.waypoints,!0));var s=o.x,l=o.y,p=o.height||0,c=o.width||0;(s<n||void 0===n)&&(n=s),(l<i||void 0===i)&&(i=l),(s+c>r||void 0===r)&&(r=s+c),(l+p>a||void 0===a)&&(a=l+p)})),{x:n,y:i,height:a-i,width:r-n}}function _t(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function At(e){return!(!e||!e.isFrame)}function Rt(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}Rt.prototype.next=function(){return this._prefix+ ++this._counter};var kt=new Rt("ov");function St(e,t,n,i){var r,o;this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=kt,this._overlayDefaults=E({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(r=n.getContainer(),Re(o=ze('<div class="djs-overlay-container" />'),{position:"absolute",width:0,height:0}),r.insertBefore(o,r.firstChild),o),this._init()}function Ct(e,t,n){Re(e,{left:t+"px",top:n+"px"})}function Mt(e,t){e.style.display=!1===t?"none":""}function Pt(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}St.$inject=["config.overlays","eventBus","canvas","elementRegistry"],St.prototype.get=function(e){if(p(e)&&(e={id:e}),p(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?h(t.overlays,g({type:e.type})):t.overlays.slice():[]}return e.type?h(this._overlays,g({type:e.type})):e.id?this._overlays[e.id]:null},St.prototype.add=function(e,t,n){if(a(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var i=this._ids.next();return n=E({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},St.prototype.remove=function(e){var t=this.get(e)||[];o(t)||(t=[t]);var n=this;f(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(He(e.html),He(e.htmlContainer),delete e.htmlContainer,delete e.element,delete n._overlays[e.id]),t){var i=t.overlays.indexOf(e);-1!==i&&t.overlays.splice(i,1)}}))},St.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},St.prototype.show=function(){Mt(this._overlayRoot)},St.prototype.hide=function(){Mt(this._overlayRoot,!1)},St.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Pe(this._overlayRoot)},St.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var o=Et(t);i=o.x,r=o.y}Ct(n,i,r),ke(e.html,"data-container-id",t.id)},St.prototype._updateOverlay=function(e){var t,n,i=e.position,r=e.htmlContainer,o=e.element,a=i.left,s=i.top;void 0!==i.right&&(t=o.waypoints?Et(o).width:o.width,a=-1*i.right+t);void 0!==i.bottom&&(n=o.waypoints?Et(o).height:o.height,s=-1*i.bottom+n);Ct(r,a||0,s||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},St.prototype._createOverlayContainer=function(e){var t=ze('<div class="djs-overlays" />');Re(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},St.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Pt(this._overlayRoot,n)},St.prototype._getOverlayContainer=function(e,t){var n=u(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},St.prototype._addOverlay=function(e){var t,n,i=e.id,r=e.element,o=e.html;o.get&&o.constructor.prototype.jquery&&(o=o.get(0)),p(o)&&(o=ze(o)),n=this._getOverlayContainer(r),Re(t=ze('<div class="djs-overlay" data-overlay-id="'+i+'">'),{position:"absolute"}),t.appendChild(o),e.type&&Ce(t).add("djs-overlay-"+e.type),Mt(t,this._canvas.findRoot(r)===this._canvas.getRootElement()),e.htmlContainer=t,n.overlays.push(e),n.html.appendChild(t),this._overlays[i]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},St.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,i=this._canvas.findRoot(e.element),o=n&&n.minZoom,a=n&&n.maxZoom,s=e.htmlContainer,l=!0;(i!==this._canvas.getRootElement()||n&&(r(o)&&o>t.scale||r(a)&&a<t.scale))&&(l=!1),Mt(s,l),this._updateOverlayScale(e,t)},St.prototype._updateOverlayScale=function(e,t){var n,i,o,a=e.scale,s=e.htmlContainer,l="";!0!==a&&(!1===a?(n=1,i=1):(n=a.min,i=a.max),r(n)&&t.scale<n&&(o=(1/t.scale||1)*n),r(i)&&t.scale>i&&(o=(1/t.scale||1)*i)),r(o)&&(l="scale("+o+","+o+")"),Pt(s,l)},St.prototype._updateOverlaysVisibilty=function(e){var t=this;f(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},St.prototype._init=function(){var e=this._eventBus,t=this;e.on("canvas.viewbox.changing",(function(e){t.hide()})),e.on("canvas.viewbox.changed",(function(e){var n;n=e.viewbox,t._updateRoot(n),t._updateOverlaysVisibilty(n),t.show()})),e.on(["shape.remove","connection.remove"],(function(e){var n=e.element;f(t.get({element:n}),(function(e){t.remove(e.id)}));var i=t._getOverlayContainer(n);if(i){He(i.html);var r=t._overlayContainers.indexOf(i);-1!==r&&t._overlayContainers.splice(r,1)}})),e.on("element.changed",500,(function(e){var n=e.element,i=t._getOverlayContainer(n,!0);i&&(f(i.overlays,(function(e){t._updateOverlay(e)})),t._updateOverlayContainer(i))})),e.on("element.marker.update",(function(e){var n=t._getOverlayContainer(e.element,!0);n&&Ce(n.html)[e.add?"add":"remove"](e.marker)})),e.on("root.set",(function(){t._updateOverlaysVisibilty(t._canvas.viewbox())})),e.on("diagram.clear",this.clear,this)};var Nt={__init__:["overlays"],overlays:["type",St]};function Tt(e,t,n,i){e.on("element.changed",(function(i){var r=i.element;(r.parent||r===t.getRootElement())&&(i.gfx=n.getGraphics(r)),i.gfx&&e.fire(_t(r)+".changed",i)})),e.on("elements.changed",(function(t){var n=t.elements;n.forEach((function(t){e.fire("element.changed",{element:t})})),i.updateContainments(n)})),e.on("shape.changed",(function(e){i.update("shape",e.element,e.gfx)})),e.on("connection.changed",(function(e){i.update("connection",e.element,e.gfx)}))}Tt.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var Dt={__init__:["changeSupport"],changeSupport:["type",Tt]};function Bt(e){this._eventBus=e}function Ot(e){return function(t,n,i,r,o){(l(t)||s(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}}function Lt(e,t){t.invoke(Bt,this),this.executed((function(t){var n=t.context;n.rootElement?e.setRootElement(n.rootElement):n.rootElement=e.getRootElement()})),this.revert((function(t){var n=t.context;n.rootElement&&e.setRootElement(n.rootElement)}))}Bt.$inject=["eventBus"],Bt.prototype.on=function(e,t,n,i,r,p){if((l(t)||s(t))&&(p=r,r=i,i=n,n=t,t=null),l(n)&&(p=r,r=i,i=n,n=1e3),a(r)&&(p=r,r=!1),!l(i))throw new Error("handlerFn must be a function");o(e)||(e=[e]);var c=this._eventBus;f(e,(function(e){var o=["commandStack",e,t].filter((function(e){return e})).join(".");c.on(o,n,r?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(i,p):i,p)}))},Bt.prototype.canExecute=Ot("canExecute"),Bt.prototype.preExecute=Ot("preExecute"),Bt.prototype.preExecuted=Ot("preExecuted"),Bt.prototype.execute=Ot("execute"),Bt.prototype.executed=Ot("executed"),Bt.prototype.postExecute=Ot("postExecute"),Bt.prototype.postExecuted=Ot("postExecuted"),Bt.prototype.revert=Ot("revert"),Bt.prototype.reverted=Ot("reverted"),e(Lt,Bt),Lt.$inject=["canvas","injector"];var It={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",Lt]},Ft={"&":"&","<":"<",">":">",'"':""","'":"'"};var jt="_plane";function Vt(e){var t=e.id;return A(e,"bpmn:SubProcess")?function(e){return e+jt}(t):t}function Wt(e,t,n){var i=ze('<ul class="bjs-breadcrumbs"></ul>'),r=n.getContainer(),o=Ce(r);r.appendChild(i);var a=[];function s(e){e&&(a=function(e){for(var t=R(e),n=[],i=t;i;i=i.$parent)(A(i,"bpmn:SubProcess")||A(i,"bpmn:Process"))&&n.push(i);return n.reverse()}(e));var r=a.flatMap((function(e){var i=n.findRoot(Vt(e))||n.findRoot(e.id);if(!i&&A(e,"bpmn:Process")){var r=t.find((function(t){var n=R(t);return n&&n.get("processRef")===e}));i=r&&n.findRoot(r.id)}if(!i)return[];var o,a=(o=""+(o=e.name||e.id))&&o.replace(/[&<>"']/g,(function(e){return Ft[e]})),s=ze('<li><span class="bjs-crumb"><a title="'+a+'">'+a+"</a></span></li>");return s.addEventListener("click",(function(){n.setRootElement(i)})),s}));i.innerHTML="";var s=r.length>1;o.toggle("bjs-breadcrumbs-shown",s),r.forEach((function(e){i.appendChild(e)}))}e.on("element.changed",(function(e){var t=R(e.element);u(a,(function(e){return e===t}))&&s()})),e.on("root.set",(function(e){s(e.element)}))}function $t(e,t){var n=null,i=new zt;e.on("root.set",(function(e){var r=e.element,o=t.viewbox(),a=i.get(r);if(i.set(n,{x:o.x,y:o.y,zoom:o.scale}),n=r,A(r,"bpmn:SubProcess")||a){a=a||{x:0,y:0,zoom:1};var s=(o.x-a.x)*o.scale,l=(o.y-a.y)*o.scale;0===s&&0===l||t.scroll({dx:s,dy:l}),a.zoom!==o.scale&&t.zoom(a.zoom,{x:0,y:0})}})),e.on("diagram.clear",(function(){i.clear(),n=null}))}function zt(){this._entries=[],this.set=function(e,t){var n=!1;for(var i in this._entries)if(this._entries[i][0]===e){this._entries[i][1]=t,n=!0;break}n||this._entries.push([e,t])},this.get=function(e){for(var t in this._entries)if(this._entries[t][0]===e)return this._entries[t][1];return null},this.clear=function(){this._entries.length=0},this.remove=function(e){var t=-1;for(var n in this._entries)if(this._entries[n][0]===e){t=n;break}-1!==t&&this._entries.splice(t,1)}}Wt.$inject=["eventBus","elementRegistry","canvas"],$t.$inject=["eventBus","canvas"];var Gt=180,Ht=160;function Kt(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,(function(e,t){n._handleImport(t.definitions)}))}function Ut(e){return A(e,"bpmndi:BPMNDiagram")?e:Ut(e.$parent)}Kt.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach((function(e){e.plane&&e.plane.bpmnElement&&(t._processToDiagramMap[e.plane.bpmnElement.id]=e)})),e.diagrams.filter((e=>e.plane)).flatMap((e=>t._createNewDiagrams(e.plane))).forEach((function(e){t._movePlaneElementsToOrigin(e.plane)}))}},Kt.prototype._createNewDiagrams=function(e){var t=this,n=[],i=[];e.get("planeElement").forEach((function(t){var r=t.bpmnElement;if(r){var o=r.$parent;A(r,"bpmn:SubProcess")&&!t.isExpanded&&n.push(r),function(e,t){var n=e.$parent;if(!A(n,"bpmn:SubProcess")||n===t.bpmnElement)return!1;if(function(e,t){return y(t,(function(t){return A(e,t)}))}(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))return!1;return!0}(r,e)&&i.push({diElement:t,parent:o})}}));var r=[];return n.forEach((function(e){if(!t._processToDiagramMap[e.id]){var n=t._createDiagram(e);t._processToDiagramMap[e.id]=n,r.push(n)}})),i.forEach((function(e){for(var i=e.diElement,r=e.parent;r&&-1===n.indexOf(r);)r=r.$parent;if(r){var o=t._processToDiagramMap[r.id];t._moveToDiPlane(i,o.plane)}})),r},Kt.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=function(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach((function(e){if(e.bounds){var n=ht(e.bounds);t.top=Math.min(n.top,t.top),t.left=Math.min(n.left,t.left)}})),function(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}(t)}(e),i=n.x-Gt,r=n.y-Ht;t.forEach((function(e){e.waypoint?e.waypoint.forEach((function(e){e.x=e.x-i,e.y=e.y-r})):e.bounds&&(e.bounds.x=e.bounds.x-i,e.bounds.y=e.bounds.y-r)}))},Kt.prototype._moveToDiPlane=function(e,t){var n=Ut(e).plane.get("planeElement");n.splice(n.indexOf(e),1),t.get("planeElement").push(e)},Kt.prototype._createDiagram=function(e){var t=this._moddle.create("bpmndi:BPMNPlane",{bpmnElement:e}),n=this._moddle.create("bpmndi:BPMNDiagram",{plane:t});return t.$parent=n,t.bpmnElement=e,n.$parent=this._definitions,this._definitions.diagrams.push(n),n},Kt.$inject=["eventBus","moddle"];var qt=250;function Yt(e,t,n,i,r){Bt.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=i,this._translate=r;var o=this;this.executed("shape.toggleCollapse",qt,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.reverted("shape.toggleCollapse",qt,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.executed(["shape.create","shape.move","shape.delete"],qt,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;o._canDrillDown(i)&&o._addOverlay(i),o._updateDrilldownOverlay(t),o._updateDrilldownOverlay(n),o._updateDrilldownOverlay(i)}),!0),this.reverted(["shape.create","shape.move","shape.delete"],qt,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;o._canDrillDown(i)&&o._addOverlay(i),o._updateDrilldownOverlay(t),o._updateDrilldownOverlay(n),o._updateDrilldownOverlay(i)}),!0),t.on("import.render.complete",(function(){n.filter((function(e){return o._canDrillDown(e)})).map((function(e){o._addOverlay(e)}))}))}e(Yt,Bt),Yt.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},Yt.prototype._canDrillDown=function(e){var t=this._canvas;return A(e,"bpmn:SubProcess")&&t.findRoot(Vt(e))},Yt.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=R(e),i=t.get({element:n.id,type:"drilldown"})[0];if(i){var r=n&&n.get("flowElements")&&n.get("flowElements").length;Ce(i.html).toggle("bjs-drilldown-empty",!r)}},Yt.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,i=R(e);n.get({element:e,type:"drilldown"}).length&&this._removeOverlay(e);var r=ze('<button type="button" class="bjs-drilldown"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg></button>'),o=i.get("name")||i.get("id"),a=this._translate("Open {element}",{element:o});r.setAttribute("title",a),r.addEventListener("click",(function(){t.setRootElement(t.findRoot(Vt(e)))})),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:r}),this._updateOverlayVisibility(e)},Yt.prototype._removeOverlay=function(e){this._overlays.remove({element:e,type:"drilldown"})},Yt.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];var Xt={__depends__:[Nt,Dt,It],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",Wt],drilldownCentering:["type",$t],drilldownOverlayBehavior:["type",Yt],subprocessCompatibility:["type",Kt]};function Zt(e){return e.originalEvent||e.srcEvent}function Jt(e,t){return(Zt(e)||e).button===t}function Qt(e){return Jt(e,0)}function en(e){return!0}function tn(e){return Qt(e)||function(e){return Jt(e,1)}(e)}function nn(e,t,n){var i=this;function r(n,i,r){var o,a;(function(e,t){var n=l[e]||Qt;return!n(t)})(n,i)||(r?a=t.getGraphics(r):(o=i.delegateTarget||i.target)&&(a=o,r=t.get(a)),a&&r&&!1===e.fire(n,{element:r,gfx:a,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var o={};function a(e){return o[e]}var s={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},l={"element.contextmenu":en,"element.mousedown":tn,"element.mouseup":tn,"element.click":tn,"element.dblclick":tn};function p(e,t,n,i){var a=o[n]=function(e){r(n,e)};i&&(l[n]=i),a.$delegate=je.bind(e,"svg, .djs-element",t,a)}function c(e,t,n){var i=a(n);i&&je.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){var t;t=e.svg,f(s,(function(e,n){c(t,n,e)}))})),e.on("canvas.init",(function(e){var t;t=e.svg,f(s,(function(e,n){p(t,n,e)}))})),e.on(["shape.added","connection.added"],(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.createHit",{element:n,gfx:i})})),e.on(["shape.changed","connection.changed"],500,(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.updateHit",{element:n,gfx:i})})),e.on("interactionEvents.createHit",500,(function(e){var t=e.element,n=e.gfx;i.createDefaultHit(t,n)})),e.on("interactionEvents.updateHit",(function(e){var t=e.element,n=e.gfx;i.updateDefaultHit(t,n)}));var u=d("djs-hit djs-hit-stroke"),h=d("djs-hit djs-hit-click-stroke"),m={all:d("djs-hit djs-hit-all"),"click-stroke":h,stroke:u,"no-move":d("djs-hit djs-hit-no-move")};function d(e,t){return t=E({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function y(e,t){var n=m[t];if(!n)throw new Error("invalid hit type <"+t+">");return L(e,n),e}function g(e,t){D(e,t)}this.removeHits=function(e){var t;f((t=".djs-hit",(e||document).querySelectorAll(t)),ee)},this.createDefaultHit=function(e,t){var n,i=e.waypoints,r=e.isFrame;return i?this.createWaypointsHit(t,i):(n=r?"stroke":"all",this.createBoxHit(t,n,{width:e.width,height:e.height}))},this.createWaypointsHit=function(e,t){var n=le(t);return y(n,"stroke"),g(e,n),n},this.createBoxHit=function(e,t,n){n=E({x:0,y:0},n);var i=z("rect");return y(i,t),L(i,n),g(e,i),i},this.updateDefaultHit=function(e,t){var n=Ge(".djs-hit",t);if(n)return e.waypoints?pe(n,e.waypoints):L(n,{width:e.width,height:e.height}),n},this.fire=r,this.triggerMouseEvent=function(e,t,n){var i=s[e];if(!i)throw new Error("unmapped DOM event name <"+e+">");return r(i,t,n)},this.mouseHandler=a,this.registerEvent=p,this.unregisterEvent=c}nn.$inject=["eventBus","elementRegistry","styles"];var rn={__init__:["interactionEvents"],interactionEvents:["type",nn]};function on(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=[];var n=this;e.on(["shape.remove","connection.remove"],(function(e){var t=e.element;n.deselect(t)})),e.on(["diagram.clear","root.set"],(function(e){n.select(null)}))}on.$inject=["eventBus","canvas"],on.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(-1!==n){var i=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:t})}},on.prototype.get=function(){return this._selectedElements},on.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},on.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();o(e)||(e=e?[e]:[]);var r=this._canvas,a=r.getRootElement();e=e.filter((function(e){var t=r.findRoot(e);return a===t})),t?f(e,(function(e){-1===n.indexOf(e)&&n.push(e)})):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:n})};var an="hover",sn="selected";function ln(e,t){function n(t,n){e.addMarker(t,n)}function i(t,n){e.removeMarker(t,n)}this._canvas=e,t.on("element.hover",(function(e){n(e.element,an)})),t.on("element.out",(function(e){i(e.element,an)})),t.on("selection.changed",(function(e){var t=e.oldSelection,r=e.newSelection;f(t,(function(e){-1===r.indexOf(e)&&i(e,sn)})),f(r,(function(e){-1===t.indexOf(e)&&n(e,sn)}))}))}function pn(e,t,n,i){e.on("create.end",500,(function(e){var n=e.context,i=n.canExecute,r=n.elements,a=(n.hints||{}).autoSelect;if(i){if(!1===a)return;o(a)?t.select(a):t.select(r.filter(cn))}})),e.on("connect.end",500,(function(e){var n=e.context.connection;n&&t.select(n)})),e.on("shape.move.end",500,(function(e){var n=e.previousSelection||[],r=i.get(e.context.shape.id);u(n,(function(e){return r.id===e.id}))||t.select(r)})),e.on("element.click",(function(e){if(Qt(e)){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,a=function(e){var t=Zt(e)||e;return Qt(e)&&t.shiftKey}(e);if(r&&o)return a?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,a)}}))}function cn(e){return!e.hidden}ln.$inject=["canvas","eventBus"],pn.$inject=["eventBus","selection","canvas","elementRegistry"];var un={__init__:["selectionVisuals","selectionBehavior"],__depends__:[rn],selection:["type",on],selectionVisuals:["type",ln],selectionBehavior:["type",pn]};const hn=/^class[ {]/;function fn(e){return Array.isArray(e)}function mn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function dn(...e){1===e.length&&fn(e[0])&&(e=e[0]);const t=(e=[...e]).pop();return t.$inject=e,t}const yn=/constructor\s*[^(]*\(\s*([^)]*)\)/m,gn=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,vn=/\/\*([^*]*)\*\//m;function xn(e){if("function"!=typeof e)throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(function(e){return hn.test(e.toString())}(e)?yn:gn);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map((e=>{const t=e.match(vn);return(t&&t[1]||e).trim()}))||[]}function wn(e,t){const n=t||{get:function(e,t){if(i.push(e),!1===t)return null;throw s(`No provider for "${e}"!`)}},i=[],r=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(e){const t=i.join(" -> ");return i.length=0,new Error(t?`${e} (Resolving: ${t})`:e)};function l(e,t){if(!r[e]&&e.includes(".")){const t=e.split(".");let n=l(t.shift());for(;t.length;)n=n[t.shift()];return n}if(mn(o,e))return o[e];if(mn(r,e)){if(-1!==i.indexOf(e))throw i.push(e),s("Cannot resolve circular dependency!");return i.push(e),o[e]=r[e][0](r[e][1]),i.pop(),o[e]}return n.get(e,t)}function p(e,t){if(void 0===t&&(t={}),"function"!=typeof e){if(!fn(e))throw s(`Cannot invoke "${e}". Expected a function!`);e=dn(e.slice())}return{fn:e,dependencies:(e.$inject||xn(e)).map((e=>mn(t,e)?t[e]:l(e)))}}function c(e){const{fn:t,dependencies:n}=p(e);return new(Function.prototype.bind.call(t,null,...n))}function u(e,t,n){const{fn:i,dependencies:r}=p(e,n);return i.apply(t,r)}function h(e){return dn((t=>e.get(t)))}function f(e,t){if(t&&t.length){const n=Object.create(null),i=Object.create(null),o=[],a=[],s=[];let l,p,c,u;for(let e in r)l=r[e],-1!==t.indexOf(e)&&("private"===l[2]?(p=o.indexOf(l[3]),-1===p?(c=l[3].createChild([],t),u=h(c),o.push(l[3]),a.push(c),s.push(u),n[e]=[u,e,"private",c]):n[e]=[s[p],e,"private",a[p]]):n[e]=[l[2],l[1]],i[e]=!0),"factory"!==l[2]&&"type"!==l[2]||!l[1].$scope||t.forEach((t=>{-1!==l[1].$scope.indexOf(t)&&(n[e]=[l[2],l[1]],i[t]=!0)}));t.forEach((e=>{if(!i[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')})),e.unshift(n)}return new wn(e,a)}const m={factory:u,type:c,value:function(e){return e}};function d(e,t){const n=e.__init__||[];return function(){n.forEach((e=>{"string"==typeof e?t.get(e):t.invoke(e)}))}}function y(e){const t=e.__exports__;if(t){const n=e.__modules__,i=Object.keys(e).reduce(((t,n)=>("__exports__"!==n&&"__modules__"!==n&&"__init__"!==n&&"__depends__"!==n&&(t[n]=e[n]),t)),Object.create(null)),o=f((n||[]).concat(i)),a=dn((function(e){return o.get(e)}));t.forEach((function(e){r[e]=[a,e,"private",o]}));const s=(e.__init__||[]).slice();return s.unshift((function(){o.init()})),d(e=Object.assign({},e,{__init__:s}),o)}return Object.keys(e).forEach((function(t){if("__init__"===t||"__depends__"===t)return;const n=e[t];if("private"===n[2])return void(r[t]=n);const i=n[0],o=n[1];r[t]=[m[i],bn(i,o),i]})),d(e,a)}function g(e,t){return-1!==e.indexOf(t)||-1!==(e=(t.__depends__||[]).reduce(g,e)).indexOf(t)?e:e.concat(t)}this.get=l,this.invoke=u,this.instantiate=c,this.createChild=f,this.init=function(e){const t=e.reduce(g,[]).map(y);let n=!1;return function(){n||(n=!0,t.forEach((e=>e())))}}(e)}function bn(e,t){return"value"!==e&&fn(t)&&(t=dn(t.slice())),t}function En(e,t){_.call(this,e,1),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=t.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}e(En,_),En.prototype.canRender=function(){return!0},En.prototype.drawShape=function(e,t,n){var i=z("rect");return L(i,{x:0,y:0,width:t.width||0,height:t.height||0}),At(t)?L(i,E({},this.FRAME_STYLE,n||{})):L(i,E({},this.SHAPE_STYLE,n||{})),D(e,i),i},En.prototype.drawConnection=function(e,t,n){var i=le(t.waypoints,E({},this.CONNECTION_STYLE,n||{}));return D(e,i),i},En.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width;return ie([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])},En.prototype.getConnectionPath=function(e){var t,n,i=e.waypoints,r=[];for(t=0;n=i[t];t++)n=n.original||n,r.push([0===t?"M":"L",n.x,n.y]);return ie(r)},En.$inject=["eventBus","styles"];var _n={__init__:["defaultRenderer"],defaultRenderer:["type",En],styles:["type",function(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(e,t,n){return E(this.style(t,n),{class:e})},this.style=function(t,n){o(t)||n||(n=t,t=[]);var i=m(t,(function(t,n){return E(t,e[n]||{})}),{});return n?E(i,n):i},this.computeStyle=function(e,n,i){return o(n)||(i=n,n=[]),t.style(n||[],E({},i,e||{}))}}]};function An(e,t){return Math.round(e*t)/t}function Rn(e){return s(e)?e+"px":e}function kn(e,t,n){const i=z("g");F(i).add(t);const r=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]||null),i}const Sn={shape:["x","y","width","height"],connection:["waypoints"]};function Cn(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}function Mn(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}Cn.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],Cn.prototype._init=function(e){const t=this._eventBus,n=this._container=function(e){const t=(e=E({},{width:"100%",height:"100%"},e)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),Re(n,{position:"relative",overflow:"hidden",width:Rn(e.width),height:Rn(e.height)}),t.appendChild(n),n}(e),i=this._svg=z("svg");L(i,{width:"100%",height:"100%"}),ke(i,"tabindex",0),e.autoFocus&&t.on("element.hover",(()=>{this.restoreFocus()})),t.on("element.mousedown",500,(e=>{this.focus()})),i.addEventListener("focusin",(()=>{this._setFocused(!0)})),i.addEventListener("focusout",(()=>{this._setFocused(!1)})),D(n,i);const r=this._viewport=kn(i,"viewport");e.deferUpdate&&(this._viewboxChanged=function(e,t){let n,i,r,o;function a(n){let a=Date.now(),p=n?0:o+t-a;if(p>0)return s(p);e.apply(r,i),l()}function s(e){n=setTimeout(a,e)}function l(){n&&clearTimeout(n),n=o=i=r=void 0}function p(...e){o=Date.now(),i=e,r=this,n||s(t)}return p.flush=function(){n&&a(!0),l()},p.cancel=l,p}(b(this._viewboxChanged,this),300)),t.on("diagram.init",(()=>{t.fire("canvas.init",{svg:i,viewport:r})})),t.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","root.set"],(()=>{delete this._cachedViewbox})),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)},Cn.prototype._destroy=function(){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});const e=this._container.parentNode;e&&e.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._rootElement,delete this._viewport},Cn.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},Cn.prototype._clear=function(){this._elementRegistry.getAll().forEach((e=>{const t=_t(e);"root"===t?this.removeRootElement(e):this._removeElement(e,t)})),this._planes=[],this._rootElement=null,delete this._cachedViewbox},Cn.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},Cn.prototype.restoreFocus=function(){document.activeElement===document.body&&this.focus()},Cn.prototype.isFocused=function(){return this._focused},Cn.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},Cn.prototype.getLayer=function(e,t){if(!e)throw new Error("must specify a name");let n=this._layers[e];if(n||(n=this._layers[e]=this._createLayer(e,t)),void 0!==t&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group},Cn.prototype._getChildIndex=function(e){return m(this._layers,(function(t,n){return n.visible&&e>=n.index&&t++,t}),0)},Cn.prototype._createLayer=function(e,t){void 0===t&&(t=1);const n=this._getChildIndex(t);return{group:kn(this._viewport,"layer-"+e,n),index:t,visible:!0}},Cn.prototype.showLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=this._viewport,i=t.group,r=t.index;if(t.visible)return i;const o=this._getChildIndex(r);return n.insertBefore(i,n.childNodes[o]||null),t.visible=!0,i},Cn.prototype.hideLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=t.group;return t.visible?(ee(n),t.visible=!1,n):n},Cn.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],ee(t.group))},Cn.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},Cn.prototype.findRoot=function(e){if("string"==typeof e&&(e=this._elementRegistry.get(e)),!e)return;const t=this._findPlaneForRoot(function(e){for(;e.parent;)e=e.parent;return e}(e))||{};return t.rootElement},Cn.prototype.getRootElements=function(){return this._planes.map((function(e){return e.rootElement}))},Cn.prototype._findPlaneForRoot=function(e){return u(this._planes,(function(t){return t.rootElement===e}))},Cn.prototype.getContainer=function(){return this._container},Cn.prototype._updateMarker=function(e,t,n){let i;e.id||(e=this._elementRegistry.get(e)),e.markers=e.markers||new Set,i=this._elementRegistry._elements[e.id],i&&(f([i.gfx,i.secondaryGfx],(function(i){i&&(n?(e.markers.add(t),F(i).add(t)):(e.markers.delete(t),F(i).remove(t)))})),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},Cn.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},Cn.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},Cn.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),!!e.markers&&e.markers.has(t)},Cn.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},Cn.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},Cn.prototype.addRootElement=function(e){const t=this._rootsIdx++;e||(e={id:"__implicitroot_"+t,children:[],isImplicit:!0});const n=e.layer="root-"+t;this._ensureValid("root",e);const i=this.getLayer(n,0);return this.hideLayer(n),this._addRoot(e,i),this._planes.push({rootElement:e,layer:i}),e},Cn.prototype.removeRootElement=function(e){"string"==typeof e&&(e=this._elementRegistry.get(e));if(this._findPlaneForRoot(e))return this._removeRoot(e),this._removeLayer(e.layer),this._planes=this._planes.filter((function(t){return t.rootElement!==e})),this._rootElement===e&&(this._rootElement=null),e},Cn.prototype.setRootElement=function(e){if(e===this._rootElement)return e;let t;if(!e)throw new Error("rootElement required");return t=this._findPlaneForRoot(e),t||(e=this.addRootElement(e)),this._setRoot(e),e},Cn.prototype._removeRoot=function(e){const t=this._elementRegistry,n=this._eventBus;n.fire("root.remove",{element:e}),n.fire("root.removed",{element:e}),t.remove(e)},Cn.prototype._addRoot=function(e,t){const n=this._elementRegistry,i=this._eventBus;i.fire("root.add",{element:e}),n.add(e,t),i.fire("root.added",{element:e,gfx:t})},Cn.prototype._setRoot=function(e,t){const n=this._rootElement;n&&(this._elementRegistry.updateGraphics(n,null,!0),this.hideLayer(n.layer)),e&&(t||(t=this._findPlaneForRoot(e).layer),this._elementRegistry.updateGraphics(e,this._svg,!0),this.showLayer(e.layer)),this._rootElement=e,this._eventBus.fire("root.set",{element:e})},Cn.prototype._ensureValid=function(e,t){if(!t.id)throw new Error("element must have an id");if(this._elementRegistry.get(t.id))throw new Error("element <"+t.id+"> already exists");const n=Sn[e],i=d(n,(function(e){return void 0!==t[e]}));if(!i)throw new Error("must supply { "+n.join(", ")+" } with "+e)},Cn.prototype._setParent=function(e,t,n){!function(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}(t.children,e,n),e.parent=t},Cn.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();const r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),r.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);const a=o.create(e,t,i);return this._elementRegistry.add(t,a),o.update(e,t,a),r.fire(e+".added",{element:t,gfx:a}),t},Cn.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},Cn.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},Cn.prototype._removeElement=function(e,t){const n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(e=n.get(e.id||e))return r.fire(t+".remove",{element:e}),i.remove(e),function(e,t){if(!e||!t)return-1;var n=e.indexOf(t);-1!==n&&e.splice(n,1)}(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},Cn.prototype.removeShape=function(e){return this._removeElement(e,"shape")},Cn.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},Cn.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},Cn.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},Cn.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},Cn.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let i,r,o,a,s,l,p;return e?(this._changeViewbox((function(){s=Math.min(n.width/e.width,n.height/e.height);const i=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);ne(t,i)})),e):(o=this._rootElement?this.getActiveLayer():null,i=o&&o.getBBox()||{},a=ne(t),r=a?a.matrix:function(e,t,n,i,r,o){var a=H().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return K(a,e);case 6:return K(a,{a:e,b:t,c:n,d:i,e:r,f:o})}}(),s=An(r.a,1e3),l=An(-r.e||0,1e3),p=An(-r.f||0,1e3),e=this._cachedViewbox={x:l?l/s:0,y:p?p/s:0,width:n.width/s,height:n.height/s,scale:s,inner:{width:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:n})},Cn.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox((function(){e=E({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),Mn(t,n)})),{x:n.e,y:n.f}},Cn.prototype.scrollToElement=function(e,t){let n=100;"string"==typeof e&&(e=this._elementRegistry.get(e));const i=this.findRoot(e);if(i!==this.getRootElement()&&this.setRootElement(i),i===e)return;t||(t={}),"number"==typeof t&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};const r=Et(e),o=ht(r),a=this.viewbox(),s=this.zoom();let l,p;a.y+=t.top/s,a.x+=t.left/s,a.width-=(t.right+t.left)/s,a.height-=(t.bottom+t.top)/s;const c=ht(a);if(r.width<a.width&&r.height<a.height){const e=Math.max(0,o.right-c.right),t=Math.min(0,o.left-c.left),n=Math.max(0,o.bottom-c.bottom),i=Math.min(0,o.top-c.top);l=e||t,p=n||i}else l=r.x-a.x,p=r.y-a.y;this.scroll({dx:-l*s,dy:-p*s})},Cn.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if("fit-viewport"===e)return this._fitViewport(t);let n,i;return this._changeViewbox((function(){"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)})),An(i.a,1e3)},Cn.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,i=t.inner;let r,o;return i.x>=0&&i.y>=0&&i.x+i.width<=n.width&&i.y+i.height<=n.height&&!e?o={x:0,y:0,width:Math.max(i.width+i.x,n.width),height:Math.max(i.height+i.y,n.height)}:(r=Math.min(1,n.width/i.width,n.height/i.height),o={x:i.x+(e?i.width/2-n.width/r/2:0),y:i.y+(e?i.height/2-n.height/r/2:0),width:n.width/r,height:n.height/r}),this.viewbox(o),this.viewbox(!1).scale},Cn.prototype._setZoom=function(e,t){const n=this._svg,i=this._viewport,r=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,l,p,c;l=i.getCTM();const u=l.a;return t?(a=E(o,t),s=a.matrixTransform(l.inverse()),p=r.translate(s.x,s.y).scale(1/u*e).translate(-s.x,-s.y),c=l.multiply(p)):c=r.scale(e),Mn(this._viewport,c),c},Cn.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},Cn.prototype.getAbsoluteBBox=function(e){const t=this.viewbox();let n;if(e.waypoints){n=this.getGraphics(e).getBBox()}else n=e;return{x:n.x*t.scale-t.x*t.scale,y:n.y*t.scale-t.y*t.scale,width:n.width*t.scale,height:n.height*t.scale}},Cn.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Pn="data-element-id";function Nn(e){this._elements={},this._eventBus=e}function Tn(e,t,n){var i=function(e,t,n,i){var r=n.inverse;return Object.defineProperty(e,"remove",{value:function(e){var n=this.indexOf(e);return-1!==n&&(this.splice(n,1),t.unset(e,r,i)),e}}),Object.defineProperty(e,"contains",{value:function(e){return-1!==this.indexOf(e)}}),Object.defineProperty(e,"add",{value:function(e,n){var o=this.indexOf(e);if(void 0===n){if(-1!==o)return;n=this.length}-1!==o&&this.splice(o,1),this.splice(n,0,e),-1===o&&t.set(e,r,i)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:i}),i.length&&i.forEach((function(i){e.set(i,t.inverse,n)}))}function Dn(e,t){if(!(this instanceof Dn))return new Dn(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Nn.$inject=["eventBus"],Nn.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),L(t,Pn,i),n&&L(n,Pn,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},Nn.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(L(i.gfx,Pn,""),i.secondaryGfx&&L(i.secondaryGfx,Pn,""),delete t[n])},Nn.prototype.updateId=function(e,t){this._validateId(t),"string"==typeof e&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t});var n=this.getGraphics(e),i=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,i)},Nn.prototype.updateGraphics=function(e,t,n){var i=e.id||e,r=this._elements[i];return n?r.secondaryGfx=t:r.gfx=t,t&&L(t,Pn,i),t},Nn.prototype.get=function(e){var t;t="string"==typeof e?e:e&&L(e,Pn);var n=this._elements[t];return n&&n.element},Nn.prototype.filter=function(e){var t=[];return this.forEach((function(n,i){e(n,i)&&t.push(n)})),t},Nn.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),i=0;i<n.length;i++){var r=t[n[i]],o=r.element;if(e(o,r.gfx))return o}},Nn.prototype.getAll=function(){return this.filter((function(e){return e}))},Nn.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach((function(n){var i=t[n],r=i.element,o=i.gfx;return e(r,o)}))},Nn.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},Nn.prototype._validateId=function(e){if(!e)throw new Error("element must have an id");if(this._elements[e])throw new Error("element with id "+e+" already added")},Dn.prototype.bind=function(e,t){if("string"==typeof t){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?Tn(this,t,e):function(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var o=r;r=null,o&&e.unset(o,i,n),r=t,e.set(r,i,n)}}})}(this,t,e)},Dn.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return function(e){return!0===e.__refs_collection}(n)||Tn(this,t,e),n},Dn.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},Dn.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},Dn.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Bn=new Dn({name:"children",enumerable:!0,collection:!0},{name:"parent"}),On=new Dn({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Ln=new Dn({name:"attachers",collection:!0},{name:"host"}),In=new Dn({name:"outgoing",collection:!0},{name:"source"}),Fn=new Dn({name:"incoming",collection:!0},{name:"target"});function jn(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(e){var t=this.label,n=this.labels;!e&&t?n.remove(t):n.add(e,0)}}),Bn.bind(this,"parent"),On.bind(this,"labels"),In.bind(this,"outgoing"),Fn.bind(this,"incoming")}function Vn(){jn.call(this),Bn.bind(this,"children"),Ln.bind(this,"host"),Ln.bind(this,"attachers")}function Wn(){jn.call(this),Bn.bind(this,"children")}function $n(){Vn.call(this),On.bind(this,"labelTarget")}function zn(){jn.call(this),In.bind(this,"source"),Fn.bind(this,"target")}e(Vn,jn),e(Wn,Vn),e($n,Vn),e(zn,jn);var Gn={connection:zn,shape:Vn,label:$n,root:Wn};function Hn(){this._uid=12}Hn.prototype.createRoot=function(e){return this.create("root",e)},Hn.prototype.createLabel=function(e){return this.create("label",e)},Hn.prototype.createShape=function(e){return this.create("shape",e)},Hn.prototype.createConnection=function(e){return this.create("connection",e)},Hn.prototype.create=function(e,t){return(t=E({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=Gn[e];if(!n)throw new Error("unknown type: <"+e+">");return E(new n,t)}(e,t)};var Kn="__fn",Un=Array.prototype.slice;function qn(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function Yn(){}function Xn(e,t){this._eventBus=e,this._elementRegistry=t}function Zn(e,t,n){var i=n||t.firstChild;e!==i&&t.insertBefore(e,i)}qn.prototype.on=function(e,t,n,i){if(e=o(e)?e:[e],l(t)&&(i=n,n=t,t=1e3),!s(t))throw new Error("priority must be a number");var r=n;i&&((r=b(n,i))[Kn]=n[Kn]||n);var a=this;e.forEach((function(e){a._addListener(e,{priority:t,callback:r,next:null})}))},qn.prototype.once=function(e,t,n,i){var r=this;if(l(t)&&(i=n,n=t,t=1e3),!s(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var t=n.apply(i,arguments);return r.off(e,o),t}o[Kn]=n,this.on(e,t,o)},qn.prototype.off=function(e,t){e=o(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},qn.prototype.createEvent=function(e){var t=new Yn;return t.init(e),t},qn.prototype.fire=function(e,t){var n,i,r,o;if(o=Un.call(arguments),"object"==typeof e&&(e=(t=e).type),!e)throw new Error("no event type specified");if(i=this._listeners[e]){n=t instanceof Yn?t:this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{r=this._invokeListeners(n,o,i)}finally{e!==a&&(n.type=a)}return void 0===r&&n.defaultPrevented&&(r=!1),r}},qn.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},qn.prototype._destroy=function(){this._listeners={}},qn.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},qn.prototype._invokeListener=function(e,t,n){var i;if(n.callback.__isTomb)return i;try{i=function(e,t){return e.apply(null,t)}(n.callback,t),void 0!==i&&(e.returnValue=i,e.stopPropagation()),!1===i&&e.preventDefault()}catch(e){if(!this.handleError(e))throw console.error("unhandled error in event listener",e),e}return i},qn.prototype._addListener=function(e,t){var n,i=this._getListeners(e);if(i){for(;i;){if(i.priority<t.priority)return t.next=i,void(n?n.next=t:this._setListeners(e,t));n=i,i=i.next}n.next=t}else this._setListeners(e,t)},qn.prototype._getListeners=function(e){return this._listeners[e]},qn.prototype._setListeners=function(e,t){this._listeners[e]=t},qn.prototype._removeListener=function(e,t){var n,i,r,o=this._getListeners(e);if(t)for(;o;)n=o.next,(r=o.callback)!==t&&r[Kn]!==t||(i?i.next=n:this._setListeners(e,n)),i=o,o=n;else this._setListeners(e,null)},Yn.prototype.stopPropagation=function(){this.cancelBubble=!0},Yn.prototype.preventDefault=function(){this.defaultPrevented=!0},Yn.prototype.init=function(e){E(this,e||{})},Xn.$inject=["eventBus","elementRegistry"],Xn.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=function(e){return e.parentNode.childNodes[1]}(n),t||(F(t=z("g")).add("djs-children"),D(n.parentNode,t))):t=n,t},Xn.prototype._clear=function(e){var t=function(e){return e.childNodes[0]}(e);return Pe(t),t},Xn.prototype._createContainer=function(e,t,n,i){var r=z("g");F(r).add("djs-group"),void 0!==n?Zn(r,t,t.childNodes[n]):D(t,r);var o=z("g");F(o).add("djs-element"),F(o).add("djs-"+e),i&&F(o).add("djs-frame"),D(r,o);var a=z("g");return F(a).add("djs-visual"),D(o,a),o},Xn.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,At(t))},Xn.prototype.updateContainments=function(e){var t,n=this,i=this._elementRegistry;t=m(e,(function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e}),{}),f(t,(function(e){var t=e.children;if(t){var r=n._getChildrenContainer(e);f(t.slice().reverse(),(function(e){Zn(i.getGraphics(e).parentNode,r)}))}}))},Xn.prototype.drawShape=function(e,t,n={}){return this._eventBus.fire("render.shape",{gfx:e,element:t,attrs:n})},Xn.prototype.getShapePath=function(e){return this._eventBus.fire("render.getShapePath",e)},Xn.prototype.drawConnection=function(e,t,n={}){return this._eventBus.fire("render.connection",{gfx:e,element:t,attrs:n})},Xn.prototype.getConnectionPath=function(e){return this._eventBus.fire("render.getConnectionPath",e)},Xn.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if("shape"===e)this.drawShape(i,t),Ue(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(i,t)}t.hidden?L(n,"display","none"):L(n,"display","block")}},Xn.prototype.remove=function(e){ee(this._elementRegistry.getGraphics(e).parentNode)};var Jn={__depends__:[_n],__init__:["canvas"],canvas:["type",Cn],elementRegistry:["type",Nn],elementFactory:["type",Hn],eventBus:["type",qn],graphicsFactory:["type",Xn]};function Qn(e){return function(e){var t=new wn(e);return t.init(),t}([{config:["value",e=e||{}]},Jn].concat(e.modules||[]))}function ei(e,t){this._injector=t||Qn(e),this.get("eventBus").fire("diagram.init")}function ti(){}function ni(e,t){this.model=e,this.properties=t}ei.prototype.get=function(e,t){return this._injector.get(e,t)},ei.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},ei.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},ei.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")},ti.prototype.get=function(e){return this.$model.properties.get(this,e)},ti.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},ni.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(ti.prototype);f(e.properties,(function(e){e.isMany||void 0===e.default||(i[e.name]=e.default)})),n.defineModel(i,t),n.defineDescriptor(i,e);var r=e.ns.name;function o(e){n.define(this,"$type",{value:r,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),f(e,b((function(e,t){this.set(t,e)}),this))}return o.prototype=i,o.hasType=i.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var ii={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},ri={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function oi(e,t){var n=ri[e];return n?n(t):t}function ai(e){return!!ii[e]}function si(e){return!!ri[e]}function li(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function pi(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function ci(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,f(e,b(this.registerPackage,this))}function ui(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function hi(e){this.model=e}function fi(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function mi(e){return e.replace(/^:/,"")}function di(e,t={}){this.properties=new hi(this),this.factory=new ni(this,this.properties),this.registry=new ci(e,this.properties),this.typeCache={},this.config=t}pi.prototype.build=function(){return function(e,t){let n={},i=Object(e);return f(t,(function(t){t in i&&(n[t]=e[t])})),n}(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},pi.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},pi.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,o=this.propertiesByName,a=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=r.indexOf(e);if(-1===s)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,a),o[i.name]=o[i.localName]=t},pi.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=li(r[0],i),a=li(r[1],o.prefix).name,s=this.propertiesByName[a];if(!s)throw new Error("refined property <"+a+"> not found");this.replaceProperty(s,e,n),delete e.redefines},pi.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},pi.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},pi.prototype.setBodyProperty=function(e,t){if(t&&this.bodyProperty)throw new Error("body property defined multiple times (<"+this.bodyProperty.ns.name+">, <"+e.ns.name+">)");this.bodyProperty=e},pi.prototype.setIdProperty=function(e,t){if(t&&this.idProperty)throw new Error("id property defined multiple times (<"+this.idProperty.ns.name+">, <"+e.ns.name+">)");this.idProperty=e},pi.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},pi.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},pi.prototype.hasProperty=function(e){return this.propertiesByName[e]},pi.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(f(e.properties,b((function(n){n=E({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var i=n.replaces,r=n.redefines;i||r?this.redefineProperty(n,i||r,i):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))}),this)),i.push(e),n[r]=e)},ci.prototype.getPackage=function(e){return this.packageMap[e]},ci.prototype.getPackages=function(){return this.packages},ci.prototype.registerPackage=function(e){e=E({},e);var t=this.packageMap;ui(t,e,"prefix"),ui(t,e,"uri"),f(e.types,b((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},ci.prototype.registerType=function(e,t){var n=li((e=E({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:E(e.meta||{})})).name,t.prefix),i=n.name,r={};f(e.properties,b((function(e){var t=li(e.name,n.prefix),i=t.name;ai(e.type)||(e.type=li(e.type,t.prefix).name),E(e,{ns:t,name:i}),r[i]=e}),this)),E(e,{ns:n,name:i,propertiesByName:r}),f(e.extends,b((function(e){var t=li(e,n.prefix),r=this.typeMap[t.name];r.traits=r.traits||[],r.traits.push(i)}),this)),this.definePackage(e,t),this.typeMap[i]=e},ci.prototype.mapTypes=function(e,t,n){var i=ai(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(n,i){var o=li(n,ai(n)?"":e.prefix);r.mapTypes(o,t,i)}function a(e){return o(e,!0)}if(!i)throw new Error("unknown type <"+e.name+">");f(i.superClass,n?a:function(e){return o(e,!1)}),t(i,!n),f(i.traits,a)},ci.prototype.getEffectiveDescriptor=function(e){var t=li(e),n=new pi(t);this.mapTypes(t,(function(e,t){n.addTrait(e,t)}));var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},ci.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},hi.prototype.set=function(e,t,n){if(!p(t)||!t.length)throw new TypeError("property name must be a non-empty string");var i=this.getProperty(e,t),r=i&&i.name;void 0===n?i?delete e[r]:delete e.$attrs[mi(t)]:i?r in e?e[r]=n:fi(e,i,n):e.$attrs[mi(t)]=n},hi.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[mi(t)];var i=n.name;return!e[i]&&n.isMany&&fi(e,n,[]),e[i]},hi.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;delete(n=E({},n,{get:function(){return i}})).value}Object.defineProperty(e,t,n)},hi.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},hi.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},hi.prototype.getProperty=function(e,t){var n=this.model,i=n.getPropertyDescriptor(e,t);if(i)return i;if(t.includes(":"))return null;const r=n.config.strict;if(void 0!==r){const n=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(r)throw n;"undefined"!=typeof console&&console.warn(n)}return null},di.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},di.prototype.getType=function(e){var t=this.typeCache,n=p(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},di.prototype.createAny=function(e,t,n){var o=li(e),s={$type:e,$instanceOf:function(e){return e===this.$type},get:function(e){return this[e]},set:function(e,t){!function(e,t,n){let o=e;f(t,(function(e,a){if("number"!=typeof e&&"string"!=typeof e)throw new Error("illegal key type: "+typeof e+". Key should be of type number or string.");if("constructor"===e)throw new Error("illegal key: constructor");if("__proto__"===e)throw new Error("illegal key: __proto__");let s=t[a+1],l=o[e];r(s)&&null==l&&(l=o[e]=isNaN(+s)?{}:[]),i(s)?i(n)?delete o[e]:o[e]=n:o=l}))}(this,[e],t)}},l={name:e,isGeneric:!0,ns:{prefix:o.prefix,localName:o.localName,uri:t}};return this.properties.defineDescriptor(s,l),this.properties.defineModel(s,this),this.properties.define(s,"get",{enumerable:!1,writable:!0}),this.properties.define(s,"set",{enumerable:!1,writable:!0}),this.properties.define(s,"$parent",{enumerable:!1,writable:!0}),this.properties.define(s,"$instanceOf",{enumerable:!1,writable:!0}),f(n,(function(e,t){a(e)&&void 0!==e.value?s[e.name]=e.value:s[t]=e})),s},di.prototype.getPackage=function(e){return this.registry.getPackage(e)},di.prototype.getPackages=function(){return this.registry.getPackages()},di.prototype.getElementDescriptor=function(e){return e.$descriptor},di.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},di.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},di.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var yi=String.fromCharCode,gi=Object.prototype.hasOwnProperty,vi=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,xi={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function wi(e,t,n,i){return i?gi.call(xi,i)?xi[i]:"&"+i+";":yi(t||parseInt(n,16))}function bi(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(vi,wi):e}Object.keys(xi).forEach((function(e){xi[e.toUpperCase()]=xi[e]}));var Ei="non-whitespace outside of root node";function _i(e){return new Error(e)}function Ai(e){return"missing namespace for prefix <"+e+">"}function Ri(e){return{get:e,enumerable:!0}}function ki(e){var t,n={};for(t in e)n[t]=e[t];return n}function Si(e){return e+"$uri"}function Ci(){return{line:0,column:0}}function Mi(e){throw e}function Pi(e){if(!this)return new Pi(e);var t,n,i,r,o,a,s,l,p,c=e&&e.proxy,u=Mi,h=Ci,f=!1,m=!1,d=null,y=!1;function g(e){e instanceof Error||(e=_i(e)),d=e,u(e,h)}function v(e){o&&(e instanceof Error||(e=_i(e)),o(e,h))}this.on=function(e,p){if("function"!=typeof p)throw _i("required args <name, cb>");switch(e){case"openTag":n=p;break;case"text":t=p;break;case"closeTag":i=p;break;case"error":u=p;break;case"warn":o=p;break;case"cdata":r=p;break;case"attention":l=p;break;case"question":s=p;break;case"comment":a=p;break;default:throw _i("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw _i("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return m=!0,p=n,this},this.parse=function(e){if("string"!=typeof e)throw _i("required args <xml=string>");return d=null,function(e){var o,u,d,x,w,b,E,_,A,R,k,S=m?[]:null,C=m?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[Si(n)]=t;return i}(p):null,M=[],P=0,N=!1,T=!1,D=0,B=0,O="",L=0;function I(){if(null!==k)return k;var e,t,n,i,r,o,a,s,l,c,u,h=m&&C.xmlns,d=m&&f?[]:null,y=L,g=O,x=g.length,w={},b={};e:for(;y<x;y++)if(l=!1,!(32===(c=g.charCodeAt(y))||c<14&&c>8)){for((c<65||c>122||c>90&&c<97)&&95!==c&&58!==c&&(v("illegal first char attribute name"),l=!0),u=y+1;u<x;u++)if(!((c=g.charCodeAt(u))>96&&c<123||c>64&&c<91||c>47&&c<59||46===c||45===c||95===c)){if(32===c||c<14&&c>8){v("missing attribute value"),y=u;continue e}if(61===c)break;v("illegal attribute name char"),l=!0}if("xmlns:xmlns"===(s=g.substring(y,u))&&(v("illegal declaration of xmlns"),l=!0),34===(c=g.charCodeAt(u+1)))-1===(u=g.indexOf('"',y=u+2))&&-1!==(u=g.indexOf("'",y))&&(v("attribute value quote missmatch"),l=!0);else if(39===c)-1===(u=g.indexOf("'",y=u+2))&&-1!==(u=g.indexOf('"',y))&&(v("attribute value quote missmatch"),l=!0);else for(v("missing attribute value quotes"),l=!0,u+=1;u<x&&!(32===(c=g.charCodeAt(u+1))||c<14&&c>8);u++);for(-1===u&&(v("missing closing quotes"),u=x,l=!0),l||(o=g.substring(y,u)),y=u;u+1<x&&!(32===(c=g.charCodeAt(u+1))||c<14&&c>8);u++)y===u&&(v("illegal character after attribute end"),l=!0);if(y=u+1,!l)if(s in b)v("attribute <"+s+"> already defined");else if(b[s]=!0,m)if(f){if(null!==(r="xmlns"===s?"xmlns":120===s.charCodeAt(0)&&"xmlns:"===s.substr(0,6)?s.substr(6):null)){if(e=bi(o),t=Si(r),!(a=p[e])){if("xmlns"===r||t in C&&C[t]!==e)do{a="ns"+P++}while(void 0!==C[a]);else a=r;p[e]=a}C[r]!==a&&(i||(C=ki(C),i=!0),C[r]=a,"xmlns"===r&&(C[Si(a)]=e,h=a),C[t]=e),w[s]=o;continue}d.push(s,o)}else-1!==(c=s.indexOf(":"))?(n=C[s.substring(0,c)])?w[s=h===n?s.substr(c+1):n+s.substr(c)]=o:v(Ai(s.substring(0,c))):w[s]=o;else w[s]=o}if(f)for(y=0,x=d.length;y<x;y++){if(s=d[y++],o=d[y],-1!==(c=s.indexOf(":"))){if(!(n=C[s.substring(0,c)])){v(Ai(s.substring(0,c)));continue}s=h===n?s.substr(c+1):n+s.substr(c)}w[s]=o}return k=w}function F(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,o=0,a=0,s=B;D>=a&&(t=i.exec(e))&&!((s=t[0].length+t.index)>D);)r+=1,a=s;return-1==D?(o=s,n=e.substring(B)):0===B?n=e.substring(B,D):(o=D-a,n=-1==B?e.substring(D):e.substring(D,B+1)),{data:n,line:r,column:o}}h=F,c&&(R=Object.create({},{name:Ri((function(){return _})),originalName:Ri((function(){return A})),attrs:Ri(I),ns:Ri((function(){return C}))}));for(;-1!==B;){if(-1===(D=60===e.charCodeAt(B)?B:e.indexOf("<",B)))return M.length?g("unexpected end of file"):0===B?g("missing start tag"):void(B<e.length&&e.substring(B).trim()&&v(Ei));if(B!==D)if(M.length){if(t&&(t(e.substring(B,D),bi,h),y))return}else if(e.substring(B,D).trim()&&(v(Ei),y))return;if(33===(w=e.charCodeAt(D+1))){if(91===(x=e.charCodeAt(D+2))&&"CDATA["===e.substr(D+3,6)){if(-1===(B=e.indexOf("]]>",D)))return g("unclosed cdata");if(r&&(r(e.substring(D+9,B),h),y))return;B+=3;continue}if(45===x&&45===e.charCodeAt(D+3)){if(-1===(B=e.indexOf("--\x3e",D)))return g("unclosed comment");if(a&&(a(e.substring(D+4,B),bi,h),y))return;B+=3;continue}}if(63!==w){for(u=D+1;;u++){if(b=e.charCodeAt(u),isNaN(b))return B=-1,g("unclosed tag");if(34===b)u=-1!==(x=e.indexOf('"',u+1))?x:u;else if(39===b)u=-1!==(x=e.indexOf("'",u+1))?x:u;else if(62===b){B=u;break}}if(33!==w){if(k={},47===w){if(N=!1,T=!0,!M.length)return g("missing open tag");if(u=_=M.pop(),x=D+2+u.length,e.substring(D+2,x)!==u)return g("closing tag mismatch");for(;x<B;x++)if(!(32===(w=e.charCodeAt(x))||w>8&&w<14))return g("close tag")}else{if(47===e.charCodeAt(B-1)?(u=_=e.substring(D+1,B-1),N=!0,T=!0):(u=_=e.substring(D+1,B),N=!0,T=!1),!(w>96&&w<123||w>64&&w<91||95===w||58===w))return g("illegal first char nodeName");for(x=1,d=u.length;x<d;x++)if(!((w=u.charCodeAt(x))>96&&w<123||w>64&&w<91||w>47&&w<59||45===w||95===w||46==w)){if(32===w||w<14&&w>8){_=u.substring(0,x),k=null;break}return g("invalid nodeName")}T||M.push(_)}if(m){if(o=C,N&&(T||S.push(o),null===k&&(f=-1!==u.indexOf("xmlns",x))&&(L=x,O=u,I(),f=!1)),A=_,-1!==(w=_.indexOf(":"))){if(!(E=C[_.substring(0,w)]))return g("missing namespace on <"+A+">");_=_.substr(w+1)}else E=C.xmlns;E&&(_=E+":"+_)}if(N&&(L=x,O=u,n&&(c?n(R,bi,T,h):n(_,I,bi,T,h),y)))return;if(T){if(i&&(i(c?R:_,bi,N,h),y))return;m&&(C=N?o:S.pop())}B+=1}else{if(l&&(l(e.substring(D,B+1),bi,h),y))return;B+=1}}else{if(-1===(B=e.indexOf("?>",D)))return g("unclosed question");if(s&&(s(e.substring(D,B+2),h),y))return;B+=2}}}(e),h=Ci,y=!1,d},this.stop=function(){y=!0}}function Ni(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var Ti={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},Di="property";function Bi(e){return e.xml&&e.xml.serialize}function Oi(e,t){return Ni(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function Li(e){return new Error(e)}function Ii(e){return e.$descriptor}function Fi(e){E(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw Li("expected element");var t,n=this.elementsById,i=Ii(e).idProperty;if(i&&(t=e.get(i.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw Li("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function ji(){}function Vi(){}function Wi(){}function $i(e,t){this.property=e,this.context=t}function zi(e,t){this.element=t,this.propertyDesc=e}function Gi(){}function Hi(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function Ki(e,t,n){Hi.call(this,e,t,n)}function Ui(e,t,n){this.model=e,this.context=n}function qi(e){e instanceof di&&(e={model:e}),E(this,{lax:!1},e)}ji.prototype.handleEnd=function(){},ji.prototype.handleText=function(){},ji.prototype.handleNode=function(){},Vi.prototype=Object.create(ji.prototype),Vi.prototype.handleNode=function(){return this},Wi.prototype=Object.create(ji.prototype),Wi.prototype.handleText=function(e){this.body=(this.body||"")+e},$i.prototype=Object.create(Wi.prototype),$i.prototype.handleNode=function(e){if(this.element)throw Li("expected no sub nodes");return this.element=this.createReference(e),this},$i.prototype.handleEnd=function(){this.element.id=this.body},$i.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},zi.prototype=Object.create(Wi.prototype),zi.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=oi(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},Gi.prototype=Object.create(Wi.prototype),Gi.prototype.handleNode=function(e){var t=this,n=this.element;return n?t=this.handleChild(e):(n=this.element=this.createElement(e),this.context.addElement(n)),t},Hi.prototype=Object.create(Gi.prototype),Hi.prototype.addReference=function(e){this.context.addReference(e)},Hi.prototype.handleText=function(e){if(!Ii(this.element).bodyProperty)throw Li("unexpected body text <"+e+">");Wi.prototype.handleText.call(this,e)},Hi.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Ii(t).bodyProperty;n&&void 0!==e&&(e=oi(n.type,e),t.set(n.name,e))},Hi.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=Ii(i),o=this.context,a=new i({}),s=this.model;return f(n,(function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?f(e.split(" "),(function(e){o.addReference({element:a,property:i.ns.name,id:e})})):o.addReference({element:a,property:i.ns.name,id:e}):(i?e=oi(i.type,e):"xmlns"===n?n=":"+n:(t=li(n,r.ns.prefix),s.getPackage(t.prefix)&&o.addWarning({message:"unknown attribute <"+n+">",element:a,property:n,value:e})),a.set(n,e))})),a},Hi.prototype.getPropertyForNode=function(e){var t=li(e.name),n=this.type,i=this.model,r=Ii(n),o=t.name,a=r.propertiesByName[o];if(a&&!a.isAttr){const t=function(e){const t=Bi(e);return t!==Di&&(t||null)}(a);if(t){const n=e.attributes[t];if(n){const t=function(e,t,n){const i=li(e,t.xmlns),r=li(`${t[i.prefix]||i.prefix}:${i.localName}`);return function(e,t){var n=e.name,i=e.localName,r=t&&t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(r,n.getPackage(r.prefix))}(n,e.ns,i);return E({},a,{effectiveType:Ii(i.getType(t)).name})}}return a}var s=i.getPackage(t.prefix);if(s){const e=Oi(t,s),n=i.getType(e);if(a=u(r.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})))return E({},a,{effectiveType:Ii(n).name})}else if(a=u(r.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})))return a;throw Li("unrecognized element <"+t.name+">")},Hi.prototype.toString=function(){return"ElementDescriptor["+Ii(this.type).name+"]"},Hi.prototype.valueHandler=function(e,t){return new zi(e,t)},Hi.prototype.referenceHandler=function(e){return new $i(e,this.context)},Hi.prototype.handler=function(e){return"Element"===e?new Ui(this.model,e,this.context):new Hi(this.model,e,this.context)},Hi.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,si(n=t.effectiveType||t.type))return this.valueHandler(t,i);var o=(r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==o&&(t.isMany?i.get(t.name).push(o):i.set(t.name,o),t.isReference?(E(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},Ki.prototype=Object.create(Hi.prototype),Ki.prototype.createElement=function(e){var t=e.name,n=li(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),a=o&&Oi(n,o)||t;if(!r.hasType(a))throw Li("unexpected element <"+e.originalName+">");return Hi.prototype.createElement.call(this,e)},Ui.prototype=Object.create(Gi.prototype),Ui.prototype.createElement=function(e){var t=e.name,n=li(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},Ui.prototype.handleChild=function(e){var t=new Ui(this.model,"Element",this.context).handleNode(e),n=this.element,i=t.element;return void 0!==i&&((n.$children=n.$children||[]).push(i),i.$parent=n),t},Ui.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},qi.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof Hi?(i=t,t={}):"string"==typeof t?(i=this.handler(t),t={}):"string"==typeof i&&(i=this.handler(i));var r=this.model,o=this.lax,a=new Fi(E({},t,{rootHandler:i})),s=new Pi({proxy:!0}),l=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function p(e,t,n){var i=t(),r=i.line,o=i.column,s=i.data;"<"===s.charAt(0)&&-1!==s.indexOf(" ")&&(s=s.slice(0,s.indexOf(" "))+">");var l="unparsable content "+(s?s+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return a.addWarning({message:l,error:e}),!0;throw Li(l)}function c(e,t){return p(e,t,!0)}i.context=a,l.push(i);var u=/^<\?xml /i,h=/ encoding="([^"]+)"/i,f=/^utf-8$/i;function m(e,t){try{l.peek().handleText(e)}catch(e){c(e,t)}}var d=r.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),Object.entries(Ti).reduce((function(e,[t,n]){return e[n]=t,e}),r.config&&r.config.nsMap||{}));return s.ns(d).on("openTag",(function(e,t,n,i){var r=e.attrs||{},a=Object.keys(r).reduce((function(e,n){var i=t(r[n]);return e[n]=i,e}),{});!function(e,t){var n=l.peek();try{l.push(n.handleNode(e))}catch(e){p(e,t,o)&&l.push(new Vi)}}({name:e.name,originalName:e.originalName,attributes:a,ns:e.ns},i)})).on("question",(function(e){if(u.test(e)){var t=h.exec(e),n=t&&t[1];n&&!f.test(n)&&a.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}})).on("closeTag",(function(){l.pop().handleEnd()})).on("cdata",m).on("text",(function(e,t,n){!function(e,t){e.trim()&&m(e,t)}(t(e),n)})).on("error",p).on("warn",c),new Promise((function(t,n){var r;try{s.parse(e),function(){var e,t,n=a.elementsById,i=a.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],s=Ii(r).propertiesByName[t.property];if(o||a.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),s.isMany){var l=r.get(s.name),p=l.indexOf(t);-1===p&&(p=l.length),o?l[p]=o:l.splice(p,1)}else r.set(s.name,o)}}()}catch(e){r=e}var o=i.element;r||o||(r=Li("failed to parse document as <"+i.type.$descriptor.name+">"));var l=a.warnings,p=a.references,c=a.elementsById;return r?(r.warnings=l,n(r)):t({rootElement:o,elementsById:c,references:p,warnings:l})}))},qi.prototype.handler=function(e){return new Ki(this.model,e)};var Yi=/<|>|'|"|&|\n\r|\n/g,Xi=/<|>|&/g;function Zi(e){this.prefixMap={},this.uriMap={},this.used={},this.wellknown=[],this.custom=[],this.parent=e,this.defaultPrefixMap=e&&e.defaultPrefixMap||{}}function Ji(e,t){return Ni(t)?(n=e).charAt(0).toLowerCase()+n.slice(1):e;var n}function Qi(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function er(e){return p(e)?e:(e.prefix?e.prefix+":":"")+e.localName}Zi.prototype.mapDefaultPrefixes=function(e){this.defaultPrefixMap=e},Zi.prototype.defaultUriByPrefix=function(e){return this.defaultPrefixMap[e]},Zi.prototype.byUri=function(e){return this.uriMap[e]||this.parent&&this.parent.byUri(e)},Zi.prototype.add=function(e,t){this.uriMap[e.uri]=e,t?this.wellknown.push(e):this.custom.push(e),this.mapPrefix(e.prefix,e.uri)},Zi.prototype.uriByPrefix=function(e){return this.prefixMap[e||"xmlns"]||this.parent&&this.parent.uriByPrefix(e)},Zi.prototype.mapPrefix=function(e,t){this.prefixMap[e||"xmlns"]=t},Zi.prototype.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},Zi.prototype.logUsed=function(e){var t=e.uri,n=this.getNSKey(e);this.used[n]=this.byUri(t),this.parent&&this.parent.logUsed(e)},Zi.prototype.getUsed=function(e){return[].concat(this.wellknown,this.custom).filter((e=>{var t=this.getNSKey(e);return this.used[t]}))};var tr={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},nr={"<":"lt",">":"gt","&":"amp"};function ir(e,t,n){return(e=p(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function rr(e){this.tagName=e}function or(){}function ar(e){this.tagName=e}function sr(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function lr(e,t,n){sr.call(this,e,t),this.serialization=n}function pr(){this.value="",this.write=function(e){this.value+=e}}function cr(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function ur(e){return e=E({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new pr,r=new cr(i,e.format);e.preamble&&r.append('<?xml version="1.0" encoding="UTF-8"?>\n');var o=new sr,a=t.$model;if(o.getNamespaces().mapDefaultPrefixes(function(e){const t=e.config&&e.config.nsMap||{},n={};for(const e in Ti)n[e]=Ti[e];for(const e in t){n[t[e]]=e}for(const t of e.getPackages())n[t.prefix]=t.uri;return n}(a)),o.build(t).serializeTo(r),!n)return i.value}}}function hr(e,t){di.call(this,e,t)}rr.prototype.build=function(e){return this.element=e,this},rr.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},or.prototype.serializeValue=or.prototype.serializeTo=function(e){e.append(this.escape?ir(this.value,Xi,nr):this.value)},or.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(Xi)&&(this.escape=!0),this},Qi(ar,or),ar.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},sr.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,o=i.isGeneric;return t=o?this.parseGenericNsAttributes(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),o?this.parseGenericContainments(e):(n=function(e){return h(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!c(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)}))}(e),this.parseAttributes(h(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return h(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},sr.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?E({localName:t.ns.localName},e):E({localName:Ji(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},sr.prototype.nsPropertyTagName=function(e){return function(e,t){return E({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},sr.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},sr.prototype.nsAttributeName=function(e){var t;if(t=p(e)?li(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:E({localName:t.localName},n)},sr.prototype.parseGenericNsAttributes=function(e){return Object.entries(e).filter((([t,n])=>!t.startsWith("$")&&this.parseNsAttribute(e,t,n))).map((([e,t])=>({name:e,value:t})))},sr.prototype.parseGenericContainments=function(e){var t=e.$body;t&&this.body.push((new or).build({type:"String"},t));var n=e.$children;n&&f(n,(e=>{this.body.push(new sr(this).build(e))}))},sr.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=li(t);if("xmlns"===o.prefix&&(i={prefix:o.localName,uri:n}),o.prefix||"xmlns"!==o.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var a=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(a)}},sr.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,i=[];return f(n,(function(n,r){var o=t.parseNsAttribute(e,r,n);o&&i.push(o)})),i},sr.prototype.parseGenericAttributes=function(e,t){var n=this;f(t,(function(t){try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){"undefined"!=typeof console&&console.warn(`missing namespace information for <${t.name}=${t.value}> on`,e,n)}}))},sr.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;f(e,(function(e){var r=i.get(e.name),o=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new or).build(e,r[0]));else if(si(e.type))f(r,(function(i){n.push(new ar(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(o)f(r,(function(i){n.push(new rr(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var a=Bi(e);f(r,(function(i){var r;r=a?a===Di?new sr(t,e):new lr(t,e,a):new sr(t),n.push(r.build(i))}))}}))},sr.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new Zi(t):n=t),n},sr.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,o=e.prefix;return i.byUri(r)&&!n||i.add(e,t),i.mapPrefix(o,r),e},sr.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.getNamespaces(t),a=e.prefix,s=e.uri;if(!a&&!s)return{localName:e.localName};if(r=o.defaultUriByPrefix(a),!(s=s||r||o.uriByPrefix(a)))throw new Error("no namespace uri given for prefix <"+a+">");if((e=o.byUri(s))||a||(e=this.logNamespace({uri:s},r===s,!0)),!e){for(n=a,i=1;o.uriByPrefix(n);)n=a+"_"+i++;e=this.logNamespace({prefix:n,uri:s},r===s)}return a&&o.mapPrefix(a,s),e},sr.prototype.parseAttributes=function(e){var t=this,n=this.element;f(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];f(i,(function(e){r.push(e.id)})),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},sr.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),er(e)},sr.prototype.addAttribute=function(e,t){var n=this.attrs;p(t)&&(t=ir(t,Yi,tr));var i=function(e,t){const n=v(t);let i=o(e)?-1:void 0;return f(e,(function(e,t){if(n(e,t))return i=t,!1})),i}(n,(function(t){return t.name.localName===e.localName&&t.name.uri===e.uri&&t.name.prefix===e.prefix})),r={name:e,value:t};-1!==i?n.splice(i,1,r):n.push(r)},sr.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=function(e){return e.getUsed().filter((function(e){return"xml"!==e.prefix})).map((function(e){return{name:"xmlns"+(e.prefix?":"+e.prefix:""),value:e.uri}}))}(n).concat(t)),f(t,(function(t){e.append(" ").append(er(t.name)).append('="').append(t.value).append('"')}))},sr.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==or;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),f(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},Qi(lr,sr),lr.prototype.parseNsAttributes=function(e){var t=sr.prototype.parseNsAttributes.call(this,e).filter((e=>e.name!==this.serialization)),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),o=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(this.serialization),(i.prefix?i.prefix+":":"")+o+n.ns.localName),t},lr.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},hr.prototype=Object.create(di.prototype),hr.prototype.fromXML=function(e,t,n){p(t)||(n=t,t="bpmn:Definitions");var i=new qi(E({model:this,lax:!0},n)),r=i.handler(t);return i.fromXML(e,r)},hr.prototype.toXML=function(e,t){var n=new ur(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(e){return i(e)}}))};const fr={bpmn:{name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",prefix:"bpmn",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],enumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],xml:{tagAlias:"lowerCase",typePrefix:"t"}},bpmndi:{name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",prefix:"bpmndi",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],enumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[]},dc:{name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",prefix:"dc",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],associations:[]},di:{name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",prefix:"di",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],associations:[],xml:{tagAlias:"lowerCase"}},bioc:{name:"bpmn.io colors for BPMN",uri:"http://bpmn.io/schema/bpmn/biocolor/1.0",prefix:"bioc",types:[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]},color:{name:"BPMN in Color",uri:"http://www.omg.org/spec/BPMN/non-normative/color/1.0",prefix:"color",types:[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]}};function mr(e,t){return new hr(E({},fr,e),t)}function dr(e,t){return e.$instanceOf(t)}function yr(e){var t={},n=[],i={};function r(e,t){return function(n){e(n,t)}}function o(e){t[e.id]=e}function a(t,n){try{var r=i[t.id]&&function(t,n){if(t.gfx)throw new Error(`already rendered ${yt(t)}`);return e.element(t,i[t.id],n)}(t,n);return o(t),r}catch(e){s(e.message,{element:t,error:e}),console.error(`failed to import ${yt(t)}`,e)}}function s(t,n){e.error(t,n)}var l=this.registerDi=function(e){var t,n=e.bpmnElement;n?i[n.id]?s(`multiple DI elements defined for ${yt(n)}`,{element:n}):(i[n.id]=e,c(t=n,"di")||Object.defineProperty(t,"di",{enumerable:!1,get:function(){throw new Error("Tried to access di from the businessObject. The di is available through the diagram element only. For more information, see https://github.com/bpmn-io/bpmn-js/issues/1472")}})):s(`no bpmnElement referenced in ${yt(e)}`,{element:e})};function p(e){var t;t=e.plane,l(t),f(t.planeElement,m)}function m(e){l(e)}this.handleDefinitions=function(o,a){var c=o.diagrams;if(a&&-1===c.indexOf(a))throw new Error("diagram not part of <bpmn:Definitions />");if(!a&&c&&c.length&&(a=c[0]),!a)throw new Error("no diagram to display");i={},p(a);var m=a.plane;if(!m)throw new Error(`no plane for ${yt(a)}`);var v=m.bpmnElement;if(!v){if(v=function(e){return u(e.rootElements,(function(e){return dr(e,"bpmn:Process")||dr(e,"bpmn:Collaboration")}))}(o),!v)throw new Error("no process or collaboration to display");s(`correcting missing bpmnElement on ${yt(m)} to ${yt(v)}`),m.bpmnElement=v,l(m)}var x,w,b=function(t,n){return e.root(t,i[t.id],n)}(v,m);if(dr(v,"bpmn:Process")||dr(v,"bpmn:SubProcess"))y(v,b);else{if(!dr(v,"bpmn:Collaboration"))throw new Error(`unsupported bpmnElement for ${yt(m)}: ${yt(v)}`);w=b,f((x=v).participants,r(P,w)),E(x.artifacts,w),n.push((function(){!function(e,t){f(e,r(g,t))}(x.messageFlows,w)})),function(e,n){var i=h(e,(function(e){return!t[e.id]&&dr(e,"bpmn:Process")&&e.laneSets}));i.forEach(r(y,n))}(o.rootElements,b)}d(n)};var d=this.handleDeferred=function(){for(;n.length;)n.shift()()};function y(e,t){M(e,t),_(e.ioSpecification,t),E(e.artifacts,t),o(e)}function g(e,t){a(e,t)}function v(e,t){a(e,t)}function x(e,t){a(e,t)}function w(e,t){a(e,t)}function b(e,t){a(e,t)}function E(e,t){f(e,(function(e){dr(e,"bpmn:Association")?n.push((function(){b(e,t)})):b(e,t)}))}function _(e,t){e&&(f(e.dataInputs,r(x,t)),f(e.dataOutputs,r(w,t)))}var A=this.handleSubProcess=function(e,t){M(e,t),E(e.artifacts,t)};function R(e,t){var i=a(e,t);dr(e,"bpmn:SubProcess")&&A(e,i||t),dr(e,"bpmn:Activity")&&_(e.ioSpecification,t),n.push((function(){f(e.dataInputAssociations,r(v,t)),f(e.dataOutputAssociations,r(v,t))}))}function k(e,t){a(e,t)}function S(e,t){n.push((function(){var n=a(e,t);e.childLaneSet&&C(e.childLaneSet,n||t),function(e){f(e.flowNodeRef,(function(t){var n=t.get("lanes");n&&n.push(e)}))}(e)}))}function C(e,t){f(e.lanes,r(S,t))}function M(e,t){!function(e,t){f(e,(function(e){dr(e,"bpmn:SequenceFlow")?n.push((function(){!function(e,t){a(e,t)}(e,t)})):dr(e,"bpmn:BoundaryEvent")?n.unshift((function(){R(e,t)})):dr(e,"bpmn:FlowNode")?R(e,t):dr(e,"bpmn:DataObject")||(dr(e,"bpmn:DataStoreReference")||dr(e,"bpmn:DataObjectReference")?k(e,t):s(`unrecognized flowElement ${yt(e)} in context ${yt(t&&t.businessObject)}`,{element:e,context:t}))}))}(e.flowElements,t),e.laneSets&&function(e,t){f(e,r(C,t))}(e.laneSets,t)}function P(e,t){var n=a(e,t),i=e.processRef;i&&y(i,n||t)}}function gr(e,t,n){var i,r,o,a=[];function s(e,t){var n=new yr({root:function(e,t){return i.add(e,t)},element:function(e,t,n){return i.add(e,t,n)},error:function(e,t){a.push({message:e,context:t})}});t=t||e.diagrams&&e.diagrams[0];var r=function(e,t){if(!t||!t.plane)return;var n,i=t.plane.bpmnElement,r=i;A(i,"bpmn:Process")||A(i,"bpmn:Collaboration")||(r=function(e){var t=e;for(;t;){if(A(t,"bpmn:Process"))return t;t=t.$parent}}
|
H A D | bpmn-modeler.production.min.js | 27 function(e){const t=he('<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+Er+"</a>");q(fe("svg",t),Sr),q(t,Cr,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(t),oe.bind(t,"click",(function(e){Mr(),e.preventDefault()}))}(this._container)}function Dr(e,t){return e.warnings=t,e}e(Tr,Zn),Tr.prototype.importXML=async function(e,t){const n=this;let i=[];try{let o;e=this._emit("import.parse.start",{xml:e})||e;try{o=await this._moddle.fromXML(e,"bpmn:Definitions")}catch(e){throw this._emit("import.parse.complete",{error:e}),e}let a=o.rootElement;const s=o.references,c=o.warnings,p=o.elementsById;i=i.concat(c),a=this._emit("import.parse.complete",(r={error:null,definitions:a,elementsById:p,references:s,warnings:i},n.get("eventBus").createEvent(r)))||a;const l=await this.importDefinitions(a,t);return i=i.concat(l.warnings),this._emit("import.done",{error:null,warnings:i}),{warnings:i}}catch(e){let t=e;throw i=i.concat(t.warnings||[]),Dr(t,i),t=function(e){const t=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);t&&(e.message="unparsable content <"+t[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+t[2]);return e}(t),this._emit("import.done",{error:t,warnings:t.warnings}),t}var r},Tr.prototype.importDefinitions=async function(e,t){this._setDefinitions(e);return{warnings:(await this.open(t)).warnings}},Tr.prototype.open=async function(e){const t=this._definitions;let n=e;if(!t){const e=new Error("no XML imported");throw Dr(e,[]),e}if("string"==typeof e&&(n=function(e,t){if(!t)return null;return m(e.diagrams,(function(e){return e.id===t}))||null}(t,e),!n)){const t=new Error("BPMNDiagram <"+e+"> not found");throw Dr(t,[]),t}try{this.clear()}catch(e){throw Dr(e,[]),e}const{warnings:i}=await _r(this,t,n);return{warnings:i}},Tr.prototype.saveXML=async function(e){e=e||{};let t,n,i=this._definitions;try{if(!i)throw new Error("no definitions loaded");i=this._emit("saveXML.start",{definitions:i})||i;n=(await this._moddle.toXML(i,e)).xml,n=this._emit("saveXML.serialized",{xml:n})||n}catch(e){t=e}const r=t?{error:t}:{xml:n};if(this._emit("saveXML.done",r),t)throw t;return r},Tr.prototype.saveSVG=async function(){let e,t;this._emit("saveSVG.start");try{const t=this.get("canvas"),n=t.getActiveLayer(),i=fe(":scope > defs",t._svg),r=Ie(n),o=i?"<defs>"+Ie(i)+"</defs>":"",a=n.getBBox();e='<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- created with bpmn-js / http://bpmn.io --\x3e\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a.width+'" height="'+a.height+'" viewBox="'+a.x+" "+a.y+" "+a.width+" "+a.height+'" version="1.1">'+o+r+"</svg>"}catch(e){t=e}if(this._emit("saveSVG.done",{error:t,svg:e}),t)throw t;return{svg:e}},Tr.prototype._setDefinitions=function(e){this._definitions=e},Tr.prototype.getModules=function(){return this._modules},Tr.prototype.clear=function(){this.getDefinitions()&&Zn.prototype.clear.call(this)},Tr.prototype.destroy=function(){Zn.prototype.destroy.call(this),ve(this._container)},Tr.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},Tr.prototype.off=function(e,t){this.get("eventBus").off(e,t)},Tr.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=fe(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},Tr.prototype.getDefinitions=function(){return this._definitions},Tr.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},Tr.prototype._init=function(e,t,n){const i=n.modules||this.getModules(n),r=n.additionalModules||[],o=[].concat([{bpmnjs:["value",this],moddle:["value",t]}],i,r),a=L(I(n,["additionalModules"]),{canvas:L({},n.canvas,{container:e}),modules:o});Zn.call(this,a),n&&n.container&&this.attachTo(n.container)},Tr.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},Tr.prototype._createContainer=function(e){const t=he('<div class="bjs-container"></div>');return q(t,{width:Nr(e.width),height:Nr(e.height),position:e.position}),t},Tr.prototype._createModdle=function(e){return new ur(L({},this._moddleExtensions,e.moddleExtensions))},Tr.prototype._modules=[];const Br={width:"100%",height:"100%",position:"relative"};function Nr(e){return e+(u(e)?"px":"")}function jr(e){Tr.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 Or(e,t){return!vr(e,"bpmn:CallActivity")&&(vr(e,"bpmn:SubProcess")?!(!(t=t||br(e))||!vr(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded:!vr(e,"bpmn:Participant")||!!gr(e).processRef)}function Lr(e){if(vr(e,"bpmn:Participant")||vr(e,"bpmn:Lane")){var t=br(e).isHorizontal;return void 0===t||t}}function $r(e){return e&&!!gr(e).triggeredByEvent}function Ir(e,t){return w(gr(e).eventDefinitions,(function(e){return vr(e,t)}))}e(jr,Tr),jr.prototype._createModdle=function(e){var t=Tr.prototype._createModdle.call(this,e);return t.ids=new n([32,36,1]),t},jr.prototype._collectIds=function(e,t){var n,i=e.$model.ids;for(n in i.clear(),t)i.claim(n,t[n])};var Fr={width:90,height:20};function zr(e){return vr(e,"bpmn:Event")||vr(e,"bpmn:Gateway")||vr(e,"bpmn:DataStoreReference")||vr(e,"bpmn:DataObjectReference")||vr(e,"bpmn:DataInput")||vr(e,"bpmn:DataOutput")||vr(e,"bpmn:SequenceFlow")||vr(e,"bpmn:MessageFlow")||vr(e,"bpmn:Group")}function Hr(e){return cn(e.label)}function Vr(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 Gr(e){return e.waypoints?Vr(e.waypoints):vr(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+Fr.height/2}:{x:e.x+e.width/2,y:e.y+e.height+Fr.height/2}}function Wr(e){return vr(e,"bpmn:FlowElement")||vr(e,"bpmn:Participant")||vr(e,"bpmn:Lane")||vr(e,"bpmn:SequenceFlow")||vr(e,"bpmn:MessageFlow")||vr(e,"bpmn:DataInput")||vr(e,"bpmn:DataOutput")?"name":vr(e,"bpmn:TextAnnotation")?"text":vr(e,"bpmn:Group")?"categoryValueRef":void 0}function Ur(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]||""}var qr="hsl(225, 10%, 15%)";function Kr(e,t){return w(e.eventDefinitions,(function(e){return e.$type===t}))}function Yr(e,t,n){var i=br(e);return n||i.get("color:background-color")||i.get("bioc:fill")||t||"white"}function Xr(e,t,n){var i=br(e);return n||i.get("color:border-color")||i.get("bioc:stroke")||t||qr}function Zr(e,t,n,i){var r=br(e).get("label");return i||r&&r.get("color:color")||t||Xr(e,n)}function Qr(e,t={}){return{width:Jr(e,t),height:eo(e,t)}}function Jr(e,t={}){return f(t,"width")?t.width:e.width}function eo(e,t={}){return f(t,"height")?t.height:e.height}var to=new n,no=.95;function io(e,t,n,i,r,o,a){Je.call(this,t,a);var s=e&&e.defaultFillColor,c=e&&e.defaultStrokeColor,p=e&&e.defaultLabelColor;function u(e){return n.computeStyle(e,{strokeLinecap:"round",strokeLinejoin:"round",stroke:qr,strokeWidth:2,fill:"white"})}function h(e){return n.computeStyle(e,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:qr,strokeWidth:2})}function d(e,t){var{ref:n={x:0,y:0},scale:i=1,element:o,parentGfx:a=r._svg}=t,s=Ae("marker",{id:e,viewBox:"0 0 20 20",refX:n.x,refY:n.y,markerWidth:20*i,markerHeight:20*i,orient:"auto"});ye(s,o);var c=fe(":scope > defs",a);c||ye(a,c=Ae("defs")),ye(c,s)}function f(e,t,n,i){var r=to.nextPrefixed("marker-");return function(e,t,n,i,r){if("sequenceflow-end"===n){d(t,{element:Ae("path",{d:"M 1 5 L 11 10 L 1 15 Z",...u({fill:r,stroke:r,strokeWidth:1})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("messageflow-start"===n){d(t,{element:Ae("circle",{cx:6,cy:6,r:3.5,...u({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:6,y:6},parentGfx:e})}if("messageflow-end"===n){d(t,{element:Ae("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...u({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:8.5,y:5},parentGfx:e})}if("association-start"===n){d(t,{element:Ae("path",{d:"M 11 5 L 1 10 L 11 15",...h({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:1,y:10},scale:.5,parentGfx:e})}if("association-end"===n){d(t,{element:Ae("path",{d:"M 1 5 L 11 10 L 1 15",...h({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("conditional-flow-marker"===n){d(t,{element:Ae("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...u({fill:i,stroke:r})}),ref:{x:-1,y:10},scale:.5,parentGfx:e})}if("conditional-default-flow-marker"===n){d(t,{element:Ae("path",{d:"M 6 4 L 10 16",...u({stroke:r,fill:"none"})}),ref:{x:0,y:10},scale:.5,parentGfx:e})}}(e,r,t,n,i),"url(#"+r+")"}function m(e,t,n,i,r={}){l(i)&&(r=i,i=0),i=i||0,r=u(r);var o=Ae("circle",{cx:t/2,cy:n/2,r:Math.round((t+n)/4-i),...r});return ye(e,o),o}function v(e,t,n,i,r,o){l(r)&&(o=r,r=0),r=r||0,o=u(o);var a=Ae("rect",{x:r,y:r,width:t-2*r,height:n-2*r,rx:i,ry:i,...o});return ye(e,a),a}function y(e,t,n,i){var r=ot(t,n=h(n),i);return ye(e,r),r}function b(e,t,n){return y(e,t,n,5)}function _(e,t,n){n=h(n);var i=Ae("path",{...n,d:t});return ye(e,i),i}function x(e,t,n,i){return _(t,n,L({"data-marker":e},i))}function w(e){return Q[e]}function E(e){return function(t,n,i){return w(e)(t,n,i)}}var S=function(e,t,n={},r){return _(e,i.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),{fill:r?Xr(t,c,n.stroke):Yr(t,s,n.fill),stroke:r?Yr(t,s,n.fill):Xr(t,c,n.stroke),strokeWidth:1})},C=function(e,t,n={}){var r=m(e,t.width,t.height,.2*t.height,{fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:2});_(e,i.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),{stroke:Xr(t,c,n.stroke),strokeWidth:2});for(var o=0;o<12;o++){var a=i.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),p=t.width/2,l=t.height/2;_(e,a,{strokeWidth:1,stroke:Xr(t,c,n.stroke),transform:"rotate("+30*o+","+l+","+p+")"})}return r},k=function(e,t,n={},r){return _(e,i.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{fill:r?Xr(t,c,n.stroke):Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:1})},R=function(e,t,n={}){return _(e,i.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}}),{fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:1})},P=function(e,t,n={},r){return _(e,i.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{fill:r?Xr(t,c,n.stroke):Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:1})},A=function(e,t,n={},r){return _(e,i.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),{fill:r?Xr(t,c,n.stroke):Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:1})},M=function(e,t,n={},r){var o=_(e,i.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{fill:r?Xr(t,c,n.stroke):"none",stroke:Xr(t,c,n.stroke),strokeWidth:1});return Un(o,45),o},T=function(e,t,n={},r){return _(e,i.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.22,my:.5}}),{fill:r?Xr(t,c,n.stroke):Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:1})},D=function(e,t,n={},r){return _(e,i.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:r?Xr(t,c,n.stroke):Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke)})},B=function(e,t,n={},r){return _(e,i.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),{fill:r?Xr(t,c,n.stroke):Yr(t,s,n.fill),strokeWidth:1})},N=function(e,t,n={}){return _(e,i.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}}),{fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:1})},j=function(e,t,n={}){return m(e,t.width,t.height,8,{fill:Xr(t,c,n.stroke),stroke:Xr(t,c,n.stroke),strokeWidth:4})};function O(e,t,n={}){var i=gr(e),r=function(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}(i);return i.get("eventDefinitions")&&i.get("eventDefinitions").length>1?i.get("parallelMultiple")?N(t,e,n,r):B(t,e,n,r):Kr(i,"bpmn:MessageEventDefinition")?S(t,e,n,r):Kr(i,"bpmn:TimerEventDefinition")?C(t,e,n,r):Kr(i,"bpmn:ConditionalEventDefinition")?R(t,e,n,r):Kr(i,"bpmn:SignalEventDefinition")?D(t,e,n,r):Kr(i,"bpmn:EscalationEventDefinition")?k(t,e,n,r):Kr(i,"bpmn:LinkEventDefinition")?P(t,e,n,r):Kr(i,"bpmn:ErrorEventDefinition")?A(t,e,n,r):Kr(i,"bpmn:CancelEventDefinition")?M(t,e,n,r):Kr(i,"bpmn:CompensateEventDefinition")?T(t,e,n,r):Kr(i,"bpmn:TerminateEventDefinition")?j(t,e,n,r):null}var $={ParticipantMultiplicityMarker:function(e,t,n={}){var r=Jr(t,n),o=eo(t,n);x("participant-multiplicity",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2-6)/r,my:(o-15)/o}}),{strokeWidth:2,fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke)})},SubProcessMarker:function(e,t,n={}){Wn(v(e,14,14,0,{strokeWidth:1,fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke)}),t.width/2-7.5,t.height-20),x("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:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke)})},ParallelMarker:function(e,t,n){var r=Jr(t,n),o=eo(t,n);x("parallel",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.parallel)/r,my:(o-20)/o}}),{fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke)})},SequentialMarker:function(e,t,n){x("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:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke)})},CompensationMarker:function(e,t,n){x("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:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke)})},LoopMarker:function(e,t,n){var r=Jr(t,n),o=eo(t,n);x("loop",e,i.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.loop)/r,my:(o-7)/o}}),{strokeWidth:1.5,fill:"none",stroke:Xr(t,c,n.stroke),strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){var r=Jr(t,n),o=eo(t,n);x("adhoc",e,i.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.adhoc)/r,my:(o-15)/o}}),{strokeWidth:1,fill:Xr(t,c,n.stroke),stroke:Xr(t,c,n.stroke)})}};function I(e,t,n,i){$[e](t,n,i)}function F(e,t,n,i={}){i={fill:i.fill,stroke:i.stroke,width:Jr(t,i),height:eo(t,i)};var r=gr(t),o=n&&n.includes("SubProcessMarker");i=o?{...i,seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{...i,seq:-5,parallel:-6,compensation:-27,loop:0,adhoc:10},g(n,(function(n){I(n,e,t,i)})),r.get("isForCompensation")&&I("CompensationMarker",e,t,i),vr(r,"bpmn:AdHocSubProcess")&&I("AdhocMarker",e,t,i);var a=r.get("loopCharacteristics"),s=a&&a.get("isSequential");a&&(void 0===s&&I("LoopMarker",e,t,i),!1===s&&I("ParallelMarker",e,t,i),!0===s&&I("SequentialMarker",e,t,i))}function z(e,t,n={}){n=L({size:{width:100}},n);var i=o.createText(t||"",n);return we(i).add("djs-label"),ye(e,i),i}function H(e,t,n,i={}){var r=gr(t),o=Qr({x:t.x,y:t.y,width:t.width,height:t.height},i);return z(e,r.name,{align:n,box:o,padding:7,style:{fill:Zr(t,p,c,i.stroke)}})}function V(e,t,n,i={}){var r=Lr(n),o=z(e,t,{box:{height:30,width:r?eo(n,i):Jr(n,i)},align:"center-middle",style:{fill:Zr(n,p,c,i.stroke)}});r&&Gn(o,0,-(-1*eo(n,i)),270)}function G(e,t,n={}){var{width:i,height:r}=Qr(t,n);return v(e,i,r,10,{...n,fill:Yr(t,s,n.fill),fillOpacity:no,stroke:Xr(t,c,n.stroke)})}function W(e,t,n={}){var i=gr(t),r=Yr(t,s,n.fill),o=Xr(t,c,n.stroke);return"One"!==i.get("associationDirection")&&"Both"!==i.get("associationDirection")||(n.markerEnd=f(e,"association-end",r,o)),"Both"===i.get("associationDirection")&&(n.markerStart=f(e,"association-start",r,o)),n=ro(n,["markerStart","markerEnd"]),b(e,t.waypoints,{...n,stroke:o,strokeDasharray:"0, 5"})}function U(e,t,n={}){var r=Yr(t,s,n.fill),o=Xr(t,c,n.stroke),a=_(e,i.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:r,fillOpacity:no,stroke:o});(function(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection})(gr(t))&&_(e,i.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.33,my:(t.height-18)/t.height}}),{strokeWidth:2,fill:r,stroke:o});return a}function q(e,t,n={}){return m(e,t.width,t.height,{fillOpacity:no,...n,fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke)})}function K(e,t,n={}){return function(e,t,n,i){var r=t/2,o=n/2,a=[{x:r,y:0},{x:t,y:o},{x:r,y:n},{x:0,y:o}].map((function(e){return e.x+","+e.y})).join(" ");i=u(i);var s=Ae("polygon",{...i,points:a});return ye(e,s),s}(e,t.width,t.height,{fill:Yr(t,s,n.fill),fillOpacity:no,stroke:Xr(t,c,n.stroke)})}function Y(e,t,n={}){var i=v(e,Jr(t,n),eo(t,n),0,{fill:Yr(t,s,n.fill),fillOpacity:n.fillOpacity||no,stroke:Xr(t,c,n.stroke),strokeWidth:1.5}),r=gr(t);vr(r,"bpmn:Lane")&&V(e,r.get("name"),t,n);return i}function X(e,t,n={}){var i=G(e,t,n);$r(t)&&_e(i,{strokeDasharray:"0, 5.5",strokeWidth:2.5});var r=Or(t);return H(e,t,r?"center-top":"center-middle",n),F(e,t,r?void 0:["SubProcessMarker"],n),i}function Z(e,t,n={}){var i=G(e,t,n);return H(e,t,"center-middle",n),F(e,t,void 0,n),i}var Q=this.handlers={"bpmn:AdHocSubProcess":function(e,t,n={}){return X(e,t,n=Or(t)?ro(n,["fill","stroke","width","height"]):ro(n,["fill","stroke"]))},"bpmn:Association":function(e,t,n={}){return W(e,t,n=ro(n,["fill","stroke"]))},"bpmn:BoundaryEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=ro(n,["fill","stroke"]);var r=gr(t).get("cancelActivity");n={strokeWidth:1.5,fill:Yr(t,s,n.fill),fillOpacity:1,stroke:Xr(t,c,n.stroke)},r||(n.strokeDasharray="6");var o=q(e,t,n);return m(e,t.width,t.height,3,{...n,fill:"none"}),i&&O(t,e,n),o},"bpmn:BusinessRuleTask":function(e,t,n={}){var r=Z(e,t,n=ro(n,["fill","stroke"]));return _e(_(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}})),{fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:1}),_e(_(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}})),{fill:Xr(t,c,n.stroke),stroke:Xr(t,c,n.stroke),strokeWidth:1}),r},"bpmn:CallActivity":function(e,t,n={}){return n=ro(n,["fill","stroke"]),X(e,t,{strokeWidth:5,...n})},"bpmn:ComplexGateway":function(e,t,n={}){var r=K(e,t,n=ro(n,["fill","stroke"]));return _(e,i.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{fill:Xr(t,c,n.stroke),stroke:Xr(t,c,n.stroke),strokeWidth:1}),r},"bpmn:DataInput":function(e,t,n={}){n=ro(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=U(e,t,n);return _(e,r,{fill:"none",stroke:Xr(t,c,n.stroke),strokeWidth:1}),o},"bpmn:DataInputAssociation":function(e,t,n={}){return n=ro(n,["fill","stroke"]),W(e,t,{...n,markerEnd:f(e,"association-end",Yr(t,s,n.fill),Xr(t,c,n.stroke))})},"bpmn:DataObject":function(e,t,n={}){return U(e,t,n=ro(n,["fill","stroke"]))},"bpmn:DataObjectReference":E("bpmn:DataObject"),"bpmn:DataOutput":function(e,t,n={}){n=ro(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=U(e,t,n);return _(e,r,{strokeWidth:1,fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke)}),o},"bpmn:DataOutputAssociation":function(e,t,n={}){return n=ro(n,["fill","stroke"]),W(e,t,{...n,markerEnd:f(e,"association-end",Yr(t,s,n.fill),Xr(t,c,n.stroke))})},"bpmn:DataStoreReference":function(e,t,n={}){return n=ro(n,["fill","stroke"]),_(e,i.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{fill:Yr(t,s,n.fill),fillOpacity:no,stroke:Xr(t,c,n.stroke),strokeWidth:2})},"bpmn:EndEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=ro(n,["fill","stroke"]);var r=q(e,t,{...n,strokeWidth:4});return i&&O(t,e,n),r},"bpmn:EventBasedGateway":function(e,t,n={}){n=ro(n,["fill","stroke"]);var r=gr(t),o=K(e,t,n);m(e,t.width,t.height,.2*t.height,{fill:Yr(t,"none",n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:1});var a=r.get("eventGatewayType"),s=!!r.get("instantiate");if("Parallel"===a){var p=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}});_(e,p,{fill:"none",stroke:Xr(t,c,n.stroke),strokeWidth:1})}else"Exclusive"===a&&(s||m(e,t.width,t.height,.26*t.height,{fill:"none",stroke:Xr(t,c,n.stroke),strokeWidth:1}),function(){var r=i.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}});_(e,r,{fill:"none",stroke:Xr(t,c,n.stroke),strokeWidth:2})}());return o},"bpmn:ExclusiveGateway":function(e,t,n={}){var r=K(e,t,n=ro(n,["fill","stroke"])),o=i.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return br(t).get("isMarkerVisible")&&_(e,o,{fill:Xr(t,c,n.stroke),stroke:Xr(t,c,n.stroke),strokeWidth:1}),r},"bpmn:Gateway":function(e,t,n={}){return K(e,t,n=ro(n,["fill","stroke"]))},"bpmn:Group":function(e,t,n={}){return n=ro(n,["fill","stroke","width","height"]),v(e,t.width,t.height,10,{stroke:Xr(t,c,n.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:Jr(t,n),height:eo(t,n)})},"bpmn:InclusiveGateway":function(e,t,n={}){var i=K(e,t,n=ro(n,["fill","stroke"]));return m(e,t.width,t.height,.24*t.height,{fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:2.5}),i},"bpmn:IntermediateEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=ro(n,["fill","stroke"]);var r=q(e,t,{...n,strokeWidth:1.5});return m(e,t.width,t.height,3,{fill:"none",stroke:Xr(t,c,n.stroke),strokeWidth:1.5}),i&&O(t,e,n),r},"bpmn:IntermediateCatchEvent":E("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":E("bpmn:IntermediateEvent"),"bpmn:Lane":function(e,t,n={}){return n=ro(n,["fill","stroke","width","height"]),Y(e,t,{...n,fillOpacity:.25})},"bpmn:ManualTask":function(e,t,n={}){var r=Z(e,t,n=ro(n,["fill","stroke"]));return _(e,i.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:.5}),r},"bpmn:MessageFlow":function(e,t,n={}){n=ro(n,["fill","stroke"]);var r=gr(t),o=br(t),a=Yr(t,s,n.fill),p=Xr(t,c,n.stroke),l=b(e,t.waypoints,{markerEnd:f(e,"messageflow-end",a,p),markerStart:f(e,"messageflow-start",a,p),stroke:p,strokeDasharray:"10, 11",strokeWidth:1.5});if(r.get("messageRef")){var u=l.getPointAtLength(l.getTotalLength()/2),h=i.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:u.x,y:u.y}}),d={strokeWidth:1};"initiating"===o.get("messageVisibleKind")?(d.fill=a,d.stroke=p):(d.fill=p,d.stroke=a);var m=_(e,h,d),v=z(e,r.get("messageRef").get("name"),{align:"center-top",fitBox:!0,style:{fill:p}}),y=m.getBBox(),g=v.getBBox();Gn(v,u.x-g.width/2,u.y+y.height/2+10,0)}return l},"bpmn:ParallelGateway":function(e,t,n={}){var r=K(e,t,n=ro(n,["fill","stroke"]));return _(e,i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{fill:Xr(t,c,n.stroke),stroke:Xr(t,c,n.stroke),strokeWidth:1}),r},"bpmn:Participant":function(e,t,n={}){var i=Y(e,t,n=ro(n,["fill","stroke","width","height"])),r=Or(t),o=Lr(t),a=gr(t),s=a.get("name");if(r){y(e,o?[{x:30,y:0},{x:30,y:eo(t,n)}]:[{x:0,y:30},{x:Jr(t,n),y:30}],{stroke:Xr(t,c,n.stroke),strokeWidth:1.5}),V(e,s,t,n)}else{var l=Qr(t,n);o||(l.height=Jr(t,n),l.width=eo(t,n));var u=z(e,s,{box:l,align:"center-middle",style:{fill:Zr(t,p,c,n.stroke)}});if(!o)Gn(u,0,-(-1*eo(t,n)),270)}return a.get("participantMultiplicity")&&I("ParticipantMultiplicityMarker",e,t,n),i},"bpmn:ReceiveTask":function(e,t,n={}){n=ro(n,["fill","stroke"]);var r,o=gr(t),a=Z(e,t,n);return o.get("instantiate")?(m(e,28,28,4.4,{fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:1}),r=i.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):r=i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),_(e,r,{fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:1}),a},"bpmn:ScriptTask":function(e,t,n={}){var r=Z(e,t,n=ro(n,["fill","stroke"]));return _(e,i.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:1}),r},"bpmn:SendTask":function(e,t,n={}){var r=Z(e,t,n=ro(n,["fill","stroke"]));return _(e,i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{fill:Xr(t,c,n.stroke),stroke:Yr(t,s,n.fill),strokeWidth:1}),r},"bpmn:SequenceFlow":function(e,t,n={}){n=ro(n,["fill","stroke"]);var i=Yr(t,s,n.fill),r=Xr(t,c,n.stroke),o=b(e,t.waypoints,{markerEnd:f(e,"sequenceflow-end",i,r),stroke:r}),a=gr(t),{source:p}=t;if(p){var l=gr(p);a.get("conditionExpression")&&vr(l,"bpmn:Activity")&&_e(o,{markerStart:f(e,"conditional-flow-marker",i,r)}),l.get("default")&&(vr(l,"bpmn:Gateway")||vr(l,"bpmn:Activity"))&&l.get("default")===a&&_e(o,{markerStart:f(e,"conditional-default-flow-marker",i,r)})}return o},"bpmn:ServiceTask":function(e,t,n={}){var r=Z(e,t,n=ro(n,["fill","stroke"]));return m(e,10,10,{fill:Yr(t,s,n.fill),stroke:"none",transform:"translate(6, 6)"}),_(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:1}),m(e,10,10,{fill:Yr(t,s,n.fill),stroke:"none",transform:"translate(11, 10)"}),_(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:1}),r},"bpmn:StartEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=ro(n,["fill","stroke"]),gr(t).get("isInterrupting")||(n={...n,strokeDasharray:"6"});var r=q(e,t,n);return i&&O(t,e,n),r},"bpmn:SubProcess":function(e,t,n={}){return X(e,t,n=Or(t)?ro(n,["fill","stroke","width","height"]):ro(n,["fill","stroke"]))},"bpmn:Task":function(e,t,n={}){return Z(e,t,n=ro(n,["fill","stroke"]))},"bpmn:TextAnnotation":function(e,t,n={}){n=ro(n,["fill","stroke","width","height"]);var{width:r,height:o}=Qr(t,n),a=v(e,r,o,0,0,{fill:"none",stroke:"none"});return _(e,i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:0,my:0}}),{stroke:Xr(t,c,n.stroke)}),z(e,gr(t).get("text")||"",{align:"left-top",box:Qr(t,n),padding:7,style:{fill:Zr(t,p,c,n.stroke)}}),a},"bpmn:Transaction":function(e,t,i={}){i=Or(t)?ro(i,["fill","stroke","width","height"]):ro(i,["fill","stroke"]);var r=X(e,t,{strokeWidth:1.5,...i}),o=n.style(["no-fill","no-events"],{stroke:Xr(t,c,i.stroke),strokeWidth:1.5});return Or(t)||(i={}),v(e,Jr(t,i),eo(t,i),7,3,o),r},"bpmn:UserTask":function(e,t,n={}){var r=Z(e,t,n=ro(n,["fill","stroke"]));return _(e,i.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:.5}),_(e,i.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{fill:Yr(t,s,n.fill),stroke:Xr(t,c,n.stroke),strokeWidth:.5}),_(e,i.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{fill:Xr(t,c,n.stroke),stroke:Xr(t,c,n.stroke),strokeWidth:.5}),r},label:function(e,t,n={}){return function(e,t,n={}){var i={width:90,height:30,x:t.width/2+t.x,y:t.height/2+t.y};return z(e,Ur(t),{box:i,fitBox:!0,style:L({},o.getExternalStyle(),{fill:Zr(t,p,c,n.stroke)})})}(e,t,n)}};this._drawPath=_,this._renderer=w}function ro(e,t=[]){return t.reduce(((t,n)=>(e[n]&&(t[n]=e[n]),t)),{})}e(io,Je),io.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],io.prototype.canRender=function(e){return vr(e,"bpmn:BaseElement")},io.prototype.drawShape=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},io.prototype.drawConnection=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},io.prototype.getShapePath=function(e){return vr(e,"bpmn:Event")?function(e){var t=e.x+e.width/2,n=e.y+e.height/2,i=e.width/2;return et([["M",t,n],["m",0,-i],["a",i,i,0,1,1,0,2*i],["a",i,i,0,1,1,0,-2*i],["z"]])}(e):vr(e,"bpmn:Activity")?function(e,t){var n=e.x,i=e.y,r=e.width,o=e.height;return et([["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):vr(e,"bpmn:Gateway")?function(e){var t=e.width/2,n=e.height/2;return et([["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 et([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])}(e)};var oo={width:150,height:50};function ao(e,t){var n;t.textContent=e;try{var i,r=""===e;return t.textContent=r?"dummy":e,i={width:(n=t.getBBox()).width+2*n.x,height:n.height},r&&(i.width=0),i}catch(e){return console.log(e),{width:0,height:0}}}function so(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=ao(o,n)).width=o?i.width:0," "===o||""===o||i.width<Math.round(t)||o.length<2)return co(e,o,r,i);o=lo(o,i.width,t)}}function co(e,t,n,i){if(t.length<n.length){var r=n.slice(t.length).trim();e.unshift(r)}return{width:i.width,height:i.height,text:t}}var po="";function lo(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!==po||r.pop();break}r.push(n),o+=n.length}var a=r[r.length-1];return a&&a===po&&(r[r.length-1]="-"),r.join("")}(e,i);return r||(r=e.slice(0,Math.max(Math.round(i-1),1))),r}function uo(e){this._config=L({},{size:oo,padding:0,style:{},align:"center-top"},e||{})}uo.prototype.createText=function(e,t){return this.layoutText(e,t).element},uo.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},uo.prototype.layoutText=function(e,t){var n=L({},this._config.size,t.box),i=L({},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 l(e)?L({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}(void 0!==t.padding?t.padding:this._config.padding),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,h=Ae("text");for(_e(h,{x:0,y:0}),_e(h,i),ye(function(){var e=document.getElementById("helper-svg");return e||(_e(e=Ae("svg"),{id:"helper-svg"}),q(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}(),h);c.length;)p.push(so(c,u,h));"middle"===r.vertical&&(o.top=o.bottom=0);var d=_(p,(function(e,t,n){return e+(s||t.height)}),0)+o.top+o.bottom,f=_(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=Ae("text");return _e(v,i),g(p,(function(e){var t;switch(m+=s||e.height,r.horizontal){case"left":t=o.left;break;case"right":t=(a?f:u)-o.right-e.width;break;default:t=Math.max(((a?f:u)-e.width)/2+o.left,0)}var n=Ae("tspan");_e(n,{x:t,y:m}),n.textContent=e.text,ye(v,n)})),Fe(h),{dimensions:{width:f,height:d},element:v}};function ho(e){var t=L({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=L({},t,{fontSize:n},e&&e.externalStyle||{}),r=new uo({style:t});this.getExternalLabelBounds=function(e,t){var n=r.getDimensions(t,{box:{width:90,height:30},style:i});return{x:Math.round(e.x+e.width/2-n.width/2),y:Math.round(e.y),width:Math.ceil(n.width),height:Math.ceil(n.height)}},this.getTextAnnotationBounds=function(e,n){var i=r.getDimensions(n,{box:e,style:t,align:"left-top",padding:5});return{x:e.x,y:e.y,width:e.width,height:Math.max(30,Math.round(i.height))}},this.createText=function(e,t){return r.createText(e,t||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return i}}ho.$inject=["config.textRenderer"];var fo=/\{([^{}]+)\}/g,mo=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var vo={__init__:["bpmnRenderer"],bpmnRenderer:["type",io],textRenderer:["type",ho],pathMap:["type",function(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var n,i,r=this.pathMap[e];t.abspos?(n=t.abspos.x,i=t.abspos.y):(n=t.containerWidth*t.position.mx,i=t.containerHeight*t.position.my);var o={};if(t.position){for(var a=t.containerHeight/r.height*t.yScaleFactor,s=t.containerWidth/r.width*t.xScaleFactor,c=0;c<r.heightElements.length;c++)o["y"+c]=r.heightElements[c]*a;for(var p=0;p<r.widthElements.length;p++)o["x"+p]=r.widthElements[p]*s}var l,u,h=(l=r.d,u={mx:n,my:i,e:o},String(l).replace(fo,(function(e,t){return function(e,t,n){var i=n;return t.replace(mo,(function(e,t,n,r,o){t=t||r,i&&(t in i&&(i=i[t]),"function"==typeof i&&o&&(i=i()))})),i=(null==i||i==n?e:i)+""}(e,t,u)})));return h}}]};var yo={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]};function go(e,t,n){return L({id:e.id,type:e.$type,businessObject:e,di:t},n)}function bo(e,t,n){var i=e.waypoint;return!i||i.length<2?[fn(t),fn(n)]:i.map((function(e){return{x:e.x,y:e.y}}))}function _o(e,t,n){return new Error(`element ${hr(t)} referenced by ${hr(e)}#${n} not yet drawn`)}function xo(e,t,n,i,r){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._textRenderer=r}xo.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],xo.prototype.add=function(e,t,n){var i,r,o;if(vr(t,"bpmndi:BPMNPlane")){var a=vr(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};i=this._elementFactory.createRoot(go(e,t,a)),this._canvas.addRootElement(i)}else if(vr(t,"bpmndi:BPMNShape")){var s=!Or(e,t),c=function(e){return vr(e,"bpmn:Group")}(e);r=n&&(n.hidden||n.collapsed);var p=t.bounds;i=this._elementFactory.createShape(go(e,t,{collapsed:s,hidden:r,x:Math.round(p.x),y:Math.round(p.y),width:Math.round(p.width),height:Math.round(p.height),isFrame:c})),vr(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,i),vr(e,"bpmn:Lane")&&(o=0),vr(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,fn(p))||(n=this._canvas.findRoot(n))),this._canvas.addShape(i,n,o)}else{if(!vr(t,"bpmndi:BPMNEdge"))throw new Error(`unknown di ${hr(t)} for element ${hr(e)}`);var l=this._getSource(e),u=this._getTarget(e);r=n&&(n.hidden||n.collapsed),i=this._elementFactory.createConnection(go(e,t,{hidden:r,source:l,target:u,waypoints:bo(t,l,u)})),vr(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(i,n,o)}return zr(e)&&Ur(i)&&this.addLabel(e,t,i),this._eventBus.fire("bpmnElement.added",{element:i}),i},xo.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${hr(e)}#attachedToRef`);var i=this._elementRegistry.get(n.id),r=i&&i.attachers;if(!i)throw _o(e,n,"attachedToRef");t.host=i,r||(i.attachers=r=[]),-1===r.indexOf(t)&&r.push(t)},xo.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(Fr.width,r.width),height:r.height},n={x:r.x+r.width/2,y:r.y+r.height/2}):(n=Gr(t),i=Fr),L({x:n.x-i.width/2,y:n.y-i.height/2},i)}(t,n),(r=Ur(n))&&(i=this._textRenderer.getExternalLabelBounds(i,r)),o=this._elementFactory.createLabel(go(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!Ur(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)},xo.prototype._getConnectedElement=function(e,t){var n,i,r=e.$type;if(i=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===r&&(i=i&&i[0]),("source"===t&&"bpmn:DataOutputAssociation"===r||"target"===t&&"bpmn:DataInputAssociation"===r)&&(i=e.$parent),n=i&&this._getElement(i))return n;throw i?_o(e,i,t+"Ref"):new Error(`${hr(e)}#${t} Ref not specified`)},xo.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},xo.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},xo.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};var wo={__depends__:[vo,{__depends__:[yo],bpmnImporter:["type",xo]}]};function Eo(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}Eo.prototype.next=function(){return this._prefix+ ++this._counter};var So=new Eo("ov");function Co(e,t,n,i){var r,o;this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=So,this._overlayDefaults=L({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(r=n.getContainer(),q(o=he('<div class="djs-overlay-container" />'),{position:"absolute",width:0,height:0}),r.insertBefore(o,r.firstChild),o),this._init()}function ko(e,t,n){q(e,{left:t+"px",top:n+"px"})}function Ro(e,t){e.style.display=!1===t?"none":""}function Po(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}Co.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Co.prototype.get=function(e){if(d(e)&&(e={id:e}),d(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?y(t.overlays,M({type:e.type})):t.overlays.slice():[]}return e.type?y(this._overlays,M({type:e.type})):e.id?this._overlays[e.id]:null},Co.prototype.add=function(e,t,n){if(l(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=L({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},Co.prototype.remove=function(e){var t=this.get(e)||[];p(t)||(t=[t]);var n=this;g(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(ve(e.html),ve(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)}}))},Co.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},Co.prototype.show=function(){Ro(this._overlayRoot)},Co.prototype.hide=function(){Ro(this._overlayRoot,!1)},Co.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Q(this._overlayRoot)},Co.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var o=ht(t);i=o.x,r=o.y}ko(n,i,r),K(e.html,"data-container-id",t.id)},Co.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?ht(o).width:o.width,a=-1*i.right+t);void 0!==i.bottom&&(n=o.waypoints?ht(o).height:o.height,s=-1*i.bottom+n);ko(r,a||0,s||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Co.prototype._createOverlayContainer=function(e){var t=he('<div class="djs-overlays" />');q(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Co.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Po(this._overlayRoot,n)},Co.prototype._getOverlayContainer=function(e,t){var n=m(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},Co.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)),d(o)&&(o=he(o)),n=this._getOverlayContainer(r),q(t=he('<div class="djs-overlay" data-overlay-id="'+i+'">'),{position:"absolute"}),t.appendChild(o),e.type&&X(t).add("djs-overlay-"+e.type),Ro(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())},Co.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,c=!0;(i!==this._canvas.getRootElement()||n&&(s(r)&&r>t.scale||s(o)&&o<t.scale))&&(c=!1),Ro(a,c),this._updateOverlayScale(e,t)},Co.prototype._updateOverlayScale=function(e,t){var n,i,r,o=e.scale,a=e.htmlContainer,c="";!0!==o&&(!1===o?(n=1,i=1):(n=o.min,i=o.max),s(n)&&t.scale<n&&(r=(1/t.scale||1)*n),s(i)&&t.scale>i&&(r=(1/t.scale||1)*i)),s(r)&&(c="scale("+r+","+r+")"),Po(a,c)},Co.prototype._updateOverlaysVisibilty=function(e){var t=this;g(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},Co.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;g(t.get({element:n}),(function(e){t.remove(e.id)}));var i=t._getOverlayContainer(n);if(i){ve(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&&(g(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(t._canvas.viewbox())})),e.on("diagram.clear",this.clear,this)};var Ao={__init__:["overlays"],overlays:["type",Co]};function Mo(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(ft(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)}))}Mo.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var To={__init__:["changeSupport"],changeSupport:["type",Mo]};function Do(e){this._eventBus=e}function Bo(e){return function(t,n,i,r,o){(h(t)||u(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}}function No(e,t){t.invoke(Do,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)}))}Do.$inject=["eventBus"],Do.prototype.on=function(e,t,n,i,r,o){if((h(t)||u(t))&&(o=r,r=i,i=n,n=t,t=null),h(n)&&(o=r,r=i,i=n,n=1e3),l(r)&&(o=r,r=!1),!h(i))throw new Error("handlerFn must be a function");p(e)||(e=[e]);var a=this._eventBus;g(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)}))},Do.prototype.canExecute=Bo("canExecute"),Do.prototype.preExecute=Bo("preExecute"),Do.prototype.preExecuted=Bo("preExecuted"),Do.prototype.execute=Bo("execute"),Do.prototype.executed=Bo("executed"),Do.prototype.postExecute=Bo("postExecute"),Do.prototype.postExecuted=Bo("postExecuted"),Do.prototype.revert=Bo("revert"),Do.prototype.reverted=Bo("reverted"),e(No,Do),No.$inject=["canvas","injector"];var jo={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",No]};function Oo(e){return CSS.escape(e)}var Lo={"&":"&","<":"<",">":">",'"':""","'":"'"};function $o(e){return(e=""+e)&&e.replace(/[&<>"']/g,(function(e){return Lo[e]}))}var Io="_plane";function Fo(e){return function(e){return e.replace(new RegExp(Io+"$"),"")}(e.id)}function zo(e){var t=e.id;return vr(e,"bpmn:SubProcess")?Go(t):t}function Ho(e){return Go(e)}function Vo(e){return vr(br(e),"bpmndi:BPMNPlane")}function Go(e){return e+Io}function Wo(e,t,n){var i=he('<ul class="bjs-breadcrumbs"></ul>'),r=n.getContainer(),o=X(r);r.appendChild(i);var a=[];function s(e){e&&(a=function(e){for(var t=gr(e),n=[],i=t;i;i=i.$parent)(vr(i,"bpmn:SubProcess")||vr(i,"bpmn:Process"))&&n.push(i);return n.reverse()}(e));var r=a.flatMap((function(e){var i=n.findRoot(zo(e))||n.findRoot(e.id);if(!i&&vr(e,"bpmn:Process")){var r=t.find((function(t){var n=gr(t);return n&&n.get("processRef")===e}));i=r&&n.findRoot(r.id)}if(!i)return[];var o=$o(e.name||e.id),a=he('<li><span class="bjs-crumb"><a title="'+o+'">'+o+"</a></span></li>");return a.addEventListener("click",(function(){n.setRootElement(i)})),a}));i.innerHTML="";var s=r.length>1;o.toggle("bjs-breadcrumbs-shown",s),r.forEach((function(e){i.appendChild(e)}))}e.on("element.changed",(function(e){var t=gr(e.element);m(a,(function(e){return e===t}))&&s()})),e.on("root.set",(function(e){s(e.element)}))}function Uo(e,t){var n=null,i=new qo;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,vr(r,"bpmn:SubProcess")||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 qo(){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)}}Wo.$inject=["eventBus","elementRegistry","canvas"],Uo.$inject=["eventBus","canvas"];var Ko=180,Yo=160;function Xo(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 Zo(e){return vr(e,"bpmndi:BPMNDiagram")?e:Zo(e.$parent)}Xo.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach((function(e){e.plane&&e.plane.bpmnElement&&(t._processToDiagramMap[e.plane.bpmnElement.id]=e)})),e.diagrams.filter((e=>e.plane)).flatMap((e=>t._createNewDiagrams(e.plane))).forEach((function(e){t._movePlaneElementsToOrigin(e.plane)}))}},Xo.prototype._createNewDiagrams=function(e){var t=this,n=[],i=[];e.get("planeElement").forEach((function(t){var r=t.bpmnElement;if(r){var o=r.$parent;vr(r,"bpmn:SubProcess")&&!t.isExpanded&&n.push(r),function(e,t){var n=e.$parent;if(!vr(n,"bpmn:SubProcess")||n===t.bpmnElement)return!1;if(yr(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))return!1;return!0}(r,e)&&i.push({diElement:t,parent:o})}}));var r=[];return n.forEach((function(e){if(!t._processToDiagramMap[e.id]){var n=t._createDiagram(e);t._processToDiagramMap[e.id]=n,r.push(n)}})),i.forEach((function(e){for(var i=e.diElement,r=e.parent;r&&-1===n.indexOf(r);)r=r.$parent;if(r){var o=t._processToDiagramMap[r.id];t._moveToDiPlane(i,o.plane)}})),r},Xo.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=un(e.bounds);t.top=Math.min(n.top,t.top),t.left=Math.min(n.left,t.left)}})),hn(t)}(e),i=n.x-Ko,r=n.y-Yo;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)}))},Xo.prototype._moveToDiPlane=function(e,t){var n=Zo(e).plane.get("planeElement");n.splice(n.indexOf(e),1),t.get("planeElement").push(e)},Xo.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},Xo.$inject=["eventBus","moddle"];var Qo=250;function Jo(e,t,n,i,r){Do.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=i,this._translate=r;var o=this;this.executed("shape.toggleCollapse",Qo,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.reverted("shape.toggleCollapse",Qo,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.executed(["shape.create","shape.move","shape.delete"],Qo,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;o._canDrillDown(i)&&o._addOverlay(i),o._updateDrilldownOverlay(t),o._updateDrilldownOverlay(n),o._updateDrilldownOverlay(i)}),!0),this.reverted(["shape.create","shape.move","shape.delete"],Qo,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;o._canDrillDown(i)&&o._addOverlay(i),o._updateDrilldownOverlay(t),o._updateDrilldownOverlay(n),o._updateDrilldownOverlay(i)}),!0),t.on("import.render.complete",(function(){n.filter((function(e){return o._canDrillDown(e)})).map((function(e){o._addOverlay(e)}))}))}e(Jo,Do),Jo.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},Jo.prototype._canDrillDown=function(e){var t=this._canvas;return vr(e,"bpmn:SubProcess")&&t.findRoot(zo(e))},Jo.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=gr(e),i=t.get({element:n.id,type:"drilldown"})[0];if(i){var r=n&&n.get("flowElements")&&n.get("flowElements").length;X(i.html).toggle("bjs-drilldown-empty",!r)}},Jo.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,i=gr(e);n.get({element:e,type:"drilldown"}).length&&this._removeOverlay(e);var r=he('<button type="button" class="bjs-drilldown"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg></button>'),o=i.get("name")||i.get("id"),a=this._translate("Open {element}",{element:o});r.setAttribute("title",a),r.addEventListener("click",(function(){t.setRootElement(t.findRoot(zo(e)))})),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:r}),this._updateOverlayVisibility(e)},Jo.prototype._removeOverlay=function(e){this._overlays.remove({element:e,type:"drilldown"})},Jo.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];var ea={__depends__:[Ao,To,jo],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",Wo],drilldownCentering:["type",Uo],drilldownOverlayBehavior:["type",Jo],subprocessCompatibility:["type",Xo]};function ta(e){e&&"function"==typeof e.stopPropagation&&e.stopPropagation()}function na(e){return e.originalEvent||e.srcEvent}function ia(e){ta(e),ta(na(e))}function ra(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 oa(){return/mac/i.test(navigator.platform)}function aa(e,t){return(na(e)||e).button===t}function sa(e){return aa(e,0)}function ca(e){var t=na(e)||e;return!!sa(e)&&(oa()?t.metaKey:t.ctrlKey)}function pa(e){var t=na(e)||e;return sa(e)&&t.shiftKey}function la(e){return!0}function ua(e){return sa(e)||function(e){return aa(e,1)}(e)}function ha(e,t,n){var i=this;function r(n,i,r){var o,a;(function(e,t){var n=c[e]||sa;return!n(t)})(n,i)||(r?a=t.getGraphics(r):(o=i.delegateTarget||i.target)&&(a=o,r=t.get(a)),a&&r&&!1===e.fire(n,{element:r,gfx:a,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var o={};function a(e){return o[e]}var s={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},c={"element.contextmenu":la,"element.mousedown":ua,"element.mouseup":ua,"element.click":ua,"element.dblclick":ua};function p(e,t,n,i){var a=o[n]=function(e){r(n,e)};i&&(c[n]=i),a.$delegate=ce.bind(e,"svg, .djs-element",t,a)}function l(e,t,n){var i=a(n);i&&ce.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){var t;t=e.svg,g(s,(function(e,n){l(t,n,e)}))})),e.on("canvas.init",(function(e){var t;t=e.svg,g(s,(function(e,n){p(t,n,e)}))})),e.on(["shape.added","connection.added"],(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.createHit",{element:n,gfx:i})})),e.on(["shape.changed","connection.changed"],500,(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.updateHit",{element:n,gfx:i})})),e.on("interactionEvents.createHit",500,(function(e){var t=e.element,n=e.gfx;i.createDefaultHit(t,n)})),e.on("interactionEvents.updateHit",(function(e){var t=e.element,n=e.gfx;i.updateDefaultHit(t,n)}));var u=f("djs-hit djs-hit-stroke"),h=f("djs-hit djs-hit-click-stroke"),d={all:f("djs-hit djs-hit-all"),"click-stroke":h,stroke:u,"no-move":f("djs-hit djs-hit-no-move")};function f(e,t){return t=L({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function m(e,t){var n=d[t];if(!n)throw new Error("invalid hit type <"+t+">");return _e(e,n),e}function v(e,t){ye(e,t)}this.removeHits=function(e){g(me(".djs-hit",e),Fe)},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=ot(t);return m(n,"stroke"),v(e,n),n},this.createBoxHit=function(e,t,n){n=L({x:0,y:0},n);var i=Ae("rect");return m(i,t),_e(i,n),v(e,i),i},this.updateDefaultHit=function(e,t){var n=fe(".djs-hit",t);if(n)return e.waypoints?at(n,e.waypoints):_e(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=l}ha.$inject=["eventBus","elementRegistry","styles"];var da={__init__:["interactionEvents"],interactionEvents:["type",ha]};function fa(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)}))}fa.$inject=["eventBus","canvas"],fa.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})}},fa.prototype.get=function(){return this._selectedElements},fa.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},fa.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();p(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?g(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 ma="hover",va="selected";function ya(e,t){function n(t,n){e.addMarker(t,n)}function i(t,n){e.removeMarker(t,n)}this._canvas=e,t.on("element.hover",(function(e){n(e.element,ma)})),t.on("element.out",(function(e){i(e.element,ma)})),t.on("selection.changed",(function(e){var t=e.oldSelection,r=e.newSelection;g(t,(function(e){-1===r.indexOf(e)&&function(e){i(e,va)}(e)})),g(r,(function(e){-1===t.indexOf(e)&&function(e){n(e,va)}(e)}))}))}function ga(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;p(o)?t.select(o):t.select(r.filter(ba))}})),e.on("connect.end",500,(function(e){var n=e.context.connection;n&&t.select(n)})),e.on("shape.move.end",500,(function(e){var n=e.previousSelection||[],r=i.get(e.context.shape.id);m(n,(function(e){return r.id===e.id}))||t.select(r)})),e.on("element.click",(function(e){if(sa(e)){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,a=pa(e);if(r&&o)return a?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,a)}}))}function ba(e){return!e.hidden}ya.$inject=["canvas","eventBus"],ga.$inject=["eventBus","selection","canvas","elementRegistry"];var _a={__init__:["selectionVisuals","selectionBehavior"],__depends__:[da],selection:["type",fa],selectionVisuals:["type",ya],selectionBehavior:["type",ga]};function xa(e){Tr.call(this,e)}e(xa,Tr),xa.prototype._modules=[wo,ea,Ao,_a,yo],xa.prototype._moddleExtensions={};var wa=["c","C"],Ea=["v","V"],Sa=["y","Y"],Ca=["z","Z"];function ka(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function Ra(e,t){return-1!==(e=p(e)?e:[e]).indexOf(t.key)||-1!==e.indexOf(t.code)}function Pa(e){return e.shiftKey}var Aa="keyboard.keydown",Ma="Keyboard binding is now implicit; explicit binding to an element got removed. For more information, see https://github.com/bpmn-io/diagram-js/issues/661";function Ta(e,t){var n=this;this._config=e=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()})),e.bindTo&&console.error("unsupported configuration <keyboard.bindTo>",new Error(Ma));var i=e&&!1!==e.bind;t.on("canvas.init",(function(e){n._target=e.svg,i&&n.bind(),n._fire("init")}))}Ta.$inject=["config.keyboard","eventBus"],Ta.prototype._keydownHandler=function(e){this._keyHandler(e,Aa)},Ta.prototype._keyupHandler=function(e){this._keyHandler(e,"keyboard.keyup")},Ta.prototype._keyHandler=function(e,t){if(!this._isEventIgnored(e)){var n={keyEvent:e};this._eventBus.fire(t||Aa,n)&&e.preventDefault()}},Ta.prototype._isEventIgnored=function(e){return!1},Ta.prototype.bind=function(e){e&&console.error("unsupported argument <node>",new Error(Ma)),this.unbind(),e=this._node=this._target,oe.bind(e,"keydown",this._keydownHandler),oe.bind(e,"keyup",this._keyupHandler),this._fire("bind")},Ta.prototype.getBinding=function(){return this._node},Ta.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),oe.unbind(e,"keydown",this._keydownHandler),oe.unbind(e,"keyup",this._keyupHandler)),this._node=null},Ta.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})},Ta.prototype.addListener=function(e,t,n){h(e)&&(n=t,t=e,e=1e3),this._eventBus.on(n||Aa,e,t)},Ta.prototype.removeListener=function(e,t){this._eventBus.off(t||Aa,e)},Ta.prototype.hasModifier=function(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey},Ta.prototype.isCmd=ka,Ta.prototype.isShift=Pa,Ta.prototype.isKey=Ra;function Da(e,t){var n=this;e.on("editorActions.init",500,(function(e){var i=e.editorActions;n.registerBindings(t,i)}))}Da.$inject=["eventBus","keyboard"],Da.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}n("undo",(function(e){if(function(e){return ka(e)&&!Pa(e)&&Ra(Ca,e)}(e.keyEvent))return t.trigger("undo"),!0})),n("redo",(function(e){if(function(e){return ka(e)&&(Ra(Sa,e)||Ra(Ca,e)&&Pa(e))}(e.keyEvent))return t.trigger("redo"),!0})),n("copy",(function(e){if(function(e){return ka(e)&&Ra(wa,e)}(e.keyEvent))return t.trigger("copy"),!0})),n("paste",(function(e){if(function(e){return ka(e)&&Ra(Ea,e)}(e.keyEvent))return t.trigger("paste"),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(Ra(["+","Add","="],n)&&ka(n))return t.trigger("stepZoom",{value:1}),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(Ra(["-","Subtract"],n)&&ka(n))return t.trigger("stepZoom",{value:-1}),!0})),n("zoom",(function(e){var n=e.keyEvent;if(Ra("0",n)&&ka(n))return t.trigger("zoom",{value:1}),!0})),n("removeSelection",(function(e){if(Ra(["Backspace","Delete","Del"],e.keyEvent))return t.trigger("removeSelection"),!0}))};var Ba={__init__:["keyboard","keyboardBindings"],keyboard:["type",Ta],keyboardBindings:["type",Da]},Na={moveSpeed:50,moveSpeedAccelerated:200};function ja(e,t,n){var i=this;this._config=L({},Na,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})}}ja.$inject=["config.keyboardMove","keyboard","canvas"];var Oa={__depends__:[Ba],__init__:["keyboardMove"],keyboardMove:["type",ja]},La=/^djs-cursor-.*$/;function $a(e){var t=X(document.body);t.removeMatching(La),e&&t.add("djs-cursor-"+e)}function Ia(){$a(null)}function Fa(e,t){function n(){return!1}return t=t||"element.click",e.once(t,5e3,n),function(){e.off(t,n)}}function za(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Ha(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Va(e,t){var n;function i(e){return a(e.originalEvent)}function r(i){var r,o=n.start,a=n.button,s=ra(i),c=Ha(s,o);(!n.dragging&&(r=c,Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2))>15)&&(n.dragging=!0,0===a&&Fa(e),$a("grab")),n.dragging)&&(c=Ha(s,n.last||n.start),t.scroll({dx:c.x,dy:c.y}),n.last=s);i.preventDefault()}function o(e){oe.unbind(document,"mousemove",r),oe.unbind(document,"mouseup",o),n=null,Ia()}function a(e){if(!J(e.target,".djs-draggable")){var t=e.button;if(!(t>=2||e.ctrlKey||e.shiftKey||e.altKey))return n={button:t,start:ra(e)},oe.bind(document,"mousemove",r),oe.bind(document,"mouseup",o),!0}}e.on("canvas.focus.changed",(function(t){t.focused?e.on("element.mousedown",500,i):e.off("element.mousedown",i)})),this.isActive=function(){return!!n}}Va.$inject=["eventBus","canvas"];var Ga={__init__:["moveCanvas"],moveCanvas:["type",Va]};function Wa(e){return Math.log(e)/Math.log(10)}function Ua(e,t){var n=Wa(e.min),i=Wa(e.max);return(Math.abs(n)+Math.abs(i))/t}var qa=Math.sign||function(e){return e>=0?1:-1},Ka={min:.2,max:4};function Ya(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=O(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||.75;var i=this;t.on("canvas.focus.changed",(function(t){i._init(t.focused&&!1!==e.enabled)}))}Ya.$inject=["config.zoomScroll","eventBus","canvas"],Ya.prototype.scroll=function(e){this._canvas.scroll(e)},Ya.prototype.reset=function(){this._canvas.zoom("fit-viewport")},Ya.prototype.zoom=function(e,t){var n=Ua(Ka,20);this._totalDelta+=e,Math.abs(this._totalDelta)>.1&&(this._zoom(e,t,n),this._totalDelta=0)},Ya.prototype._handleWheel=function(e){if(this._canvas.isFocused()){var t=this._container;e.preventDefault();var n,i=e.ctrlKey||oa()&&e.metaKey,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))*qa(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)}},Ya.prototype.stepZoom=function(e,t){var n=Ua(Ka,10);this._zoom(e,t,n)},Ya.prototype._zoom=function(e,t,n){var i=this._canvas,r=e>0?1:-1,o=Wa(i.zoom()),a=Math.round(o/n)*n;a+=n*r;var s,c,p=Math.pow(10,a);i.zoom((s=Ka,c=p,Math.max(s.min,Math.min(s.max,c))),t)},Ya.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,i=this._enabled;return void 0===e&&(e=!i),i!==e&&oe[e?"bind":"unbind"](t,"wheel",n,!1),this._enabled=e,e},Ya.prototype._init=function(e){this.toggle(e)};var Xa={__init__:["zoomScroll"],zoomScroll:["type",Ya]};function Za(e){xa.call(this,e)}function Qa(e){return e&&e[e.length-1]}function Ja(e){return e.y}function es(e){return e.x}e(Za,xa),Za.prototype._navigationModules=[Oa,Ga,Xa],Za.prototype._modules=[].concat(xa.prototype._modules,Za.prototype._navigationModules);var ts={left:es,center:es,right:function(e){return e.x+e.width},top:Ja,middle:Ja,bottom:function(e){return e.y+e.height}};function ns(e,t){this._modeling=e,this._rules=t}ns.$inject=["modeling","rules"],ns.prototype._getOrientationDetails=function(e){var t="x",n="width";return-1!==["top","bottom","middle"].indexOf(e)&&(t="y",n="height"),{axis:t,dimension:n}},ns.prototype._isType=function(e,t){return-1!==t.indexOf(e)},ns.prototype._alignmentPosition=function(e,t){var n,i,r,o=this._getOrientationDetails(e),a=o.axis,s=o.dimension,c={},p={},l=!1;if(this._isType(e,["left","top"]))c[e]=t[0][a];else if(this._isType(e,["right","bottom"]))r=Qa(t),c[e]=r[a]+r[s];else if(this._isType(e,["center","middle"])){if(g(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=A(p,(function(e){return e.elements.length>1&&(l=!0),e.elements.length})),l)return c[e]=Qa(n).center,c;i=t[0],r=Qa(t=A(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},ns.prototype.trigger=function(e,t){var n,i=this._modeling,r=y(e,(function(e){return!(e.waypoints||e.host||e.labelTarget)}));if(p(n=this._rules.allowed("elements.align",{elements:r}))&&(r=n),!(r.length<2)&&n){var o=A(r,ts[t]),a=this._alignmentPosition(t,o);i.alignElements(o,a)}};var is={__init__:["alignElements"],alignElements:["type",ns]};const rs=new Eo;function os(e){this._scheduled={},e.on("diagram.destroy",(()=>{Object.keys(this._scheduled).forEach((e=>{this.cancel(e)}))}))}os.$inject=["eventBus"],os.prototype.schedule=function(e,t=rs.next()){this.cancel(t);const n=this._schedule(e,t);return this._scheduled[t]=n,n.promise},os.prototype._schedule=function(e,t){const n=function(){const e={};return e.promise=new Promise(((t,n)=>{e.resolve=t,e.reject=n})),e}(),i=setTimeout((()=>{try{this._scheduled[t]=null;try{n.resolve(e())}catch(e){n.reject(e)}}catch(e){console.error("Scheduler#_schedule execution failed",e)}}));return{executionId:i,promise:n.promise}},os.prototype.cancel=function(e){const t=this._scheduled[e];t&&(this._cancel(t),this._scheduled[e]=null)},os.prototype._cancel=function(e){clearTimeout(e.executionId)};var as={scheduler:["type",os]},ss=".entry";function cs(e,t,n,i){this._canvas=e,this._elementRegistry=t,this._eventBus=n,this._scheduler=i,this._current=null,this._init()}cs.$inject=["canvas","elementRegistry","eventBus","scheduler"],cs.prototype._init=function(){var e=this;this._eventBus.on("selection.changed",(function(t){var n=t.newSelection,i=n.length?1===n.length?n[0]:n:null;i?e.open(i,!0):e.close()})),this._eventBus.on("elements.changed",(function(t){var n=t.elements,i=e._current;if(i){var r=i.target,o=p(r)?r:[r];if(o.filter((function(e){return n.includes(e)})).length){e.close();var a=o.filter((function(t){return e._elementRegistry.get(t.id)}));a.length&&e._updateAndOpen(a.length>1?a:a[0])}}})),this._eventBus.on("canvas.viewbox.changed",(function(){e._updatePosition()})),this._eventBus.on("element.marker.update",(function(t){if(e.isOpen()){var n=t.element,i=e._current;(p(i.target)?i.target:[i.target]).includes(n)&&e._updateVisibility()}})),this._container=this._createContainer()},cs.prototype._createContainer=function(){var e=he('<div class="djs-context-pad-parent"></div>');return this._canvas.getContainer().appendChild(e),e},cs.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("contextPad.getProviders",e,(function(e){e.providers.push(t)}))},cs.prototype.getEntries=function(e){var t=this._getProviders(),n=p(e)?"getMultiElementContextPadEntries":"getContextPadEntries",i={};return g(t,(function(t){if(h(t[n])){var r=t[n](e);h(r)?i=r(i):g(r,(function(e,t){i[t]=e}))}})),i},cs.prototype.trigger=function(e,t,n){var i,r,o=this,a=t.delegateTarget||t.target;return a?(i=K(a,"data-action"),r=t.originalEvent||t,"mouseover"!==e?"mouseout"===e?(clearTimeout(this._timeout),void(this._mouseout&&(this._mouseout(),this._mouseout=null))):this.triggerEntry(i,e,r,n):void(this._timeout=setTimeout((function(){o._mouseout=o.triggerEntry(i,"hover",r,n)}),300))):t.preventDefault()},cs.prototype.triggerEntry=function(e,t,n,i){if(this.isShown()){var r=this._current.target,o=this._current.entries[e];if(o){var a=o.action;if(!1!==this._eventBus.fire("contextPad.trigger",{entry:o,event:n})){if(h(a)){if("click"===t)return a(n,r,i)}else if(a[t])return a[t](n,r,i);n.preventDefault()}}}},cs.prototype.open=function(e,t){!t&&this.isOpen(e)||(this.close(),this._updateAndOpen(e))},cs.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},cs.prototype._updateAndOpen=function(e){var t,n=this.getEntries(e),i=this._createHtml(e);g(n,(function(e,n){var r,o=e.group||"default",a=he(e.html||'<div class="entry" draggable="true"></div>');K(a,"data-action",n),(r=fe("[data-group="+Oo(o)+"]",i))||(K(r=he('<div class="group"></div>'),"data-group",o),i.appendChild(r)),r.appendChild(a),e.className&&function(e,t){var n=X(e);(t=p(t)?t:t.split(/\s+/g)).forEach((function(e){n.add(e)}))}(a,e.className),e.title&&K(a,"title",e.title),e.imageUrl&&(K(t=he("<img>"),"src",e.imageUrl),t.style.width="100%",t.style.height="100%",a.appendChild(t))})),X(i).add("open"),this._current={entries:n,html:i,target:e},this._updatePosition(),this._updateVisibility(),this._eventBus.fire("contextPad.open",{current:this._current})},cs.prototype._createHtml=function(e){var t=this,n=he('<div class="djs-context-pad"></div>');return ce.bind(n,ss,"click",(function(e){t.trigger("click",e)})),ce.bind(n,ss,"dragstart",(function(e){t.trigger("dragstart",e)})),ce.bind(n,ss,"mouseover",(function(e){t.trigger("mouseover",e)})),ce.bind(n,ss,"mouseout",(function(e){t.trigger("mouseout",e)})),oe.bind(n,"mousedown",(function(e){e.stopPropagation()})),this._container.appendChild(n),this._eventBus.fire("contextPad.create",{target:e,pad:n}),n},cs.prototype.getPad=function(e){let t;return console.warn(new Error("ContextPad#getPad is deprecated and will be removed in future library versions, cf. https://github.com/bpmn-io/diagram-js/pull/888")),t=this.isOpen()&&function(e,t){return e=p(e)?e:[e],t=p(t)?t:[t],e.length===t.length&&x(e,(function(e){return t.includes(e)}))}(this._current.target,e)?this._current.html:this._createHtml(e),{html:t}},cs.prototype.close=function(){this.isOpen()&&(clearTimeout(this._timeout),this._container.innerHTML="",this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)},cs.prototype.isOpen=function(e){var t=this._current;if(!t)return!1;if(!e)return!0;var n=t.target;return p(e)===p(n)&&(p(e)?e.length===n.length&&x(e,(function(e){return n.includes(e)})):n===e)},cs.prototype.isShown=function(){return this.isOpen()&&X(this._current.html).has("open")},cs.prototype.show=function(){this.isOpen()&&(X(this._current.html).add("open"),this._updatePosition(),this._eventBus.fire("contextPad.show",{current:this._current}))},cs.prototype.hide=function(){this.isOpen()&&(X(this._current.html).remove("open"),this._eventBus.fire("contextPad.hide",{current:this._current}))},cs.prototype._getPosition=function(e){if(!p(e)&&sn(e)){var t=this._canvas.viewbox(),n=(o=e).waypoints[o.waypoints.length-1],i=n.x*t.scale-t.x*t.scale,r=n.y*t.scale-t.y*t.scale;return{left:i+8*this._canvas.zoom(),top:r}}var o,a=this._canvas.getContainer().getBoundingClientRect(),s=this._getTargetBounds(e);return{left:s.right-a.left+8*this._canvas.zoom(),top:s.top-a.top}},cs.prototype._updatePosition=function(){this._scheduler.schedule((()=>{if(this.isOpen()){var e=this._current.html,t=this._getPosition(this._current.target);"x"in t&&"y"in t?(e.style.left=t.x+"px",e.style.top=t.y+"px"):["top","right","bottom","left"].forEach((function(n){n in t&&(e.style[n]=t[n]+"px")}))}}),"ContextPad#_updatePosition")},cs.prototype._updateVisibility=function(){this._scheduler.schedule((()=>{if(this.isOpen()){var e=this,t=this._current.target;(p(t)?t:[t]).some((function(t){return e._canvas.hasMarker(t,"djs-element-hidden")}))?e.hide():e.show()}}),"ContextPad#_updateVisibility")},cs.prototype._getTargetBounds=function(e){var t=this;return(p(e)?e:[e]).map((function(e){return t._canvas.getGraphics(e)})).reduce((function(e,t){const n=t.getBoundingClientRect();return e.top=Math.min(e.top,n.top),e.right=Math.max(e.right,n.right),e.bottom=Math.max(e.bottom,n.bottom),e.left=Math.min(e.left,n.left),e.x=e.left,e.y=e.top,e.width=e.right-e.left,e.height=e.bottom-e.top,e}),{top:1/0,right:-1/0,bottom:-1/0,left:1/0})};var ps,ls,us,hs,ds,fs,ms,vs={__depends__:[da,as,Ao],contextPad:["type",cs]},ys={},gs=[],bs=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,_s=Array.isArray;function xs(e,t){for(var n in t)e[n]=t[n];return e}function ws(e){var t=e.parentNode;t&&t.removeChild(e)}function Es(e,t,n){var i,r,o,a={};for(o in t)"key"==o?i=t[o]:"ref"==o?r=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?ps.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return Ss(e,a,i,r,null)}function Ss(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,constructor:void 0,__v:null==r?++us:r,__i:-1,__u:0};return null==r&&null!=ls.vnode&&ls.vnode(o),o}function Cs(e){return e.children}function ks(e,t){this.props=e,this.context=t}function Rs(e,t){if(null==t)return e.__?Rs(e.__,e.__i+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?Rs(e):null}function Ps(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 Ps(e)}}function As(e){(!e.__d&&(e.__d=!0)&&hs.push(e)&&!Ms.__r++||ds!==ls.debounceRendering)&&((ds=ls.debounceRendering)||fs)(Ms)}function Ms(){var e,t,n,i,r,o,a,s,c;for(hs.sort(ms);e=hs.shift();)e.__d&&(t=hs.length,i=void 0,o=(r=(n=e).__v).__e,s=[],c=[],(a=n.__P)&&((i=xs({},r)).__v=r.__v+1,ls.vnode&&ls.vnode(i),Is(a,i,r,n.__n,void 0!==a.ownerSVGElement,32&r.__u?[o]:null,s,null==o?Rs(r):o,!!(32&r.__u),c),i.__v=r.__v,i.__.__k[i.__i]=i,Fs(s,i,c),i.__e!=o&&Ps(i)),hs.length>t&&hs.sort(ms));Ms.__r=0}function Ts(e,t,n,i,r,o,a,s,c,p,l){var u,h,d,f,m,v=i&&i.__k||gs,y=t.length;for(n.__d=c,Ds(n,t,v),c=n.__d,u=0;u<y;u++)null!=(d=n.__k[u])&&"boolean"!=typeof d&&"function"!=typeof d&&(h=-1===d.__i?ys:v[d.__i]||ys,d.__i=u,Is(e,d,h,r,o,a,s,c,p,l),f=d.__e,d.ref&&h.ref!=d.ref&&(h.ref&&Hs(h.ref,null,d),l.push(d.ref,d.__c||f,d)),null==m&&null!=f&&(m=f),65536&d.__u||h.__k===d.__k?c=Bs(d,c,e):"function"==typeof d.type&&void 0!==d.__d?c=d.__d:f&&(c=f.nextSibling),d.__d=void 0,d.__u&=-196609);n.__d=c,n.__e=m}function Ds(e,t,n){var i,r,o,a,s,c=t.length,p=n.length,l=p,u=0;for(e.__k=[],i=0;i<c;i++)a=i+u,null!=(r=e.__k[i]=null==(r=t[i])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?Ss(null,r,null,null,null):_s(r)?Ss(Cs,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?Ss(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,s=Ns(r,n,a,l),r.__i=s,o=null,-1!==s&&(l--,(o=n[s])&&(o.__u|=131072)),null==o||null===o.__v?(-1==s&&u--,"function"!=typeof r.type&&(r.__u|=65536)):s!==a&&(s===a+1?u++:s>a?l>c-a?u+=s-a:u--:s<a?s==a-1&&(u=s-a):u=0,s!==i+u&&(r.__u|=65536))):(o=n[a])&&null==o.key&&o.__e&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=Rs(o)),Vs(o,o,!1),n[a]=null,l--);if(l)for(i=0;i<p;i++)null!=(o=n[i])&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=Rs(o)),Vs(o,o))}function Bs(e,t,n){var i,r;if("function"==typeof e.type){for(i=e.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=e,t=Bs(i[r],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function Ns(e,t,n,i){var r=e.key,o=e.type,a=n-1,s=n+1,c=t[n];if(null===c||c&&r==c.key&&o===c.type&&!(131072&c.__u))return n;if(i>(null==c||131072&c.__u?0:1))for(;a>=0||s<t.length;){if(a>=0){if((c=t[a])&&!(131072&c.__u)&&r==c.key&&o===c.type)return a;a--}if(s<t.length){if((c=t[s])&&!(131072&c.__u)&&r==c.key&&o===c.type)return s;s++}}return-1}function js(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||bs.test(t)?n:n+"px"}function Os(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||js(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||js(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?i?n.u=i.u:(n.u=Date.now(),e.addEventListener(t,o?$s:Ls,o)):e.removeEventListener(t,o?$s:Ls,o);else{if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function Ls(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(ls.event?ls.event(e):e)}}function $s(e){if(this.l)return this.l[e.type+!0](ls.event?ls.event(e):e)}function Is(e,t,n,i,r,o,a,s,c,p){var l,u,h,d,f,m,v,y,g,b,_,x,w,E,S,C=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(c=!!(32&n.__u),o=[s=t.__e=n.__e]),(l=ls.__b)&&l(t);e:if("function"==typeof C)try{if(y=t.props,g=(l=C.contextType)&&i[l.__c],b=l?g?g.props.value:l.__:i,n.__c?v=(u=t.__c=n.__c).__=u.__E:("prototype"in C&&C.prototype.render?t.__c=u=new C(y,b):(t.__c=u=new ks(y,b),u.constructor=C,u.render=Gs),g&&g.sub(u),u.props=y,u.state||(u.state={}),u.context=b,u.__n=i,h=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=C.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=xs({},u.__s)),xs(u.__s,C.getDerivedStateFromProps(y,u.__s))),d=u.props,f=u.state,u.__v=t,h)null==C.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==C.getDerivedStateFromProps&&y!==d&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(y,b),!u.__e&&(null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(y,u.__s,b)||t.__v===n.__v)){for(t.__v!==n.__v&&(u.props=y,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),_=0;_<u._sb.length;_++)u.__h.push(u._sb[_]);u._sb=[],u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(y,u.__s,b),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(d,f,m)}))}if(u.context=b,u.props=y,u.__P=e,u.__e=!1,x=ls.__r,w=0,"prototype"in C&&C.prototype.render){for(u.state=u.__s,u.__d=!1,x&&x(t),l=u.render(u.props,u.state,u.context),E=0;E<u._sb.length;E++)u.__h.push(u._sb[E]);u._sb=[]}else do{u.__d=!1,x&&x(t),l=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++w<25);u.state=u.__s,null!=u.getChildContext&&(i=xs(xs({},i),u.getChildContext())),h||null==u.getSnapshotBeforeUpdate||(m=u.getSnapshotBeforeUpdate(d,f)),Ts(e,_s(S=null!=l&&l.type===Cs&&null==l.key?l.props.children:l)?S:[S],t,n,i,r,o,a,s,c,p),u.base=t.__e,t.__u&=-161,u.__h.length&&a.push(u),v&&(u.__E=u.__=null)}catch(e){t.__v=null,c||null!=o?(t.__e=s,t.__u|=c?160:32,o[o.indexOf(s)]=null):(t.__e=n.__e,t.__k=n.__k),ls.__e(e,t,n)}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=zs(n.__e,t,n,i,r,o,a,c,p);(l=ls.diffed)&&l(t)}function Fs(e,t,n){t.__d=void 0;for(var i=0;i<n.length;i++)Hs(n[i],n[++i],n[++i]);ls.__c&&ls.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){ls.__e(e,t.__v)}}))}function zs(e,t,n,i,r,o,a,s,c){var p,l,u,h,d,f,m,v=n.props,y=t.props,g=t.type;if("svg"===g&&(r=!0),null!=o)for(p=0;p<o.length;p++)if((d=o[p])&&"setAttribute"in d==!!g&&(g?d.localName===g:3===d.nodeType)){e=d,o[p]=null;break}if(null==e){if(null===g)return document.createTextNode(y);e=r?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,y.is&&y),o=null,s=!1}if(null===g)v===y||s&&e.data===y||(e.data=y);else{if(o=o&&ps.call(e.childNodes),v=n.props||ys,!s&&null!=o)for(v={},p=0;p<e.attributes.length;p++)v[(d=e.attributes[p]).name]=d.value;for(p in v)d=v[p],"children"==p||("dangerouslySetInnerHTML"==p?u=d:"key"===p||p in y||Os(e,p,null,d,r));for(p in y)d=y[p],"children"==p?h=d:"dangerouslySetInnerHTML"==p?l=d:"value"==p?f=d:"checked"==p?m=d:"key"===p||s&&"function"!=typeof d||v[p]===d||Os(e,p,d,v[p],r);if(l)s||u&&(l.__html===u.__html||l.__html===e.innerHTML)||(e.innerHTML=l.__html),t.__k=[];else if(u&&(e.innerHTML=""),Ts(e,_s(h)?h:[h],t,n,i,r&&"foreignObject"!==g,o,a,o?o[0]:n.__k&&Rs(n,0),s,c),null!=o)for(p=o.length;p--;)null!=o[p]&&ws(o[p]);s||(p="value",void 0!==f&&(f!==e[p]||"progress"===g&&!f||"option"===g&&f!==v[p])&&Os(e,p,f,v[p],!1),p="checked",void 0!==m&&m!==e[p]&&Os(e,p,m,v[p],!1))}return e}function Hs(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){ls.__e(e,n)}}function Vs(e,t,n){var i,r;if(ls.unmount&&ls.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||Hs(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){ls.__e(e,t)}i.base=i.__P=null,e.__c=void 0}if(i=e.__k)for(r=0;r<i.length;r++)i[r]&&Vs(i[r],t,n||"function"!=typeof e.type);n||null==e.__e||ws(e.__e),e.__=e.__e=e.__d=void 0}function Gs(e,t,n){return this.constructor(e,n)}function Ws(e,t,n){var i,r,o,a;ls.__&&ls.__(e,t),r=(i="function"==typeof n)?null:t.__k,o=[],a=[],Is(t,e=(!i&&n||t).__k=Es(Cs,null,[e]),r||ys,ys,void 0!==t.ownerSVGElement,!i&&n?[n]:r?null:t.firstChild?ps.call(t.childNodes):null,o,!i&&n?n:r?r.__e:t.firstChild,i,a),Fs(o,e,a)}ps=gs.slice,ls={__e:function(e,t,n,i){for(var r,o,a;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),a=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,i||{}),a=r.__d),a)return r.__E=r}catch(t){e=t}throw e}},us=0,ks.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=xs({},this.state),"function"==typeof e&&(e=e(xs({},n),this.props)),e&&xs(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),As(this))},ks.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),As(this))},ks.prototype.render=Cs,hs=[],fs="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ms=function(e,t){return e.__v.__b-t.__v.__b},Ms.__r=0;var Us=function(e,t,n,i){var r;t[0]=0;for(var o=1;o<t.length;o++){var a=t[o++],s=t[o]?(t[0]|=a?1:2,n[t[o++]]):t[++o];3===a?i[0]=s:4===a?i[1]=Object.assign(i[1]||{},s):5===a?(i[1]=i[1]||{})[t[++o]]=s:6===a?i[1][t[++o]]+=s+"":a?(r=e.apply(s,Us(e,s,n,["",null])),i.push(r),s[0]?t[0]|=2:(t[o-2]=0,t[o]=r)):i.push(s)}return i},qs=new Map;var Ks,Ys,Xs,Zs,Qs=function(e){var t=qs.get(this);return t||(t=new Map,qs.set(this,t)),(t=Us(this,t.get(e)||(t.set(e,t=function(e){for(var t,n,i=1,r="",o="",a=[0],s=function(e){1===i&&(e||(r=r.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?a.push(0,e,r):3===i&&(e||r)?(a.push(3,e,r),i=2):2===i&&"..."===r&&e?a.push(4,e,0):2===i&&r&&!e?a.push(5,0,!0,r):i>=5&&((r||!e&&5===i)&&(a.push(i,0,r,n),i=6),e&&(a.push(i,e,0,n),i=6)),r=""},c=0;c<e.length;c++){c&&(1===i&&s(),s(c));for(var p=0;p<e[c].length;p++)t=e[c][p],1===i?"<"===t?(s(),a=[a],i=3):r+=t:4===i?"--"===r&&">"===t?(i=1,r=""):r=t+r[0]:o?t===o?o="":r+=t:'"'===t||"'"===t?o=t:">"===t?(s(),i=1):i&&("="===t?(i=5,n=r,r=""):"/"===t&&(i<5||">"===e[c][p+1])?(s(),3===i&&(a=a[0]),i=a,(a=a[0]).push(2,0,i),i=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(s(),i=2):r+=t),3===i&&"!--"===r&&(i=4,a=a[0])}return s(),a}(e)),t),arguments,[])).length>1?t:t[0]}.bind(Es),Js=0,ec=[],tc=[],nc=ls,ic=nc.__b,rc=nc.__r,oc=nc.diffed,ac=nc.__c,sc=nc.unmount,cc=nc.__;function pc(e,t){nc.__h&&nc.__h(Ys,e,Js||t),Js=0;var n=Ys.__H||(Ys.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:tc}),n.__[e]}function lc(e){return Js=1,function(e,t){var n=pc(Ks++,2);if(n.t=e,!n.__c&&(n.__=[wc(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],i=n.t(t,e);t!==i&&(n.__N=[i,n.__[1]],n.__c.setState({}))}],n.__c=Ys,!Ys.u)){var i=function(e,t,i){if(!n.__c.__H)return!0;var o=n.__c.__H.__.filter((function(e){return!!e.__c}));if(o.every((function(e){return!e.__N})))return!r||r.call(this,e,t,i);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&n.__c.props===e)&&(!r||r.call(this,e,t,i))};Ys.u=!0;var r=Ys.shouldComponentUpdate,o=Ys.componentWillUpdate;Ys.componentWillUpdate=function(e,t,n){if(this.__e){var a=r;r=void 0,i(e,t,n),r=a}o&&o.call(this,e,t,n)},Ys.shouldComponentUpdate=i}return n.__N||n.__}(wc,e)}function uc(e,t){var n=pc(Ks++,3);!nc.__s&&xc(n.__H,t)&&(n.__=e,n.i=t,Ys.__H.__h.push(n))}function hc(e,t){var n=pc(Ks++,4);!nc.__s&&xc(n.__H,t)&&(n.__=e,n.i=t,Ys.__h.push(n))}function dc(e){return Js=5,fc((function(){return{current:e}}),[])}function fc(e,t){var n=pc(Ks++,7);return xc(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function mc(e,t){return Js=8,fc((function(){return e}),t)}function vc(){for(var e;e=ec.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(bc),e.__H.__h.forEach(_c),e.__H.__h=[]}catch(t){e.__H.__h=[],nc.__e(t,e.__v)}}nc.__b=function(e){Ys=null,ic&&ic(e)},nc.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),cc&&cc(e,t)},nc.__r=function(e){rc&&rc(e),Ks=0;var t=(Ys=e.__c).__H;t&&(Xs===Ys?(t.__h=[],Ys.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=tc,e.__N=e.i=void 0}))):(t.__h.forEach(bc),t.__h.forEach(_c),t.__h=[],Ks=0)),Xs=Ys},nc.diffed=function(e){oc&&oc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ec.push(t)&&Zs===nc.requestAnimationFrame||((Zs=nc.requestAnimationFrame)||gc)(vc)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==tc&&(e.__=e.__V),e.i=void 0,e.__V=tc}))),Xs=Ys=null},nc.__c=function(e,t){t.some((function(e){try{e.__h.forEach(bc),e.__h=e.__h.filter((function(e){return!e.__||_c(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],nc.__e(n,e.__v)}})),ac&&ac(e,t)},nc.unmount=function(e){sc&&sc(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{bc(e)}catch(e){t=e}})),n.__H=void 0,t&&nc.__e(t,n.__v))};var yc="function"==typeof requestAnimationFrame;function gc(e){var t,n=function(){clearTimeout(i),yc&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);yc&&(t=requestAnimationFrame(n))}function bc(e){var t=Ys,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Ys=t}function _c(e){var t=Ys;e.__c=e.__(),Ys=t}function xc(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function wc(e,t){return"function"==typeof t?t(e):t}function Ec(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Ec(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Sc(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Ec(e))&&(i&&(i+=" "),i+=t);return i}function Cc(e){const{headerEntries:t,onSelect:n,selectedEntry:i,setSelectedEntry:r,title:o}=e,a=fc((()=>t.reduce(((e,t)=>{const n=t.group||"default",i=e.find((e=>e.id===n));return i?i.entries.push(t):e.push({id:n,entries:[t]}),e}),[])),[t]);return Qs` 182 `}var Mc=["contextPad.close","canvas.viewbox.changing","commandStack.changed"];function Tc(e,t,n,i){this._eventBus=t,this._canvas=n,this._search=i,this._current=null;var r=s(e&&e.scale)?e.scale:{min:1,max:1};this._config={scale:r},t.on("diagram.destroy",(()=>{this.close()})),t.on("element.changed",(e=>{const t=this.isOpen()&&this._current.target;e.element===t&&this.refresh()}))}function Dc(e,t){return Bc(t)-Bc(e)}function Bc(e){return e.reduce(((e,t)=>e+function(e){const t=Math.log(e.value.length);if(!e.match)return-.07*t;return(e.start?e.end?131.9:7.87:e.wordStart?2.19:1)*t}(t)),0)}function Nc(e="",t=""){return e.localeCompare(t)}function jc(e){return e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")}Tc.$inject=["config.popupMenu","eventBus","canvas","search"],Tc.prototype._render=function(){const{position:e,providerId:t,entries:n,headerEntries:i,emptyPlaceholder:r,options:o}=this._current,a=Object.entries(n).map((([e,t])=>({id:e,...t}))),s=Object.entries(i).map((([e,t])=>({id:e,...t}))),c=e&&(t=>this._ensureVisible(t,e)),p=this._updateScale(this._current.container);Ws(Qs` 197 `,this._current.container)},Tc.prototype.open=function(e,t,n,i){if(!e)throw new Error("target is missing");if(!t)throw new Error("providers for <"+t+"> not found");if(!n)throw new Error("position is missing");this.isOpen()&&this.close();const{entries:r,headerEntries:o,emptyPlaceholder:a}=this._getContext(e,t);this._current={position:n,providerId:t,target:e,entries:r,headerEntries:o,emptyPlaceholder:a,container:this._createContainer({provider:t}),options:i},this._emit("open"),this._bindAutoClose(),this._render()},Tc.prototype.refresh=function(){if(!this.isOpen())return;const{target:e,providerId:t}=this._current,{entries:n,headerEntries:i,emptyPlaceholder:r}=this._getContext(e,t);this._current={...this._current,entries:n,headerEntries:i,emptyPlaceholder:r},this._emit("refresh"),this._render()},Tc.prototype._getContext=function(e,t){const n=this._getProviders(t);if(!n||!n.length)throw new Error("provider for <"+t+"> not found");const i=this._getEntries(e,n),r=this._getHeaderEntries(e,n);return{entries:i,headerEntries:r,emptyPlaceholder:this._getEmptyPlaceholder(n),empty:!(Object.keys(i).length||Object.keys(r).length)}},Tc.prototype.close=function(){this.isOpen()&&(this._emit("close"),this.reset(),this._canvas.restoreFocus(),this._current=null)},Tc.prototype.reset=function(){const e=this._current.container;Ws(null,e),ve(e)},Tc.prototype._emit=function(e,t){this._eventBus.fire(`popupMenu.${e}`,t)},Tc.prototype._onOpened=function(){this._emit("opened")},Tc.prototype._onClosed=function(){this._emit("closed")},Tc.prototype._createContainer=function(e){var t=this._canvas.getContainer();const n=he(`<div class="djs-popup-parent djs-scrollable" data-popup=${e.provider}></div>`);return t.appendChild(n),n},Tc.prototype._bindAutoClose=function(){this._eventBus.once(Mc,this.close,this)},Tc.prototype._unbindAutoClose=function(){this._eventBus.off(Mc,this.close,this)},Tc.prototype._updateScale=function(){var e,t,n=this._canvas.zoom(),i=this._config 181 `}var Oc=["contextPad.close","canvas.viewbox.changing","commandStack.changed"];function jc(e,t,n){this._eventBus=t,this._canvas=n,this._current=null;var i=s(e&&e.scale)?e.scale:{ global() class in jc [all...] |
/plugin/bpmnioeditor/vendor/bpmnio-js/ |
H A D | bpmn-modeler.production.min.js | 28 …_config=F({},{size:Vr,padding:0,style:{},align:"center-top"},e||{})}Xr.prototype.createText=functi… 34 …_config={scale:i},this._eventBus=t,this._canvas=n,this._providers={},this._current={}}$c.$inject=[… class in $c
|
H A D | bpmn-modeler.development.js | 18791 this._config = assign({}, { 18840 var box = assign({}, this._config.size, options.box), 18841 style = assign({}, this._config.style, options.style), 18842 align = parseAlign(options.align || this._config.align), 21819 this._config = config || {}; 22173 this._config = assign({}, DEFAULT_CONFIG$1, config || {}); 22181 config = self._config; 32184 this._config = { class in PopupMenu 32543 var scaleConfig = this._config.scale, 38398 this._config = assign({}, DEFAULT_CONFIG, config || {}); [all …]
|