/*! For license information please see app.js.LICENSE.txt */ (()=>{var e,t={505:(e,t,n)=>{e.exports=n(15)},592:(e,t,n)=>{"use strict";var i=n(516),r=n(522),o=n(948),s=n(106),a=n(615),l=n(631),c=n(202),p=n(763);e.exports=function(e){return new Promise((function(t,n){var u=e.data,d=e.headers,h=e.responseType;i.isFormData(u)&&delete d["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(m+":"+g)}var y=a(e.baseURL,e.url);function v(){if(f){var i="getAllResponseHeaders"in f?l(f.getAllResponseHeaders()):null,o={data:h&&"text"!==h&&"json"!==h?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:i,config:e,request:f};r(t,n,o),f=null}}if(f.open(e.method.toUpperCase(),s(y,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,"onloadend"in f?f.onloadend=v:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(v)},f.onabort=function(){f&&(n(p("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){n(p("Network Error",e,null,f)),f=null},f.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(p(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},i.isStandardBrowserEnv()){var b=(e.withCredentials||c(y))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;b&&(d[e.xsrfHeaderName]=b)}"setRequestHeader"in f&&i.forEach(d,(function(e,t){void 0===u&&"content-type"===t.toLowerCase()?delete d[t]:f.setRequestHeader(t,e)})),i.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),h&&"json"!==h&&(f.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),n(e),f=null)})),u||(u=null),f.send(u)}))}},15:(e,t,n)=>{"use strict";var i=n(516),r=n(12),o=n(155),s=n(343);function a(e){var t=new o(e),n=r(o.prototype.request,t);return i.extend(n,o.prototype,t),i.extend(n,t),n}var l=a(n(987));l.Axios=o,l.create=function(e){return a(s(l.defaults,e))},l.Cancel=n(928),l.CancelToken=n(191),l.isCancel=n(864),l.all=function(e){return Promise.all(e)},l.spread=n(980),l.isAxiosError=n(19),e.exports=l,e.exports.default=l},928:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},191:(e,t,n)=>{"use strict";var i=n(928);function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new i(e),t(n.reason))}))}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r((function(t){e=t})),cancel:e}},e.exports=r},864:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},155:(e,t,n)=>{"use strict";var i=n(516),r=n(106),o=n(471),s=n(490),a=n(343),l=n(841),c=l.validators;function p(e){this.defaults=e,this.interceptors={request:new o,response:new o}}p.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var n=[],i=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(i=i&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var r,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!i){var p=[s,void 0];for(Array.prototype.unshift.apply(p,n),p=p.concat(o),r=Promise.resolve(e);p.length;)r=r.then(p.shift(),p.shift());return r}for(var u=e;n.length;){var d=n.shift(),h=n.shift();try{u=d(u)}catch(e){h(e);break}}try{r=s(u)}catch(e){return Promise.reject(e)}for(;o.length;)r=r.then(o.shift(),o.shift());return r},p.prototype.getUri=function(e){return e=a(this.defaults,e),r(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},i.forEach(["delete","get","head","options"],(function(e){p.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),i.forEach(["post","put","patch"],(function(e){p.prototype[e]=function(t,n,i){return this.request(a(i||{},{method:e,url:t,data:n}))}})),e.exports=p},471:(e,t,n)=>{"use strict";var i=n(516);function r(){this.handlers=[]}r.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){i.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=r},615:(e,t,n)=>{"use strict";var i=n(137),r=n(680);e.exports=function(e,t){return e&&!i(t)?r(e,t):t}},763:(e,t,n)=>{"use strict";var i=n(449);e.exports=function(e,t,n,r,o){var s=new Error(e);return i(s,t,n,r,o)}},490:(e,t,n)=>{"use strict";var i=n(516),r=n(881),o=n(864),s=n(987);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=r.call(e,e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),i.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=r.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(a(e),t&&t.response&&(t.response.data=r.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},449:e=>{"use strict";e.exports=function(e,t,n,i,r){return e.config=t,n&&(e.code=n),e.request=i,e.response=r,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},343:(e,t,n)=>{"use strict";var i=n(516);e.exports=function(e,t){t=t||{};var n={},r=["url","method","data"],o=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function l(e,t){return i.isPlainObject(e)&&i.isPlainObject(t)?i.merge(e,t):i.isPlainObject(t)?i.merge({},t):i.isArray(t)?t.slice():t}function c(r){i.isUndefined(t[r])?i.isUndefined(e[r])||(n[r]=l(void 0,e[r])):n[r]=l(e[r],t[r])}i.forEach(r,(function(e){i.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),i.forEach(o,c),i.forEach(s,(function(r){i.isUndefined(t[r])?i.isUndefined(e[r])||(n[r]=l(void 0,e[r])):n[r]=l(void 0,t[r])})),i.forEach(a,(function(i){i in t?n[i]=l(e[i],t[i]):i in e&&(n[i]=l(void 0,e[i]))}));var p=r.concat(o).concat(s).concat(a),u=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===p.indexOf(e)}));return i.forEach(u,c),n}},522:(e,t,n)=>{"use strict";var i=n(763);e.exports=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(i("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},881:(e,t,n)=>{"use strict";var i=n(516),r=n(987);e.exports=function(e,t,n){var o=this||r;return i.forEach(n,(function(n){e=n.call(o,e,t)})),e}},987:(e,t,n)=>{"use strict";var i=n(225),r=n(516),o=n(18),s=n(449),a={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,p={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==i&&"[object process]"===Object.prototype.toString.call(i))&&(c=n(592)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(l(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw s(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};p.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){p.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){p.headers[e]=r.merge(a)})),e.exports=p},12:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i{"use strict";var i=n(516);function r(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(i.isURLSearchParams(t))o=t.toString();else{var s=[];i.forEach(t,(function(e,t){null!=e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,(function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),s.push(r(t)+"="+r(e))})))})),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},680:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},948:(e,t,n)=>{"use strict";var i=n(516);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,n,r,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),i.isString(r)&&a.push("path="+r),i.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},137:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},19:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},202:(e,t,n)=>{"use strict";var i=n(516);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=i.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},18:(e,t,n)=>{"use strict";var i=n(516);e.exports=function(e,t){i.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))}},631:(e,t,n)=>{"use strict";var i=n(516),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,s={};return e?(i.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=i.trim(e.substr(0,o)).toLowerCase(),n=i.trim(e.substr(o+1)),t){if(s[t]&&r.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},980:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},841:(e,t,n)=>{"use strict";var i=n(198),r={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){r[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var o={},s=i.version.split(".");function a(e,t){for(var n=t?t.split("."):s,i=e.split("."),r=0;r<3;r++){if(n[r]>i[r])return!0;if(n[r]0;){var o=i[r],s=t[o];if(s){var a=e[o],l=void 0===a||s(a,o,e);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:r}},516:(e,t,n)=>{"use strict";var i=n(12),r=Object.prototype.toString;function o(e){return"[object Array]"===r.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==r.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===r.call(e)}function p(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,i=e.length;n{n(571),window.BpmnModeler=n(74),$(document).ready((function(){$('[data-toggle="tooltip"]').tooltip();var e=document.querySelectorAll(".sidebar-platform .sidebar-list .li-parent"),t=document.querySelector(".sidebar-platform .sidebar-content");e.length&&e.forEach((function(e,n){e.nextElementSibling;e.addEventListener("mouseover",(function(){t.style.overflow="visible",e.style.top=0===n?"-50px":"".concat(50*n,"px")})),e.addEventListener("mouseout",(function(){t.style.overflow=null,e.style.top=null}))})),$(".tree-toggle").click((function(){$("#app").hasClass("menu-open")&&($(this).parent().children("ul.tree-content").slideToggle(200),$(this).toggleClass("active"))})),$(".menu-trigger").click((function(){axios.get("/ru/set_open_menu").then((function(e){console.log(e.data)})),$("#app").hasClass("menu-open")?$("#app").removeClass("menu-open"):$("#app").addClass("menu-open")})),$(".filter-trigger").on("click",(function(e){e.stopPropagation(),$("#filter_block").slideToggle(200),$(this).toggleClass("active")})),Waves.init(),Waves.attach(".sidebar-list li a"),Waves.attach(".sidebar-list li .tree-toggle"),Waves.attach(".navbar-platform .item-nav"),Waves.attach(".btn"),$('[data-toggle="tooltip"]').tooltip()}))},571:(e,t,n)=>{"use strict";n.r(t);var i=n(692),r=n.n(i),o=n(454);window._=n(543);try{n(454)}catch(e){}window.axios=n(505),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest",window.$=window.jQuery=r(),n(458),window.bootstrap=o},454:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Alert:()=>Ct,Button:()=>At,Carousel:()=>un,Collapse:()=>Pn,Dropdown:()=>Kn,Modal:()=>Mi,Offcanvas:()=>Xi,Popover:()=>xr,ScrollSpy:()=>Mr,Tab:()=>eo,Toast:()=>go,Tooltip:()=>mr});var i={};n.r(i),n.d(i,{afterMain:()=>E,afterRead:()=>x,afterWrite:()=>k,applyStyles:()=>R,arrow:()=>J,auto:()=>l,basePlacements:()=>c,beforeMain:()=>w,beforeRead:()=>v,beforeWrite:()=>O,bottom:()=>o,clippingParents:()=>d,computeStyles:()=>ie,createPopper:()=>Re,createPopperBase:()=>De,createPopperLite:()=>Ne,detectOverflow:()=>be,end:()=>u,eventListeners:()=>oe,flip:()=>xe,hide:()=>Ee,left:()=>a,main:()=>_,modifierPhases:()=>S,offset:()=>Oe,placements:()=>y,popper:()=>f,popperGenerator:()=>Me,popperOffsets:()=>Pe,preventOverflow:()=>ke,read:()=>b,reference:()=>m,right:()=>s,start:()=>p,top:()=>r,variationPlacements:()=>g,viewport:()=>h,write:()=>P});var r="top",o="bottom",s="right",a="left",l="auto",c=[r,o,s,a],p="start",u="end",d="clippingParents",h="viewport",f="popper",m="reference",g=c.reduce((function(e,t){return e.concat([t+"-"+p,t+"-"+u])}),[]),y=[].concat(c,[l]).reduce((function(e,t){return e.concat([t,t+"-"+p,t+"-"+u])}),[]),v="beforeRead",b="read",x="afterRead",w="beforeMain",_="main",E="afterMain",O="beforeWrite",P="write",k="afterWrite",S=[v,b,x,w,_,E,O,P,k];function C(e){return e?(e.nodeName||"").toLowerCase():null}function T(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function A(e){return e instanceof T(e).Element||e instanceof Element}function M(e){return e instanceof T(e).HTMLElement||e instanceof HTMLElement}function D(e){return"undefined"!=typeof ShadowRoot&&(e instanceof T(e).ShadowRoot||e instanceof ShadowRoot)}const R={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},i=t.attributes[e]||{},r=t.elements[e];M(r)&&C(r)&&(Object.assign(r.style,n),Object.keys(i).forEach((function(e){var t=i[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var i=t.elements[e],r=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});M(i)&&C(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(e){i.removeAttribute(e)})))}))}},requires:["computeStyles"]};function N(e){return e.split("-")[0]}var $=Math.max,j=Math.min,I=Math.round;function L(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function B(){return!/^((?!chrome|android).)*safari/i.test(L())}function q(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),r=1,o=1;t&&M(e)&&(r=e.offsetWidth>0&&I(i.width)/e.offsetWidth||1,o=e.offsetHeight>0&&I(i.height)/e.offsetHeight||1);var s=(A(e)?T(e):window).visualViewport,a=!B()&&n,l=(i.left+(a&&s?s.offsetLeft:0))/r,c=(i.top+(a&&s?s.offsetTop:0))/o,p=i.width/r,u=i.height/o;return{width:p,height:u,top:c,right:l+p,bottom:c+u,left:l,x:l,y:c}}function z(e){var t=q(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function F(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&D(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function V(e){return T(e).getComputedStyle(e)}function H(e){return["table","td","th"].indexOf(C(e))>=0}function U(e){return((A(e)?e.ownerDocument:e.document)||window.document).documentElement}function W(e){return"html"===C(e)?e:e.assignedSlot||e.parentNode||(D(e)?e.host:null)||U(e)}function G(e){return M(e)&&"fixed"!==V(e).position?e.offsetParent:null}function Q(e){for(var t=T(e),n=G(e);n&&H(n)&&"static"===V(n).position;)n=G(n);return n&&("html"===C(n)||"body"===C(n)&&"static"===V(n).position)?t:n||function(e){var t=/firefox/i.test(L());if(/Trident/i.test(L())&&M(e)&&"fixed"===V(e).position)return null;var n=W(e);for(D(n)&&(n=n.host);M(n)&&["html","body"].indexOf(C(n))<0;){var i=V(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||t}function X(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function K(e,t,n){return $(e,j(t,n))}function Y(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Z(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const J={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,l=e.options,p=n.elements.arrow,u=n.modifiersData.popperOffsets,d=N(n.placement),h=X(d),f=[a,s].indexOf(d)>=0?"height":"width";if(p&&u){var m=function(e,t){return Y("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Z(e,c))}(l.padding,n),g=z(p),y="y"===h?r:a,v="y"===h?o:s,b=n.rects.reference[f]+n.rects.reference[h]-u[h]-n.rects.popper[f],x=u[h]-n.rects.reference[h],w=Q(p),_=w?"y"===h?w.clientHeight||0:w.clientWidth||0:0,E=b/2-x/2,O=m[y],P=_-g[f]-m[v],k=_/2-g[f]/2+E,S=K(O,k,P),C=h;n.modifiersData[i]=((t={})[C]=S,t.centerOffset=S-k,t)}},effect:function(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&F(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ee(e){return e.split("-")[1]}var te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ne(e){var t,n=e.popper,i=e.popperRect,l=e.placement,c=e.variation,p=e.offsets,d=e.position,h=e.gpuAcceleration,f=e.adaptive,m=e.roundOffsets,g=e.isFixed,y=p.x,v=void 0===y?0:y,b=p.y,x=void 0===b?0:b,w="function"==typeof m?m({x:v,y:x}):{x:v,y:x};v=w.x,x=w.y;var _=p.hasOwnProperty("x"),E=p.hasOwnProperty("y"),O=a,P=r,k=window;if(f){var S=Q(n),C="clientHeight",A="clientWidth";if(S===T(n)&&"static"!==V(S=U(n)).position&&"absolute"===d&&(C="scrollHeight",A="scrollWidth"),l===r||(l===a||l===s)&&c===u)P=o,x-=(g&&S===k&&k.visualViewport?k.visualViewport.height:S[C])-i.height,x*=h?1:-1;if(l===a||(l===r||l===o)&&c===u)O=s,v-=(g&&S===k&&k.visualViewport?k.visualViewport.width:S[A])-i.width,v*=h?1:-1}var M,D=Object.assign({position:d},f&&te),R=!0===m?function(e,t){var n=e.x,i=e.y,r=t.devicePixelRatio||1;return{x:I(n*r)/r||0,y:I(i*r)/r||0}}({x:v,y:x},T(n)):{x:v,y:x};return v=R.x,x=R.y,h?Object.assign({},D,((M={})[P]=E?"0":"",M[O]=_?"0":"",M.transform=(k.devicePixelRatio||1)<=1?"translate("+v+"px, "+x+"px)":"translate3d("+v+"px, "+x+"px, 0)",M)):Object.assign({},D,((t={})[P]=E?x+"px":"",t[O]=_?v+"px":"",t.transform="",t))}const ie={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,i=n.gpuAcceleration,r=void 0===i||i,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,c={placement:N(t.placement),variation:ee(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ne(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ne(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var re={passive:!0};const oe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,i=e.options,r=i.scroll,o=void 0===r||r,s=i.resize,a=void 0===s||s,l=T(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach((function(e){e.addEventListener("scroll",n.update,re)})),a&&l.addEventListener("resize",n.update,re),function(){o&&c.forEach((function(e){e.removeEventListener("scroll",n.update,re)})),a&&l.removeEventListener("resize",n.update,re)}},data:{}};var se={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var le={start:"end",end:"start"};function ce(e){return e.replace(/start|end/g,(function(e){return le[e]}))}function pe(e){var t=T(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ue(e){return q(U(e)).left+pe(e).scrollLeft}function de(e){var t=V(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function he(e){return["html","body","#document"].indexOf(C(e))>=0?e.ownerDocument.body:M(e)&&de(e)?e:he(W(e))}function fe(e,t){var n;void 0===t&&(t=[]);var i=he(e),r=i===(null==(n=e.ownerDocument)?void 0:n.body),o=T(i),s=r?[o].concat(o.visualViewport||[],de(i)?i:[]):i,a=t.concat(s);return r?a:a.concat(fe(W(s)))}function me(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ge(e,t,n){return t===h?me(function(e,t){var n=T(e),i=U(e),r=n.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=B();(c||!c&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+ue(e),y:l}}(e,n)):A(t)?function(e,t){var n=q(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):me(function(e){var t,n=U(e),i=pe(e),r=null==(t=e.ownerDocument)?void 0:t.body,o=$(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=$(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+ue(e),l=-i.scrollTop;return"rtl"===V(r||n).direction&&(a+=$(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(U(e)))}function ye(e,t,n,i){var r="clippingParents"===t?function(e){var t=fe(W(e)),n=["absolute","fixed"].indexOf(V(e).position)>=0&&M(e)?Q(e):e;return A(n)?t.filter((function(e){return A(e)&&F(e,n)&&"body"!==C(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),s=o[0],a=o.reduce((function(t,n){var r=ge(e,n,i);return t.top=$(r.top,t.top),t.right=j(r.right,t.right),t.bottom=j(r.bottom,t.bottom),t.left=$(r.left,t.left),t}),ge(e,s,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ve(e){var t,n=e.reference,i=e.element,l=e.placement,c=l?N(l):null,d=l?ee(l):null,h=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2;switch(c){case r:t={x:h,y:n.y-i.height};break;case o:t={x:h,y:n.y+n.height};break;case s:t={x:n.x+n.width,y:f};break;case a:t={x:n.x-i.width,y:f};break;default:t={x:n.x,y:n.y}}var m=c?X(c):null;if(null!=m){var g="y"===m?"height":"width";switch(d){case p:t[m]=t[m]-(n[g]/2-i[g]/2);break;case u:t[m]=t[m]+(n[g]/2-i[g]/2)}}return t}function be(e,t){void 0===t&&(t={});var n=t,i=n.placement,a=void 0===i?e.placement:i,l=n.strategy,p=void 0===l?e.strategy:l,u=n.boundary,g=void 0===u?d:u,y=n.rootBoundary,v=void 0===y?h:y,b=n.elementContext,x=void 0===b?f:b,w=n.altBoundary,_=void 0!==w&&w,E=n.padding,O=void 0===E?0:E,P=Y("number"!=typeof O?O:Z(O,c)),k=x===f?m:f,S=e.rects.popper,C=e.elements[_?k:x],T=ye(A(C)?C:C.contextElement||U(e.elements.popper),g,v,p),M=q(e.elements.reference),D=ve({reference:M,element:S,strategy:"absolute",placement:a}),R=me(Object.assign({},S,D)),N=x===f?R:M,$={top:T.top-N.top+P.top,bottom:N.bottom-T.bottom+P.bottom,left:T.left-N.left+P.left,right:N.right-T.right+P.right},j=e.modifiersData.offset;if(x===f&&j){var I=j[a];Object.keys($).forEach((function(e){var t=[s,o].indexOf(e)>=0?1:-1,n=[r,o].indexOf(e)>=0?"y":"x";$[e]+=I[n]*t}))}return $}const xe={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var u=n.mainAxis,d=void 0===u||u,h=n.altAxis,f=void 0===h||h,m=n.fallbackPlacements,v=n.padding,b=n.boundary,x=n.rootBoundary,w=n.altBoundary,_=n.flipVariations,E=void 0===_||_,O=n.allowedAutoPlacements,P=t.options.placement,k=N(P),S=m||(k===P||!E?[ae(P)]:function(e){if(N(e)===l)return[];var t=ae(e);return[ce(e),t,ce(t)]}(P)),C=[P].concat(S).reduce((function(e,n){return e.concat(N(n)===l?function(e,t){void 0===t&&(t={});var n=t,i=n.placement,r=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,p=void 0===l?y:l,u=ee(i),d=u?a?g:g.filter((function(e){return ee(e)===u})):c,h=d.filter((function(e){return p.indexOf(e)>=0}));0===h.length&&(h=d);var f=h.reduce((function(t,n){return t[n]=be(e,{placement:n,boundary:r,rootBoundary:o,padding:s})[N(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:b,rootBoundary:x,padding:v,flipVariations:E,allowedAutoPlacements:O}):n)}),[]),T=t.rects.reference,A=t.rects.popper,M=new Map,D=!0,R=C[0],$=0;$=0,q=B?"width":"height",z=be(t,{placement:j,boundary:b,rootBoundary:x,altBoundary:w,padding:v}),F=B?L?s:a:L?o:r;T[q]>A[q]&&(F=ae(F));var V=ae(F),H=[];if(d&&H.push(z[I]<=0),f&&H.push(z[F]<=0,z[V]<=0),H.every((function(e){return e}))){R=j,D=!1;break}M.set(j,H)}if(D)for(var U=function(e){var t=C.find((function(t){var n=M.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return R=t,"break"},W=E?3:1;W>0;W--){if("break"===U(W))break}t.placement!==R&&(t.modifiersData[i]._skip=!0,t.placement=R,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function we(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function _e(e){return[r,s,o,a].some((function(t){return e[t]>=0}))}const Ee={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,s=be(t,{elementContext:"reference"}),a=be(t,{altBoundary:!0}),l=we(s,i),c=we(a,r,o),p=_e(l),u=_e(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}};const Oe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,i=e.name,o=n.offset,l=void 0===o?[0,0]:o,c=y.reduce((function(e,n){return e[n]=function(e,t,n){var i=N(e),o=[a,r].indexOf(i)>=0?-1:1,l="function"==typeof n?n(Object.assign({},t,{placement:e})):n,c=l[0],p=l[1];return c=c||0,p=(p||0)*o,[a,s].indexOf(i)>=0?{x:p,y:c}:{x:c,y:p}}(n,t.rects,l),e}),{}),p=c[t.placement],u=p.x,d=p.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=d),t.modifiersData[i]=c}};const Pe={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ve({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};const ke={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name,l=n.mainAxis,c=void 0===l||l,u=n.altAxis,d=void 0!==u&&u,h=n.boundary,f=n.rootBoundary,m=n.altBoundary,g=n.padding,y=n.tether,v=void 0===y||y,b=n.tetherOffset,x=void 0===b?0:b,w=be(t,{boundary:h,rootBoundary:f,padding:g,altBoundary:m}),_=N(t.placement),E=ee(t.placement),O=!E,P=X(_),k="x"===P?"y":"x",S=t.modifiersData.popperOffsets,C=t.rects.reference,T=t.rects.popper,A="function"==typeof x?x(Object.assign({},t.rects,{placement:t.placement})):x,M="number"==typeof A?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(S){if(c){var I,L="y"===P?r:a,B="y"===P?o:s,q="y"===P?"height":"width",F=S[P],V=F+w[L],H=F-w[B],U=v?-T[q]/2:0,W=E===p?C[q]:T[q],G=E===p?-T[q]:-C[q],Y=t.elements.arrow,Z=v&&Y?z(Y):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=J[L],ne=J[B],ie=K(0,C[q],Z[q]),re=O?C[q]/2-U-ie-te-M.mainAxis:W-ie-te-M.mainAxis,oe=O?-C[q]/2+U+ie+ne+M.mainAxis:G+ie+ne+M.mainAxis,se=t.elements.arrow&&Q(t.elements.arrow),ae=se?"y"===P?se.clientTop||0:se.clientLeft||0:0,le=null!=(I=null==D?void 0:D[P])?I:0,ce=F+oe-le,pe=K(v?j(V,F+re-le-ae):V,F,v?$(H,ce):H);S[P]=pe,R[P]=pe-F}if(d){var ue,de="x"===P?r:a,he="x"===P?o:s,fe=S[k],me="y"===k?"height":"width",ge=fe+w[de],ye=fe-w[he],ve=-1!==[r,a].indexOf(_),xe=null!=(ue=null==D?void 0:D[k])?ue:0,we=ve?ge:fe-C[me]-T[me]-xe+M.altAxis,_e=ve?fe+C[me]+T[me]-xe-M.altAxis:ye,Ee=v&&ve?function(e,t,n){var i=K(e,t,n);return i>n?n:i}(we,fe,_e):K(v?we:ge,fe,v?_e:ye);S[k]=Ee,R[k]=Ee-fe}t.modifiersData[i]=R}},requiresIfExists:["offset"]};function Se(e,t,n){void 0===n&&(n=!1);var i,r,o=M(t),s=M(t)&&function(e){var t=e.getBoundingClientRect(),n=I(t.width)/e.offsetWidth||1,i=I(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(t),a=U(t),l=q(e,s,n),c={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(o||!o&&!n)&&(("body"!==C(t)||de(a))&&(c=(i=t)!==T(i)&&M(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:pe(i)),M(t)?((p=q(t,!0)).x+=t.clientLeft,p.y+=t.clientTop):a&&(p.x=ue(a))),{x:l.left+c.scrollLeft-p.x,y:l.top+c.scrollTop-p.y,width:l.width,height:l.height}}function Ce(e){var t=new Map,n=new Set,i=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var i=t.get(e);i&&r(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),i}var Te={placement:"bottom",modifiers:[],strategy:"absolute"};function Ae(){for(var e=arguments.length,t=new Array(e),n=0;n$e.has(e)&&$e.get(e).get(t)||null,remove(e,t){if(!$e.has(e))return;const n=$e.get(e);n.delete(t),0===n.size&&$e.delete(e)}},Ie="transitionend",Le=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e),Be=e=>{e.dispatchEvent(new Event(Ie))},qe=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),ze=e=>qe(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(Le(e)):null,Fe=e=>{if(!qe(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)return!1;if(null===t)return!1}return t},Ve=e=>!e||e.nodeType!==Node.ELEMENT_NODE||(!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))),He=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?He(e.parentNode):null},Ue=()=>{},We=e=>{e.offsetHeight},Ge=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Qe=[],Xe=()=>"rtl"===document.documentElement.dir,Ke=e=>{var t;t=()=>{const t=Ge();if(t){const n=e.NAME,i=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=i,e.jQueryInterface)}},"loading"===document.readyState?(Qe.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of Qe)e()})),Qe.push(t)):t()},Ye=(e,t=[],n=e)=>"function"==typeof e?e(...t):n,Ze=(e,t,n=!0)=>{if(!n)return void Ye(e);const i=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const i=Number.parseFloat(t),r=Number.parseFloat(n);return i||r?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let r=!1;const o=({target:n})=>{n===t&&(r=!0,t.removeEventListener(Ie,o),Ye(e))};t.addEventListener(Ie,o),setTimeout((()=>{r||Be(t)}),i)},Je=(e,t,n,i)=>{const r=e.length;let o=e.indexOf(t);return-1===o?!n&&i?e[r-1]:e[0]:(o+=n?1:-1,i&&(o=(o+r)%r),e[Math.max(0,Math.min(o,r-1))])},et=/[^.]*(?=\..*)\.|.*/,tt=/\..*/,nt=/::\d+$/,it={};let rt=1;const ot={mouseenter:"mouseover",mouseleave:"mouseout"},st=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 at(e,t){return t&&`${t}::${rt++}`||e.uidEvent||rt++}function lt(e){const t=at(e);return e.uidEvent=t,it[t]=it[t]||{},it[t]}function ct(e,t,n=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===n))}function pt(e,t,n){const i="string"==typeof t,r=i?n:t||n;let o=ft(e);return st.has(o)||(o=e),[i,r,o]}function ut(e,t,n,i,r){if("string"!=typeof t||!e)return;let[o,s,a]=pt(t,n,i);if(t in ot){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};s=e(s)}const l=lt(e),c=l[a]||(l[a]={}),p=ct(c,s,o?n:null);if(p)return void(p.oneOff=p.oneOff&&r);const u=at(s,t.replace(et,"")),d=o?function(e,t,n){return function i(r){const o=e.querySelectorAll(t);for(let{target:s}=r;s&&s!==this;s=s.parentNode)for(const a of o)if(a===s)return gt(r,{delegateTarget:s}),i.oneOff&&mt.off(e,r.type,t,n),n.apply(s,[r])}}(e,n,s):function(e,t){return function n(i){return gt(i,{delegateTarget:e}),n.oneOff&&mt.off(e,i.type,t),t.apply(e,[i])}}(e,s);d.delegationSelector=o?n:null,d.callable=s,d.oneOff=r,d.uidEvent=u,c[u]=d,e.addEventListener(a,d,o)}function dt(e,t,n,i,r){const o=ct(t[n],i,r);o&&(e.removeEventListener(n,o,Boolean(r)),delete t[n][o.uidEvent])}function ht(e,t,n,i){const r=t[n]||{};for(const[o,s]of Object.entries(r))o.includes(i)&&dt(e,t,n,s.callable,s.delegationSelector)}function ft(e){return e=e.replace(tt,""),ot[e]||e}const mt={on(e,t,n,i){ut(e,t,n,i,!1)},one(e,t,n,i){ut(e,t,n,i,!0)},off(e,t,n,i){if("string"!=typeof t||!e)return;const[r,o,s]=pt(t,n,i),a=s!==t,l=lt(e),c=l[s]||{},p=t.startsWith(".");if(void 0===o){if(p)for(const n of Object.keys(l))ht(e,l,n,t.slice(1));for(const[n,i]of Object.entries(c)){const r=n.replace(nt,"");a&&!t.includes(r)||dt(e,l,s,i.callable,i.delegationSelector)}}else{if(!Object.keys(c).length)return;dt(e,l,s,o,r?n:null)}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const i=Ge();let r=null,o=!0,s=!0,a=!1;t!==ft(t)&&i&&(r=i.Event(t,n),i(e).trigger(r),o=!r.isPropagationStopped(),s=!r.isImmediatePropagationStopped(),a=r.isDefaultPrevented());const l=gt(new Event(t,{bubbles:o,cancelable:!0}),n);return a&&l.preventDefault(),s&&e.dispatchEvent(l),l.defaultPrevented&&r&&r.preventDefault(),l}};function gt(e,t={}){for(const[n,i]of Object.entries(t))try{e[n]=i}catch(t){Object.defineProperty(e,n,{configurable:!0,get:()=>i})}return e}function yt(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function vt(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}const bt={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${vt(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${vt(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter((e=>e.startsWith("bs")&&!e.startsWith("bsConfig")));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),t[n]=yt(e.dataset[i])}return t},getDataAttribute:(e,t)=>yt(e.getAttribute(`data-bs-${vt(t)}`))};class xt{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=qe(t)?bt.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...qe(t)?bt.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[i,r]of Object.entries(t)){const t=e[i],o=qe(t)?"element":null==(n=t)?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(r).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${o}" but expected type "${r}".`)}var n}}class wt extends xt{constructor(e,t){super(),(e=ze(e))&&(this._element=e,this._config=this._getConfig(t),je.set(this._element,this.constructor.DATA_KEY,this))}dispose(){je.remove(this._element,this.constructor.DATA_KEY),mt.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){Ze(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return je.get(ze(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const _t=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t?t.split(",").map((e=>Le(e))).join(","):null},Et={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const n=[];let i=e.parentNode.closest(t);for(;i;)n.push(i),i=i.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((e=>`${e}:not([tabindex^="-"])`)).join(",");return this.find(t,e).filter((e=>!Ve(e)&&Fe(e)))},getSelectorFromElement(e){const t=_t(e);return t&&Et.findOne(t)?t:null},getElementFromSelector(e){const t=_t(e);return t?Et.findOne(t):null},getMultipleElementsFromSelector(e){const t=_t(e);return t?Et.find(t):[]}},Ot=(e,t="hide")=>{const n=`click.dismiss${e.EVENT_KEY}`,i=e.NAME;mt.on(document,n,`[data-bs-dismiss="${i}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),Ve(this))return;const r=Et.getElementFromSelector(this)||this.closest(`.${i}`);e.getOrCreateInstance(r)[t]()}))},Pt=".bs.alert",kt=`close${Pt}`,St=`closed${Pt}`;class Ct extends wt{static get NAME(){return"alert"}close(){if(mt.trigger(this._element,kt).defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove(),mt.trigger(this._element,St),this.dispose()}static jQueryInterface(e){return this.each((function(){const t=Ct.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}Ot(Ct,"close"),Ke(Ct);const Tt='[data-bs-toggle="button"]';class At extends wt{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const t=At.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}mt.on(document,"click.bs.button.data-api",Tt,(e=>{e.preventDefault();const t=e.target.closest(Tt);At.getOrCreateInstance(t).toggle()})),Ke(At);const Mt=".bs.swipe",Dt=`touchstart${Mt}`,Rt=`touchmove${Mt}`,Nt=`touchend${Mt}`,$t=`pointerdown${Mt}`,jt=`pointerup${Mt}`,It={endCallback:null,leftCallback:null,rightCallback:null},Lt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Bt extends xt{constructor(e,t){super(),this._element=e,e&&Bt.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return It}static get DefaultType(){return Lt}static get NAME(){return"swipe"}dispose(){mt.off(this._element,Mt)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),Ye(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&Ye(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(mt.on(this._element,$t,(e=>this._start(e))),mt.on(this._element,jt,(e=>this._end(e))),this._element.classList.add("pointer-event")):(mt.on(this._element,Dt,(e=>this._start(e))),mt.on(this._element,Rt,(e=>this._move(e))),mt.on(this._element,Nt,(e=>this._end(e))))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const qt=".bs.carousel",zt=".data-api",Ft="ArrowLeft",Vt="ArrowRight",Ht="next",Ut="prev",Wt="left",Gt="right",Qt=`slide${qt}`,Xt=`slid${qt}`,Kt=`keydown${qt}`,Yt=`mouseenter${qt}`,Zt=`mouseleave${qt}`,Jt=`dragstart${qt}`,en=`load${qt}${zt}`,tn=`click${qt}${zt}`,nn="carousel",rn="active",on=".active",sn=".carousel-item",an=on+sn,ln={[Ft]:Gt,[Vt]:Wt},cn={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},pn={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class un extends wt{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Et.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===nn&&this.cycle()}static get Default(){return cn}static get DefaultType(){return pn}static get NAME(){return"carousel"}next(){this._slide(Ht)}nextWhenVisible(){!document.hidden&&Fe(this._element)&&this.next()}prev(){this._slide(Ut)}pause(){this._isSliding&&Be(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?mt.one(this._element,Xt,(()=>this.cycle())):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void mt.one(this._element,Xt,(()=>this.to(e)));const n=this._getItemIndex(this._getActive());if(n===e)return;const i=e>n?Ht:Ut;this._slide(i,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&mt.on(this._element,Kt,(e=>this._keydown(e))),"hover"===this._config.pause&&(mt.on(this._element,Yt,(()=>this.pause())),mt.on(this._element,Zt,(()=>this._maybeEnableCycle()))),this._config.touch&&Bt.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of Et.find(".carousel-item img",this._element))mt.on(e,Jt,(e=>e.preventDefault()));const e={leftCallback:()=>this._slide(this._directionToOrder(Wt)),rightCallback:()=>this._slide(this._directionToOrder(Gt)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new Bt(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=ln[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=Et.findOne(on,this._indicatorsElement);t.classList.remove(rn),t.removeAttribute("aria-current");const n=Et.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(rn),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const n=this._getActive(),i=e===Ht,r=t||Je(this._getItems(),n,i,this._config.wrap);if(r===n)return;const o=this._getItemIndex(r),s=t=>mt.trigger(this._element,t,{relatedTarget:r,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:o});if(s(Qt).defaultPrevented)return;if(!n||!r)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=r;const l=i?"carousel-item-start":"carousel-item-end",c=i?"carousel-item-next":"carousel-item-prev";r.classList.add(c),We(r),n.classList.add(l),r.classList.add(l);this._queueCallback((()=>{r.classList.remove(l,c),r.classList.add(rn),n.classList.remove(rn,c,l),this._isSliding=!1,s(Xt)}),n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Et.findOne(an,this._element)}_getItems(){return Et.find(sn,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return Xe()?e===Wt?Ut:Ht:e===Wt?Ht:Ut}_orderToDirection(e){return Xe()?e===Ut?Wt:Gt:e===Ut?Gt:Wt}static jQueryInterface(e){return this.each((function(){const t=un.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)}))}}mt.on(document,tn,"[data-bs-slide], [data-bs-slide-to]",(function(e){const t=Et.getElementFromSelector(this);if(!t||!t.classList.contains(nn))return;e.preventDefault();const n=un.getOrCreateInstance(t),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===bt.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())})),mt.on(window,en,(()=>{const e=Et.find('[data-bs-ride="carousel"]');for(const t of e)un.getOrCreateInstance(t)})),Ke(un);const dn=".bs.collapse",hn=`show${dn}`,fn=`shown${dn}`,mn=`hide${dn}`,gn=`hidden${dn}`,yn=`click${dn}.data-api`,vn="show",bn="collapse",xn="collapsing",wn=`:scope .${bn} .${bn}`,_n='[data-bs-toggle="collapse"]',En={parent:null,toggle:!0},On={parent:"(null|element)",toggle:"boolean"};class Pn extends wt{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=Et.find(_n);for(const e of n){const t=Et.getSelectorFromElement(e),n=Et.find(t).filter((e=>e===this._element));null!==t&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return En}static get DefaultType(){return On}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>Pn.getOrCreateInstance(e,{toggle:!1})))),e.length&&e[0]._isTransitioning)return;if(mt.trigger(this._element,hn).defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(bn),this._element.classList.add(xn),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(xn),this._element.classList.add(bn,vn),this._element.style[t]="",mt.trigger(this._element,fn)}),this._element,!0),this._element.style[t]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(mt.trigger(this._element,mn).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,We(this._element),this._element.classList.add(xn),this._element.classList.remove(bn,vn);for(const e of this._triggerArray){const t=Et.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0;this._element.style[e]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(xn),this._element.classList.add(bn),mt.trigger(this._element,gn)}),this._element,!0)}_isShown(e=this._element){return e.classList.contains(vn)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=ze(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(_n);for(const t of e){const e=Et.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=Et.find(wn,this._config.parent);return Et.find(e,this._config.parent).filter((e=>!t.includes(e)))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const n of e)n.classList.toggle("collapsed",!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each((function(){const n=Pn.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e]()}}))}}mt.on(document,yn,_n,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of Et.getMultipleElementsFromSelector(this))Pn.getOrCreateInstance(e,{toggle:!1}).toggle()})),Ke(Pn);const kn="dropdown",Sn=".bs.dropdown",Cn=".data-api",Tn="ArrowUp",An="ArrowDown",Mn=`hide${Sn}`,Dn=`hidden${Sn}`,Rn=`show${Sn}`,Nn=`shown${Sn}`,$n=`click${Sn}${Cn}`,jn=`keydown${Sn}${Cn}`,In=`keyup${Sn}${Cn}`,Ln="show",Bn='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',qn=`${Bn}.${Ln}`,zn=".dropdown-menu",Fn=Xe()?"top-end":"top-start",Vn=Xe()?"top-start":"top-end",Hn=Xe()?"bottom-end":"bottom-start",Un=Xe()?"bottom-start":"bottom-end",Wn=Xe()?"left-start":"right-start",Gn=Xe()?"right-start":"left-start",Qn={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Xn={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Kn extends wt{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=Et.next(this._element,zn)[0]||Et.prev(this._element,zn)[0]||Et.findOne(zn,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Qn}static get DefaultType(){return Xn}static get NAME(){return kn}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Ve(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!mt.trigger(this._element,Rn,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const e of[].concat(...document.body.children))mt.on(e,"mouseover",Ue);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ln),this._element.classList.add(Ln),mt.trigger(this._element,Nn,e)}}hide(){if(Ve(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!mt.trigger(this._element,Mn,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.off(e,"mouseover",Ue);this._popper&&this._popper.destroy(),this._menu.classList.remove(Ln),this._element.classList.remove(Ln),this._element.setAttribute("aria-expanded","false"),bt.removeDataAttribute(this._menu,"popper"),mt.trigger(this._element,Dn,e)}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!qe(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${kn.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){let e=this._element;"parent"===this._config.reference?e=this._parent:qe(this._config.reference)?e=ze(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Re(e,this._menu,t)}_isShown(){return this._menu.classList.contains(Ln)}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return Wn;if(e.classList.contains("dropstart"))return Gn;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?Vn:Fn:t?Un:Hn}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(bt.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...Ye(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const n=Et.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((e=>Fe(e)));n.length&&Je(n,t,e===An,!n.includes(t)).focus()}static jQueryInterface(e){return this.each((function(){const t=Kn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=Et.find(qn);for(const n of t){const t=Kn.getInstance(n);if(!t||!1===t._config.autoClose)continue;const i=e.composedPath(),r=i.includes(t._menu);if(i.includes(t._element)||"inside"===t._config.autoClose&&!r||"outside"===t._config.autoClose&&r)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const o={relatedTarget:t._element};"click"===e.type&&(o.clickEvent=e),t._completeHide(o)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),n="Escape"===e.key,i=[Tn,An].includes(e.key);if(!i&&!n)return;if(t&&!n)return;e.preventDefault();const r=this.matches(Bn)?this:Et.prev(this,Bn)[0]||Et.next(this,Bn)[0]||Et.findOne(Bn,e.delegateTarget.parentNode),o=Kn.getOrCreateInstance(r);if(i)return e.stopPropagation(),o.show(),void o._selectMenuItem(e);o._isShown()&&(e.stopPropagation(),o.hide(),r.focus())}}mt.on(document,jn,Bn,Kn.dataApiKeydownHandler),mt.on(document,jn,zn,Kn.dataApiKeydownHandler),mt.on(document,$n,Kn.clearMenus),mt.on(document,In,Kn.clearMenus),mt.on(document,$n,Bn,(function(e){e.preventDefault(),Kn.getOrCreateInstance(this).toggle()})),Ke(Kn);const Yn="backdrop",Zn="show",Jn=`mousedown.bs.${Yn}`,ei={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},ti={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class ni extends xt{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return ei}static get DefaultType(){return ti}static get NAME(){return Yn}show(e){if(!this._config.isVisible)return void Ye(e);this._append();const t=this._getElement();this._config.isAnimated&&We(t),t.classList.add(Zn),this._emulateAnimation((()=>{Ye(e)}))}hide(e){this._config.isVisible?(this._getElement().classList.remove(Zn),this._emulateAnimation((()=>{this.dispose(),Ye(e)}))):Ye(e)}dispose(){this._isAppended&&(mt.off(this._element,Jn),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=ze(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),mt.on(e,Jn,(()=>{Ye(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(e){Ze(e,this._getElement(),this._config.isAnimated)}}const ii=".bs.focustrap",ri=`focusin${ii}`,oi=`keydown.tab${ii}`,si="backward",ai={autofocus:!0,trapElement:null},li={autofocus:"boolean",trapElement:"element"};class ci extends xt{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return ai}static get DefaultType(){return li}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),mt.off(document,ii),mt.on(document,ri,(e=>this._handleFocusin(e))),mt.on(document,oi,(e=>this._handleKeydown(e))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,mt.off(document,ii))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const n=Et.focusableChildren(t);0===n.length?t.focus():this._lastTabNavDirection===si?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?si:"forward")}}const pi=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ui=".sticky-top",di="padding-right",hi="margin-right";class fi{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,di,(t=>t+e)),this._setElementAttributes(pi,di,(t=>t+e)),this._setElementAttributes(ui,hi,(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,di),this._resetElementAttributes(pi,di),this._resetElementAttributes(ui,hi)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,n){const i=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+i)return;this._saveInitialAttribute(e,t);const r=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${n(Number.parseFloat(r))}px`)}))}_saveInitialAttribute(e,t){const n=e.style.getPropertyValue(t);n&&bt.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const n=bt.getDataAttribute(e,t);null!==n?(bt.removeDataAttribute(e,t),e.style.setProperty(t,n)):e.style.removeProperty(t)}))}_applyManipulationCallback(e,t){if(qe(e))t(e);else for(const n of Et.find(e,this._element))t(n)}}const mi=".bs.modal",gi=`hide${mi}`,yi=`hidePrevented${mi}`,vi=`hidden${mi}`,bi=`show${mi}`,xi=`shown${mi}`,wi=`resize${mi}`,_i=`click.dismiss${mi}`,Ei=`mousedown.dismiss${mi}`,Oi=`keydown.dismiss${mi}`,Pi=`click${mi}.data-api`,ki="modal-open",Si="show",Ci="modal-static",Ti={backdrop:!0,focus:!0,keyboard:!0},Ai={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Mi extends wt{constructor(e,t){super(e,t),this._dialog=Et.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new fi,this._addEventListeners()}static get Default(){return Ti}static get DefaultType(){return Ai}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||this._isTransitioning)return;mt.trigger(this._element,bi,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(ki),this._adjustDialog(),this._backdrop.show((()=>this._showElement(e))))}hide(){if(!this._isShown||this._isTransitioning)return;mt.trigger(this._element,gi).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Si),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated()))}dispose(){mt.off(window,mi),mt.off(this._dialog,mi),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ni({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new ci({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=Et.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),We(this._element),this._element.classList.add(Si);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,mt.trigger(this._element,xi,{relatedTarget:e})}),this._dialog,this._isAnimated())}_addEventListeners(){mt.on(this._element,Oi,(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),mt.on(window,wi,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),mt.on(this._element,Ei,(e=>{mt.one(this._element,_i,(t=>{this._element===e.target&&this._element===t.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(ki),this._resetAdjustments(),this._scrollBar.reset(),mt.trigger(this._element,vi)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(mt.trigger(this._element,yi).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(Ci)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(Ci),this._queueCallback((()=>{this._element.classList.remove(Ci),this._queueCallback((()=>{this._element.style.overflowY=t}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),n=t>0;if(n&&!e){const e=Xe()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!n&&e){const e=Xe()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each((function(){const n=Mi.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e](t)}}))}}mt.on(document,Pi,'[data-bs-toggle="modal"]',(function(e){const t=Et.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),mt.one(t,bi,(e=>{e.defaultPrevented||mt.one(t,vi,(()=>{Fe(this)&&this.focus()}))}));const n=Et.findOne(".modal.show");n&&Mi.getInstance(n).hide();Mi.getOrCreateInstance(t).toggle(this)})),Ot(Mi),Ke(Mi);const Di=".bs.offcanvas",Ri=".data-api",Ni=`load${Di}${Ri}`,$i="show",ji="showing",Ii="hiding",Li=".offcanvas.show",Bi=`show${Di}`,qi=`shown${Di}`,zi=`hide${Di}`,Fi=`hidePrevented${Di}`,Vi=`hidden${Di}`,Hi=`resize${Di}`,Ui=`click${Di}${Ri}`,Wi=`keydown.dismiss${Di}`,Gi={backdrop:!0,keyboard:!0,scroll:!1},Qi={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Xi extends wt{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Gi}static get DefaultType(){return Qi}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown)return;if(mt.trigger(this._element,Bi,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new fi).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ji);this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add($i),this._element.classList.remove(ji),mt.trigger(this._element,qi,{relatedTarget:e})}),this._element,!0)}hide(){if(!this._isShown)return;if(mt.trigger(this._element,zi).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Ii),this._backdrop.hide();this._queueCallback((()=>{this._element.classList.remove($i,Ii),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new fi).reset(),mt.trigger(this._element,Vi)}),this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new ni({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():mt.trigger(this._element,Fi)}:null})}_initializeFocusTrap(){return new ci({trapElement:this._element})}_addEventListeners(){mt.on(this._element,Wi,(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():mt.trigger(this._element,Fi))}))}static jQueryInterface(e){return this.each((function(){const t=Xi.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}mt.on(document,Ui,'[data-bs-toggle="offcanvas"]',(function(e){const t=Et.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),Ve(this))return;mt.one(t,Vi,(()=>{Fe(this)&&this.focus()}));const n=Et.findOne(Li);n&&n!==t&&Xi.getInstance(n).hide();Xi.getOrCreateInstance(t).toggle(this)})),mt.on(window,Ni,(()=>{for(const e of Et.find(Li))Xi.getOrCreateInstance(e).show()})),mt.on(window,Hi,(()=>{for(const e of Et.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&Xi.getOrCreateInstance(e).hide()})),Ot(Xi),Ke(Xi);const Ki={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Yi=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Zi=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Ji=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!Yi.has(n)||Boolean(Zi.test(e.nodeValue)):t.filter((e=>e instanceof RegExp)).some((e=>e.test(n)))};const er={allowList:Ki,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},tr={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},nr={entry:"(string|element|function|null)",selector:"(string|element)"};class ir extends xt{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return er}static get DefaultType(){return tr}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((e=>this._resolvePossibleFunction(e))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,n]of Object.entries(this._config.content))this._setContent(e,n,t);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},nr)}_setContent(e,t,n){const i=Et.findOne(n,e);i&&((t=this._resolvePossibleFunction(t))?qe(t)?this._putElementInTemplate(ze(t),i):this._config.html?i.innerHTML=this._maybeSanitize(t):i.textContent=t:i.remove())}_maybeSanitize(e){return this._config.sanitize?function(e,t,n){if(!e.length)return e;if(n&&"function"==typeof n)return n(e);const i=(new window.DOMParser).parseFromString(e,"text/html"),r=[].concat(...i.body.querySelectorAll("*"));for(const e of r){const n=e.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){e.remove();continue}const i=[].concat(...e.attributes),r=[].concat(t["*"]||[],t[n]||[]);for(const t of i)Ji(t,r)||e.removeAttribute(t.nodeName)}return i.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return Ye(e,[this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const rr=new Set(["sanitize","allowList","sanitizeFn"]),or="fade",sr="show",ar=".tooltip-inner",lr=".modal",cr="hide.bs.modal",pr="hover",ur="focus",dr={AUTO:"auto",TOP:"top",RIGHT:Xe()?"left":"right",BOTTOM:"bottom",LEFT:Xe()?"right":"left"},hr={allowList:Ki,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},fr={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class mr extends wt{constructor(e,t){super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return hr}static get DefaultType(){return fr}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),mt.off(this._element.closest(lr),cr,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const e=mt.trigger(this._element,this.constructor.eventName("show")),t=(He(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(n),mt.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(sr),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.on(e,"mouseover",Ue);this._queueCallback((()=>{mt.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(mt.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;if(this._getTipElement().classList.remove(sr),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.off(e,"mouseover",Ue);this._activeTrigger.click=!1,this._activeTrigger[ur]=!1,this._activeTrigger[pr]=!1,this._isHovered=null;this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),mt.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(or,sr),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME).toString();return t.setAttribute("id",n),this._isAnimated()&&t.classList.add(or),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new ir({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[ar]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(or)}_isShown(){return this.tip&&this.tip.classList.contains(sr)}_createPopper(e){const t=Ye(this._config.placement,[this,e,this._element]),n=dr[t.toUpperCase()];return Re(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_resolvePossibleFunction(e){return Ye(e,[this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...t,...Ye(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if("click"===t)mt.on(this._element,this.constructor.eventName("click"),this._config.selector,(e=>{this._initializeOnDelegatedTarget(e).toggle()}));else if("manual"!==t){const e=t===pr?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=t===pr?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");mt.on(this._element,e,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?ur:pr]=!0,t._enter()})),mt.on(this._element,n,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?ur:pr]=t._element.contains(e.relatedTarget),t._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},mt.on(this._element.closest(lr),cr,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=bt.getDataAttributes(this._element);for(const e of Object.keys(t))rr.has(e)&&delete t[e];return e={...t,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:ze(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,n]of Object.entries(this._config))this.constructor.Default[t]!==n&&(e[t]=n);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each((function(){const t=mr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}Ke(mr);const gr=".popover-header",yr=".popover-body",vr={...mr.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},br={...mr.DefaultType,content:"(null|string|element|function)"};class xr extends mr{static get Default(){return vr}static get DefaultType(){return br}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[gr]:this._getTitle(),[yr]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each((function(){const t=xr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}Ke(xr);const wr=".bs.scrollspy",_r=`activate${wr}`,Er=`click${wr}`,Or=`load${wr}.data-api`,Pr="active",kr="[href]",Sr=".nav-link",Cr=`${Sr}, .nav-item > ${Sr}, .list-group-item`,Tr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Ar={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Mr extends wt{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Tr}static get DefaultType(){return Ar}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=ze(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map((e=>Number.parseFloat(e)))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(mt.off(this._config.target,Er),mt.on(this._config.target,Er,kr,(e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const n=this._rootElement||window,i=t.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:i,behavior:"smooth"});n.scrollTop=i}})))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((e=>this._observerCallback(e)),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),n=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},i=(this._rootElement||document.documentElement).scrollTop,r=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(o));continue}const e=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(r&&e){if(n(o),!i)return}else r||e||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=Et.find(kr,this._config.target);for(const t of e){if(!t.hash||Ve(t))continue;const e=Et.findOne(decodeURI(t.hash),this._element);Fe(e)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(Pr),this._activateParents(e),mt.trigger(this._element,_r,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))Et.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(Pr);else for(const t of Et.parents(e,".nav, .list-group"))for(const e of Et.prev(t,Cr))e.classList.add(Pr)}_clearActiveClass(e){e.classList.remove(Pr);const t=Et.find(`${kr}.${Pr}`,e);for(const e of t)e.classList.remove(Pr)}static jQueryInterface(e){return this.each((function(){const t=Mr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}mt.on(window,Or,(()=>{for(const e of Et.find('[data-bs-spy="scroll"]'))Mr.getOrCreateInstance(e)})),Ke(Mr);const Dr=".bs.tab",Rr=`hide${Dr}`,Nr=`hidden${Dr}`,$r=`show${Dr}`,jr=`shown${Dr}`,Ir=`click${Dr}`,Lr=`keydown${Dr}`,Br=`load${Dr}`,qr="ArrowLeft",zr="ArrowRight",Fr="ArrowUp",Vr="ArrowDown",Hr="Home",Ur="End",Wr="active",Gr="fade",Qr="show",Xr=".dropdown-toggle",Kr=`:not(${Xr})`,Yr='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Zr=`${`.nav-link${Kr}, .list-group-item${Kr}, [role="tab"]${Kr}`}, ${Yr}`,Jr=`.${Wr}[data-bs-toggle="tab"], .${Wr}[data-bs-toggle="pill"], .${Wr}[data-bs-toggle="list"]`;class eo extends wt{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),mt.on(this._element,Lr,(e=>this._keydown(e))))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),n=t?mt.trigger(t,Rr,{relatedTarget:e}):null;mt.trigger(e,$r,{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(Wr),this._activate(Et.getElementFromSelector(e));this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),mt.trigger(e,jr,{relatedTarget:t})):e.classList.add(Qr)}),e,e.classList.contains(Gr))}_deactivate(e,t){if(!e)return;e.classList.remove(Wr),e.blur(),this._deactivate(Et.getElementFromSelector(e));this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),mt.trigger(e,Nr,{relatedTarget:t})):e.classList.remove(Qr)}),e,e.classList.contains(Gr))}_keydown(e){if(![qr,zr,Fr,Vr,Hr,Ur].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter((e=>!Ve(e)));let n;if([Hr,Ur].includes(e.key))n=t[e.key===Hr?0:t.length-1];else{const i=[zr,Vr].includes(e.key);n=Je(t,e.target,i,!0)}n&&(n.focus({preventScroll:!0}),eo.getOrCreateInstance(n).show())}_getChildren(){return Et.find(Zr,this._parent)}_getActiveElem(){return this._getChildren().find((e=>this._elemIsActive(e)))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=Et.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains("dropdown"))return;const i=(e,i)=>{const r=Et.findOne(e,n);r&&r.classList.toggle(i,t)};i(Xr,Wr),i(".dropdown-menu",Qr),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(Wr)}_getInnerElement(e){return e.matches(Zr)?e:Et.findOne(Zr,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each((function(){const t=eo.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}mt.on(document,Ir,Yr,(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),Ve(this)||eo.getOrCreateInstance(this).show()})),mt.on(window,Br,(()=>{for(const e of Et.find(Jr))eo.getOrCreateInstance(e)})),Ke(eo);const to=".bs.toast",no=`mouseover${to}`,io=`mouseout${to}`,ro=`focusin${to}`,oo=`focusout${to}`,so=`hide${to}`,ao=`hidden${to}`,lo=`show${to}`,co=`shown${to}`,po="hide",uo="show",ho="showing",fo={animation:"boolean",autohide:"boolean",delay:"number"},mo={animation:!0,autohide:!0,delay:5e3};class go extends wt{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return mo}static get DefaultType(){return fo}static get NAME(){return"toast"}show(){if(mt.trigger(this._element,lo).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(po),We(this._element),this._element.classList.add(uo,ho),this._queueCallback((()=>{this._element.classList.remove(ho),mt.trigger(this._element,co),this._maybeScheduleHide()}),this._element,this._config.animation)}hide(){if(!this.isShown())return;if(mt.trigger(this._element,so).defaultPrevented)return;this._element.classList.add(ho),this._queueCallback((()=>{this._element.classList.add(po),this._element.classList.remove(ho,uo),mt.trigger(this._element,ao)}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(uo),super.dispose()}isShown(){return this._element.classList.contains(uo)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){mt.on(this._element,no,(e=>this._onInteraction(e,!0))),mt.on(this._element,io,(e=>this._onInteraction(e,!1))),mt.on(this._element,ro,(e=>this._onInteraction(e,!0))),mt.on(this._element,oo,(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=go.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}Ot(go),Ke(go)},515:(e,t,n)=>{"use strict";var i=n(603);function r(e){return(s(e,"zeebe:IoMapping")||[])[0]}function o(e){return function(e,t){var n=r(e);return n&&n.get(t)||[]}(e,"inputParameters")}function s(e,t,n){var r=function(e,t){var n=[],r=e.get("extensionElements");if(void 0!==r){var o=r.get("values");void 0!==o&&(n=i.filter(o,(function(e){return function(e,t){return e&&"function"==typeof e.$instanceOf&&e.$instanceOf(t)}(e,t)})))}return n}(e,t);return n?(r[0]||{})[n]||[]:r}function a(e){for(var t=[],n=e;n.$parent;)t.push(n.$parent),n=n.$parent;return t}function l(e,t,n){n=n||0,i.isArray(e)||(e=[e]),i.forEach(e,(function(e,r){var o=t(e,r,n);i.isArray(o)&&o.length&&l(o,t,n+1)}))}function c(e,t,n){var i=!n||-1===e.indexOf(t);return i&&e.push(t),i}function p(e,t,n){var i=[],r=[];return l(e,(function(e,o,s){c(i,e,t);var a=e.flowElements;if((-1===n||s=0?e[o].origin=(n=e[o].origin,r=t.origin,n.concat(r)):e.push(t)}function h(e,t,n){var r,s,l,c,p=(r=n,s=t,l=a(e),c=i.find(l,(function(e){return function(e,t){return e&&"function"==typeof e.$instanceOf&&e.$instanceOf(t)}(e,"bpmn:SubProcess")&&function(e,t){return i.find(o(e),(function(e){return e.target===t}))}(e,s)})),c||r);return{name:t,origin:[e],scope:p}}var f=[function(e){var t=e.elements,n=e.processVariables;return i.isArray(t)||(t=[t]),i.forEach(t,(function(e){var t=function(e){return(r(e)||{}).inputParameters}(e);i.forEach(t,(function(t){var i=h(e,t.target,e);d(n,i)}))})),n},function(e){var t=e.elements,n=e.processVariables;return i.isArray(t)||(t=[t]),i.forEach(t,(function(e){var t=e.loopCharacteristics,i=t&&function(e){const t=s(e,"zeebe:LoopCharacteristics")[0];return t&&t.inputElement}(t);if(i){var r=h(e,i,e);d(n,r)}})),n},function(e){var t=e.elements,n=e.containerElement,o=e.processVariables;return i.isArray(t)||(t=[t]),i.forEach(t,(function(e){var t=function(e){return(r(e)||{}).outputParameters}(e);i.forEach(t,(function(t){var i=h(e,t.target,n);d(o,i)}))})),o},function(e){var t=e.elements,n=e.containerElement,r=e.processVariables;return i.isArray(t)||(t=[t]),i.forEach(t,(function(e){var t=e.loopCharacteristics,i=t&&function(e){const t=s(e,"zeebe:LoopCharacteristics")[0];return t&&t.outputCollection}(t);if(i){var o=h(e,i,n);d(r,o)}})),r},function(e){var t=e.elements,n=e.containerElement,r=e.processVariables;return i.isArray(t)||(t=[t]),i.forEach(t,(function(e){var t=function(e){return(s(e,"zeebe:CalledDecision")||[])[0]}(e)||function(e){return(s(e,"zeebe:Script")||[])[0]}(e);if(t){var i=t.resultVariable;if(i){var o=h(e,i,n);d(r,o)}}})),r}];function m(e,t=[]){var n=[],r=u([e],!1);const o=[];return i.forEach([...f,...t],(function(t){o.push(t({elements:r,containerElement:e,processVariables:n}))})),Promise.all(o).then((()=>n))}async function g(e,t,n=[]){var r,o=await m(t,n),s=function(e,t){var n=u(t);return i.find(n,(function(t){return t.id===e}))}(e,t),l=i.filter(o,(function(e){return e.scope.id===s.id})),c=a(s),p=i.filter(o,(function(e){return i.find(c,(function(t){return t.id===e.scope.id}))}));return r=p,l.concat(r)}function y(e){return e&&e.businessObject||e}function v(e,t){var n=y(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}t.Hp=function(e,t=[]){return g(function(e){const t=y(e);if(v(e,"bpmn:Participant"))return t.processRef.id;return t.id}(e),function(e){const t=y(e);if(v(t,"bpmn:Participant"))return t.processRef;if(v(t,"bpmn:Process"))return t;let n=t;for(;n.$parent&&!v(n,"bpmn:Process");)n=n.$parent;return n}(e),t)}},35:e=>{function t(e){this.cache=e}e.exports=t,t.prototype.resolveRule=function(e,t){return this.resolve("rule",e,t)},t.prototype.resolveConfig=function(e,t){return this.resolve("config",e,t)},t.prototype.resolve=function(e,t,n){const i=`${t}/${n}`,r=this.cache[`${e}:${i}`];if(!r)throw new Error(`unknown ${e} <${i}>`);return r}},74:(e,t,n)=>{"use strict";function i(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}n.r(t),n.d(t,{default:()=>ute});var r=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var t=e.exports=function(e,n){if(n||(n=16),void 0===e&&(e=128),e<=0)return"0";for(var i=Math.log(Math.pow(2,e))/Math.log(n),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,e/r))/Math.log(n)*r;var o=i-Math.floor(i),s="";for(r=0;r=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 o(e){if(!(this instanceof o))return new o(e);e=e||[128,36,1],this._seed=e.length?r.rack(e[0],e[1],e[2]):e}o.prototype.next=function(e){return this._seed(e||!0)},o.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},o.prototype.claim=function(e,t){this._seed.set(e,t||!0)},o.prototype.assigned=function(e){return this._seed.get(e)||!1},o.prototype.unclaim=function(e){delete this._seed.hats[e]},o.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};const s=o;function a(e){return Array.prototype.concat.apply([],e)}const l=Object.prototype.toString,c=Object.prototype.hasOwnProperty;function p(e){return void 0===e}function u(e){return void 0!==e}function d(e){return null==e}function h(e){return"[object Array]"===l.call(e)}function f(e){return"[object Object]"===l.call(e)}function m(e){return"[object Number]"===l.call(e)}function g(e){const t=l.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function y(e){return"[object String]"===l.call(e)}function v(e,t){return!d(e)&&c.call(e,t)}function b(e,t){const n=j(t);let i;return _(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function x(e,t){const n=j(t);let i=h(e)?-1:void 0;return _(e,(function(e,t){if(n(e,t))return i=t,!1})),i}function w(e,t){const n=j(t);let i=[];return _(e,(function(e,t){n(e,t)&&i.push(e)})),i}function _(e,t){let n,i;if(p(e))return;const r=h(e)?L:I;for(let o in e)if(v(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function E(e,t){if(p(e))return[];!function(e){if(!h(e))throw new Error("must supply array")}(e);const n=j(t);return e.filter((function(e,t){return!n(e,t)}))}function O(e,t,n){return _(e,(function(e,i){n=t(n,e,i)})),n}function P(e,t){return!!O(e,(function(e,n,i){return e&&t(n,i)}),!0)}function k(e,t){return!!b(e,t)}function S(e,t){let n=[];return _(e,(function(e,i){n.push(t(e,i))})),n}function C(e){return e&&Object.keys(e)||[]}function T(e){return S(e,(e=>e))}function A(e,t,n={}){return t=$(t),_(e,(function(e){let i=t(e)||"_",r=n[i];r||(r=n[i]=[]),r.push(e)})),n}function M(e,...t){e=$(e);let n={};return _(t,(t=>A(t,e,n))),S(n,(function(e,t){return e[0]}))}const D=M;function R(e,t){t=$(t);let n=[];return _(e,(function(e,i){let r=t(e,i),o={d:r,v:e};for(var s=0;se.v))}function N(e){return function(t){return P(e,(function(e,n){return t[n]===e}))}}function $(e){return g(e)?e:t=>t[e]}function j(e){return g(e)?e:t=>t===e}function I(e){return e}function L(e){return Number(e)}function B(e,t){let n,i,r,o;function s(n){let s=Date.now(),c=n?0:o+t-s;if(c>0)return a(c);e.apply(r,i),l()}function a(e){n=setTimeout(s,e)}function l(){n&&clearTimeout(n),n=o=i=r=void 0}function c(...e){o=Date.now(),i=e,r=this,n||a(t)}return c.flush=function(){n&&s(!0),l()},c.cancel=l,c}function q(e,t){return e.bind(t)}function z(e,...t){return Object.assign(e,...t)}function F(e,t,n){let i=e;return _(t,(function(e,r){if("number"!=typeof e&&"string"!=typeof e)throw new Error("illegal key type: "+typeof e+". Key should be of type number or string.");if("constructor"===e)throw new Error("illegal key: constructor");if("__proto__"===e)throw new Error("illegal key: __proto__");let o=t[r+1],s=i[e];u(o)&&d(s)&&(s=i[e]=isNaN(+o)?{}:[]),p(o)?p(n)?delete i[e]:i[e]=n:i=s})),e}function V(e,t){let n={},i=Object(e);return _(t,(function(t){t in i&&(n[t]=e[t])})),n}function H(e,t){let n={};return _(Object(e),(function(e,i){-1===t.indexOf(i)&&(n[i]=e)})),n}function U(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 W=Object.prototype.toString,G=Object.prototype.hasOwnProperty;function Q(e,t){return G.call(e,t)}function X(e,t){let n,i;if(void 0===e)return;const r=function(e){return"[object Array]"===W.call(e)}(e)?Y:K;for(let o in e)if(Q(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function K(e){return e}function Y(e){return Number(e)}function Z(e,...t){const n=e.style;return X(t,(function(e){e&&X(e,(function(e,t){n[t]=e}))})),e}function J(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}const ee=Object.prototype.toString;function te(e){return new ne(e)}function ne(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function ie(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function re(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}ne.prototype.add=function(e){return this.list.add(e),this},ne.prototype.remove=function(e){return"[object RegExp]"==ee.call(e)?this.removeMatching(e):(this.list.remove(e),this)},ne.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n
a',ye=!fe.getElementsByTagName("link").length,fe=void 0);var ve={legend:[1,"
","
"],tr:[2,"","
"],col:[2,"","
"],_default:ye?[1,"X
","
"]:[0,"",""]};ve.td=ve.th=[3,"","
"],ve.option=ve.optgroup=[1,'"],ve.thead=ve.tbody=ve.colgroup=ve.caption=ve.tfoot=[1,"","
"],ve.polyline=ve.ellipse=ve.polygon=ve.circle=ve.text=ve.line=ve.path=ve.rect=ve.g=[1,'',""];var be=ge;function xe(e,t){return e&&"function"==typeof e.matches&&e.matches(t)||!1}function we(e,t){return(t=t||document).querySelector(e)}function _e(e,t){return(t=t||document).querySelectorAll(e)}function Ee(e){e.parentNode&&e.parentNode.removeChild(e)}function Oe(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}function Pe(e,t){return t.appendChild(Oe(e,t))}function ke(e,t){return Pe(t,e),e}var Se={"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 Ce(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=Se[i];r?(2===r&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function Te(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return Se[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);Ce(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)Ce(e,i,t[i])}(e,t);return e}const Ae=Object.prototype.toString;function Me(e){return new De(e)}function De(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Re(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Ne(e){return e.cloneNode(!0)}De.prototype.add=function(e){return this.list.add(e),this},De.prototype.remove=function(e){return"[object RegExp]"==Ae.call(e)?this.removeMatching(e):(this.list.remove(e),this)},De.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n"+e+"",t=!0);var n=function(e){var t;return(t=new DOMParser).async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function Le(e,t){var n;return"<"===(e=e.trim()).charAt(0)?(n=Ie(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS($e,e),t&&Te(n,t),n}var Be=null;function qe(){return null===Be&&(Be=Le("svg")),Be}function ze(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}function Fe(e){return e?qe().createSVGTransformFromMatrix(e):qe().createSVGTransform()}var Ve=/([&<>]{1})/g,He=/([&<>\n\r"]{1})/g,Ue={"&":"&","<":"<",">":">",'"':"'"};function We(e,t){return e.replace(t,(function(e,t){return Ue[t]||t}))}function Ge(e,t){var n,i,r,o,s;switch(e.nodeType){case 3:t.push(We(e.textContent,Ve));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n"),n=0,i=(s=e.childNodes).length;n")}else t.push("/>");break;case 8:t.push("\x3c!--",We(e.nodeValue,Ve),"--\x3e");break;case 4:t.push("");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function Qe(e,t){var n=Ie(t);if(Re(e),t){(function(e){return"#document-fragment"===e.nodeName})(n)||(n=n.documentElement);for(var i,r=(i=n.childNodes,Array.prototype.slice.call(i)),o=0;o{const t=e.match(ot);return(t&&t[1]||e).trim()}))||[]}function at(e,t){const n=t||{get:function(e,t){if(i.push(e),!1===t)return null;throw a(`No provider for "${e}"!`)}},i=[],r=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),s=o.injector=this,a=function(e){const t=i.join(" -> ");return i.length=0,new Error(t?`${e} (Resolving: ${t})`:e)};function l(e,t){if(!r[e]&&e.includes(".")){const t=e.split(".");let n=l(t.shift());for(;t.length;)n=n[t.shift()];return n}if(tt(o,e))return o[e];if(tt(r,e)){if(-1!==i.indexOf(e))throw i.push(e),a("Cannot resolve circular dependency!");return i.push(e),o[e]=r[e][0](r[e][1]),i.pop(),o[e]}return n.get(e,t)}function c(e,t){if(void 0===t&&(t={}),"function"!=typeof e){if(!et(e))throw a(`Cannot invoke "${e}". Expected a function!`);e=nt(e.slice())}return{fn:e,dependencies:(e.$inject||st(e)).map((e=>tt(t,e)?t[e]:l(e)))}}function p(e){const{fn:t,dependencies:n}=c(e);return new(Function.prototype.bind.call(t,null,...n))}function u(e,t,n){const{fn:i,dependencies:r}=c(e,n);return i.apply(t,r)}function d(e){return nt((t=>e.get(t)))}function h(e,t){if(t&&t.length){const n=Object.create(null),i=Object.create(null),o=[],s=[],a=[];let l,c,p,u;for(let e in r)l=r[e],-1!==t.indexOf(e)&&("private"===l[2]?(c=o.indexOf(l[3]),-1===c?(p=l[3].createChild([],t),u=d(p),o.push(l[3]),s.push(p),a.push(u),n[e]=[u,e,"private",p]):n[e]=[a[c],e,"private",s[c]]):n[e]=[l[2],l[1]],i[e]=!0),"factory"!==l[2]&&"type"!==l[2]||!l[1].$scope||t.forEach((t=>{-1!==l[1].$scope.indexOf(t)&&(n[e]=[l[2],l[1]],i[t]=!0)}));t.forEach((e=>{if(!i[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')})),e.unshift(n)}return new at(e,s)}const f={factory:u,type:p,value:function(e){return e}};function m(e,t){const n=e.__init__||[];return function(){n.forEach((e=>{"string"==typeof e?t.get(e):t.invoke(e)}))}}function g(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=h((n||[]).concat(i)),s=nt((function(e){return o.get(e)}));t.forEach((function(e){r[e]=[s,e,"private",o]}));const a=(e.__init__||[]).slice();return a.unshift((function(){o.init()})),m(e=Object.assign({},e,{__init__:a}),o)}return Object.keys(e).forEach((function(t){if("__init__"===t||"__depends__"===t)return;const n=e[t];if("private"===n[2])return void(r[t]=n);const i=n[0],o=n[1];r[t]=[f[i],lt(i,o),i]})),m(e,s)}function y(e,t){return-1!==e.indexOf(t)||-1!==(e=(t.__depends__||[]).reduce(y,e)).indexOf(t)?e:e.concat(t)}this.get=l,this.invoke=u,this.instantiate=p,this.createChild=h,this.init=function(e){const t=e.reduce(y,[]).map(g);let n=!1;return function(){n||(n=!0,t.forEach((e=>e())))}}(e)}function lt(e,t){return"value"!==e&&et(t)&&(t=nt(t.slice())),t}function ct(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,s=t.attrs;if(n.canRender(r))return"render.shape"===i?n.drawShape(o,r,s):n.drawConnection(o,r,s)})),e.on(["render.getShapePath","render.getConnectionPath"],t,(function(e,t){if(n.canRender(t))return"render.getShapePath"===e.type?n.getShapePath(t):n.getConnectionPath(t)}))}function pt(e){return e.flat().join(",").replace(/,?([A-z]),?/g,"$1")}function ut(e){return["L",e.x,e.y]}function dt(e,t){const n=e.length,i=[(r=e[0],["M",r.x,r.y])];var r,o,s,a;for(let r=1;rr||void 0===r)&&(r=a+p),(l+c>o||void 0===o)&&(o=l+c)})),{x:n,y:i,height:o-i,width:r-n}}function Ot(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function Pt(e){return!(!e||!e.isFrame)}function kt(e,t){return z({},e||{},t||{})}ct.prototype.canRender=function(e){},ct.prototype.drawShape=function(e,t){},ct.prototype.drawConnection=function(e,t){},ct.prototype.getShapePath=function(e){},ct.prototype.getConnectionPath=function(e){};function St(e,t){ct.call(this,e,1),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=t.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}i(St,ct),St.prototype.canRender=function(){return!0},St.prototype.drawShape=function(e,t,n){var i=Le("rect");return Te(i,{x:0,y:0,width:t.width||0,height:t.height||0}),Pt(t)?Te(i,z({},this.FRAME_STYLE,n||{})):Te(i,z({},this.SHAPE_STYLE,n||{})),ke(e,i),i},St.prototype.drawConnection=function(e,t,n){var i=mt(t.waypoints,z({},this.CONNECTION_STYLE,n||{}));return ke(e,i),i},St.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width;return pt([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])},St.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 pt(r)},St.$inject=["eventBus","styles"];const Ct={__init__:["defaultRenderer"],defaultRenderer:["type",St],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 z(this.style(t,n),{class:e})},this.style=function(t,n){h(t)||n||(n=t,t=[]);var i=O(t,(function(t,n){return z(t,e[n]||{})}),{});return n?z(i,n):i},this.computeStyle=function(e,n,i){return h(n)||(i=n,n=[]),t.style(n||[],z({},i,e||{}))}}]};function Tt(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return-1!==n&&e.splice(n,1),n}function At(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}function Mt(e,t){return e&&t?e.indexOf(t):-1}function Dt(e,t){return e&&t?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):-1}function Rt(e,t,n,i){if(void 0===i&&(i=5),!e||!t||!n)return!1;var r=(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),o=Dt(e,t);return Math.abs(r/o)<=i}function Nt(e,t){var n=Array.from(arguments).flat();const i={x:"v",y:"h"};for(const[e,t]of Object.entries(i))if($t(e,n))return t;return!1}function $t(e,t){const n=t[0];return P(t,(function(t){return Math.abs(n[e]-t[e])<=2}))}function jt(e,t,n){return n=n||0,e.x>t.x-n&&e.y>t.y-n&&e.x=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function on(e,t,n,i,r){return e*(e*(-3*t+9*n-9*i+3*r)+6*t-12*n+6*i)-3*t+3*n}function sn(e,t,n,i,r,o,s,a,l){null==l&&(l=1);for(var c=(l=l>1?1:l<0?0:l)/2,p=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],u=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,h=0;h<12;h++){var f=c*p[h]+c,m=on(f,e,n,r,s),g=on(f,t,i,o,a),y=m*m+g*g;d+=u[h]*qt.sqrt(y)}return c*d}function an(e,t,n,i,r,o,s,a){if(!(Vt(e,n)Vt(r,s)||Vt(t,i)Vt(o,a))){var l=(e*i-t*n)*(o-a)-(t-i)*(r*a-o*s),c=(e-n)*(o-a)-(t-i)*(r-s);if(c){var p=ln(((e*i-t*n)*(r-s)-(e-n)*(r*a-o*s))/c),u=ln(l/c),d=+p.toFixed(2),h=+u.toFixed(2);if(!(d<+Ft(e,n).toFixed(2)||d>+Vt(e,n).toFixed(2)||d<+Ft(r,s).toFixed(2)||d>+Vt(r,s).toFixed(2)||h<+Ft(t,i).toFixed(2)||h>+Vt(t,i).toFixed(2)||h<+Ft(o,a).toFixed(2)||h>+Vt(o,a).toFixed(2)))return{x:p,y:u}}}}function ln(e){return Math.round(1e11*e)/1e11}function cn(e,t,n){if(!function(e,t){return e=Zt(e),rn(t=Zt(t),e.x,e.y)||rn(t,e.x2,e.y)||rn(t,e.x,e.y2)||rn(t,e.x2,e.y2)||rn(e,t.x,t.y)||rn(e,t.x2,t.y)||rn(e,t.x,t.y2)||rn(e,t.x2,t.y2)||(e.xt.x||t.xe.x)&&(e.yt.y||t.ye.y)}(nn(e),nn(t)))return n?0:[];for(var i=sn(...e),r=sn(...t),o=dn(e)?1:~~(i/5)||1,s=dn(t)?1:~~(r/5)||1,a=[],l=[],c={},p=n?0:[],u=0;u=0&&_<=1&&E>=0&&E<=1&&(n?p++:p.push({x:w.x,y:w.y,t1:_,t2:E}))}}return p}function pn(e,t,n){e=gn(e),t=gn(t);for(var i,r,o,s,a,l,c,p,u,d,h=n?0:[],f=0,m=e.length;f2&&(i.push([t,...o.splice(0,2)]),s="l",t="m"==t?"l":"L");o.length>=n[s]&&(i.push([t,...o.splice(0,n[s])]),n[s]););})),i.toString=Yt.toString,t.arr=Kt(i),i}(e)),!e||!e.length)return[["M",0,0]];var n,i=[],r=0,o=0,s=0,a=0,l=0;"M"==e[0][0]&&(s=r=+e[0][1],a=o=+e[0][2],l++,i[0]=["M",r,o]);for(var c,p,u=l,d=e.length;u=1e3&&delete i[r.shift()],r.push(n),i[n]=e(...arguments),i[n])}}((function(e,t,n){return{x:e*qt.cos(n)-t*qt.sin(n),y:e*qt.sin(n)+t*qt.cos(n)}}));if(c)E=c[0],O=c[1],w=c[2],_=c[3];else{e=(p=f(e,t,-d)).x,t=p.y;var m=(e-(a=(p=f(a,l,-d)).x))/2,g=(t-(l=p.y))/2,y=m*m/(n*n)+g*g/(i*i);y>1&&(n*=y=qt.sqrt(y),i*=y);var v=n*n,b=i*i,x=(o==s?-1:1)*qt.sqrt(Ut((v*b-v*g*g-b*m*m)/(v*g*g+b*m*m))),w=x*n*g/i+(e+a)/2,_=x*-i*m/n+(t+l)/2,E=qt.asin(((t-_)/i).toFixed(9)),O=qt.asin(((l-_)/i).toFixed(9));(E=eO&&(E-=2*zt),!s&&O>E&&(O-=2*zt)}var P=O-E;if(Ut(P)>u){var k=O,S=a,C=l;O=E+u*(s&&O>E?1:-1),h=mn(a=w+n*qt.cos(O),l=_+i*qt.sin(O),n,i,r,0,s,S,C,[O,k,w,_])}P=O-E;var T=qt.cos(E),A=qt.sin(E),M=qt.cos(O),D=qt.sin(O),R=qt.tan(P/4),N=4/3*n*R,$=4/3*i*R,j=[e,t],I=[e+N*A,t-$*T],L=[a+N*D,l-$*M],B=[a,l];if(I[0]=2*j[0]-I[0],I[1]=2*j[1]-I[1],c)return[I,L,B].concat(h);for(var q=[],z=0,F=(h=[I,L,B].concat(h).join().split(",")).length;z7){e[t].shift();for(var i=e[t];i.length;)s[t]="A",e.splice(t++,0,["C",...i.splice(0,6)]);e.splice(t,1),p=n.length}},s=[],a="",l="",c=0,p=n.length;c=r.right,a=i.top-n.y>=r.bottom,l=o?"top":a?"bottom":null,c=i.right+n.x<=r.left?"left":s?"right":null;return c&&l?l+"-"+c:c||l||"intersect"}function kn(e,t,n){var i=function(e,t){return pn(e,t)}(e,t);return 1===i.length||2===i.length&&Dt(i[0],i[1])<1?xn(i[0]):i.length>1?(i=R(i,(function(e){var t=Math.floor(100*e.t2)||1;return t=((t=100-t)<10?"0":"")+t,e.segment2+"#"+t})),xn(i[n?0:i.length-1])):null}function Sn(e,t){return Math.round(e*t)/t}function Cn(e){return m(e)?e+"px":e}function Tn(e,t,n){const i=Le("g");Me(i).add(t);const r=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]||null),i}const An={shape:["x","y","width","height"],connection:["waypoints"]};function Mn(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._init(e||{})}function Dn(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}Mn.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],Mn.prototype._init=function(e){const t=this._eventBus,n=this._container=function(e){const t=(e=z({},{width:"100%",height:"100%"},e)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),Z(n,{position:"relative",overflow:"hidden",width:Cn(e.width),height:Cn(e.height)}),t.appendChild(n),n}(e),i=this._svg=Le("svg");Te(i,{width:"100%",height:"100%"}),ke(n,i);const r=this._viewport=Tn(i,"viewport");e.deferUpdate&&(this._viewboxChanged=B(q(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)},Mn.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},Mn.prototype._clear=function(){this._elementRegistry.getAll().forEach((e=>{const t=Ot(e);"root"===t?this.removeRootElement(e):this._removeElement(e,t)})),this._planes=[],this._rootElement=null,delete this._cachedViewbox},Mn.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},Mn.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},Mn.prototype._getChildIndex=function(e){return O(this._layers,(function(t,n){return n.visible&&e>=n.index&&t++,t}),0)},Mn.prototype._createLayer=function(e,t){void 0===t&&(t=1);const n=this._getChildIndex(t);return{group:Tn(this._viewport,"layer-"+e,n),index:t,visible:!0}},Mn.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},Mn.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?(Ke(n),t.visible=!1,n):n},Mn.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],Ke(t.group))},Mn.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},Mn.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},Mn.prototype.getRootElements=function(){return this._planes.map((function(e){return e.rootElement}))},Mn.prototype._findPlaneForRoot=function(e){return b(this._planes,(function(t){return t.rootElement===e}))},Mn.prototype.getContainer=function(){return this._container},Mn.prototype._updateMarker=function(e,t,n){let i;e.id||(e=this._elementRegistry.get(e)),i=this._elementRegistry._elements[e.id],i&&(_([i.gfx,i.secondaryGfx],(function(e){e&&(n?Me(e).add(t):Me(e).remove(t))})),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},Mn.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},Mn.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},Mn.prototype.hasMarker=function(e,t){e.id||(e=this._elementRegistry.get(e));return Me(this.getGraphics(e)).has(t)},Mn.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},Mn.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},Mn.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},Mn.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},Mn.prototype.setRootElement=function(e){if(e===this._rootElement)return;let t;if(!e)throw new Error("rootElement required");return t=this._findPlaneForRoot(e),t||(e=this.addRootElement(e)),this._setRoot(e),e},Mn.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)},Mn.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})},Mn.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})},Mn.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=An[e],i=P(n,(function(e){return void 0!==t[e]}));if(!i)throw new Error("must supply { "+n.join(", ")+" } with "+e)},Mn.prototype._setParent=function(e,t,n){At(t.children,e,n),e.parent=t},Mn.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();const r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),r.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);const s=o.create(e,t,i);return this._elementRegistry.add(t,s),o.update(e,t,s),r.fire(e+".added",{element:t,gfx:s}),t},Mn.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},Mn.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},Mn.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),Tt(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},Mn.prototype.removeShape=function(e){return this._removeElement(e,"shape")},Mn.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},Mn.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},Mn.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},Mn.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},Mn.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return this._cachedViewbox;const t=this._viewport,n=this.getSize();let i,r,o,s,a,l,c;return e?(this._changeViewbox((function(){a=Math.min(n.width/e.width,n.height/e.height);const i=this._svg.createSVGMatrix().scale(a).translate(-e.x,-e.y);Ze(t,i)})),e):(o=this._rootElement?this.getActiveLayer():null,i=o&&o.getBBox()||{},s=Ze(t),r=s?s.matrix:function(e,t,n,i,r,o){var s=qe().createSVGMatrix();switch(arguments.length){case 0:return s;case 1:return ze(s,e);case 6:return ze(s,{a:e,b:t,c:n,d:i,e:r,f:o})}}(),a=Sn(r.a,1e3),l=Sn(-r.e||0,1e3),c=Sn(-r.f||0,1e3),e=this._cachedViewbox={x:l?l/a:0,y:c?c/a:0,width:n.width/a,height:n.height/a,scale:a,inner:{width:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:n})},Mn.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox((function(){e=z({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),Dn(t,n)})),{x:n.e,y:n.f}},Mn.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=wn(r),s=this.viewbox(),a=this.zoom();let l,c;s.y+=t.top/a,s.x+=t.left/a,s.width-=(t.right+t.left)/a,s.height-=(t.bottom+t.top)/a;const p=wn(s);if(r.width=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},Mn.prototype._setZoom=function(e,t){const n=this._svg,i=this._viewport,r=n.createSVGMatrix(),o=n.createSVGPoint();let s,a,l,c,p;l=i.getCTM();const u=l.a;return t?(s=z(o,t),a=s.matrixTransform(l.inverse()),c=r.translate(a.x,a.y).scale(1/u*e).translate(-a.x,-a.y),p=l.multiply(c)):p=r.scale(e),Dn(this._viewport,p),p},Mn.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},Mn.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}},Mn.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Rn="data-element-id";function Nn(e){this._elements={},this._eventBus=e}function $n(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}function jn(e){return!0===e.__refs_collection}Nn.$inject=["eventBus"],Nn.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),Te(t,Rn,i),n&&Te(n,Rn,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&&(Te(i.gfx,Rn,""),i.secondaryGfx&&Te(i.secondaryGfx,Rn,""),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&&Te(t,Rn,i),t},Nn.prototype.get=function(e){var t;t="string"==typeof e?e:e&&Te(e,Rn);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 in ref");t=this.props[t]}t.collection?In(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)},Ln.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return jn(n)||In(this,t,e),n},Ln.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},Ln.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},Ln.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 Ln({name:"children",enumerable:!0,collection:!0},{name:"parent"}),qn=new Ln({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),zn=new Ln({name:"attachers",collection:!0},{name:"host"}),Fn=new Ln({name:"outgoing",collection:!0},{name:"source"}),Vn=new Ln({name:"incoming",collection:!0},{name:"target"});function Hn(){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"),qn.bind(this,"labels"),Fn.bind(this,"outgoing"),Vn.bind(this,"incoming")}function Un(){Hn.call(this),Bn.bind(this,"children"),zn.bind(this,"host"),zn.bind(this,"attachers")}function Wn(){Hn.call(this),Bn.bind(this,"children")}function Gn(){Un.call(this),qn.bind(this,"labelTarget")}function Qn(){Hn.call(this),Fn.bind(this,"source"),Vn.bind(this,"target")}i(Un,Hn),i(Wn,Un),i(Gn,Un),i(Qn,Hn);var Xn={connection:Qn,shape:Un,label:Gn,root:Wn};function Kn(){this._uid=12}Kn.prototype.createRoot=function(e){return this.create("root",e)},Kn.prototype.createLabel=function(e){return this.create("label",e)},Kn.prototype.createShape=function(e){return this.create("shape",e)},Kn.prototype.createConnection=function(e){return this.create("connection",e)},Kn.prototype.create=function(e,t){return(t=z({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=Xn[e];if(!n)throw new Error("unknown type: <"+e+">");return z(new n,t)}(e,t)};var Yn="__fn",Zn=Array.prototype.slice;function Jn(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function ei(){}function ti(e){return e.childNodes[0]}function ni(e,t,n,i,r){var o=Fe();o.setTranslate(t,n);var s=Fe();s.setRotate(i||0,0,0);var a=Fe();a.setScale(r||1,r||1),Ze(e,[o,s,a])}function ii(e,t,n){var i=Fe();i.setTranslate(t,n),Ze(e,i)}function ri(e,t){var n=Fe();n.setRotate(t,0,0),Ze(e,n)}function oi(e,t){this._eventBus=e,this._elementRegistry=t}function si(e,t,n){var i=n||t.firstChild;e!==i&&t.insertBefore(e,i)}Jn.prototype.on=function(e,t,n,i){if(e=h(e)?e:[e],g(t)&&(i=n,n=t,t=1e3),!m(t))throw new Error("priority must be a number");var r=n;i&&((r=q(n,i))[Yn]=n[Yn]||n);var o=this;e.forEach((function(e){o._addListener(e,{priority:t,callback:r,next:null})}))},Jn.prototype.once=function(e,t,n,i){var r=this;if(g(t)&&(i=n,n=t,t=1e3),!m(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var t=n.apply(i,arguments);return r.off(e,o),t}o[Yn]=n,this.on(e,t,o)},Jn.prototype.off=function(e,t){e=h(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},Jn.prototype.createEvent=function(e){var t=new ei;return t.init(e),t},Jn.prototype.fire=function(e,t){var n,i,r,o;if(o=Zn.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 ei?t:this.createEvent(t),o[0]=n;var s=n.type;e!==s&&(n.type=e);try{r=this._invokeListeners(n,o,i)}finally{e!==s&&(n.type=s)}return void 0===r&&n.defaultPrevented&&(r=!1),r}},Jn.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},Jn.prototype._destroy=function(){this._listeners={}},Jn.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},Jn.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},Jn.prototype._addListener=function(e,t){var n,i=this._getListeners(e);if(i){for(;i;){if(i.priority or , got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function vi(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function bi(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,_(e,q(this.registerPackage,this))}function xi(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function wi(e){this.model=e}function _i(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function Ei(e){return e.replace(/^:/,"")}function Oi(e,t={}){this.properties=new wi(this),this.factory=new ui(this,this.properties),this.registry=new bi(e,this.properties),this.typeCache={},this.config=t}vi.prototype.build=function(){return V(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},vi.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)},vi.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,o=this.propertiesByName,s=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var a=r.indexOf(e);if(-1===a)throw new Error("property <"+i.name+"> not found in property list");r.splice(a,1),this.addProperty(t,n?void 0:a,s),o[i.name]=o[i.localName]=t},vi.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=yi(r[0],i),s=yi(r[1],o.prefix).name,a=this.propertiesByName[s];if(!a)throw new Error("refined property <"+s+"> not found");this.replaceProperty(a,e,n),delete e.redefines},vi.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},vi.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},vi.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},vi.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},vi.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},vi.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")},vi.prototype.hasProperty=function(e){return this.propertiesByName[e]},vi.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(_(e.properties,q((function(n){n=z({},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)},bi.prototype.getPackage=function(e){return this.packageMap[e]},bi.prototype.getPackages=function(){return this.packages},bi.prototype.registerPackage=function(e){e=z({},e);var t=this.packageMap;xi(t,e,"prefix"),xi(t,e,"uri"),_(e.types,q((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},bi.prototype.registerType=function(e,t){var n=yi((e=z({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:z(e.meta||{})})).name,t.prefix),i=n.name,r={};_(e.properties,q((function(e){var t=yi(e.name,n.prefix),i=t.name;mi(e.type)||(e.type=yi(e.type,t.prefix).name),z(e,{ns:t,name:i}),r[i]=e}),this)),z(e,{ns:n,name:i,propertiesByName:r}),_(e.extends,q((function(e){var t=yi(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},bi.prototype.mapTypes=function(e,t,n){var i=mi(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(n,i){var o=yi(n,mi(n)?"":e.prefix);r.mapTypes(o,t,i)}function s(e){return o(e,!0)}if(!i)throw new Error("unknown type <"+e.name+">");_(i.superClass,n?s:function(e){return o(e,!1)}),t(i,!n),_(i.traits,s)},bi.prototype.getEffectiveDescriptor=function(e){var t=yi(e),n=new vi(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},bi.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},wi.prototype.set=function(e,t,n){if(!y(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[Ei(t)]:i?r in e?e[r]=n:_i(e,i,n):e.$attrs[Ei(t)]=n},wi.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[Ei(t)];var i=n.name;return!e[i]&&n.isMany&&_i(e,n,[]),e[i]},wi.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;delete(n=z({},n,{get:function(){return i}})).value}Object.defineProperty(e,t,n)},wi.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},wi.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},wi.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},Oi.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},Oi.prototype.getType=function(e){var t=this.typeCache,n=y(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},Oi.prototype.createAny=function(e,t,n){var i=yi(e),r={$type:e,$instanceOf:function(e){return e===this.$type},get:function(e){return this[e]},set:function(e,t){F(this,[e],t)}},o={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};return this.properties.defineDescriptor(r,o),this.properties.defineModel(r,this),this.properties.define(r,"get",{enumerable:!1,writable:!0}),this.properties.define(r,"set",{enumerable:!1,writable:!0}),this.properties.define(r,"$parent",{enumerable:!1,writable:!0}),this.properties.define(r,"$instanceOf",{enumerable:!1,writable:!0}),_(n,(function(e,t){f(e)&&void 0!==e.value?r[e.name]=e.value:r[t]=e})),r},Oi.prototype.getPackage=function(e){return this.registry.getPackage(e)},Oi.prototype.getPackages=function(){return this.registry.getPackages()},Oi.prototype.getElementDescriptor=function(e){return e.$descriptor},Oi.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},Oi.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},Oi.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var Pi=String.fromCharCode,ki=Object.prototype.hasOwnProperty,Si=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,Ci={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function Ti(e,t,n,i){return i?ki.call(Ci,i)?Ci[i]:"&"+i+";":Pi(t||parseInt(n,16))}function Ai(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(Si,Ti):e}Object.keys(Ci).forEach((function(e){Ci[e.toUpperCase()]=Ci[e]}));var Mi="xsi:type",Di="non-whitespace outside of root node";function Ri(e){return new Error(e)}function Ni(e){return"missing namespace for prefix <"+e+">"}function $i(e){return{get:e,enumerable:!0}}function ji(e){var t,n={};for(t in e)n[t]=e[t];return n}function Ii(e){return e+"$uri"}function Li(){return{line:0,column:0}}function Bi(e){throw e}function qi(e){if(!this)return new qi(e);var t,n,i,r,o,s,a,l,c,p=e&&e.proxy,u=Bi,d=Li,h=!1,f=!1,m=null,g=!1;function y(e){e instanceof Error||(e=Ri(e)),m=e,u(e,d)}function v(e){o&&(e instanceof Error||(e=Ri(e)),o(e,d))}this.on=function(e,c){if("function"!=typeof c)throw Ri("required args ");switch(e){case"openTag":n=c;break;case"text":t=c;break;case"closeTag":i=c;break;case"error":u=c;break;case"warn":o=c;break;case"cdata":r=c;break;case"attention":l=c;break;case"question":a=c;break;case"comment":s=c;break;default:throw Ri("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw Ri("required args ");var t,n={};for(t in e)n[t]=e[t];return n["http://www.w3.org/2001/XMLSchema-instance"]="xsi",f=!0,c=n,this},this.parse=function(e){if("string"!=typeof e)throw Ri("required args ");return m=null,function(e){var o,u,m,b,x,w,_,E,O,P,k,S=f?[]:null,C=f?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[Ii(n)]=t;return i}(c):null,T=[],A=0,M=!1,D=!1,R=0,N=0,$="",j=0;function I(){if(null!==k)return k;var e,t,n,i,r,o,s,a,l,p,u,d=f&&C.xmlns,m=f&&h?[]:null,g=j,y=$,b=y.length,x={},w={};e:for(;g8)){for((p<65||p>122||p>90&&p<97)&&95!==p&&58!==p&&(v("illegal first char attribute name"),l=!0),u=g+1;u96&&p<123||p>64&&p<91||p>47&&p<59||46===p||45===p||95===p)){if(32===p||p<14&&p>8){v("missing attribute value"),g=u;continue e}if(61===p)break;v("illegal attribute name char"),l=!0}if("xmlns:xmlns"===(a=y.substring(g,u))&&(v("illegal declaration of xmlns"),l=!0),34===(p=y.charCodeAt(u+1)))-1===(u=y.indexOf('"',g=u+2))&&-1!==(u=y.indexOf("'",g))&&(v("attribute value quote missmatch"),l=!0);else if(39===p)-1===(u=y.indexOf("'",g=u+2))&&-1!==(u=y.indexOf('"',g))&&(v("attribute value quote missmatch"),l=!0);else for(v("missing attribute value quotes"),l=!0,u+=1;u8);u++);for(-1===u&&(v("missing closing quotes"),u=b,l=!0),l||(o=y.substring(g,u)),g=u;u+18);u++)g===u&&(v("illegal character after attribute end"),l=!0);if(g=u+1,!l)if(a in w)v("attribute <"+a+"> already defined");else if(w[a]=!0,f)if(h){if(null!==(r="xmlns"===a?"xmlns":120===a.charCodeAt(0)&&"xmlns:"===a.substr(0,6)?a.substr(6):null)){if(e=Ai(o),t=Ii(r),!(s=c[e])){if("xmlns"===r||t in C&&C[t]!==e)do{s="ns"+A++}while(void 0!==C[s]);else s=r;c[e]=s}C[r]!==s&&(i||(C=ji(C),i=!0),C[r]=s,"xmlns"===r&&(C[Ii(s)]=e,d=s),C[t]=e),x[a]=o;continue}m.push(a,o)}else-1!==(p=a.indexOf(":"))?(n=C[a.substring(0,p)])?((a=d===n?a.substr(p+1):n+a.substr(p))===Mi&&(-1!==(p=o.indexOf(":"))?(n=o.substring(0,p),o=(n=C[n]||n)+o.substring(p)):o=d+":"+o),x[a]=o):v(Ni(a.substring(0,p))):x[a]=o;else x[a]=o}if(h)for(g=0,b=m.length;g=s&&(t=i.exec(e))&&!((a=t[0].length+t.index)>R);)r+=1,s=a;return-1==R?(o=a,n=e.substring(N)):0===N?n=e.substring(N,R):(o=R-s,n=-1==N?e.substring(R):e.substring(R,N+1)),{data:n,line:r,column:o}}d=L,p&&(P=Object.create({},{name:$i((function(){return E})),originalName:$i((function(){return O})),attrs:$i(I),ns:$i((function(){return C}))}));for(;-1!==N;){if(-1===(R=60===e.charCodeAt(N)?N:e.indexOf("<",N)))return T.length?y("unexpected end of file"):0===N?y("missing start tag"):void(N",R)))return y("unclosed cdata");if(r&&(r(e.substring(R+9,N),d),g))return;N+=3;continue}if(45===b&&45===e.charCodeAt(R+3)){if(-1===(N=e.indexOf("--\x3e",R)))return y("unclosed comment");if(s&&(s(e.substring(R+4,N),Ai,d),g))return;N+=3;continue}}if(63!==x){for(u=R+1;;u++){if(w=e.charCodeAt(u),isNaN(w))return N=-1,y("unclosed tag");if(34===w)u=-1!==(b=e.indexOf('"',u+1))?b:u;else if(39===w)u=-1!==(b=e.indexOf("'",u+1))?b:u;else if(62===w){N=u;break}}if(33!==x){if(k={},47===x){if(M=!1,D=!0,!T.length)return y("missing open tag");if(u=E=T.pop(),b=R+2+u.length,e.substring(R+2,b)!==u)return y("closing tag mismatch");for(;b8&&x<14))return y("close tag")}else{if(47===e.charCodeAt(N-1)?(u=E=e.substring(R+1,N-1),M=!0,D=!0):(u=E=e.substring(R+1,N),M=!0,D=!1),!(x>96&&x<123||x>64&&x<91||95===x||58===x))return y("illegal first char nodeName");for(b=1,m=u.length;b96&&x<123||x>64&&x<91||x>47&&x<59||45===x||95===x||46==x)){if(32===x||x<14&&x>8){E=u.substring(0,b),k=null;break}return y("invalid nodeName")}D||T.push(E)}if(f){if(o=C,M&&(D||S.push(o),null===k&&(h=-1!==u.indexOf("xmlns",b))&&(j=b,$=u,I(),h=!1)),O=E,-1!==(x=E.indexOf(":"))){if(!(_=C[E.substring(0,x)]))return y("missing namespace on <"+O+">");E=E.substr(x+1)}else _=C.xmlns;_&&(E=_+":"+E)}if(M&&(j=b,$=u,n&&(p?n(P,Ai,D,d):n(E,I,Ai,D,d),g)))return;if(D){if(i&&(i(p?P:E,Ai,M,d),g))return;f&&(C=M?o:S.pop())}N+=1}else{if(l&&(l(e.substring(R,N+1),Ai,d),g))return;N+=1}}else{if(-1===(N=e.indexOf("?>",R)))return y("unclosed question");if(a&&(a(e.substring(R,N+2),d),g))return;N+=2}}}(e),d=Li,g=!1,m},this.stop=function(){g=!0}}function zi(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var Fi={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},Vi="xsi:type";function Hi(e){return e.xml&&e.xml.serialize}function Ui(e){return Hi(e)===Vi}function Wi(e,t){return zi(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function Gi(e){return new Error(e)}function Qi(e){return e.$descriptor}function Xi(e){z(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw Gi("expected element");var t,n=this.elementsById,i=Qi(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 Gi("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function Ki(){}function Yi(){}function Zi(){}function Ji(e,t){this.property=e,this.context=t}function er(e,t){this.element=t,this.propertyDesc=e}function tr(){}function nr(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function ir(e,t,n){nr.call(this,e,t,n)}function rr(e,t,n){this.model=e,this.context=n}function or(e){e instanceof Oi&&(e={model:e}),z(this,{lax:!1},e)}Ki.prototype.handleEnd=function(){},Ki.prototype.handleText=function(){},Ki.prototype.handleNode=function(){},Yi.prototype=Object.create(Ki.prototype),Yi.prototype.handleNode=function(){return this},Zi.prototype=Object.create(Ki.prototype),Zi.prototype.handleText=function(e){this.body=(this.body||"")+e},Ji.prototype=Object.create(Zi.prototype),Ji.prototype.handleNode=function(e){if(this.element)throw Gi("expected no sub nodes");return this.element=this.createReference(e),this},Ji.prototype.handleEnd=function(){this.element.id=this.body},Ji.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},er.prototype=Object.create(Zi.prototype),er.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=fi(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},tr.prototype=Object.create(Zi.prototype),tr.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},nr.prototype=Object.create(tr.prototype),nr.prototype.addReference=function(e){this.context.addReference(e)},nr.prototype.handleText=function(e){if(!Qi(this.element).bodyProperty)throw Gi("unexpected body text <"+e+">");Zi.prototype.handleText.call(this,e)},nr.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Qi(t).bodyProperty;n&&void 0!==e&&(e=fi(n.type,e),t.set(n.name,e))},nr.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=Qi(i),o=this.context,s=new i({}),a=this.model;return _(n,(function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?_(e.split(" "),(function(e){o.addReference({element:s,property:i.ns.name,id:e})})):o.addReference({element:s,property:i.ns.name,id:e}):(i?e=fi(i.type,e):"xmlns"!==n&&(t=yi(n,r.ns.prefix),a.getPackage(t.prefix)&&o.addWarning({message:"unknown attribute <"+n+">",element:s,property:n,value:e})),s.set(n,e))})),s},nr.prototype.getPropertyForNode=function(e){var t,n,i=yi(e.name),r=this.type,o=this.model,s=Qi(r),a=i.name,l=s.propertiesByName[a];if(l&&!l.isAttr)return Ui(l)&&(t=e.attributes[Vi])?(t=function(e,t){var n=yi(e);return function(e,t){var n=e.name,i=e.localName,r=t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(n,t.getPackage(n.prefix))}(t,o),z({},l,{effectiveType:Qi(n=o.getType(t)).name})):l;var c=o.getPackage(i.prefix);if(c){if(t=Wi(i,c),n=o.getType(t),l=b(s.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})),l)return z({},l,{effectiveType:Qi(n).name})}else if(l=b(s.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})),l)return l;throw Gi("unrecognized element <"+i.name+">")},nr.prototype.toString=function(){return"ElementDescriptor["+Qi(this.type).name+"]"},nr.prototype.valueHandler=function(e,t){return new er(e,t)},nr.prototype.referenceHandler=function(e){return new Ji(e,this.context)},nr.prototype.handler=function(e){return"Element"===e?new rr(this.model,e,this.context):new nr(this.model,e,this.context)},nr.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,gi(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?(z(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},ir.prototype=Object.create(nr.prototype),ir.prototype.createElement=function(e){var t=e.name,n=yi(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),s=o&&Wi(n,o)||t;if(!r.hasType(s))throw Gi("unexpected element <"+e.originalName+">");return nr.prototype.createElement.call(this,e)},rr.prototype=Object.create(tr.prototype),rr.prototype.createElement=function(e){var t=e.name,n=yi(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},rr.prototype.handleChild=function(e){var t=new rr(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},rr.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},or.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof nr?(i=t,t={}):"string"==typeof t?(i=this.handler(t),t={}):"string"==typeof i&&(i=this.handler(i));var r=this.model,o=this.lax,s=new Xi(z({},t,{rootHandler:i})),a=new qi({proxy:!0}),l=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function c(e,t,n){var i=t(),r=i.line,o=i.column,a=i.data;"<"===a.charAt(0)&&-1!==a.indexOf(" ")&&(a=a.slice(0,a.indexOf(" "))+">");var l="unparsable content "+(a?a+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return s.addWarning({message:l,error:e}),!0;throw Gi(l)}function p(e,t){return c(e,t,!0)}i.context=s,l.push(i);var u=/^<\?xml /i,d=/ encoding="([^"]+)"/i,h=/^utf-8$/i;function f(e,t){try{l.peek().handleText(e)}catch(e){p(e,t)}}var m=r.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),{"http://www.w3.org/XML/1998/namespace":"xml"});return a.ns(m).on("openTag",(function(e,t,n,i){var r=e.attrs||{},s=Object.keys(r).reduce((function(e,n){var i=t(r[n]);return e[n]=i,e}),{});!function(e,t){var n=l.peek();try{l.push(n.handleNode(e))}catch(e){c(e,t,o)&&l.push(new Yi)}}({name:e.name,originalName:e.originalName,attributes:s,ns:e.ns},i)})).on("question",(function(e){if(u.test(e)){var t=d.exec(e),n=t&&t[1];n&&!h.test(n)&&s.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}})).on("closeTag",(function(){l.pop().handleEnd()})).on("cdata",f).on("text",(function(e,t,n){!function(e,t){e.trim()&&f(e,t)}(t(e),n)})).on("error",c).on("warn",p),new Promise((function(t,n){var r;try{a.parse(e),function(){var e,t,n=s.elementsById,i=s.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],a=Qi(r).propertiesByName[t.property];if(o||s.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),a.isMany){var l=r.get(a.name),c=l.indexOf(t);-1===c&&(c=l.length),o?l[c]=o:l.splice(c,1)}else r.set(a.name,o)}}()}catch(e){r=e}var o=i.element;r||o||(r=Gi("failed to parse document as <"+i.type.$descriptor.name+">"));var l=s.warnings,c=s.references,p=s.elementsById;return r?(r.warnings=l,n(r)):t({rootElement:o,elementsById:p,references:c,warnings:l})}))},or.prototype.handler=function(e){return new ir(this.model,e)};var sr=/<|>|'|"|&|\n\r|\n/g,ar=/<|>|&/g;function lr(e){var t={},n={},i={},r=[],o=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?r.push(e):o.push(e),this.mapPrefix(e.prefix,e.uri)},this.uriByPrefix=function(e){return t[e||"xmlns"]},this.mapPrefix=function(e,n){t[e||"xmlns"]=n},this.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},this.logUsed=function(t){var n=t.uri,r=this.getNSKey(t);i[r]=this.byUri(n),e&&e.logUsed(t)},this.getUsed=function(e){var t=this;return[].concat(r,o).filter((function(e){var n=t.getNSKey(e);return i[n]}))}}function cr(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function pr(e){return y(e)?e:(e.prefix?e.prefix+":":"")+e.localName}var ur={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},dr={"<":"lt",">":"gt","&":"amp"};function hr(e,t,n){return(e=y(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function fr(e){this.tagName=e}function mr(){}function gr(e){this.tagName=e}function yr(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function vr(e,t){yr.call(this,e,t)}function br(){this.value="",this.write=function(e){this.value+=e}}function xr(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 wr(e){return e=z({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new br,r=new xr(i,e.format);if(e.preamble&&r.append('\n'),(new yr).build(t).serializeTo(r),!n)return i.value}}}function _r(e,t){Oi.call(this,e,t)}fr.prototype.build=function(e){return this.element=e,this},fr.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"").appendNewLine()},mr.prototype.serializeValue=mr.prototype.serializeTo=function(e){e.append(this.escape?hr(this.value,ar,dr):this.value)},mr.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(ar)&&(this.escape=!0),this},cr(gr,mr),gr.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("").appendNewLine()},yr.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,o=i.isGeneric;return t=o?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),o||(n=function(e){return w(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!v(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)}))}(e),this.parseAttributes(w(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return w(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},yr.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?z({localName:t.ns.localName},e):z({localName:(n=t.ns.localName,i=t.$pkg,zi(i)?function(e){return e.charAt(0).toLowerCase()+e.slice(1)}(n):n)},e);var n,i}(this.logNamespaceUsed(e.ns),e)},yr.prototype.nsPropertyTagName=function(e){return function(e,t){return z({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},yr.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},yr.prototype.nsAttributeName=function(e){var t;if(t=y(e)?yi(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}:z({localName:t.localName},n)},yr.prototype.parseGeneric=function(e){var t=this,n=this.body,i=[];return _(e,(function(r,o){"$body"===o?n.push((new mr).build({type:"String"},r)):"$children"===o?_(r,(function(e){n.push(new yr(t).build(e))})):0!==o.indexOf("$")&&t.parseNsAttribute(e,o,r)&&i.push({name:o,value:r})})),i},yr.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=yi(t);if("xmlns"===o.prefix&&(i={prefix:o.localName,uri:n}),o.prefix||"xmlns"!==o.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var s=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(s)}},yr.prototype.parseNsAttributes=function(e,t){var n=this,i=e.$attrs,r=[];return _(i,(function(t,i){var o=n.parseNsAttribute(e,i,t);o&&r.push(o)})),r},yr.prototype.parseGenericAttributes=function(e,t){var n=this;_(t,(function(t){if(t.name!==Vi)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,n)}}))},yr.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;_(e,(function(e){var r=i.get(e.name),o=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new mr).build(e,r[0]));else if(gi(e.type))_(r,(function(i){n.push(new gr(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(o)_(r,(function(i){n.push(new fr(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var s=Ui(e),a=function(e){return"property"===Hi(e)}(e);_(r,(function(i){var r;r=s?new vr(t,e):a?new yr(t,e):new yr(t),n.push(r.build(i))}))}}))},yr.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new lr(t):n=t),n},yr.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},yr.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.element.$model,s=this.getNamespaces(t),a=e.prefix,l=e.uri;if(!a&&!l)return{localName:e.localName};if(r=Fi[a]||o&&(o.getPackage(a)||{}).uri,!(l=l||r||s.uriByPrefix(a)))throw new Error("no namespace uri given for prefix <"+a+">");if(!(e=s.byUri(l))){for(n=a,i=1;s.uriByPrefix(n);)n=a+"_"+i++;e=this.logNamespace({prefix:n,uri:l},r===l)}return a&&s.mapPrefix(a,l),e},yr.prototype.parseAttributes=function(e){var t=this,n=this.element;_(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];_(i,(function(e){r.push(e.id)})),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},yr.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),pr(e)},yr.prototype.addAttribute=function(e,t){var n=this.attrs;y(t)&&(t=hr(t,sr,ur));var i=x(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)},yr.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)),_(t,(function(t){e.append(" ").append(pr(t.name)).append('="').append(t.value).append('"')}))},yr.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==mr;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),_(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("")),e.appendNewLine()},cr(vr,yr),vr.prototype.parseNsAttributes=function(e){var t=yr.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),o=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(Vi),(i.prefix?i.prefix+":":"")+o+n.ns.localName),t},vr.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},_r.prototype=Object.create(Oi.prototype),_r.prototype.fromXML=function(e,t,n){y(t)||(n=t,t="bpmn:Definitions");var i=new or(z({model:this,lax:!0},n)),r=i.handler(t);return i.fromXML(e,r)},_r.prototype.toXML=function(e,t){var n=new wr(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(e){return i(e)}}))};var Er={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 Or(e,t){return new _r(z({},Er,e),t)}function Pr(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':""}function kr(e){v(e,"di")||Object.defineProperty(e,"di",{enumerable:!1,get:function(){throw new Error("Tried to access di from the businessObject. The di is available through the diagram element only. For more information, see https://github.com/bpmn-io/bpmn-js/issues/1472")}})}function Sr(e,t){return e.$instanceOf(t)}function Cr(e,t){var n={},i=[],r={};function o(e,t){return function(n){e(n,t)}}function s(e){n[e.id]=e}function a(n,i){try{var o=r[n.id]&&function(n,i){if(n.gfx)throw new Error(t("already rendered {element}",{element:Pr(n)}));return e.element(n,r[n.id],i)}(n,i);return s(n),o}catch(e){l(e.message,{element:n,error:e}),console.error(t("failed to import {element}",{element:Pr(n)})),console.error(e)}}function l(t,n){e.error(t,n)}var c=this.registerDi=function(e){var n=e.bpmnElement;n?r[n.id]?l(t("multiple DI elements defined for {element}",{element:Pr(n)}),{element:n}):(r[n.id]=e,kr(n)):l(t("no bpmnElement referenced in {element}",{element:Pr(e)}),{element:e})};function p(e){var t;t=e.plane,c(t),_(t.planeElement,u)}function u(e){c(e)}this.handleDefinitions=function(s,a){var u=s.diagrams;if(a&&-1===u.indexOf(a))throw new Error(t("diagram not part of bpmn:Definitions"));if(!a&&u&&u.length&&(a=u[0]),!a)throw new Error(t("no diagram to display"));r={},p(a);var m=a.plane;if(!m)throw new Error(t("no plane for {element}",{element:Pr(a)}));var g=m.bpmnElement;if(!g){if(g=function(e){return b(e.rootElements,(function(e){return Sr(e,"bpmn:Process")||Sr(e,"bpmn:Collaboration")}))}(s),!g)throw new Error(t("no process or collaboration to display"));l(t("correcting missing bpmnElement on {plane} to {rootElement}",{plane:Pr(m),rootElement:Pr(g)})),m.bpmnElement=g,c(m)}var y,v,E=function(t,n){return e.root(t,r[t.id],n)}(g,m);if(Sr(g,"bpmn:Process")||Sr(g,"bpmn:SubProcess"))h(g,E);else{if(!Sr(g,"bpmn:Collaboration"))throw new Error(t("unsupported bpmnElement for {plane}: {rootElement}",{plane:Pr(m),rootElement:Pr(g)}));v=E,_((y=g).participants,o(A,v)),x(y.artifacts,v),i.push((function(){!function(e,t){_(e,o(f,t))}(y.messageFlows,v)})),function(e,t){w(e,(function(e){return!n[e.id]&&Sr(e,"bpmn:Process")&&e.laneSets})).forEach(o(h,t))}(s.rootElements,E)}d(i)};var d=this.handleDeferred=function(){for(;i.length;)i.shift()()};function h(e,t){T(e,t),E(e.ioSpecification,t),x(e.artifacts,t),s(e)}function f(e,t){a(e,t)}function m(e,t){a(e,t)}function g(e,t){a(e,t)}function y(e,t){a(e,t)}function v(e,t){a(e,t)}function x(e,t){_(e,(function(e){Sr(e,"bpmn:Association")?i.push((function(){v(e,t)})):v(e,t)}))}function E(e,t){e&&(_(e.dataInputs,o(g,t)),_(e.dataOutputs,o(y,t)))}var O=this.handleSubProcess=function(e,t){T(e,t),x(e.artifacts,t)};function P(e,t){var n=a(e,t);Sr(e,"bpmn:SubProcess")&&O(e,n||t),Sr(e,"bpmn:Activity")&&E(e.ioSpecification,t),i.push((function(){_(e.dataInputAssociations,o(m,t)),_(e.dataOutputAssociations,o(m,t))}))}function k(e,t){a(e,t)}function S(e,t){i.push((function(){var n=a(e,t);e.childLaneSet&&C(e.childLaneSet,n||t),function(e){_(e.flowNodeRef,(function(t){var n=t.get("lanes");n&&n.push(e)}))}(e)}))}function C(e,t){_(e.lanes,o(S,t))}function T(e,n){!function(e,n){_(e,(function(e){Sr(e,"bpmn:SequenceFlow")?i.push((function(){!function(e,t){a(e,t)}(e,n)})):Sr(e,"bpmn:BoundaryEvent")?i.unshift((function(){P(e,n)})):Sr(e,"bpmn:FlowNode")?P(e,n):Sr(e,"bpmn:DataObject")||(Sr(e,"bpmn:DataStoreReference")||Sr(e,"bpmn:DataObjectReference")?k(e,n):l(t("unrecognized flowElement {element} in context {context}",{element:Pr(e),context:n?Pr(n.businessObject):"null"}),{element:e,context:n}))}))}(e.flowElements,n),e.laneSets&&function(e,t){_(e,o(C,t))}(e.laneSets,n)}function A(e,t){var n=a(e,t),i=e.processRef;i&&h(i,n||t)}}function Tr(e,t){var n=Mr(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function Ar(e,t){return k(t,(function(t){return Tr(e,t)}))}function Mr(e){return e&&e.businessObject||e}function Dr(e){return e&&e.di}function Rr(e,t,n){var i,r,o,s,a=[];function l(e,t){var n=new Cr({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})}},o);t=t||e.diagrams&&e.diagrams[0];var r=function(e,t){if(!t)return;var n,i=t.plane.bpmnElement,r=i;Tr(i,"bpmn:Process")||Tr(i,"bpmn:Collaboration")||(r=function(e){var t=e;for(;t;){if(Tr(t,"bpmn:Process"))return t;t=t.$parent}}(i));n=Tr(r,"bpmn:Collaboration")?r:b(e.rootElements,(function(e){if(Tr(e,"bpmn:Collaboration"))return b(e.participants,(function(e){return e.processRef===r}))}));var o=[r];n&&(o=S(n.participants,(function(e){return e.processRef}))).push(n);var s=Nr(o),a=[t],l=[i];return _(e.diagrams,(function(e){var t=e.plane.bpmnElement;-1!==s.indexOf(t)&&-1===l.indexOf(t)&&(a.push(e),l.push(t))})),a}(e,t);if(!r)throw new Error(o("no diagram to display"));_(r,(function(t){n.handleDefinitions(e,t)}));var l=t.plane.bpmnElement.id;s.setRootElement(s.findRoot(l+"_plane")||s.findRoot(l))}return new Promise((function(c,p){try{return i=e.get("bpmnImporter"),r=e.get("eventBus"),o=e.get("translate"),s=e.get("canvas"),r.fire("import.render.start",{definitions:t}),l(t,n),r.fire("import.render.complete",{error:undefined,warnings:a}),c({warnings:a})}catch(e){return e.warnings=a,p(e)}}))}function Nr(e){var t=[];return _(e,(function(e){e&&(t.push(e),t=t.concat(Nr(e.flowElements)))})),t}var $r,jr='',Ir={verticalAlign:"middle"},Lr={color:"#404040"},Br={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},qr={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},zr={position:"absolute",left:"50%",top:"40%",transform:"translate(-50%)",width:"260px",padding:"10px",background:"white",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"14px",display:"flex",lineHeight:"1.3"},Fr='
'+jr+'Web-based tooling for BPMN, DMN and forms powered by bpmn.io.
';function Vr(){$r||(Z($r=be(Fr),Br),Z(we("svg",$r),Ir),Z(we(".backdrop",$r),qr),Z(we(".notice",$r),zr),Z(we(".link",$r),Lr,{margin:"15px 20px 15px 10px",alignSelf:"center"}),me.bind($r,".backdrop","click",(function(e){document.body.removeChild($r)}))),document.body.appendChild($r)}function Hr(e){e=z({},Wr,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),function(e){const t=be(''+jr+"");Z(we("svg",t),Ir),Z(t,Lr,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(t),de.bind(t,"click",(function(e){Vr(),e.preventDefault()}))}(this._container),this._init(this._container,this._moddle,e)}function Ur(e,t){return e.warnings=t,e}i(Hr,ci),Hr.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 s=o.rootElement;const a=o.references,l=o.warnings,c=o.elementsById;i=i.concat(l),s=this._emit("import.parse.complete",(r={error:null,definitions:s,elementsById:c,references:a,warnings:i},n.get("eventBus").createEvent(r)))||s;const p=await this.importDefinitions(s,t);return i=i.concat(p.warnings),this._emit("import.done",{error:null,warnings:i}),{warnings:i}}catch(e){let t=e;throw i=i.concat(t.warnings||[]),Ur(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},Hr.prototype.importDefinitions=async function(e,t){this._setDefinitions(e);return{warnings:(await this.open(t)).warnings}},Hr.prototype.open=async function(e){const t=this._definitions;let n=e;if(!t){const e=new Error("no XML imported");throw Ur(e,[]),e}if("string"==typeof e&&(n=function(e,t){if(!t)return null;return b(e.diagrams,(function(e){return e.id===t}))||null}(t,e),!n)){const t=new Error("BPMNDiagram <"+e+"> not found");throw Ur(t,[]),t}try{this.clear()}catch(e){throw Ur(e,[]),e}const{warnings:i}=await Rr(this,t,n);return{warnings:i}},Hr.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},Hr.prototype.saveSVG=async function(){let e,t;this._emit("saveSVG.start");try{const t=this.get("canvas"),n=t.getActiveLayer(),i=we("defs",t._svg),r=Xe(n),o=i?""+Xe(i)+"":"",s=n.getBBox();e='\n\x3c!-- created with bpmn-js / http://bpmn.io --\x3e\n\n'+o+r+""}catch(e){t=e}if(this._emit("saveSVG.done",{error:t,svg:e}),t)throw t;return{svg:e}},Hr.prototype._setDefinitions=function(e){this._definitions=e},Hr.prototype.getModules=function(){return this._modules},Hr.prototype.clear=function(){this.getDefinitions()&&ci.prototype.clear.call(this)},Hr.prototype.destroy=function(){ci.prototype.destroy.call(this),Ee(this._container)},Hr.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},Hr.prototype.off=function(e,t){this.get("eventBus").off(e,t)},Hr.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=we(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},Hr.prototype.getDefinitions=function(){return this._definitions},Hr.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},Hr.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),s=z(H(n,["additionalModules"]),{canvas:z({},n.canvas,{container:e}),modules:o});ci.call(this,s),n&&n.container&&this.attachTo(n.container)},Hr.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},Hr.prototype._createContainer=function(e){const t=be('
');return Z(t,{width:Gr(e.width),height:Gr(e.height),position:e.position}),t},Hr.prototype._createModdle=function(e){return new Or(z({},this._moddleExtensions,e.moddleExtensions))},Hr.prototype._modules=[];const Wr={width:"100%",height:"100%",position:"relative"};function Gr(e){return e+(m(e)?"px":"")}function Qr(e){Hr.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 Xr(e,t){return!Tr(e,"bpmn:CallActivity")&&(Tr(e,"bpmn:SubProcess")?!(!(t=t||Dr(e))||!Tr(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded:!Tr(e,"bpmn:Participant")||!!Mr(e).processRef)}function Kr(e){if(Tr(e,"bpmn:Participant")||Tr(e,"bpmn:Lane")){var t=Dr(e).isHorizontal;return void 0===t||t}}function Yr(e){return e&&!!Mr(e).triggeredByEvent}function Zr(e,t){return k(Mr(e).eventDefinitions,(function(e){return Tr(e,t)}))}i(Qr,Hr),Qr.prototype._createModdle=function(e){var t=Hr.prototype._createModdle.call(this,e);return t.ids=new s([32,36,1]),t},Qr.prototype._collectIds=function(e,t){var n,i=e.$model.ids;for(n in i.clear(),t)i.claim(n,t[n])};var Jr={width:90,height:20};function eo(e){return Tr(e,"bpmn:Event")||Tr(e,"bpmn:Gateway")||Tr(e,"bpmn:DataStoreReference")||Tr(e,"bpmn:DataObjectReference")||Tr(e,"bpmn:DataInput")||Tr(e,"bpmn:DataOutput")||Tr(e,"bpmn:SequenceFlow")||Tr(e,"bpmn:MessageFlow")||Tr(e,"bpmn:Group")}function to(e){return vn(e.label)}function no(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)),s=r.x,a=r.y;return Math.abs(o)1?r.get("parallelMultiple")?I(t,e,n,o):j(t,e,n,o):ao(r,"bpmn:MessageEventDefinition")?S(t,e,n,o):ao(r,"bpmn:TimerEventDefinition")?C(t,e,n,o):ao(r,"bpmn:ConditionalEventDefinition")?A(t,e,n,o):ao(r,"bpmn:SignalEventDefinition")?$(t,e,n,o):ao(r,"bpmn:EscalationEventDefinition")?T(t,e,n,o):ao(r,"bpmn:LinkEventDefinition")?M(t,e,n,o):ao(r,"bpmn:ErrorEventDefinition")?D(t,e,n,o):ao(r,"bpmn:CancelEventDefinition")?R(t,e,n,o):ao(r,"bpmn:CompensateEventDefinition")?N(t,e,n,o):ao(r,"bpmn:TerminateEventDefinition")?L(t,e,n,o):null}var q={ParticipantMultiplicityMarker:function(e,t,n={}){var r=ho(t,n),o=fo(t,n);O("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:lo(t,a,n.fill),stroke:co(t,l,n.stroke)})},SubProcessMarker:function(e,t,n={}){ii(b(e,14,14,0,{strokeWidth:1,fill:lo(t,a,n.fill),stroke:co(t,l,n.stroke)}),t.width/2-7.5,t.height-20),O("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:lo(t,a,n.fill),stroke:co(t,l,n.stroke)})},ParallelMarker:function(e,t,n){var r=ho(t,n),o=fo(t,n);O("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:lo(t,a,n.fill),stroke:co(t,l,n.stroke)})},SequentialMarker:function(e,t,n){O("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:lo(t,a,n.fill),stroke:co(t,l,n.stroke)})},CompensationMarker:function(e,t,n){O("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:lo(t,a,n.fill),stroke:co(t,l,n.stroke)})},LoopMarker:function(e,t,n){var r=ho(t,n),o=fo(t,n);O("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:co(t,l,n.stroke),strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){var r=ho(t,n),o=fo(t,n);O("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:co(t,l,n.stroke),stroke:co(t,l,n.stroke)})}};function F(e,t,n,i){q[e](t,n,i)}function V(e,t,n,i={}){i={fill:i.fill,stroke:i.stroke,width:ho(t,i),height:fo(t,i)};var r=Mr(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},_(n,(function(n){F(n,e,t,i)})),r.get("isForCompensation")&&F("CompensationMarker",e,t,i),Tr(r,"bpmn:AdHocSubProcess")&&F("AdhocMarker",e,t,i);var s=r.get("loopCharacteristics"),a=s&&s.get("isSequential");s&&(void 0===a&&F("LoopMarker",e,t,i),!1===a&&F("ParallelMarker",e,t,i),!0===a&&F("SequentialMarker",e,t,i))}function H(e,t,n={}){n=z({size:{width:100}},n);var i=o.createText(t||"",n);return Me(i).add("djs-label"),ke(e,i),i}function U(e,t,n,i={}){var r=Mr(t),o=uo({x:t.x,y:t.y,width:t.width,height:t.height},i);return H(e,r.name,{align:n,box:o,padding:7,style:{fill:po(t,c,l,i.stroke)}})}function W(e,t,n,i={}){var r=Kr(n),o=H(e,t,{box:{height:30,width:r?fo(n,i):ho(n,i)},align:"center-middle",style:{fill:po(n,c,l,i.stroke)}});r&&ni(o,0,-(-1*fo(n,i)),270)}function G(e,t,n={}){var{width:i,height:r}=uo(t,n);return b(e,i,r,10,{...n,fill:lo(t,a,n.fill),fillOpacity:go,stroke:co(t,l,n.stroke)})}function Q(e,t,n={}){var i=Mr(t),r=lo(t,a,n.fill),o=co(t,l,n.stroke);return"One"!==i.get("associationDirection")&&"Both"!==i.get("associationDirection")||(n.markerEnd=y("association-end",r,o)),"Both"===i.get("associationDirection")&&(n.markerStart=y("association-start",r,o)),n=vo(n,["markerStart","markerEnd"]),w(e,t.waypoints,{...n,stroke:o,strokeDasharray:"0, 5"})}function X(e,t,n={}){var r=lo(t,a,n.fill),o=co(t,l,n.stroke),s=E(e,i.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:r,fillOpacity:go,stroke:o});(function(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection})(Mr(t))&&E(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 s}function K(e,t,n={}){return v(e,t.width,t.height,{fillOpacity:go,...n,fill:lo(t,a,n.fill),stroke:co(t,l,n.stroke)})}function Y(e,t,n={}){return function(e,t,n,i){var r=t/2,o=n/2,s=[{x:r,y:0},{x:t,y:o},{x:r,y:n},{x:0,y:o}].map((function(e){return e.x+","+e.y})).join(" ");i=d(i);var a=Le("polygon",{...i,points:s});return ke(e,a),a}(e,t.width,t.height,{fill:lo(t,a,n.fill),fillOpacity:go,stroke:co(t,l,n.stroke)})}function Z(e,t,n={}){var i=b(e,ho(t,n),fo(t,n),0,{fill:lo(t,a,n.fill),fillOpacity:n.fillOpacity||go,stroke:co(t,l,n.stroke),strokeWidth:1.5}),r=Mr(t);Tr(r,"bpmn:Lane")&&W(e,r.get("name"),t,n);return i}function J(e,t,n={}){var i=G(e,t,n);Yr(t)&&Te(i,{strokeDasharray:"0, 5.5",strokeWidth:2.5});var r=Xr(t);return U(e,t,r?"center-top":"center-middle",n),V(e,t,r?void 0:["SubProcessMarker"],n),i}function ee(e,t,n={}){var i=G(e,t,n);return U(e,t,"center-middle",n),V(e,t,void 0,n),i}var te=this.handlers={"bpmn:AdHocSubProcess":function(e,t,n={}){return J(e,t,n=Xr(t)?vo(n,["fill","stroke","width","height"]):vo(n,["fill","stroke"]))},"bpmn:Association":function(e,t,n={}){return Q(e,t,n=vo(n,["fill","stroke"]))},"bpmn:BoundaryEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=vo(n,["fill","stroke"]);var r=Mr(t).get("cancelActivity");n={strokeWidth:1.5,fill:lo(t,a,n.fill),fillOpacity:1,stroke:co(t,l,n.stroke)},r||(n.strokeDasharray="6");var o=K(e,t,n);return v(e,t.width,t.height,3,{...n,fill:"none"}),i&&B(t,e,n),o},"bpmn:BusinessRuleTask":function(e,t,n={}){var r=ee(e,t,n=vo(n,["fill","stroke"]));return Te(E(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}})),{fill:lo(t,a,n.fill),stroke:co(t,l,n.stroke),strokeWidth:1}),Te(E(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}})),{fill:co(t,l,n.stroke),stroke:co(t,l,n.stroke),strokeWidth:1}),r},"bpmn:CallActivity":function(e,t,n={}){return n=vo(n,["fill","stroke"]),J(e,t,{strokeWidth:5,...n})},"bpmn:ComplexGateway":function(e,t,n={}){var r=Y(e,t,n=vo(n,["fill","stroke"]));return E(e,i.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{fill:co(t,l,n.stroke),stroke:co(t,l,n.stroke),strokeWidth:1}),r},"bpmn:DataInput":function(e,t,n={}){n=vo(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=X(e,t,n);return E(e,r,{fill:"none",stroke:co(t,l,n.stroke),strokeWidth:1}),o},"bpmn:DataInputAssociation":function(e,t,n={}){return n=vo(n,["fill","stroke"]),Q(e,t,{...n,markerEnd:y("association-end",lo(t,a,n.fill),co(t,l,n.stroke))})},"bpmn:DataObject":function(e,t,n={}){return X(e,t,n=vo(n,["fill","stroke"]))},"bpmn:DataObjectReference":k("bpmn:DataObject"),"bpmn:DataOutput":function(e,t,n={}){n=vo(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=X(e,t,n);return E(e,r,{strokeWidth:1,fill:lo(t,a,n.fill),stroke:co(t,l,n.stroke)}),o},"bpmn:DataOutputAssociation":function(e,t,n={}){return n=vo(n,["fill","stroke"]),Q(e,t,{...n,markerEnd:y("association-end",lo(t,a,n.fill),co(t,l,n.stroke))})},"bpmn:DataStoreReference":function(e,t,n={}){return n=vo(n,["fill","stroke"]),E(e,i.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{fill:lo(t,a,n.fill),fillOpacity:go,stroke:co(t,l,n.stroke),strokeWidth:2})},"bpmn:EndEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=vo(n,["fill","stroke"]);var r=K(e,t,{...n,strokeWidth:4});return i&&B(t,e,n),r},"bpmn:EventBasedGateway":function(e,t,n={}){n=vo(n,["fill","stroke"]);var r=Mr(t),o=Y(e,t,n);v(e,t.width,t.height,.2*t.height,{fill:lo(t,"none",n.fill),stroke:co(t,l,n.stroke),strokeWidth:1});var s=r.get("eventGatewayType"),a=!!r.get("instantiate");if("Parallel"===s){var c=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}});E(e,c,{fill:"none",stroke:co(t,l,n.stroke),strokeWidth:1})}else"Exclusive"===s&&(a||v(e,t.width,t.height,.26*t.height,{fill:"none",stroke:co(t,l,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(e,r,{fill:"none",stroke:co(t,l,n.stroke),strokeWidth:2})}());return o},"bpmn:ExclusiveGateway":function(e,t,n={}){var r=Y(e,t,n=vo(n,["fill","stroke"])),o=i.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return Dr(t).get("isMarkerVisible")&&E(e,o,{fill:co(t,l,n.stroke),stroke:co(t,l,n.stroke),strokeWidth:1}),r},"bpmn:Gateway":function(e,t,n={}){return Y(e,t,n=vo(n,["fill","stroke"]))},"bpmn:Group":function(e,t,n={}){return n=vo(n,["fill","stroke","width","height"]),b(e,t.width,t.height,10,{stroke:co(t,l,n.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:ho(t,n),height:fo(t,n)})},"bpmn:InclusiveGateway":function(e,t,n={}){var i=Y(e,t,n=vo(n,["fill","stroke"]));return v(e,t.width,t.height,.24*t.height,{fill:lo(t,a,n.fill),stroke:co(t,l,n.stroke),strokeWidth:2.5}),i},"bpmn:IntermediateEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=vo(n,["fill","stroke"]);var r=K(e,t,{...n,strokeWidth:1.5});return v(e,t.width,t.height,3,{fill:"none",stroke:co(t,l,n.stroke),strokeWidth:1.5}),i&&B(t,e,n),r},"bpmn:IntermediateCatchEvent":k("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":k("bpmn:IntermediateEvent"),"bpmn:Lane":function(e,t,n={}){return n=vo(n,["fill","stroke","width","height"]),Z(e,t,{...n,fillOpacity:.25})},"bpmn:ManualTask":function(e,t,n={}){var r=ee(e,t,n=vo(n,["fill","stroke"]));return E(e,i.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{fill:lo(t,a,n.fill),stroke:co(t,l,n.stroke),strokeWidth:.5}),r},"bpmn:MessageFlow":function(e,t,n={}){n=vo(n,["fill","stroke"]);var r=Mr(t),o=Dr(t),s=lo(t,a,n.fill),c=co(t,l,n.stroke),p=w(e,t.waypoints,{markerEnd:y("messageflow-end",s,c),markerStart:y("messageflow-start",s,c),stroke:c,strokeDasharray:"10, 11",strokeWidth:1.5});if(r.get("messageRef")){var u=p.getPointAtLength(p.getTotalLength()/2),d=i.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:u.x,y:u.y}}),h={strokeWidth:1};"initiating"===o.get("messageVisibleKind")?(h.fill=s,h.stroke=c):(h.fill=c,h.stroke=s);var f=E(e,d,h),m=H(e,r.get("messageRef").get("name"),{align:"center-top",fitBox:!0,style:{fill:c}}),g=f.getBBox(),v=m.getBBox();ni(m,u.x-v.width/2,u.y+g.height/2+10,0)}return p},"bpmn:ParallelGateway":function(e,t,n={}){var r=Y(e,t,n=vo(n,["fill","stroke"]));return E(e,i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{fill:co(t,l,n.stroke),stroke:co(t,l,n.stroke),strokeWidth:1}),r},"bpmn:Participant":function(e,t,n={}){var i=Z(e,t,n=vo(n,["fill","stroke","width","height"])),r=Xr(t),o=Kr(t),s=Mr(t),a=s.get("name");if(r){x(e,o?[{x:30,y:0},{x:30,y:fo(t,n)}]:[{x:0,y:30},{x:ho(t,n),y:30}],{stroke:co(t,l,n.stroke),strokeWidth:1.5}),W(e,a,t,n)}else{var p=uo(t,n);o||(p.height=ho(t,n),p.width=fo(t,n));var u=H(e,a,{box:p,align:"center-middle",style:{fill:po(t,c,l,n.stroke)}});if(!o)ni(u,0,-(-1*fo(t,n)),270)}return s.get("participantMultiplicity")&&F("ParticipantMultiplicityMarker",e,t,n),i},"bpmn:ReceiveTask":function(e,t,n={}){n=vo(n,["fill","stroke"]);var r,o=Mr(t),s=ee(e,t,n);return o.get("instantiate")?(v(e,28,28,4.4,{fill:lo(t,a,n.fill),stroke:co(t,l,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(e,r,{fill:lo(t,a,n.fill),stroke:co(t,l,n.stroke),strokeWidth:1}),s},"bpmn:ScriptTask":function(e,t,n={}){var r=ee(e,t,n=vo(n,["fill","stroke"]));return E(e,i.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{fill:lo(t,a,n.fill),stroke:co(t,l,n.stroke),strokeWidth:1}),r},"bpmn:SendTask":function(e,t,n={}){var r=ee(e,t,n=vo(n,["fill","stroke"]));return E(e,i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{fill:co(t,l,n.stroke),stroke:lo(t,a,n.fill),strokeWidth:1}),r},"bpmn:SequenceFlow":function(e,t,n={}){n=vo(n,["fill","stroke"]);var i=lo(t,a,n.fill),r=co(t,l,n.stroke),o=w(e,t.waypoints,{markerEnd:y("sequenceflow-end",i,r),stroke:r}),s=Mr(t),{source:c}=t;if(c){var p=Mr(c);s.get("conditionExpression")&&Tr(p,"bpmn:Activity")&&Te(o,{markerStart:y("conditional-flow-marker",i,r)}),p.get("default")&&(Tr(p,"bpmn:Gateway")||Tr(p,"bpmn:Activity"))&&p.get("default")===s&&Te(o,{markerStart:y("conditional-default-flow-marker",i,r)})}return o},"bpmn:ServiceTask":function(e,t,n={}){var r=ee(e,t,n=vo(n,["fill","stroke"]));return v(e,10,10,{fill:lo(t,a,n.fill),stroke:"none",transform:"translate(6, 6)"}),E(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{fill:lo(t,a,n.fill),stroke:co(t,l,n.stroke),strokeWidth:1}),v(e,10,10,{fill:lo(t,a,n.fill),stroke:"none",transform:"translate(11, 10)"}),E(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{fill:lo(t,a,n.fill),stroke:co(t,l,n.stroke),strokeWidth:1}),r},"bpmn:StartEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=vo(n,["fill","stroke"]),Mr(t).get("isInterrupting")||(n={...n,strokeDasharray:"6"});var r=K(e,t,n);return i&&B(t,e,n),r},"bpmn:SubProcess":function(e,t,n={}){return J(e,t,n=Xr(t)?vo(n,["fill","stroke","width","height"]):vo(n,["fill","stroke"]))},"bpmn:Task":function(e,t,n={}){return ee(e,t,n=vo(n,["fill","stroke"]))},"bpmn:TextAnnotation":function(e,t,n={}){n=vo(n,["fill","stroke","width","height"]);var{width:r,height:o}=uo(t,n),s=b(e,r,o,0,0,{fill:"none",stroke:"none"});return E(e,i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:0,my:0}}),{stroke:co(t,l,n.stroke)}),H(e,Mr(t).get("text")||"",{align:"left-top",box:uo(t,n),padding:7,style:{fill:po(t,c,l,n.stroke)}}),s},"bpmn:Transaction":function(e,t,i={}){i=Xr(t)?vo(i,["fill","stroke","width","height"]):vo(i,["fill","stroke"]);var r=J(e,t,{strokeWidth:1.5,...i}),o=n.style(["no-fill","no-events"],{stroke:co(t,l,i.stroke),strokeWidth:1.5});return Xr(t)||(i={}),b(e,ho(t,i),fo(t,i),7,3,o),r},"bpmn:UserTask":function(e,t,n={}){var r=ee(e,t,n=vo(n,["fill","stroke"]));return E(e,i.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{fill:lo(t,a,n.fill),stroke:co(t,l,n.stroke),strokeWidth:.5}),E(e,i.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{fill:lo(t,a,n.fill),stroke:co(t,l,n.stroke),strokeWidth:.5}),E(e,i.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{fill:co(t,l,n.stroke),stroke:co(t,l,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 H(e,oo(t),{box:i,fitBox:!0,style:z({},o.getExternalStyle(),{fill:po(t,c,l,n.stroke)})})}(e,t,n)}};this._drawPath=E,this._renderer=P}function vo(e,t=[]){return t.reduce(((t,n)=>(e[n]&&(t[n]=e[n]),t)),{})}i(yo,ct),yo.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],yo.prototype.canRender=function(e){return Tr(e,"bpmn:BaseElement")},yo.prototype.drawShape=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},yo.prototype.drawConnection=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},yo.prototype.getShapePath=function(e){return Tr(e,"bpmn:Event")?(n=(t=e).x+t.width/2,i=t.y+t.height/2,r=t.width/2,pt([["M",n,i],["m",0,-r],["a",r,r,0,1,1,0,2*r],["a",r,r,0,1,1,0,-2*r],["z"]])):Tr(e,"bpmn:Activity")?function(e,t){var n=e.x,i=e.y,r=e.width,o=e.height;return pt([["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):Tr(e,"bpmn:Gateway")?function(e){var t=e.width/2,n=e.height/2;return pt([["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 pt([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])}(e);var t,n,i,r};var bo={width:150,height:50};function xo(e,t){var n;t.textContent=e;try{var i,r=""===e;return t.textContent=r?"dummy":e,i={width:(n=t.getBBox()).width+2*n.x,height:n.height},r&&(i.width=0),i}catch(e){return{width:0,height:0}}}function wo(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=xo(o,n)).width=o?i.width:0," "===o||""===o||i.width1)for(;n=i.shift();){if(!(n.length+oe?t.width:e}),0),m=o.top;"middle"===r.vertical&&(m+=(n.height-d)/2),m-=(a||c[0].height)/4;var g=Le("text");return Te(g,i),_(c,(function(e){var t;switch(m+=a||e.height,r.horizontal){case"left":t=o.left;break;case"right":t=(s?h:p)-o.right-e.width;break;default:t=Math.max(((s?h:p)-e.width)/2+o.left,0)}var n=Le("tspan");Te(n,{x:t,y:m}),n.textContent=e.text,ke(g,n)})),Ke(u),{dimensions:{width:h,height:d},element:g}};function ko(e){var t=z({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=z({},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},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}}ko.$inject=["config.textRenderer"];var So=/\{([^{}]+)\}/g,Co=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;const To={__init__:["bpmnRenderer"],bpmnRenderer:["type",yo],textRenderer:["type",ko],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,s,a={};if(t.position){for(var l=t.containerHeight/r.height*t.yScaleFactor,c=t.containerWidth/r.width*t.xScaleFactor,p=0;p=e.x&&n<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}(n,On(p))||(n=this._canvas.findRoot(n))),this._canvas.addShape(i,n,o)}else{if(!Tr(t,"bpmndi:BPMNEdge"))throw new Error(s("unknown di {di} for element {semantic}",{di:Pr(t),semantic:Pr(e)}));var u=this._getSource(e),d=this._getTarget(e);r=n&&(n.hidden||n.collapsed),i=this._elementFactory.createConnection(Mo(e,t,{hidden:r,source:u,target:d,waypoints:Do(t,u,d)})),Tr(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(i,n,o)}return eo(e)&&oo(i)&&this.addLabel(e,t,i),this._eventBus.fire("bpmnElement.added",{element:i}),i},No.prototype._attachBoundary=function(e,t){var n=this._translate,i=e.attachedToRef;if(!i)throw new Error(n("missing {semantic}#attachedToRef",{semantic:Pr(e)}));var r=this._elementRegistry.get(i.id),o=r&&r.attachers;if(!r)throw Ro(n,e,i,"attachedToRef");t.host=r,o||(r.attachers=o=[]),-1===o.indexOf(t)&&o.push(t)},No.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(Jr.width,r.width),height:r.height},n={x:r.x+r.width/2,y:r.y+r.height/2}):(n=io(t),i=Jr),z({x:n.x-i.width/2,y:n.y-i.height/2},i)}(t,n),(r=oo(n))&&(i=this._textRenderer.getExternalLabelBounds(i,r)),o=this._elementFactory.createLabel(Mo(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!oo(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)},No.prototype._getConnectedElement=function(e,t){var n,i,r=e.$type,o=this._translate;if(i=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===r&&(i=i&&i[0]),("source"===t&&"bpmn:DataOutputAssociation"===r||"target"===t&&"bpmn:DataInputAssociation"===r)&&(i=e.$parent),n=i&&this._getElement(i))return n;throw i?Ro(o,e,i,t+"Ref"):new Error(o("{semantic}#{side} Ref not specified",{semantic:Pr(e),side:t}))},No.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},No.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},No.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};const $o={__depends__:[To,{__depends__:[Ao],bpmnImporter:["type",No]}]};function jo(e){e&&"function"==typeof e.stopPropagation&&e.stopPropagation()}function Io(e){return e.originalEvent||e.srcEvent}function Lo(e){jo(e),jo(Io(e))}function Bo(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 qo(){return/mac/i.test(navigator.platform)}function zo(e,t){return(Io(e)||e).button===t}function Fo(e){return zo(e,0)}function Vo(e){var t=Io(e)||e;return!!Fo(e)&&(qo()?t.metaKey:t.ctrlKey)}function Ho(e){var t=Io(e)||e;return Fo(e)&&t.shiftKey}function Uo(e){return!0}function Wo(e){return Fo(e)||function(e){return zo(e,1)}(e)}function Go(e,t,n){var i=this;function r(n,i,r){var o,s;(function(e,t){var n=l[e]||Fo;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":Uo,"element.mousedown":Wo,"element.mouseup":Wo,"element.click":Wo,"element.dblclick":Wo};function c(e,t,n,i){var s=o[n]=function(e){r(n,e)};i&&(l[n]=i),s.$delegate=me.bind(e,"svg, .djs-element",t,s)}function p(e,t,n){var i=s(n);i&&me.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){!function(e){_(a,(function(t,n){p(e,n,t)}))}(e.svg)})),e.on("canvas.init",(function(e){!function(e){_(a,(function(t,n){c(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 u=f("djs-hit djs-hit-stroke"),d=f("djs-hit djs-hit-click-stroke"),h={all:f("djs-hit djs-hit-all"),"click-stroke":d,stroke:u,"no-move":f("djs-hit djs-hit-no-move")};function f(e,t){return t=z({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function m(e,t){var n=h[t];if(!n)throw new Error("invalid hit type <"+t+">");return Te(e,n),e}function g(e,t){ke(e,t)}this.removeHits=function(e){_(_e(".djs-hit",e),Ke)},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=mt(t);return m(n,"stroke"),g(e,n),n},this.createBoxHit=function(e,t,n){n=z({x:0,y:0},n);var i=Le("rect");return m(i,t),Te(i,n),g(e,i),i},this.updateDefaultHit=function(e,t){var n=we(".djs-hit",t);if(n)return e.waypoints?gt(n,e.waypoints):Te(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=c,this.unregisterEvent=p}Go.$inject=["eventBus","elementRegistry","styles"];const Qo={__init__:["interactionEvents"],interactionEvents:["type",Go]};function Xo(e,t){this._eventBus=e,this.offset=5;var n=t.cls("djs-outline",["no-fill"]),i=this;function r(e){var t=Le("rect");return Te(t,z({x:0,y:0,rx:4,width:100,height:100},n)),t}e.on(["shape.added","shape.changed"],500,(function(e){var t=e.element,n=e.gfx,o=we(".djs-outline",n);o||ke(n,o=i.getOutline(t)||r()),i.updateShapeOutline(o,t)})),e.on(["connection.added","connection.changed"],(function(e){var t=e.element,n=e.gfx,o=we(".djs-outline",n);o||ke(n,o=r()),i.updateConnectionOutline(o,t)}))}Xo.prototype.updateShapeOutline=function(e,t){var n=!1,i=this._getProviders();i.length&&_(i,(function(i){n=n||i.updateOutline(t,e)})),n||Te(e,{x:-this.offset,y:-this.offset,width:t.width+2*this.offset,height:t.height+2*this.offset})},Xo.prototype.updateConnectionOutline=function(e,t){var n=Et(t);Te(e,{x:n.x-this.offset,y:n.y-this.offset,width:n.width+2*this.offset,height:n.height+2*this.offset})},Xo.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("outline.getProviders",e,(function(e){e.providers.push(t)}))},Xo.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"outline.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},Xo.prototype.getOutline=function(e){var t;return _(this._getProviders(),(function(n){g(n.getOutline)&&(t=t||n.getOutline(e))})),t},Xo.$inject=["eventBus","styles","elementRegistry"];const Ko={__init__:["outline"],outline:["type",Xo]};function Yo(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)}))}Yo.$inject=["eventBus","canvas"],Yo.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})}},Yo.prototype.get=function(){return this._selectedElements},Yo.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},Yo.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();h(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?_(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 Zo="hover",Jo="selected";function es(e,t,n){this._canvas=e;var i=this;function r(t,n){e.addMarker(t,n)}function o(t,n){e.removeMarker(t,n)}this._multiSelectionBox=null,t.on("element.hover",(function(e){r(e.element,Zo)})),t.on("element.out",(function(e){o(e.element,Zo)})),t.on("selection.changed",(function(e){var t=e.oldSelection,n=e.newSelection;_(t,(function(e){-1===n.indexOf(e)&&function(e){o(e,Jo)}(e)})),_(n,(function(e){-1===t.indexOf(e)&&function(e){r(e,Jo)}(e)})),i._updateSelectionOutline(n)})),t.on("element.changed",(function(e){n.isSelected(e.element)&&i._updateSelectionOutline(n.get())}))}function ts(e,t,n,i){e.on("create.end",500,(function(e){var n=e.context,i=n.canExecute,r=n.elements,o=(n.hints||{}).autoSelect;if(i){if(!1===o)return;h(o)?t.select(o):t.select(r.filter(ns))}})),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);b(n,(function(e){return r.id===e.id}))||t.select(r)})),e.on("element.click",(function(e){if(Fo(e)){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,s=Vo(e)||Ho(e);if(r&&o)return s?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,s)}}))}function ns(e){return!e.hidden}es.$inject=["canvas","eventBus","selection"],es.prototype._updateSelectionOutline=function(e){var t=this._canvas.getLayer("selectionOutline");Re(t);var n=e.length>1;if(Me(this._canvas.getContainer())[n?"add":"remove"]("djs-multi-select"),n){var i=function(e){return{x:e.x-6,y:e.y-6,width:e.width+12,height:e.height+12}}(Et(e)),r=Le("rect");Te(r,z({rx:3},i)),Me(r).add("djs-selection-outline"),ke(t,r)}},ts.$inject=["eventBus","selection","canvas","elementRegistry"];const is={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Qo,Ko],selection:["type",Yo],selectionVisuals:["type",es],selectionBehavior:["type",ts]};function rs(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}rs.prototype.next=function(){return this._prefix+ ++this._counter};var os=new rs("ov");function ss(e,t,n,i){var r,o;this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=os,this._overlayDefaults=z({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(r=n.getContainer(),Z(o=be('
'),{position:"absolute",width:0,height:0}),r.insertBefore(o,r.firstChild),o),this._init()}function as(e,t,n){Z(e,{left:t+"px",top:n+"px"})}function ls(e,t){e.style.display=!1===t?"none":""}function cs(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}ss.$inject=["config.overlays","eventBus","canvas","elementRegistry"],ss.prototype.get=function(e){if(y(e)&&(e={id:e}),y(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?w(t.overlays,N({type:e.type})):t.overlays.slice():[]}return e.type?w(this._overlays,N({type:e.type})):e.id?this._overlays[e.id]:null},ss.prototype.add=function(e,t,n){if(f(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var i=this._ids.next();return n=z({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},ss.prototype.remove=function(e){var t=this.get(e)||[];h(t)||(t=[t]);var n=this;_(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(Ee(e.html),Ee(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)}}))},ss.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},ss.prototype.show=function(){ls(this._overlayRoot)},ss.prototype.hide=function(){ls(this._overlayRoot,!1)},ss.prototype.clear=function(){this._overlays={},this._overlayContainers=[],ie(this._overlayRoot)},ss.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}as(n,i,r),J(e.html,"data-container-id",t.id)},ss.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?Et(o).width:o.width,s=-1*i.right+t);void 0!==i.bottom&&(n=o.waypoints?Et(o).height:o.height,a=-1*i.bottom+n);as(r,s||0,a||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},ss.prototype._createOverlayContainer=function(e){var t=be('
');Z(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},ss.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";cs(this._overlayRoot,n)},ss.prototype._getOverlayContainer=function(e,t){var n=b(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},ss.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)),y(o)&&(o=be(o)),n=this._getOverlayContainer(r),Z(t=be('
'),{position:"absolute"}),t.appendChild(o),e.type&&te(t).add("djs-overlay-"+e.type),ls(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())},ss.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,i=this._canvas.findRoot(e.element),r=n&&n.minZoom,o=n&&n.maxZoom,s=e.htmlContainer,a=!0;(i!==this._canvas.getRootElement()||n&&(u(r)&&r>t.scale||u(o)&&oi&&(r=(1/t.scale||1)*i)),u(r)&&(a="scale("+r+","+r+")"),cs(s,a)},ss.prototype._updateOverlaysVisibilty=function(e){var t=this;_(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},ss.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;_(t.get({element:n}),(function(e){t.remove(e.id)}));var i=t._getOverlayContainer(n);if(i){Ee(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&&(_(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&&te(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)};const ps={__init__:["overlays"],overlays:["type",ss]};function us(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(Ot(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)}))}us.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];const ds={__init__:["changeSupport"],changeSupport:["type",us]};function hs(e){this._eventBus=e}function fs(e){return function(t,n,i,r,o){(g(t)||m(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}}function ms(e,t){t.invoke(hs,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)}))}hs.$inject=["eventBus"],hs.prototype.on=function(e,t,n,i,r,o){if((g(t)||m(t))&&(o=r,r=i,i=n,n=t,t=null),g(n)&&(o=r,r=i,i=n,n=1e3),f(r)&&(o=r,r=!1),!g(i))throw new Error("handlerFn must be a function");h(e)||(e=[e]);var s=this._eventBus;_(e,(function(e){var a=["commandStack",e,t].filter((function(e){return e})).join(".");s.on(a,n,r?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(i,o):i,o)}))},hs.prototype.canExecute=fs("canExecute"),hs.prototype.preExecute=fs("preExecute"),hs.prototype.preExecuted=fs("preExecuted"),hs.prototype.execute=fs("execute"),hs.prototype.executed=fs("executed"),hs.prototype.postExecute=fs("postExecute"),hs.prototype.postExecuted=fs("postExecuted"),hs.prototype.revert=fs("revert"),hs.prototype.reverted=fs("reverted"),i(ms,hs),ms.$inject=["canvas","injector"];const gs={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",ms]};function ys(e){return CSS.escape(e)}var vs={"&":"&","<":"<",">":">",'"':""","'":"'"};function bs(e){return(e=""+e)&&e.replace(/[&<>"']/g,(function(e){return vs[e]}))}var xs="_plane";function ws(e){return function(e){return e.replace(new RegExp(xs+"$"),"")}(e.id)}function _s(e){var t=e.id;return Tr(e,"bpmn:SubProcess")?Ps(t):t}function Es(e){return Ps(e)}function Os(e){return Tr(Dr(e),"bpmndi:BPMNPlane")}function Ps(e){return e+xs}function ks(e,t,n){var i=be('
    '),r=n.getContainer(),o=te(r);r.appendChild(i);var s=[];function a(e){e&&(s=function(e){for(var t=Mr(e),n=[],i=t;i;i=i.$parent)(Tr(i,"bpmn:SubProcess")||Tr(i,"bpmn:Process"))&&n.push(i);return n.reverse()}(e));var r=s.map((function(e){var i=bs(e.name||e.id),r=be('
  • '+i+"
  • "),o=n.findRoot(_s(e))||n.findRoot(e.id);if(!o&&Tr(e,"bpmn:Process")){var s=t.find((function(t){var n=Mr(t);return n&&n.get("processRef")&&n.get("processRef")===e}));o=n.findRoot(s.id)}return r.addEventListener("click",(function(){n.setRootElement(o)})),r}));i.innerHTML="";var a=r.length>1;o.toggle("bjs-breadcrumbs-shown",a),r.forEach((function(e){i.appendChild(e)}))}e.on("element.changed",(function(e){var t=Mr(e.element);b(s,(function(e){return e===t}))&&a()})),e.on("root.set",(function(e){a(e.element)}))}function Ss(e,t){var n=null,i=new Cs;e.on("root.set",(function(e){var r=e.element,o=t.viewbox(),s=i.get(r);if(i.set(n,{x:o.x,y:o.y,zoom:o.scale}),n=r,!Tr(r,"bpmn:Collaboration")||s){s=s||{x:0,y:0,zoom:1};var a=(o.x-s.x)*o.scale,l=(o.y-s.y)*o.scale;0===a&&0===l||t.scroll({dx:a,dy:l}),s.zoom!==o.scale&&t.zoom(s.zoom,{x:0,y:0})}})),e.on("diagram.clear",(function(){i.clear(),n=null}))}function Cs(){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)}}ks.$inject=["eventBus","elementRegistry","canvas"],Ss.$inject=["eventBus","canvas"];var Ts=180,As=160;function Ms(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 Ds(e){return Tr(e,"bpmndi:BPMNDiagram")?e:Ds(e.$parent)}Ms.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach((function(e){e.plane&&e.plane.bpmnElement&&(t._processToDiagramMap[e.plane.bpmnElement.id]=e)}));var n=[];e.diagrams.forEach((function(e){var i=t._createNewDiagrams(e.plane);Array.prototype.push.apply(n,i)})),n.forEach((function(e){t._movePlaneElementsToOrigin(e.plane)}))}},Ms.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;Tr(r,"bpmn:SubProcess")&&!t.isExpanded&&n.push(r),function(e,t){var n=e.$parent;if(!Tr(n,"bpmn:SubProcess")||n===t.bpmnElement)return!1;if(Ar(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},Ms.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=wn(e.bounds);t.top=Math.min(n.top,t.top),t.left=Math.min(n.left,t.left)}})),_n(t)}(e),i=n.x-Ts,r=n.y-As;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)}))},Ms.prototype._moveToDiPlane=function(e,t){var n=Ds(e).plane.get("planeElement");n.splice(n.indexOf(e),1),t.get("planeElement").push(e)},Ms.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},Ms.$inject=["eventBus","moddle"];var Rs=250;function Ns(e,t,n,i){hs.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=i;var r=this;this.executed("shape.toggleCollapse",Rs,(function(e){var t=e.shape;r._canDrillDown(t)?r._addOverlay(t):r._removeOverlay(t)}),!0),this.reverted("shape.toggleCollapse",Rs,(function(e){var t=e.shape;r._canDrillDown(t)?r._addOverlay(t):r._removeOverlay(t)}),!0),this.executed(["shape.create","shape.move","shape.delete"],Rs,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;r._canDrillDown(i)&&r._addOverlay(i),r._updateDrilldownOverlay(t),r._updateDrilldownOverlay(n),r._updateDrilldownOverlay(i)}),!0),this.reverted(["shape.create","shape.move","shape.delete"],Rs,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;r._canDrillDown(i)&&r._addOverlay(i),r._updateDrilldownOverlay(t),r._updateDrilldownOverlay(n),r._updateDrilldownOverlay(i)}),!0),t.on("import.render.complete",(function(){n.filter((function(e){return r._canDrillDown(e)})).map((function(e){r._addOverlay(e)}))}))}i(Ns,hs),Ns.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},Ns.prototype._canDrillDown=function(e){var t=this._canvas;return Tr(e,"bpmn:SubProcess")&&t.findRoot(_s(e))},Ns.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=Mr(e),i=t.get({element:n.id,type:"drilldown"})[0];if(i){var r=n&&n.get("flowElements")&&n.get("flowElements").length;te(i.html).toggle("bjs-drilldown-empty",!r)}},Ns.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays;n.get({element:e,type:"drilldown"}).length&&this._removeOverlay(e);var i=be('');i.addEventListener("click",(function(){t.setRootElement(t.findRoot(_s(e)))})),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:i}),this._updateOverlayVisibility(e)},Ns.prototype._removeOverlay=function(e){this._overlays.remove({element:e,type:"drilldown"})},Ns.$inject=["canvas","eventBus","elementRegistry","overlays"];const $s={__depends__:[ps,ds,gs],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",ks],drilldownCentering:["type",Ss],drilldownOverlayBehavior:["type",Ns],subprocessCompatibility:["type",Ms]};function js(e){Hr.call(this,e)}i(js,Hr),js.prototype._modules=[$o,Ao,is,ps,$s],js.prototype._moddleExtensions={};var Is=["c","C"],Ls=["v","V"],Bs=["y","Y"],qs=["z","Z"];function zs(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function Fs(e,t){return-1!==(e=h(e)?e:[e]).indexOf(t.key)||-1!==e.indexOf(t.code)}function Vs(e){return e.shiftKey}var Hs="keyboard.keydown",Us="input-handle-modified-keys";function Ws(e,t){var n=this;this._config=e||{},this._eventBus=t,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),t.on("diagram.destroy",(function(){n._fire("destroy"),n.unbind()})),t.on("diagram.init",(function(){n._fire("init")})),t.on("attach",(function(){e&&e.bindTo&&n.bind(e.bindTo)})),t.on("detach",(function(){n.unbind()}))}Ws.$inject=["config.keyboard","eventBus"],Ws.prototype._keydownHandler=function(e){this._keyHandler(e,Hs)},Ws.prototype._keyupHandler=function(e){this._keyHandler(e,"keyboard.keyup")},Ws.prototype._keyHandler=function(e,t){if(!this._isEventIgnored(e)){var n={keyEvent:e};this._eventBus.fire(t||Hs,n)&&e.preventDefault()}},Ws.prototype._isEventIgnored=function(e){return!!e.defaultPrevented||(t=e.target)&&(xe(t,"input, textarea")||"true"===t.contentEditable)&&this._isModifiedKeyIgnored(e);var t},Ws.prototype._isModifiedKeyIgnored=function(e){return!zs(e)||-1===this._getAllowedModifiers(e.target).indexOf(e.key)},Ws.prototype._getAllowedModifiers=function(e){var t=re(e,"["+Us+"]",!0);return!t||this._node&&!this._node.contains(t)?[]:t.getAttribute(Us).split(",")},Ws.prototype.bind=function(e){this.unbind(),this._node=e,de.bind(e,"keydown",this._keydownHandler),de.bind(e,"keyup",this._keyupHandler),this._fire("bind")},Ws.prototype.getBinding=function(){return this._node},Ws.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),de.unbind(e,"keydown",this._keydownHandler),de.unbind(e,"keyup",this._keyupHandler)),this._node=null},Ws.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})},Ws.prototype.addListener=function(e,t,n){g(e)&&(n=t,t=e,e=1e3),this._eventBus.on(n||Hs,e,t)},Ws.prototype.removeListener=function(e,t){this._eventBus.off(t||Hs,e)},Ws.prototype.hasModifier=function(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey},Ws.prototype.isCmd=zs,Ws.prototype.isShift=Vs,Ws.prototype.isKey=Fs;function Gs(e,t){var n=this;e.on("editorActions.init",500,(function(e){var i=e.editorActions;n.registerBindings(t,i)}))}Gs.$inject=["eventBus","keyboard"],Gs.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}n("undo",(function(e){if(function(e){return zs(e)&&!Vs(e)&&Fs(qs,e)}(e.keyEvent))return t.trigger("undo"),!0})),n("redo",(function(e){if(function(e){return zs(e)&&(Fs(Bs,e)||Fs(qs,e)&&Vs(e))}(e.keyEvent))return t.trigger("redo"),!0})),n("copy",(function(e){if(function(e){return zs(e)&&Fs(Is,e)}(e.keyEvent))return t.trigger("copy"),!0})),n("paste",(function(e){if(function(e){return zs(e)&&Fs(Ls,e)}(e.keyEvent))return t.trigger("paste"),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(Fs(["+","Add","="],n)&&zs(n))return t.trigger("stepZoom",{value:1}),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(Fs(["-","Subtract"],n)&&zs(n))return t.trigger("stepZoom",{value:-1}),!0})),n("zoom",(function(e){var n=e.keyEvent;if(Fs("0",n)&&zs(n))return t.trigger("zoom",{value:1}),!0})),n("removeSelection",(function(e){if(Fs(["Backspace","Delete","Del"],e.keyEvent))return t.trigger("removeSelection"),!0}))};const Qs={__init__:["keyboard","keyboardBindings"],keyboard:["type",Ws],keyboardBindings:["type",Gs]};var Xs={moveSpeed:50,moveSpeedAccelerated:200};function Ks(e,t,n){var i=this;this._config=z({},Xs,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,s=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:s,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})}}Ks.$inject=["config.keyboardMove","keyboard","canvas"];const Ys={__depends__:[Qs],__init__:["keyboardMove"],keyboardMove:["type",Ks]};var Zs=/^djs-cursor-.*$/;function Js(e){var t=te(document.body);t.removeMatching(Zs),e&&t.add("djs-cursor-"+e)}function ea(){Js(null)}function ta(e,t){function n(){return!1}return t=t||"element.click",e.once(t,5e3,n),function(){e.off(t,n)}}function na(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function ia(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ra(e,t){var n;function i(i){var r,o=n.start,s=n.button,a=Bo(i),l=ia(a,o);(!n.dragging&&(r=l,Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2))>15)&&(n.dragging=!0,0===s&&ta(e),Js("grab")),n.dragging)&&(l=ia(a,n.last||n.start),t.scroll({dx:l.x,dy:l.y}),n.last=a);i.preventDefault()}function r(e){de.unbind(document,"mousemove",i),de.unbind(document,"mouseup",r),n=null,ea()}e.on("element.mousedown",500,(function(e){return function(e){if(re(e.target,".djs-draggable"))return;var t=e.button;if(t>=2||e.ctrlKey||e.shiftKey||e.altKey)return;return n={button:t,start:Bo(e)},de.bind(document,"mousemove",i),de.bind(document,"mouseup",r),!0}(e.originalEvent)})),this.isActive=function(){return!!n}}ra.$inject=["eventBus","canvas"];const oa={__init__:["moveCanvas"],moveCanvas:["type",ra]};function sa(e){return Math.log(e)/Math.log(10)}function aa(e,t){var n=sa(e.min),i=sa(e.max);return(Math.abs(n)+Math.abs(i))/t}var la=Math.sign||function(e){return e>=0?1:-1},ca={min:.2,max:4};function pa(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=q(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)}))}pa.$inject=["config.zoomScroll","eventBus","canvas"],pa.prototype.scroll=function(e){this._canvas.scroll(e)},pa.prototype.reset=function(){this._canvas.zoom("fit-viewport")},pa.prototype.zoom=function(e,t){var n=aa(ca,20);this._totalDelta+=e,Math.abs(this._totalDelta)>.1&&(this._zoom(e,t,n),this._totalDelta=0)},pa.prototype._handleWheel=function(e){if(!re(e.target,".djs-scrollable",!0)){var t=this._container;e.preventDefault();var n,i=e.ctrlKey||qo()&&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))*la(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)}},pa.prototype.stepZoom=function(e,t){var n=aa(ca,10);this._zoom(e,t,n)},pa.prototype._zoom=function(e,t,n){var i=this._canvas,r=e>0?1:-1,o=sa(i.zoom()),s=Math.round(o/n)*n;s+=n*r;var a=Math.pow(10,s);i.zoom(function(e,t){return Math.max(e.min,Math.min(e.max,t))}(ca,a),t)},pa.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,i=this._enabled;return void 0===e&&(e=!i),i!==e&&de[e?"bind":"unbind"](t,"wheel",n,!1),this._enabled=e,e},pa.prototype._init=function(e){this.toggle(e)};const ua={__init__:["zoomScroll"],zoomScroll:["type",pa]};function da(e){js.call(this,e)}i(da,js),da.prototype._navigationModules=[Ys,oa,ua],da.prototype._modules=[].concat(js.prototype._modules,da.prototype._navigationModules);var ha=n(168),fa=n.n(ha),ma=["mousedown","mouseup","mouseover","mouseout","click","dblclick"];function ga(e,t){return t.get(e,!1)}function ya(e){e.preventDefault(),"function"==typeof e.stopPropagation?e.stopPropagation():e.srcEvent&&"function"==typeof e.srcEvent.stopPropagation&&e.srcEvent.stopPropagation(),"function"==typeof e.stopImmediatePropagation&&e.stopImmediatePropagation()}function va(e){function t(t){setTimeout((function(){_(ma,(function(t){de.unbind(e,t,ya,!0)}))}),500)}de.bind(e,"touchstart",(function(t){_(ma,(function(t){de.bind(e,t,ya,!0)}))}),!0),de.bind(e,"touchend",t,!0),de.bind(e,"touchcancel",t,!0);var n=new(fa().Manager)(e,{inputClass:fa().TouchInput,recognizers:[],domEvents:!0}),i=new(fa().Tap),r=new(fa().Pan)({threshold:10}),o=new(fa().Press),s=new(fa().Pinch),a=new(fa().Tap)({event:"doubletap",taps:2});return s.requireFailure(r),s.requireFailure(o),n.add([r,o,s,a,i]),n.reset=function(e){var t=this.recognizers,i=this.session;i.stopped||(n.stop(e),setTimeout((function(){var e,n;for(e=0;n=t[e];e++)n.reset(),n.state=8;i.curRecognizer=null}),0))},n.on("hammer.input",(function(e){e.srcEvent.defaultPrevented&&n.reset(!0)})),n}function ba(e,t,n,i,r){var o,s=ga("dragging",e),a=ga("move",e),l=ga("contextPad",e),c=ga("palette",e);function p(e,t){return function(n){var o=u(n.target),s=o&&i.get(o);return t&&(n.srcEvent.button=t),r.fire(e,n,s)}}function u(e){return re(e,"svg, .djs-element",!0)}function d(e){function n(e){var n=u(e.target),r=n&&i.get(n);if(a&&t.getRootElement()!==r)return a.start(e,r,!0);!function(){var e=0,n=0;function i(i){var r=i.deltaX-e,o=i.deltaY-n;t.scroll({dx:r,dy:o}),e=i.deltaX,n=i.deltaY}function r(e){o.off("panmove",i),o.off("panend",r),o.off("pancancel",r)}o.on("panmove",i),o.on("panend",r),o.on("pancancel",r)}()}(o=va(e)).on("tap",p("element.click")),o.on("doubletap",p("element.dblclick",1)),o.on("panstart",n),o.on("press",n),o.on("pinchstart",(function(e){var n=t.zoom(),i=e.center;function r(e){var r=1-(1-e.scale)/1.5,o=Math.max(.2,Math.min(4,r*n));t.zoom(o,i),ya(e)}function s(e){o.off("pinchmove",r),o.off("pinchend",s),o.off("pinchcancel",s),o.reset(!0)}o.on("pinchmove",r),o.on("pinchend",s),o.on("pinchcancel",s)}))}s&&n.on("drag.move",(function(e){var t=e.originalEvent;if(t&&!(t instanceof MouseEvent)){var n=Bo(t),r=u(document.elementFromPoint(n.x,n.y)),o=r&&i.get(r);o!==e.hover&&(e.hover&&s.out(e),o&&(s.hover({element:o,gfx:r}),e.hover=o,e.hoverGfx=r))}})),l&&n.on("contextPad.create",(function(e){var t=va(e.pad.html);t.on("panstart",(function(e){l.trigger("dragstart",e,!0)})),t.on("press",(function(e){l.trigger("dragstart",e,!0)})),t.on("tap",(function(e){l.trigger("click",e)}))})),c&&n.on("palette.create",(function(e){var t=va(e.container);t.on("panstart",(function(e){c.trigger("dragstart",e,!0)})),t.on("press",(function(e){c.trigger("dragstart",e,!0)})),t.on("tap",(function(e){c.trigger("click",e)}))})),n.on("canvas.init",(function(e){d(e.svg)}))}function xa(e){var t=this;e.on("canvas.init",(function(e){t.addBBoxMarker(e.svg)}))}ba.$inject=["injector","canvas","eventBus","elementRegistry","interactionEvents","touchFix"],xa.$inject=["eventBus"],xa.prototype.addBBoxMarker=function(e){var t={fill:"none",class:"outer-bound-marker"},n=Le("rect");Te(n,{x:-1e4,y:1e4,width:10,height:10}),Te(n,t),ke(e,n);var i=Le("rect");Te(i,{x:1e4,y:1e4,width:10,height:10}),Te(i,t),ke(e,i)};const wa={__depends__:[{__depends__:[Qo],__init__:["touchInteractionEvents"],touchInteractionEvents:["type",ba],touchFix:["type",xa]}]};function _a(e){return e&&e[e.length-1]}function Ea(e){return e.y}function Oa(e){return e.x}var Pa={left:Oa,center:Oa,right:function(e){return e.x+e.width},top:Ea,middle:Ea,bottom:function(e){return e.y+e.height}};function ka(e,t){this._modeling=e,this._rules=t}ka.$inject=["modeling","rules"],ka.prototype._getOrientationDetails=function(e){var t="x",n="width";return-1!==["top","bottom","middle"].indexOf(e)&&(t="y",n="height"),{axis:t,dimension:n}},ka.prototype._isType=function(e,t){return-1!==t.indexOf(e)},ka.prototype._alignmentPosition=function(e,t){var n,i,r,o=this._getOrientationDetails(e),s=o.axis,a=o.dimension,l={},c={},p=!1;if(this._isType(e,["left","top"]))l[e]=t[0][s];else if(this._isType(e,["right","bottom"]))r=_a(t),l[e]=r[s]+r[a];else if(this._isType(e,["center","middle"])){if(_(t,(function(e){var t=e[s]+Math.round(e[a]/2);c[t]?c[t].elements.push(e):c[t]={elements:[e],center:t}})),n=R(c,(function(e){return e.elements.length>1&&(p=!0),e.elements.length})),p)return l[e]=_a(n).center,l;i=t[0],r=_a(t=R(t,(function(e){return e[s]+e[a]}))),l[e]=function(e,t){return Math.round((e[s]+t[s]+t[a])/2)}(i,r)}return l},ka.prototype.trigger=function(e,t){var n,i=this._modeling,r=w(e,(function(e){return!(e.waypoints||e.host||e.labelTarget)}));if(h(n=this._rules.allowed("elements.align",{elements:r}))&&(r=n),!(r.length<2)&&n){var o=R(r,Pa[t]),s=this._alignmentPosition(t,o);i.alignElements(o,s)}};const Sa={__init__:["alignElements"],alignElements:["type",ka]};var Ca=".entry";function Ta(e,t,n,i){this._canvas=e,this._eventBus=n,this._overlays=i;var r=u(t&&t.scale)?t.scale:{min:1,max:1.5};this._overlaysConfig={scale:r},this._current=null,this._init()}function Aa(e,t){return-1!==e.indexOf(t)}Ta.$inject=["canvas","config.contextPad","eventBus","overlays"],Ta.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;k(h(r)?r:[r],(function(e){return Aa(n,e)}))&&e.open(r,!0)}}))},Ta.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("contextPad.getProviders",e,(function(e){e.providers.push(t)}))},Ta.prototype.getEntries=function(e){var t=this._getProviders(),n=h(e)?"getMultiElementContextPadEntries":"getContextPadEntries",i={};return _(t,(function(t){if(g(t[n])){var r=t[n](e);g(r)?i=r(i):_(r,(function(e,t){i[t]=e}))}})),i},Ta.prototype.trigger=function(e,t,n){var i,r,o=t.delegateTarget||t.target;return o?(i=J(o,"data-action"),r=t.originalEvent||t,"mouseover"===e?this._timeout=setTimeout((()=>{this._mouseout=this.triggerEntry(i,"hover",r,n)}),300):"mouseout"===e&&(clearTimeout(this._timeout),this._mouseout&&(this._mouseout(),this._mouseout=null)),this.triggerEntry(i,e,r,n)):t.preventDefault()},Ta.prototype.triggerEntry=function(e,t,n,i){if(this.isShown()){var r=this._current.target,o=this._current.entries[e];if(o){var s=o.action;if(!1!==this._eventBus.fire("contextPad.trigger",{entry:o,event:n})){if(g(s)){if("click"===t)return s(n,r,i)}else if(s[t])return s[t](n,r,i);n.preventDefault()}}}},Ta.prototype.open=function(e,t){!t&&this.isOpen(e)||(this.close(),this._updateAndOpen(e))},Ta.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},Ta.prototype._updateAndOpen=function(e){var t,n=this.getEntries(e),i=this.getPad(e),r=i.html;_(n,(function(e,n){var i,o=e.group||"default",s=be(e.html||'
    ');J(s,"data-action",n),(i=we("[data-group="+ys(o)+"]",r))||(J(i=be('
    '),"data-group",o),r.appendChild(i)),i.appendChild(s),e.className&&function(e,t){var n=te(e);(t=h(t)?t:t.split(/\s+/g)).forEach((function(e){n.add(e)}))}(s,e.className),e.title&&J(s,"title",e.title),e.imageUrl&&(J(t=be(""),"src",e.imageUrl),t.style.width="100%",t.style.height="100%",s.appendChild(t))})),te(r).add("open"),this._current={target:e,entries:n,pad:i},this._eventBus.fire("contextPad.open",{current:this._current})},Ta.prototype.getPad=function(e){if(this.isOpen())return this._current.pad;var t=this,n=this._overlays,i=be('
    '),r=this._getPosition(e),o=z({html:i},this._overlaysConfig,r);me.bind(i,Ca,"click",(function(e){t.trigger("click",e)})),me.bind(i,Ca,"dragstart",(function(e){t.trigger("dragstart",e)})),me.bind(i,Ca,"mouseover",(function(e){t.trigger("mouseover",e)})),me.bind(i,Ca,"mouseout",(function(e){t.trigger("mouseout",e)})),de.bind(i,"mousedown",(function(e){e.stopPropagation()}));var s=this._canvas.getRootElement();this._overlayId=n.add(s,"context-pad",o);var a=n.get(this._overlayId);return this._eventBus.fire("contextPad.create",{target:e,pad:a}),a},Ta.prototype.close=function(){this.isOpen()&&(clearTimeout(this._timeout),this._overlays.remove(this._overlayId),this._overlayId=null,this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)},Ta.prototype.isOpen=function(e){var t=this._current;if(!t)return!1;if(!e)return!0;var n=t.target;return h(e)===h(n)&&(h(e)?e.length===n.length&&P(e,(function(e){return Aa(n,e)})):n===e)},Ta.prototype.isShown=function(){return this.isOpen()&&this._overlays.isShown()},Ta.prototype._getPosition=function(e){var t,n=Et(h(e=yn(e)?(t=e).waypoints[t.waypoints.length-1]:e)?e:[e]);return{position:{left:n.x+n.width+12,top:n.y-6}}};const Ma={__depends__:[Qo,ps],contextPad:["type",Ta]};var Da,Ra,Na,$a,ja,Ia,La,Ba,qa,za,Fa={},Va=[],Ha=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ua=Array.isArray;function Wa(e,t){for(var n in t)e[n]=t[n];return e}function Ga(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Qa(e,t,n){var i,r,o,s={};for(o in t)"key"==o?i=t[o]:"ref"==o?r=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?Da.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return Xa(e,s,i,r,null)}function Xa(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?++Na:r,__i:-1,__u:0};return null==r&&null!=Ra.vnode&&Ra.vnode(o),o}function Ka(e){return e.children}function Ya(e,t){this.props=e,this.context=t}function Za(e,t){if(null==t)return e.__?Za(e.__,e.__i+1):null;for(var n;tt&&$a.sort(La));tl.__r=0}function nl(e,t,n,i,r,o,s,a,l,c,p){var u,d,h,f,m,g=i&&i.__k||Va,y=t.length;for(n.__d=l,il(n,t,g),l=n.__d,u=0;u0?Xa(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r).__=e,r.__b=e.__b+1,o=null,-1!==(a=r.__i=ol(r,n,s,p))&&(p--,(o=n[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&u--,"function"!=typeof r.type&&(r.__u|=65536)):a!==s&&(a==s-1?u--:a==s+1?u++:(a>s?u--:u++,r.__u|=65536))):r=e.__k[i]=null;if(p)for(i=0;i(null==l||131072&l.__u?0:1))for(;s>=0||a=0){if((l=t[s])&&!(131072&l.__u)&&r==l.key&&o===l.type)return s;s--}if(a=5&&((r||!e&&5===i)&&(s.push(i,0,r,n),i=6),e&&(s.push(i,e,0,n),i=6)),r=""},l=0;l"===t?(i=1,r=""):r=t+r[0]:o?t===o?o="":r+=t:'"'===t||"'"===t?o=t:">"===t?(a(),i=1):i&&("="===t?(i=5,n=r,r=""):"/"===t&&(i<5||">"===e[l][c+1])?(a(),3===i&&(s=s[0]),i=s,(s=s[0]).push(2,0,i),i=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(a(),i=2):r+=t),3===i&&"!--"===r&&(i=4,s=s[0])}return a(),s}(e)),t),arguments,[])).length>1?t:t[0]}.bind(Qa),El=0,Ol=[],Pl=Ra,kl=Pl.__b,Sl=Pl.__r,Cl=Pl.diffed,Tl=Pl.__c,Al=Pl.unmount,Ml=Pl.__;function Dl(e,t){Pl.__h&&Pl.__h(bl,e,El||t),El=0;var n=bl.__H||(bl.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Rl(e){return El=1,function(e,t,n){var i=Dl(vl++,2);if(i.t=e,!i.__c&&(i.__=[n?n(t):Ul(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=bl,!bl.u)){var r=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var s=i.__c.props!==e;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),o&&o.call(this,e,t,n)||s};bl.u=!0;var o=bl.shouldComponentUpdate,s=bl.componentWillUpdate;bl.componentWillUpdate=function(e,t,n){if(this.__e){var i=o;o=void 0,r(e,t,n),o=i}s&&s.call(this,e,t,n)},bl.shouldComponentUpdate=r}return i.__N||i.__}(Ul,e)}function Nl(e,t){var n=Dl(vl++,3);!Pl.__s&&Hl(n.__H,t)&&(n.__=e,n.i=t,bl.__H.__h.push(n))}function $l(e,t){var n=Dl(vl++,4);!Pl.__s&&Hl(n.__H,t)&&(n.__=e,n.i=t,bl.__h.push(n))}function jl(e){return El=5,Il((function(){return{current:e}}),[])}function Il(e,t){var n=Dl(vl++,7);return Hl(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ll(e,t){return El=8,Il((function(){return e}),t)}function Bl(){for(var e;e=Ol.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Fl),e.__H.__h.forEach(Vl),e.__H.__h=[]}catch(t){e.__H.__h=[],Pl.__e(t,e.__v)}}Pl.__b=function(e){bl=null,kl&&kl(e)},Pl.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ml&&Ml(e,t)},Pl.__r=function(e){Sl&&Sl(e),vl=0;var t=(bl=e.__c).__H;t&&(xl===bl?(t.__h=[],bl.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(Fl),t.__h.forEach(Vl),t.__h=[],vl=0)),xl=bl},Pl.diffed=function(e){Cl&&Cl(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Ol.push(t)&&wl===Pl.requestAnimationFrame||((wl=Pl.requestAnimationFrame)||zl)(Bl)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),xl=bl=null},Pl.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Fl),e.__h=e.__h.filter((function(e){return!e.__||Vl(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Pl.__e(n,e.__v)}})),Tl&&Tl(e,t)},Pl.unmount=function(e){Al&&Al(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Fl(e)}catch(e){t=e}})),n.__H=void 0,t&&Pl.__e(t,n.__v))};var ql="function"==typeof requestAnimationFrame;function zl(e){var t,n=function(){clearTimeout(i),ql&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);ql&&(t=requestAnimationFrame(n))}function Fl(e){var t=bl,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),bl=t}function Vl(e){var t=bl;e.__c=e.__(),bl=t}function Hl(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Ul(e,t){return"function"==typeof t?t(e):t}function Wl(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;to(e,t,"dragstart")} draggable=${!0} >
    ${t.imageUrl&&_l``||t.imageHtml&&_l`
    `} ${t.label?_l` ${t.label} `:null} ${t.description&&_l` ${t.description} `}
    ${t.documentationRef&&_l`
    e.stopPropagation()} title="Open element documentation" target="_blank" rel="noopener" >
    `} `}function Xl(e){const{selectedEntry:t,setSelectedEntry:n,entries:i,...r}=e,o=jl(),s=Il((()=>function(e){const t=[],n=e=>t.find((t=>e.id===t.id)),i=e=>!!n(e),r=e=>"string"==typeof e?{id:e}:e;return e.forEach((e=>{const o=e.group?r(e.group):{id:"default"};i(o)?n(o).entries.push(e):t.push({...o,entries:[e]})})),t}(i)),[i]);return $l((()=>{const e=o.current;if(!e)return;const t=e.querySelector(".selected");var n;t&&("function"==typeof(n=t).scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded():n.scrollIntoView({scrollMode:"if-needed",block:"nearest"}))}),[t]),_l`
    ${s.map((e=>_l` ${e.name&&_l`
    ${e.name}
    `}
      ${e.entries.map((e=>_l` <${Ql} key=${e.id} entry=${e} selected=${e===t} onMouseEnter=${()=>n(e)} onMouseLeave=${()=>n(null)} ...${r} /> `))}
    `))}
    `}function Kl(e){const{onClose:t,onSelect:n,className:i,headerEntries:r,position:o,title:s,width:a,scale:l,search:c,entries:p,onOpened:d,onClosed:h}=e,f=Il((()=>!!u(c)&&p.length>5),[c,p]),m=jl(),[g,y]=Rl(""),v=Ll(((e,t)=>{if(!f)return e;return e.filter((e=>{if(!t)return(e.rank||0)>=0;if(!1===e.searchable)return!1;const n=[e.description||"",e.label||"",e.search||""].join("---").toLowerCase();return t.toLowerCase().split(/\s/g).every((e=>n.includes(e)))}))}),[f]),[b,x]=Rl(v(p,g)),[w,_]=Rl(b[0]),E=Ll((e=>{w&&e.includes(w)||_(e[0]),x(e)}),[w,x,_]);Nl((()=>{E(v(p,g))}),[g,p]),Nl((()=>{const e=e=>{if("Escape"===e.key)return e.preventDefault(),t()};return document.documentElement.addEventListener("keydown",e),()=>{document.documentElement.removeEventListener("keydown",e)}}),[]),$l((()=>{m.current&&m.current.focus()}),[]);const O=Ll((e=>{let t=b.indexOf(w)+e;t<0&&(t=b.length-1),t>=b.length&&(t=0),_(b[t])}),[b,w,_]),P=Ll((e=>"Enter"===e.key&&w?n(e,w):"ArrowUp"===e.key||"Tab"===e.key&&e.shiftKey?(O(-1),e.preventDefault()):"ArrowDown"===e.key||"Tab"===e.key?(O(1),e.preventDefault()):void 0),[n,t,w,O]),k=Ll((e=>{xe(e.target,"input")&&y((()=>e.target.value))}),[y]);Nl((()=>(d(),()=>{h()})),[]);const S=Il((()=>s||r.length>0),[s,r]);return _l` <${Yl} onClose=${t} onKeyup=${k} onKeydown=${P} className=${i} position=${o} width=${a} scale=${l} > ${S&&_l`

    ${s}

    ${r.map((e=>_l` n(t,e)} title=${e.title||e.label} data-id=${e.id} onMouseEnter=${()=>_(e)} onMouseLeave=${()=>_(null)} > ${e.imageUrl&&_l``||e.imageHtml&&_l`
    `} ${e.label?_l` ${e.label} `:null} `))}
    `} ${p.length>0&&_l`
    ${f&&_l` `} <${Xl} entries=${b} selectedEntry=${w} setSelectedEntry=${_} onAction=${n} />
    ${0===b.length&&_l`
    No matching entries found.
    `} `} `}function Yl(e){const{onClose:t,onKeydown:n,onKeyup:i,className:r,children:o,position:s}=e,a=jl(),l=Ll((e=>{re(e.target,".djs-popup",!0)||t()}),[t]);return $l((()=>{if("function"!=typeof s)return;const e=a.current,t=s(e);e.style.left=`${t.x}px`,e.style.top=`${t.y}px`}),[a.current,s]),$l((()=>{a.current&&a.current.focus()}),[]),_l`
    ${o}
    `}var Zl=["contextPad.close","canvas.viewbox.changing","commandStack.changed"];function Jl(e,t,n){this._eventBus=t,this._canvas=n,this._current=null;var i=u(e&&e.scale)?e.scale:{min:1,max:1.5};this._config={scale:i},t.on("diagram.destroy",(()=>{this.close()})),t.on("element.changed",(e=>{const t=this.isOpen()&&this._current.target;e.element===t&&this._render()}))}Jl.$inject=["config.popupMenu","eventBus","canvas"],Jl.prototype._render=function(){const{position:e,className:t,entries:n,headerEntries:i,options:r}=this._current,o=Object.entries(n).map((([e,t])=>({id:e,...t}))),s=Object.entries(i).map((([e,t])=>({id:e,...t}))),a=e&&(t=>this._ensureVisible(t,e)),l=this._updateScale(this._current.container);ml(_l` <${Kl} onClose=${e=>this.close(e)} onSelect=${(e,t,n)=>this.trigger(e,t,n)} position=${a} className=${t} entries=${o} headerEntries=${s} scale=${l} onOpened=${this._onOpened.bind(this)} onClosed=${this._onClosed.bind(this)} ...${{...r}} /> `,this._current.container)},Jl.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}=this._getContext(e,t);this._current={position:n,className:t,target:e,entries:r,headerEntries:o,container:this._createContainer({provider:t}),options:i},this._emit("open"),this._bindAutoClose(),this._render()},Jl.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,empty:!(Object.keys(i).length||Object.keys(r).length)}},Jl.prototype.close=function(){this.isOpen()&&(this._emit("close"),this.reset(),this._current=null)},Jl.prototype.reset=function(){const e=this._current.container;ml(null,e),Ee(e)},Jl.prototype._emit=function(e,t){this._eventBus.fire(`popupMenu.${e}`,t)},Jl.prototype._onOpened=function(){this._emit("opened")},Jl.prototype._onClosed=function(){this._emit("closed")},Jl.prototype._createContainer=function(e){var t=this._canvas.getContainer();const n=be(`
    `);return t.appendChild(n),n},Jl.prototype._bindAutoClose=function(){this._eventBus.once(Zl,this.close,this)},Jl.prototype._unbindAutoClose=function(){this._eventBus.off(Zl,this.close,this)},Jl.prototype._updateScale=function(){var e,t,n=this._canvas.zoom(),i=this._config.scale,r=n;return!0!==i&&(!1===i?(e=1,t=1):(e=i.min,t=i.max),u(e)&&nt&&(r=t)),r},Jl.prototype._ensureVisible=function(e,t){var n=document.documentElement.getBoundingClientRect(),i=e.getBoundingClientRect(),r={},o=t.x,s=t.y;return t.x+i.width>n.width&&(r.x=!0),t.y+i.height>n.height&&(r.y=!0),r.x&&r.y?(o=t.x-i.width,s=t.y-i.height):r.x?(o=t.x-i.width,s=t.y):r.y&&t.y\n \n \n \n ',bottom:'\n \n \n \n ',center:'\n \n \n \n ',left:'\n \n \n \n ',right:'\n \n \n \n ',top:'\n \n \n \n ',middle:'\n \n \n \n '};function nc(e,t,n,i){e.registerProvider(900,this),this._contextPad=e,this._popupMenu=t,this._translate=n,this._canvas=i}nc.$inject=["contextPad","popupMenu","translate","canvas"],nc.prototype.getMultiElementContextPadEntries=function(e){var t={};return this._isAllowed(e)&&z(t,this._getEntries(e)),t},nc.prototype._isAllowed=function(e){return!this._popupMenu.isEmpty(e,"align-elements")},nc.prototype._getEntries=function(){var e=this;return{"align-elements":{group:"align-elements",title:e._translate("Align elements"),html:`
    ${tc.align}
    `,action:{click:function(t,n){var i=e._getMenuPosition(n);z(i,{cursor:{x:t.x,y:t.y}}),e._popupMenu.open(n,"align-elements",i)}}}}},nc.prototype._getMenuPosition=function(e){var t=this._contextPad.getPad(e).html.getBoundingClientRect();return{x:t.left,y:t.bottom+5}};var ic=["left","center","right","top","middle","bottom"];function rc(e,t,n,i){this._alignElements=t,this._translate=n,this._popupMenu=e,this._rules=i,e.registerProvider("align-elements",this)}function oc(e){hs.call(this,e),this.init()}function sc(e){oc.call(this,e)}rc.$inject=["popupMenu","alignElements","translate","rules"],rc.prototype.getPopupMenuEntries=function(e){var t={};return this._isAllowed(e)&&z(t,this._getEntries(e)),t},rc.prototype._isAllowed=function(e){return this._rules.allowed("elements.align",{elements:e})},rc.prototype._getEntries=function(e){var t=this._alignElements,n=this._translate,i=this._popupMenu,r={};return _(ic,(function(o){r["align-elements-"+o]={group:"align",title:n("Align elements "+o),className:"bjs-align-elements-menu-entry",imageHtml:tc[o],action:function(){t.trigger(e,o),i.close()}}})),r},oc.$inject=["eventBus"],i(oc,hs),oc.prototype.addRule=function(e,t,n){var i=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){i.canExecute(e,t,(function(e,t,i){return n(e)}),!0)}))},oc.prototype.init=function(){},sc.$inject=["eventBus"],i(sc,oc),sc.prototype.init=function(){this.addRule("elements.align",(function(e){var t=w(e.elements,(function(e){return!(e.waypoints||e.host||e.labelTarget)}));return!((t=yt(t)).length<2)&&t}))};const ac={__depends__:[Sa,Ma,ec],__init__:["alignElementsContextPadProvider","alignElementsMenuProvider","bpmnAlignElements"],alignElementsContextPadProvider:["type",nc],alignElementsMenuProvider:["type",rc],bpmnAlignElements:["type",sc]};function lc(e,t,n,i){for(var r;r=pc(e,n,t);)n=i(t,n,r);return n}function cc(e){return function(t,n,i){var r={x:n.x,y:n.y};return["x","y"].forEach((function(o){var s=e[o];if(s){var a="x"===o?"width":"height",l=s.margin,c=s.minDistance;r[o]=l<0?Math.min(i[o]+l-t[a]/2,n[o]-c+l):Math.max(i[o]+i[a]+l+t[a]/2,n[o]+c+l)}})),r}}function pc(e,t,n){var i={x:t.x-n.width/2,y:t.y-n.height/2,width:n.width,height:n.height},r=function(e){var t=uc(e);e.host&&(t=t.concat(uc(e.host)));e.attachers&&(t=t.concat(e.attachers.reduce((function(e,t){return e.concat(uc(t))}),[])));return t}(e);return b(r,(function(e){return e!==n&&"intersect"===Pn(e,i,10)}))}function uc(e){return(t=e,t.outgoing.map((function(e){return e.target}))).concat(function(e){return e.incoming.map((function(e){return e.source}))}(e));var t}function dc(){return!0}function hc(e,t,n){e.on("autoPlace",100,(function(e){var t=e.shape;return function(e,t,n){n||(n={});var i=n.defaultDistance||50,r=On(e),o=wn(e);return{x:o.right+i+t.width/2,y:r.y}}(e.source,t)})),e.on("autoPlace.end",(function(e){n.scrollToElement(e.shape)})),this.append=function(n,i,r){e.fire("autoPlace.start",{source:n,shape:i});var o=e.fire("autoPlace",{source:n,shape:i}),s=t.appendShape(n,i,o,n.parent,r);return e.fire("autoPlace.end",{source:n,shape:s}),s}}function fc(e,t){e.on("autoPlace.end",500,(function(e){t.select(e.shape)}))}hc.$inject=["eventBus","modeling","canvas"],fc.$inject=["eventBus","selection"];const mc={__init__:["autoPlaceSelectionBehavior"],autoPlace:["type",hc],autoPlaceSelectionBehavior:["type",fc]};function gc(e,t){return Tr(t,"bpmn:TextAnnotation")?function(e,t){var n=wn(e),i={x:n.right+t.width/2,y:n.top-50-t.height/2};yn(e)&&((i=On(e)).x+=100,i.y-=50);return lc(e,t,i,cc({y:{margin:-30,minDistance:20}}))}(e,t):Ar(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])?function(e,t){var n=wn(e),i={x:n.right-10+t.width/2,y:n.bottom+40+t.width/2};return lc(e,t,i,cc({x:{margin:30,minDistance:30}}))}(e,t):Tr(t,"bpmn:FlowNode")?function(e,t){var n=wn(e),i=On(e),r=function(e,t){t||(t={});var n=t.defaultDistance||50,i=t.direction||"e",r=t.filter,o=t.getWeight||function(t){return t.source===e?1:-1},s=t.maxDistance||250,a=t.reference||"start";function l(e,t){return"n"===i?"start"===a?wn(e).top-wn(t).bottom:"center"===a?wn(e).top-On(t).y:wn(e).top-wn(t).top:"w"===i?"start"===a?wn(e).left-wn(t).right:"center"===a?wn(e).left-On(t).x:wn(e).left-wn(t).left:"s"===i?"start"===a?wn(t).top-wn(e).bottom:"center"===a?On(t).y-wn(e).bottom:wn(t).bottom-wn(e).bottom:"start"===a?wn(t).left-wn(e).right:"center"===a?On(t).x-wn(e).right:wn(t).right-wn(e).right}r||(r=dc);var c=e.incoming.filter(r).map((function(t){var n=o(t),i=n<0?l(t.source,e):l(e,t.source);return{id:t.source.id,distance:i,weight:n}})),p=e.outgoing.filter(r).map((function(t){var n=o(t),i=n>0?l(e,t.target):l(t.target,e);return{id:t.target.id,distance:i,weight:n}})),u=O(c.concat(p).reduce((function(e,t){return e[t.id+"__weight_"+t.weight]=t,e}),{}),(function(e,t){var n=t.distance,i=t.weight;return n<0||n>s||(e[String(n)]||(e[String(n)]=0),e[String(n)]+=1*i,(!e.distance||e[e.distance]t.top&&(n=n.concat("n"));e.rightt.left&&(n=n.concat("e"));return n}(V(t,["x","y","width","height"]),n);this.resize(t,n,{autoResize:i});var r=t.parent;r&&this._expand([t],r)}}},xc.prototype.getOffset=function(e){return{top:60,bottom:60,left:100,right:100}},xc.prototype.getPadding=function(e){return{top:2,bottom:2,left:15,right:15}},xc.prototype.resize=function(e,t,n){this._modeling.resizeShape(e,t,null,n)},wc.$inject=["injector"],i(wc,xc),wc.prototype.resize=function(e,t,n){Tr(e,"bpmn:Participant")?this._modeling.resizeLane(e,t,null,n):this._modeling.resizeShape(e,t,null,n)},_c.$inject=["eventBus"],i(_c,oc),_c.prototype.canResize=function(e,t){return!1},i(Ec,_c),Ec.$inject=["eventBus","modeling"],Ec.prototype.canResize=function(e,t){if(Tr(t.di,"bpmndi:BPMNPlane"))return!1;if(!Tr(t,"bpmn:Participant")&&!Tr(t,"bpmn:Lane")&&!Tr(t,"bpmn:SubProcess"))return!1;var n=!0;return _(e,(function(e){(Tr(e,"bpmn:Lane")||vn(e))&&(n=!1)})),n};const Oc={__init__:["bpmnAutoResize","bpmnAutoResizeProvider"],bpmnAutoResize:["type",wc],bpmnAutoResizeProvider:["type",Ec]};function Pc(e,t,n){var i,r,o=this,s=n.get("dragging",!1);s&&t.on("drag.start",(function(n){t.once("drag.move",1500,(function(t){!function(t){if(!t.hover){var n=t.originalEvent,i=o._findTargetGfx(n),r=i&&e.get(i);i&&r&&(t.stopPropagation(),s.hover({element:r,gfx:i}),s.move(n))}}(t)}))})),t.on("element.hover",(function(e){i=e.gfx,r=e.element})),t.on("element.hover",1500,(function(e){r&&t.fire("element.out",{element:r,gfx:i})})),t.on("element.out",(function(){i=null,r=null})),this._findTargetGfx=function(e){var t;if(e instanceof MouseEvent)return t=Bo(e),function(e){return re(e,"svg, .djs-element",!0)}(document.elementFromPoint(t.x,t.y))}}Pc.$inject=["elementRegistry","eventBus","injector"];const kc={__init__:["hoverFix"],hoverFix:["type",Pc]};var Sc=Math.round,Cc="djs-drag-active";function Tc(e){e.preventDefault()}function Ac(e,t,n,i){var r,o={threshold:5,trapClick:!0};function s(e){var n=t.viewbox(),i=t._container.getBoundingClientRect();return{x:n.x+(e.x-i.left)/n.scale,y:n.y+(e.y-i.top)/n.scale}}function a(t,n){n=n||r;var i=e.createEvent(z({},n.payload,n.data,{isTouch:n.isTouch}));return!1!==e.fire("drag."+t,i)&&e.fire(n.prefix+"."+t,i)}function l(e,i){var o,l=r.payload,c=r.displacement,p=r.globalStart,u=Bo(e),d=ia(u,p),h=r.localStart,f=s(u),g=ia(f,h);if(!r.active&&(i||(o=d,Math.sqrt(Math.pow(o.x,2)+Math.pow(o.y,2))>r.threshold))){if(z(l,{x:Sc(h.x+c.x),y:Sc(h.y+c.y),dx:0,dy:0},{originalEvent:e}),!1===a("start"))return m();r.active=!0,r.keepSelection||(l.previousSelection=n.get(),n.select(null)),r.cursor&&Js(r.cursor),t.addMarker(t.getRootElement(),Cc)}Lo(e),r.active&&(z(l,{x:Sc(f.x+c.x),y:Sc(f.y+c.y),dx:Sc(g.x),dy:Sc(g.y)},{originalEvent:e}),a("move"))}function c(e){var t=!0;r.active&&(e&&(r.payload.originalEvent=e,Lo(e)),t=a("end")),!1===t&&a("rejected"),a("ended",g(!0!==t))}function p(e){Fs("Escape",e)&&(Tc(e),m())}function u(t){var n;r.active&&(n=ta(e),setTimeout(n,400),Tc(t)),c(t)}function d(e){l(e)}function h(e){var t=r.payload;t.hoverGfx=e.gfx,t.hover=e.element,a("hover")}function f(e){a("out");var t=r.payload;t.hoverGfx=null,t.hover=null}function m(e){var t;if(r){var n=r.active;n&&a("cancel"),t=g(e),n&&a("canceled",t)}}function g(o){var s,g;a("cleanup"),ea(),g=r.trapClick?u:c,de.unbind(document,"mousemove",l),de.unbind(document,"dragstart",Tc),de.unbind(document,"selectstart",Tc),de.unbind(document,"mousedown",g,!0),de.unbind(document,"mouseup",g,!0),de.unbind(document,"keyup",p),de.unbind(document,"touchstart",d,!0),de.unbind(document,"touchcancel",m,!0),de.unbind(document,"touchmove",l,!0),de.unbind(document,"touchend",c,!0),e.off("element.hover",h),e.off("element.out",f),t.removeMarker(t.getRootElement(),Cc);var y=r.payload.previousSelection;return!1!==o&&y&&!n.get().length&&function(e){var t=e.filter((function(e){return i.get(e.id)}));t.length&&n.select(t)}(y),s=r,r=null,s}e.on("diagram.destroy",m),this.init=function(t,n,i,g){r&&m(!1),"string"==typeof n&&(g=i,i=n,n=null);var y,v,b,x,w,_=(g=z({},o,g||{})).data||{};x=g.trapClick?u:c,t?(y=Io(t)||t,v=Bo(t),Lo(t),"dragstart"===y.type&&Tc(y)):(y=null,v={x:0,y:0}),b=s(v),n||(n=b),w=function(e){return"undefined"!=typeof TouchEvent&&e instanceof TouchEvent}(y),r=z({prefix:i,data:_,payload:{},globalStart:v,displacement:ia(n,b),localStart:b,isTouch:w},g),g.manual||(w?(de.bind(document,"touchstart",d,!0),de.bind(document,"touchcancel",m,!0),de.bind(document,"touchmove",l,!0),de.bind(document,"touchend",c,!0)):(de.bind(document,"mousemove",l),de.bind(document,"dragstart",Tc),de.bind(document,"selectstart",Tc),de.bind(document,"mousedown",x,!0),de.bind(document,"mouseup",x,!0)),de.bind(document,"keyup",p),e.on("element.hover",h),e.on("element.out",f)),a("init"),g.autoActivate&&l(t,!0)},this.move=l,this.hover=h,this.out=f,this.end=c,this.cancel=m,this.context=function(){return r},this.setOptions=function(e){z(o,e)}}Ac.$inject=["eventBus","canvas","selection","elementRegistry"];const Mc={__depends__:[kc,is],dragging:["type",Ac]};function Dc(e,t,n){this._canvas=n,this._opts=z({scrollThresholdIn:[20,20,20,20],scrollThresholdOut:[0,0,0,0],scrollRepeatTimeout:15,scrollStep:10},e);var i=this;t.on("drag.move",(function(e){var t=i._toBorderPoint(e);i.startScroll(t)})),t.on(["drag.cleanup"],(function(){i.stopScroll()}))}function Rc(e,t,n){return tg-3&&(n=Pn(r.target,m),s===g-2?"intersect"===n&&(h.pop(),h[h.length-1]=m):"intersect"!==n&&h.push(u)),i.newWaypoints=r.waypoints=a(r,h),c(i,y,e),i.newSegmentStartIndex=o+y,l(e)})),t.on("connectionSegment.move.hover",(function(e){e.context.hover=e.hover,n.addMarker(e.hover,hp)})),t.on(["connectionSegment.move.out","connectionSegment.move.cleanup"],(function(e){var t=e.context.hover;t&&n.removeMarker(t,hp)})),t.on("connectionSegment.move.cleanup",(function(e){var t=e.context,i=t.connection;t.draggerGfx&&Ke(t.draggerGfx),n.removeMarker(i,fp)})),t.on(["connectionSegment.move.cancel","connectionSegment.move.end"],(function(e){var t=e.context;t.connection.waypoints=t.originalWaypoints,l(e)})),t.on("connectionSegment.move.end",(function(e){var t=e.context,n=t.connection,i=t.newWaypoints,r=t.newSegmentStartIndex;i=i.map((function(e){return{original:e.original,x:Math.round(e.x),y:Math.round(e.y)}}));var s=function(e,t){var n=0;return{waypoints:e.filter((function(i,r){return!Rt(e[r-1],e[r+1],i)||(n=r<=t?n-1:n,!1)})),segmentOffset:n}}(i,r),l=a(n,s.waypoints),c=s.segmentOffset,p={segmentMove:{segmentStartIndex:t.segmentStartIndex,newSegmentStartIndex:r+c}};o.updateWaypoints(n,l,p)}))}bp.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","modeling"];var xp=Math.abs,wp=Math.round;function _p(e){return{x:e.x,y:e.y}}function Ep(e){return{x:e.x+e.width,y:e.y+e.height}}function Op(e,t){return!e||isNaN(e.x)||isNaN(e.y)?t:{x:wp(e.x+e.width/2),y:wp(e.y+e.height/2)}}function Pp(e,t){var n=e.snapped;return!!n&&("string"==typeof t?n[t]:n.x&&n.y)}function kp(e,t,n){if("string"!=typeof t)throw new Error("axis must be in [x, y]");if("number"!=typeof n&&!1!==n)throw new Error("value must be Number or false");var i,r=e[t],o=e.snapped=e.snapped||{};return!1===n?o[t]=!1:(o[t]=!0,i=n-r,e[t]+=i,e["d"+t]+=i),r}function Sp(e){return e.children||[]}var Cp=Math.abs,Tp=Math.round;function Ap(e){function t(e,t){if(h(e)){for(var n=e.length;n--;)if(Cp(e[n]-t)<=10)return e[n]}else{var i=t%(e=+e);if(i<10)return t-i;if(i>e-10)return t-i+e}return t}function n(e,t){return e.waypoints?Zc(t,e):e.width?{x:Tp(e.width/2+e.x),y:Tp(e.height/2+e.y)}:void 0}e.on("connectionSegment.move.move",1500,(function(e){var i,r,o=function(e){var t=e.context,i=t.snapPoints,r=t.connection,o=r.waypoints,s=t.segmentStart,a=t.segmentStartIndex,l=t.segmentEnd,c=t.segmentEndIndex,p=t.axis;if(i)return i;var u=[o[a-1],s,l,o[c+1]];return a<2&&u.unshift(n(r.source,e)),c>o.length-3&&u.unshift(n(r.target,e)),t.snapPoints=i={horizontal:[],vertical:[]},_(u,(function(e){e&&(e=e.original||e,"y"===p&&i.horizontal.push(e.y),"x"===p&&i.vertical.push(e.x))})),i}(e),s=e.x,a=e.y;if(o){var l=s-(i=t(o.vertical,s)),c=a-(r=t(o.horizontal,a));z(e,{dx:e.dx-l,dy:e.dy-c,x:i,y:r}),(l||-1!==o.vertical.indexOf(s))&&kp(e,"x",i),(c||-1!==o.horizontal.indexOf(a))&&kp(e,"y",r)}})),e.on(["connect.hover","connect.move","connect.end"],1500,(function(e){var t=e.context.hover,i=t&&n(t,e);yn(t)&&i&&i.x&&i.y&&(kp(e,"x",i.x),kp(e,"y",i.y))})),e.on(["bendpoint.move.move","bendpoint.move.end"],1500,(function(e){var i,r,o=e.context,s=function(e){var t=e.snapPoints,n=e.connection.waypoints,i=e.bendpointIndex;if(t)return t;var r=[n[i-1],n[i+1]];return e.snapPoints=t={horizontal:[],vertical:[]},_(r,(function(e){e&&(e=e.original||e,t.horizontal.push(e.y),t.vertical.push(e.x))})),t}(o),a=o.hover,l=a&&n(a,e),c=e.x,p=e.y;if(s){var u=c-(i=t(l?s.vertical.concat([l.x]):s.vertical,c)),d=p-(r=t(l?s.horizontal.concat([l.y]):s.horizontal,p));z(e,{dx:e.dx-u,dy:e.dy-d,x:e.x-u,y:e.y-d}),(u||-1!==s.vertical.indexOf(c))&&kp(e,"x",i),(d||-1!==s.horizontal.indexOf(p))&&kp(e,"y",r)}}))}Ap.$inject=["eventBus"];const Mp={__depends__:[Mc,jc],__init__:["bendpoints","bendpointSnapping","bendpointMovePreview"],bendpoints:["type",Jc],bendpointMove:["type",rp],bendpointMovePreview:["type",dp],connectionSegmentMove:["type",bp],bendpointSnapping:["type",Ap]};function Dp(e,t,n,i){function r(e,t){return i.allowed("connection.create",{source:e,target:t})}e.on("connect.hover",(function(e){var t,n=e.context,i=n.start,o=e.hover;if(n.hover=o,!d(t=n.canExecute=r(i,o))){if(!1!==t)return n.source=i,void(n.target=o);d(t=n.canExecute=r(o,i))||!1!==t&&(n.source=o,n.target=i)}})),e.on(["connect.out","connect.cleanup"],(function(e){var t=e.context;t.hover=null,t.source=null,t.target=null,t.canExecute=!1})),e.on("connect.end",(function(e){var t=e.context,i=t.canExecute,r=t.connectionStart,o={x:e.x,y:e.y},s=t.source,a=t.target;if(!i)return!1;var l=null,c={connectionStart:Rp(t)?o:r,connectionEnd:Rp(t)?r:o};f(i)&&(l=i),t.connection=n.connect(s,a,l,c)})),this.start=function(e,n,i,r){f(i)||(r=i,i=On(n)),t.init(e,"connect",{autoActivate:r,data:{shape:n,context:{start:n,connectionStart:i}}})}}function Rp(e){var t=e.hover,n=e.source,i=e.target;return t&&n&&t===n&&n!==i}Dp.$inject=["eventBus","dragging","modeling","rules"];var Np="connect-ok",$p="connect-not-ok";function jp(e,t,n){var i=e.get("connectionPreview",!1);i&&t.on("connect.move",(function(e){var t=e.context,n=t.canExecute,r=t.hover,o=t.source,s=t.start,a=t.startPosition,l=t.target,c=t.connectionStart||a,p=t.connectionEnd||{x:e.x,y:e.y},u=c,d=p;Rp(t)&&(u=p,d=c),i.drawPreview(t,n,{source:o||s,target:l||r,connectionStart:u,connectionEnd:d})})),t.on("connect.hover",900,(function(e){var t=e.context,i=e.hover,r=t.canExecute;null!==r&&n.addMarker(i,r?Np:$p)})),t.on(["connect.out","connect.cleanup"],1100,(function(e){var t=e.hover;t&&(n.removeMarker(t,Np),n.removeMarker(t,$p))})),i&&t.on("connect.cleanup",(function(e){i.cleanUp(e.context)}))}jp.$inject=["injector","eventBus","canvas"];const Ip={__depends__:[is,jc,Mc],__init__:["connectPreview"],connect:["type",Dp],connectPreview:["type",jp]};function Lp(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)}Lp.$inject=["injector","canvas","graphicsFactory","elementFactory"],Lp.prototype.drawPreview=function(e,t,n){n=n||{};var i,r=e.connectionPreviewGfx,o=e.getConnection,s=n.source,a=n.target,l=n.waypoints,c=n.connectionStart,p=n.connectionEnd,u=n.noLayout,d=n.noCropping,h=n.noNoop,f=this;r||(r=e.connectionPreviewGfx=this.createConnectionPreviewGfx()),Re(r),o||(o=e.getConnection=function(e){var t={};return function(n){var i=JSON.stringify(n),r=t[i];return r||(r=t[i]=e.apply(null,arguments)),r}}((function(e,t,n){return f.getConnection(e,t,n)}))),t&&(i=o(t,s,a)),i?(i.waypoints=l||[],this._layouter&&!u&&(i.waypoints=this._layouter.layoutConnection(i,{source:s,target:a,connectionStart:c,connectionEnd:p,waypoints:n.waypoints||i.waypoints})),i.waypoints&&i.waypoints.length||(i.waypoints=[s?On(s):c,a?On(a):p]),this._connectionDocking&&(s||a)&&!d&&(i.waypoints=this._connectionDocking.getCroppedWaypoints(i,s,a)),this._graphicsFactory.drawConnection(r,i,{stroke:"var(--element-dragger-color)"})):!h&&this.drawNoopPreview(r,n)},Lp.prototype.drawNoopPreview=function(e,t){var n=t.source,i=t.target,r=t.connectionStart||On(n),o=t.connectionEnd||On(i),s=this.cropWaypoints(r,o,n,i);ke(e,this.createNoopConnection(s[0],s[1]))},Lp.prototype.cropWaypoints=function(e,t,n,i){var r=this._graphicsFactory,o=n&&r.getShapePath(n),s=i&&r.getShapePath(i),a=r.getConnectionPath({waypoints:[e,t]});return[e=n&&kn(o,a,!0)||e,t=i&&kn(s,a,!1)||t]},Lp.prototype.cleanUp=function(e){e&&e.connectionPreviewGfx&&Ke(e.connectionPreviewGfx)},Lp.prototype.getConnection=function(e){var t=function(e){return f(e)?e:{}}(e);return this._elementFactory.createConnection(t)},Lp.prototype.createConnectionPreviewGfx=function(){var e=Le("g");return Te(e,{pointerEvents:"none"}),Me(e).add("djs-dragger"),ke(this._canvas.getActiveLayer(),e),e},Lp.prototype.createNoopConnection=function(e,t){return mt([e,t],{stroke:"#333",strokeDasharray:[1],strokeWidth:2,"pointer-events":"none"})};const Bp={__init__:["connectionPreview"],connectionPreview:["type",Lp]};var qp=["marker-start","marker-mid","marker-end"],zp=["circle","ellipse","line","path","polygon","polyline","path","rect"];function Fp(e,t,n,i){this._elementRegistry=e,this._canvas=n,this._styles=i,this._clonedMarkers={};var r=this;t.on("drag.cleanup",(function(){r.cleanUp()}))}Fp.$inject=["elementRegistry","eventBus","canvas","styles"],Fp.prototype.cleanUp=function(){_(this._clonedMarkers,(function(e){Ke(e)})),this._clonedMarkers={}},Fp.prototype.getGfx=function(e){return this._elementRegistry.getGraphics(e)},Fp.prototype.addDragger=function(e,t,n,i="djs-dragger"){var r=Ne(n=n||this.getGfx(e)),o=n.getBoundingClientRect();return this._cloneMarkers(ti(r),i),Te(r,this._styles.cls(i,[],{x:o.top,y:o.left})),ke(t,r),Te(r,"data-preview-support-element-id",e.id),r},Fp.prototype.addFrame=function(e,t){var n=Le("rect",{class:"djs-resize-overlay",width:e.width,height:e.height,x:e.x,y:e.y});return ke(t,n),Te(n,"data-preview-support-element-id",e.id),n},Fp.prototype._cloneMarkers=function(e,t="djs-dragger"){var n=this;if(e.childNodes)for(var i=0;i!function(e){return e.hidden}(e))).forEach((e=>{let t;yn(e)?(t=this._graphicsFactory._createContainer("connection",Le("g")),this._graphicsFactory.drawConnection(ti(t),e)):(t=this._graphicsFactory._createContainer("shape",Le("g")),this._graphicsFactory.drawShape(ti(t),e),ii(t,e.x,e.y)),this._previewSupport.addDragger(e,o,t)})),n.forEach((({element:e,delta:t})=>{this._previewSupport.addDragger(e,o,void 0,"djs-dragging"),this._canvas.addMarker(e,"djs-element-hidden"),this._markers.push([e,"djs-element-hidden"]);const n=this._previewSupport.addDragger(e,o);yn(e)?ii(n,t.x,t.y):ii(n,e.x+t.x,e.y+t.y)})),i.forEach((e=>{this._previewSupport.addDragger(e,o,void 0,"djs-dragging"),this._canvas.addMarker(e,"djs-element-hidden"),this._markers.push([e,"djs-element-hidden"])})),r.forEach((({shape:e,bounds:t})=>{this._canvas.addMarker(e,"djs-hidden"),this._markers.push([e,"djs-hidden"]),this._previewSupport.addDragger(e,o,void 0,"djs-dragging");const n=this._graphicsFactory._createContainer("shape",Le("g"));this._graphicsFactory.drawShape(ti(n),e,{width:t.width,height:t.height}),ii(n,t.x,t.y),this._previewSupport.addDragger(e,o,n)}))}cleanUp(){Re(this._canvas.getLayer(Hp)),this._markers.forEach((([e,t])=>this._canvas.removeMarker(e,t))),this._markers=[],this._previewSupport.cleanUp()}show(){this._canvas.showLayer(Hp)}hide(){this._canvas.hideLayer(Hp)}}Up.$inject=["canvas","graphicsFactory","previewSupport"];const Wp={__depends__:[Vp],__init__:["complexPreview"],complexPreview:["type",Up]};var Gp=["top","bottom","left","right"],Qp=10;function Xp(e,t){function n(e){if(to(e)){var n=function(e){var t=On(e.label),n=On(e),i=Kp(n,t);if(r=i,-1===Gp.indexOf(r))return;var r;var o=function(e){var t=On(e),n=[].concat(e.incoming.map((function(e){return e.waypoints[e.waypoints.length-2]})),e.outgoing.map((function(e){return e.waypoints[1]}))).map((function(e){return Kp(t,e)}));return n}(e);if(e.host){var s=function(e){var t,n=e.host,i=On(e),r=Pn(i,n);t=r.indexOf("-")>=0?r.split("-"):[r];var o=Gp.filter((function(e){return-1===t.indexOf(e)}));return o}(e);o=o.concat(s)}var a=Gp.filter((function(e){return-1===o.indexOf(e)}));if(-1!==a.indexOf(i))return;return a[0]}(e);n&&function(e,n){var i=On(e),r=e.label,o=On(r);if(!r.parent)return;var s,a=wn(e);switch(n){case"top":s={x:i.x,y:a.top-Qp-r.height/2};break;case"left":s={x:a.left-Qp-r.width/2,y:i.y};break;case"bottom":s={x:i.x,y:a.bottom+Qp+r.height/2};break;case"right":s={x:a.right+Qp+r.width/2,y:i.y}}var l=ia(s,o);t.moveShape(r,l)}(e,n)}}hs.call(this,e),this.postExecuted(["connection.create","connection.layout","connection.updateWaypoints"],(function(e){var t=e.context,i=t.connection,r=i.source,o=i.target;!1!==(t.hints||{}).createElementsBehavior&&(n(r),n(o))})),this.postExecuted(["label.create"],(function(e){var t=e.context,i=t.shape;!1!==(t.hints||{}).createElementsBehavior&&n(i.labelTarget)})),this.postExecuted(["elements.create"],(function(e){var t=e.context,i=t.elements;!1!==(t.hints||{}).createElementsBehavior&&i.forEach((function(e){n(e)}))}))}function Kp(e,t){return Pn(t,e,5)}function Yp(e){hs.call(this,e),this.preExecute("shape.append",(function(e){var t=e.source,n=e.shape;e.position||(Tr(n,"bpmn:TextAnnotation")?e.position={x:t.x+t.width/2+75,y:t.y-50-n.height/2}:e.position={x:t.x+t.width+80+n.width/2,y:t.y+t.height/2})}),!0)}function Zp(e,t){e.invoke(hs,this),this.postExecute("shape.move",(function(e){var n=e.newParent,i=e.shape;_(w(i.incoming.concat(i.outgoing),(function(e){return Tr(e,"bpmn:Association")})),(function(e){t.moveConnection(e,{x:0,y:0},n)}))}),!0)}i(Xp,hs),Xp.$inject=["eventBus","modeling"],i(Yp,hs),Yp.$inject=["eventBus"],i(Zp,hs),Zp.$inject=["injector","modeling"];function Jp(e,t){t.invoke(hs,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",500,(function(e){var t=e.elements;1===(t=t.filter((function(e){return eu(e,e.host)}))).length&&t.map((function(e){return t.indexOf(e)})).forEach((function(i){var r=t[i];e.elements[i]=n._replaceShape(t[i],r)}))}),!0),this.preExecute("elements.move",500,(function(e){var t=e.shapes,i=e.newHost;if(1===t.length){var r=t[0];eu(r,i)&&(e.shapes=[n._replaceShape(r,i)])}}),!0)}function eu(e,t){return!vn(e)&&Ar(e,["bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"])&&!!t}function tu(e,t){function n(e){return w(e.attachers,(function(e){return Tr(e,"bpmn:BoundaryEvent")}))}hs.call(this,e),this.postExecute("connection.create",(function(e){var i=e.context.source,r=e.context.target,o=n(r);Tr(i,"bpmn:EventBasedGateway")&&Tr(r,"bpmn:ReceiveTask")&&o.length>0&&t.removeElements(o)})),this.postExecute("connection.reconnect",(function(e){var i=e.context.oldSource,r=e.context.newSource;Tr(i,"bpmn:Gateway")&&Tr(r,"bpmn:EventBasedGateway")&&_(r.outgoing,(function(e){var i=e.target,r=n(i);Tr(i,"bpmn:ReceiveTask")&&r.length>0&&t.removeElements(r)}))}))}function nu(e,t,n){function i(e){t.updateProperties(e,{isForCompensation:!0})}function r(e){t.updateProperties(e,{isForCompensation:void 0})}hs.call(this,e),this.preExecute("shape.replace",(function(e){const{newData:n,oldShape:i}=e;if(ru(e.oldShape)&&"bpmn:CompensateEventDefinition"!==n.eventDefinitionType||"bpmn:BoundaryEvent"!==n.type){const t=i.outgoing.find((({target:e})=>iu(e)));t&&t.target&&(e._connectionTarget=t.target)}else if(!ru(e.oldShape)&&"bpmn:CompensateEventDefinition"===n.eventDefinitionType&&"bpmn:BoundaryEvent"===n.type){const n=i.outgoing.find((({target:e})=>ou(e)));n&&n.target&&(e._connectionTarget=n.target),function(e){const n=e.outgoing.filter((e=>Tr(e,"bpmn:SequenceFlow")));t.removeElements(n)}(i)}}),!0),this.postExecuted("shape.replace",(function(e){const{_connectionTarget:n,newShape:i}=e;n&&t.connect(i,n)}),!0),this.preExecute("connection.create",(function(e){const n=e.connection,r=e.source,o=e.target;ru(r)&&ou(o)&&(i(o),function(e,n){const i=e.outgoing.filter((e=>Tr(e,"bpmn:Association"))),r=i.filter((e=>iu(e.target)&&!n.includes(e)));r.forEach((e=>t.removeConnection(e)))}(r,[n]))}),!0),this.postExecuted("connection.delete",(function(e){const t=e.source,n=e.target;ru(t)&&iu(n)&&r(n)}),!0),this.postExecuted("connection.reconnect",(function(e){const t=e.newTarget,n=e.oldSource,o=e.oldTarget;if(o!==t){const e=n;iu(o)&&r(o),ru(e)&&ou(t)&&i(t)}}),!0),this.postExecuted("element.updateProperties",(function(e){const{element:i}=e;iu(i)?(function(e){for(const i of e.incoming)n.canConnect(i.source,e)||t.removeConnection(i);for(const i of e.outgoing)n.canConnect(e,i.target)||t.removeConnection(i)}(i),function(e){const n=e.attachers.slice();if(!n.length)return;t.removeElements(n)}(i)):ou(i)&&function(e){const n=e.incoming.filter((e=>ru(e.source)));t.removeElements(n)}(i)}),!0)}function iu(e){const t=Mr(e);return t&&t.get("isForCompensation")}function ru(e){return e&&Tr(e,"bpmn:BoundaryEvent")&&Zr(e,"bpmn:CompensateEventDefinition")}function ou(e){return e&&Tr(e,"bpmn:Activity")&&!Yr(e)}function su(e,t){for(y(t)&&(t=[t]);e=e.parent;)if(Ar(e,t))return e;return null}function au(e){e.invoke(hs,this),this.preExecute("shape.create",1500,(function(e){var t=e.context,n=t.parent,i=t.shape;Tr(n,"bpmn:Lane")&&!Tr(i,"bpmn:Lane")&&(t.parent=su(n,"bpmn:Participant"))}))}function lu(e,t){hs.call(this,e),this.preExecute("shape.create",(function(e){var n=e.context.shape;if(Tr(n,"bpmn:DataObjectReference")&&"label"!==n.type){var i=t.create("bpmn:DataObject");n.businessObject.dataObjectRef=i}}))}Jp.$inject=["bpmnReplace","injector"],i(Jp,hs),Jp.prototype._replaceShape=function(e,t){var n,i=(n=Mr(e).eventDefinitions)&&n[0],r={type:"bpmn:BoundaryEvent",host:t};return i&&(r.eventDefinitionType=i.$type),this._bpmnReplace.replaceElement(e,r,{layoutConnection:!1})},tu.$inject=["eventBus","modeling"],i(tu,hs),i(nu,hs),nu.$inject=["eventBus","modeling","bpmnRules"],au.$inject=["injector"],i(au,hs),lu.$inject=["eventBus","bpmnFactory"],i(lu,hs);var cu=20,pu=20,uu=2e3;function du(e,t,n){function i(){var t=e.getRootElement();return Tr(t,"bpmn:Collaboration")?t:n.makeCollaboration()}hs.call(this,t),t.on(["create.start","shape.move.start"],uu,(function(t){var n=t.context,i=n.shape,r=e.getRootElement();if(Tr(i,"bpmn:Participant")&&Tr(r,"bpmn:Process")&&r.children.length){var o=r.children.filter((function(e){return!Tr(e,"bpmn:Group")&&!vn(e)&&!yn(e)}));if(o.length){var s=Et(o),a=function(e,t){t={width:t.width+40+30,height:t.height+40};var n=Math.max(e.width,t.width),i=Math.max(e.height,t.height);return{x:-n/2,y:-i/2,width:n,height:i}}(i,s);z(i,a),n.createConstraints=function(e,t){return t=wn(t),{bottom:t.top+e.height/2-pu,left:t.right-e.width/2+cu,top:t.bottom-e.height/2+pu,right:t.left+e.width/2-cu-30}}(i,s)}}})),t.on("create.start",uu,(function(n){var i=n.context.shape,r=e.getRootElement(),o=e.getGraphics(r);function s(e){e.element=r,e.gfx=o}Tr(i,"bpmn:Participant")&&Tr(r,"bpmn:Process")&&(t.on("element.hover",uu,s),t.once("create.cleanup",(function(){t.off("element.hover",s)})))})),this.preExecute("elements.create",uu,(function(e){var t,n=e.elements,r=e.parent,o=function(e){return b(e,(function(e){return Tr(e,"bpmn:Participant")}))}(n);o&&Tr(r,"bpmn:Process")&&(e.parent=i(),(t=e.hints=e.hints||{}).participant=o,t.process=r,t.processRef=Mr(o).get("processRef"))}),!0),this.preExecute("shape.create",(function(e){var t=e.parent,n=e.shape;Tr(n,"bpmn:Participant")&&Tr(t,"bpmn:Process")&&(e.parent=i(),e.process=t,e.processRef=Mr(n).get("processRef"))}),!0),this.execute("shape.create",(function(e){var t=e.hints||{},n=e.process||t.process,i=e.shape,r=t.participant;!n||r&&i!==r||Mr(i).set("processRef",Mr(n))}),!0),this.revert("shape.create",(function(e){var t=e.hints||{},n=e.process||t.process,i=e.processRef||t.processRef,r=e.shape,o=t.participant;!n||o&&r!==o||Mr(r).set("processRef",i)}),!0),this.postExecute("shape.create",(function(e){var t=e.hints||{},i=e.process||e.hints.process,r=e.shape,o=t.participant;if(i){var s=i.children.slice();o?r===o&&n.moveElements(s,{x:0,y:0},o):n.moveElements(s,{x:0,y:0},r)}}),!0)}du.$inject=["canvas","eventBus","modeling"],i(du,hs);var hu="__targetRef_placeholder";function fu(e,t){function n(e,n){var i=e.get("properties"),r=b(i,(function(e){return e.name===hu}));return!r&&n&&At(i,r=t.create("bpmn:Property",{name:hu})),r}function i(e,t){var i=n(e);i&&(function(e,t,n){return b(e.get("dataInputAssociations"),(function(e){return e!==n&&e.targetRef===t}))}(e,i,t)||Tt(e.get("properties"),i))}function r(e){var t,r=e.context,o=r.connection,s=o.businessObject,a=o.target,l=a&&a.businessObject,c=r.newTarget,p=c&&c.businessObject,u=r.oldTarget||r.target,d=u&&u.businessObject,h=o.businessObject;d&&d!==l&&i(d,s),p&&p!==l&&i(p,s),l?(t=n(l,!0),h.targetRef=t):h.targetRef=null}hs.call(this,e),this.executed(["connection.create","connection.delete","connection.move","connection.reconnect"],mu(r)),this.reverted(["connection.create","connection.delete","connection.move","connection.reconnect"],mu(r))}function mu(e){return function(t){if(Tr(t.context.connection,"bpmn:DataInputAssociation"))return e(t)}}function gu(e){this._bpmnUpdater=e}function yu(e,t,n,i){function r(e){return e.children.filter((function(e){return Tr(e,"bpmn:DataStoreReference")&&!e.labelTarget}))}function o(e,i){var r=e.businessObject||e;if(i=i||n.filter((function(e){return Tr(e,"bpmn:Participant")&&Mr(e).processRef}))[0]){var o=i.businessObject||i;t.execute("dataStore.updateContainment",{dataStoreBo:r,dataStoreDi:Dr(e),newSemanticParent:o.processRef||o,newDiParent:Dr(i)})}}hs.call(this,i),t.registerHandler("dataStore.updateContainment",gu),this.preExecute("shape.create",(function(e){var t=e.context,n=t.shape;Tr(n,"bpmn:DataStoreReference")&&"label"!==n.type&&(t.hints||(t.hints={}),t.hints.autoResize=!1)})),this.preExecute("elements.move",(function(e){var t=e.context,n=t.shapes;n.filter((function(e){return Tr(e,"bpmn:DataStoreReference")})).length&&(t.hints||(t.hints={}),t.hints.autoResize=n.filter((function(e){return!Tr(e,"bpmn:DataStoreReference")})))})),this.postExecute("shape.create",(function(e){var t=e.context.shape,n=t.parent;Tr(t,"bpmn:DataStoreReference")&&"label"!==t.type&&Tr(n,"bpmn:Collaboration")&&o(t)})),this.postExecute("shape.move",(function(e){var t=e.context,n=t.shape,i=t.oldParent,r=n.parent;Tr(i,"bpmn:Collaboration")||Tr(n,"bpmn:DataStoreReference")&&"label"!==n.type&&Tr(r,"bpmn:Collaboration")&&o(n,Tr(i,"bpmn:Participant")?i:function(e,t){for(;e.parent;){if(Tr(e.parent,t))return e.parent;e=e.parent}}(i,"bpmn:Participant"))})),this.postExecute("shape.delete",(function(t){var n=t.context.shape,i=e.getRootElement();Ar(n,["bpmn:Participant","bpmn:SubProcess"])&&Tr(i,"bpmn:Collaboration")&&r(i).filter((function(e){return function(e,t){var n=e.businessObject||e,i=t.businessObject||t;for(;n.$parent;){if(n.$parent===i.processRef||i)return!0;n=n.$parent}return!1}(e,n)})).forEach((function(e){o(e)}))})),this.postExecute("canvas.updateRoot",(function(e){var t=e.context,n=t.oldRoot,i=t.newRoot;r(n).forEach((function(e){Tr(i,"bpmn:Process")&&o(e,i)}))}))}fu.$inject=["eventBus","bpmnFactory"],i(fu,hs),gu.$inject=["bpmnUpdater"],gu.prototype.execute=function(e){var t=e.dataStoreBo,n=e.dataStoreDi,i=e.newSemanticParent,r=e.newDiParent;return e.oldSemanticParent=t.$parent,e.oldDiParent=n.$parent,this._bpmnUpdater.updateSemanticParent(t,i),this._bpmnUpdater.updateDiParent(n,r),[]},gu.prototype.revert=function(e){var t=e.dataStoreBo,n=e.dataStoreDi,i=e.oldSemanticParent,r=e.oldDiParent;return this._bpmnUpdater.updateSemanticParent(t,i),this._bpmnUpdater.updateDiParent(n,r),[]},yu.$inject=["canvas","commandStack","elementRegistry","eventBus"],i(yu,hs);var vu=Math.max,bu=Math.min;function xu(e,t){return{top:e.top-t.top,right:e.right-t.right,bottom:e.bottom-t.bottom,left:e.left-t.left}}function wu(e,t){return{x:e.x+(t.left||0),y:e.y+(t.top||0),width:e.width-(t.left||0)+(t.right||0),height:e.height-(t.top||0)+(t.bottom||0)}}function _u(e,t,n){var i=t[e],r=n.min&&n.min[e],o=n.max&&n.max[e];return m(r)&&(i=(/top|left/.test(e)?bu:vu)(i,r)),m(o)&&(i=(/top|left/.test(e)?vu:bu)(i,o)),i}function Eu(e,t){return void 0!==e?e:20}function Ou(e){return!e.waypoints&&"label"!==e.type}function Pu(e,t){var n;if((n=void 0===e.length?w(e.children,Ou):e).length)return function(e,t){var n,i,r,o;return"object"==typeof t?(n=Eu(t.left),i=Eu(t.right),r=Eu(t.top),o=Eu(t.bottom)):n=i=r=o=Eu(t),{x:e.x-n,y:e.y-r,width:e.width+n+i,height:e.height+r+o}}(Et(n),t)}var ku=Math.abs;var Su=["bpmn:Participant","bpmn:Process","bpmn:SubProcess"],Cu=30;function Tu(e,t){return t=t||[],e.children.filter((function(e){Tr(e,"bpmn:Lane")&&(Tu(e,t),t.push(e))})),t}function Au(e){return e.children.filter((function(e){return Tr(e,"bpmn:Lane")}))}function Mu(e){return su(e,Su)||e}function Du(e,t){var n=Mu(e),i=Tu(n,Tr(n,"bpmn:Process")?[]:[n]),r=wn(e),o=wn(t),s=function(e,t){return xu(wn(t),wn(e))}(e,t),a=[],l=Kr(e);return i.forEach((function(t){if(t!==e){var n=l?0:s.top,i=l?s.right:0,c=l?0:s.bottom,p=l?s.left:0,u=wn(t);s.top&&(ku(u.bottom-r.top)<10&&(c=o.top-u.bottom),ku(u.top-r.top)<5&&(n=o.top-u.top)),s.left&&(ku(u.right-r.left)<10&&(i=o.left-u.right),ku(u.left-r.left)<5&&(p=o.left-u.left)),s.bottom&&(ku(u.top-r.bottom)<10&&(n=o.bottom-u.top),ku(u.bottom-r.bottom)<5&&(c=o.bottom-u.bottom)),s.right&&(ku(u.left-r.right)<10&&(p=o.right-u.left),ku(u.right-r.right)<5&&(i=o.right-u.right)),(n||i||c||p)&&a.push({shape:t,newBounds:wu(t,{top:n,right:i,bottom:c,left:p})})}})),a}function Ru(e,t){hs.call(this,e),this.postExecuted("shape.delete",500,(function(e){var n=e.context,i=n.hints,r=n.shape,o=n.oldParent;Tr(r,"bpmn:Lane")&&(i&&i.nested||function(e,n){var i,r,o,s,a,l=Kr(e),c=Au(n),p=[],u=[],d=[],h=[];xt(c,(function(t){return l?t.y>e.y?u.push(t):p.push(t):t.x>e.x?h.push(t):d.push(t),t.children})),c.length&&(i=l?u.length&&p.length?e.height/2:e.height:h.length&&d.length?e.width/2:e.width,p.length&&(r=t.calculateAdjustments(p,"y",i,e.y-10),t.makeSpace(r.movingShapes,r.resizingShapes,{x:0,y:i},"s")),u.length&&(o=t.calculateAdjustments(u,"y",-i,e.y+e.height+10),t.makeSpace(o.movingShapes,o.resizingShapes,{x:0,y:-i},"n")),d.length&&(s=t.calculateAdjustments(d,"x",i,e.x-10),t.makeSpace(s.movingShapes,s.resizingShapes,{x:i,y:0},"e")),h.length&&(a=t.calculateAdjustments(h,"x",-i,e.x+e.width+10),t.makeSpace(a.movingShapes,a.resizingShapes,{x:-i,y:0},"w")))}(r,o))}))}Ru.$inject=["eventBus","spaceTool"],i(Ru,hs);function Nu(e,t){t.invoke(hs,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",500,(function(e){var t=e.elements;t.filter((function(e){return $u(e,e.host)})).map((function(e){return t.indexOf(e)})).forEach((function(i){e.elements[i]=n._replaceShape(t[i])}))}),!0),this.preExecute("elements.move",500,(function(e){var t=e.shapes,i=e.newHost;t.forEach((function(e,r){var o,s=e.host;$u(e,(o=s,-1!==t.indexOf(o)?s:i))&&(t[r]=n._replaceShape(e))}))}),!0)}function $u(e,t){return!vn(e)&&Tr(e,"bpmn:BoundaryEvent")&&!t}function ju(e,t,n){function i(e,i,r){var o,s,a,l,c,p,u,d,h=i.waypoints,f=e.outgoing.slice(),g=e.incoming.slice(),y=Bc(h,d=m(r.width)?On(r):r);if(y){if(o=h.slice(0,y.index),s=h.slice(y.index+(y.bendpoint?1:0)),!o.length||!s.length)return;a=y.bendpoint?h[y.index]:d,1!==o.length&&Iu(e,o[o.length-1])||o.push(Lu(a)),1!==s.length&&Iu(e,s[0])||s.unshift(Lu(a))}l=i.source,c=i.target,t.canConnect(l,e,i)&&(n.reconnectEnd(i,e,o||d),p=i),t.canConnect(e,c,i)&&(p?u=n.connect(e,c,{type:i.type,waypoints:s}):(n.reconnectStart(i,e,s||d),u=i));var v=[].concat(p&&w(g,(function(e){return e.source===p.source}))||[],u&&w(f,(function(e){return e.target===u.target}))||[]);v.length&&n.removeElements(v)}hs.call(this,e),this.preExecute("elements.move",(function(e){var n=e.newParent,i=e.shapes,r=e.delta,o=i[0];if(o&&n){n&&n.waypoints&&(e.newParent=n=n.parent);var s=On(o),a={x:s.x+r.x,y:s.y+r.y},l=b(n.children,(function(e){return t.canInsert(i,e)&&Bc(e.waypoints,a)}));l&&(e.targetFlow=l,e.position=a)}}),!0),this.postExecuted("elements.move",(function(e){var t=e.shapes,n=e.targetFlow,r=e.position;n&&i(t[0],n,r)}),!0),this.preExecute("shape.create",(function(e){var n=e.parent,i=e.shape;t.canInsert(i,n)&&(e.targetFlow=n,e.parent=n.parent)}),!0),this.postExecuted("shape.create",(function(e){var t=e.shape,n=e.targetFlow,r=e.position;n&&i(t,n,r)}),!0)}function Iu(e,t){var n=t.x,i=t.y;return n>=e.x&&n<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}function Lu(e){return z({},e)}function Bu(e,t){hs.call(this,e),this.preExecuted("connection.create",(function(e){var n=e.context,i=n.connection,r=n.source,o=n.target,s=n.hints;if((!s||!1!==s.createElementsBehavior)&&qu(i)){(Tr(r,"bpmn:EventBasedGateway")?o.incoming.filter((e=>e!==i&&qu(e))):o.incoming.filter((e=>e!==i&&qu(e)&&Tr(e.source,"bpmn:EventBasedGateway")))).forEach((function(e){t.removeConnection(e)}))}})),this.preExecuted("shape.replace",(function(e){var n=e.context.newShape;Tr(n,"bpmn:EventBasedGateway")&&n.outgoing.filter(qu).reduce((function(e,t){return e.includes(t.target)?e:e.concat(t.target)}),[]).forEach((function(e){e.incoming.filter(qu).forEach((function(i){const r=e.incoming.filter(qu).filter((function(e){return e.source===n}));(i.source!==n||r.length>1)&&t.removeConnection(i)}))}))}))}function qu(e){return Tr(e,"bpmn:SequenceFlow")}Nu.$inject=["bpmnReplace","injector"],i(Nu,hs),Nu.prototype._replaceShape=function(e){var t,n,i=(n=Mr(e).eventDefinitions)&&n[0];return t=i?{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:i.$type}:{type:"bpmn:IntermediateThrowEvent"},this._bpmnReplace.replaceElement(e,t,{layoutConnection:!1})},i(ju,hs),ju.$inject=["eventBus","bpmnRules","modeling"],Bu.$inject=["eventBus","modeling"],i(Bu,hs);var zu=1500;function Fu(e,t,n){t.on(["create.hover","create.move","create.out","create.end","shape.move.hover","shape.move.move","shape.move.out","shape.move.end"],zu,(function(t){var i=t.context.shape||t.shape,r=t.hover;Tr(r,"bpmn:Lane")&&!Ar(i,["bpmn:Lane","bpmn:Participant"])&&(t.hover=Mu(r),t.hoverGfx=e.getGraphics(t.hover));var o=n.getRootElement();r!==o&&(i.labelTarget||Ar(i,["bpmn:Group","bpmn:TextAnnotation"]))&&(t.hover=o,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["connect.hover","connect.out","connect.end","connect.cleanup","global-connect.hover","global-connect.out","global-connect.end","global-connect.cleanup"],zu,(function(t){var n=t.hover;Tr(n,"bpmn:Lane")&&(t.hover=Mu(n)||n,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["bendpoint.move.hover"],zu,(function(t){var n=t.context,i=t.hover,r=n.type;Tr(i,"bpmn:Lane")&&/reconnect/.test(r)&&(t.hover=Mu(i)||i,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["connect.start"],zu,(function(e){var t=e.context,n=t.start;Tr(n,"bpmn:Lane")&&(t.start=Mu(n)||n)})),t.on("shape.move.start",2e3,(function(e){var t=e.shape;Tr(t,"bpmn:Lane")&&(e.shape=Mu(t)||t)})),t.on("spaceTool.move",2e3,(function(e){var t=e.hover;t&&Tr(t,"bpmn:Lane")&&(e.hover=Mu(t))}))}Fu.$inject=["elementRegistry","eventBus","canvas"];function Vu(e,t,n,i,r,o){function s(e,t,i){var r=n.filter((function(e){return Tr(e,"bpmn:Group")})).filter((function(e){return e.businessObject!==i}));t&&!function(e,t){return e.some((function(e){var n=Mr(e);return(n.categoryValueRef&&n.categoryValueRef.$parent)===t}))}(r,t)&&function(e){var t=e.$parent;t&&(Tt(t.get("rootElements"),e),e.$parent=null)}(t),e&&!function(e,t){return e.some((function(e){return Mr(e).categoryValueRef===t}))}(r,e)&&function(e){var t=e.$parent;t&&(Tt(t.get("categoryValue"),e),e.$parent=null)}(e)}function a(e,n){return function(e,t,n){return At(t.get("categoryValue"),e),e.$parent=t,At(n.get("rootElements"),t),t.$parent=n,e}(e,n,t.getDefinitions())}function l(n,i){var r=Mr(n),o=r.categoryValueRef;o||(o=r.categoryValueRef=i.categoryValue=i.categoryValue||function(e){return e.create("bpmn:CategoryValue")}(e));var s=o.$parent;s||(s=o.$parent=i.category=i.category||function(e){return e.create("bpmn:Category")}(e)),a(o,s,t.getDefinitions())}function c(e,t){var n=t.category,i=t.categoryValue,r=Mr(e);i?(r.categoryValueRef=null,s(i,n,r)):s(null,r.categoryValueRef.$parent,r)}function p(t,n){var i=e.create(t.$type);return o.copyElement(t,i,null,n)}r.invoke(hs,this),this.execute("label.create",(function(e){var t=e.context,n=t.labelTarget;Tr(n,"bpmn:Group")&&l(n,t)})),this.revert("label.create",(function(e){var t=e.context,n=t.labelTarget;Tr(n,"bpmn:Group")&&c(n,t)})),this.execute("shape.delete",(function(e){var t=e.context,n=t.shape,i=Mr(n);if(Tr(n,"bpmn:Group")&&!n.labelTarget){var r=t.categoryValue=i.categoryValueRef;r&&(s(r,t.category=r.$parent,i),i.categoryValueRef=null)}})),this.reverted("shape.delete",(function(e){var t=e.context,n=t.shape;if(Tr(n,"bpmn:Group")&&!n.labelTarget){var i=t.category,r=t.categoryValue,o=Mr(n);r&&(o.categoryValueRef=r,a(r,i))}})),this.execute("shape.create",(function(e){var t=e.context,n=t.shape;Tr(n,"bpmn:Group")&&!n.labelTarget&&Mr(n).categoryValueRef&&l(n,t)})),this.reverted("shape.create",(function(e){var t=e.context,n=t.shape;Tr(n,"bpmn:Group")&&!n.labelTarget&&Mr(n).categoryValueRef&&c(n,t)})),i.on("copyPaste.copyElement",770,(function(e){var t=e.descriptor,n=e.element;if(Tr(n,"bpmn:Group")&&!n.labelTarget){var i=Mr(n);if(i.categoryValueRef){var r=i.categoryValueRef;t.categoryValue=p(r,!0),r.$parent&&(t.category=p(r.$parent,!0))}}})),i.on("copyPaste.pasteElement",770,(function(e){var t=e.descriptor,n=t.businessObject,i=t.categoryValue,r=t.category;i&&(i=n.categoryValueRef=p(i)),r&&(i.$parent=p(r)),delete t.category,delete t.categoryValue}))}function Hu(e,t,n,i){var r,o,s,a;return 0==(r=(i.y-n.y)*(t.x-e.x)-(i.x-n.x)*(t.y-e.y))?null:(o=e.y-n.y,s=e.x-n.x,a=((i.x-n.x)*o-(i.y-n.y)*s)/r,{x:Math.round(e.x+a*(t.x-e.x)),y:Math.round(e.y+a*(t.y-e.y))})}function Uu(e){function t(e,t,n){var i,r={x:n.x,y:n.y-50},o={x:n.x-50,y:n.y},s=Hu(e,t,n,r),a=Hu(e,t,n,o);i=s&&a?Wu(s,n)>Wu(a,n)?a:s:s||a,e.original=i}e.on("bpmnElement.added",(function(e){var n,i,r=e.element;r.waypoints&&(t((i=(n=r).waypoints)[0],i[1],On(n.source)),t(i[i.length-1],i[i.length-2],On(n.target)))}))}function Wu(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Gu(e){hs.call(this,e);var t=["bpmn:Participant","bpmn:Lane"];this.executed(["shape.move","shape.create","shape.resize"],(function(e){var n=e.context.shape,i=Mr(n),r=Dr(n);if(Ar(i,t)){var o=r.get("isHorizontal");void 0===o&&(o=!0),r.set("isHorizontal",o)}}))}Vu.$inject=["bpmnFactory","bpmnjs","elementRegistry","eventBus","injector","moddleCopy"],i(Vu,hs),Uu.$inject=["eventBus"],Gu.$inject=["eventBus"],i(Gu,hs);var Qu=Math.sqrt,Xu=Math.min,Ku=Math.max,Yu=Math.abs;function Zu(e){return Math.pow(e,2)}function Ju(e,t){return Qu(Zu(e.x-t.x)+Zu(e.y-t.y))}function ed(e,t,n,i){var r=t.x-e.x,o=t.y-e.y,s=n.x-e.x,a=n.y-e.y,l=r*r+o*o,c=(r*s+o*a)/l,p=c*c-(s*s+a*a-i*i)/l;if(p<0&&p>-1e-6&&(p=0),p<0)return[];var u=Qu(p),d=-c+u,h=-c-u,f={x:e.x-r*d,y:e.y-o*d};return 0===p?[f]:[f,{x:e.x-r*h,y:e.y-o*h}].filter((function(n){return function(e,t,n){return td(e.x,t.x,n.x)&&td(e.y,t.y,n.y)}(n,e,t)}))}function td(e,t,n){return e>=Xu(t,n)-nd&&e<=Ku(t,n)+nd}var nd=.1;function id(e,t){return Yu(e.x-t.x)<=nd&&Yu(e.y-t.y)<=nd}function rd(e,t,n,i){var r=0,o=0,s={point:e,delta:{x:0,y:0}},a=function(e,t){var n,i,r,o,s,a,l,c,p,u,d,h,f=0;for(f=0;f line intersections");1===a.length&&(l={type:"bendpoint",position:a[0],segmentIndex:f,bendpointIndex:id(n,a[0])?f:f+1}),2===a.length&&(d=a[0],h=a[1],l={type:"segment",position:s={x:(d.x+h.x)/2,y:(d.y+h.y)/2},segmentIndex:f,relativeLocation:Ju(n,s)/Ju(n,i)}),c=Ju(l.position,e),(!u||p>c)&&(u=l,p=c)}return u}(e,n),l=a.segmentIndex,c=function(e,t,n,i){var r=n.segmentIndex,o=t.length-e.length;if(i.segmentMove){var s=i.segmentMove.segmentStartIndex,a=i.segmentMove.newSegmentStartIndex;return r===s?a:r>=a?r+o=p&&(l=c?r+1:r-1),rt.length-2||null===c)return s;var p,u,d,h,f,m,g=sd(n,l),y=sd(t,c),v=a.position,b=(h=v,f=Hc((d=g)[0],d[1]),m=Hc(d[0],h),0===f?0:m/f),x=(p=y,u=zc(g),zc(p)-u);if("bendpoint"===a.type){var w=t.length-n.length,_=a.bendpointIndex,E=n[_];if(-1!==t.indexOf(E))return s;if(0===w){var O=t[_];return{delta:{x:r=O.x-a.position.x,y:o=O.y-a.position.y},point:{x:e.x+r,y:e.y+o}}}w<0&&0!==_&&_{Mr(e.context.element)===e.context.moddleElement&&r(e)})),this.postExecute(["shape.create","connection.create"],(function(e){var n=e.context;if(!1!==(n.hints||{}).createElementsBehavior){var i=n.shape||n.connection;!vn(i)&&eo(i)&&oo(i)&&t.updateLabel(i,oo(i))}})),this.postExecute("shape.delete",(function(e){var n=e.context,i=n.labelTarget,r=n.hints||{};i&&!1!==r.unsetLabel&&t.updateLabel(i,null,null,{removeShape:!1})})),this.postExecute(["connection.layout","connection.updateWaypoints"],(function(e){var n=e.context;if(!1!==(n.hints||{}).labelBehavior){var i,r=n.connection.label;r&&r.parent&&(i=o(e),t.moveShape(r,i))}})),this.postExecute(["shape.replace"],(function(e){var t=e.context,n=t.newShape,i=t.oldShape,r=Mr(n);r&&eo(r)&&i.label&&n.label&&(n.label.x=i.label.x,n.label.y=i.label.y)})),this.postExecute("shape.resize",(function(e){var n,i=e.context,r=i.shape,o=i.newBounds,s=i.oldBounds;if(to(r)){var a=r.label,l=function(e,t){if(!t.length)return;var n=function(e,t){var n=t.map((function(t){return{line:t,distance:Vc(e,t)}}));return R(n,"distance")[0].line}(e,t);return Fc(e,n)}(On(a),[[{x:(n=s).x,y:n.y},{x:n.x+(n.width||0),y:n.y}],[{x:n.x+(n.width||0),y:n.y},{x:n.x+(n.width||0),y:n.y+(n.height||0)}],[{x:n.x,y:n.y+(n.height||0)},{x:n.x+(n.width||0),y:n.y+(n.height||0)}],[{x:n.x,y:n.y},{x:n.x,y:n.y+(n.height||0)}]]),c=function(e,t,n){var i=ad(e,t,n);return xn(ia(i,e))}(l,s,o);t.moveShape(a,c)}}))}function dd(e,t){function n(e,t){var n=e.context,i=n.connection,r=z({},n.hints),o=n.newWaypoints||i.waypoints,s=n.oldWaypoints;return void 0===r.startChanged&&(r.startChanged=!!r.connectionStart),void 0===r.endChanged&&(r.endChanged=!!r.connectionEnd),function(e,t,n,i){return rd(e,t,n,i).point}(t,o,s,r)}hs.call(this,e),this.postExecute(["connection.layout","connection.updateWaypoints"],(function(e){var i=e.context.connection,r=i.outgoing;i.incoming.forEach((function(i){var r=i.waypoints[i.waypoints.length-1],o=n(e,r),s=[].concat(i.waypoints.slice(0,-1),[o]);t.updateWaypoints(i,s)})),r.forEach((function(i){var r=i.waypoints[0],o=n(e,r),s=[].concat([o],i.waypoints.slice(1));t.updateWaypoints(i,s)}))})),this.postExecute(["connection.move"],(function(e){var n=e.context,i=n.connection,r=i.outgoing,o=i.incoming,s=n.delta;o.forEach((function(e){var n=e.waypoints[e.waypoints.length-1],i={x:n.x+s.x,y:n.y+s.y},r=[].concat(e.waypoints.slice(0,-1),[i]);t.updateWaypoints(e,r)})),r.forEach((function(e){var n=e.waypoints[0],i={x:n.x+s.x,y:n.y+s.y},r=[].concat([i],e.waypoints.slice(1));t.updateWaypoints(e,r)}))}))}function hd(e,t,n){var i=vd(e),r=bd(i,t),o=i[0];return r.length?r[r.length-1]:ad(o.original||o,n,t)}function fd(e,t,n){var i=vd(e),r=bd(i,t),o=i[i.length-1];return r.length?r[0]:ad(o.original||o,n,t)}function md(e,t,n){var i=vd(e),r=yd(t,n),o=i[0];return ad(o.original||o,r,t)}function gd(e,t,n){var i=vd(e),r=yd(t,n),o=i[i.length-1];return ad(o.original||o,r,t)}function yd(e,t){return{x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}}function vd(e){var t=e.waypoints;if(!t.length)throw new Error("connection#"+e.id+": no waypoints");return t}function bd(e,t){return w(S(e,xd),(function(e){return function(e,t){return"intersect"===Pn(t,e,1)}(e,t)}))}function xd(e){return e.original||e}function wd(e,t){hs.call(this,e),this.postExecute("shape.replace",(function(e){var n=e.oldShape,i=e.newShape;if(function(e,t){return Tr(e,"bpmn:Participant")&&Xr(e)&&Tr(t,"bpmn:Participant")&&!Xr(t)}(n,i)){var r,o,s,a,l=(o=_t([r=n],!1),s=[],a=[],o.forEach((function(e){e!==r&&(e.incoming.forEach((function(e){Tr(e,"bpmn:MessageFlow")&&s.push(e)})),e.outgoing.forEach((function(e){Tr(e,"bpmn:MessageFlow")&&a.push(e)})))}),[]),{incoming:s,outgoing:a});l.incoming.forEach((function(e){var r=fd(e,i,n);t.reconnectEnd(e,i,r)})),l.outgoing.forEach((function(e){var r=hd(e,i,n);t.reconnectStart(e,i,r)}))}}),!0)}i(ud,hs),ud.$inject=["eventBus","modeling","bpmnFactory","textRenderer"],i(dd,hs),dd.$inject=["eventBus","modeling"],wd.$inject=["eventBus","modeling"],i(wd,hs);const _d=["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:EscalationEventDefinition","bpmn:ConditionalEventDefinition","bpmn:SignalEventDefinition"];function Ed(e){const t=Mr(e);if(!(Tr(t,"bpmn:BoundaryEvent")||Tr(t,"bpmn:StartEvent")&&Yr(t.$parent)))return!1;const n=t.get("eventDefinitions");return!(!n||!n.length)&&_d.some((e=>Tr(n[0],e)))}function Od(e){return Tr(e,"bpmn:BoundaryEvent")?"cancelActivity":"isInterrupting"}function Pd(e,t){e.invoke(hs,this),this.postExecuted("shape.replace",(function(e){const n=e.context.oldShape,i=e.context.newShape,r=e.context.hints;if(!Ed(i))return;const o=Od(i);if(r.targetElement&&void 0!==r.targetElement[o])return;const s=Mr(n).get(o);s!==Mr(i).get(o)&&t.updateProperties(i,{[o]:s})}))}function kd(e,t){hs.call(this,e),this.preExecute("shape.resize",(function(e){var n=e.shape,i=Dr(n),r=i&&i.get("label");r&&r.get("bounds")&&t.updateModdleProperties(n,r,{bounds:void 0})}),!0)}function Sd(e,t,n){hs.call(this,e),this.preExecute("shape.delete",(function(e){var i=e.context.shape;if(1===i.incoming.length&&1===i.outgoing.length){var r=i.incoming[0],o=i.outgoing[0];if(Tr(r,"bpmn:SequenceFlow")&&Tr(o,"bpmn:SequenceFlow")&&t.canConnect(r.source,o.target,r)){var s=function(e,t){var n=Hu(Cd(e[e.length-2]),Cd(e[e.length-1]),Cd(t[1]),Cd(t[0]));return n?[].concat(e.slice(0,e.length-1),[n],t.slice(1)):[Cd(e[0]),Cd(t[t.length-1])]}(r.waypoints,o.waypoints);n.reconnectEnd(r,o.target,s)}}}))}function Cd(e){return e.original||e}function Td(e,t){hs.call(this,e),this.preExecute("shape.delete",(function(e){var t=e.shape,n=t.parent;Tr(t,"bpmn:Participant")&&(e.collaborationRoot=n)}),!0),this.postExecute("shape.delete",(function(e){var n=e.collaborationRoot;n&&!n.businessObject.participants.length&&t.makeProcess()}),!0)}function Ad(e,t,n,i){hs.call(this,e);var r=i.get("dragging",!1);function o(e){var i,r,o=e.source,s=e.target;e.parent&&(Tr(e,"bpmn:SequenceFlow")&&(n.canConnectSequenceFlow(o,s)||(r=!0),n.canConnectMessageFlow(o,s)&&(i="bpmn:MessageFlow")),Tr(e,"bpmn:MessageFlow")&&(n.canConnectMessageFlow(o,s)||(r=!0),n.canConnectSequenceFlow(o,s)&&(i="bpmn:SequenceFlow")),r&&t.removeConnection(e),i&&t.connect(o,s,{type:i,waypoints:e.waypoints.slice()}))}this.postExecuted("elements.move",(function(e){_(e.closure.allConnections,o)}),!0),this.preExecute("connection.reconnect",(function(e){var i,o,s=e.context,a=s.connection,l=s.newSource||a.source,c=s.newTarget||a.target;(i=n.canConnect(l,c))&&i.type!==a.type&&(o=t.connect(l,c,{type:i.type,associationDirection:i.associationDirection,waypoints:a.waypoints.slice()}),a.parent&&t.removeConnection(a),s.connection=o,r&&function(e,t){var n,i=r.context(),o=i&&i.payload.previousSelection;if(!o||!o.length)return;if(n=o.indexOf(e),-1===n)return;o.splice(n,1,t)}(a,o))})),this.postExecuted("element.updateProperties",(function(e){var n,i=e.context,r=i.properties,o=i.element,s=o.businessObject;r.default&&(n=b(o.outgoing,N({id:o.businessObject.default.id})))&&t.updateProperties(n,{conditionExpression:void 0}),r.conditionExpression&&s.sourceRef.default===s&&t.updateProperties(o.source,{default:void 0})}))}function Md(e,t,n,i,r,o){i.invoke(hs,this),this._bpmnReplace=e,this._elementRegistry=n,this._selection=o,this.postExecuted(["elements.create"],500,(function(e){var n=e.context,i=n.parent,r=n.elements,o=O(r,(function(e,n){var r=t.canReplace([n],n.host||n.parent||i);return r?e.concat(r.replacements):e}),[]);o.length&&this._replaceElements(r,o)}),this),this.postExecuted(["elements.move"],500,(function(e){var n=e.context,i=n.newParent,r=n.newHost,o=[];_(n.closure.topLevel,(function(e){o=Yr(e)?o.concat(e.children):o.concat(e)})),1===o.length&&r&&(i=r);var s=t.canReplace(o,i);s&&this._replaceElements(o,s.replacements,r)}),this),this.postExecute(["shape.replace"],1500,(function(e){var n,i=e.context,r=i.oldShape,o=i.newShape,s=r.attachers;s&&s.length&&(n=t.canReplace(s,o),this._replaceElements(s,n.replacements))}),this),this.postExecuted(["shape.replace"],1500,(function(e){var t=e.context,n=t.oldShape,i=t.newShape;r.unclaimId(n.businessObject.id,n.businessObject),r.updateProperties(i,{id:n.id})}))}Pd.$inject=["injector","modeling"],i(Pd,hs),i(kd,hs),kd.$inject=["eventBus","modeling"],i(Sd,hs),Sd.$inject=["eventBus","bpmnRules","modeling"],Td.$inject=["eventBus","modeling"],i(Td,hs),i(Ad,hs),Ad.$inject=["eventBus","modeling","bpmnRules","injector"],i(Md,hs),Md.prototype._replaceElements=function(e,t){var n=this._elementRegistry,i=this._bpmnReplace,r=this._selection;_(t,(function(t){var r={type:t.newElementType},o=n.get(t.oldElementId),s=e.indexOf(o);e[s]=i.replaceElement(o,r,{select:!1})})),t&&r.select(e)},Md.$inject=["bpmnReplace","bpmnRules","elementRegistry","injector","modeling","selection"];var Dd={width:140,height:120},Rd={width:300,height:60},Nd={width:60,height:300},$d={width:300,height:150},jd={width:150,height:300},Id={width:140,height:120},Ld={width:50,height:30};function Bd(e){e.on("resize.start",1500,(function(e){var t=e.context,n=t.shape,i=t.direction,r=t.balanced;(Tr(n,"bpmn:Lane")||Tr(n,"bpmn:Participant"))&&(t.resizeConstraints=function(e,t,n){var i=Mu(e),r=!0,o=!0,s=Tu(i,[i]),a=wn(e),l={},c={},p=Kr(e),u=p?Rd:Nd;/n/.test(t)?c.top=a.bottom-u.height:/e/.test(t)?c.right=a.left+u.width:/s/.test(t)?c.bottom=a.top+u.height:/w/.test(t)&&(c.left=a.right-u.width);s.forEach((function(e){var i=wn(e);/n/.test(t)&&(p&&i.topa.right+10&&(o=!1),n&&qd(a.right-i.left)<10&&Hd(l,"right",i.right-u.width),qd(a.right-i.right)<5&&Ud(c,"right",i.left+u.width)),/s/.test(t)&&(p&&i.bottom>a.bottom+10&&(o=!1),n&&qd(a.bottom-i.top)<10&&Hd(l,"bottom",i.bottom-u.height),qd(a.bottom-i.bottom)<5&&Ud(c,"bottom",i.top+u.height)),/w/.test(t)&&(!p&&i.left=r.y&&t<=r.y+r.height||n&&t>=r.x&&t<=r.x+r.width)return(o=Au(r)).length?eh(o,t,n):r}Yd.$inject=["eventBus"];var th=180,nh=160;function ih(e,t,n,i,r,o,s){hs.call(this,t),this._canvas=e,this._eventBus=t,this._modeling=n,this._elementFactory=i,this._bpmnFactory=r,this._bpmnjs=o,this._elementRegistry=s;var a=this;function l(e){return Tr(e,"bpmn:SubProcess")&&!Xr(e)}function c(t){var n=t.shape,i=t.newRootElement,r=Mr(n);i=a._addDiagram(i||r),t.newRootElement=e.addRootElement(i)}function p(t){var n=Mr(t.shape);a._removeDiagram(n);var i=t.newRootElement=s.get(_s(n));e.removeRootElement(i)}this.executed("shape.create",(function(e){l(e.shape)&&c(e)}),!0),this.postExecuted("shape.create",(function(e){var t=e.shape,n=e.newRootElement;n&&t.children&&(a._showRecursively(t.children),a._moveChildrenToShape(t,n))}),!0),this.reverted("shape.create",(function(e){l(e.shape)&&p(e)}),!0),this.preExecuted("shape.delete",(function(e){var t=e.shape;if(l(t)){var i=s.get(_s(t));i&&n.removeElements(i.children.slice())}}),!0),this.executed("shape.delete",(function(e){l(e.shape)&&p(e)}),!0),this.reverted("shape.delete",(function(e){l(e.shape)&&c(e)}),!0),this.preExecuted("shape.replace",(function(t){var n=t.oldShape,i=t.newShape;l(n)&&l(i)&&(t.oldRoot=e.removeRootElement(_s(n)))}),!0),this.postExecuted("shape.replace",(function(t){var i=t.newShape,r=t.oldRoot,o=e.findRoot(_s(i));if(r&&o){var s=r.children;n.moveElements(s,{x:0,y:0},o)}}),!0),this.executed("element.updateProperties",(function(e){var t=e.element;if(Tr(t,"bpmn:SubProcess")){var n=e.properties,i=e.oldProperties.id,r=n.id;if(i!==r){if(Os(t))return s.updateId(t,Es(r)),void s.updateId(i,r);s.get(Es(i))&&s.updateId(Es(i),Es(r))}}}),!0),this.reverted("element.updateProperties",(function(e){var t=e.element;if(Tr(t,"bpmn:SubProcess")){var n=e.properties,i=e.oldProperties.id,r=n.id;if(i!==r){if(Os(t))return s.updateId(t,Es(i)),void s.updateId(r,i);var o=s.get(Es(r));o&&s.updateId(o,Es(i))}}}),!0),t.on("element.changed",(function(e){var n=e.element;if(Os(n)){var i=n,r=s.get(ws(i));r&&r!==i&&t.fire("element.changed",{element:r})}})),this.executed("shape.toggleCollapse",400,(function(e){var t=e.shape;Tr(t,"bpmn:SubProcess")&&(Xr(t)?p(e):(c(e),a._showRecursively(t.children)))}),!0),this.reverted("shape.toggleCollapse",400,(function(e){var t=e.shape;Tr(t,"bpmn:SubProcess")&&(Xr(t)?p(e):(c(e),a._showRecursively(t.children)))}),!0),this.postExecuted("shape.toggleCollapse",600,(function(e){var t=e.shape;if(Tr(t,"bpmn:SubProcess")){var n=e.newRootElement;n&&(Xr(t)?a._moveChildrenToShape(n,t):a._moveChildrenToShape(t,n))}}),!0),t.on("copyPaste.createTree",(function(e){var t=e.element,n=e.children;if(l(t)){var i=_s(t),r=s.get(i);r&&n.push.apply(n,r.children)}})),t.on("copyPaste.copyElement",(function(e){var t=e.descriptor,n=e.element,i=e.elements,r=n.parent;if(Tr(Dr(r),"bpmndi:BPMNPlane")){var o=ws(r),s=b(i,(function(e){return e.id===o}));s&&(t.parent=s.id)}})),t.on("copyPaste.pasteElement",(function(e){var t=e.descriptor;t.parent&&(l(t.parent)||t.parent.hidden)&&(t.hidden=!0)}))}function rh(e,t){e.invoke(hs,this),this.postExecuted("shape.replace",(function(e){var n=e.context.oldShape,i=e.context.newShape;if(Tr(i,"bpmn:SubProcess")&&(Tr(n,"bpmn:Task")||Tr(n,"bpmn:CallActivity"))&&Xr(i)){var r,o={x:(r=i).x+r.width/6,y:r.y+r.height/2};t.createShape({type:"bpmn:StartEvent"},o,i)}}))}function oh(e){hs.call(this,e),this.preExecute("connection.create",(function(e){const{target:t}=e;Tr(t,"bpmn:TextAnnotation")&&(e.parent=t.parent)}),!0),this.preExecute(["shape.create","shape.resize","elements.move"],(function(e){const t=e.shapes||[e.shape];1===t.length&&Tr(t[0],"bpmn:TextAnnotation")&&(e.hints=e.hints||{},e.hints.autoResize=!1)}),!0)}function sh(e,t){hs.call(this,e),this.postExecuted("shape.toggleCollapse",1500,(function(e){var n=e.shape;if(!Xr(n)){var i=_t(n);i.forEach((function(e){var t=e.incoming.slice(),n=e.outgoing.slice();_(t,(function(e){r(e,!0)})),_(n,(function(e){r(e,!1)}))}))}function r(e,r){-1!==i.indexOf(e.source)&&-1!==i.indexOf(e.target)||(r?t.reconnectEnd(e,n,On(n)):t.reconnectStart(e,n,On(n)))}}),!0)}i(ih,hs),ih.prototype._moveChildrenToShape=function(e,t){var n,i=this._modeling,r=e.children;if(r){var o=(r=r.concat(r.reduce((function(t,n){return n.label&&n.label.parent!==e?t.concat(n.label):t}),[]))).filter((function(e){return!e.hidden}));if(o.length){var s=Et(o);if(t.x){var a=On(t),l=On(s);n={x:a.x-l.x,y:a.y-l.y}}else n={x:th-s.x,y:nh-s.y};i.moveElements(r,n,t,{autoResize:!1})}else i.moveElements(r,{x:0,y:0},t,{autoResize:!1})}},ih.prototype._showRecursively=function(e,t){var n=this,i=[];return e.forEach((function(e){e.hidden=!!t,i=i.concat(e),e.children&&(i=i.concat(n._showRecursively(e.children,e.collapsed||t)))})),i},ih.prototype._addDiagram=function(e){var t=this._bpmnjs.getDefinitions().diagrams;return e.businessObject||(e=this._createNewDiagram(e)),t.push(e.di.$parent),e},ih.prototype._createNewDiagram=function(e){var t=this._bpmnFactory,n=this._elementFactory,i=t.create("bpmndi:BPMNPlane",{bpmnElement:e}),r=t.create("bpmndi:BPMNDiagram",{plane:i});return i.$parent=r,n.createRoot({id:_s(e),type:e.$type,di:i,businessObject:e,collapsed:!0})},ih.prototype._removeDiagram=function(e){var t=this._bpmnjs.getDefinitions().diagrams,n=b(t,(function(t){return t.plane.bpmnElement.id===e.id}));return t.splice(t.indexOf(n),1),n},ih.$inject=["canvas","eventBus","modeling","elementFactory","bpmnFactory","bpmnjs","elementRegistry"],rh.$inject=["injector","modeling"],i(rh,hs),i(oh,hs),oh.$inject=["eventBus"],i(sh,hs),sh.$inject=["eventBus","modeling"];function ah(e,t,n){hs.call(this,e),this.executed(["shape.toggleCollapse"],500,(function(e){var t,n=e.context.shape;Tr(n,"bpmn:SubProcess")&&(n.collapsed?Dr(n).isExpanded=!1:((t=n.children).length&&t.forEach((function(e){"label"!==e.type||e.businessObject.name||(e.hidden=!0)})),Dr(n).isExpanded=!0))})),this.reverted(["shape.toggleCollapse"],500,(function(e){var t=e.context.shape;t.collapsed?Dr(t).isExpanded=!1:Dr(t).isExpanded=!0})),this.postExecuted(["shape.toggleCollapse"],500,(function(e){var i,r=e.context.shape,o=t.getDefaultSize(r);i=r.collapsed?function(e,t){return{x:e.x+(e.width-t.width)/2,y:e.y+(e.height-t.height)/2,width:t.width,height:t.height}}(r,o):function(e,t){var n,i,r=e.children,o=t;return(n=Pu((i=r,i.filter((function(e){return!e.hidden}))).concat([e])))?(o.width=Math.max(n.width,o.width),o.height=Math.max(n.height,o.height),o.x=n.x+(n.width-o.width)/2,o.y=n.y+(n.height-o.height)/2):(o.x=e.x+(e.width-o.width)/2,o.y=e.y+(e.height-o.height)/2),o}(r,o),n.resizeShape(r,i,null,{autoResize:!r.collapsed&&"nwse"})}))}function lh(e,t,n,i){t.invoke(hs,this),this.preExecute("shape.delete",(function(e){var t=e.context.shape,r=t.businessObject;vn(t)||(Tr(t,"bpmn:Participant")&&Xr(t)&&n.ids.unclaim(r.processRef.id),i.unclaimId(r.id,r))})),this.preExecute("connection.delete",(function(e){var t=e.context.connection.businessObject;i.unclaimId(t.id,t)})),this.preExecute("canvas.updateRoot",(function(){var t=e.getRootElement(),i=t.businessObject;Tr(t,"bpmn:Collaboration")&&n.ids.unclaim(i.id)}))}function ch(e,t){hs.call(this,e),this.preExecute("connection.delete",(function(e){var n=e.context.connection,i=n.source;(function(e,t){if(!Tr(e,"bpmn:SequenceFlow"))return!1;var n=Mr(t),i=Mr(e);return n.get("default")===i})(n,i)&&t.updateProperties(i,{default:null})}))}i(ah,hs),ah.$inject=["eventBus","elementFactory","modeling"],i(lh,hs),lh.$inject=["canvas","injector","moddle","modeling"],i(ch,hs),ch.$inject=["eventBus","modeling"];function ph(e,t,n){var i;function r(){if(!i)throw new Error(n("out of bounds release"));return i}hs.call(this,e);var o=["spaceTool","lane.add","lane.resize","lane.split","elements.create","elements.delete","elements.move","shape.create","shape.delete","shape.move","shape.resize"];this.preExecute(o,5e3,(function(e){(i=i||new uh).enter()})),this.postExecuted(o,500,(function(e){!function(){if(!i)throw new Error(n("out of bounds release"));var e=i.leave();e&&(t.updateLaneRefs(i.flowNodes,i.lanes),i=null)}()})),this.preExecute(["shape.create","shape.move","shape.delete","shape.resize"],(function(e){var t=e.context.shape,n=r();t.labelTarget||(Tr(t,"bpmn:Lane")&&n.addLane(t),Tr(t,"bpmn:FlowNode")&&n.addFlowNode(t))}))}function uh(){this.flowNodes=[],this.lanes=[],this.counter=0,this.addLane=function(e){this.lanes.push(e)},this.addFlowNode=function(e){this.flowNodes.push(e)},this.enter=function(){this.counter++},this.leave=function(){return this.counter--,!this.counter}}ph.$inject=["eventBus","modeling","translate"],i(ph,hs);const dh={__init__:["adaptiveLabelPositioningBehavior","appendBehavior","associationBehavior","attachEventBehavior","boundaryEventBehavior","compensateBoundaryEventBehaviour","createBehavior","createDataObjectBehavior","createParticipantBehavior","dataInputAssociationBehavior","dataStoreBehavior","deleteLaneBehavior","detachEventBehavior","dropOnFlowBehavior","eventBasedGatewayBehavior","fixHoverBehavior","groupBehavior","importDockingFix","isHorizontalFix","labelBehavior","layoutConnectionBehavior","messageFlowBehavior","nonInterruptingBehavior","removeElementBehavior","removeEmbeddedLabelBoundsBehavior","removeParticipantBehavior","replaceConnectionBehavior","replaceElementBehaviour","resizeBehavior","resizeLaneBehavior","rootElementReferenceBehavior","spaceToolBehavior","subProcessPlaneBehavior","subProcessStartEventBehavior","textAnnotationBehavior","toggleCollapseConnectionBehaviour","toggleElementCollapseBehaviour","unclaimIdBehavior","updateFlowNodeRefsBehavior","unsetDefaultFlowBehavior"],adaptiveLabelPositioningBehavior:["type",Xp],appendBehavior:["type",Yp],associationBehavior:["type",Zp],attachEventBehavior:["type",Jp],boundaryEventBehavior:["type",tu],compensateBoundaryEventBehaviour:["type",nu],createBehavior:["type",au],createDataObjectBehavior:["type",lu],createParticipantBehavior:["type",du],dataInputAssociationBehavior:["type",fu],dataStoreBehavior:["type",yu],deleteLaneBehavior:["type",Ru],detachEventBehavior:["type",Nu],dropOnFlowBehavior:["type",ju],eventBasedGatewayBehavior:["type",Bu],fixHoverBehavior:["type",Fu],groupBehavior:["type",Vu],importDockingFix:["type",Uu],isHorizontalFix:["type",Gu],labelBehavior:["type",ud],layoutConnectionBehavior:["type",dd],messageFlowBehavior:["type",wd],nonInterruptingBehavior:["type",Pd],removeElementBehavior:["type",Sd],removeEmbeddedLabelBoundsBehavior:["type",kd],removeParticipantBehavior:["type",Td],replaceConnectionBehavior:["type",Ad],replaceElementBehaviour:["type",Md],resizeBehavior:["type",Bd],resizeLaneBehavior:["type",Qd],rootElementReferenceBehavior:["type",Xd],spaceToolBehavior:["type",Yd],subProcessPlaneBehavior:["type",ih],subProcessStartEventBehavior:["type",rh],textAnnotationBehavior:["type",oh],toggleCollapseConnectionBehaviour:["type",sh],toggleElementCollapseBehaviour:["type",ah],unclaimIdBehavior:["type",lh],unsetDefaultFlowBehavior:["type",ch],updateFlowNodeRefsBehavior:["type",ph]};function hh(e,t){var n=Pn(e,t,-15);return"intersect"!==n?n:null}function fh(e){oc.call(this,e)}function mh(e){return!e||vn(e)}function gh(e){do{if(Tr(e,"bpmn:Process"))return Mr(e);if(Tr(e,"bpmn:Participant"))return Mr(e).processRef||Mr(e)}while(e=e.parent)}function yh(e){return Tr(e,"bpmn:TextAnnotation")}function vh(e){return Tr(e,"bpmn:Group")&&!e.labelTarget}function bh(e){return Tr(e,"bpmn:BoundaryEvent")&&Eh(e,"bpmn:CompensateEventDefinition")}function xh(e){return Mr(e).isForCompensation}function wh(e){for(var t=e;t=t.parent;){if(Tr(t,"bpmn:FlowElementsContainer"))return Mr(t);if(Tr(t,"bpmn:Participant"))return Mr(t).processRef}return null}function _h(e,t){return wh(e)===wh(t)}function Eh(e,t){return!!b(Mr(e).eventDefinitions||[],(function(e){return Tr(e,t)}))}function Oh(e,t){return(Mr(e).eventDefinitions||[]).every((function(e){return Tr(e,t)}))}function Ph(e,t){var n=function(e){for(var t=[];e;)(e=e.parent)&&t.push(e);return t}(t);return-1!==n.indexOf(e)}function kh(e,t,n){if(mh(e)||mh(t))return null;if(!Tr(n,"bpmn:DataAssociation")){if(qh(e,t))return{type:"bpmn:MessageFlow"};if(zh(e,t))return{type:"bpmn:SequenceFlow"}}var i=Fh(e,t);return i||(Bh(e,t)?{type:"bpmn:Association",associationDirection:"One"}:!!Lh(e,t)&&{type:"bpmn:Association",associationDirection:"None"})}function Sh(e,t){return!(!vn(e)&&!vh(e))||!(Tr(t,"bpmn:Participant")&&!Xr(t))&&(Tr(e,"bpmn:Participant")?Tr(t,"bpmn:Process")||Tr(t,"bpmn:Collaboration"):Ar(e,["bpmn:DataInput","bpmn:DataOutput"])&&e.parent?t===e.parent:Tr(e,"bpmn:Lane")?Tr(t,"bpmn:Participant")||Tr(t,"bpmn:Lane"):!(Tr(e,"bpmn:BoundaryEvent")&&(n=e,!Mr(n).cancelActivity||!Ah(n)&&!Mh(n)))&&(Tr(e,"bpmn:FlowElement")&&!Tr(e,"bpmn:DataStoreReference")?Tr(t,"bpmn:FlowElementsContainer")?Xr(t):Ar(t,["bpmn:Participant","bpmn:Lane"]):Tr(e,"bpmn:DataStoreReference")&&Tr(t,"bpmn:Collaboration")?k(Mr(t).get("participants"),(function(e){return!!e.get("processRef")})):Ar(e,["bpmn:Artifact","bpmn:DataAssociation","bpmn:DataStoreReference"])?Ar(t,["bpmn:Collaboration","bpmn:Lane","bpmn:Participant","bpmn:Process","bpmn:SubProcess"]):!!Tr(e,"bpmn:MessageFlow")&&(Tr(t,"bpmn:Collaboration")||e.source.parent==t||e.target.parent==t)));var n}function Ch(e){return Tr(e,"bpmn:Lane")}function Th(e){return!!function(e){return!vn(e)&&Tr(e,"bpmn:BoundaryEvent")}(e)||(!(!Tr(e,"bpmn:IntermediateThrowEvent")||!Ah(e))||Tr(e,"bpmn:IntermediateCatchEvent")&&Mh(e))}function Ah(e){var t=Mr(e);return t&&!(t.eventDefinitions&&t.eventDefinitions.length)}function Mh(e){return Dh(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])}function Dh(e,t){return t.some((function(t){return Eh(e,t)}))}function Rh(e,t,n,i){if(Array.isArray(e)||(e=[e]),1!==e.length)return!1;var r=e[0];return!vn(r)&&(!!Th(r)&&(!Yr(t)&&(!(!Tr(t,"bpmn:Activity")||xh(t))&&(!(i&&!hh(i,t))&&(!function(e){return Tr(e,"bpmn:ReceiveTask")&&b(e.incoming,(function(e){return Tr(e.source,"bpmn:EventBasedGateway")}))}(t)&&"attach")))))}function Nh(e,t,n){if(!t)return!1;var i={replacements:[]};return _(e,(function(e){Yr(t)||Tr(e,"bpmn:StartEvent")&&"label"!==e.type&&Sh(e,t)&&(function(e){return e&&!1!==Mr(e).isInterrupting}(e)||i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),(function(e){return Zr(e,"bpmn:ErrorEventDefinition")}(e)||function(e){return Zr(e,"bpmn:EscalationEventDefinition")}(e)||function(e){return Zr(e,"bpmn:CompensateEventDefinition")}(e))&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),Dh(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])&&Tr(t,"bpmn:SubProcess")&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"})),Tr(t,"bpmn:Transaction")||Eh(e,"bpmn:CancelEventDefinition")&&"label"!==e.type&&(Tr(e,"bpmn:EndEvent")&&Sh(e,t)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:EndEvent"}),Tr(e,"bpmn:BoundaryEvent")&&Rh(e,t,0,n)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:BoundaryEvent"}))})),!!i.replacements.length&&i}function $h(e,t){return!k(e,Ch)&&(!t||e.every((function(e){return Sh(e,t)})))}function jh(e,t,n,i){return!!t&&(!(!vn(e)&&!vh(e))||!function(e,t){return e===t}(n,t)&&((!n||!Ph(n,t))&&(Sh(e,t)||Vh(e,t,i))))}function Ih(e,t){return Tr(e,"bpmn:SubProcess")?Xr(e)&&(!t||t.width>=100&&t.height>=80):!!Tr(e,"bpmn:Lane")||(!!Tr(e,"bpmn:Participant")||(!!yh(e)||!!vh(e)))}function Lh(e,t){return!Ph(t,e)&&!Ph(e,t)&&(!!function(e,t){var n=yh(e),i=yh(t);return(n||i)&&n!==i}(e,t)||!!Fh(e,t))}function Bh(e,t){return _h(e,t)&&bh(e)&&Tr(t,"bpmn:Activity")&&(n=e,!t.attachers.includes(n))&&!Yr(t);var n}function qh(e,t){return!(Uh(e)&&!Uh(t))&&(Tr(n=e,"bpmn:InteractionNode")&&!Tr(n,"bpmn:BoundaryEvent")&&(!Tr(n,"bpmn:Event")||Tr(n,"bpmn:ThrowEvent")&&Oh(n,"bpmn:MessageEventDefinition"))&&function(e){return Tr(e,"bpmn:InteractionNode")&&!xh(e)&&(!Tr(e,"bpmn:Event")||Tr(e,"bpmn:CatchEvent")&&Oh(e,"bpmn:MessageEventDefinition"))&&!(Tr(e,"bpmn:BoundaryEvent")&&!Eh(e,"bpmn:MessageEventDefinition"))}(t)&&!function(e,t){return gh(e)===gh(t)}(e,t));var n}function zh(e,t){return Tr(n=e,"bpmn:FlowNode")&&!Tr(n,"bpmn:EndEvent")&&!Yr(n)&&!(Tr(n,"bpmn:IntermediateThrowEvent")&&Eh(n,"bpmn:LinkEventDefinition"))&&!bh(n)&&!xh(n)&&function(e){return Tr(e,"bpmn:FlowNode")&&!Tr(e,"bpmn:StartEvent")&&!Tr(e,"bpmn:BoundaryEvent")&&!Yr(e)&&!(Tr(e,"bpmn:IntermediateCatchEvent")&&Eh(e,"bpmn:LinkEventDefinition"))&&!xh(e)}(t)&&_h(e,t)&&!(Tr(e,"bpmn:EventBasedGateway")&&!function(e){return Tr(e,"bpmn:ReceiveTask")||Tr(e,"bpmn:IntermediateCatchEvent")&&(Eh(e,"bpmn:MessageEventDefinition")||Eh(e,"bpmn:TimerEventDefinition")||Eh(e,"bpmn:ConditionalEventDefinition")||Eh(e,"bpmn:SignalEventDefinition"))}(t));var n}function Fh(e,t){return Ar(e,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&Ar(t,["bpmn:Activity","bpmn:ThrowEvent"])?{type:"bpmn:DataInputAssociation"}:!(!Ar(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])||!Ar(e,["bpmn:Activity","bpmn:CatchEvent"]))&&{type:"bpmn:DataOutputAssociation"}}function Vh(e,t,n){if(!t)return!1;if(Array.isArray(e)){if(1!==e.length)return!1;e=e[0]}return t.source!==e&&t.target!==e&&(Ar(t,["bpmn:SequenceFlow","bpmn:MessageFlow"])&&!vn(t)&&Tr(e,"bpmn:FlowNode")&&!Tr(e,"bpmn:BoundaryEvent")&&Sh(e,t.parent))}function Hh(e,t){return!!vn(t)||!(Tr(t,"bpmn:Lane")&&!function(e,t){return e&&t&&-1!==e.indexOf(t)}(e,t.parent))}function Uh(e){return su(e,"bpmn:Process")||su(e,"bpmn:Collaboration")}i(fh,oc),fh.$inject=["eventBus"],fh.prototype.init=function(){this.addRule("connection.start",(function(e){return function(e){if(mh(e))return null;return Ar(e,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference","bpmn:Group","bpmn:TextAnnotation"])}(e.source)})),this.addRule("connection.create",(function(e){var t=e.source,n=e.target,i=e.hints||{},r=i.targetParent;if(i.targetAttach)return!1;r&&(n.parent=r);try{return kh(t,n)}finally{r&&(n.parent=null)}})),this.addRule("connection.reconnect",(function(e){var t=e.connection;return kh(e.source,e.target,t)})),this.addRule("connection.updateWaypoints",(function(e){return{type:e.connection.type}})),this.addRule("shape.resize",(function(e){return Ih(e.shape,e.newBounds)})),this.addRule("elements.create",(function(e){var t=e.elements,n=e.position,i=e.target;return!(yn(i)&&!Vh(t,i,n))&&P(t,(function(e){return yn(e)?kh(e.source,e.target,e):e.host?Rh(e,e.host,null,n):jh(e,i,null,n)}))})),this.addRule("elements.move",(function(e){var t=e.target,n=e.shapes,i=e.position;return Rh(n,t,null,i)||Nh(n,t,i)||$h(n,t)||Vh(n,t,i)})),this.addRule("shape.create",(function(e){return jh(e.shape,e.target,e.source,e.position)})),this.addRule("shape.attach",(function(e){return Rh(e.shape,e.target,null,e.position)})),this.addRule("element.copy",(function(e){var t=e.element;return Hh(e.elements,t)}))},fh.prototype.canConnectMessageFlow=qh,fh.prototype.canConnectSequenceFlow=zh,fh.prototype.canConnectDataAssociation=Fh,fh.prototype.canConnectAssociation=Lh,fh.prototype.canConnectCompensationAssociation=Bh,fh.prototype.canMove=$h,fh.prototype.canAttach=Rh,fh.prototype.canReplace=Nh,fh.prototype.canDrop=Sh,fh.prototype.canInsert=Vh,fh.prototype.canCreate=jh,fh.prototype.canConnect=kh,fh.prototype.canResize=Ih,fh.prototype.canCopy=Hh;const Wh={__depends__:[jc],__init__:["bpmnRules"],bpmnRules:["type",fh]};function Gh(e,t){e.on("saveXML.start",2e3,(function(){_(t.getRootElements(),(function(e){var t,n=Dr(e);t=S(w(_t([e],!1),(function(t){return t!==e&&!t.labelTarget})),Dr),n.set("planeElement",t)}))}))}Gh.$inject=["eventBus","canvas"];const Qh={__init__:["bpmnDiOrdering"],bpmnDiOrdering:["type",Gh]};function Xh(e){hs.call(this,e);var t=this;this.preExecute(["shape.create","connection.create"],(function(e){var n=e.context,i=n.shape||n.connection,r=n.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.parent=o.parent),n.parentIndex=o.index)})),this.preExecute(["shape.move","connection.move"],(function(e){var n=e.context,i=n.shape||n.connection,r=n.newParent||i.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.newParent=o.parent),n.newParentIndex=o.index)}))}function Kh(e,t,n){Xh.call(this,e);var i=[{type:"bpmn:SubProcess",order:{level:6}},{type:"bpmn:SequenceFlow",order:{level:9,containers:["bpmn:Participant","bpmn:FlowElementsContainer"]}},{type:"bpmn:DataAssociation",order:{level:9,containers:["bpmn:Collaboration","bpmn:FlowElementsContainer"]}},{type:"bpmn:TextAnnotation",order:{level:9}},{type:"bpmn:MessageFlow",order:{level:9,containers:["bpmn:Collaboration"]}},{type:"bpmn:Association",order:{level:6,containers:["bpmn:Participant","bpmn:FlowElementsContainer","bpmn:Collaboration"]}},{type:"bpmn:BoundaryEvent",order:{level:8}},{type:"bpmn:Group",order:{level:10,containers:["bpmn:Collaboration","bpmn:FlowElementsContainer"]}},{type:"bpmn:FlowElement",order:{level:5}},{type:"bpmn:Participant",order:{level:-2}},{type:"bpmn:Lane",order:{level:-1}}];function r(e){var t=e.order;if(t||(e.order=t=function(e){if(e.labelTarget)return{level:10};var t=b(i,(function(t){return Ar(e,[t.type])}));return t&&t.order||{level:1}}(e)),!t)throw new Error("no order for <"+e.id+">");return t}this.getOrdering=function(e,n){if(e.labelTarget||Tr(e,"bpmn:TextAnnotation"))return{parent:t.findRoot(n)||t.getRootElement(),index:-1};var i=r(e);i.containers&&(n=function(e,t,n){for(var i=t;i&&!Ar(i,n);)i=i.parent;if(!i)throw new Error("no parent for <"+e.id+"> in <"+(t&&t.id)+">");return i}(e,n,i.containers));var o=n.children.indexOf(e),s=x(n.children,(function(t){return!(!e.labelTarget&&t.labelTarget)&&i.level$f(e.dy)?"x":"y",i=e["d"+n],r=e[n]-i;if($f(i)<5)return!1;i<0&&(i*=-1),Vo(e)&&(i*=-1);var o=function(e,t){if("x"===e){if(t>0)return"e";if(t<0)return"w"}if("y"===e){if(t>0)return"s";if(t<0)return"n"}return null}(n,i),s=this._canvas.getRootElement();!Ho(e)&&e.hover&&(s=e.hover);var a=[..._t(s,!0),...s.attachers||[]],l=this.calculateAdjustments(a,n,i,r),c=function(e,t,n,i,r){var o=e.movingShapes,s=e.resizingShapes;if(!s.length)return;var a,l,c={};return _(s,(function(e){var p,u,d,h,f,g,y=e.attachers,v=e.children,b=wn(e),x=w(v,(function(e){return!(yn(e)||vn(e)||Hf(o,e)||Hf(s,e))})),_=w(v,(function(e){return!yn(e)&&!vn(e)&&Hf(o,e)})),E=[],O=[];x.length&&(u=Ff(wn(Et(x))),p=i-b[Bf[n]]+u[Bf[n]],"n"===n?c.bottom=l=m(l)?Math.min(l,p):p:"w"===n?c.right=l=m(l)?Math.min(l,p):p:"s"===n?c.top=a=m(a)?Math.max(a,p):p:"e"===n&&(c.left=a=m(a)?Math.max(a,p):p)),_.length&&(d=Ff(wn(Et(_))),p=i-d[Bf[qf[n]]]+b[Bf[qf[n]]],"n"===n?c.bottom=l=m(l)?Math.min(l,p):p:"w"===n?c.right=l=m(l)?Math.min(l,p):p:"s"===n?c.top=a=m(a)?Math.max(a,p):p:"e"===n&&(c.left=a=m(a)?Math.max(a,p):p)),y&&y.length&&(y.forEach((function(e){Hf(o,e)?E.push(e):O.push(e)})),E.length&&(h=wn(Et(E.map(On))),f=b[Bf[qf[n]]]-(h[Bf[qf[n]]]-i)),O.length&&(g=wn(Et(O.map(On)))[Bf[n]]-(b[Bf[n]]-i)),"n"===n?(p=Math.min(f||1/0,g||1/0),c.bottom=l=m(l)?Math.min(l,p):p):"w"===n?(p=Math.min(f||1/0,g||1/0),c.right=l=m(l)?Math.min(l,p):p):"s"===n?(p=Math.max(f||-1/0,g||-1/0),c.top=a=m(a)?Math.max(a,p):p):"e"===n&&(p=Math.max(f||-1/0,g||-1/0),c.left=a=m(a)?Math.max(a,p):p));var P=r&&r[e.id];P&&("n"===n?(p=i+e[If[t]]-P[If[t]],c.bottom=l=m(l)?Math.min(l,p):p):"w"===n?(p=i+e[If[t]]-P[If[t]],c.right=l=m(l)?Math.min(l,p):p):"s"===n?(p=i-e[If[t]]+P[If[t]],c.top=a=m(a)?Math.max(a,p):p):"e"===n&&(p=i-e[If[t]]+P[If[t]],c.left=a=m(a)?Math.max(a,p):p))})),c}(l,n,o,r,this._eventBus.fire("spaceTool.getMinDimensions",{axis:n,direction:o,shapes:l.resizingShapes,start:r}));return z(t,l,{axis:n,direction:o,spaceToolConstraints:c,start:r}),Js("resize-"+("x"===n?"ew":"ns")),!0},zf.prototype.calculateAdjustments=function(e,t,n,i){var r=this._rules,o=[],s=[],a=[],l=[];function c(e){o.includes(e)||o.push(e);var t=e.label;t&&!o.includes(t)&&o.push(t)}_(e,(function(e){if(e.parent&&!vn(e))if(yn(e))l.push(e);else{var o=e[t],p=o+e[If[t]];if(function(e){return!!e.host}(e)&&(n>0&&On(e)[t]>i||n<0&&On(e)[t]0&&o>i||n<0&&pi&&r.allowed("shape.resize",{shape:e})?(u=e,void(s.includes(u)||s.push(u))):void 0;c(e)}}})),_(o,(function(e){var t=e.attachers;t&&_(t,(function(e){c(e)}))}));var p=o.concat(s);return _(a,(function(e){var t=e.host;Hf(p,t)&&c(e)})),p=o.concat(s),_(l,(function(e){var t=e.source,n=e.target,i=e.label;Hf(p,t)&&Hf(p,n)&&i&&c(i)})),{movingShapes:o,resizingShapes:s}},zf.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateSelection(e,!!e)},zf.prototype.isActive=function(){var e=this._dragging.context();return!!e&&/^spaceTool/.test(e.prefix)};var Uf="djs-dragging",Wf="djs-resizing",Gf=Math.max;function Qf(e,t,n,i,r){function o(e,t){_(e,(function(e){r.addDragger(e,t),n.addMarker(e,Uf)}))}e.on("spaceTool.selection.start",(function(e){var t=n.getLayer("space"),r=e.context,o="M 0,-10000 L 0,10000",s="M -10000,0 L 10000,0",a=Le("g");Te(a,i.cls("djs-crosshair-group",["no-events"])),ke(t,a);var l=Le("path");Te(l,"d",o),Me(l).add("djs-crosshair"),ke(a,l);var c=Le("path");Te(c,"d",s),Me(c).add("djs-crosshair"),ke(a,c),r.crosshairGroup=a})),e.on("spaceTool.selection.move",(function(e){ii(e.context.crosshairGroup,e.x,e.y)})),e.on("spaceTool.selection.cleanup",(function(e){var t=e.context.crosshairGroup;t&&Ke(t)})),e.on("spaceTool.move",250,(function(e){var s=e.context,a=s.line,l=s.axis,c=s.movingShapes,p=s.resizingShapes;if(s.initialized){if(!s.dragGroup){var u=n.getLayer("space");Te(a=Le("path"),"d","M0,0 L0,0"),Me(a).add("djs-crosshair"),ke(u,a),s.line=a;var d=Le("g");Te(d,i.cls("djs-drag-group",["no-events"])),ke(n.getActiveLayer(),d),o(c,d),o(s.movingConnections=t.filter((function(e){var t=!1;_(c,(function(n){_(n.outgoing,(function(n){e===n&&(t=!0)}))}));var n=!1;_(c,(function(t){_(t.incoming,(function(t){e===t&&(n=!0)}))}));var i=!1;_(p,(function(t){_(t.outgoing,(function(t){e===t&&(i=!0)}))}));var r=!1;return _(p,(function(t){_(t.incoming,(function(t){e===t&&(r=!0)}))})),yn(e)&&(t||i)&&(n||r)})),d),s.dragGroup=d}if(!s.frameGroup){var h=Le("g");Te(h,i.cls("djs-frame-group",["no-events"])),ke(n.getActiveLayer(),h);var f=[];_(p,(function(e){var t=r.addFrame(e,h),i=t.getBBox();f.push({element:t,initialBounds:i}),n.addMarker(e,Wf)})),s.frameGroup=h,s.frames=f}Te(a,{d:{x:"M"+e.x+", -10000 L"+e.x+", 10000",y:"M -10000, "+e.y+" L 10000, "+e.y}[l]});var m={x:e.dx,y:e.dy};m[{x:"y",y:"x"}[s.axis]]=0,ii(s.dragGroup,m.x,m.y),_(s.frames,(function(e){var t,n,i=e.element,r=e.initialBounds;"e"===s.direction?Te(i,{width:Gf(r.width+m.x,5)}):Te(i,{width:t=Gf(r.width-m.x,5),x:r.x+r.width-t}),"s"===s.direction?Te(i,{height:Gf(r.height+m.y,5)}):Te(i,{height:n=Gf(r.height-m.y,5),y:r.y+r.height-n})}))}})),e.on("spaceTool.cleanup",(function(e){var t=e.context,i=t.movingShapes,r=t.movingConnections,o=t.resizingShapes,s=t.line,a=t.dragGroup,l=t.frameGroup;_(i,(function(e){n.removeMarker(e,Uf)})),_(r,(function(e){n.removeMarker(e,Uf)})),a&&(Ke(s),Ke(a)),_(o,(function(e){n.removeMarker(e,Wf)})),l&&Ke(l)}))}Qf.$inject=["eventBus","elementRegistry","canvas","styles","previewSupport"];const Xf={__init__:["spaceToolPreview"],__depends__:[Mc,jc,Rf,Vp,df],spaceTool:["type",zf],spaceToolPreview:["type",Qf]};function Kf(e){e.invoke(zf,this)}Kf.$inject=["injector"],i(Kf,zf),Kf.prototype.calculateAdjustments=function(e,t,n,i){var r=zf.prototype.calculateAdjustments.call(this,e,t,n,i);return r.resizingShapes=r.resizingShapes.filter((function(e){return!Tr(e,"bpmn:TextAnnotation")&&(!function(e){return Tr(e,"bpmn:Participant")&&!Mr(e).processRef}(e)||!("y"===t&&Kr(e)||"x"===t&&!Kr(e)))})),r};const Yf={__depends__:[Xf],spaceTool:["type",Kf]};function Zf(e,t){this._handlerMap={},this._stack=[],this._stackIdx=-1,this._currentExecution={actions:[],dirty:[],trigger:null},this._injector=t,this._eventBus=e,this._uid=1,e.on(["diagram.destroy","diagram.clear"],(function(){this.clear(!1)}),this)}Zf.$inject=["eventBus","injector"],Zf.prototype.execute=function(e,t){if(!e)throw new Error("command required");this._currentExecution.trigger="execute";const n={command:e,context:t};this._pushAction(n),this._internalExecute(n),this._popAction()},Zf.prototype.canExecute=function(e,t){const n={command:e,context:t},i=this._getHandler(e);let r=this._fire(e,"canExecute",n);if(void 0===r){if(!i)return!1;i.canExecute&&(r=i.canExecute(t))}return r},Zf.prototype.clear=function(e){this._stack.length=0,this._stackIdx=-1,!1!==e&&this._fire("changed",{trigger:"clear"})},Zf.prototype.undo=function(){let e,t=this._getUndoAction();if(t){for(this._currentExecution.trigger="undo",this._pushAction(t);t&&(this._internalUndo(t),e=this._getUndoAction(),e&&e.id===t.id);)t=e;this._popAction()}},Zf.prototype.redo=function(){let e,t=this._getRedoAction();if(t){for(this._currentExecution.trigger="redo",this._pushAction(t);t&&(this._internalExecute(t,!0),e=this._getRedoAction(),e&&e.id===t.id);)t=e;this._popAction()}},Zf.prototype.register=function(e,t){this._setHandler(e,t)},Zf.prototype.registerHandler=function(e,t){if(!e||!t)throw new Error("command and handlerCls must be defined");const n=this._injector.instantiate(t);this.register(e,n)},Zf.prototype.canUndo=function(){return!!this._getUndoAction()},Zf.prototype.canRedo=function(){return!!this._getRedoAction()},Zf.prototype._getRedoAction=function(){return this._stack[this._stackIdx+1]},Zf.prototype._getUndoAction=function(){return this._stack[this._stackIdx]},Zf.prototype._internalUndo=function(e){const t=e.command,n=e.context,i=this._getHandler(t);this._atomicDo((()=>{this._fire(t,"revert",e),i.revert&&this._markDirty(i.revert(n)),this._revertedAction(e),this._fire(t,"reverted",e)}))},Zf.prototype._fire=function(e,t,n){arguments.length<3&&(n=t,t=null);const i=t?[e+"."+t,t]:[e];let r;n=this._eventBus.createEvent(n);for(const e of i)if(r=this._eventBus.fire("commandStack."+e,n),n.cancelBubble)break;return r},Zf.prototype._createId=function(){return this._uid++},Zf.prototype._atomicDo=function(e){const t=this._currentExecution;t.atomic=!0;try{e()}finally{t.atomic=!1}},Zf.prototype._internalExecute=function(e,t){const n=e.command,i=e.context,r=this._getHandler(n);if(!r)throw new Error("no command handler registered for <"+n+">");this._pushAction(e),t||(this._fire(n,"preExecute",e),r.preExecute&&r.preExecute(i),this._fire(n,"preExecuted",e)),this._atomicDo((()=>{this._fire(n,"execute",e),r.execute&&this._markDirty(r.execute(i)),this._executedAction(e,t),this._fire(n,"executed",e)})),t||(this._fire(n,"postExecute",e),r.postExecute&&r.postExecute(i),this._fire(n,"postExecuted",e)),this._popAction()},Zf.prototype._pushAction=function(e){const t=this._currentExecution,n=t.actions,i=n[0];if(t.atomic)throw new Error("illegal invocation in or phase (action: "+e.command+")");e.id||(e.id=i&&i.id||this._createId()),n.push(e)},Zf.prototype._popAction=function(){const e=this._currentExecution,t=e.trigger,n=e.actions,i=e.dirty;n.pop(),n.length||(this._eventBus.fire("elements.changed",{elements:M("id",i.reverse())}),i.length=0,this._fire("changed",{trigger:t}),e.trigger=null)},Zf.prototype._markDirty=function(e){const t=this._currentExecution;e&&(e=h(e)?e:[e],t.dirty=t.dirty.concat(e))},Zf.prototype._executedAction=function(e,t){const n=++this._stackIdx;t||this._stack.splice(n,this._stack.length,e)},Zf.prototype._revertedAction=function(e){this._stackIdx--},Zf.prototype._getHandler=function(e){return this._handlerMap[e]},Zf.prototype._setHandler=function(e,t){if(!e||!t)throw new Error("command and handler required");if(this._handlerMap[e])throw new Error("overriding handler for command <"+e+">");this._handlerMap[e]=t};const Jf={commandStack:["type",Zf]};function em(e,t){if("function"!=typeof t)throw new Error("removeFn iterator must be a function");if(e){for(var n;n=e[0];)t(n);return e}}function tm(e,t,n){hs.call(this,t);var i=e.get("movePreview",!1);t.on("shape.move.start",1400,(function(e){var t=e.context,n=t.shapes,i=t.validatedShapes;t.shapes=nm(n),t.validatedShapes=nm(i)})),i&&t.on("shape.move.start",250,(function(e){var t=e.context,n=t.shapes,r=[];_(n,(function(e){_(e.labels,(function(n){n.hidden||-1!==t.shapes.indexOf(n)||r.push(n),e.labelTarget&&r.push(e)}))})),_(r,(function(e){i.makeDraggable(t,e,!0)}))})),this.preExecuted("elements.move",1400,(function(e){var t=e.context.closure,n=t.enclosedElements,i=[];_(n,(function(e){_(e.labels,(function(e){n[e.id]||i.push(e)}))})),t.addAll(i)})),this.preExecute(["connection.delete","shape.delete"],(function(e){var t=e.context;em((t.connection||t.shape).labels,(function(e){n.removeShape(e,{nested:!0})}))})),this.execute("shape.delete",(function(e){var t=e.context,n=t.shape,i=n.labelTarget;i&&(t.labelTargetIndex=Mt(i.labels,n),t.labelTarget=i,n.labelTarget=null)})),this.revert("shape.delete",(function(e){var t=e.context,n=t.shape,i=t.labelTarget,r=t.labelTargetIndex;i&&(At(i.labels,n,r),n.labelTarget=i)}))}function nm(e){return w(e,(function(t){return-1===e.indexOf(t.labelTarget)}))}i(tm,hs),tm.$inject=["injector","eventBus","modeling"];const im={__init__:["labelSupport"],labelSupport:["type",tm]};var rm="attach-ok";function om(e,t,n,i,r){hs.call(this,t);var o=e.get("movePreview",!1);t.on("shape.move.start",1401,(function(e){var t,n,i=e.context,r=i.shapes,o=i.validatedShapes;i.shapes=(n=sm(t=r),D("id",t,n)),i.validatedShapes=function(e){var t=A(e,"id");return w(e,(function(e){for(;e;){if(e.host&&t[e.host.id])return!1;e=e.parent}return!0}))}(o)})),o&&t.on("shape.move.start",251,(function(e){var t=e.context;_(sm(t.shapes),(function(e){o.makeDraggable(t,e,!0),_(e.labels,(function(e){o.makeDraggable(t,e,!0)}))}))})),o&&t.on("shape.move.start",(function(e){var i=e.context.shapes;if(1===i.length){var r=i[0].host;r&&(n.addMarker(r,rm),t.once(["shape.move.out","shape.move.cleanup"],(function(){n.removeMarker(r,rm)})))}})),this.preExecuted("elements.move",1401,(function(e){var t=e.context,n=t.closure;_(sm(t.shapes),(function(e){n.add(e,n.topLevel[e.host.id])}))})),this.postExecuted("elements.move",(function(e){var t=e.context,n=t.shapes,i=t.newHost;i&&1!==n.length||_(i?n:w(n,(function(e){var t,i=e.host;return function(e){return!!e.host}(e)&&(t=i,!(-1!==n.indexOf(t)))})),(function(e){r.updateAttachment(e,i)}))})),this.postExecuted("elements.move",(function(e){_(e.context.shapes,(function(e){_(e.attachers,(function(e){_(e.outgoing.slice(),(function(e){i.allowed("connection.reconnect",{connection:e,source:e.source,target:e.target})||r.removeConnection(e)})),_(e.incoming.slice(),(function(e){i.allowed("connection.reconnect",{connection:e,source:e.source,target:e.target})||r.removeConnection(e)}))}))}))})),this.postExecute("shape.create",(function(e){var t=e.context,n=t.shape,i=t.host;i&&r.updateAttachment(n,i)})),this.postExecute("shape.replace",(function(e){var t=e.context,n=t.oldShape,o=t.newShape;em(n.attachers,(function(e){"attach"===i.allowed("elements.move",{target:o,shapes:[e]})?r.updateAttachment(e,o):r.removeShape(e)})),o.attachers.length&&_(o.attachers,(function(e){var t=ld(e,n,o);r.moveShape(e,t,e.parent)}))})),this.postExecute("shape.resize",(function(e){var t=e.context,n=t.shape,i=t.oldBounds,o=t.newBounds,s=n.attachers;!1!==(t.hints||{}).attachSupport&&_(s,(function(e){var t=ld(e,i,o);r.moveShape(e,t,e.parent),_(e.labels,(function(e){r.moveShape(e,t,e.parent)}))}))})),this.preExecute("shape.delete",(function(e){var t=e.context.shape;em(t.attachers,(function(e){r.removeShape(e)})),t.host&&r.updateAttachment(t,null)}))}function sm(e){return a(S(e,(function(e){return e.attachers||[]})))}i(om,hs),om.$inject=["injector","eventBus","canvas","rules","modeling"];const am={__depends__:[jc],__init__:["attachSupport"],attachSupport:["type",om]};function lm(e){this._model=e}function cm(e,t,n,i){hs.call(this,e),this._bpmnFactory=t,this._translate=i;var r=this;function o(e){_(e.context.oldRoot.children,(function(e){Tr(e,"bpmn:BaseElement")&&r.updateParent(e)}))}function s(e){var t=e.context.shape;Tr(t,"bpmn:BaseElement")&&r.updateBounds(t)}function a(e){r.updateConnection(e.context)}function l(e){r.updateConnectionWaypoints(e.context.connection)}function c(e){r.updateAttachment(e.context)}function p(e){const{element:n}=e.context,i=oo(n),r=Dr(n),o=r&&r.get("label");eo(n)||Os(n)||(i&&!o?r.set("label",t.create("bpmndi:BPMNLabel")):!i&&o&&r.set("label",void 0))}this.executed(["connection.layout","connection.create"],(function(e){var t,i=e.context,r=i.hints||{};i.cropped||!1===r.createElementsBehavior||((t=i.connection).waypoints=n.getCroppedWaypoints(t),i.cropped=!0)})),this.reverted(["connection.layout"],(function(e){delete e.context.cropped})),this.executed(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],pm((function(e){var t=e.context;r.updateParent(t.shape||t.connection,t.oldParent)}))),this.reverted(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],pm((function(e){var t=e.context,n=t.shape||t.connection,i=t.parent||t.newParent;r.updateParent(n,i)}))),this.executed(["canvas.updateRoot"],o),this.reverted(["canvas.updateRoot"],o),this.executed(["shape.move","shape.create","shape.resize"],pm((function(e){"label"!==e.context.shape.type&&s(e)}))),this.reverted(["shape.move","shape.create","shape.resize"],pm((function(e){"label"!==e.context.shape.type&&s(e)}))),e.on("shape.changed",(function(e){"label"===e.element.type&&s({context:{shape:e.element}})})),this.executed(["connection.create","connection.move","connection.delete","connection.reconnect"],pm(a)),this.reverted(["connection.create","connection.move","connection.delete","connection.reconnect"],pm(a)),this.executed(["connection.layout","connection.move","connection.updateWaypoints"],pm(l)),this.reverted(["connection.layout","connection.move","connection.updateWaypoints"],pm(l)),this.executed("connection.reconnect",pm((function(e){var t=e.context,n=t.connection,i=t.oldSource,r=t.newSource,o=Mr(n),s=Mr(i),a=Mr(r);o.conditionExpression&&!Ar(a,["bpmn:Activity","bpmn:ExclusiveGateway","bpmn:InclusiveGateway"])&&(t.oldConditionExpression=o.conditionExpression,delete o.conditionExpression),i!==r&&s.default===o&&(t.oldDefault=s.default,delete s.default)}))),this.reverted("connection.reconnect",pm((function(e){var t=e.context,n=t.connection,i=t.oldSource,r=t.newSource,o=Mr(n),s=Mr(i),a=Mr(r);t.oldConditionExpression&&(o.conditionExpression=t.oldConditionExpression),t.oldDefault&&(s.default=t.oldDefault,delete a.default)}))),this.executed(["element.updateAttachment"],pm(c)),this.reverted(["element.updateAttachment"],pm(c)),this.executed("element.updateLabel",pm(p)),this.reverted("element.updateLabel",pm(p))}function pm(e){return function(t){var n=t.context;Tr(n.shape||n.connection||n.element,"bpmn:BaseElement")&&e(t)}}function um(e,t,n){Kn.call(this),this._bpmnFactory=e,this._moddle=t,this._translate=n}function dm(e,t,n){return void 0===t[n]?t:(e[n]=t[n],H(t,[n]))}function hm(e,t){this._modeling=e,this._canvas=t}function fm(e){this._modeling=e}function mm(e,t){this._canvas=e,this._layouter=t}lm.$inject=["moddle"],lm.prototype._needsId=function(e){return Ar(e,["bpmn:RootElement","bpmn:FlowElement","bpmn:MessageFlow","bpmn:DataAssociation","bpmn:Artifact","bpmn:Participant","bpmn:Lane","bpmn:LaneSet","bpmn:Process","bpmn:Collaboration","bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane","bpmn:Property","bpmn:CategoryValue"])},lm.prototype._ensureId=function(e){var t;e.id?this._model.ids.claim(e.id,e):(t=Tr(e,"bpmn:Activity")?"Activity":Tr(e,"bpmn:Event")?"Event":Tr(e,"bpmn:Gateway")?"Gateway":Ar(e,["bpmn:SequenceFlow","bpmn:MessageFlow"])?"Flow":(e.$type||"").replace(/^[^:]*:/g,""),t+="_",!e.id&&this._needsId(e)&&(e.id=this._model.ids.nextPrefixed(t,e)))},lm.prototype.create=function(e,t){var n=this._model.create(e,t||{});return this._ensureId(n),n},lm.prototype.createDiLabel=function(){return this.create("bpmndi:BPMNLabel",{bounds:this.createDiBounds()})},lm.prototype.createDiShape=function(e,t){return this.create("bpmndi:BPMNShape",z({bpmnElement:e,bounds:this.createDiBounds()},t))},lm.prototype.createDiBounds=function(e){return this.create("dc:Bounds",e)},lm.prototype.createDiWaypoints=function(e){var t=this;return S(e,(function(e){return t.createDiWaypoint(e)}))},lm.prototype.createDiWaypoint=function(e){return this.create("dc:Point",V(e,["x","y"]))},lm.prototype.createDiEdge=function(e,t){return this.create("bpmndi:BPMNEdge",z({bpmnElement:e,waypoint:this.createDiWaypoints([])},t))},lm.prototype.createDiPlane=function(e,t){return this.create("bpmndi:BPMNPlane",z({bpmnElement:e},t))},i(cm,hs),cm.$inject=["eventBus","bpmnFactory","connectionDocking","translate"],cm.prototype.updateAttachment=function(e){var t=e.shape,n=t.businessObject,i=t.host;n.attachedToRef=i&&i.businessObject},cm.prototype.updateParent=function(e,t){if(!(vn(e)||Tr(e,"bpmn:DataStoreReference")&&e.parent&&Tr(e.parent,"bpmn:Collaboration"))){var n=e.parent,i=e.businessObject,r=Dr(e),o=n&&n.businessObject,s=Dr(n);Tr(e,"bpmn:FlowNode")&&this.updateFlowNodeRefs(i,o,t&&t.businessObject),Tr(e,"bpmn:DataOutputAssociation")&&(o=e.source?e.source.businessObject:null),Tr(e,"bpmn:DataInputAssociation")&&(o=e.target?e.target.businessObject:null),this.updateSemanticParent(i,o),Tr(e,"bpmn:DataObjectReference")&&i.dataObjectRef&&this.updateSemanticParent(i.dataObjectRef,o),this.updateDiParent(r,s)}},cm.prototype.updateBounds=function(e){var t=Dr(e),n=function(e){if(!Tr(e,"bpmn:Activity"))return;var t=Dr(e);if(!t)return;var n=t.get("label");if(!n)return;return n.get("bounds")}(e);if(n){var i=ia(n,t.get("bounds"));z(n,{x:e.x+i.x,y:e.y+i.y})}var r=vn(e)?this._getLabel(t):t,o=r.bounds;o||(o=this._bpmnFactory.createDiBounds(),r.set("bounds",o)),z(o,{x:e.x,y:e.y,width:e.width,height:e.height})},cm.prototype.updateFlowNodeRefs=function(e,t,n){n!==t&&(Tr(n,"bpmn:Lane")&&Tt(n.get("flowNodeRef"),e),Tr(t,"bpmn:Lane")&&At(t.get("flowNodeRef"),e))},cm.prototype.updateDiConnection=function(e,t,n){var i=Dr(e),r=Dr(t),o=Dr(n);i.sourceElement&&i.sourceElement.bpmnElement!==Mr(t)&&(i.sourceElement=t&&r),i.targetElement&&i.targetElement.bpmnElement!==Mr(n)&&(i.targetElement=n&&o)},cm.prototype.updateDiParent=function(e,t){if(t&&!Tr(t,"bpmndi:BPMNPlane")&&(t=t.$parent),e.$parent!==t){var n=(t||e.$parent).get("planeElement");t?(n.push(e),e.$parent=t):(Tt(n,e),e.$parent=null)}},cm.prototype.getLaneSet=function(e){var t,n;return Tr(e,"bpmn:Lane")?((t=e.childLaneSet)||(t=this._bpmnFactory.create("bpmn:LaneSet"),e.childLaneSet=t,t.$parent=e),t):(Tr(e,"bpmn:Participant")&&(e=e.processRef),(t=(n=e.get("laneSets"))[0])||((t=this._bpmnFactory.create("bpmn:LaneSet")).$parent=e,n.push(t)),t)},cm.prototype.updateSemanticParent=function(e,t,n){var i,r=this._translate;if(e.$parent!==t&&(!Tr(e,"bpmn:DataInput")&&!Tr(e,"bpmn:DataOutput")||(Tr(t,"bpmn:Participant")&&"processRef"in t&&(t=t.processRef),!("ioSpecification"in t)||t.ioSpecification!==e.$parent))){if(Tr(e,"bpmn:Lane"))t&&(t=this.getLaneSet(t)),i="lanes";else if(Tr(e,"bpmn:FlowElement")){if(t)if(Tr(t,"bpmn:Participant"))t=t.processRef;else if(Tr(t,"bpmn:Lane"))do{t=t.$parent.$parent}while(Tr(t,"bpmn:Lane"));i="flowElements"}else if(Tr(e,"bpmn:Artifact")){for(;t&&!Tr(t,"bpmn:Process")&&!Tr(t,"bpmn:SubProcess")&&!Tr(t,"bpmn:Collaboration");){if(Tr(t,"bpmn:Participant")){t=t.processRef;break}t=t.$parent}i="artifacts"}else if(Tr(e,"bpmn:MessageFlow"))i="messageFlows";else if(Tr(e,"bpmn:Participant")){i="participants";var o,s=e.processRef;s&&(o=function(e){for(;e&&!Tr(e,"bpmn:Definitions");)e=e.$parent;return e}(e.$parent||t),e.$parent&&(Tt(o.get("rootElements"),s),s.$parent=null),t&&(At(o.get("rootElements"),s),s.$parent=o))}else Tr(e,"bpmn:DataOutputAssociation")?i="dataOutputAssociations":Tr(e,"bpmn:DataInputAssociation")&&(i="dataInputAssociations");if(!i)throw new Error(r("no parent for {element} in {parent}",{element:e.id,parent:t.id}));var a;if(e.$parent&&Tt(a=e.$parent.get(i),e),t?((a=t.get(i)).push(e),e.$parent=t):e.$parent=null,n){var l=n.get(i);Tt(a,e),t&&(l||(l=[],t.set(i,l)),l.push(e))}}},cm.prototype.updateConnectionWaypoints=function(e){Dr(e).set("waypoint",this._bpmnFactory.createDiWaypoints(e.waypoints))},cm.prototype.updateConnection=function(e){var t,n=e.connection,i=Mr(n),r=n.source,o=Mr(r),s=n.target,a=Mr(n.target);if(Tr(i,"bpmn:DataAssociation"))Tr(i,"bpmn:DataInputAssociation")?(i.get("sourceRef")[0]=o,t=e.parent||e.newParent||a,this.updateSemanticParent(i,a,t)):Tr(i,"bpmn:DataOutputAssociation")&&(t=e.parent||e.newParent||o,this.updateSemanticParent(i,o,t),i.targetRef=a);else{var l=Tr(i,"bpmn:SequenceFlow");i.sourceRef!==o&&(l&&(Tt(i.sourceRef&&i.sourceRef.get("outgoing"),i),o&&o.get("outgoing")&&o.get("outgoing").push(i)),i.sourceRef=o),i.targetRef!==a&&(l&&(Tt(i.targetRef&&i.targetRef.get("incoming"),i),a&&a.get("incoming")&&a.get("incoming").push(i)),i.targetRef=a)}this.updateConnectionWaypoints(n),this.updateDiConnection(n,r,s)},cm.prototype._getLabel=function(e){return e.label||(e.label=this._bpmnFactory.createDiLabel()),e.label},i(um,Kn),um.$inject=["bpmnFactory","moddle","translate"],um.prototype._baseCreate=Kn.prototype.create,um.prototype.create=function(e,t){if("label"===e){var n=t.di||this._bpmnFactory.createDiLabel();return this._baseCreate(e,z({type:"label",di:n},Jr,t))}return this.createElement(e,t)},um.prototype.createElement=function(e,t){var n,i,r,o=this._translate,s=(t=z({},t||{})).businessObject,a=t.di;if(!s){if(!t.type)throw new Error(o("no shape type specified"));kr(s=this._bpmnFactory.create(t.type))}if(!Ar(a,["bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane"])){var l=z({},a||{},{id:s.id+"_di"});a="root"===e?this._bpmnFactory.createDiPlane(s,l):"connection"===e?this._bpmnFactory.createDiEdge(s,l):this._bpmnFactory.createDiShape(s,l)}return Tr(s,"bpmn:Group")&&(t=z({isFrame:!0},t)),t=function(e,t,n){return _(n,(function(n){t=dm(e,t,n)})),t}(s,t,["processRef","isInterrupting","associationDirection","isForCompensation"]),t.isExpanded&&(t=dm(a,t,"isExpanded")),Ar(s,["bpmn:Lane","bpmn:Participant"])&&(t=dm(a,t,"isHorizontal")),Tr(s,"bpmn:SubProcess")&&(t.collapsed=!Xr(s,a)),Tr(s,"bpmn:ExclusiveGateway")&&(v(t,"isMarkerVisible")?void 0===t.isMarkerVisible?a.isMarkerVisible=!1:t=dm(a,t,"isMarkerVisible"):a.isMarkerVisible=!0),u(t.triggeredByEvent)&&(s.triggeredByEvent=t.triggeredByEvent,delete t.triggeredByEvent),u(t.cancelActivity)&&(s.cancelActivity=t.cancelActivity,delete t.cancelActivity),t.eventDefinitionType&&(i=s.get("eventDefinitions")||[],r=this._bpmnFactory.create(t.eventDefinitionType,t.eventDefinitionAttrs),"bpmn:ConditionalEventDefinition"===t.eventDefinitionType&&(r.condition=this._bpmnFactory.create("bpmn:FormalExpression")),i.push(r),r.$parent=s,s.eventDefinitions=i,delete t.eventDefinitionType),n=this.getDefaultSize(s,a),t=z({id:s.id},n,t,{businessObject:s,di:a}),this._baseCreate(e,t)},um.prototype.getDefaultSize=function(e,t){var n=Mr(e);return t=t||Dr(e),Tr(n,"bpmn:SubProcess")?Xr(n,t)?{width:350,height:200}:{width:100,height:80}:Tr(n,"bpmn:Task")?{width:100,height:80}:Tr(n,"bpmn:Gateway")?{width:50,height:50}:Tr(n,"bpmn:Event")?{width:36,height:36}:Tr(n,"bpmn:Participant")?Xr(n,t)?{width:600,height:250}:{width:400,height:60}:Tr(n,"bpmn:Lane")?{width:400,height:100}:Tr(n,"bpmn:DataObjectReference")?{width:36,height:50}:Tr(n,"bpmn:DataStoreReference")?{width:50,height:50}:Tr(n,"bpmn:TextAnnotation")?{width:100,height:30}:Tr(n,"bpmn:Group")?{width:300,height:300}:{width:100,height:80}},um.prototype.createParticipantShape=function(e){return f(e)||(e={isExpanded:e}),!1!==(e=z({type:"bpmn:Participant"},e||{})).isExpanded&&(e.processRef=this._bpmnFactory.create("bpmn:Process")),this.createShape(e)},hm.$inject=["modeling","canvas"],hm.prototype.preExecute=function(e){var t=this._modeling,n=e.elements,i=e.alignment;_(n,(function(e){var n={x:0,y:0};u(i.left)?n.x=i.left-e.x:u(i.right)?n.x=i.right-e.width-e.x:u(i.center)?n.x=i.center-Math.round(e.width/2)-e.x:u(i.top)?n.y=i.top-e.y:u(i.bottom)?n.y=i.bottom-e.height-e.y:u(i.middle)&&(n.y=i.middle-Math.round(e.height/2)-e.y),t.moveElements([e],n,e.parent)}))},hm.prototype.postExecute=function(e){},fm.$inject=["modeling"],fm.prototype.preExecute=function(e){var t=e.source;if(!t)throw new Error("source required");var n=e.target||t.parent,i=e.shape,r=e.hints||{};i=e.shape=this._modeling.createShape(i,e.position,n,{attach:r.attach}),e.shape=i},fm.prototype.postExecute=function(e){var t,n,i=e.hints||{};t=e.source,n=e.shape,k(t.outgoing,(function(e){return e.target===n}))||(i.connectionTarget===e.source?this._modeling.connect(e.shape,e.source,e.connection):this._modeling.connect(e.source,e.shape,e.connection))},mm.$inject=["canvas","layouter"],mm.prototype.execute=function(e){var t=e.connection,n=e.source,i=e.target,r=e.parent,o=e.parentIndex,s=e.hints;if(!n||!i)throw new Error("source and target required");if(!r)throw new Error("parent required");return t.source=n,t.target=i,t.waypoints||(t.waypoints=this._layouter.layoutConnection(t,s)),this._canvas.addConnection(t,r,o),t},mm.prototype.revert=function(e){var t=e.connection;return this._canvas.removeConnection(t),t.source=null,t.target=null,t};var gm=Math.round;function ym(e){this._modeling=e}ym.$inject=["modeling"],ym.prototype.preExecute=function(e){var t=e.elements,n=e.parent,i=e.parentIndex,r=e.position,o=e.hints,s=this._modeling;_(t,(function(e){m(e.x)||(e.x=0),m(e.y)||(e.y=0)}));var a=Et(w(t,(function(e){return!e.hidden})));_(t,(function(e){yn(e)&&(e.waypoints=S(e.waypoints,(function(e){return{x:gm(e.x-a.x-a.width/2+r.x),y:gm(e.y-a.y-a.height/2+r.y)}}))),z(e,{x:gm(e.x-a.x-a.width/2+r.x),y:gm(e.y-a.y-a.height/2+r.y)})}));var l=yt(t),c={};_(t,(function(e){if(yn(e))c[e.id]=m(i)?s.createConnection(c[e.source.id],c[e.target.id],i,e,e.parent||n,o):s.createConnection(c[e.source.id],c[e.target.id],e,e.parent||n,o);else{var t=z({},o);-1===l.indexOf(e)&&(t.autoResize=!1),vn(e)&&(t=H(t,["attach"])),c[e.id]=m(i)?s.createShape(e,V(e,["x","y","width","height"]),e.parent||n,i,t):s.createShape(e,V(e,["x","y","width","height"]),e.parent||n,t)}})),e.elements=T(c)};var vm=Math.round;function bm(e){this._canvas=e}function xm(e){bm.call(this,e)}bm.$inject=["canvas"],bm.prototype.execute=function(e){var t=e.shape,n=e.position,i=e.parent,r=e.parentIndex;if(!i)throw new Error("parent required");if(!n)throw new Error("position required");return void 0!==n.width?z(t,n):z(t,{x:n.x-vm(t.width/2),y:n.y-vm(t.height/2)}),this._canvas.addShape(t,i,r),t},bm.prototype.revert=function(e){var t=e.shape;return this._canvas.removeShape(t),t},i(xm,bm),xm.$inject=["canvas"];var wm=bm.prototype.execute;xm.prototype.execute=function(e){var t=e.shape;return function(e){["width","height"].forEach((function(t){void 0===e[t]&&(e[t]=0)}))}(t),t.labelTarget=e.labelTarget,wm.call(this,e)};var _m=bm.prototype.revert;function Em(e,t){this._canvas=e,this._modeling=t}function Om(e,t){this._modeling=e,this._elementRegistry=t}function Pm(e,t){this._canvas=e,this._modeling=t}function km(e){this._modeling=e}xm.prototype.revert=function(e){return e.shape.labelTarget=null,_m.call(this,e)},Em.$inject=["canvas","modeling"],Em.prototype.preExecute=function(e){var t=this._modeling,n=e.connection;em(n.incoming,(function(e){t.removeConnection(e,{nested:!0})})),em(n.outgoing,(function(e){t.removeConnection(e,{nested:!0})}))},Em.prototype.execute=function(e){var t=e.connection,n=t.parent;return e.parent=n,e.parentIndex=Mt(n.children,t),e.source=t.source,e.target=t.target,this._canvas.removeConnection(t),t.source=null,t.target=null,t},Em.prototype.revert=function(e){var t=e.connection,n=e.parent,i=e.parentIndex;return t.source=e.source,t.target=e.target,At(n.children,t,i),this._canvas.addConnection(t,n),t},Om.$inject=["modeling","elementRegistry"],Om.prototype.postExecute=function(e){var t=this._modeling,n=this._elementRegistry;_(e.elements,(function(e){n.get(e.id)&&(e.waypoints?t.removeConnection(e):t.removeShape(e))}))},Pm.$inject=["canvas","modeling"],Pm.prototype.preExecute=function(e){var t=this._modeling,n=e.shape;em(n.incoming,(function(e){t.removeConnection(e,{nested:!0})})),em(n.outgoing,(function(e){t.removeConnection(e,{nested:!0})})),em(n.children,(function(e){yn(e)?t.removeConnection(e,{nested:!0}):t.removeShape(e,{nested:!0})}))},Pm.prototype.execute=function(e){var t=this._canvas,n=e.shape,i=n.parent;return e.oldParent=i,e.oldParentIndex=Mt(i.children,n),t.removeShape(n),n},Pm.prototype.revert=function(e){var t=this._canvas,n=e.shape,i=e.oldParent,r=e.oldParentIndex;return At(i.children,n,r),t.addShape(n,i),n},km.$inject=["modeling"];var Sm={x:"y",y:"x"};function Cm(e,t){this._layouter=e,this._canvas=t}function Tm(){}function Am(){this.allShapes={},this.allConnections={},this.enclosedElements={},this.enclosedConnections={},this.topLevel={}}function Mm(e){this._modeling=e}function Dm(e){this._helper=new Mm(e)}function Rm(e){this._modeling=e,this._helper=new Mm(e)}function Nm(e){this._modeling=e}function $m(e){return e.original||e}function jm(e,t){this._modeling=e,this._rules=t}function Im(e){this._modeling=e}function Lm(e){this._modeling=e}function Bm(e){return z({},e)}function qm(e){switch(e){case"n":case"s":return"y";case"w":case"e":return"x"}}function zm(e,t,n){var i=qm(n);return/e|s/.test(n)?e[i]>t:/n|w/.test(n)?e[i] required");var r=e.changed||this._getVisualReferences(n).concat(t),o=e.oldProperties||function(e,t){return O(t,(function(t,n){return t[n]=e.get(n),t}),{})}(n,C(i));return Jm(n,i),e.oldProperties=o,e.changed=r,r},Zm.prototype.revert=function(e){var t=e.oldProperties,n=e.moddleElement,i=e.changed;return Jm(n,t),i},Zm.prototype._getVisualReferences=function(e){var t=this._elementRegistry;return Tr(e,"bpmn:DataObject")?function(e,t){return t.filter((function(t){return Tr(t,"bpmn:DataObjectReference")&&Mr(t).dataObjectRef===e}))}(e,t):[]};var eg="default",tg="id",ng="di",ig={width:0,height:0};function rg(e,t,n,i,r){this._elementRegistry=e,this._moddle=t,this._translate=n,this._modeling=i,this._textRenderer=r}function og(e,t){return tg in e&&e[tg]!==t[tg]}function sg(e,t){var n=e.businessObject,i=Dr(e);_(t,(function(e,t){t!==ng?n.set(t,e):i&&function(e,t){_(t,(function(t,n){e.set(n,t)}))}(i,e)}))}rg.$inject=["elementRegistry","moddle","translate","modeling","textRenderer"],rg.prototype.execute=function(e){var t=e.element,n=[t],i=this._translate;if(!t)throw new Error(i("element required"));var r=this._elementRegistry,o=this._moddle.ids,s=t.businessObject,a=function(e){var t=z({},e);return ag.forEach((function(n){n in e&&(t[n]=Mr(t[n]))})),t}(e.properties),l=e.oldProperties||function(e,t){var n=C(t),i=e.businessObject,r=Dr(e);return O(n,(function(e,n){return e[n]=n!==ng?i.get(n):function(e,t){return O(t,(function(t,n){return t[n]=e&&e.get(n),t}),{})}(r,C(t.di)),e}),{})}(t,a);return og(a,s)&&(o.unclaim(s[tg]),r.updateId(t,a[tg]),o.claim(a[tg],s)),eg in a&&(a[eg]&&n.push(r.get(a[eg].id)),s[eg]&&n.push(r.get(s[eg].id))),sg(t,a),e.oldProperties=l,e.changed=n,n},rg.prototype.postExecute=function(e){var t=e.element.label,n=t&&Mr(t).name;if(n){var i=this._textRenderer.getExternalLabelBounds(t,n);this._modeling.resizeShape(t,i,ig)}},rg.prototype.revert=function(e){var t=e.element,n=e.properties,i=e.oldProperties,r=t.businessObject,o=this._elementRegistry,s=this._moddle.ids;return sg(t,i),og(n,r)&&(s.unclaim(n[tg]),o.updateId(t,i[tg]),s.claim(i[tg],r)),e.changed};var ag=["default"];function lg(e,t){this._canvas=e,this._modeling=t}function cg(e,t){this._modeling=e,this._spaceTool=t}function pg(e,t){this._modeling=e,this._translate=t}function ug(e,t){this._modeling=e,this._spaceTool=t}lg.$inject=["canvas","modeling"],lg.prototype.execute=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,r=t.getRootElement(),o=r.businessObject,s=o.$parent,a=Dr(r);return t.setRootElement(n),t.removeRootElement(r),At(s.rootElements,i),i.$parent=s,Tt(s.rootElements,o),o.$parent=null,r.di=null,a.bpmnElement=i,n.di=a,e.oldRoot=r,[]},lg.prototype.revert=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,r=e.oldRoot,o=r.businessObject,s=i.$parent,a=Dr(n);return t.setRootElement(r),t.removeRootElement(n),Tt(s.rootElements,i),i.$parent=null,At(s.rootElements,o),o.$parent=s,n.di=null,a.bpmnElement=o,r.di=a,[]},cg.$inject=["modeling","spaceTool"],cg.prototype.preExecute=function(e){var t=this._spaceTool,n=this._modeling,i=e.shape,r=e.location,o=Mu(i),s=o===i,a=s?i:i.parent,l=Au(a),c=Kr(i);if(c?"left"===r?r="top":"right"===r&&(r="bottom"):"top"===r?r="left":"bottom"===r&&(r="right"),!l.length){var p=c?{x:i.x+Cu,y:i.y,width:i.width-Cu,height:i.height}:{x:i.x,y:i.y+Cu,width:i.width,height:i.height-Cu};n.createShape({type:"bpmn:Lane",isHorizontal:c},p,a)}var u,d,h,f,m,g=[];xt(o,(function(e){return g.push(e),e.label&&g.push(e.label),e===i?[]:w(e.children,(function(e){return e!==i}))})),"top"===r?(u=-120,h=(d=i.y)+10,f="n",m="y"):"left"===r?(u=-120,h=(d=i.x)+10,f="w",m="x"):"bottom"===r?(u=120,h=(d=i.y+i.height)-10,f="s",m="y"):"right"===r&&(u=120,h=(d=i.x+i.width)-10,f="e",m="x");var y=t.calculateAdjustments(g,m,u,h),v=c?{x:0,y:u}:{x:u,y:0};t.makeSpace(y.movingShapes,y.resizingShapes,v,f,h);var b=c?{x:i.x+(s?Cu:0),y:d-("top"===r?120:0),width:i.width-(s?Cu:0),height:120}:{x:d-("left"===r?120:0),y:i.y+(s?Cu:0),width:120,height:i.height-(s?Cu:0)};e.newLane=n.createShape({type:"bpmn:Lane",isHorizontal:c},b,a)},pg.$inject=["modeling","translate"],pg.prototype.preExecute=function(e){var t=this._modeling,n=this._translate,i=e.shape,r=e.count,o=Au(i),s=o.length;if(s>r)throw new Error(n("more than {count} child lanes",{count:r}));var a,l,c,p,u,d=Math.round(i.height/r);for(u=0;u0||c.bottom<0?-n:n,s=a.calculateAdjustments(u,"y",o,i),a.makeSpace(s.movingShapes,s.resizingShapes,{x:0,y:n},r)),(c.left||c.right)&&(n=c.right||c.left,i=e.x+(c.right?e.width:0)+(c.right?-10:100),r=c.right?"e":"w",o=c.left>0||c.right<0?-n:n,s=a.calculateAdjustments(d,"x",o,i),a.makeSpace(s.movingShapes,s.resizingShapes,{x:n,y:0},r))};var dg="flowNodeRef",hg="lanes";function fg(e){this._elementRegistry=e}function mg(e){this._moddle=e}fg.$inject=["elementRegistry"],fg.prototype._computeUpdates=function(e,t){var n=[],i=[],r={},o=[];function s(e){-1===n.indexOf(e)&&(o.push(e),n.push(e))}function a(e){if(!e.parent)return[];var t=function(e){var t=Mu(e);return r[t.id]||(r[t.id]=Tu(t)),r[t.id]}(e);return t.filter((function(t){return n=e,i=wn(t),r=n.x+n.width/2,o=n.y+n.height/2,r>i.left&&ri.top&&o: must be specified as : with start/end in { h,v,t,r,b,l }");if(Dg(n)){var i=function(e,t,n){return Pg(e,t,n)}(e,t,n),r=function(e,t,n){var i=Pg(t,e,kg(n));return{waypoints:i.waypoints.slice().reverse(),directions:kg(i.directions),turnNextDirections:i.turnNextDirections}}(e,t,n),o=function(e,t){var n=e.directions.split(":")[1],i=t.directions.split(":")[0];e.turnNextDirections&&(n="h"==n?"v":"h"),t.turnNextDirections&&(i="h"==i?"v":"h");var r=n+":"+i;return{waypoints:Sg(e.waypoints[e.waypoints.length-1],t.waypoints[0],r),directions:r}}(i,r);return[].concat(i.waypoints,o.waypoints,r.waypoints)}return function(e,t,n){var i=Eg((t.x-e.x)/2+e.x),r=Eg((t.y-e.y)/2+e.y);if("h:v"===n)return[{x:t.x,y:e.y}];if("v:h"===n)return[{x:e.x,y:t.y}];if("h:h"===n)return[{x:i,y:e.y},{x:i,y:t.y}];if("v:v"===n)return[{x:e.x,y:r},{x:t.x,y:r}];throw new Error("invalid directions: can only handle varians of [hv]:[hv]")}(e,t,n)}function Cg(e,t,n,i,r){var o=E(r&&r.preferredLayouts||[],"straight")[0]||"h:h",s=Pn(e,t,Og[o]||0),a=function(e,t){if(Dg(t))return t;switch(e){case"intersect":return"t:t";case"top":case"bottom":return"v:v";case"left":case"right":return"h:h";default:return t}}(s,o);n=n||On(e),i=i||On(t);var l=a.split(":"),c=Rg(n,e,l[0],function(e){return{top:"bottom",bottom:"top",left:"right",right:"left","top-left":"bottom-right","bottom-right":"top-left","top-right":"bottom-left","bottom-left":"top-right"}[e]}(s));return function(e,t,n){var i=Sg(e,t,n);return i.unshift(e),i.push(t),Ng(i)}(c,Rg(i,t,l[1],s),a)}function Tg(e,t,n,i,r,o){var s;return h(n)&&(r=n,o=i,n=On(e),i=On(t)),r=r||[],s=-1!==(o=z({preferredLayouts:[]},o)).preferredLayouts.indexOf("straight")&&function(e,t,n,i,r){var o,s,a={};if(s=Pn(e,t),!/^(top|bottom|left|right)$/.test(s))return null;/top|bottom/.test(s)&&(o="x");/left|right/.test(s)&&(o="y");return"target"===r.preserveDocking?Ag(o,i,e)?(a[o]=i[o],[{x:void 0!==a.x?a.x:n.x,y:void 0!==a.y?a.y:n.y,original:{x:void 0!==a.x?a.x:n.x,y:void 0!==a.y?a.y:n.y}},{x:i.x,y:i.y}]):null:Ag(o,n,t)?(a[o]=n[o],[{x:n.x,y:n.y},{x:void 0!==a.x?a.x:i.x,y:void 0!==a.y?a.y:i.y,original:{x:void 0!==a.x?a.x:i.x,y:void 0!==a.y?a.y:i.y}}]):null}(e,t,n,i,o),s||(s=o.connectionEnd&&function(e,t,n,i){var r=i.slice().reverse();return r=Mg(e,t,n,r),r?r.reverse():null}(t,e,i,r),s||((s=o.connectionStart&&Mg(e,t,n,r))||(!o.connectionStart&&!o.connectionEnd&&r&&r.length?r:Cg(e,t,n,i,o))))}function Ag(e,t,n){return function(e,t,n){return e>=t&&e<=n}(t[e],n[e],n[e]+n[{x:"width",y:"height"}[e]])}function Mg(e,t,n,i){if(function(e){return e.length<3||!(e.length>4)&&!!b(e,(function(t,n){var i=e[n-1];return i&&Dt(t,i)<3}))}(i))return null;var r,o=i[0],s=i.slice();return s[0]=n,s[1]=function(e,t,n){switch(Nt(t,e)){case"v":return{x:n.x,y:e.y};case"h":return{x:e.x,y:n.y}}return{x:e.x,y:e.y}}(s[1],o,n),r=function(e,t,n){var i;for(i=e.length-2;0!==i;i--)if(jt(e[i],t,20)||jt(e[i],n,20))return e.slice(i);return e}(s,e,t),r!==s&&(s=Mg(e,t,n,r)),s&&Nt(s)?null:s}function Dg(e){return e&&/t|r|b|l/.test(e)}function Rg(e,t,n,i){if("h"===n&&(n=/left/.test(i)?"l":"r"),"v"===n&&(n=/top/.test(i)?"t":"b"),"t"===n)return{original:e,x:e.x,y:t.y};if("r"===n)return{original:e,x:t.x+t.width,y:e.y};if("b"===n)return{original:e,x:e.x,y:t.y+t.height};if("l"===n)return{original:e,x:t.x,y:e.y};throw new Error("unexpected dockingDirection: <"+n+">")}function Ng(e){return e.reduce((function(t,n,i){return Rt(t[t.length-1],e[i+1],n,0)||t.push(n),t}),[])}var $g={top:"bottom","top-right":"bottom-left","top-left":"bottom-right",right:"left",bottom:"top","bottom-right":"top-left","bottom-left":"top-right",left:"right"},jg={top:"t",right:"r",bottom:"b",left:"l"};function Ig(){}function Lg(e,t){return Tr(t,"bpmn:Participant")?"source":Tr(e,"bpmn:Participant")?"target":Fg(t)?"source":Fg(e)||Tr(t,"bpmn:Event")?"target":Tr(e,"bpmn:Event")?"source":null}function Bg(e){return Fg(e)?"target":"source"}function qg(e,t){return e?e.original||e:On(t)}function zg(e,t){return Tr(t,"bpmn:Activity")&&Tr(e,"bpmn:BoundaryEvent")&&t.businessObject.isForCompensation}function Fg(e){return Tr(e,"bpmn:SubProcess")&&Xr(e)}function Vg(e,t){return e===t}function Hg(e){var t=/right|left/.exec(e);return t&&t[0]}function Ug(e){var t=/top|bottom/.exec(e);return t&&t[0]}function Wg(e){return"right"===e||"left"===e}function Gg(e,t){var n=t.waypoints,i=n&&n.length&&Pn(n[0],e);return"top"===i?["t:r"]:"right"===i?["r:b"]:"left"===i?["l:t"]:["b:l"]}function Qg(e,t,n){var i,r,o,s,a=On(e),l=On(t),c=(s=(o=e).host,Pn(On(o),s,-10)),p=Vg(e.host,t),u=-1!==["top","right","bottom","left"].indexOf(c),d=Pn(l,a,{x:e.width/2+t.width/2,y:e.height/2+t.height/2});return p?function(e,t,n,i,r){var o,s=t?e:Ug(e),a=jg[s];o=t?Wg(e)?Xg("y",n,i,r)?"h":"b":Xg("x",n,i,r)?"v":"l":"v";return[a+":"+o]}(c,u,e,t,n):(i=function(e,t,n){if(n)return jg[e];if(Vg(Ug(e),Ug(t))||function(e,t){return $g[e]===t}(Hg(e),Hg(t)))return jg[Ug(e)];return jg[Hg(e)]}(c,d,u),r=function(e,t,n){if(n)return Wg(e)?function(e,t){var n=Hg(e),i=$g[n];return-1!==t.indexOf(i)}(e,t)||Vg(e,t)?"h":"v":function(e,t){var n=Ug(e),i=$g[n];return-1!==t.indexOf(i)}(e,t)||Vg(e,t)?"v":"h";return Wg(t)||Vg(Ug(e),Ug(t))&&Hg(t)?"h":"v"}(c,d,u),[i+":"+r])}function Xg(e,t,n,i){return!(Kg(e,i,n,40)||Kg(e,i,{x:n.x+n.width,y:n.y+n.height},40)||Kg(e,i,On(t),40))}function Kg(e,t,n,i){return Math.abs(t[e]-n[e])!d(e)))})},ty.prototype.cleanUp=function(){this._complexPreview.cleanUp()},ty.$inject=["complexPreview","connectionDocking","elementFactory","eventBus","layouter","rules"];const ny={__depends__:[bc,Wp,Jg],__init__:["appendPreview"],appendPreview:["type",ty]};function iy(e){return e.originalEvent||e.srcEvent}function ry(e,t){return(iy(e)||e).button===t}function oy(e){return ry(e,0)}function sy(e){return["L",e.x,e.y]}function ay(e,t){const n=e.length,i=[(r=e[0],["M",r.x,r.y])];var r,o,s,a;for(let r=1;r");return Te(e,n),e}function y(e,t){ke(e,t)}this.removeHits=function(e){_(_e(".djs-hit",e),Ke)},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=function(e,t,n){m(t)&&(n=t,t=null),t||(t={});const i=Le("path",t);return m(n)&&(i.dataset.cornerRadius=String(n)),py(i,e)}(t);return g(n,"stroke"),y(e,n),n},this.createBoxHit=function(e,t,n){n=z({x:0,y:0},n);var i=Le("rect");return g(i,t),Te(i,n),y(e,i),i},this.updateDefaultHit=function(e,t){var n=we(".djs-hit",t);if(n)return e.waypoints?py(n,e.waypoints):Te(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=c,this.unregisterEvent=p}hy.$inject=["eventBus","elementRegistry","styles"];const fy={__init__:["interactionEvents"],interactionEvents:["type",hy]};var my=Math.min,gy=Math.max;function yy(e){e.preventDefault()}function vy(e){e.stopPropagation()}function by(e){this.container=e.container,this.parent=be('
    '),this.content=we("[contenteditable]",this.parent),this.keyHandler=e.keyHandler||function(){},this.resizeHandler=e.resizeHandler||function(){},this.autoResize=q(this.autoResize,this),this.handlePaste=q(this.handlePaste,this)}function xy(e,t){this._eventBus=e,this._providers=[],this._textbox=new by({container:t.getContainer(),keyHandler:q(this._handleKey,this),resizeHandler:q(this._handleResize,this)})}by.prototype.create=function(e,t,n,i){var r=this.parent,o=this.content,s=this.container;i=this.options=i||{};var a=V(t=this.style=t||{},["width","height","maxWidth","maxHeight","minWidth","minHeight","left","top","backgroundColor","position","overflow","border","wordWrap","textAlign","outline","transform"]);z(r.style,{width:e.width+"px",height:e.height+"px",maxWidth:e.maxWidth+"px",maxHeight:e.maxHeight+"px",minWidth:e.minWidth+"px",minHeight:e.minHeight+"px",left:e.x+"px",top:e.y+"px",backgroundColor:"#ffffff",position:"absolute",overflow:"visible",border:"1px solid #ccc",boxSizing:"border-box",wordWrap:"normal",textAlign:"center",outline:"none"},a);var l=V(t,["fontFamily","fontSize","fontWeight","lineHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"]);return z(o.style,{boxSizing:"border-box",width:"100%",outline:"none",wordWrap:"break-word"},l),i.centerVertically&&z(o.style,{position:"absolute",top:"50%",transform:"translate(0, -50%)"},l),o.innerText=n,de.bind(o,"keydown",this.keyHandler),de.bind(o,"mousedown",vy),de.bind(o,"paste",this.handlePaste),i.autoResize&&de.bind(o,"input",this.autoResize),i.resizable&&this.resizable(t),s.appendChild(r),this.setSelection(o.lastChild,o.lastChild&&o.lastChild.length),r},by.prototype.handlePaste=function(e){var t,n=this.options,i=this.style;if(e.preventDefault(),t=e.clipboardData?e.clipboardData.getData("text/plain"):window.clipboardData.getData("Text"),this.insertText(t),n.autoResize){var r=this.autoResize(i);r&&this.resizeHandler(r)}},by.prototype.insertText=function(e){e=function(e){return e.replace(/\r\n|\r|\n/g,"\n")}(e),document.execCommand("insertText",!1,e)||this._insertTextIE(e)},by.prototype._insertTextIE=function(e){var t,n,i,r=this.getSelection(),o=r.startContainer,s=r.endContainer,a=r.startOffset,l=r.endOffset,c=r.commonAncestorContainer,p=(t=c.childNodes,[].slice.call(t));if(function(e){return e.nodeType===Node.TEXT_NODE}(c)){var u=o.textContent;o.textContent=u.substring(0,a)+e+u.substring(l),n=o,i=a+e.length}else if(o===this.content&&s===this.content){var d=document.createTextNode(e);this.content.insertBefore(d,p[a]),n=d,i=d.textContent.length}else{var h=p.indexOf(o),f=p.indexOf(s);p.forEach((function(t,n){n===h?t.textContent=o.textContent.substring(0,a)+e+s.textContent.substring(l):n>h&&n<=f&&Ee(t)})),n=o,i=a+e.length}n&&void 0!==i&&setTimeout((function(){self.setSelection(n,i)}))},by.prototype.autoResize=function(){var e=this.parent,t=this.content,n=parseInt(this.style.fontSize)||12;if(t.scrollHeight>e.offsetHeight||t.scrollHeight
    ');var u=function(n){yy(n),vy(n);var u=my(gy(c+n.clientX-a,i),o),d=my(gy(p+n.clientY-l,r),s);t.style.width=u+"px",t.style.height=d+"px",e.resizeHandler({width:c,height:p,dx:n.clientX-a,dy:n.clientY-l})},d=function(e){yy(e),vy(e),de.unbind(document,"mousemove",u,!1),de.unbind(document,"mouseup",d,!1)};de.bind(n,"mousedown",(function(e){yy(e),vy(e),a=e.clientX,l=e.clientY;var n=t.getBoundingClientRect();c=n.width,p=n.height,de.bind(document,"mousemove",u),de.bind(document,"mouseup",d)}))}z(n.style,{position:"absolute",bottom:"0px",right:"0px",cursor:"nwse-resize",width:"0",height:"0",borderTop:(parseInt(this.style.fontSize)/4||3)+"px solid transparent",borderRight:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderBottom:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderLeft:(parseInt(this.style.fontSize)/4||3)+"px solid transparent"}),t.appendChild(n)},by.prototype.destroy=function(){var e=this.parent,t=this.content,n=this.resizeHandle;t.innerText="",e.removeAttribute("style"),t.removeAttribute("style"),de.unbind(t,"keydown",this.keyHandler),de.unbind(t,"mousedown",vy),de.unbind(t,"input",this.autoResize),de.unbind(t,"paste",this.handlePaste),n&&(n.removeAttribute("style"),Ee(n)),Ee(e)},by.prototype.getValue=function(){return this.content.innerText.trim()},by.prototype.getSelection=function(){return window.getSelection().getRangeAt(0)},by.prototype.setSelection=function(e,t){var n=document.createRange();null===e?n.selectNodeContents(this.content):(n.setStart(e,t),n.setEnd(e,t));var i=window.getSelection();i.removeAllRanges(),i.addRange(n)},xy.$inject=["eventBus","canvas"],xy.prototype.registerProvider=function(e){this._providers.push(e)},xy.prototype.isActive=function(e){return!(!this._active||e&&this._active.element!==e)},xy.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close())},xy.prototype._fire=function(e,t){this._eventBus.fire("directEditing."+e,t||{active:this._active})},xy.prototype.close=function(){this._textbox.destroy(),this._fire("deactivate"),this._active=null,this.resizable=void 0},xy.prototype.complete=function(){var e=this._active;if(e){var t,n=e.context.bounds,i=this.$textbox.getBoundingClientRect(),r=this.getValue();r===e.context.text&&i.height===n.height&&i.width===n.width||(t=this._textbox.container.getBoundingClientRect(),e.provider.update(e.element,r,e.context.text,{x:i.left-t.left,y:i.top-t.top,width:i.width,height:i.height})),this._fire("complete"),this.close()}},xy.prototype.getValue=function(){return this._textbox.getValue()},xy.prototype._handleKey=function(e){e.stopPropagation();var t=e.keyCode||e.charCode;return 27===t?(e.preventDefault(),this.cancel()):13!==t||e.shiftKey?void 0:(e.preventDefault(),this.complete())},xy.prototype._handleResize=function(e){this._fire("resize",e)},xy.prototype.activate=function(e){var t;this.isActive()&&this.cancel();var n=b(this._providers,(function(n){return(t=n.activate(e))?n:null}));return t&&(this.$textbox=this._textbox.create(t.bounds,t.style,t.text,t.options),this._active={element:e,context:t,provider:n},t.options&&t.options.resizable&&(this.resizable=!0),this._fire("activate")),!!t};const wy={__depends__:[fy],__init__:["directEditing"],directEditing:["type",xy]};function _y(e){return function(t){var n=t.target,i=Mr(e),r=i.eventDefinitions&&i.eventDefinitions[0],o=i.$type===n.type,s=(r&&r.$type)===n.eventDefinitionType,a=!!n.triggeredByEvent==!!i.triggeredByEvent,l=void 0===n.isExpanded||n.isExpanded===Xr(e);return!(o&&s&&a&&l)}}var Ey=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message start event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer start event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional start event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal start event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],Oy=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}}],Py=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message intermediate catch event",actionName:"replace-with-message-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Message intermediate throw event",actionName:"replace-with-message-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-message",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer intermediate catch event",actionName:"replace-with-timer-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation intermediate throw event",actionName:"replace-with-escalation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-escalation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional intermediate catch event",actionName:"replace-with-conditional-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Link intermediate catch event",actionName:"replace-with-link-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-link",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Link intermediate throw event",actionName:"replace-with-link-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-link",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Compensation intermediate throw event",actionName:"replace-with-compensation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-compensation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal intermediate catch event",actionName:"replace-with-signal-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Signal intermediate throw event",actionName:"replace-with-signal-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-signal",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],ky=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message end event",actionName:"replace-with-message-end",className:"bpmn-icon-end-event-message",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Escalation end event",actionName:"replace-with-escalation-end",className:"bpmn-icon-end-event-escalation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Error end event",actionName:"replace-with-error-end",className:"bpmn-icon-end-event-error",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel end event",actionName:"replace-with-cancel-end",className:"bpmn-icon-end-event-cancel",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Compensation end event",actionName:"replace-with-compensation-end",className:"bpmn-icon-end-event-compensation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal end event",actionName:"replace-with-signal-end",className:"bpmn-icon-end-event-signal",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Terminate end event",actionName:"replace-with-terminate-end",className:"bpmn-icon-end-event-terminate",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:TerminateEventDefinition"}}],Sy=[{label:"Exclusive gateway",actionName:"replace-with-exclusive-gateway",className:"bpmn-icon-gateway-xor",target:{type:"bpmn:ExclusiveGateway"}},{label:"Parallel gateway",actionName:"replace-with-parallel-gateway",className:"bpmn-icon-gateway-parallel",target:{type:"bpmn:ParallelGateway"}},{label:"Inclusive gateway",actionName:"replace-with-inclusive-gateway",className:"bpmn-icon-gateway-or",target:{type:"bpmn:InclusiveGateway"}},{label:"Complex gateway",actionName:"replace-with-complex-gateway",className:"bpmn-icon-gateway-complex",target:{type:"bpmn:ComplexGateway"}},{label:"Event-based gateway",actionName:"replace-with-event-based-gateway",className:"bpmn-icon-gateway-eventbased",target:{type:"bpmn:EventBasedGateway",instantiate:!1,eventGatewayType:"Exclusive"}}],Cy=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Event sub-process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}},{label:"Sub-process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}}],Ty=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Sub-process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Event sub-process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}}],Ay=Ty,My=[{label:"Task",actionName:"replace-with-task",className:"bpmn-icon-task",target:{type:"bpmn:Task"}},{label:"User task",actionName:"replace-with-user-task",className:"bpmn-icon-user",target:{type:"bpmn:UserTask"}},{label:"Service task",actionName:"replace-with-service-task",className:"bpmn-icon-service",target:{type:"bpmn:ServiceTask"}},{label:"Send task",actionName:"replace-with-send-task",className:"bpmn-icon-send",target:{type:"bpmn:SendTask"}},{label:"Receive task",actionName:"replace-with-receive-task",className:"bpmn-icon-receive",target:{type:"bpmn:ReceiveTask"}},{label:"Manual task",actionName:"replace-with-manual-task",className:"bpmn-icon-manual",target:{type:"bpmn:ManualTask"}},{label:"Business rule task",actionName:"replace-with-rule-task",className:"bpmn-icon-business-rule",target:{type:"bpmn:BusinessRuleTask"}},{label:"Script task",actionName:"replace-with-script-task",className:"bpmn-icon-script",target:{type:"bpmn:ScriptTask"}},{label:"Call activity",actionName:"replace-with-call-activity",className:"bpmn-icon-call-activity",target:{type:"bpmn:CallActivity"}},{label:"Sub-process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}},{label:"Sub-process (expanded)",actionName:"replace-with-expanded-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}}],Dy=[{label:"Data store reference",actionName:"replace-with-data-store-reference",className:"bpmn-icon-data-store",target:{type:"bpmn:DataStoreReference"}}],Ry=[{label:"Data object reference",actionName:"replace-with-data-object-reference",className:"bpmn-icon-data-object",target:{type:"bpmn:DataObjectReference"}}],Ny=[{label:"Message boundary event",actionName:"replace-with-message-boundary",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!0}},{label:"Timer boundary event",actionName:"replace-with-timer-boundary",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!0}},{label:"Escalation boundary event",actionName:"replace-with-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!0}},{label:"Conditional boundary event",actionName:"replace-with-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!0}},{label:"Error boundary event",actionName:"replace-with-error-boundary",className:"bpmn-icon-intermediate-event-catch-error",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ErrorEventDefinition",cancelActivity:!0}},{label:"Cancel boundary event",actionName:"replace-with-cancel-boundary",className:"bpmn-icon-intermediate-event-catch-cancel",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CancelEventDefinition",cancelActivity:!0}},{label:"Signal boundary event",actionName:"replace-with-signal-boundary",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!0}},{label:"Compensation boundary event",actionName:"replace-with-compensation-boundary",className:"bpmn-icon-intermediate-event-catch-compensation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CompensateEventDefinition",cancelActivity:!0}},{label:"Message boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-message-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!1}},{label:"Timer boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!1}},{label:"Escalation boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!1}},{label:"Conditional boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!1}},{label:"Signal boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!1}}],$y=[{label:"Message start event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!0}},{label:"Timer start event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!0}},{label:"Conditional start event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!0}},{label:"Signal start event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!0}},{label:"Error start event",actionName:"replace-with-error-start",className:"bpmn-icon-start-event-error",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ErrorEventDefinition",isInterrupting:!0}},{label:"Escalation start event",actionName:"replace-with-escalation-start",className:"bpmn-icon-start-event-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!0}},{label:"Compensation start event",actionName:"replace-with-compensation-start",className:"bpmn-icon-start-event-compensation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:CompensateEventDefinition",isInterrupting:!0}},{label:"Message start event (non-interrupting)",actionName:"replace-with-non-interrupting-message-start",className:"bpmn-icon-start-event-non-interrupting-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!1}},{label:"Timer start event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-start",className:"bpmn-icon-start-event-non-interrupting-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!1}},{label:"Conditional start event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-start",className:"bpmn-icon-start-event-non-interrupting-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!1}},{label:"Signal start event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-start",className:"bpmn-icon-start-event-non-interrupting-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!1}},{label:"Escalation start event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-start",className:"bpmn-icon-start-event-non-interrupting-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!1}}],jy=[{label:"Sequence flow",actionName:"replace-with-sequence-flow",className:"bpmn-icon-connection"},{label:"Default flow",actionName:"replace-with-default-flow",className:"bpmn-icon-default-flow"},{label:"Conditional flow",actionName:"replace-with-conditional-flow",className:"bpmn-icon-conditional-flow"}],Iy=[{label:"Expanded pool/participant",actionName:"replace-with-expanded-pool",className:"bpmn-icon-participant",target:{type:"bpmn:Participant",isExpanded:!0}},{label:function(e){var t="Empty pool/participant";return e.children&&e.children.length&&(t+=" (removes content)"),t},actionName:"replace-with-collapsed-pool",className:"bpmn-icon-lane",target:{type:"bpmn:Participant",isExpanded:!1}}];const Ly={"start-event-non-interrupting":'\n \n \n \n \n ',"intermediate-event-non-interrupting":'\n \n \n \n \n \n '};function By(e,t,n,i,r,o,s,a){this._bpmnFactory=e,this._popupMenu=t,this._modeling=n,this._moddle=i,this._bpmnReplace=r,this._rules=o,this._translate=s,this._moddleCopy=a,this._register()}By.$inject=["bpmnFactory","popupMenu","modeling","moddle","bpmnReplace","rules","translate","moddleCopy"],By.prototype._register=function(){this._popupMenu.registerProvider("bpmn-replace",this)},By.prototype.getPopupMenuEntries=function(e){var t=e.businessObject,n=this._rules,i=[];if(h(e)||!n.allowed("shape.replace",{element:e}))return{};var r=_y(e);return Tr(t,"bpmn:DataObjectReference")?this._createEntries(e,Dy):Tr(t,"bpmn:DataStoreReference")&&!Tr(e.parent,"bpmn:Collaboration")?this._createEntries(e,Ry):Tr(t,"bpmn:StartEvent")&&!Tr(t.$parent,"bpmn:SubProcess")?(i=w(Ey,r),this._createEntries(e,i)):Tr(t,"bpmn:Participant")?(i=w(Iy,(function(t){return Xr(e)!==t.target.isExpanded})),this._createEntries(e,i)):Tr(t,"bpmn:StartEvent")&&Yr(t.$parent)?(i=w($y,(function(e){var n=!1!==e.target.isInterrupting,i=t.isInterrupting===n;return r(e)||!r(e)&&!i})),this._createEntries(e,i)):Tr(t,"bpmn:StartEvent")&&!Yr(t.$parent)&&Tr(t.$parent,"bpmn:SubProcess")?(i=w(Oy,r),this._createEntries(e,i)):Tr(t,"bpmn:EndEvent")?(i=w(ky,(function(e){return!("bpmn:CancelEventDefinition"==e.target.eventDefinitionType&&!Tr(t.$parent,"bpmn:Transaction"))&&r(e)})),this._createEntries(e,i)):Tr(t,"bpmn:BoundaryEvent")?(i=w(Ny,(function(e){var n=e.target;if("bpmn:CancelEventDefinition"==n.eventDefinitionType&&!Tr(t.attachedToRef,"bpmn:Transaction"))return!1;var i=!1!==n.cancelActivity,o=t.cancelActivity==i;return r(e)||!r(e)&&!o})),this._createEntries(e,i)):Tr(t,"bpmn:IntermediateCatchEvent")||Tr(t,"bpmn:IntermediateThrowEvent")?(i=w(Py,r),this._createEntries(e,i)):Tr(t,"bpmn:Gateway")?(i=w(Sy,r),this._createEntries(e,i)):Tr(t,"bpmn:Transaction")?(i=w(Ty,r),this._createEntries(e,i)):Yr(t)&&Xr(e)?(i=w(Ay,r),this._createEntries(e,i)):Tr(t,"bpmn:SubProcess")&&Xr(e)?(i=w(Cy,r),this._createEntries(e,i)):Tr(t,"bpmn:AdHocSubProcess")&&!Xr(e)?(i=w(My,(function(e){var t=e.target,n="bpmn:SubProcess"===t.type,i=!0===t.isExpanded;return _y(t)&&(!n||i)})),this._createEntries(e,i)):Tr(t,"bpmn:SequenceFlow")?this._createSequenceFlowEntries(e,jy):Tr(t,"bpmn:FlowNode")?(i=w(My,r),Tr(t,"bpmn:SubProcess")&&!Xr(e)&&(i=w(i,(function(e){return"Sub-process (collapsed)"!==e.label}))),this._createEntries(e,i)):{}},By.prototype.getPopupMenuHeaderEntries=function(e){var t={};return Tr(e,"bpmn:Activity")&&!Yr(e)&&(t={...t,...this._getLoopCharacteristicsHeaderEntries(e)}),Tr(e,"bpmn:DataObjectReference")&&(t={...t,...this._getCollectionHeaderEntries(e)}),Tr(e,"bpmn:Participant")&&(t={...t,...this._getParticipantMultiplicityHeaderEntries(e)}),!Tr(e,"bpmn:SubProcess")||Tr(e,"bpmn:Transaction")||Yr(e)||(t={...t,...this._getAdHocHeaderEntries(e)}),Ed(e)&&(t={...t,...this._getNonInterruptingHeaderEntries(e)}),t},By.prototype._createEntries=function(e,t){var n={},i=this;return _(t,(function(t){n[t.actionName]=i._createEntry(t,e)})),n},By.prototype._createSequenceFlowEntries=function(e,t){var n=Mr(e),i={},r=this._modeling,o=this._moddle,s=this;return _(t,(function(t){switch(t.actionName){case"replace-with-default-flow":n.sourceRef.default!==n&&(Tr(n.sourceRef,"bpmn:ExclusiveGateway")||Tr(n.sourceRef,"bpmn:InclusiveGateway")||Tr(n.sourceRef,"bpmn:ComplexGateway")||Tr(n.sourceRef,"bpmn:Activity"))&&(i={...i,[t.actionName]:s._createEntry(t,e,(function(){r.updateProperties(e.source,{default:n})}))});break;case"replace-with-conditional-flow":!n.conditionExpression&&Tr(n.sourceRef,"bpmn:Activity")&&(i={...i,[t.actionName]:s._createEntry(t,e,(function(){var t=o.create("bpmn:FormalExpression",{body:""});r.updateProperties(e,{conditionExpression:t})}))});break;default:Tr(n.sourceRef,"bpmn:Activity")&&n.conditionExpression&&(i={...i,[t.actionName]:s._createEntry(t,e,(function(){r.updateProperties(e,{conditionExpression:void 0})}))}),(Tr(n.sourceRef,"bpmn:ExclusiveGateway")||Tr(n.sourceRef,"bpmn:InclusiveGateway")||Tr(n.sourceRef,"bpmn:ComplexGateway")||Tr(n.sourceRef,"bpmn:Activity"))&&n.sourceRef.default===n&&(i={...i,[t.actionName]:s._createEntry(t,e,(function(){r.updateProperties(e.source,{default:void 0})}))})}})),i},By.prototype._createEntry=function(e,t,n){var i=this._translate,r=this._bpmnReplace.replaceElement,o=e.label;return o&&"function"==typeof o&&(o=o(t)),n=n||function(){return r(t,e.target)},{label:i(o),className:e.className,action:n}},By.prototype._getLoopCharacteristicsHeaderEntries=function(e){var t=this,n=this._translate;function i(n,i){if(i.active)return void t._modeling.updateProperties(e,{loopCharacteristics:void 0});const r=e.businessObject.get("loopCharacteristics"),o=t._moddle.create(i.options.loopCharacteristics);r&&t._moddleCopy.copyElement(r,o),o.set("isSequential",i.options.isSequential),t._modeling.updateProperties(e,{loopCharacteristics:o})}var r,o,s,a=Mr(e).loopCharacteristics;return a&&(r=a.isSequential,o=void 0===a.isSequential,s=void 0!==a.isSequential&&!a.isSequential),{"toggle-parallel-mi":{className:"bpmn-icon-parallel-mi-marker",title:n("Parallel multi-instance"),active:s,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!1}},"toggle-sequential-mi":{className:"bpmn-icon-sequential-mi-marker",title:n("Sequential multi-instance"),active:r,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!0}},"toggle-loop":{className:"bpmn-icon-loop-marker",title:n("Loop"),active:o,action:i,options:{loopCharacteristics:"bpmn:StandardLoopCharacteristics"}}}},By.prototype._getCollectionHeaderEntries=function(e){var t=this,n=this._translate,i=e.businessObject.dataObjectRef;if(!i)return{};var r=i.isCollection;return{"toggle-is-collection":{className:"bpmn-icon-parallel-mi-marker",title:n("Collection"),active:r,action:function(n,r){t._modeling.updateModdleProperties(e,i,{isCollection:!r.active})}}}},By.prototype._getParticipantMultiplicityHeaderEntries=function(e){var t=this,n=this._bpmnFactory,i=this._translate;var r=e.businessObject.participantMultiplicity;return{"toggle-participant-multiplicity":{className:"bpmn-icon-parallel-mi-marker",title:i("Participant multiplicity"),active:!!r,action:function(i,r){var o;r.active||(o=n.create("bpmn:ParticipantMultiplicity")),t._modeling.updateProperties(e,{participantMultiplicity:o})}}}},By.prototype._getAdHocHeaderEntries=function(e){var t=this._translate,n=Tr(Mr(e),"bpmn:AdHocSubProcess"),i=this._bpmnReplace.replaceElement;return{"toggle-adhoc":{className:"bpmn-icon-ad-hoc-marker",title:t("Ad-hoc"),active:n,action:function(t,r){return i(e,n?{type:"bpmn:SubProcess"}:{type:"bpmn:AdHocSubProcess"},{autoResize:!1,layoutConnection:!1})}}}},By.prototype._getNonInterruptingHeaderEntries=function(e){const t=this._translate,n=Mr(e),i=this,r=Od(e),o=Tr(e,"bpmn:BoundaryEvent")?Ly["intermediate-event-non-interrupting"]:Ly["start-event-non-interrupting"],s=!n[r];return{"toggle-non-interrupting":{imageHtml:o,title:t("Toggle non-interrupting"),active:s,action:function(){i._modeling.updateProperties(e,{[r]:!!s})}}}};const qy={__depends__:[ec,Mf,bc],__init__:["replaceMenuProvider"],replaceMenuProvider:["type",By]};function zy(e,t,n,i,r,o,s,a,l,c,p,u,d){e=e||{},i.registerProvider(this),this._contextPad=i,this._modeling=r,this._elementFactory=o,this._connect=s,this._create=a,this._popupMenu=l,this._canvas=c,this._rules=p,this._translate=u,this._eventBus=n,this._appendPreview=d,!1!==e.autoPlace&&(this._autoPlace=t.get("autoPlace",!1)),n.on("create.end",250,(function(e){var t=e.context.shape;if(Vo(e)&&i.isOpen(t)){var n=i.getEntries(t);n.replace&&n.replace.action.click(e,t)}}))}function Fy(e,t,n){var i=e.$instanceOf(t),r=!1;return _(e.eventDefinitions||[],(function(e){e.$type===n&&(r=!0)})),i&&r}zy.$inject=["config.contextPad","injector","eventBus","contextPad","modeling","elementFactory","connect","create","popupMenu","canvas","rules","translate","appendPreview"],zy.prototype.getMultiElementContextPadEntries=function(e){var t=this._modeling,n={};return this._isDeleteAllowed(e)&&z(n,{delete:{group:"edit",className:"bpmn-icon-trash",title:this._translate("Delete"),action:{click:function(e,n){t.removeElements(n.slice())}}}}),n},zy.prototype._isDeleteAllowed=function(e){var t=this._rules.allowed("elements.delete",{elements:e});return h(t)?P(t,(function(e){return n=e,-1!==t.indexOf(n);var n})):t},zy.prototype.getContextPadEntries=function(e){var t=this._contextPad,n=this._modeling,i=this._elementFactory,r=this._connect,o=this._create,s=this._popupMenu,a=this._rules,l=this._autoPlace,c=this._translate,p=this._appendPreview,u={};if("label"===e.type)return u;var d=e.businessObject;function f(e,t){r.start(e,t)}function m(e,t,n,r){function s(t,n){var s=i.createShape(z({type:e},r));o.start(t,s,{source:n}),p.cleanUp()}var a=l?function(t,n){var o=i.createShape(z({type:e},r));l.append(n,o),p.cleanUp()}:s,c=l?function(t,n){return p.create(n,e,r),()=>{p.cleanUp()}}:null;return{group:"model",className:t,title:n,action:{dragstart:s,click:a,hover:c}}}function g(e){return function(i,r){n.splitLane(r,e),t.open(r,!0)}}if(Ar(d,["bpmn:Lane","bpmn:Participant"])&&Xr(e)){var y=Au(e);z(u,{"lane-insert-above":{group:"lane-insert-above",className:"bpmn-icon-lane-insert-above",title:c("Add lane above"),action:{click:function(e,t){n.addLane(t,"top")}}}}),y.length<2&&(e.height>=120&&z(u,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:c("Divide into two lanes"),action:{click:g(2)}}}),e.height>=180&&z(u,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:c("Divide into three lanes"),action:{click:g(3)}}})),z(u,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:c("Add lane below"),action:{click:function(e,t){n.addLane(t,"bottom")}}}})}Tr(d,"bpmn:FlowNode")&&(Tr(d,"bpmn:EventBasedGateway")?z(u,{"append.receive-task":m("bpmn:ReceiveTask","bpmn-icon-receive-task",c("Append receive task")),"append.message-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",c("Append message intermediate catch event"),{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",c("Append timer intermediate catch event"),{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condition-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",c("Append conditional intermediate catch event"),{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",c("Append signal intermediate catch event"),{eventDefinitionType:"bpmn:SignalEventDefinition"})}):Fy(d,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?z(u,{"append.compensation-activity":m("bpmn:Task","bpmn-icon-task",c("Append compensation activity"),{isForCompensation:!0})}):Tr(d,"bpmn:EndEvent")||d.isForCompensation||Fy(d,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")||Yr(d)||z(u,{"append.end-event":m("bpmn:EndEvent","bpmn-icon-end-event-none",c("Append end event")),"append.gateway":m("bpmn:ExclusiveGateway","bpmn-icon-gateway-none",c("Append gateway")),"append.append-task":m("bpmn:Task","bpmn-icon-task",c("Append task")),"append.intermediate-event":m("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none",c("Append intermediate/boundary event"))})),s.isEmpty(e,"bpmn-replace")||z(u,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:c("Change element"),action:{click:function(e,n){var i=z(function(e){var n=t.getPad(e).html.getBoundingClientRect();return{x:n.left,y:n.bottom+5}}(n),{cursor:{x:e.x,y:e.y}});s.open(n,"bpmn-replace",i,{title:c("Change element"),width:300,search:!0})}}}}),Tr(d,"bpmn:SequenceFlow")&&z(u,{"append.text-annotation":m("bpmn:TextAnnotation","bpmn-icon-text-annotation",c("Add text annotation"))}),Ar(d,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference"])&&z(u,{"append.text-annotation":m("bpmn:TextAnnotation","bpmn-icon-text-annotation",c("Add text annotation")),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:c("Connect to other element"),action:{click:f,dragstart:f}}}),Tr(d,"bpmn:TextAnnotation")&&z(u,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:c("Connect using association"),action:{click:f,dragstart:f}}}),Ar(d,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&z(u,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:c("Connect using data input association"),action:{click:f,dragstart:f}}}),Tr(d,"bpmn:Group")&&z(u,{"append.text-annotation":m("bpmn:TextAnnotation","bpmn-icon-text-annotation",c("Add text annotation"))});var v=a.allowed("elements.delete",{elements:[e]});return h(v)&&(v=v[0]===e),v&&z(u,{delete:{group:"edit",className:"bpmn-icon-trash",title:c("Delete"),action:{click:function(e,t){n.removeElements([t])}}}}),u};const Vy={__depends__:[ny,wy,Ma,is,Ip,pf,qy],__init__:["contextPadProvider"],contextPadProvider:["type",zy]};var Hy={horizontal:["x","width"],vertical:["y","height"]};function Uy(e,t){this._modeling=e,this._filters=[],this.registerFilter((function(e){var n=t.allowed("elements.distribute",{elements:e});return h(n)?n:n?e:[]}))}Uy.$inject=["modeling","rules"],Uy.prototype.registerFilter=function(e){if("function"!=typeof e)throw new Error("the filter has to be a function");this._filters.push(e)},Uy.prototype.trigger=function(e,t){var n,i,r=this._modeling;if(!(e.length<3||(this._setOrientation(t),i=this._filterElements(e),(n=this._createGroups(i)).length<=2)))return r.distributeElements(n,this._axis,this._dimension),n},Uy.prototype._filterElements=function(e){var t=this._filters,n=this._axis,i=this._dimension,r=[].concat(e);return t.length?(_(t,(function(e){r=e(r,n,i)})),r):e},Uy.prototype._createGroups=function(e){var t=[],n=this,i=this._axis,r=this._dimension;if(!i)throw new Error('must have a defined "axis" and "dimension"');return _(R(e,i),(function(e,o){var s,a=n._findRange(e,i,r),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},Uy.prototype._setOrientation=function(e){var t=Hy[e];this._axis=t[0],this._dimension=t[1]},Uy.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)},Uy.prototype._findRange=function(e){var t=e[this._axis];return{min:t+5,max:t+e[this._dimension]-5}};const Wy={__init__:["distributeElements"],distributeElements:["type",Uy]};function Gy(e){oc.call(this,e)}Gy.$inject=["eventBus"],i(Gy,oc),Gy.prototype.init=function(){this.addRule("elements.distribute",(function(e){var t=e.elements;return!((t=yt(t=w(t,(function(e){var t=Ar(e,["bpmn:Association","bpmn:BoundaryEvent","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:Lane","bpmn:MessageFlow","bpmn:SequenceFlow","bpmn:TextAnnotation"]);return!(e.labelTarget||t)})))).length<3)&&t}))};const Qy={horizontal:'\n \n \n \n ',vertical:'\n \n \n \n '};function Xy(e,t,n,i){this._distributeElements=t,this._translate=n,this._popupMenu=e,this._rules=i,e.registerProvider("align-elements",900,this)}Xy.$inject=["popupMenu","distributeElements","translate","rules"],Xy.prototype.getPopupMenuEntries=function(e){var t={};return this._isAllowed(e)&&z(t,this._getEntries(e)),t},Xy.prototype._isAllowed=function(e){return this._rules.allowed("elements.distribute",{elements:e})},Xy.prototype._getEntries=function(e){var t=this._distributeElements,n=this._translate,i=this._popupMenu;return{"distribute-elements-horizontal":{group:"distribute",title:n("Distribute elements horizontally"),className:"bjs-align-elements-menu-entry",imageHtml:Qy.horizontal,action:function(n,r){t.trigger(e,"horizontal"),i.close()}},"distribute-elements-vertical":{group:"distribute",title:n("Distribute elements vertically"),imageHtml:Qy.vertical,action:function(n,r){t.trigger(e,"vertical"),i.close()}}}};const Ky={__depends__:[ec,Wy],__init__:["bpmnDistributeElements","distributeElementsMenuProvider"],bpmnDistributeElements:["type",Gy],distributeElementsMenuProvider:["type",Xy]};var Yy="is not a registered action";function Zy(e,t){this._actions={};var n=this;e.on("diagram.init",(function(){n._registerDefaultActions(t),e.fire("editorActions.init",{editorActions:n})}))}function Jy(e,t){return new Error(e+" "+t)}Zy.$inject=["eventBus","injector"],Zy.prototype._registerDefaultActions=function(e){var t=e.get("commandStack",!1),n=e.get("modeling",!1),i=e.get("selection",!1),r=e.get("zoomScroll",!1),o=e.get("copyPaste",!1),s=e.get("canvas",!1),a=e.get("rules",!1),l=e.get("keyboardMove",!1),c=e.get("keyboardMoveSelection",!1);t&&(this.register("undo",(function(){t.undo()})),this.register("redo",(function(){t.redo()}))),o&&i&&this.register("copy",(function(){var e=i.get();if(e.length)return o.copy(e)})),o&&this.register("paste",(function(){o.paste()})),r&&this.register("stepZoom",(function(e){r.stepZoom(e.value)})),s&&this.register("zoom",(function(e){s.zoom(e.value)})),n&&i&&a&&this.register("removeSelection",(function(){var e=i.get();if(e.length){var t,r=a.allowed("elements.delete",{elements:e});!1!==r&&(t=h(r)?r:e).length&&n.removeElements(t.slice())}})),l&&this.register("moveCanvas",(function(e){l.moveCanvas(e)})),c&&this.register("moveSelection",(function(e){c.moveSelection(e.direction,e.accelerated)}))},Zy.prototype.trigger=function(e,t){if(!this._actions[e])throw Jy(e,Yy);return this._actions[e](t)},Zy.prototype.register=function(e,t){var n=this;if("string"==typeof e)return this._registerAction(e,t);_(e,(function(e,t){n._registerAction(t,e)}))},Zy.prototype._registerAction=function(e,t){if(this.isRegistered(e))throw Jy(e,"is already registered");this._actions[e]=t},Zy.prototype.unregister=function(e){if(!this.isRegistered(e))throw Jy(e,Yy);this._actions[e]=void 0},Zy.prototype.getActions=function(){return Object.keys(this._actions)},Zy.prototype.isRegistered=function(e){return!!this._actions[e]};const ev={__init__:["editorActions"],editorActions:["type",Zy]};function tv(e){e.invoke(Zy,this)}i(tv,Zy),tv.$inject=["injector"],tv.prototype._registerDefaultActions=function(e){Zy.prototype._registerDefaultActions.call(this,e);var t=e.get("canvas",!1),n=e.get("elementRegistry",!1),i=e.get("selection",!1),r=e.get("spaceTool",!1),o=e.get("lassoTool",!1),s=e.get("handTool",!1),a=e.get("globalConnect",!1),l=e.get("distributeElements",!1),c=e.get("alignElements",!1),p=e.get("directEditing",!1),u=e.get("searchPad",!1),d=e.get("modeling",!1),h=e.get("contextPad",!1);t&&n&&i&&this._registerAction("selectElements",(function(){var e=t.getRootElement(),r=n.filter((function(t){return t!==e}));return i.select(r),r})),r&&this._registerAction("spaceTool",(function(){r.toggle()})),o&&this._registerAction("lassoTool",(function(){o.toggle()})),s&&this._registerAction("handTool",(function(){s.toggle()})),a&&this._registerAction("globalConnectTool",(function(){a.toggle()})),i&&l&&this._registerAction("distributeElements",(function(e){var t=i.get(),n=e.type;t.length&&l.trigger(t,n)})),i&&c&&this._registerAction("alignElements",(function(e){var t=i.get(),n=[],r=e.type;t.length&&(n=w(t,(function(e){return!Tr(e,"bpmn:Lane")})),c.trigger(n,r))})),i&&d&&this._registerAction("setColor",(function(e){var t=i.get();t.length&&d.setColor(t,e)})),i&&p&&this._registerAction("directEditing",(function(){var e=i.get();e.length&&p.activate(e[0])})),u&&this._registerAction("find",(function(){u.toggle()})),t&&d&&this._registerAction("moveToOrigin",(function(){var e,i,r=t.getRootElement();e=Et(i=Tr(r,"bpmn:Collaboration")?n.filter((function(e){return Tr(e.parent,"bpmn:Collaboration")})):n.filter((function(e){return e!==r&&!Tr(e.parent,"bpmn:SubProcess")}))),d.moveElements(i,{x:-e.x,y:-e.y},r)})),i&&h&&this._registerAction("replaceElement",(function(e){h.triggerEntry("replace","click",e)}))};const nv={__depends__:[ev],editorActions:["type",tv]};function iv(e){e.on(["create.init","shape.move.init"],(function(e){var t=e.context;Ar(e.shape,["bpmn:Participant","bpmn:SubProcess","bpmn:TextAnnotation"])&&(t.gridSnappingContext||(t.gridSnappingContext={}),t.gridSnappingContext.snapLocation="top-left")}))}iv.$inject=["eventBus"];function rv(e,t,n){return n||(n="round"),Math[n](e/t)*t}function ov(e,t,n){var i=!n||!1!==n.active;this._eventBus=t;var r=this;t.on("diagram.init",800,(function(){r.setActive(i)})),t.on(["create.move","create.end","bendpoint.move.move","bendpoint.move.end","connect.move","connect.end","connectionSegment.move.move","connectionSegment.move.end","resize.move","resize.end","shape.move.move","shape.move.end"],1200,(function(t){var n=t.originalEvent;if(!(!r.active||n&&zs(n))){var i=t.context,o=i.gridSnappingContext;o||(o=i.gridSnappingContext={}),["x","y"].forEach((function(n){var i={},o=function(e,t,n){var i=e.context,r=e.shape,o=i.gridSnappingContext,s=o.snapLocation,a=o.snapOffset;if(a&&m(a[t]))return a[t];a||(a=o.snapOffset={});m(a[t])||(a[t]=0);if(!r)return a[t];n.get(r.id)||(sv(t)?a[t]+=r[t]+r.width/2:a[t]+=r[t]+r.height/2);if(!s)return a[t];"x"===t?/left/.test(s)?a[t]-=r.width/2:/right/.test(s)&&(a[t]+=r.width/2):/top/.test(s)?a[t]-=r.height/2:/bottom/.test(s)&&(a[t]+=r.height/2);return a[t]}(t,n,e);o&&(i.offset=o);var s=function(e,t){var n=e.context,i=n.createConstraints,r=n.resizeConstraints||{},o=n.gridSnappingContext,s=o.snapConstraints;if(s&&s[t])return s[t];s||(s=o.snapConstraints={});s[t]||(s[t]={});var a=n.direction;i&&(sv(t)?(s.x.min=i.left,s.x.max=i.right):(s.y.min=i.top,s.y.max=i.bottom));var l=r.min,c=r.max;l&&(sv(t)?lv(a)?s.x.max=l.left:s.x.min=l.right:av(a)?s.y.max=l.top:s.y.min=l.bottom);c&&(sv(t)?lv(a)?s.x.min=c.left:s.x.max=c.right:av(a)?s.y.min=c.top:s.y.max=c.bottom);return s[t]}(t,n);s&&z(i,s),Pp(t,n)||r.snapEvent(t,n,i)}))}}))}function sv(e){return"x"===e}function av(e){return-1!==e.indexOf("n")}function lv(e){return-1!==e.indexOf("w")}function cv(e,t){hs.call(this,e),this._gridSnapping=t;var n=this;this.preExecute("shape.resize",(function(e){var t=e.context,i=(t.hints||{}).autoResize;if(i){var r=t.shape,o=t.newBounds;y(i)?t.newBounds=n.snapComplex(o,i):t.newBounds=n.snapSimple(r,o)}}))}ov.prototype.snapEvent=function(e,t,n){kp(e,t,this.snapValue(e[t],n))},ov.prototype.getGridSpacing=function(){return 10},ov.prototype.snapValue=function(e,t){var n,i,r=0;return t&&t.offset&&(r=t.offset),e=rv(e+=r,10),t&&t.min&&m(n=t.min)&&(n=rv(n+r,10,"ceil"),e=Math.max(e,n)),t&&t.max&&m(i=t.max)&&(i=rv(i+r,10,"floor"),e=Math.min(e,i)),e-=r},ov.prototype.isActive=function(){return this.active},ov.prototype.setActive=function(e){this.active=e,this._eventBus.fire("gridSnapping.toggle",{active:e})},ov.prototype.toggleActive=function(){this.setActive(!this.active)},ov.$inject=["elementRegistry","eventBus","config.gridSnapping"],cv.$inject=["eventBus","gridSnapping","modeling"],i(cv,hs),cv.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},cv.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},cv.prototype.snapHorizontally=function(e,t){var n=this._gridSnapping,i=/w/.test(t),r=/e/.test(t),o={};return o.width=n.snapValue(e.width,{min:e.width}),r&&(i?(o.x=n.snapValue(e.x,{max:e.x}),o.width+=n.snapValue(e.x-o.x,{min:e.x-o.x})):e.x=e.x+e.width-o.width),z(e,o),e},cv.prototype.snapVertically=function(e,t){var n=this._gridSnapping,i=/n/.test(t),r=/s/.test(t),o={};return o.height=n.snapValue(e.height,{min:e.height}),i&&(r?(o.y=n.snapValue(e.y,{max:e.y}),o.height+=n.snapValue(e.y-o.y,{min:e.y-o.y})):e.y=e.y+e.height-o.height),z(e,o),e};function pv(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))}))}pv.$inject=["eventBus","gridSnapping"];const uv={__depends__:[{__init__:["gridSnappingResizeBehavior","gridSnappingSpaceToolBehavior"],gridSnappingResizeBehavior:["type",cv],gridSnappingSpaceToolBehavior:["type",pv]}],__init__:["gridSnapping"],gridSnapping:["type",ov]};function dv(e,t){e.on("autoPlace",2e3,(function(e){var n=e.source,i=On(n),r=e.shape,o=gc(n,r);return["x","y"].forEach((function(e){var n={};o[e]!==i[e]&&(o[e]>i[e]?n.min=o[e]:n.max=o[e],Tr(r,"bpmn:TextAnnotation")&&(!function(e){return"x"===e}(e)?n.offset=-r.height/2:n.offset=-r.width/2),o[e]=t.snapValue(o[e],n))})),o}))}dv.$inject=["eventBus","gridSnapping"];function hv(e,t,n){t.on(["create.start","shape.move.start"],1750,(function(t){var i=t.context,r=i.shape,o=e.getRootElement();Tr(r,"bpmn:Participant")&&Tr(o,"bpmn:Process")&&o.children.length&&(i.createConstraints&&(r.width=n.snapValue(r.width,{min:r.width}),r.height=n.snapValue(r.height,{min:r.height})))}))}hv.$inject=["canvas","eventBus","gridSnapping"];function fv(e,t,n){hs.call(this,e),this._gridSnapping=t;var i=this;this.postExecuted(["connection.create","connection.layout"],3e3,(function(e){var t=e.context,r=t.connection,o=t.hints||{},s=r.waypoints;o.connectionStart||o.connectionEnd||!1===o.createElementsBehavior||function(e){return e.length>3}(s)&&n.updateWaypoints(r,i.snapMiddleSegments(s))}))}function mv(e,t,n){var i=Nt(t,n),r={};return function(e){return"h"===e}(i)&&(r.y=e.snapValue(t.y)),function(e){return"v"===e}(i)&&(r.x=e.snapValue(t.x)),("x"in r||"y"in r)&&(t=z({},t,r),n=z({},n,r)),[t,n]}fv.$inject=["eventBus","gridSnapping","modeling"],i(fv,hs),fv.prototype.snapMiddleSegments=function(e){var t,n=this._gridSnapping;e=e.slice();for(var i=1;i5&&Te(s,{x:o.x,width:o.width}),o.height>5&&Te(s,{y:o.y,height:o.height}),i.canExecute?Me(s).remove(Rv):Me(s).add(Rv)})),e.on("resize.cleanup",(function(e){var n,i;n=e.context,i=n.shape,n.frame&&Ke(n.frame),t.removeMarker(i,Dv)}))}Nv.$inject=["eventBus","canvas","previewSupport"];var $v=-6,jv="djs-resizer",Iv=["n","w","s","e","nw","ne","se","sw"];function Lv(e,t,n,i){this._resize=i,this._canvas=t;var r=this;e.on("selection.changed",(function(e){var t=e.newSelection;r.removeResizers(),1===t.length&&_(t,q(r.addResizer,r))})),e.on("shape.changed",(function(e){var t=e.element;n.isSelected(t)&&(r.removeResizers(),r.addResizer(t))}))}Lv.prototype.makeDraggable=function(e,t,n){var i=this._resize;function r(t){Fo(t)&&i.activate(t,e,n)}de.bind(t,"mousedown",r),de.bind(t,"touchstart",r)},Lv.prototype._createResizer=function(e,t,n,i){var r=this._getResizersParent(),o=function(e){var t={x:0,y:0};-1!==e.indexOf("e")?t.x=6:-1!==e.indexOf("w")&&(t.x=$v);-1!==e.indexOf("s")?t.y=6:-1!==e.indexOf("n")&&(t.y=$v);return t}(i),s=Le("g");Me(s).add(jv),Me(s).add(jv+"-"+e.id),Me(s).add(jv+"-"+i),ke(r,s);var a=Le("rect");Te(a,{x:-4+o.x,y:-4+o.y,width:8,height:8}),Me(a).add(jv+"-visual"),ke(s,a);var l=Le("rect");return Te(l,{x:-10+o.x,y:-10+o.y,width:20,height:20}),Me(l).add(jv+"-hit"),ke(s,l),ni(s,t,n),s},Lv.prototype.createResizer=function(e,t){var n=Av(e,t),i=this._createResizer(e,n.x,n.y,t);this.makeDraggable(e,i,t)},Lv.prototype.addResizer=function(e){var t=this;!yn(e)&&this._resize.canResize({shape:e})&&_(Iv,(function(n){t.createResizer(e,n)}))},Lv.prototype.removeResizers=function(){Re(this._getResizersParent())},Lv.prototype._getResizersParent=function(){return this._canvas.getLayer("resizers")},Lv.$inject=["eventBus","canvas","selection","resize"];const Bv={__depends__:[jc,Mc,Vp],__init__:["resize","resizePreview","resizeHandles"],resize:["type",Tv],resizePreview:["type",Nv],resizeHandles:["type",Lv]};function qv(e,t,n,i,r,o,s){function a(e,t){(t||Ar(e,["bpmn:Task","bpmn:TextAnnotation","bpmn:Participant"])||zv(e))&&i.activate(e)}this._bpmnFactory=t,this._canvas=n,this._modeling=r,this._textRenderer=s,i.registerProvider(this),e.on("element.dblclick",(function(e){a(e.element,!0)})),e.on(["autoPlace.start","canvas.viewbox.changing","drag.init","element.mousedown","popupMenu.open","root.set","selection.changed"],(function(){i.isActive()&&i.complete()})),e.on(["shape.remove","connection.remove"],2e3,(function(e){i.isActive(e.element)&&i.cancel()})),e.on(["commandStack.changed"],(function(e){i.isActive()&&i.cancel()})),e.on("directEditing.activate",(function(e){o.removeResizers()})),e.on("create.end",500,(function(e){var t=e.context,n=t.shape,i=e.context.canExecute;e.isTouch||i&&(t.hints&&!1===t.hints.createElementsBehavior||a(n))})),e.on("autoPlace.end",500,(function(e){a(e.shape)}))}function zv(e){return Tr(e,"bpmn:SubProcess")&&!Xr(e)}qv.$inject=["eventBus","bpmnFactory","canvas","directEditing","modeling","resizeHandles","textRenderer"],qv.prototype.activate=function(e){var t=oo(e);if(void 0!==t){var n={text:t};z(n,this.getEditingBBox(e));var i={};return(Ar(e,["bpmn:Task","bpmn:Participant","bpmn:Lane","bpmn:CallActivity"])||zv(e))&&z(i,{centerVertically:!0}),eo(e)&&z(i,{autoResize:!0}),Tr(e,"bpmn:TextAnnotation")&&z(i,{resizable:!0,autoResize:!0}),z(n,{options:i}),n}},qv.prototype.getEditingBBox=function(e){var t=this._canvas,n=e.label||e,i=t.getAbsoluteBBox(n),r=i.x+i.width/2,o=i.y+i.height/2,s={x:i.x,y:i.y},a=t.zoom(),l=this._textRenderer.getDefaultStyle(),c=this._textRenderer.getExternalStyle(),p=c.fontSize*a,u=c.lineHeight,d=l.fontSize*a,h=l.lineHeight,f={fontFamily:this._textRenderer.getDefaultStyle().fontFamily,fontWeight:this._textRenderer.getDefaultStyle().fontWeight};if(Tr(e,"bpmn:Lane")||function(e){return Tr(e,"bpmn:Participant")&&Xr(e)}(e)){var m=Kr(e);z(s,m?{width:i.height,height:30*a,x:i.x-i.height/2+15*a,y:o-30*a/2}:{width:i.width,height:30*a}),z(f,{fontSize:d+"px",lineHeight:h,paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px",transform:m?"rotate(-90deg)":null})}if(function(e){return Tr(e,"bpmn:Participant")&&!Xr(e)}(e)){var g=Kr(e);z(s,g?{width:i.width,height:i.height}:{width:i.height,height:i.width,x:r-i.height/2,y:o-i.width/2}),z(f,{fontSize:d+"px",lineHeight:h,paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px",transform:g?null:"rotate(-90deg)"})}(Ar(e,["bpmn:Task","bpmn:CallActivity"])||zv(e))&&(z(s,{width:i.width,height:i.height}),z(f,{fontSize:d+"px",lineHeight:h,paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px"})),function(e){return Tr(e,"bpmn:SubProcess")&&Xr(e)}(e)&&(z(s,{width:i.width,x:i.x}),z(f,{fontSize:d+"px",lineHeight:h,paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px"}));var y=90*a,v=7*a,b=4*a;if(n.labelTarget&&(z(s,{width:y,height:i.height+v+b,x:r-y/2,y:i.y-v}),z(f,{fontSize:p+"px",lineHeight:u,paddingTop:v+"px",paddingBottom:b+"px"})),eo(n)&&!to(n)&&!vn(n)){var x=io(e),w=t.getAbsoluteBBox({x:x.x,y:x.y,width:0,height:0}),_=p+v+b;z(s,{width:y,height:_,x:w.x-y/2,y:w.y-_/2}),z(f,{fontSize:p+"px",lineHeight:u,paddingTop:v+"px",paddingBottom:b+"px"})}return Tr(e,"bpmn:TextAnnotation")&&(z(s,{width:i.width,height:i.height,minWidth:30*a,minHeight:10*a}),z(f,{textAlign:"left",paddingTop:5*a+"px",paddingBottom:7*a+"px",paddingLeft:7*a+"px",paddingRight:5*a+"px",fontSize:d+"px",lineHeight:h})),{bounds:s,style:f}},qv.prototype.update=function(e,t,n,i){var r,o,s;Tr(e,"bpmn:TextAnnotation")&&(o=this._canvas.getAbsoluteBBox(e),r={x:e.x,y:e.y,width:e.width/o.width*i.width,height:e.height/o.height*i.height}),(s=t)&&s.trim()||(t=null),this._modeling.updateLabel(e,t,r)};var Fv="djs-element-hidden",Vv="djs-label-hidden";function Hv(e,t,n){var i,r,o,s=this,a=t.getDefaultLayer();e.on("directEditing.activate",(function(e){var l=e.active;if(Tr(i=l.element.label||l.element,"bpmn:TextAnnotation")){r=t.getAbsoluteBBox(i),o=Le("g");var c=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:i.width,containerHeight:i.height,position:{mx:0,my:0}}),p=s.path=Le("path");Te(p,{d:c,strokeWidth:2,stroke:Uv(i)}),ke(o,p),ke(a,o),ii(o,i.x,i.y)}Tr(i,"bpmn:TextAnnotation")||i.labelTarget?t.addMarker(i,Fv):(Tr(i,"bpmn:Task")||Tr(i,"bpmn:CallActivity")||Tr(i,"bpmn:SubProcess")||Tr(i,"bpmn:Participant"))&&t.addMarker(i,Vv)})),e.on("directEditing.resize",(function(e){if(Tr(i,"bpmn:TextAnnotation")){var t=e.height,o=e.dy,a=Math.max(i.height/r.height*(t+o),0),l=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:i.width,containerHeight:a,position:{mx:0,my:0}});Te(s.path,{d:l})}})),e.on(["directEditing.complete","directEditing.cancel"],(function(e){var n=e.active;n&&(t.removeMarker(n.element.label||n.element,Fv),t.removeMarker(i,Vv)),i=void 0,r=void 0,o&&(Ke(o),o=void 0)}))}function Uv(e,t){return Dr(e).get("stroke")||t||"black"}Hv.$inject=["eventBus","canvas","pathMap"];const Wv={__depends__:[ds,Bv,wy],__init__:["labelEditingProvider","labelEditingPreview"],labelEditingProvider:["type",qv],labelEditingPreview:["type",Hv]};var Gv=new rs("tt");function Qv(e,t){e.style.display=!1===t?"none":""}var Xv="djs-tooltip",Kv="."+Xv;function Yv(e,t){var n,i;this._eventBus=e,this._canvas=t,this._ids=Gv,this._tooltipDefaults={show:{minZoom:.7,maxZoom:5}},this._tooltips={},this._tooltipRoot=(n=t.getContainer(),Z(i=be('
    '),{position:"absolute",width:"0",height:"0"}),n.insertBefore(i,n.firstChild),i);var r=this;me.bind(this._tooltipRoot,Kv,"mousedown",(function(e){e.stopPropagation()})),me.bind(this._tooltipRoot,Kv,"mouseover",(function(e){r.trigger("mouseover",e)})),me.bind(this._tooltipRoot,Kv,"mouseout",(function(e){r.trigger("mouseout",e)})),this._init()}Yv.$inject=["eventBus","canvas"],Yv.prototype.add=function(e){if(!e.position)throw new Error("must specifiy tooltip position");if(!e.html)throw new Error("must specifiy tooltip html");var t=this._ids.next();return e=z({},this._tooltipDefaults,e,{id:t}),this._addTooltip(e),e.timeout&&this.setTimeout(e),t},Yv.prototype.trigger=function(e,t){var n=t.delegateTarget||t.target,i=this.get(J(n,"data-tooltip-id"));i&&("mouseover"===e&&i.timeout&&this.clearTimeout(i),"mouseout"===e&&i.timeout&&(i.timeout=1e3,this.setTimeout(i)))},Yv.prototype.get=function(e){return"string"!=typeof e&&(e=e.id),this._tooltips[e]},Yv.prototype.clearTimeout=function(e){if(e=this.get(e)){var t=e.removeTimer;t&&(clearTimeout(t),e.removeTimer=null)}},Yv.prototype.setTimeout=function(e){if(e=this.get(e)){this.clearTimeout(e);var t=this;e.removeTimer=setTimeout((function(){t.remove(e)}),e.timeout)}},Yv.prototype.remove=function(e){var t=this.get(e);t&&(Ee(t.html),Ee(t.htmlContainer),delete t.htmlContainer,delete this._tooltips[t.id])},Yv.prototype.show=function(){Qv(this._tooltipRoot)},Yv.prototype.hide=function(){Qv(this._tooltipRoot,!1)},Yv.prototype._updateRoot=function(e){var t=e.scale||1,n=e.scale||1,i="matrix("+t+",0,0,"+n+","+-1*e.x*t+","+-1*e.y*n+")";this._tooltipRoot.style.transform=i,this._tooltipRoot.style["-ms-transform"]=i},Yv.prototype._addTooltip=function(e){var t,n=e.id,i=e.html,r=this._tooltipRoot;i.get&&i.constructor.prototype.jquery&&(i=i.get(0)),y(i)&&(i=be(i)),Z(t=be('
    '),{position:"absolute"}),t.appendChild(i),e.type&&te(t).add("djs-tooltip-"+e.type),e.className&&te(t).add(e.className),e.htmlContainer=t,r.appendChild(t),this._tooltips[n]=e,this._updateTooltip(e)},Yv.prototype._updateTooltip=function(e){var t=e.position;!function(e,t,n){Z(e,{left:t+"px",top:n+"px"})}(e.htmlContainer,t.x,t.y)},Yv.prototype._updateTooltipVisibilty=function(e){_(this._tooltips,(function(t){var n=t.show,i=t.htmlContainer,r=!0;n&&((n.minZoom>e.scale||n.maxZoom"+r+"
    "}))}))}Jv.$inject=["eventBus","tooltips","translate"];const eb={__depends__:[Zv],__init__:["modelingFeedback"],modelingFeedback:["type",Jv]};var tb=Math.round;function nb(e,t,n,i,r){function o(e,t,n,i){return r.allowed("elements.move",{shapes:e,delta:t,position:n,target:i})}function s(e,n,i,r){if(f(i)&&(r=i,i=!1),!n.waypoints&&n.parent&&!Me(e.target).has("djs-hit-no-move")){var o=function(e){return{x:e.x+tb(e.width/2),y:e.y+tb(e.height/2)}}(n);return t.init(e,o,"shape.move",{cursor:"grabbing",autoActivate:i,data:{shape:n,context:r||{}}}),!0}}e.on("shape.move.start",1500,(function(e){var t=e.context,n=e.shape,r=i.get().slice();-1===r.indexOf(n)&&(r=[n]),r=function(e){var t=A(e,"id");return w(e,(function(e){for(;e=e.parent;)if(t[e.id])return!1;return!0}))}(r),z(t,{shapes:r,validatedShapes:r,shape:n})})),e.on("shape.move.start",1250,(function(e){var t=e.context,n=t.validatedShapes;if(!(t.canExecute=o(n)))return!1})),e.on("shape.move.move",500,(function(e){var t,n=e.context,i=n.validatedShapes,r=e.hover,s={x:e.dx,y:e.dy};t=o(i,s,{x:e.x,y:e.y},r),n.delta=s,n.canExecute=t,n.target=null!==t?r:null})),e.on("shape.move.end",(function(e){var t=e.context,i=t.delta,r=t.canExecute,o="attach"===r,s=t.shapes;if(!1===r)return!1;i.x=tb(i.x),i.y=tb(i.y),0===i.x&&0===i.y||n.moveElements(s,i,t.target,{primaryShape:t.shape,attach:o})})),e.on("element.mousedown",(function(e){if(Fo(e)){var t=Io(e);if(!t)throw new Error("must supply DOM mousedown event");return s(t,e.element)}})),this.start=s}nb.$inject=["eventBus","dragging","modeling","selection","rules"];var ib="djs-dragging",rb="drop-ok",ob="drop-not-ok",sb="new-parent",ab="attach-ok";function lb(e,t,n,i){function r(e){var t=function(e){var t=w(e,(function(t){return!yn(t)||b(e,N({id:t.source.id}))&&b(e,N({id:t.target.id}))}));return t}(o(e));return t}function o(e){var t=_t(e,!0),n=S(t,(function(e){return(e.incoming||[]).concat(e.outgoing||[])}));return a(t.concat(n))}function s(e,n){[ab,rb,ob,sb].forEach((function(i){i===n?t.addMarker(e,i):t.removeMarker(e,i)}))}e.on("shape.move.start",499,(function(e){var s=e.context,l=s.shapes,c=s.allDraggedElements,p=r(l);if(!s.dragGroup){var u=Le("g");Te(u,n.cls("djs-drag-group",["no-events"])),ke(t.getActiveLayer(),u),s.dragGroup=u}p.forEach((function(e){i.addDragger(e,s.dragGroup)})),_(c=c?a([c,o(l)]):o(l),(function(e){t.addMarker(e,ib)})),s.allDraggedElements=c,s.differentParents=1!==function(e){return C(e).length}(A(l,(function(e){return e.parent&&e.parent.id})))})),e.on("shape.move.move",499,(function(e){var t=e.context,n=t.dragGroup,i=t.target,r=t.shape.parent,o=t.canExecute;i&&("attach"===o?s(i,ab):t.canExecute&&i&&i.id!==r.id?s(i,sb):s(i,t.canExecute?rb:ob)),ii(n,e.dx,e.dy)})),e.on(["shape.move.out","shape.move.cleanup"],(function(e){var t=e.context.target;t&&s(t,null)})),e.on("shape.move.cleanup",(function(e){var n=e.context,i=n.allDraggedElements,r=n.dragGroup;_(i,(function(e){t.removeMarker(e,ib)})),r&&Ke(r)})),this.makeDraggable=function(e,n,r){i.addDragger(n,e.dragGroup),r&&t.addMarker(n,ib),e.allDraggedElements?e.allDraggedElements.push(n):e.allDraggedElements=[n]}}lb.$inject=["eventBus","canvas","styles","previewSupport"];const cb={__depends__:[Qo,is,Ko,jc,Mc,Vp],__init__:["move","movePreview"],move:["type",nb],movePreview:["type",lb]},pb={width:36,height:50},ub={width:50,height:50};function db(e,t,n){return Le("path",{d:e,strokeWidth:2,transform:`translate(${t.x}, ${t.y})`,...n})}function hb(e,t){this._styles=t,e.registerProvider(this)}function fb(e,t){var n;return"bpmn:DataObjectReference"===t?n=pb:"bpmn:DataStoreReference"===t&&(n=ub),e.width===n.width&&e.height===n.height}hb.$inject=["outline","styles"],hb.prototype.getOutline=function(e){const t=this._styles.cls("djs-outline",["no-fill"]);var n;if(!vn(e))return Tr(e,"bpmn:Gateway")?(z((n=Le("rect")).style,{"transform-box":"fill-box",transform:"rotate(45deg)","transform-origin":"center"}),Te(n,z({x:2,y:2,rx:4,width:e.width-4,height:e.height-4},t))):Ar(e,["bpmn:Task","bpmn:SubProcess","bpmn:Group"])?Te(n=Le("rect"),z({x:-5,y:-5,rx:14,width:e.width+10,height:e.height+10},t)):Tr(e,"bpmn:EndEvent")?Te(n=Le("circle"),z({cx:e.width/2,cy:e.height/2,r:e.width/2+5+1},t)):Tr(e,"bpmn:Event")?Te(n=Le("circle"),z({cx:e.width/2,cy:e.height/2,r:e.width/2+5},t)):Tr(e,"bpmn:DataObjectReference")&&fb(e,"bpmn:DataObjectReference")?n=db("M44.7648 11.3263L36.9892 2.64074C36.0451 1.58628 34.5651 0.988708 33.1904 0.988708H5.98667C3.22688 0.988708 0.989624 3.34892 0.989624 6.26039V55.0235C0.989624 57.9349 3.22688 60.2952 5.98667 60.2952H40.966C43.7257 60.2952 45.963 57.9349 45.963 55.0235V14.9459C45.963 13.5998 45.6407 12.3048 44.7648 11.3263Z",{x:-6,y:-6},t):Tr(e,"bpmn:DataStoreReference")&&fb(e,"bpmn:DataStoreReference")&&(n=db("M1.03845 48.1347C1.03845 49.3511 1.07295 50.758 1.38342 52.064C1.69949 53.3938 2.32428 54.7154 3.56383 55.6428C6.02533 57.4841 10.1161 58.7685 14.8212 59.6067C19.5772 60.4538 25.1388 60.8738 30.6831 60.8738C36.2276 60.8738 41.7891 60.4538 46.545 59.6067C51.2504 58.7687 55.3412 57.4842 57.8028 55.6429C59.0424 54.7156 59.6673 53.3938 59.9834 52.064C60.2938 50.7579 60.3285 49.351 60.3285 48.1344V13.8415C60.3285 12.6249 60.2938 11.218 59.9834 9.91171C59.6673 8.58194 59.0423 7.2602 57.8027 6.33294C55.341 4.49168 51.2503 3.20723 46.545 2.36914C41.7891 1.522 36.2276 1.10204 30.6831 1.10205C25.1388 1.10206 19.5772 1.52206 14.8213 2.36923C10.1162 3.20734 6.02543 4.49183 3.5639 6.33314C2.32433 7.26038 1.69951 8.58206 1.38343 9.91181C1.07295 11.2179 1.03845 12.6247 1.03845 13.8411V48.1347Z",{x:-6,y:-6},t)),n},hb.prototype.updateOutline=function(e,t){if(!vn(e))return Ar(e,["bpmn:SubProcess","bpmn:Group"])?(Te(t,{width:e.width+10,height:e.height+10}),!0):!!Ar(e,["bpmn:Event","bpmn:Gateway","bpmn:DataStoreReference","bpmn:DataObjectReference"])};const mb={__depends__:[Ko],__init__:["outlineProvider"],outlineProvider:["type",hb]};var gb=".djs-palette-toggle",yb=".entry",vb=gb+", "+yb,bb="djs-palette-",xb="open",wb="two-column";function _b(e,t){this._eventBus=e,this._canvas=t;var n=this;e.on("tool-manager.update",(function(e){var t=e.tool;n.updateToolHighlight(t)})),e.on("i18n.changed",(function(){n._update()})),e.on("diagram.init",(function(){n._diagramInitialized=!0,n._rebuild()}))}function Eb(e,t){var n=t.getPaletteEntries();return g(n)?n(e):(_(n,(function(t,n){e[n]=t})),e)}_b.$inject=["eventBus","canvas"],_b.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("palette.getProviders",e,(function(e){e.providers.push(t)})),this._rebuild()},_b.prototype.getEntries=function(){return this._getProviders().reduce(Eb,{})},_b.prototype._rebuild=function(){this._diagramInitialized&&(this._getProviders().length&&(this._container||this._init(),this._update()))},_b.prototype._init=function(){var e=this,t=this._eventBus,n=this._getParentContainer(),i=this._container=be(_b.HTML_MARKUP);n.appendChild(i),te(n).add(bb+"shown"),me.bind(i,vb,"click",(function(t){if(xe(t.delegateTarget,gb))return e.toggle();e.trigger("click",t)})),de.bind(i,"mousedown",(function(e){e.stopPropagation()})),me.bind(i,yb,"dragstart",(function(t){e.trigger("dragstart",t)})),t.on("canvas.resized",this._layoutChanged,this),t.fire("palette.create",{container:i})},_b.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"palette.getProviders",providers:[]});return this._eventBus.fire(t),t.providers},_b.prototype._toggleState=function(e){e=e||{};var t,n=this._getParentContainer(),i=this._container,r=this._eventBus,o=te(i),s=te(n);t="twoColumn"in e?e.twoColumn:this._needsCollapse(n.clientHeight,this._entries||{}),o.toggle(wb,t),s.toggle(bb+wb,t),"open"in e&&(o.toggle(xb,e.open),s.toggle(bb+xb,e.open)),r.fire("palette.changed",{twoColumn:t,open:this.isOpen()})},_b.prototype._update=function(){var e=we(".djs-palette-entries",this._container),t=this._entries=this.getEntries();ie(e),_(t,(function(t,n){var i=t.group||"default",r=we("[data-group="+ys(i)+"]",e);r||(J(r=be('
    '),"data-group",i),e.appendChild(r));var o=t.html||(t.separator?'
    ':'
    '),s=be(o);if(r.appendChild(s),!t.separator&&(J(s,"data-action",n),t.title&&J(s,"title",t.title),t.className&&function(e,t){var n=te(e);(h(t)?t:t.split(/\s+/g)).forEach((function(e){n.add(e)}))}(s,t.className),t.imageUrl)){var a=be("");J(a,"src",t.imageUrl),s.appendChild(a)}})),this.open()},_b.prototype.trigger=function(e,t,n){var i,r,o=t.delegateTarget||t.target;return o?(i=J(o,"data-action"),r=t.originalEvent||t,this.triggerEntry(i,e,r,n)):t.preventDefault()},_b.prototype.triggerEntry=function(e,t,n,i){var r,o;if((r=this._entries[e])&&(o=r.action,!1!==this._eventBus.fire("palette.trigger",{entry:r,event:n}))){if(g(o)){if("click"===t)return o(n,i)}else if(o[t])return o[t](n,i);n.preventDefault()}},_b.prototype._layoutChanged=function(){this._toggleState({})},_b.prototype._needsCollapse=function(e,t){return e<46*Object.keys(t).length+50},_b.prototype.close=function(){this._toggleState({open:!1,twoColumn:!1})},_b.prototype.open=function(){this._toggleState({open:!0})},_b.prototype.toggle=function(){this.isOpen()?this.close():this.open()},_b.prototype.isActiveTool=function(e){return e&&this._activeTool===e},_b.prototype.updateToolHighlight=function(e){var t;this._toolsContainer||(t=we(".djs-palette-entries",this._container),this._toolsContainer=we("[data-group=tools]",t)),_(this._toolsContainer.children,(function(t){var n=t.getAttribute("data-action");if(n){var i=te(t);n=n.replace("-tool",""),i.contains("entry")&&n===e?i.add("highlighted-entry"):i.remove("highlighted-entry")}}))},_b.prototype.isOpen=function(){return te(this._container).has(xb)},_b.prototype._getParentContainer=function(){return this._canvas.getContainer()},_b.HTML_MARKUP='
    ';const Ob={__init__:["palette"],palette:["type",_b]};var Pb="crosshair";function kb(e,t,n,i,r,o,s){this._selection=r,this._dragging=n,this._mouse=s;var a=this,l=function(e){var n,i=t.getActiveLayer();Te(n=e.frame=Le("rect"),{class:"djs-lasso-overlay",width:1,height:1,x:0,y:0}),ke(i,n)},c=function(e){var t=e.frame,n=e.bbox;Te(t,{x:n.x,y:n.y,width:n.width,height:n.height})},p=function(e){e.frame&&Ke(e.frame)};o.registerTool("lasso",{tool:"lasso.selection",dragging:"lasso"}),e.on("lasso.selection.end",(function(t){var n=t.originalEvent.target;(t.hover||n instanceof SVGElement)&&e.once("lasso.selection.ended",(function(){a.activateLasso(t.originalEvent,!0)}))})),e.on("lasso.end",(function(e){var t=Sb(e),n=i.filter((function(e){return e}));a.select(n,t)})),e.on("lasso.start",(function(e){var t=e.context;t.bbox=Sb(e),l(t)})),e.on("lasso.move",(function(e){var t=e.context;t.bbox=Sb(e),c(t)})),e.on("lasso.cleanup",(function(e){var t=e.context;p(t)})),e.on("element.mousedown",1500,(function(e){if(Ho(e))return a.activateLasso(e.originalEvent),!0}))}function Sb(e){var t={x:e.x-e.dx,y:e.y-e.dy},n={x:e.x,y:e.y};return t.x<=n.x&&t.y=n.x&&t.yn.x&&t.y<=n.y?{x:n.x,y:t.y,width:t.x-n.x,height:n.y-t.y}:t.x<=n.x&&t.y>n.y||t.x=n.y?{x:t.x,y:n.y,width:n.x-t.x,height:t.y-n.y}:t.x>=n.x&&t.y>n.y||t.x>n.x&&t.y>=n.y?{x:n.x,y:n.y,width:t.x-n.x,height:t.y-n.y}:{x:n.x,y:n.y,width:0,height:0}}kb.$inject=["eventBus","canvas","dragging","elementRegistry","selection","toolManager","mouse"],kb.prototype.activateLasso=function(e,t){this._dragging.init(e,"lasso",{autoActivate:t,cursor:Pb,data:{context:{}}})},kb.prototype.activateSelection=function(e,t){this._dragging.init(e,"lasso.selection",{trapClick:!1,autoActivate:t,cursor:Pb,data:{context:{}}})},kb.prototype.select=function(e,t){var n=function(e,t){var n={};return _(e,(function(e){var i=e;i.waypoints&&(i=Et(i)),!m(t.y)&&i.x>t.x&&(n[e.id]=e),!m(t.x)&&i.y>t.y&&(n[e.id]=e),i.x>t.x&&i.y>t.y&&(m(t.width)&&m(t.height)&&i.width+i.xt[i]+r-n&&kp(e,i,t[i]+r-n)}))}(e,r,function(e){return Tr(e,"bpmn:Task")?10:20}(r)),r&&function(e,t){return k(t,(function(t){return Gb(e,t)}))}(n,["bpmn:Association","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:SequenceFlow"])?(t.connectionStart=Op(i),Ar(r,["bpmn:Event","bpmn:Gateway"])&&Wb(e,Op(r)),Ar(r,["bpmn:Task","bpmn:SubProcess"])&&function(e,t){var n=Op(t);Vb.forEach((function(i){(function(e,t,n){return e[n]>t[n]+20&&e[n]r[t]?r[t]+Fb:r[t]-Fb,kp(e,t,n))}))}(e)):Gb(n,"bpmn:MessageFlow")?(Tr(i,"bpmn:Event")&&(t.connectionStart=Op(i)),Tr(r,"bpmn:Event")&&Wb(e,Op(r))):t.connectionStart=t.initialConnectionStart)}))}function Wb(e,t){kp(e,"x",t.x),kp(e,"y",t.y)}function Gb(e,t){return e&&e.type===t}function Qb(e,t){return"x"===e?t.width:t.height}function Xb(){this._targets={},this._snapOrigins={},this._snapLocations=[],this._defaultSnaps={}}function Kb(){this._snapValues={}}Ub.$inject=["eventBus"],Xb.prototype.getSnapOrigin=function(e){return this._snapOrigins[e]},Xb.prototype.setSnapOrigin=function(e,t){this._snapOrigins[e]=t,-1===this._snapLocations.indexOf(e)&&this._snapLocations.push(e)},Xb.prototype.addDefaultSnap=function(e,t){var n=this._defaultSnaps[e];n||(n=this._defaultSnaps[e]=[]),n.push(t)},Xb.prototype.getSnapLocations=function(){return this._snapLocations},Xb.prototype.setSnapLocations=function(e){this._snapLocations=e},Xb.prototype.pointsForTarget=function(e){var t=e.id||e,n=this._targets[t];return n||(n=this._targets[t]=new Kb).initDefaults(this._defaultSnaps),n},Kb.prototype.add=function(e,t){var n=this._snapValues[e];n||(n=this._snapValues[e]={x:[],y:[]}),-1===n.x.indexOf(t.x)&&n.x.push(t.x),-1===n.y.indexOf(t.y)&&n.y.push(t.y)},Kb.prototype.snap=function(e,t,n,i){var r=this._snapValues[t];return r&&function(e,t,n){var i,r;for(n=void 0===n?10:n,i=0;i=e.x||i&&i<=e.x)&&kp(e,"x",e.x),(n&&n>=e.y||r&&r<=e.y)&&kp(e,"y",e.y)}}function ex(e,t){return-1!==e.indexOf(t)}function tx(e,t,n){return t?{x:e.x-n.x,y:e.y-n.y}:{x:e.x,y:e.y}}i(Zb,Yb),Zb.$inject=["eventBus","injector"],Zb.prototype.initSnap=function(e){var t=Yb.prototype.initSnap.call(this,e),n=e.shape,i=!!this._elementRegistry.get(n.id);return _(n.outgoing,(function(n){var r=n.waypoints[0];r=r.original||r,t.setSnapOrigin(n.id+"-docking",tx(r,i,e))})),_(n.incoming,(function(n){var r=n.waypoints[n.waypoints.length-1];r=r.original||r,t.setSnapOrigin(n.id+"-docking",tx(r,i,e))})),Tr(n,"bpmn:Participant")&&t.setSnapLocations(["top-left","bottom-right","mid"]),t},Zb.prototype.addSnapTargetPoints=function(e,t,n){Yb.prototype.addSnapTargetPoints.call(this,e,t,n);var i=this.getSnapTargets(t,n);_(i,(function(n){var i;(function(e){if(Tr(e,"bpmn:SubProcess")&&Xr(e))return!0;return Tr(e,"bpmn:Participant")}(n)||(i="bpmn:TextAnnotation",[t,n].every((function(e){return Tr(e,i)}))))&&(e.add("top-left",_p(n)),e.add("bottom-right",Ep(n)))}));var r=this._elementRegistry;return _(t.incoming,(function(n){if(r.get(t.id)){ex(i,n.source)||e.add("mid",On(n.source));var o=n.waypoints[0];e.add(n.id+"-docking",o.original||o)}})),_(t.outgoing,(function(n){if(r.get(t.id)){ex(i,n.target)||e.add("mid",On(n.target));var o=n.waypoints[n.waypoints.length-1];e.add(n.id+"-docking",o.original||o)}})),Tr(n,"bpmn:SequenceFlow")&&(e=this.addSnapTargetPoints(e,t,n.parent)),e},Zb.prototype.getSnapTargets=function(e,t){return Yb.prototype.getSnapTargets.call(this,e,t).filter((function(e){return!Tr(e,"bpmn:Lane")}))};function nx(e,t){var n=this;e.on(["resize.start"],(function(e){n.initSnap(e)})),e.on(["resize.move","resize.end"],1250,(function(e){var i=e.context,r=i.shape,o=r.parent,s=i.direction,a=i.snapContext;if(!(e.originalEvent&&zs(e.originalEvent)||Pp(e))){var l=a.pointsForTarget(o);l.initialized||((l=n.addSnapTargetPoints(l,r,o,s)).initialized=!0),function(e){return"n"===e||"s"===e}(s)&&kp(e,"x",e.x),function(e){return"e"===e||"w"===e}(s)&&kp(e,"y",e.y),t.snap(e,l)}})),e.on(["resize.cleanup"],(function(){t.hide()}))}function ix(e,t){var n=On(e),i=wn(e),r={x:n.x,y:n.y};return-1!==t.indexOf("n")?r.y=i.top:-1!==t.indexOf("s")&&(r.y=i.bottom),-1!==t.indexOf("e")?r.x=i.right:-1!==t.indexOf("w")&&(r.x=i.left),r}nx.prototype.initSnap=function(e){var t=e.context,n=t.shape,i=t.direction,r=t.snapContext;r||(r=t.snapContext=new Xb);var o=ix(n,i);return r.setSnapOrigin("corner",{x:o.x-e.x,y:o.y-e.y}),r},nx.prototype.addSnapTargetPoints=function(e,t,n,i){return _(this.getSnapTargets(t,n),(function(t){e.add("corner",Ep(t)),e.add("corner",_p(t))})),e.add("corner",ix(t,i)),e},nx.$inject=["eventBus","snapping"],nx.prototype.getSnapTargets=function(e,t){return Sp(t).filter((function(t){return!(n=t,i=e,n.host===i||yn(t)||function(e){return!!e.hidden}(t)||vn(t));var n,i}))};function rx(e){this._canvas=e,this._asyncHide=B(q(this.hide,this),1e3)}rx.$inject=["canvas"],rx.prototype.snap=function(e,t){var n=e.context.snapContext,i=n.getSnapLocations(),r={x:Pp(e,"x"),y:Pp(e,"y")};_(i,(function(i){var o=n.getSnapOrigin(i),s={x:e.x+o.x,y:e.y+o.y};if(_(["x","y"],(function(e){var n;r[e]||void 0!==(n=t.snap(s,i,e,7))&&(r[e]={value:n,originValue:n-o[e]})})),r.x&&r.y)return!1})),this.showSnapLine("vertical",r.x&&r.x.value),this.showSnapLine("horizontal",r.y&&r.y.value),_(["x","y"],(function(t){var n=r[t];f(n)&&kp(e,t,n.originValue)}))},rx.prototype._createLine=function(e){var t=this._canvas.getLayer("snap"),n=Le("path");return Te(n,{d:"M0,0 L0,0"}),Me(n).add("djs-snap-line"),ke(t,n),{update:function(t){m(t)?Te(n,"horizontal"===e?{d:"M-100000,"+t+" L+100000,"+t,display:""}:{d:"M "+t+",-100000 L "+t+", +100000",display:""}):Te(n,{display:"none"})}}},rx.prototype._createSnapLines=function(){this._snapLines={horizontal:this._createLine("horizontal"),vertical:this._createLine("vertical")}},rx.prototype.showSnapLine=function(e,t){var n=this.getSnapLine(e);n&&n.update(t),this._asyncHide()},rx.prototype.getSnapLine=function(e){return this._snapLines||this._createSnapLines(),this._snapLines[e]},rx.prototype.hide=function(){_(this._snapLines,(function(e){e.update()}))};const ox={__depends__:[{__init__:["createMoveSnapping","resizeSnapping","snapping"],createMoveSnapping:["type",Yb],resizeSnapping:["type",nx],snapping:["type",rx]}],__init__:["connectSnapping","createMoveSnapping"],connectSnapping:["type",Ub],createMoveSnapping:["type",Zb]};function sx(e,t,n,i){this._open=!1,this._results=[],this._eventMaps=[],this._canvas=e,this._eventBus=t,this._overlays=n,this._selection=i,this._container=be(sx.BOX_HTML),this._searchInput=we(sx.INPUT_SELECTOR,this._container),this._resultsContainer=we(sx.RESULTS_CONTAINER_SELECTOR,this._container),this._canvas.getContainer().appendChild(this._container),t.on(["canvas.destroy","diagram.destroy"],this.close,this)}function ax(e,t,n){var i=function(e){var t="";return e.forEach((function(e){e.matched?t+=''+bs(e.matched)+"":t+=bs(e.normal)})),""!==t?t:null}(t),r=be(n);r.innerHTML=i,e.appendChild(r)}sx.$inject=["canvas","eventBus","overlays","selection"],sx.prototype._bindEvents=function(){var e=this;function t(t,n,i,r){e._eventMaps.push({el:t,type:i,listener:me.bind(t,n,i,r)})}t(document,"html","click",(function(t){e.close()})),t(this._container,sx.INPUT_SELECTOR,"click",(function(e){e.stopPropagation(),e.delegateTarget.focus()})),t(this._container,sx.RESULT_SELECTOR,"mouseover",(function(t){t.stopPropagation(),e._scrollToNode(t.delegateTarget),e._preselect(t.delegateTarget)})),t(this._container,sx.RESULT_SELECTOR,"click",(function(t){t.stopPropagation(),e._select(t.delegateTarget)})),t(this._container,sx.INPUT_SELECTOR,"keydown",(function(e){Fs("ArrowUp",e)&&e.preventDefault(),Fs("ArrowDown",e)&&e.preventDefault()})),t(this._container,sx.INPUT_SELECTOR,"keyup",(function(t){if(Fs("Escape",t))return e.close();if(Fs("Enter",t)){var n=e._getCurrentResult();return n?e._select(n):e.close()}return Fs("ArrowUp",t)?e._scrollToDirection(!0):Fs("ArrowDown",t)?e._scrollToDirection():void(Fs(["ArrowLeft","ArrowRight"],t)||e._search(t.delegateTarget.value))}))},sx.prototype._unbindEvents=function(){this._eventMaps.forEach((function(e){me.unbind(e.el,e.type,e.listener)}))},sx.prototype._search=function(e){var t=this;if(this._clearResults(),e&&""!==e){var n=this._searchProvider.find(e);if(n.length){n.forEach((function(e){var n=e.element.id,i=t._createResultNode(e,n);t._results[n]={element:e.element,node:i}}));var i=we(sx.RESULT_SELECTOR,this._resultsContainer);this._scrollToNode(i),this._preselect(i)}}},sx.prototype._scrollToDirection=function(e){var t=this._getCurrentResult();if(t){var n=e?t.previousElementSibling:t.nextElementSibling;n&&(this._scrollToNode(n),this._preselect(n))}},sx.prototype._scrollToNode=function(e){if(e&&e!==this._getCurrentResult()){var t=e.offsetTop,n=this._resultsContainer.scrollTop,i=t-this._resultsContainer.clientHeight+e.clientHeight;t0&&ax(n,e.primaryTokens,sx.RESULT_PRIMARY_HTML),ax(n,e.secondaryTokens,sx.RESULT_SECONDARY_HTML),J(n,sx.RESULT_ID_ATTRIBUTE,t),this._resultsContainer.appendChild(n),n},sx.prototype.registerProvider=function(e){this._searchProvider=e},sx.prototype.open=function(){if(!this._searchProvider)throw new Error("no search provider registered");this.isOpen()||(this._bindEvents(),this._open=!0,te(this._container).add("open"),this._searchInput.focus(),this._eventBus.fire("searchPad.opened"))},sx.prototype.close=function(){this.isOpen()&&(this._unbindEvents(),this._open=!1,te(this._container).remove("open"),this._clearResults(),this._searchInput.value="",this._searchInput.blur(),this._resetOverlay(),this._eventBus.fire("searchPad.closed"))},sx.prototype.toggle=function(){this.isOpen()?this.close():this.open()},sx.prototype.isOpen=function(){return this._open},sx.prototype._preselect=function(e){var t=this._getCurrentResult();if(e!==t){t&&te(t).remove(sx.RESULT_SELECTED_CLASS);var n=J(e,sx.RESULT_ID_ATTRIBUTE),i=this._results[n].element;te(e).add(sx.RESULT_SELECTED_CLASS),this._resetOverlay(i),this._canvas.scrollToElement(i,{top:400}),this._selection.select(i),this._eventBus.fire("searchPad.preselected",i)}},sx.prototype._select=function(e){var t=J(e,sx.RESULT_ID_ATTRIBUTE),n=this._results[t].element;this.close(),this._resetOverlay(),this._canvas.scrollToElement(n,{top:400}),this._selection.select(n),this._eventBus.fire("searchPad.selected",n)},sx.prototype._resetOverlay=function(e){if(this._overlayId&&this._overlays.remove(this._overlayId),e){var t=function(e){var t=6,n=e.width+2*t,i=e.height+2*t,r={width:n+"px",height:i+"px"},o=be('
    ');return Z(o,r),{position:{bottom:i-t,right:n-t},show:!0,html:o}}(Et(e));this._overlayId=this._overlays.add(e,t)}},sx.CONTAINER_SELECTOR=".djs-search-container",sx.INPUT_SELECTOR=".djs-search-input input",sx.RESULTS_CONTAINER_SELECTOR=".djs-search-results",sx.RESULT_SELECTOR=".djs-search-result",sx.RESULT_SELECTED_CLASS="djs-search-result-selected",sx.RESULT_SELECTED_SELECTOR="."+sx.RESULT_SELECTED_CLASS,sx.RESULT_ID_ATTRIBUTE="data-result-id",sx.RESULT_HIGHLIGHT_CLASS="djs-search-highlight",sx.OVERLAY_CLASS="djs-search-overlay",sx.BOX_HTML='
    ',sx.RESULT_HTML='
    ',sx.RESULT_PRIMARY_HTML='
    ',sx.RESULT_SECONDARY_HTML='

    ';const lx={__depends__:[ps,is],searchPad:["type",sx]};function cx(e,t,n){this._elementRegistry=e,this._canvas=n,t.registerProvider(this)}function px(e){return w(e,(function(e){return!!e.matched})).length>0}function ux(e,t){var n=[],i=e;if(!e)return n;e=e.toLowerCase(),t=t.toLowerCase();var r=e.indexOf(t);return r>-1?(0!==r&&n.push({normal:i.substr(0,r)}),n.push({matched:i.substr(r,t.length)}),t.length+r')},hx.prototype._interactionModules=[Ys,oa,wa,ua],hx.prototype._modelingModules=[ac,bc,Nc,Oc,Mp,Ip,Bp,Vy,_f,pf,Ky,nv,gv,vv,xv,Cv,Wv,Jg,eb,cb,mb,Bb,zb,Bv,ox,dx],hx.prototype._modules=[].concat(js.prototype._modules,hx.prototype._interactionModules,hx.prototype._modelingModules);var mx={min:.2,max:4};function gx(e,t,n,i,r){var o=this;this._canvas=i,this._elementRegistry=r,this._eventBus=n,this._injector=t,this._state={isOpen:void 0,isDragging:!1,initialDragPosition:null,offsetViewport:null,cachedViewbox:null,dragger:null,svgClientRect:null,parentClientRect:null,zoomDelta:0},this._init();var s=new(fa().Manager)(document);s.add(new(fa().Pan)),s.on("panmove",u),s.on("panend",d);var a=new(fa().Manager)(this._svg);a.add(new(fa().Pan)),a.on("panstart",p(!0)),a.add(new(fa().Tap)),a.on("tap",(function(e){c(kx(e))}));var l=new(fa().Manager)(this._viewportDom);function c(e){o._state._svgClientRect&&!wx(o._state._svgClientRect)||(o._state._svgClientRect=o._svg.getBoundingClientRect()),vx(yx({x:e.x-o._state._svgClientRect.left,y:e.y-o._state._svgClientRect.top},o._svg,o._lastViewbox),o._canvas),o._update()}function p(e){return function(t){var n=kx(t);o._state._svgClientRect&&!wx(o._state._svgClientRect)||(o._state._svgClientRect=o._svg.getBoundingClientRect()),e&&c(n);var r=yx({x:n.x-o._state._svgClientRect.left,y:n.y-o._state._svgClientRect.top},o._svg,o._lastViewbox),s=i.viewbox(),a=function(e,t){var n={x:t.x+t.width/2,y:t.y+t.height/2};return{x:e.x-n.x,y:e.y-n.y}}(r,s),l=o._viewportDom.getBoundingClientRect(),p={x:n.x-l.left+1,y:n.y-l.top+1};z(o._state,{cachedViewbox:s,initialDragPosition:{x:n.x,y:n.y},isDragging:!0,offsetViewport:a,offsetViewportDom:p,viewportClientRect:o._viewport.getBoundingClientRect(),parentClientRect:o._parent.getBoundingClientRect()}),de.bind(document,"mousemove",u),de.bind(document,"mouseup",d)}}function u(e){var t=kx(e);if(o._state.isDragging){o._state._svgClientRect&&!wx(o._state._svgClientRect)||(o._state._svgClientRect=o._svg.getBoundingClientRect());var n=o._state.offsetViewportDom,i=o._state.viewportClientRect,r=o._state.parentClientRect;z(o._viewportDom.style,{top:t.y-n.y-r.top+"px",left:t.x-n.x-r.left+"px"});var s=Ex(r,{top:t.y-n.y-r.top,left:t.x-n.x-r.left,width:i.width,height:i.height});z(o._overlay.style,{clipPath:s});var a=yx({x:t.x-o._state._svgClientRect.left,y:t.y-o._state._svgClientRect.top},o._svg,o._lastViewbox);vx({x:a.x-o._state.offsetViewport.x,y:a.y-o._state.offsetViewport.y},o._canvas)}}function d(e){var t=kx(e);o._state.isDragging&&(o._state.initialDragPosition.x===t.x&&o._state.initialDragPosition.y===t.y&&c(e),o._update(),z(o._state,{cachedViewbox:null,initialDragPosition:null,isDragging:!1,offsetViewport:null,offsetViewportDom:null}),de.unbind(document,"mousemove",u),de.unbind(document,"mouseup",d))}l.add(new(fa().Pan)),l.on("panstart",p(!1)),this.toggle(e&&e.open||!1),de.bind(this._viewportDom,"mousedown",p(!1)),de.bind(this._svg,"mousedown",p(!0)),de.bind(this._parent,"wheel",(function(e){if(e.preventDefault(),e.stopPropagation(),e.ctrlKey&&(o._state._svgClientRect&&!wx(o._state._svgClientRect)||(o._state._svgClientRect=o._svg.getBoundingClientRect()),t=e,n=o._state._svgClientRect,t.x>n.left&&t.xn.top&&t.y.1){var u=p>0?1:-1,d=Math.log(i.zoom())/Math.log(10),h=(r=mx,s=20,a=Math.log(r.min)/Math.log(10),l=Math.log(r.max)/Math.log(10),(Math.abs(a)+Math.abs(l))/s),f=Math.round(d/h)*h;f+=h*u;var m=Math.pow(10,f);i.zoom(function(e,t){return Math.max(e.min,Math.min(e.max,t))}(mx,m),g),o._state.zoomDelta=0;var g=yx({x:e.clientX-o._state._svgClientRect.left,y:e.clientY-o._state._svgClientRect.top},o._svg,o._lastViewbox);vx(g,o._canvas),o._update()}}})),de.bind(this._toggle,"click",(function(e){e.preventDefault(),e.stopPropagation(),o.toggle()})),n.on(["shape.added","connection.added"],(function(e){var t=e.element;o._addElement(t),o._update()})),n.on(["shape.removed","connection.removed"],(function(e){var t=e.element;o._removeElement(t),o._update()})),n.on("elements.changed",250,(function(e){e.elements.forEach((function(e){o._updateElement(e)})),o._update()})),n.on("element.updateId",(function(e){var t=e.element,n=e.newId;o._updateElementId(t,n)})),n.on("canvas.viewbox.changed",(function(){o._state.isDragging||o._update()})),n.on("canvas.resized",(function(){document.body.contains(o._parent)&&(o._state.isDragging||o._update(),o._state._svgClientRect=o._svg.getBoundingClientRect())})),n.on(["root.set","plane.set"],(function(e){o._clear(),(e.element||e.plane.rootElement).children.forEach((function(e){o._addElement(e)})),o._update()}))}function yx(e,t,n){var i=t.getBoundingClientRect(),r=function(e,t){var n=e.width/e.height,i=z({},{x:e.x,y:e.y,width:e.width,height:e.height});if(n>t){var r=i.width*(1/t);z(i,{y:i.y-(r-i.height)/2,height:r})}else if(na?xx(o,s,a):xx(o,s,s.childNodes.length-1):this._elementsGroup.appendChild(o),!function(e){return e.waypoints}(e)?(i=e.x,r=e.y,s&&(i-=(n=e.parent).x,r-=n.y),Te(o,{transform:"translate("+i+" "+r+")"})):(i=0,r=0,void 0!==(n=e.parent).x&&void 0!==n.y&&(i=-n.x,r=-n.y),Te(o,{transform:"translate("+i+" "+r+")"})),e.children&&e.children.length&&e.children.forEach((function(e){t._addElement(e)})),o}}},gx.prototype._removeElement=function(e){var t=this._svg.getElementById(e.id);t&&Ke(t)},gx.prototype._createElement=function(e){var t,n=this._elementRegistry.getGraphics(e);if(n&&(t=function(e){return e.childNodes[0]}(n),t)){var i=Ne(t);return Te(i,{id:e.id}),i}},gx.prototype._clear=function(){Re(this._elementsGroup)};var _x=Math.sign||function(e){return e>=0?1:-1};function Ex(e,t){return"polygon("+[Ox(t.left,t.top),Ox(t.left+t.width,t.top),Ox(t.left+t.width,t.top+t.height),Ox(t.left,t.top+t.height),Ox(t.left,e.height),Ox(e.width,e.height),Ox(e.width,0),Ox(0,0),Ox(0,e.height),Ox(t.left,e.height)].join(", ")+")"}function Ox(e,t){return e+"px "+t+"px"}function Px(e){return P(e,(function(e){return f(e)?Px(e):m(e)&&isFinite(e)}))}function kx(e){return e.center?e.center:{x:e.clientX,y:e.clientY}}var Sx={__init__:["minimap"],minimap:["type",gx]};function Cx(e,t,n){return n||(n="round"),Math[n](e/t)*t}function Tx(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function Ax(e){for(var t=e.waypoints,n=t.reduce((function(e,n,i){var r=t[i-1];if(r){var o=e[e.length-1],s=o&&o.endLength||0,a=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}(r,n);e.push({start:r,end:n,startLength:s,endLength:s+a,length:a})}return e}),[]),i=n.reduce((function(e,t){return e+t.length}),0)/2,r=0,o=n[r];o.endLength2&&(s.children=arguments.length>3?Kx.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return uw(e,s,i,r,null)}function uw(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?++Zx:r,__i:-1,__u:0};return null==r&&null!=Yx.vnode&&Yx.vnode(o),o}function dw(e){return e.children}function hw(e,t){this.props=e,this.context=t}function fw(e,t){if(null==t)return e.__?fw(e.__,e.__i+1):null;for(var n;tt&&Jx.sort(nw));yw.__r=0}function vw(e,t,n,i,r,o,s,a,l,c,p){var u,d,h,f,m,g=i&&i.__k||ow,y=t.length;for(n.__d=l,function(e,t,n){var i,r,o,s,a,l=t.length,c=n.length,p=c,u=0;for(e.__k=[],i=0;i0?uw(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,a=ww(r,n,s=i+u,p),r.__i=a,o=null,-1!==a&&(p--,(o=n[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&u--,"function"!=typeof r.type&&(r.__u|=65536)):a!==s&&(a===s+1?u++:a>s?p>l-s?u+=a-s:u--:u=a(null==l||131072&l.__u?0:1))for(;s>=0||a=0){if((l=t[s])&&!(131072&l.__u)&&r==l.key&&o===l.type)return s;s--}if(a=n.__.length&&n.__.push({__V:Bw}),n.__[e]}function Ww(e){return Iw=1,Gw(s_,e)}function Gw(e,t,n){var i=Uw(Rw++,2);if(i.t=e,!i.__c&&(i.__=[n?n(t):s_(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=Nw,!Nw.u)){var r=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var s=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&i.__c.props===e)&&(!o||o.call(this,e,t,n))};Nw.u=!0;var o=Nw.shouldComponentUpdate,s=Nw.componentWillUpdate;Nw.componentWillUpdate=function(e,t,n){if(this.__e){var i=o;o=void 0,r(e,t,n),o=i}s&&s.call(this,e,t,n)},Nw.shouldComponentUpdate=r}return i.__N||i.__}function Qw(e,t){var n=Uw(Rw++,3);!Yx.__s&&o_(n.__H,t)&&(n.__=e,n.i=t,Nw.__H.__h.push(n))}function Xw(e,t){var n=Uw(Rw++,4);!Yx.__s&&o_(n.__H,t)&&(n.__=e,n.i=t,Nw.__h.push(n))}function Kw(e){return Iw=5,Yw((function(){return{current:e}}),[])}function Yw(e,t){var n=Uw(Rw++,7);return o_(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Zw(e,t){return Iw=8,Yw((function(){return e}),t)}function Jw(e){var t=Nw.context[e.__c],n=Uw(Rw++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Nw)),t.props.value):e.__}function e_(){for(var e;e=Lw.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(i_),e.__H.__h.forEach(r_),e.__H.__h=[]}catch(t){e.__H.__h=[],Yx.__e(t,e.__v)}}Yx.__b=function(e){Nw=null,qw&&qw(e)},Yx.__r=function(e){zw&&zw(e),Rw=0;var t=(Nw=e.__c).__H;t&&($w===Nw?(t.__h=[],Nw.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Bw,e.__N=e.i=void 0}))):(t.__h.forEach(i_),t.__h.forEach(r_),t.__h=[],Rw=0)),$w=Nw},Yx.diffed=function(e){Fw&&Fw(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Lw.push(t)&&jw===Yx.requestAnimationFrame||((jw=Yx.requestAnimationFrame)||n_)(e_)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Bw&&(e.__=e.__V),e.i=void 0,e.__V=Bw}))),$w=Nw=null},Yx.__c=function(e,t){t.some((function(e){try{e.__h.forEach(i_),e.__h=e.__h.filter((function(e){return!e.__||r_(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Yx.__e(n,e.__v)}})),Vw&&Vw(e,t)},Yx.unmount=function(e){Hw&&Hw(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{i_(e)}catch(e){t=e}})),n.__H=void 0,t&&Yx.__e(t,n.__v))};var t_="function"==typeof requestAnimationFrame;function n_(e){var t,n=function(){clearTimeout(i),t_&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);t_&&(t=requestAnimationFrame(n))}function i_(e){var t=Nw,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Nw=t}function r_(e){var t=Nw;e.__c=e.__(),Nw=t}function o_(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function s_(e,t){return"function"==typeof t?t(e):t}function a_(e,t){for(var n in t)e[n]=t[n];return e}function l_(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var i in t)if("__source"!==i&&e[i]!==t[i])return!0;return!1}function c_(e){this.props=e}(c_.prototype=new hw).isPureReactComponent=!0,c_.prototype.shouldComponentUpdate=function(e,t){return l_(this.props,e)||l_(this.state,t)};var p_=Yx.__b;Yx.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),p_&&p_(e)};var u_="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function d_(e){function t(t){var n=a_({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=u_,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var h_=Yx.__e;Yx.__e=function(e,t,n,i){if(e.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);h_(e,t,n,i)};var f_=Yx.unmount;function m_(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=a_({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return m_(e,t,n)}))),e}function g_(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return g_(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function y_(){this.__u=0,this.t=null,this.__b=null}function v_(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function b_(){this.u=null,this.o=null}Yx.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),f_&&f_(e)},(y_.prototype=new hw).__c=function(e,t){var n=t.__c,i=this;null==i.t&&(i.t=[]),i.t.push(n);var r=v_(i.__v),o=!1,s=function(){o||(o=!0,n.__R=null,r?r(a):a())};n.__R=s;var a=function(){if(! --i.__u){if(i.state.__a){var e=i.state.__a;i.__v.__k[0]=g_(e,e.__c.__P,e.__c.__O)}var t;for(i.setState({__a:i.__b=null});t=i.t.pop();)t.forceUpdate()}};i.__u++||32&t.__u||i.setState({__a:i.__b=i.__v.__k[0]}),e.then(s,s)},y_.prototype.componentWillUnmount=function(){this.t=[]},y_.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=m_(this.__b,n,i.__O=i.__P)}this.__b=null}var r=t.__a&&pw(dw,null,e.fallback);return r&&(r.__u&=-33),[pw(dw,null,t.__a?null:e.children),r]};var x_=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),Mw(pw(w_,{context:t.context},e.__v),t.l)}function E_(e,t){var n=pw(__,{__v:e,i:t});return n.containerInfo=t,n}(b_.prototype=new hw).__a=function(e){var t=this,n=v_(t.__v),i=t.o.get(e);return i[0]++,function(r){var o=function(){t.props.revealOrder?(i.push(r),x_(t,e,i)):r()};n?n(o):o()}},b_.prototype.render=function(e){this.u=null,this.o=new Map;var t=xw(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},b_.prototype.componentDidUpdate=b_.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){x_(e,n,t)}))};var O_="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,P_=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,k_=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,S_=/[A-Z0-9]/g,C_="undefined"!=typeof document,T_=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};hw.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(hw.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var A_=Yx.event;function M_(){}function D_(){return this.cancelBubble}function R_(){return this.defaultPrevented}Yx.event=function(e){return A_&&(e=A_(e)),e.persist=M_,e.isPropagationStopped=D_,e.isDefaultPrevented=R_,e.nativeEvent=e};var N_={enumerable:!1,configurable:!0,get:function(){return this.class}},$_=Yx.vnode;Yx.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,i={};for(var r in t){var o=t[r];if(!("value"===r&&"defaultValue"in t&&null==o||C_&&"children"===r&&"noscript"===n||"class"===r||"className"===r)){var s=r.toLowerCase();"defaultValue"===r&&"value"in t&&null==t.value?r="value":"download"===r&&!0===o?o="":"ondoubleclick"===s?r="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||T_(t.type)?"onfocus"===s?r="onfocusin":"onblur"===s?r="onfocusout":k_.test(r)?r=s:-1===n.indexOf("-")&&P_.test(r)?r=r.replace(S_,"-$&").toLowerCase():null===o&&(o=void 0):s=r="oninput","oninput"===s&&i[r=s]&&(r="oninputCapture"),i[r]=o}}"select"==n&&i.multiple&&Array.isArray(i.value)&&(i.value=xw(t.children).forEach((function(e){e.props.selected=-1!=i.value.indexOf(e.props.value)}))),"select"==n&&null!=i.defaultValue&&(i.value=xw(t.children).forEach((function(e){e.props.selected=i.multiple?-1!=i.defaultValue.indexOf(e.props.value):i.defaultValue==e.props.value}))),t.class&&!t.className?(i.class=t.class,Object.defineProperty(i,"className",N_)):(t.className&&!t.class||t.class&&t.className)&&(i.class=i.className=t.className),e.props=i}(e),e.$$typeof=O_,$_&&$_(e)};var j_=Yx.__r;Yx.__r=function(e){j_&&j_(e),e.__c};var I_=Yx.diffed;Yx.diffed=function(e){I_&&I_(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};var L_=pw;var B_=0;Array.isArray;function q_(e,t,n,i,r,o){var s,a,l={};for(a in t)"ref"==a?s=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--B_,__i:-1,__u:0,__source:r,__self:o};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return Yx.vnode&&Yx.vnode(c),c}var z_=n(942),F_=n.n(z_);const V_=1024;let H_=0;class U_{constructor(e,t){this.from=e,this.to=t}}class W_{constructor(e={}){this.id=H_++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=X_.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}W_.closedBy=new W_({deserialize:e=>e.split(" ")}),W_.openedBy=new W_({deserialize:e=>e.split(" ")}),W_.group=new W_({deserialize:e=>e.split(" ")}),W_.isolate=new W_({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}}),W_.contextHash=new W_({perNode:!0}),W_.lookAhead=new W_({perNode:!0}),W_.mounted=new W_({perNode:!0});class G_{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[W_.mounted.id]}}const Q_=Object.create(null);class X_{constructor(e,t,n,i=0){this.name=e,this.props=t,this.id=n,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):Q_,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),i=new X_(e.name||"",t,e.id,n);if(e.props)for(let n of e.props)if(Array.isArray(n)||(n=n(i)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}return i}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(W_.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let i of n.split(" "))t[i]=e[n];return e=>{for(let n=e.prop(W_.group),i=-1;i<(n?n.length:0);i++){let r=t[i<0?e.name:n[i]];if(r)return r}}}}X_.none=new X_("",Object.create(null),0,8);class K_{constructor(e){this.types=e;for(let t=0;t=t){let s=new sE(o.tree,o.overlay[0].from+e.from,-1,e);(r||(r=[i])).push(rE(s,t,n,!1))}}return r?uE(r):i}(this,e,t)}iterate(e){let{enter:t,leave:n,from:i=0,to:r=this.length}=e,o=e.mode||0,s=(o&J_.IncludeAnonymous)>0;for(let e=this.cursor(o|J_.IncludeAnonymous);;){let o=!1;if(e.from<=r&&e.to>=i&&(!s&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;o=!0}for(;o&&n&&(s||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;o=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:yE(X_.none,this.children,this.positions,0,this.children.length,0,this.length,((e,t,n)=>new eE(this.type,e,t,n,this.propValues)),e.makeTree||((e,t,n)=>new eE(X_.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:i,maxBufferLength:r=V_,reused:o=[],minRepeatType:s=i.types.length}=e,a=Array.isArray(n)?new tE(n,n.length):n,l=i.types,c=0,p=0;function u(e,t,n,v,b,x){let{id:w,start:_,end:E,size:O}=a,P=p,k=c;for(;O<0;){if(a.next(),-1==O){let t=o[w];return n.push(t),void v.push(_-e)}if(-3==O)return void(c=w);if(-4==O)return void(p=w);throw new RangeError(`Unrecognized record size: ${O}`)}let S,C,T=l[w],A=_-e;if(E-_<=r&&(C=g(a.pos-t,b))){let t=new Uint16Array(C.size-C.skip),n=a.pos-C.size,r=t.length;for(;a.pos>n;)r=y(C.start,t,r);S=new nE(t,E-C.start,i),A=C.start-e}else{let e=a.pos-O;a.next();let t=[],n=[],i=w>=s?w:-1,o=0,l=E;for(;a.pos>e;)i>=0&&a.id==i&&a.size>=0?(a.end<=l-r&&(f(t,n,_,o,a.end,l,i,P,k),o=t.length,l=a.end),a.next()):x>2500?d(_,e,t,n):u(_,e,t,n,i,x+1);if(i>=0&&o>0&&o-1&&o>0){let e=h(T,k);S=yE(T,t,n,0,t.length,0,E-_,e,e)}else S=m(T,t,n,E-_,P-E,k)}n.push(S),v.push(A)}function d(e,t,n,o){let s=[],l=0,c=-1;for(;a.pos>t;){let{id:e,start:t,end:n,size:i}=a;if(i>4)a.next();else{if(c>-1&&t=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-r,t[n++]=s[e+2]-r,t[n++]=n;n.push(new nE(t,s[2]-r,i)),o.push(r-e)}}function h(e,t){return(n,i,r)=>{let o,s,a=0,l=n.length-1;if(l>=0&&(o=n[l])instanceof eE){if(!l&&o.type==e&&o.length==r)return o;(s=o.prop(W_.lookAhead))&&(a=i[l]+o.length+s)}return m(e,n,i,r,a,t)}}function f(e,t,n,r,o,s,a,l,c){let p=[],u=[];for(;e.length>r;)p.push(e.pop()),u.push(t.pop()+n-o);e.push(m(i.types[a],p,u,s-o,l-s,c)),t.push(o-n)}function m(e,t,n,i,r,o,s){if(o){let e=[W_.contextHash,o];s=s?[e].concat(s):[e]}if(r>25){let e=[W_.lookAhead,r];s=s?[e].concat(s):[e]}return new eE(e,t,n,i,s)}function g(e,t){let n=a.fork(),i=0,o=0,l=0,c=n.end-r,p={size:0,start:0,skip:0};e:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){p.size=i,p.start=o,p.skip=l,l+=4,i+=4,n.next();continue}let a=n.pos-e;if(e<0||a=s?4:0,d=n.start;for(n.next();n.pos>a;){if(n.size<0){if(-3!=n.size)break e;u+=4}else n.id>=s&&(u+=4);n.next()}o=d,i+=e,l+=u}return(t<0||i==e)&&(p.size=i,p.start=o,p.skip=l),p.size>4?p:void 0}function y(e,t,n){let{id:i,start:r,end:o,size:l}=a;if(a.next(),l>=0&&i4){let i=a.pos-(l-4);for(;a.pos>i;)n=y(e,t,n)}t[--n]=s,t[--n]=o-e,t[--n]=r-e,t[--n]=i}else-3==l?c=i:-4==l&&(p=i);return n}let v=[],b=[];for(;a.pos>0;)u(e.start||0,e.bufferStart||0,v,b,-1,0);let x=null!==(t=e.length)&&void 0!==t?t:v.length?b[0]+v[0].length:0;return new eE(l[e.topID],v.reverse(),b.reverse(),x)}(e)}}eE.empty=new eE(X_.none,[],[],0);class tE{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new tE(this.buffer,this.index)}}class nE{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return X_.none}toString(){let e=[];for(let t=0;t0));a=o[a+3]);return s}slice(e,t,n){let i=this.buffer,r=new Uint16Array(t-e),o=0;for(let s=e,a=0;s=t&&nt;case 1:return n<=t&&i>t;case 2:return i>t;case 4:return!0}}function rE(e,t,n,i){for(var r;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to0?s.length:-1;e!=l;e+=t){let l=s[e],c=a[e]+o.from;if(iE(i,n,c,c+l.length))if(l instanceof nE){if(r&J_.ExcludeBuffers)continue;let s=l.findChild(0,l.buffer.length,t,n-c,i);if(s>-1)return new pE(new cE(o,l,e,c),null,s)}else if(r&J_.IncludeAnonymous||!l.type.isAnonymous||fE(l)){let s;if(!(r&J_.IgnoreMounts)&&(s=G_.get(l))&&!s.overlay)return new sE(s.tree,c,e,o);let a=new sE(l,c,e,o);return r&J_.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(t<0?l.children.length-1:0,t,n,i)}}if(r&J_.IncludeAnonymous||!o.type.isAnonymous)return null;if(e=o.index>=0?o.index+t:t<0?-1:o._parent._tree.children.length,o=o._parent,!o)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let i;if(!(n&J_.IgnoreOverlays)&&(i=G_.get(this._tree))&&i.overlay){let n=e-this.from;for(let{from:e,to:r}of i.overlay)if((t>0?e<=n:e=n:r>n))return new sE(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function aE(e,t,n,i){let r=e.cursor(),o=[];if(!r.firstChild())return o;if(null!=n)for(let e=!1;!e;)if(e=r.type.is(n),!r.nextSibling())return o;for(;;){if(null!=i&&r.type.is(i))return o;if(r.type.is(t)&&o.push(r.node),!r.nextSibling())return null==i?o:[]}}function lE(e,t,n=t.length-1){for(let i=e;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(t[n]&&t[n]!=i.name)return!1;n--}}return!0}class cE{constructor(e,t,n,i){this.parent=e,this.buffer=t,this.index=n,this.start=i}}class pE extends oE{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:i}=this.context,r=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,n);return r<0?null:new pE(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&J_.ExcludeBuffers)return null;let{buffer:i}=this.context,r=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new pE(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new pE(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new pE(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,i=this.index+4,r=n.buffer[this.index+3];if(r>i){let o=n.buffer[this.index+1];e.push(n.slice(i,r,o)),t.push(0)}return new eE(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function uE(e){if(!e.length)return null;let t=0,n=e[0];for(let i=1;in.from||r.to0){if(this.index-1)for(let i=t+e,r=e<0?-1:n._tree.children.length;i!=r;i+=e){let e=n._tree.children[i];if(this.mode&J_.IncludeAnonymous||e instanceof nE||!e.type.isAnonymous||fE(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;t=o,n=r+1;break e}i=this.stack[--r]}for(let e=n;e=0;r--){if(r<0)return lE(this._tree,e,i);let o=n[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function fE(e){return e.children.some((e=>e instanceof nE||!e.type.isAnonymous||fE(e)))}const mE=new WeakMap;function gE(e,t){if(!e.isAnonymous||t instanceof nE||t.type!=e)return 1;let n=mE.get(t);if(null==n){n=1;for(let i of t.children){if(i.type!=e||!(i instanceof eE)){n=1;break}n+=gE(e,i)}mE.set(t,n)}return n}function yE(e,t,n,i,r,o,s,a,l){let c=0;for(let n=i;n=p)break;f+=t}if(c==r+1){if(f>p){let e=n[r];t(e.children,e.positions,0,e.children.length,i[r]+a);continue}u.push(n[r])}else{let t=i[c-1]+n[c-1].length-h;u.push(yE(e,n,i,r,c,h,t,null,l))}d.push(h+a-o)}}(t,n,i,r,0),(a||l)(u,d,s)}class vE{constructor(e,t,n,i,r=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=i,this.open=(r?1:0)|(o?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let i=[new vE(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&i.push(n);return i}static applyChanges(e,t,n=128){if(!t.length)return e;let i=[],r=1,o=e.length?e[0]:null;for(let s=0,a=0,l=0;;s++){let c=s=n)for(;o&&o.from=t.from||p<=t.to||l){let e=Math.max(t.from,a)-l,n=Math.min(t.to,p)-l;t=e>=n?null:new vE(e,n,t.tree,t.offset+l,s>0,!!c)}if(t&&i.push(t),o.to>p)break;o=rnew U_(e.from,e.to))):[new U_(0,0)]:[new U_(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let i=this.startParse(e,t,n);for(;;){let e=i.advance();if(e)return e}}}class xE{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}class wE{constructor(e,t,n,i,r){this.parser=e,this.parse=t,this.overlay=n,this.target=i,this.from=r}}function _E(e){if(!e.length||e.some((e=>e.from>=e.to)))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}class EE{constructor(e,t,n,i,r,o,s){this.parser=e,this.predicate=t,this.mounts=n,this.index=i,this.start=r,this.target=o,this.prev=s,this.depth=0,this.ranges=[]}}const OE=new W_({perNode:!0});class PE{constructor(e,t,n,i,r){this.nest=t,this.input=n,this.fragments=i,this.ranges=r,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return null!=this.stoppedAt&&(e=new eE(e.type,e.children,e.positions,e.length,e.propValues.concat([[OE,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[W_.mounted.id]=new G_(t,e.overlay,e.parser),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t=this.stoppedAt)a=!1;else if(e.hasNode(i)){if(t){let e=t.mounts.find((e=>e.frag.from<=i.from&&e.frag.to>=i.to&&e.mount.overlay));if(e)for(let n of e.mount.overlay){let r=n.from+e.pos,o=n.to+e.pos;r>=i.from&&o<=i.to&&!t.ranges.some((e=>e.fromr))&&t.ranges.push({from:r,to:o})}}a=!1}else if(n&&(o=kE(n.ranges,i.from,i.to)))a=2!=o;else if(!i.type.isAnonymous&&(r=this.nest(i,this.input))&&(i.fromnew U_(e.from-i.from,e.to-i.from))):null,i.tree,e.length?e[0].from:i.from)),r.overlay?e.length&&(n={ranges:e,depth:0,prev:n}):a=!1}}else if(t&&(s=t.predicate(i))&&(!0===s&&(s=new U_(i.from,i.to)),s.from=0&&t.ranges[e].to==s.from?t.ranges[e]={from:t.ranges[e].from,to:s.to}:t.ranges.push(s)}if(a&&i.firstChild())t&&t.depth++,n&&n.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(t&&! --t.depth){let e=ME(this.ranges,t.ranges);e.length&&(_E(e),this.inner.splice(t.index,0,new wE(t.parser,t.parser.startParse(this.input,RE(t.mounts,e),e),t.ranges.map((e=>new U_(e.from-t.start,e.to-t.start))),t.target,e[0].from))),t=t.prev}n&&! --n.depth&&(n=n.prev)}}}}function kE(e,t,n){for(let i of e){if(i.from>=n)break;if(i.to>t)return i.from<=t&&i.to>=n?2:1}return 0}function SE(e,t,n,i,r,o){if(t=e&&t.enter(n,1,J_.IgnoreOverlays|J_.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(!(t.children.length&&0==t.positions[0]&&t.children[0]instanceof eE))break;t=t.children[0]}return!1}}class AE{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=null!==(t=n.tree.prop(OE))&&void 0!==t?t:n.to,this.inner=new TE(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(e=t.tree.prop(OE))&&void 0!==e?e:t.to,this.inner=new TE(t.tree,-t.offset)}}findMounts(e,t){var n;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let r=null===(n=e.tree)||void 0===n?void 0:n.prop(W_.mounted);if(r&&r.parser==t)for(let t=this.fragI;t=e.to)break;n.tree==this.curFrag.tree&&i.push({frag:n,pos:e.from-n.offset,mount:r})}}}return i}}function ME(e,t){let n=null,i=t;for(let r=1,o=0;r=a)break;e.to<=s||(n||(i=n=t.slice()),e.froma&&n.splice(o+1,0,new U_(a,e.to))):e.to>a?n[o--]=new U_(a,e.to):n.splice(o--,1))}}return i}function DE(e,t,n,i){let r=0,o=0,s=!1,a=!1,l=-1e9,c=[];for(;;){let p=r==e.length?1e9:s?e[r].to:e[r].from,u=o==t.length?1e9:a?t[o].to:t[o].from;if(s!=a){let e=Math.max(l,n),t=Math.min(p,u,i);enew U_(e.from+i,e.to+i))),a,l);for(let t=0,i=a;;t++){let a=t==s.length,c=a?l:s[t].from;if(c>i&&n.push(new vE(i,c,r.tree,-e,o.from>=i||o.openStart,o.to<=c||o.openEnd)),a)break;i=s[t].to}}else n.push(new vE(a,l,r.tree,-e,o.from>=e||o.openStart,o.to<=s||o.openEnd))}return n}var NE=n(225);class $E{constructor(e,t,n,i,r,o,s,a,l,c=0,p){this.p=e,this.stack=t,this.state=n,this.reducePos=i,this.pos=r,this.score=o,this.buffer=s,this.bufferBase=a,this.curContext=l,this.lookAhead=c,this.parent=p}toString(){return`[${this.stack.filter(((e,t)=>t%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let i=e.parser.context;return new $E(e,[],t,n,n,0,[],0,i?new jE(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,i=65535&e,{parser:r}=this.p,o=this.reducePos=2e3&&!(null===(t=this.p.parser.nodeSet.types[i])||void 0===t?void 0:t.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizea;)this.stack.pop();this.reduceContext(i,l)}storeNode(e,t,n,i=4,r=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==e.buffer[i-4]&&e.buffer[i-1]>-1){if(t==n)return;if(e.buffer[i-2]>=t)return void(e.buffer[i-2]=n)}}if(r&&this.pos!=n){let r=this.buffer.length;if(r>0&&0!=this.buffer[r-4]){let e=!1;for(let t=r;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;r>0&&this.buffer[r-2]>n;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=e,this.buffer[r+1]=t,this.buffer[r+2]=n,this.buffer[r+3]=i}else this.buffer.push(e,t,n,i)}shift(e,t,n,i){if(131072&e)this.pushState(65535&e,this.pos);else if(262144&e)this.pos=i,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,i,4);else{let r=e,{parser:o}=this.p;(i>this.pos||t<=o.maxNode)&&(this.pos=i,o.stateFlag(r,1)||(this.reducePos=i)),this.pushState(r,n),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,i,4)}}apply(e,t,n,i){65536&e?this.reduce(e):this.shift(e,t,n,i)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(n,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new $E(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new IE(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if(!(65536&n))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let i,r=0;r1&t&&e==i))||n.push(t[e],i)}t=n}let n=[];for(let e=0;e>19,i=65535&t,r=this.stack.length-3*n;if(r<0||e.getGoto(this.stack[r],i,!1)<0){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(i,r)=>{if(!t.includes(i))return t.push(i),e.allActions(i,(t=>{if(393216&t);else if(65536&t){let n=(t>>19)-r;if(n>1){let i=65535&t,r=this.stack.length-3*n;if(r>=0&&e.getGoto(this.stack[r],i,!1)>=0)return n<<19|65536|i}}else{let e=n(t,r+1);if(null!=e)return e}}))};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class jE{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class IE{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,n=e>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class LE{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new LE(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new LE(this.stack,this.pos,this.index)}}function BE(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let i=0,r=0;i=92&&t--,t>=34&&t--;let r=t-32;if(r>=46&&(r-=46,n=!0),o+=r,n)break;o*=46}n?n[r++]=o:n=new t(o)}return n}class qE{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const zE=new qE;class FE{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=zE,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,i=this.rangeIndex,r=this.pos+e;for(;rn.to:r>=n.to;){if(i==this.ranges.length-1)return null;let e=this.ranges[++i];r+=e.from-n.to,n=e}return r}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t,n,i=this.chunkOff+e;if(i>=0&&i=this.chunk2Pos&&ti.to&&(this.chunk2=this.chunk2.slice(0,i.to-t)),n=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),n}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=zE,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(n+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return n}}class VE{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;UE(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}VE.prototype.contextual=VE.prototype.fallback=VE.prototype.extend=!1;VE.prototype.fallback=VE.prototype.extend=!1;class HE{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function UE(e,t,n,i,r,o){let s=0,a=1<0){let n=e[i];if(l.allows(n)&&(-1==t.token.value||t.token.value==n||GE(n,t.token.value,r,o))){t.acceptToken(n);break}}let i=t.next,c=0,p=e[s+2];if(!(t.next<0&&p>c&&65535==e[n+3*p-3])){for(;c>1,o=n+r+(r<<1),a=e[o],l=e[o+1]||65536;if(i=l)){s=e[o+2],t.advance();continue e}c=r+1}}break}s=e[n+3*p-1]}}function WE(e,t,n){for(let i,r=t;65535!=(i=e[r]);r++)if(i==n)return r-t;return-1}function GE(e,t,n,i){let r=WE(n,i,t);return r<0||WE(n,i,e)t)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,t-25)):Math.min(e.length,Math.max(i.from+1,t+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:e.length}}class YE{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?KE(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?KE(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(r instanceof eE){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+r.length}}}class ZE{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map((e=>new qE))}getActions(e){let t=0,n=null,{parser:i}=e.p,{tokenizers:r}=i,o=i.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,a=0;for(let i=0;ic.end+25&&(a=Math.max(c.lookAhead,a)),0!=c.value)){let i=t;if(c.extended>-1&&(t=this.addActions(e,c.extended,c.end,t)),t=this.addActions(e,c.value,c.end,t),!l.extend&&(n=c,t>i))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),n||e.pos!=this.stream.end||(n=new qE,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new qE,{pos:n,p:i}=e;return t.start=n,t.end=Math.min(n+1,i.stream.end),t.value=n==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,n){let i=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(i,e),n),e.value>-1){let{parser:t}=n.p;for(let i=0;i=0&&n.p.parser.dialect.allows(r>>1)){1&r?e.extended=r>>1:e.value=r>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,n,i){for(let t=0;t4*e.bufferLength?new YE(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,i=this.minStackPos,r=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;oi)r.push(s);else{if(this.advanceStack(s,r,n))continue;{e||(e=[],t=[]),e.push(s);let n=this.tokens.getMainToken(s);t.push(n.value,n.end)}}break}}if(!r.length){let t=e&&function(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=e&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.scorethis.stoppedAt?e[0]:this.runRecovery(e,t,r);if(n)return QE&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(r.length>e)for(r.sort(((e,t)=>t.score-e.score));r.length>e;)r.pop();r.some((e=>e.reducePos>i))&&this.recovering--}else if(r.length>1){e:for(let e=0;e500&&i.buffer.length>500){if(!((t.score-i.score||t.buffer.length-i.buffer.length)>0)){r.splice(e--,1);continue e}r.splice(n--,1)}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let e=1;e ":"";if(null!=this.stoppedAt&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let s=this.fragments.nodeAt(i);s;){let i=this.parser.nodeSet.types[s.type.id]==s.type?r.getGoto(e.state,s.type.id):-1;if(i>-1&&s.length&&(!t||(s.prop(W_.contextHash)||0)==n))return e.useNode(s,i),QE&&console.log(o+this.stackID(e)+` (via reuse of ${r.getName(s.type.id)})`),!0;if(!(s instanceof eE)||0==s.children.length||s.positions[0]>0)break;let a=s.children[0];if(!(a instanceof eE&&0==s.positions[0]))break;s=a}}let s=r.stateSlot(e.state,4);if(s>0)return e.reduce(s),QE&&console.log(o+this.stackID(e)+` (via always-reduce ${r.getName(65535&s)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let s=0;si?t.push(d):n.push(d)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return eO(e,t),!0}}runRecovery(e,t,n){let i=null,r=!1;for(let o=0;o ":"";if(s.deadEnd){if(r)continue;if(r=!0,s.restart(),QE&&console.log(c+this.stackID(s)+" (restarted)"),this.advanceFully(s,n))continue}let p=s.split(),u=c;for(let e=0;p.forceReduce()&&e<10;e++){if(QE&&console.log(u+this.stackID(p)+" (via force-reduce)"),this.advanceFully(p,n))break;QE&&(u=this.stackID(p)+" -> ")}for(let e of s.recoverByInsert(a))QE&&console.log(c+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>s.pos?(l==s.pos&&(l++,a=0),s.recoverByDelete(a,l),QE&&console.log(c+this.stackID(s)+` (via recover-delete ${this.parser.getName(a)})`),eO(s,n)):(!i||i.scoree;class iO{constructor(e){this.start=e.start,this.shift=e.shift||nO,this.reduce=e.reduce||nO,this.reuse=e.reuse||nO,this.hash=e.hash||(()=>0),this.strict=!1!==e.strict}}class rO extends bE{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;ne.topRules[t][1])),i=[];for(let e=0;e=0)r(i,e,t[n++]);else{let o=t[n+-i];for(let s=-i;s>0;s--)r(t[n++],e,o);n++}}}this.nodeSet=new K_(t.map(((t,r)=>X_.define({name:r>=this.minRepeatTerm?void 0:t,id:r,props:i[r],top:n.indexOf(r)>-1,error:0==r,skipped:e.skippedNodes&&e.skippedNodes.indexOf(r)>-1})))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=V_;let o=BE(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e"number"==typeof e?new VE(o,e):e)),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let i=new JE(this,e,t,n);for(let r of this.wrappers)i=r(i,e,t,n);return i}getGoto(e,t,n=!1){let i=this.goto;if(t>=i[0])return-1;for(let r=i[t+1];;){let t=i[r++],o=1&t,s=i[r++];if(o&&n)return s;for(let n=r+(t>>1);r0}validAction(e,t){return!!this.allActions(e,(e=>e==t||null))}allActions(e,t){let n=this.stateSlot(e,4),i=n?t(n):void 0;for(let n=this.stateSlot(e,1);null==i;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=oO(this.data,n+2)}i=t(oO(this.data,n+1))}return i}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=oO(this.data,n+2)}if(!(1&this.data[n+2])){let e=this.data[n+1];t.some(((t,n)=>1&n&&t==e))||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(rO.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map((t=>{let n=e.tokenizers.find((e=>e.from==t));return n?n.to:t}))),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map(((n,i)=>{let r=e.specializers.find((e=>e.from==n.external));if(!r)return n;let o=Object.assign(Object.assign({},n),{external:r.to});return t.specializers[i]=sO(o),o}))),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map((()=>!1));if(e)for(let i of e.split(" ")){let e=t.indexOf(i);e>=0&&(n[e]=!0)}let i=null;for(let e=0;ee.external(n,i)<<1|t}return e.get}let aO=0;class lO{constructor(e,t,n,i){this.name=e,this.set=t,this.base=n,this.modified=i,this.id=aO++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n="string"==typeof e?e:"?";if(e instanceof lO&&(t=e),null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");let i=new lO(n,[],null,[]);if(i.set.push(i),t)for(let e of t.set)i.set.push(e);return i}static defineModifier(e){let t=new pO(e);return e=>e.modified.indexOf(t)>-1?e:pO.get(e.base||e,e.modified.concat(t).sort(((e,t)=>e.id-t.id)))}}let cO=0;class pO{constructor(e){this.name=e,this.instances=[],this.id=cO++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find((n=>n.base==e&&function(e,t){return e.length==t.length&&e.every(((e,n)=>e==t[n]))}(t,n.modified)));if(n)return n;let i=[],r=new lO(e.name,i,e,t);for(let e of t)e.instances.push(r);let o=function(e){let t=[[]];for(let n=0;nt.length-e.length))}(t);for(let t of e.set)if(!t.modified.length)for(let e of o)i.push(pO.get(t,e));return r}}function uO(e){let t=Object.create(null);for(let n in e){let i=e[n];Array.isArray(i)||(i=[i]);for(let e of n.split(" "))if(e){let n=[],r=2,o=e;for(let t=0;;){if("..."==o&&t>0&&t+3==e.length){r=1;break}let i=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!i)throw new RangeError("Invalid path: "+e);if(n.push("*"==i[0]?"":'"'==i[0][0]?JSON.parse(i[0]):i[0]),t+=i[0].length,t==e.length)break;let s=e[t++];if(t==e.length&&"!"==s){r=0;break}if("/"!=s)throw new RangeError("Invalid path: "+e);o=e.slice(t)}let s=n.length-1,a=n[s];if(!a)throw new RangeError("Invalid path: "+e);let l=new hO(i,r,s>0?n.slice(0,s):null);t[a]=l.sort(t[a])}}return dO.add(t)}const dO=new W_;class hO{constructor(e,t,n,i){this.tags=e,this.mode=t,this.context=n,this.next=i}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth{let t=r;for(let i of e)for(let e of i.set){let i=n[e.id];if(i){t=t?t+" "+i:i;break}}return t},scope:i}}function mO(e,t,n,i=0,r=e.length){let o=new gO(i,Array.isArray(t)?t:[t],n);o.highlightRange(e.cursor(),i,r,"",o.highlighters),o.flush(r)}hO.empty=new hO([],2,null);class gO{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,i,r){let{type:o,from:s,to:a}=e;if(s>=n||a<=t)return;o.isTop&&(r=this.highlighters.filter((e=>!e.scope||e.scope(o))));let l=i,c=function(e){let t=e.type.prop(dO);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||hO.empty,p=function(e,t){let n=null;for(let i of e){let e=i.style(t);e&&(n=n?n+" "+e:e)}return n}(r,c.tags);if(p&&(l&&(l+=" "),l+=p,1==c.mode&&(i+=(i?" ":"")+p)),this.startSpan(Math.max(t,s),l),c.opaque)return;let u=e.tree&&e.tree.prop(W_.mounted);if(u&&u.overlay){let o=e.node.enter(u.overlay[0].from+s,1),c=this.highlighters.filter((e=>!e.scope||e.scope(u.tree.type))),p=e.firstChild();for(let d=0,h=s;;d++){let f=d=m)&&e.nextSibling()););if(!f||m>n)break;h=f.to+s,h>t&&(this.highlightRange(o.cursor(),Math.max(t,f.from+s),Math.min(n,h),"",c),this.startSpan(Math.min(n,h),l))}p&&e.parent()}else if(e.firstChild()){u&&(i="");do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,i,r),this.startSpan(Math.min(n,e.to),l)}}while(e.nextSibling());e.parent()}}}const yO=lO.define,vO=yO(),bO=yO(),xO=yO(bO),wO=yO(bO),_O=yO(),EO=yO(_O),OO=yO(_O),PO=yO(),kO=yO(PO),SO=yO(),CO=yO(),TO=yO(),AO=yO(TO),MO=yO(),DO={comment:vO,lineComment:yO(vO),blockComment:yO(vO),docComment:yO(vO),name:bO,variableName:yO(bO),typeName:xO,tagName:yO(xO),propertyName:wO,attributeName:yO(wO),className:yO(bO),labelName:yO(bO),namespace:yO(bO),macroName:yO(bO),literal:_O,string:EO,docString:yO(EO),character:yO(EO),attributeValue:yO(EO),number:OO,integer:yO(OO),float:yO(OO),bool:yO(_O),regexp:yO(_O),escape:yO(_O),color:yO(_O),url:yO(_O),keyword:SO,self:yO(SO),null:yO(SO),atom:yO(SO),unit:yO(SO),modifier:yO(SO),operatorKeyword:yO(SO),controlKeyword:yO(SO),definitionKeyword:yO(SO),moduleKeyword:yO(SO),operator:CO,derefOperator:yO(CO),arithmeticOperator:yO(CO),logicOperator:yO(CO),bitwiseOperator:yO(CO),compareOperator:yO(CO),updateOperator:yO(CO),definitionOperator:yO(CO),typeOperator:yO(CO),controlOperator:yO(CO),punctuation:TO,separator:yO(TO),bracket:AO,angleBracket:yO(AO),squareBracket:yO(AO),paren:yO(AO),brace:yO(AO),content:PO,heading:kO,heading1:yO(kO),heading2:yO(kO),heading3:yO(kO),heading4:yO(kO),heading5:yO(kO),heading6:yO(kO),contentSeparator:yO(PO),list:yO(PO),quote:yO(PO),emphasis:yO(PO),strong:yO(PO),link:yO(PO),monospace:yO(PO),strikethrough:yO(PO),inserted:yO(),deleted:yO(),changed:yO(),invalid:yO(),meta:MO,documentMeta:yO(MO),annotation:yO(MO),processingInstruction:yO(MO),definition:lO.defineModifier("definition"),constant:lO.defineModifier("constant"),function:lO.defineModifier("function"),standard:lO.defineModifier("standard"),local:lO.defineModifier("local"),special:lO.defineModifier("special")};for(let e in DO){let t=DO[e];t instanceof lO&&(t.name=e)}fO([{tag:DO.link,class:"tok-link"},{tag:DO.heading,class:"tok-heading"},{tag:DO.emphasis,class:"tok-emphasis"},{tag:DO.strong,class:"tok-strong"},{tag:DO.keyword,class:"tok-keyword"},{tag:DO.atom,class:"tok-atom"},{tag:DO.bool,class:"tok-bool"},{tag:DO.url,class:"tok-url"},{tag:DO.labelName,class:"tok-labelName"},{tag:DO.inserted,class:"tok-inserted"},{tag:DO.deleted,class:"tok-deleted"},{tag:DO.literal,class:"tok-literal"},{tag:DO.string,class:"tok-string"},{tag:DO.number,class:"tok-number"},{tag:[DO.regexp,DO.escape,DO.special(DO.string)],class:"tok-string2"},{tag:DO.variableName,class:"tok-variableName"},{tag:DO.local(DO.variableName),class:"tok-variableName tok-local"},{tag:DO.definition(DO.variableName),class:"tok-variableName tok-definition"},{tag:DO.special(DO.variableName),class:"tok-variableName2"},{tag:DO.definition(DO.propertyName),class:"tok-propertyName tok-definition"},{tag:DO.typeName,class:"tok-typeName"},{tag:DO.namespace,class:"tok-namespace"},{tag:DO.className,class:"tok-className"},{tag:DO.macroName,class:"tok-macroName"},{tag:DO.propertyName,class:"tok-propertyName"},{tag:DO.operator,class:"tok-operator"},{tag:DO.comment,class:"tok-comment"},{tag:DO.meta,class:"tok-meta"},{tag:DO.invalid,class:"tok-invalid"},{tag:DO.punctuation,class:"tok-punctuation"}]);class RO{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=FO(this,e,t);let i=[];return this.decompose(0,e,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(t,this.length,i,1),$O.from(i,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=FO(this,e,t);let n=[];return this.decompose(e,t,n,0),$O.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),i=new LO(this),r=new LO(e);for(let e=t,o=t;;){if(i.next(e),r.next(e),e=0,i.lineBreak!=r.lineBreak||i.done!=r.done||i.value!=r.value)return!1;if(o+=i.value.length,i.done||o>=n)return!0}}iter(e=1){return new LO(this,e)}iterRange(e,t=this.length){return new BO(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let i=this.line(e).from;n=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new qO(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new NO(e):$O.from(NO.split(e,[])):RO.empty}}class NO extends RO{constructor(e,t=function(e){let t=-1;for(let n of e)t+=n.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,i){for(let r=0;;r++){let o=this.text[r],s=i+o.length;if((t?n:s)>=e)return new zO(i,s,n,o);i=s+1,n++}}decompose(e,t,n,i){let r=e<=0&&t>=this.length?this:new NO(IO(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&i){let e=n.pop(),t=jO(r.text,e.text.slice(),0,r.length);if(t.length<=32)n.push(new NO(t,e.length+r.length));else{let e=t.length>>1;n.push(new NO(t.slice(0,e)),new NO(t.slice(e)))}}else n.push(r)}replace(e,t,n){if(!(n instanceof NO))return super.replace(e,t,n);[e,t]=FO(this,e,t);let i=jO(this.text,jO(n.text,IO(this.text,0,e)),t),r=this.length+n.length-(t-e);return i.length<=32?new NO(i,r):$O.from(NO.split(i,[]),r)}sliceString(e,t=this.length,n="\n"){[e,t]=FO(this,e,t);let i="";for(let r=0,o=0;r<=t&&oe&&o&&(i+=n),er&&(i+=s.slice(Math.max(0,e-r),t-r)),r=a+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],i=-1;for(let r of e)n.push(r),i+=r.length+1,32==n.length&&(t.push(new NO(n,i)),n=[],i=-1);return i>-1&&t.push(new NO(n,i)),t}}class $O extends RO{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,i){for(let r=0;;r++){let o=this.children[r],s=i+o.length,a=n+o.lines-1;if((t?a:s)>=e)return o.lineInner(e,t,n,i);i=s+1,n=a+1}}decompose(e,t,n,i){for(let r=0,o=0;o<=t&&r=o){let r=i&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!r?n.push(s):s.decompose(e-o,t-o,n,r)}o=a+1}}replace(e,t,n){if([e,t]=FO(this,e,t),n.lines=r&&t<=s){let a=o.replace(e-r,t-r,n),l=this.lines-o.lines+a.lines;if(a.lines>4&&a.lines>l>>6){let r=this.children.slice();return r[i]=a,new $O(r,this.length-(t-e)+n.length)}return super.replace(r,s,a)}r=s+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){[e,t]=FO(this,e,t);let i="";for(let r=0,o=0;re&&r&&(i+=n),eo&&(i+=s.sliceString(e-o,t-o,n)),o=a+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof $O))return 0;let n=0,[i,r,o,s]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,r+=t){if(i==o||r==s)return n;let a=this.children[i],l=e.children[r];if(a!=l)return n+a.scanIdentical(l,t);n+=a.length+1}}static from(e,t=e.reduce(((e,t)=>e+t.length+1),-1)){let n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new NO(n,t)}let i=Math.max(32,n>>5),r=i<<1,o=i>>1,s=[],a=0,l=-1,c=[];function p(e){let t;if(e.lines>r&&e instanceof $O)for(let t of e.children)p(t);else e.lines>o&&(a>o||!a)?(u(),s.push(e)):e instanceof NO&&a&&(t=c[c.length-1])instanceof NO&&e.lines+t.lines<=32?(a+=e.lines,l+=e.length+1,c[c.length-1]=new NO(t.text.concat(e.text),t.length+1+e.length)):(a+e.lines>i&&u(),a+=e.lines,l+=e.length+1,c.push(e))}function u(){0!=a&&(s.push(1==c.length?c[0]:$O.from(c,l)),l=-1,a=c.length=0)}for(let t of e)p(t);return u(),1==s.length?s[0]:new $O(s,t)}}function jO(e,t,n=0,i=1e9){for(let r=0,o=0,s=!0;o=n&&(l>i&&(a=a.slice(0,i-r)),r0?1:(e instanceof NO?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],r=this.offsets[n],o=r>>1,s=i instanceof NO?i.text.length:i.children.length;if(o==(t>0?s:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&r)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(i instanceof NO){let r=i.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,r.length>Math.max(0,e))return this.value=0==e?r:t>0?r.slice(e):r.slice(0,r.length-e),this;e-=r.length}else{let r=i.children[o+(t<0?-1:0)];e>r.length?(e-=r.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(r),this.offsets.push(t>0?1:(r instanceof NO?r.text.length:r.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class BO{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new LO(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=n?i:t<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class qO{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(RO.prototype[Symbol.iterator]=function(){return this.iter()},LO.prototype[Symbol.iterator]=BO.prototype[Symbol.iterator]=qO.prototype[Symbol.iterator]=function(){return this});class zO{constructor(e,t,n,i){this.from=e,this.to=t,this.number=n,this.text=i}get length(){return this.to-this.from}}function FO(e,t,n){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,n))]}let VO="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e=>e?parseInt(e,36):1));for(let e=1;ee)return VO[t-1]<=e;return!1}function UO(e){return e>=127462&&e<=127487}function WO(e,t,n=!0,i=!0){return(n?GO:QO)(e,t,i)}function GO(e,t,n){if(t==e.length)return t;t&&XO(e.charCodeAt(t))&&KO(e.charCodeAt(t-1))&&t--;let i=YO(e,t);for(t+=JO(i);t=0&&UO(YO(e,i));)n++,i-=2;if(n%2==0)break;t+=2}}}return t}function QO(e,t,n){for(;t>0;){let i=GO(e,t-2,n);if(i=56320&&e<57344}function KO(e){return e>=55296&&e<56320}function YO(e,t){let n=e.charCodeAt(t);if(!KO(n)||t+1==e.length)return n;let i=e.charCodeAt(t+1);return XO(i)?i-56320+(n-55296<<10)+65536:n}function ZO(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function JO(e){return e<65536?1:2}const eP=/\r\n?|\n/;var tP=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(tP||(tP={}));class nP{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return r+(e-i);r+=s}else{if(n!=tP.Simple&&l>=e&&(n==tP.TrackDel&&ie||n==tP.TrackBefore&&ie))return null;if(l>e||l==e&&t<0&&!s)return e==i||t<0?r:r+a;r+=a}i=l}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return r}touchesRange(e,t=e){for(let n=0,i=0;n=0&&i<=t&&r>=e)return!(it)||"cover";i=r}return!1}toString(){let e="";for(let t=0;t=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some((e=>"number"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new nP(e)}static create(e){return new nP(e)}}class iP extends nP{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return sP(this,((t,n,i,r,o)=>e=e.replace(i,i+(n-t),o)),!1),e}mapDesc(e,t=!1){return aP(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let i=0,r=0;i=0){t[i]=s,t[i+1]=o;let a=i>>1;for(;n.length0&&oP(n,t,r.text),r.forward(e),s+=e}let l=e[o++];for(;s>1].toJSON()))}return e}static of(e,t,n){let i=[],r=[],o=0,s=null;function a(e=!1){if(!e&&!i.length)return;os||e<0||s>t)throw new RangeError(`Invalid change range ${e} to ${s} (in doc of length ${t})`);let p=c?"string"==typeof c?RO.of(c.split(n||eP)):c:RO.empty,u=p.length;if(e==s&&0==u)return;eo&&rP(i,e-o,-1),rP(i,s-e,u),oP(r,i,p),o=s}}(e),a(!s),s}static empty(e){return new iP(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let i=0;it&&"string"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==r.length)t.push(r[0],0);else{for(;n.length=0&&n<=0&&n==e[r+1]?e[r]+=t:0==t&&0==e[r]?e[r+1]+=n:i?(e[r]+=t,e[r+1]+=n):e.push(t,n)}function oP(e,t,n){if(0==n.length)return;let i=t.length-2>>1;if(i>1])),!(n||s==e.sections.length||e.sections[s+1]<0);)a=e.sections[s++],l=e.sections[s++];t(r,c,o,p,u),r=c,o=p}}}function aP(e,t,n,i=!1){let r=[],o=i?[]:null,s=new cP(e),a=new cP(t);for(let e=-1;;)if(-1==s.ins&&-1==a.ins){let e=Math.min(s.len,a.len);rP(r,e,-1),s.forward(e),a.forward(e)}else if(a.ins>=0&&(s.ins<0||e==s.i||0==s.off&&(a.len=0&&e=0)){if(s.done&&a.done)return o?iP.createSet(r,o):nP.create(r);throw new Error("Mismatched change set lengths")}{let t=0,n=s.len;for(;n;)if(-1==a.ins){let e=Math.min(n,a.len);t+=e,n-=e,a.forward(e)}else{if(!(0==a.ins&&a.lent||s.ins>=0&&s.len>t)&&(e||i.length>n),o.forward2(t),s.forward(t)}}else rP(i,0,s.ins,e),r&&oP(r,i,s.text),s.next()}}class cP{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?RO.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?RO.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class pP{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}get goalColumn(){let e=this.flags>>6;return 16777215==e?void 0:e}map(e,t=-1){let n,i;return this.empty?n=i=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new pP(n,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return uP.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return uP.range(this.anchor,n)}eq(e,t=!1){return!(this.anchor!=e.anchor||this.head!=e.head||t&&this.empty&&this.assoc!=e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return uP.range(e.anchor,e.head)}static create(e,t,n){return new pP(e,t,n)}}class uP{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:uP.create(this.ranges.map((n=>n.map(e,t))),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;ne.toJSON())),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new uP(e.ranges.map((e=>pP.fromJSON(e))),e.main)}static single(e,t=e){return new uP([uP.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let n=0,i=0;ie?8:0)|r)}static normalized(e,t=0){let n=e[t];e.sort(((e,t)=>e.from-t.from)),t=e.indexOf(n);for(let n=1;ni.head?uP.range(s,o):uP.range(o,s))}}return new uP(e,t)}}function dP(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let hP=0;class fP{constructor(e,t,n,i,r){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=i,this.id=hP++,this.default=e([]),this.extensions="function"==typeof r?r(this):r}get reader(){return this}static define(e={}){return new fP(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:mP),!!e.static,e.enables)}of(e){return new gP([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new gP(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new gP(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],(n=>t(n.field(e))))}}function mP(e,t){return e==t||e.length==t.length&&e.every(((e,n)=>e===t[n]))}class gP{constructor(e,t,n,i){this.dependencies=e,this.facet=t,this.type=n,this.value=i,this.id=hP++}dynamicSlot(e){var t;let n=this.value,i=this.facet.compareInput,r=this.id,o=e[r]>>1,s=2==this.type,a=!1,l=!1,c=[];for(let n of this.dependencies)"doc"==n?a=!0:"selection"==n?l=!0:1&(null!==(t=e[n.id])&&void 0!==t?t:1)||c.push(e[n.id]);return{create:e=>(e.values[o]=n(e),1),update(e,t){if(a&&t.docChanged||l&&(t.docChanged||t.selection)||vP(e,c)){let t=n(e);if(s?!yP(t,e.values[o],i):!i(t,e.values[o]))return e.values[o]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[r];if(null!=l){let r=RP(t,l);if(this.dependencies.every((n=>n instanceof fP?t.facet(n)===e.facet(n):!(n instanceof wP)||t.field(n,!1)==e.field(n,!1)))||(s?yP(a=n(e),r,i):i(a=n(e),r)))return e.values[o]=r,0}else a=n(e);return e.values[o]=a,1}}}}function yP(e,t,n){if(e.length!=t.length)return!1;for(let i=0;ie[t.id])),r=n.map((e=>e.type)),o=i.filter((e=>!(1&e))),s=e[t.id]>>1;function a(e){let n=[];for(let t=0;te===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(xP).find((e=>e.field==this));return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let i=e.values[t],r=this.updateF(i,n);return this.compareF(i,r)?0:(e.values[t]=r,1)},reconfigure:(e,n)=>null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}init(e){return[this,xP.of({field:this,create:e})]}get extension(){return this}}const _P=4,EP=3,OP=2,PP=1;function kP(e){return t=>new CP(t,e)}const SP={highest:kP(0),high:kP(PP),default:kP(OP),low:kP(EP),lowest:kP(_P)};class CP{constructor(e,t){this.inner=e,this.prec=t}}class TP{of(e){return new AP(this,e)}reconfigure(e){return TP.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class AP{constructor(e,t){this.compartment=e,this.inner=t}}class MP{constructor(e,t,n,i,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=i,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,n){let i=[],r=Object.create(null),o=new Map;for(let n of function(e,t,n){let i=[[],[],[],[],[]],r=new Map;function o(e,s){let a=r.get(e);if(null!=a){if(a<=s)return;let t=i[a].indexOf(e);t>-1&&i[a].splice(t,1),e instanceof AP&&n.delete(e.compartment)}if(r.set(e,s),Array.isArray(e))for(let t of e)o(t,s);else if(e instanceof AP){if(n.has(e.compartment))throw new RangeError("Duplicate use of compartment in extensions");let i=t.get(e.compartment)||e.inner;n.set(e.compartment,i),o(i,s)}else if(e instanceof CP)o(e.inner,e.prec);else if(e instanceof wP)i[s].push(e),e.provides&&o(e.provides,s);else if(e instanceof gP)i[s].push(e),e.facet.extensions&&o(e.facet.extensions,OP);else{let t=e.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(t,s)}}return o(e,OP),i.reduce(((e,t)=>e.concat(t)))}(e,t,o))n instanceof wP?i.push(n):(r[n.facet.id]||(r[n.facet.id]=[])).push(n);let s=Object.create(null),a=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push((t=>e.slot(t)));let c=null==n?void 0:n.config.facets;for(let e in r){let t=r[e],i=t[0].facet,o=c&&c[e]||[];if(t.every((e=>0==e.type)))if(s[i.id]=a.length<<1|1,mP(o,t))a.push(n.facet(i));else{let e=i.combine(t.map((e=>e.value)));a.push(n&&i.compare(e,n.facet(i))?n.facet(i):e)}else{for(let e of t)0==e.type?(s[e.id]=a.length<<1|1,a.push(e.value)):(s[e.id]=l.length<<1,l.push((t=>e.dynamicSlot(t))));s[i.id]=l.length<<1,l.push((e=>bP(e,i,t)))}}let p=l.map((e=>e(s)));return new MP(e,o,p,s,a,r)}}function DP(e,t){if(1&t)return 2;let n=t>>1,i=e.status[n];if(4==i)throw new Error("Cyclic dependency between fields and/or facets");if(2&i)return i;e.status[n]=4;let r=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|r}function RP(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const NP=fP.define(),$P=fP.define({combine:e=>e.some((e=>e)),static:!0}),jP=fP.define({combine:e=>e.length?e[0]:void 0,static:!0}),IP=fP.define(),LP=fP.define(),BP=fP.define(),qP=fP.define({combine:e=>!!e.length&&e[0]});class zP{constructor(e,t){this.type=e,this.value=t}static define(){return new FP}}class FP{of(e){return new zP(this,e)}}class VP{constructor(e){this.map=e}of(e){return new HP(this,e)}}class HP{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new HP(this.type,t)}is(e){return this.type==e}static define(e={}){return new VP(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let i of e){let e=i.map(t);e&&n.push(e)}return n}}HP.reconfigure=HP.define(),HP.appendConfig=HP.define();class UP{constructor(e,t,n,i,r,o){this.startState=e,this.changes=t,this.selection=n,this.effects=i,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,n&&dP(n,t.newLength),r.some((e=>e.type==UP.time))||(this.annotations=r.concat(UP.time.of(Date.now())))}static create(e,t,n,i,r,o){return new UP(e,t,n,i,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(UP.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function WP(e,t){let n=[];for(let i=0,r=0;;){let o,s;if(i=e[i]))o=e[i++],s=e[i++];else{if(!(r=0;r--){let o=n[r](e);o&&Object.keys(o).length&&(i=GP(i,QP(t,o,e.changes.newLength),!0))}return i==e?e:UP.create(t,e.changes,e.selection,i.effects,i.annotations,i.scrollIntoView)}(n?function(e){let t=e.startState,n=!0;for(let i of t.facet(IP)){let t=i(e);if(!1===t){n=!1;break}Array.isArray(t)&&(n=!0===n?t:WP(n,t))}if(!0!==n){let i,r;if(!1===n)r=e.changes.invertedDesc,i=iP.empty(t.doc.length);else{let t=e.changes.filter(n);i=t.changes,r=t.filtered.mapDesc(t.changes).invertedDesc}e=UP.create(t,i,e.selection&&e.selection.map(r),HP.mapEffects(e.effects,r),e.annotations,e.scrollIntoView)}let i=t.facet(LP);for(let n=i.length-1;n>=0;n--){let r=i[n](e);e=r instanceof UP?r:Array.isArray(r)&&1==r.length&&r[0]instanceof UP?r[0]:XP(t,YP(r),!1)}return e}(r):r)}UP.time=zP.define(),UP.userEvent=zP.define(),UP.addToHistory=zP.define(),UP.remote=zP.define();const KP=[];function YP(e){return null==e?KP:Array.isArray(e)?e:[e]}var ZP=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(ZP||(ZP={}));const JP=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let ek;try{ek=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(Qa){}function tk(e){return t=>{if(!/\S/.test(t))return ZP.Space;if(function(e){if(ek)return ek.test(e);for(let t=0;t"€"&&(n.toUpperCase()!=n.toLowerCase()||JP.test(n)))return!0}return!1}(t))return ZP.Word;for(let n=0;n-1)return ZP.Word;return ZP.Other}}class nk{constructor(e,t,n,i,r,o){this.config=e,this.doc=t,this.selection=n,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let e=0;er.set(t,e))),n=null),r.set(t.value.compartment,t.value.extension)):t.is(HP.reconfigure)?(n=null,i=t.value):t.is(HP.appendConfig)&&(n=null,i=YP(i).concat(t.value));if(n)t=e.startState.values.slice();else{n=MP.resolve(i,r,this),t=new nk(n,this.doc,this.selection,n.dynamicSlots.map((()=>null)),((e,t)=>t.reconfigure(e,this)),null).values}let o=e.startState.facet($P)?e.newSelection:e.newSelection.asSingle();new nk(n,e.newDoc,o,t,((t,n)=>n.update(t,e)),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:e},range:uP.cursor(t.from+e.length)})))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),i=this.changes(n.changes),r=[n.range],o=YP(n.effects);for(let n=1;nr.spec.fromJSON(o,e))))}return nk.create({doc:e.doc,selection:uP.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=MP.resolve(e.extensions||[],new Map),n=e.doc instanceof RO?e.doc:RO.of((e.doc||"").split(t.staticFacet(nk.lineSeparator)||eP)),i=e.selection?e.selection instanceof uP?e.selection:uP.single(e.selection.anchor,e.selection.head):uP.single(0);return dP(i,n.length),t.staticFacet($P)||(i=i.asSingle()),new nk(t,n,i,t.dynamicSlots.map((()=>null)),((e,t)=>t.create(e)),null)}get tabSize(){return this.facet(nk.tabSize)}get lineBreak(){return this.facet(nk.lineSeparator)||"\n"}get readOnly(){return this.facet(qP)}phrase(e,...t){for(let t of this.facet(nk.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,((e,n)=>{if("$"==n)return"$";let i=+(n||1);return!i||i>t.length?e:t[i-1]}))),e}languageDataAt(e,t,n=-1){let i=[];for(let r of this.facet(NP))for(let o of r(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){return tk(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:i}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-n,s=e-n;for(;o>0;){let e=WO(t,o,!1);if(r(t.slice(e,o))!=ZP.Word)break;o=e}for(;se.length?e[0]:4}),nk.lineSeparator=jP,nk.readOnly=qP,nk.phrases=fP.define({compare(e,t){let n=Object.keys(e),i=Object.keys(t);return n.length==i.length&&n.every((n=>e[n]==t[n]))}}),nk.languageData=NP,nk.changeFilter=IP,nk.transactionFilter=LP,nk.transactionExtender=BP,TP.reconfigure=HP.define();class rk{eq(e){return this==e}range(e,t=e){return ok.create(e,t,this)}}rk.prototype.startSide=rk.prototype.endSide=0,rk.prototype.point=!1,rk.prototype.mapMode=tP.TrackDel;class ok{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new ok(e,t,n)}}function sk(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class ak{constructor(e,t,n,i){this.from=e,this.to=t,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,i=0){let r=n?this.to:this.from;for(let o=i,s=r.length;;){if(o==s)return o;let i=o+s>>1,a=r[i]-e||(n?this.value[i].endSide:this.value[i].startSide)-t;if(i==o)return a>=0?o:s;a>=0?s=i:o=i+1}}between(e,t,n,i){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,r);rc||l==c&&p.startSide>0&&p.endSide<=0)continue;(c-l||p.endSide-p.startSide)<0||(o<0&&(o=l),p.point&&(s=Math.max(s,c-l)),n.push(p),i.push(l-o),r.push(c-o))}return{mapped:n.length?new ak(i,r,n,s):null,pos:o}}}class lk{constructor(e,t,n,i){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=i}static create(e,t,n,i){return new lk(e,t,n,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:i=0,filterTo:r=this.length}=e,o=e.filter;if(0==t.length&&!o)return this;if(n&&(t=t.slice().sort(sk)),this.isEmpty)return t.length?lk.of(t):this;let s=new uk(this,null,-1).goto(0),a=0,l=[],c=new ck;for(;s.value||a=0){let e=t[a++];c.addInner(e.from,e.to,e.value)||l.push(e)}else 1==s.rangeIndex&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||rs.to||r=r&&e<=r+o.length&&!1===o.between(r,e-r,t-r,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return dk.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return dk.from(e).goto(t)}static compare(e,t,n,i,r=-1){let o=e.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=r)),s=t.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=r)),a=pk(o,s,n),l=new fk(o,a,r),c=new fk(s,a,r);n.iterGaps(((e,t,n)=>mk(l,e,c,t,n,i))),n.empty&&0==n.length&&mk(l,0,c,0,0,i)}static eq(e,t,n=0,i){null==i&&(i=999999999);let r=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0)),o=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0));if(r.length!=o.length)return!1;if(!r.length)return!0;let s=pk(r,o),a=new fk(r,s,0).goto(n),l=new fk(o,s,0).goto(n);for(;;){if(a.to!=l.to||!gk(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>i)return!0;a.next(),l.next()}}static spans(e,t,n,i,r=-1){let o=new fk(e,null,r).goto(t),s=t,a=o.openStart;for(;;){let e=Math.min(o.to,n);if(o.point){let n=o.activeForPoint(o.to),r=o.pointFroms&&(i.span(s,e,o.active,a),a=o.openEnd(e));if(o.to>n)return a+(o.point&&o.to>n?1:0);s=o.to,o.next()}}static of(e,t=!1){let n=new ck;for(let i of e instanceof ok?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n0)return e.slice().sort(sk);t=i}return e}(e):e)n.add(i.from,i.to,i.value);return n.finish()}static join(e){if(!e.length)return lk.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let i=e[n];i!=lk.empty;i=i.nextLayer)t=new lk(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}lk.empty=new lk([],[],null,-1),lk.empty.nextLayer=lk.empty;class ck{finishChunk(e){this.chunks.push(new ak(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new ck)).add(e,t,n)}addInner(e,t,n){let i=e-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(i<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(lk.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=lk.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function pk(e,t,n){let i=new Map;for(let t of e)for(let e=0;e=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=n&&i.push(new uk(o,t,n,r));return 1==i.length?i[0]:new dk(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)hk(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)hk(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),hk(this.heap,0)}}}function hk(e,t){for(let n=e[t];;){let i=1+(t<<1);if(i>=e.length)break;let r=e[i];if(i+1=0&&(r=e[i+1],i++),n.compare(r)<0)break;e[i]=n,e[t]=r,t=i}}class fk{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=dk.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){yk(this.active,e),yk(this.activeTo,e),yk(this.activeRank,e),this.minActive=bk(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:i,rank:r}=this.cursor;for(;t0;)t++;vk(this.active,t,n),vk(this.activeTo,t,i),vk(this.activeRank,t,r),e&&vk(e,t,this.cursor.from),this.minActive=bk(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&yk(n,i)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from=0&&n[t]=0&&!(this.activeRank[n]e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function mk(e,t,n,i,r,o){e.goto(t),n.goto(i);let s=i+r,a=i,l=i-t;for(;;){let t=e.to+l-n.to||e.endSide-n.endSide,i=t<0?e.to+l:n.to,r=Math.min(i,s);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&gk(e.activeForPoint(e.to),n.activeForPoint(n.to))||o.comparePoint(a,r,e.point,n.point):r>a&&!gk(e.active,n.active)&&o.compareRange(a,r,e.active,n.active),i>s)break;a=i,t<=0&&e.next(),t>=0&&n.next()}}function gk(e,t){if(e.length!=t.length)return!1;for(let n=0;n=t;n--)e[n+1]=e[n];e[t]=n}function bk(e,t){let n=-1,i=1e9;for(let r=0;re.map((e=>t.replace(/&/,e))))).reduce(((e,t)=>e.concat(t))),s,o);else if(s&&"object"==typeof s){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");r(i(n),s,a,c)}else null!=s&&a.push(n.replace(/_.*/,"").replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))+": "+s+";")}(a.length||c)&&o.push((!n||l||s?e:e.map(n)).join(", ")+" {"+a.join(" ")+"}")}for(let t in e)r(i(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=Ek[wk]||1;return Ek[wk]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let i=e[_k],r=n&&n.nonce;i?r&&i.setNonce(r):i=new kk(e,r),i.mount(Array.isArray(t)?t:[t],e)}}let Pk=new Map;class kk{constructor(e,t){let n=e.ownerDocument||e,i=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let t=Pk.get(n);if(t)return e[_k]=t;this.sheet=new i.CSSStyleSheet,Pk.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[_k]=this}mount(e,t){let n=this.sheet,i=0,r=0;for(let t=0;t-1&&(this.modules.splice(s,1),r--,s=-1),-1==s){if(this.modules.splice(r++,0,o),n)for(let e=0;e",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Tk="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Ak="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Mk=0;Mk<10;Mk++)Sk[48+Mk]=Sk[96+Mk]=String(Mk);for(Mk=1;Mk<=24;Mk++)Sk[Mk+111]="F"+Mk;for(Mk=65;Mk<=90;Mk++)Sk[Mk]=String.fromCharCode(Mk+32),Ck[Mk]=String.fromCharCode(Mk);for(var Dk in Sk)Ck.hasOwnProperty(Dk)||(Ck[Dk]=Sk[Dk]);function Rk(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function Nk(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function $k(e,t){if(!t.anchorNode)return!1;try{return Nk(e,t.anchorNode)}catch(e){return!1}}function jk(e){return 3==e.nodeType?Xk(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function Ik(e,t,n,i){return!!n&&(qk(e,t,n,i,-1)||qk(e,t,n,i,1))}function Lk(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function Bk(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function qk(e,t,n,i,r){for(;;){if(e==n&&t==i)return!0;if(t==(r<0?0:zk(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=Lk(e)+(r<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(r<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=r<0?zk(e):0}}}function zk(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Fk(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function Vk(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function Hk(e,t){let n=t.width/e.offsetWidth,i=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(t.height-e.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}class Uk{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?zk(t):0),n,Math.min(e.focusOffset,n?zk(n):0))}set(e,t,n,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=i}}let Wk,Gk=null;function Qk(e){if(e.setActive)return e.setActive();if(Gk)return e.focus(Gk);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==Gk?{get preventScroll(){return Gk={preventScroll:!0},!0}}:void 0),!Gk){Gk=!1;for(let e=0;eMath.max(1,e.scrollHeight-e.clientHeight-4)}function Jk(e,t){for(let n=e,i=t;;){if(3==n.nodeType&&i>0)return{node:n,offset:i};if(1==n.nodeType&&i>0){if("false"==n.contentEditable)return null;n=n.childNodes[i-1],i=zk(n)}else{if(!n.parentNode||Bk(n))return null;i=Lk(n),n=n.parentNode}}}function eS(e,t){for(let n=e,i=t;;){if(3==n.nodeType&&it)return n.domBoundsAround(e,t,l);if(p>=e&&-1==i&&(i=a,r=l),l>t&&n.dom.parentNode==this.dom){o=a,s=c;break}c=p,l=p+n.breakAfter}return{from:r,to:s<0?n+this.length:s,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=nS){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function sS(e,t,n,i,r,o,s,a,l){let{children:c}=e,p=c.length?c[t]:null,u=o.length?o[o.length-1]:null,d=u?u.breakAfter:s;if(!(t==i&&p&&!s&&!d&&o.length<2&&p.merge(n,r,o.length?u:null,0==n,a,l))){if(i0&&(!s&&o.length&&p.merge(n,p.length,o[0],!1,a,0)?p.breakAfter=o.shift().breakAfter:(n2);var bS={mac:vS||/Mac/.test(lS.platform),windows:/Win/.test(lS.platform),linux:/Linux|X11/.test(lS.platform),ie:hS,ie_version:uS?cS.documentMode||6:dS?+dS[1]:pS?+pS[1]:0,gecko:fS,gecko_version:fS?+(/Firefox\/(\d+)/.exec(lS.userAgent)||[0,0])[1]:0,chrome:!!mS,chrome_version:mS?+mS[1]:0,ios:vS,android:/Android\b/.test(lS.userAgent),webkit:gS,safari:yS,webkit_version:gS?+(/\bAppleWebKit\/(\d+)/.exec(lS.userAgent)||[0,0])[1]:0,tabSize:null!=cS.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class xS extends iS{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,n){return!(8&this.flags||n&&(!(n instanceof xS)||this.length-(t-e)+n.length>256||8&n.flags))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new xS(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new tS(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return function(e,t,n){let i=e.nodeValue.length;t>i&&(t=i);let r=t,o=t,s=0;0==t&&n<0||t==i&&n>=0?bS.chrome||bS.gecko||(t?(r--,s=1):o=0)?0:a.length-1];bS.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,(e=>e.width))||l);return s?Fk(l,s<0):l||null}(this.dom,e,t)}}class wS extends iS{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(Yk(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!(8&(this.flags|e.flags))}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,i,r,o){return(!n||!(!(n instanceof wS&&n.mark.eq(this.mark))||e&&r<=0||te&&t.push(n=e&&(i=r),n=s,r++}let o=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new wS(this.mark,t,o)}domAtPos(e){return OS(this,e)}coordsAt(e,t){return kS(this,e,t)}}class _S extends iS{static create(e,t,n){return new _S(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=_S.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,i,r,o){return!(n&&(!(n instanceof _S&&this.widget.compare(n.widget))||e>0&&r<=0||t0)?tS.before(this.dom):tS.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let i=this.dom.getClientRects(),r=null;if(!i.length)return null;let o=this.side?this.side<0:e>0;for(let t=o?i.length-1:0;r=i[t],!(e>0?0==t:t==i.length-1||r.top0?tS.before(this.dom):tS.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return RO.empty}get isHidden(){return!0}}function OS(e,t){let n=e.dom,{children:i}=e,r=0;for(let e=0;re&&t0;e--){let t=i[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=r;e0&&t instanceof wS&&r.length&&(i=r[r.length-1])instanceof wS&&i.mark.eq(t.mark)?PS(i,t.children[0],n-1):(r.push(t),t.setParent(e)),e.length+=t.length}function kS(e,t,n){let i=null,r=-1,o=null,s=-1;!function e(t,a){for(let l=0,c=0;l=a&&(p.children.length?e(p,a-c):(!o||o.isHidden&&n>0)&&(u>a||c==u&&p.getSide()>0)?(o=p,s=a-c):(c-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let o of i)if(o!=n&&(-1==r.indexOf(o)||e[o]!==t[o]))return!1;return!0}function AS(e,t,n){let i=!1;if(t)for(let r in t)n&&r in n||(i=!0,"style"==r?e.style.cssText="":e.removeAttribute(r));if(n)for(let r in n)t&&t[r]==n[r]||(i=!0,"style"==r?e.style.cssText=n[r]:e.setAttribute(r,n[r]));return i}function MS(e){let t=Object.create(null);for(let n=0;n0?3e8:-4e8:t>0?1e8:-1e8,new IS(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,i=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:r,end:o}=LS(e,i);t=(r?i?-3e8:-1:5e8)-1,n=1+(o?i?2e8:1:-6e8)}return new IS(e,t,n,i,e.widget||null,!0)}static line(e){return new jS(e)}static set(e,t=!1){return lk.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}NS.none=lk.empty;class $S extends NS{constructor(e){let{start:t,end:n}=LS(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof $S&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(n=e.attrs)||void 0===n?void 0:n.class))&&TS(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}$S.prototype.point=!1;class jS extends NS{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof jS&&this.spec.class==e.spec.class&&TS(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}jS.prototype.mapMode=tP.TrackBefore,jS.prototype.point=!0;class IS extends NS{constructor(e,t,n,i,r,o){super(t,n,r,e),this.block=i,this.isReplace=o,this.mapMode=i?t<=0?tP.TrackBefore:tP.TrackAfter:tP.TrackDel}get type(){return this.startSide!=this.endSide?RS.WidgetRange:this.startSide<=0?RS.WidgetBefore:RS.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof IS&&function(e,t){return e==t||!!(e&&t&&e.compare(t))}(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function LS(e,t=!1){let{inclusiveStart:n,inclusiveEnd:i}=e;return null==n&&(n=e.inclusive),null==i&&(i=e.inclusive),{start:null!=n?n:t,end:null!=i?i:t}}function BS(e,t,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=e?n[r]=Math.max(n[r],t):n.push(e,t)}IS.prototype.point=!0;class qS extends iS{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,i,r,o){if(n){if(!(n instanceof qS))return!1;this.dom||n.transferDOM(this)}return i&&this.setDeco(n?n.attrs:null),aS(this,e,t,n?n.children.slice():[],r,o),!0}split(e){let t=new qS;if(t.breakAfter=this.breakAfter,0==this.length)return t;let{i:n,off:i}=this.childPos(e);i&&(t.append(this.children[n].split(i),0),this.children[n].merge(i,this.children[n].length,null,!1,0,0),n++);for(let e=n;e0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){TS(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){PS(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=SS(t,this.attrs||{})),n&&(this.attrs=SS({class:n},this.attrs||{}))}domAtPos(e){return OS(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?4&this.flags&&(Yk(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(AS(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let i=this.dom.lastChild;for(;i&&iS.get(i)instanceof wS;)i=i.lastChild;if(!(i&&this.length&&("BR"==i.nodeName||0!=(null===(n=iS.get(i))||void 0===n?void 0:n.isEditable)||bS.ios&&this.children.some((e=>e instanceof xS))))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let n of this.children){if(!(n instanceof xS)||/[^ -~]/.test(n.text))return null;let i=jk(n.dom);if(1!=i.length)return null;t+=i[0].width,e=i[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let n=kS(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight=t){if(r instanceof qS)return r;if(o>t)break}i=o+r.breakAfter}return null}}class zS extends iS{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,i,r,o){return!(n&&(!(n instanceof zS&&this.widget.compare(n.widget))||e>0&&r<=0||t0)}}class FS extends DS{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class VS{constructor(e,t,n,i){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof zS&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new qS),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(HS(new ES(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof zS||this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:i}=this.cursor.next(this.skip);if(this.skip=0,i)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(HS(new xS(this.text.slice(this.textOff,this.textOff+i)),t),n),this.atCursorPos=!0,this.textOff+=i,e-=i,n=0}}span(e,t,n,i){this.buildText(t-e,n,i),this.pos=t,this.openStart<0&&(this.openStart=i)}point(e,t,n,i,r,o){if(this.disallowBlockEffectsFor[o]&&n instanceof IS){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=t-e;if(n instanceof IS)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new zS(n.widget||US.block,s,n));else{let o=_S.create(n.widget||US.inline,s,s?0:n.startSide),a=this.atCursorPos&&!o.isEditable&&r<=i.length&&(e0),l=!o.isEditable&&(ei.length||n.startSide<=0),c=this.getLine();2!=this.pendingBuffer||a||o.isEditable||(this.pendingBuffer=0),this.flushBuffer(i),a&&(c.append(HS(new ES(1),i),r),r=i.length+Math.max(0,r-i.length)),c.append(HS(o,i),r),this.atCursorPos=l,this.pendingBuffer=l?ei.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,n,i,r){let o=new VS(e,t,n,r);return o.openEnd=lk.spans(i,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function HS(e,t){for(let n of t)e=new wS(n,[e],e.length);return e}class US extends DS{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}US.inline=new US("span"),US.block=new US("div");var WS=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(WS||(WS={}));const GS=WS.LTR,QS=WS.RTL;function XS(e){let t=[];for(let n=0;n=t){if(s.level==n)return o;(r<0||(0!=i?i<0?s.fromt:e[r].level>s.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}function iC(e,t){if(e.length!=t.length)return!1;for(let n=0;nl&&s.push(new nC(l,f.from,d)),sC(e,f.direction==GS!=!(d%2)?i+1:i,r,f.inner,f.from,f.to,s),l=f.to}h=f.to}else{if(h==n||(t?rC[h]!=a:rC[h]==a))break;h++}u?oC(e,l,h,i+1,r,u,s):lt;){let n=!0,p=!1;if(!c||l>o[c-1].to){let e=rC[l-1];e!=a&&(n=!1,p=16==e)}let u=n||1!=a?null:[],d=n?i:i+1,h=l;e:for(;;)if(c&&h==o[c-1].to){if(p)break e;let f=o[--c];if(!n)for(let e=f.from,n=c;;){if(e==t)break e;if(!n||o[n-1].to!=e){if(rC[e-1]==a)break e;break}e=o[--n].from}if(u)u.push(f);else{f.to=0;e-=3)if(JS[e+1]==-n){let t=JS[e+2],n=2&t?r:4&t?1&t?o:r:0;n&&(rC[s]=rC[JS[e]]=n),a=e;break}}else{if(189==JS.length)break;JS[a++]=s,JS[a++]=t,JS[a++]=l}else if(2==(i=rC[s])||1==i){let e=i==r;l=e?0:1;for(let t=a-3;t>=0;t-=3){let n=JS[t+2];if(2&n)break;if(e)JS[t+2]|=2;else{if(4&n)break;JS[t+2]|=4}}}}}(e,r,o,i,a),function(e,t,n,i){for(let r=0,o=i;r<=n.length;r++){let s=r?n[r-1].to:e,a=rl;)t==o&&(t=n[--i].from,o=i?n[i-1].to:e),rC[--t]=p;l=s}else o=s,l++}}}(r,o,i,a),oC(e,r,o,t,n,i,s)}function aC(e,t,n){if(!e)return[new nC(0,0,t==QS?1:0)];if(t==GS&&!n.length&&!tC.test(e))return lC(e.length);if(n.length)for(;e.length>rC.length;)rC[rC.length]=256;let i=[],r=t==GS?0:1;return sC(e,r,r,n,0,e.length,i),i}function lC(e){return[new nC(0,e,0)]}let cC="";function pC(e,t,n,i,r){var o;let s=i.head-e.from,a=nC.find(t,s,null!==(o=i.bidiLevel)&&void 0!==o?o:-1,i.assoc),l=t[a],c=l.side(r,n);if(s==c){let e=a+=r?1:-1;if(e<0||e>=t.length)return null;l=t[a=e],s=l.side(!r,n),c=l.side(r,n)}let p=WO(e.text,s,l.forward(r,n));(pl.to)&&(p=c),cC=e.text.slice(Math.min(s,p),Math.max(s,p));let u=a==(r?t.length-1:0)?null:t[a+(r?1:-1)];return u&&p==c&&u.level+(r?0:1)e.some((e=>e))}),_C=fP.define({combine:e=>e.some((e=>e))}),EC=fP.define();class OC{constructor(e,t="nearest",n="nearest",i=5,r=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=i,this.xMargin=r,this.isSnapshot=o}map(e){return e.empty?this:new OC(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new OC(uP.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const PC=HP.define({map:(e,t)=>e.map(t)}),kC=HP.define();function SC(e,t,n){let i=e.facet(mC);i.length?i[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const CC=fP.define({combine:e=>!e.length||e[0]});let TC=0;const AC=fP.define();class MC{constructor(e,t,n,i,r){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=i,this.extension=r(this)}static define(e,t){const{eventHandlers:n,eventObservers:i,provide:r,decorations:o}=t||{};return new MC(TC++,e,n,i,(e=>{let t=[AC.of(e)];return o&&t.push($C.of((t=>{let n=t.plugin(e);return n?o(n):NS.none}))),r&&t.push(r(e)),t}))}static fromClass(e,t){return MC.define((t=>new e(t)),t)}}class DC{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(SC(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){SC(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){SC(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const RC=fP.define(),NC=fP.define(),$C=fP.define(),jC=fP.define(),IC=fP.define(),LC=fP.define();function BC(e,t){let n=e.state.facet(LC);if(!n.length)return n;let i=n.map((t=>t instanceof Function?t(e):t)),r=[];return lk.spans(i,t.from,t.to,{point(){},span(e,n,i,o){let s=e-t.from,a=n-t.from,l=r;for(let e=i.length-1;e>=0;e--,o--){let n,r=i[e].spec.bidiIsolate;if(null==r&&(r=uC(t.text,s,a)),o>0&&l.length&&(n=l[l.length-1]).to==s&&n.direction==r)n.to=a,l=n.inner;else{let e={from:s,to:a,direction:r,inner:[]};l.push(e),l=e.inner}}}}),r}const qC=fP.define();function zC(e){let t=0,n=0,i=0,r=0;for(let o of e.state.facet(qC)){let s=o(e);s&&(null!=s.left&&(t=Math.max(t,s.left)),null!=s.right&&(n=Math.max(n,s.right)),null!=s.top&&(i=Math.max(i,s.top)),null!=s.bottom&&(r=Math.max(r,s.bottom)))}return{left:t,right:n,top:i,bottom:r}}const FC=fP.define();class VC{constructor(e,t,n,i){this.fromA=e,this.toA=t,this.fromB=n,this.toB=i}join(e){return new VC(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>n.toA)){if(i.toAc)break;r+=2}if(!a)return n;new VC(a.fromA,a.toA,a.fromB,a.toB).addToSet(n),o=a.toA,s=a.toB}}}class HC{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=iP.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let i=[];this.changes.iterChangedRanges(((e,t,n,r)=>i.push(new VC(e,t,n,r)))),this.changedRanges=i}static create(e,t,n){return new HC(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((e=>e.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class UC extends iS{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=NS.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new qS],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new VC(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every((({fromA:e,toA:t})=>tthis.minWidthTo))?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?i=this.domChanged.newSel.head:function(e,t){let n=!1;t&&e.iterChangedRanges(((e,i)=>{et.from&&(n=!0)}));return n}(e.changes,this.hasComposition)||e.selectionSet||(i=e.state.selection.main.head));let r=i>-1?function(e,t,n){let i=WC(e,n);if(!i)return null;let{node:r,from:o,to:s}=i,a=r.nodeValue;if(/[\n\r]/.test(a))return null;if(e.state.doc.sliceString(i.from,i.to)!=a)return null;let l=t.invertedDesc,c=new VC(l.mapPos(o),l.mapPos(s),o,s),p=[];for(let t=r.parentNode;;t=t.parentNode){let n=iS.get(t);if(n instanceof wS)p.push({node:t,deco:n.mark});else{if(n instanceof qS||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:c,text:r,marks:p,line:t};if(t==e.contentDOM)return null;p.push({node:t,deco:new $S({inclusive:!0,attributes:MS(t),tagName:t.tagName.toLowerCase()})})}}}(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:t,to:i}=this.hasComposition;n=new VC(t,i,e.changes.mapPos(t,-1),e.changes.mapPos(i,1)).addToSet(n.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(bS.ie||bS.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=function(e,t,n){let i=new GC;return lk.compare(e,t,n,i),i.changes}(this.decorations,this.updateDeco(),e.changes);return n=VC.extendWithRanges(n,o),!!(7&this.flags||0!=n.length)&&(this.updateInner(n,e.startState.doc.length,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:i}=this.view;i.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=bS.chrome||bS.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||i.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((e=>e.flags&=-9));let r=[];if(this.view.viewport.from||this.view.viewport.to=0?i[e]:null;if(!t)break;let o,s,a,l,{fromA:c,toA:p,fromB:u,toB:d}=t;if(n&&n.range.fromBu){let e=VS.build(this.view.state.doc,u,n.range.fromB,this.decorations,this.dynamicDecorationMap),t=VS.build(this.view.state.doc,n.range.toB,d,this.decorations,this.dynamicDecorationMap);s=e.breakAtStart,a=e.openStart,l=t.openEnd;let i=this.compositionView(n);t.breakAtStart?i.breakAfter=1:t.content.length&&i.merge(i.length,i.length,t.content[0],!1,t.openStart,0)&&(i.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&i.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),o=e.content.concat(i).concat(t.content)}else({content:o,breakAtStart:s,openStart:a,openEnd:l}=VS.build(this.view.state.doc,u,d,this.decorations,this.dynamicDecorationMap));let{i:h,off:f}=r.findPos(p,1),{i:m,off:g}=r.findPos(c,-1);sS(this,m,g,h,f,o,s,a,l)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(kC)&&(this.editContextFormatting=e.value)}compositionView(e){let t=new xS(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new wS(n,[t],t.length);let n=new qS;return n.append(t,0),n}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|(t.children.some((e=>7&e.flags))?1:0),this.markedForComposition.add(t);let n=iS.get(e);n&&n!=t&&(n.dom=null),t.setDOM(e)},n=this.childPos(e.range.fromB,1),i=this.children[n.i];t(e.line,i);for(let r=e.marks.length-1;r>=-1;r--)n=i.childPos(n.off,1),i=i.children[n.i],t(r>=0?e.marks[r].node:e.text,i)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,i=n==this.dom,r=!i&&$k(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(i||t||r))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(s.anchor)),l=s.empty?a:this.moveToLine(this.domAtPos(s.head));if(bS.gecko&&s.empty&&!this.hasComposition&&(1==(c=a).node.nodeType&&c.node.firstChild&&(0==c.offset||"false"==c.node.childNodes[c.offset-1].contentEditable)&&(c.offset==c.node.childNodes.length||"false"==c.node.childNodes[c.offset].contentEditable))){let e=document.createTextNode("");this.view.observer.ignore((()=>a.node.insertBefore(e,a.node.childNodes[a.offset]||null))),a=l=new tS(e,0),o=!0}var c;let p=this.view.observer.selectionRange;!o&&p.focusNode&&(Ik(a.node,a.offset,p.anchorNode,p.anchorOffset)&&Ik(l.node,l.offset,p.focusNode,p.focusOffset)||this.suppressWidgetCursorChange(p,s))||(this.view.observer.ignore((()=>{bS.android&&bS.chrome&&this.dom.contains(p.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(p.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=Rk(this.view.root);if(e)if(s.empty){if(bS.gecko){let e=function(e,t){return 1!=e.nodeType?0:(t&&"false"==e.childNodes[t-1].contentEditable?1:0)|(ts.head&&([a,l]=[l,a]),t.setEnd(l.node,l.offset),t.setStart(a.node,a.offset),e.removeAllRanges(),e.addRange(t)}else;r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())})),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new tS(p.anchorNode,p.anchorOffset),this.impreciseHead=l.precise?null:new tS(p.focusNode,p.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Ik(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=Rk(e.root),{anchorNode:i,anchorOffset:r}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let o=qS.find(this,t.head);if(!o)return;let s=o.posAtStart;if(t.head==s||t.head==s+o.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let p=e.observer.selectionRange;e.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=t.from&&n.collapse(i,r)}moveToLine(e){let t,n=this.dom;if(e.node!=n)return e;for(let i=e.offset;!t&&i=0;i--){let e=iS.get(n.childNodes[i]);e instanceof qS&&(t=e.domAtPos(e.length))}return t?new tS(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let e=iS.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t=0;o--){let s=this.children[o],a=r-s.breakAfter,l=a-s.length;if(ae||s.covers(1))&&(!n||s instanceof qS&&!(n instanceof qS&&t>=0)))n=s,i=l;else if(n&&l==e&&a==e&&s instanceof zS&&Math.abs(t)<2){if(s.deco.startSide<0)break;o&&(n=null)}r=l}return n?n.coordsAt(e-i,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),i=this.children[t];if(!(i instanceof qS))return null;for(;i.children.length;){let{i:e,off:t}=i.childPos(n,1);for(;;e++){if(e==i.children.length)return null;if((i=i.children[e]).length)break}n=t}if(!(i instanceof xS))return null;let r=WO(i.text,n);if(r==n)return null;let o=Xk(i.dom,n,r).getClientRects();for(let e=0;eMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==WS.LTR;for(let e=0,l=0;li)break;if(e>=n){let n=c.dom.getBoundingClientRect();if(t.push(n.height),o){let t=c.dom.lastChild,i=t?jk(t):[];if(i.length){let t=i[i.length-1],o=a?t.right-n.left:n.right-t.left;o>s&&(s=o,this.minWidth=r,this.minWidthFrom=e,this.minWidthTo=p)}}}e=p+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?WS.RTL:WS.LTR}measureTextSize(){for(let e of this.children)if(e instanceof qS){let t=e.measureTextSize();if(t)return t}let e,t,n,i=document.createElement("div");return i.className="cm-line",i.style.width="99999px",i.style.position="absolute",i.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(i);let r=jk(i.firstChild)[0];e=i.getBoundingClientRect().height,t=r?r.width/27:7,n=r?r.height:e,i.remove()})),{lineHeight:e,charWidth:t,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new oS(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,i=0;;i++){let r=i==t.viewports.length?null:t.viewports[i],o=r?r.from-1:this.length;if(o>n){let i=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(NS.replace({widget:new FS(i),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!r)break;n=r.to+1}return NS.set(e)}updateDeco(){let e=1,t=this.view.state.facet($C).map((t=>(this.dynamicDecorationMap[e++]="function"==typeof t)?t(this.view):t)),n=!1,i=this.view.state.facet(jC).map(((e,t)=>{let i="function"==typeof e;return i&&(n=!0),i?e(this.view):e}));for(i.length&&(this.dynamicDecorationMap[e++]=n,t.push(lk.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1);if(!i)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,t.left),top:Math.min(i.top,t.top),right:Math.max(i.right,t.right),bottom:Math.max(i.bottom,t.bottom)});let r=zC(this.view),o={left:i.left-r.left,top:i.top-r.top,right:i.right+r.right,bottom:i.bottom+r.bottom},{offsetWidth:s,offsetHeight:a}=this.view.scrollDOM;!function(e,t,n,i,r,o,s,a){let l=e.ownerDocument,c=l.defaultView||window;for(let p=e,u=!1;p&&!u;)if(1==p.nodeType){let e,d=p==l.body,h=1,f=1;if(d)e=Vk(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(p).position)&&(u=!0),p.scrollHeight<=p.clientHeight&&p.scrollWidth<=p.clientWidth){p=p.assignedSlot||p.parentNode;continue}let t=p.getBoundingClientRect();({scaleX:h,scaleY:f}=Hk(p,t)),e={left:t.left,right:t.left+p.clientWidth*h,top:t.top,bottom:t.top+p.clientHeight*f}}let m=0,g=0;if("nearest"==r)t.top0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+g+s)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+s,n<0&&t.top-g0&&t.right>e.right+m&&(m=t.right-e.right+m+o)):t.right>e.right&&(m=t.right-e.right+o,n<0&&t.lefte?t.left-e:Math.max(0,e-t.right)}function XC(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function KC(e,t){return e.topt.top+1}function YC(e,t){return te.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function JC(e,t,n){let i,r,o,s,a,l,c,p,u=!1;for(let d=e.firstChild;d;d=d.nextSibling){let e=jk(d);for(let h=0;hg||s==g&&o>m){i=d,r=f,o=m,s=g;let a=g?n0?h0)}0==m?n>f.bottom&&(!c||c.bottomf.top)&&(l=d,p=f):c&&KC(c,f)?c=ZC(c,f.bottom):p&&KC(p,f)&&(p=YC(p,f.top))}}if(c&&c.bottom>=n?(i=a,r=c):p&&p.top<=n&&(i=l,r=p),!i)return{node:e,offset:0};let d=Math.max(r.left,Math.min(r.right,t));return 3==i.nodeType?eT(i,d,n):u&&"false"!=i.contentEditable?JC(i,d,n):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,i)+(t>=(r.left+r.right)/2?1:0)}}function eT(e,t,n){let i=e.nodeValue.length,r=-1,o=1e9,s=0;for(let a=0;an?c.top-n:n-c.bottom)-1;if(c.left-1<=t&&c.right+1>=t&&p=(c.left+c.right)/2,i=n;if(bS.chrome||bS.gecko){Xk(e,a).getBoundingClientRect().left==c.right&&(i=!n)}if(p<=0)return{node:e,offset:a+(i?1:0)};r=a+(i?1:0),o=p}}}return{node:e,offset:r>-1?r:s>0?e.nodeValue.length:0}}function tT(e,t,n,i=-1){var r,o;let s,a=e.contentDOM.getBoundingClientRect(),l=a.top+e.viewState.paddingTop,{docHeight:c}=e.viewState,{x:p,y:u}=t,d=u-l;if(d<0)return 0;if(d>c)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,r=!1;s=e.elementAtHeight(d),s.type!=RS.Text;)for(;d=i>0?s.bottom+t:s.top-t,!(d>=0&&d<=c);){if(r)return n?null:0;r=!0,i=-i}u=l+d;let h=s.from;if(he.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:nT(e,a,s,p,u);let f=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:f,g=m.elementFromPoint(p,u);g&&!e.contentDOM.contains(g)&&(g=null),g||(p=Math.max(a.left+1,Math.min(a.right-1,p)),g=m.elementFromPoint(p,u),g&&!e.contentDOM.contains(g)&&(g=null));let y,v=-1;if(g&&0!=(null===(r=e.docView.nearest(g))||void 0===r?void 0:r.isEditable)){if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(p,u);e&&({offsetNode:y,offset:v}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(p,u);t&&(({startContainer:y,startOffset:v}=t),(!e.contentDOM.contains(y)||bS.safari&&function(e,t,n){let i;if(3!=e.nodeType||t!=(i=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return Xk(e,i-1,i).getBoundingClientRect().left>n}(y,v,p)||bS.chrome&&function(e,t,n){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}let i=1==e.nodeType?e.getBoundingClientRect():Xk(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}(y,v,p))&&(y=void 0))}y&&(v=Math.min(zk(y),v))}if(!y||!e.docView.dom.contains(y)){let t=qS.find(e.docView,h);if(!t)return d>s.top+s.height/2?s.to:s.from;({node:y,offset:v}=JC(t.dom,p,u))}let b=e.docView.nearest(y);if(!b)return null;if(b.isWidget&&1==(null===(o=b.dom)||void 0===o?void 0:o.nodeType)){let e=b.dom.getBoundingClientRect();return t.y1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;o+=Math.floor((r-n.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let s=e.state.sliceDoc(n.from,n.to);return n.from+function(e,t,n,i){for(let i=0,r=0;;){if(r>=t)return i;if(i==e.length)break;r+=9==e.charCodeAt(i)?n-r%n:1,i=WO(e,i)}return!0===i?-1:e.length}(s,o,e.state.tabSize)}function iT(e,t){let n=e.lineBlockAt(t);if(Array.isArray(n.type))for(let e of n.type)if(e.to>t||e.to==t&&(e.to==n.to||e.type==RS.Text))return e;return n}function rT(e,t,n,i){let r=e.state.doc.lineAt(t.head),o=e.bidiSpans(r),s=e.textDirectionAt(r.from);for(let a=t,l=null;;){let t=pC(r,o,s,a,n),c=cC;if(!t){if(r.number==(n?e.state.doc.lines:1))return a;c="\n",r=e.state.doc.line(r.number+(n?1:-1)),o=e.bidiSpans(r),t=e.visualLineSide(r,!n)}if(l){if(!l(c))return a}else{if(!i)return t;l=i(c)}a=t}}function oT(e,t,n){for(;;){let i=0;for(let r of e)r.between(t-1,t+1,((e,r,o)=>{if(t>e&&tt(e))),n.from,t.head>n.from?-1:1);return i==n.from?n:uP.cursor(i,ie)&&this.lineBreak(),i=r}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let r,o=-1,s=1;if(this.lineSeparator?(o=t.indexOf(this.lineSeparator,n),s=this.lineSeparator.length):(r=i.exec(t))&&(o=r.index,s=r[0].length),this.append(t.slice(n,o<0?t.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=s-1);n=o+s}}readNode(e){if(e.cmIgnore)return;let t=iS.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(3==e.nodeType?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(cT(e,n.node,n.offset)?t:0))}}function cT(e,t,n){for(;;){if(!t||n-1;let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let t=r||o?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}=e.observer.selectionRange;n&&(t.push(new pT(n,i)),r==n&&o==i||t.push(new pT(r,o)));return t}(e),n=new lT(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,i=2==e.length?e[1].pos:n;return n>-1&&i>-1?uP.single(n+t,i+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=r&&r.node==t.focusNode&&r.offset==t.focusOffset||!Nk(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),i=o&&o.node==t.anchorNode&&o.offset==t.anchorOffset||!Nk(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),s=e.viewport;if((bS.ios||bS.chrome)&&e.state.selection.main.empty&&n!=i&&(s.from>0||s.toDate.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:i,to:s}=t.bounds,a=r.from,l=null;(8===o||bS.android&&t.text.length0&&a>0&&e.charCodeAt(s-1)==t.charCodeAt(a-1);)s--,a--;if("end"==i){n-=s+Math.max(0,o-Math.min(s,a))-o}if(s=s?o-n:0,a=o+(a-s),s=o}else if(a=a?o-n:0,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}(e.state.doc.sliceString(i,s,aT),t.text,a-i,l);c&&(bS.chrome&&13==o&&c.toB==c.from+2&&t.text.slice(c.from,c.toB)==aT+aT&&c.toB--,n={from:i+c.from,to:i+c.toA,insert:RO.of(t.text.slice(c.from,c.toB).split(aT))})}else i&&(!e.hasFocus&&e.state.facet(CC)||i.main.eq(r))&&(i=null);if(!n&&!i)return!1;if(!n&&t.typeOver&&!r.empty&&i&&i.main.empty?n={from:r.from,to:r.to,insert:e.state.doc.slice(r.from,r.to)}:n&&n.from>=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:e.state.doc.slice(r.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,r.to))}:(bS.mac||bS.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(i&&2==n.insert.length&&(i=uP.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:RO.of([" "])}):bS.chrome&&n&&n.from==n.to&&n.from==r.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(i&&(i=uP.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:RO.of([" "])}),n)return hT(e,n,i,o);if(i&&!i.main.eq(r)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin),e.dispatch({selection:i,scrollIntoView:t,userEvent:n}),!0}return!1}function hT(e,t,n,i=-1){if(bS.ios&&e.inputState.flushIOSKey(t))return!0;let r=e.state.selection.main;if(bS.android&&(t.to==r.to&&(t.from==r.from||t.from==r.from-1&&" "==e.state.sliceDoc(t.from,r.from))&&1==t.insert.length&&2==t.insert.lines&&Kk(e.contentDOM,"Enter",13)||(t.from==r.from-1&&t.to==r.to&&0==t.insert.length||8==i&&t.insert.lengthr.head)&&Kk(e.contentDOM,"Backspace",8)||t.from==r.from&&t.to==r.to+1&&0==t.insert.length&&Kk(e.contentDOM,"Delete",46)))return!0;let o,s=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a=()=>o||(o=function(e,t,n){let i,r=e.state,o=r.selection.main;if(t.from>=o.from&&t.to<=o.to&&t.to-t.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=o.fromt.to?r.sliceDoc(t.to,o.to):"";i=r.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+s))}else{let s=r.changes(t),a=n&&n.main.to<=s.newLength?n.main:void 0;if(r.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=o.to&&t.to>=o.to-10){let l,c=e.state.sliceDoc(t.from,t.to),p=n&&WC(e,n.main.head);if(p){let e=t.insert.length-(t.to-t.from);l={from:p.from,to:p.to-e}}else l=e.state.doc.lineAt(o.head);let u=o.to-t.to,d=o.to-o.from;i=r.changeByRange((n=>{if(n.from==o.from&&n.to==o.to)return{changes:s,range:a||n.map(s)};let i=n.to-u,p=i-c.length;if(n.to-n.from!=d||e.state.sliceDoc(p,i)!=c||n.to>=l.from&&n.from<=l.to)return{range:n};let h=r.changes({from:p,to:i,insert:t.insert}),f=n.to-o.to;return{changes:h,range:a?uP.range(Math.max(0,a.anchor+f),Math.max(0,a.head+f)):n.map(h)}}))}else i={changes:s,selection:a&&r.selection.replaceRange(a)}}let s="input.type";(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=".compose",e.inputState.compositionFirstChange&&(s+=".start",e.inputState.compositionFirstChange=!1));return r.update(i,{userEvent:s,scrollIntoView:!0})}(e,t,n));return e.state.facet(yC).some((n=>n(e,t.from,t.to,s,a)))||e.dispatch(a()),!0}class fT{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,bS.safari&&e.contentDOM.addEventListener("input",(()=>null)),bS.gecko&&function(e){zT.has(e)||(zT.add(e),e.addEventListener("copy",(()=>{})),e.addEventListener("cut",(()=>{})))}(e.contentDOM.ownerDocument)}handleEvent(e){(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n,i=t.target;i!=e.contentDOM;i=i.parentNode)if(!i||11==i.nodeType||(n=iS.get(i))&&n.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=gT(e),n=this.handlers,i=this.view.contentDOM;for(let e in t)if("scroll"!=e){let r=!t[e].handlers.length,o=n[e];o&&r!=!o.handlers.length&&(i.removeEventListener(e,this.handleEvent),o=null),o||i.addEventListener(e,this.handleEvent,{passive:r})}for(let e in n)"scroll"==e||t[e]||i.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=e.keyCode&&bT.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),bS.android&&bS.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return!bS.ios||e.synthetic||e.altKey||e.metaKey||!((t=yT.find((t=>t.keyCode==e.keyCode)))&&!e.ctrlKey||vT.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(e){let t=this.pendingIOSKey;return!!t&&(!("Enter"==t.key&&e&&e.from0||!!(bS.safari&&!bS.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function mT(e,t){return(n,i)=>{try{return t.call(e,i,n)}catch(e){SC(n.state,e)}}}function gT(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec;if(e&&e.domEventHandlers)for(let i in e.domEventHandlers){let r=e.domEventHandlers[i];r&&n(i).handlers.push(mT(t.value,r))}if(e&&e.domEventObservers)for(let i in e.domEventObservers){let r=e.domEventObservers[i];r&&n(i).observers.push(mT(t.value,r))}}for(let e in _T)n(e).handlers.push(_T[e]);for(let e in ET)n(e).observers.push(ET[e]);return t}const yT=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],vT="dthko",bT=[16,17,18,20,91,92,224,225];function xT(e){return.7*Math.max(0,e)+8}class wT{constructor(e,t,n,i){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=function(e){let t,n,i=e.ownerDocument;for(let r=e.parentNode;r&&!(r==i.body||t&&n);)if(1==r.nodeType)!n&&r.scrollHeight>r.clientHeight&&(n=r),!t&&r.scrollWidth>r.clientWidth&&(t=r),r=r.assignedSlot||r.parentNode;else{if(11!=r.nodeType)break;r=r.host}return{x:t,y:n}}(e.contentDOM),this.atoms=e.state.facet(IC).map((t=>t(e)));let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(nk.allowMultipleSelections)&&function(e,t){let n=e.state.facet(dC);return n.length?n[0](t):bS.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let i=Rk(e.root);if(!i||0==i.rangeCount)return!0;let r=i.getRangeAt(0).getClientRects();for(let e=0;e=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)||1!=$T(t))&&null}start(e){!1===this.dragging&&this.select(e)}move(e){if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&function(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,i=0,r=0,o=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:r,bottom:s}=this.scrollParents.y.getBoundingClientRect());let a=zC(this.view);e.clientX-a.left<=i+6?t=-xT(i-e.clientX):e.clientX+a.right>=o-6&&(t=xT(e.clientX-o)),e.clientY-a.top<=r+6?n=-xT(r-e.clientY):e.clientY+a.bottom>=s-6&&(n=xT(e.clientY-s)),this.setScrollSpeed(t,n)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;ne.isUserEvent("input.type")))?this.destroy():this.style.update(e)&&setTimeout((()=>this.select(this.lastEvent)),20)}}const _T=Object.create(null),ET=Object.create(null),OT=bS.ie&&bS.ie_version<15||bS.ios&&bS.webkit_version<604;function PT(e,t,n){for(let i of e.facet(t))n=i(n,e);return n}function kT(e,t){t=PT(e.state,bC,t);let n,{state:i}=e,r=1,o=i.toText(t),s=o.lines==i.selection.ranges.length;if(null!=IT&&i.selection.ranges.every((e=>e.empty))&&IT==o.toString()){let e=-1;n=i.changeByRange((n=>{let a=i.doc.lineAt(n.from);if(a.from==e)return{range:n};e=a.from;let l=i.toText((s?o.line(r++).text:t)+i.lineBreak);return{changes:{from:a.from,insert:l},range:uP.cursor(n.from+l.length)}}))}else n=s?i.changeByRange((e=>{let t=o.line(r++);return{changes:{from:e.from,to:e.to,insert:t.text},range:uP.cursor(e.from+t.length)}})):i.replaceSelection(o);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function ST(e,t,n,i){if(1==i)return uP.cursor(t,n);if(2==i)return function(e,t,n=1){let i=e.charCategorizer(t),r=e.doc.lineAt(t),o=t-r.from;if(0==r.length)return uP.cursor(t);0==o?n=1:o==r.length&&(n=-1);let s=o,a=o;n<0?s=WO(r.text,o,!1):a=WO(r.text,o);let l=i(r.text.slice(s,a));for(;s>0;){let e=WO(r.text,s,!1);if(i(r.text.slice(e,s))!=l)break;s=e}for(;a{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},_T.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&0!=e.inputState.tabFocusMode&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),ET.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},ET.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},_T.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of e.state.facet(fC))if(n=i(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=AT(e,t),i=$T(t),r=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),r=r.map(e.changes))},get(t,o,s){let a,l=AT(e,t),c=ST(e,l.pos,l.bias,i);if(n.pos!=l.pos&&!o){let t=ST(e,n.pos,n.bias,i),r=Math.min(t.from,c.from),o=Math.max(t.to,c.to);c=r1&&(a=function(e,t){for(let n=0;n=t)return uP.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(r,l.pos))?a:s?r.addRange(c):uP.create([c])}}}(e,t)),n){let i=!e.hasFocus;e.inputState.startMouseSelection(new wT(e,t,n,i)),i&&e.observer.ignore((()=>{Qk(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()}));let r=e.inputState.mouseSelection;if(r)return r.start(t),!1===r.dragging}return!1};let CT=(e,t,n)=>t>=n.top&&t<=n.bottom&&e>=n.left&&e<=n.right;function TT(e,t,n,i){let r=qS.find(e.docView,t);if(!r)return 1;let o=t-r.posAtStart;if(0==o)return 1;if(o==r.length)return-1;let s=r.coordsAt(o,-1);if(s&&CT(n,i,s))return-1;let a=r.coordsAt(o,1);return a&&CT(n,i,a)?1:s&&s.bottom>=i?-1:1}function AT(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:TT(e,n,t.clientX,t.clientY)}}const MT=bS.ie&&bS.ie_version<=11;let DT=null,RT=0,NT=0;function $T(e){if(!MT)return e.detail;let t=DT,n=NT;return DT=e,NT=Date.now(),RT=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(RT+1)%3:1}function jT(e,t,n,i){if(!(n=PT(e.state,bC,n)))return;let r=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:o}=e.inputState,s=i&&o&&function(e,t){let n=e.state.facet(hC);return n.length?n[0](t):bS.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:o.from,to:o.to}:null,a={from:r,insert:n},l=e.state.changes(s?[s,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"}),e.inputState.draggedContent=null}_T.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let i=e.docView.nearest(t.target);if(i&&i.isWidget){let e=i.posAtStart,t=e+i.length;(e>=n.to||t<=n.from)&&(n=uP.range(e,t))}}let{inputState:i}=e;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",PT(e.state,xC,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1},_T.dragend=e=>(e.inputState.draggedContent=null,!1),_T.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,o=()=>{++r==n.length&&jT(e,t,i.filter((e=>null!=e)).join(e.state.lineBreak),!1)};for(let e=0;e{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(i[e]=t.result),o()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return jT(e,t,n,!0),!0}return!1},_T.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=OT?null:t.clipboardData;return n?(kT(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout((()=>{e.focus(),n.remove(),kT(e,n.value)}),50)}(e),!1)};let IT=null;_T.copy=_T.cut=(e,t)=>{let{text:n,ranges:i,linewise:r}=function(e){let t=[],n=[],i=!1;for(let i of e.selection.ranges)i.empty||(t.push(e.sliceDoc(i.from,i.to)),n.push(i));if(!t.length){let r=-1;for(let{from:i}of e.selection.ranges){let o=e.doc.lineAt(i);o.number>r&&(t.push(o.text),n.push({from:o.from,to:Math.min(e.doc.length,o.to+1)})),r=o.number}i=!0}return{text:PT(e,xC,t.join(e.lineBreak)),ranges:n,linewise:i}}(e.state);if(!n&&!r)return!1;IT=r?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let o=OT?null:t.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(function(e,t){let n=e.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=t,i.focus(),i.selectionEnd=t.length,i.selectionStart=0,setTimeout((()=>{i.remove(),e.focus()}),50)}(e,n),!1)};const LT=zP.define();function BT(e,t){let n=[];for(let i of e.facet(vC)){let r=i(e,t);r&&n.push(r)}return n?e.update({effects:n,annotations:LT.of(!0)}):null}function qT(e){setTimeout((()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=BT(e.state,t);n?e.dispatch(n):e.update([])}}),10)}ET.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),qT(e)},ET.blur=e=>{e.observer.clearSelectionRange(),qT(e)},ET.compositionstart=ET.compositionupdate=e=>{e.observer.editContext||(null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},ET.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,bS.chrome&&bS.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then((()=>e.observer.flush())):setTimeout((()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])}),50))},ET.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},_T.beforeinput=(e,t)=>{var n,i;if("insertReplacementText"==t.inputType&&e.observer.editContext){let i=null===(n=t.dataTransfer)||void 0===n?void 0:n.getData("text/plain"),r=t.getTargetRanges();if(i&&r.length){let t=r[0],n=e.posAtDOM(t.startContainer,t.startOffset),o=e.posAtDOM(t.endContainer,t.endOffset);return hT(e,{from:n,to:o,insert:e.state.toText(i)},null),!0}}let r;if(bS.chrome&&bS.android&&(r=yT.find((e=>e.inputType==t.inputType)))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let t=(null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0;setTimeout((()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())}),100)}return bS.ios&&"deleteContentForward"==t.inputType&&e.observer.flushSoon(),bS.safari&&"insertText"==t.inputType&&e.inputState.composing>=0&&setTimeout((()=>ET.compositionend(e,t)),20),!1};const zT=new Set;const FT=["pre-wrap","normal","pre-line","break-spaces"];let VT=!1;function HT(){VT=!1}class UT{constructor(e){this.lineWrapping=e,this.doc=RO.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return FT.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=i,this.lineLength=r,a){this.heightSamples={};for(let e=0;e0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>XT&&(VT=!0),this.height=e)}replace(e,t,n){return KT.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,i){let r=this,o=n.doc;for(let s=i.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:c,toB:p}=i[s],u=r.lineAt(a,QT.ByPosNoHeight,n.setDoc(t),0,0),d=u.to>=l?u:r.lineAt(l,QT.ByPosNoHeight,n,0,0);for(p+=d.to-l,l=d.to;s>0&&u.from<=i[s-1].toA;)a=i[s-1].fromA,c=i[s-1].fromB,s--,a2*r){let r=e[t-1];r.break?e.splice(--t,1,r.left,null,r.right):e.splice(--t,1,r.left,r.right),n+=1+r.break,i-=r.size}else{if(!(r>2*i))break;{let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,r-=t.size}}else if(i=r&&o(this.blockAt(0,n,i,r))}updateHeight(e,t=0,n=!1,i){return i&&i.from<=t&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class JT extends ZT{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,i){return new GT(i,this.length,n,this.height,this.breaks)}replace(e,t,n){let i=n[0];return 1==n.length&&(i instanceof JT||i instanceof eA&&4&i.flags)&&Math.abs(this.length-i.length)<10?(i instanceof eA?i=new JT(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):KT.of(n)}updateHeight(e,t=0,n=!1,i){return i&&i.from<=t&&i.more?this.setHeight(i.heights[i.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class eA extends KT{constructor(e){super(e,0)}heightMetrics(e,t){let n,i=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,o=r-i+1,s=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*o);n=t/o,this.length>o+1&&(s=(this.height-t)/(this.length-o-1))}else n=this.height/o;return{firstLine:i,lastLine:r,perLine:n,perChar:s}}blockAt(e,t,n,i){let{firstLine:r,lastLine:o,perLine:s,perChar:a}=this.heightMetrics(t,i);if(t.lineWrapping){let r=i+(e0){let e=n[n.length-1];e instanceof eA?n[n.length-1]=new eA(e.length+i):n.push(null,new eA(i-1))}if(e>0){let t=n[0];t instanceof eA?n[0]=new eA(e+t.length):n.unshift(new eA(e-1),null)}return KT.of(n)}decomposeLeft(e,t){t.push(new eA(e-1),null)}decomposeRight(e,t){t.push(null,new eA(this.length-e-1))}updateHeight(e,t=0,n=!1,i){let r=t+this.length;if(i&&i.from<=t+this.length&&i.more){let n=[],o=Math.max(t,i.from),s=-1;for(i.from>t&&n.push(new eA(i.from-t-1).updateHeight(e,t));o<=r&&i.more;){let t=e.doc.lineAt(o).length;n.length&&n.push(null);let r=i.heights[i.index++];-1==s?s=r:Math.abs(r-s)>=XT&&(s=-2);let a=new JT(t,r);a.outdated=!1,n.push(a),o+=t+1}o<=r&&n.push(null,new eA(r-o).updateHeight(e,o));let a=KT.of(n);return(s<0||Math.abs(a.height-this.height)>=XT||Math.abs(s-this.heightMetrics(e,t).perLine)>=XT)&&(VT=!0),YT(this,a)}return(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class tA extends KT{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,i){let r=n+this.left.height;return es))return l;let c=t==QT.ByPosNoHeight?QT.ByPosNoHeight:QT.ByPos;return a?l.join(this.right.lineAt(s,c,n,o,s)):this.left.lineAt(s,c,n,i,r).join(l)}forEachLine(e,t,n,i,r,o){let s=i+this.left.height,a=r+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,n,s,a,o);else{let l=this.lineAt(a,QT.ByPos,n,i,r);e=e&&l.from<=t&&o(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,s,a,o)}}replace(e,t,n){let i=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,n));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let e of n)r.push(e);if(e>0&&nA(r,o-1),t=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,i=n+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e2*t.size||t.size>2*e.size?KT.of(this.break?[e,null,t]:[e,t]):(this.left=YT(this.left,e),this.right=YT(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,i){let{left:r,right:o}=this,s=t+r.length+this.break,a=null;return i&&i.from<=t+r.length&&i.more?a=r=r.updateHeight(e,t,n,i):r.updateHeight(e,t,n),i&&i.from<=s+o.length&&i.more?a=o=o.updateHeight(e,s,n,i):o.updateHeight(e,s,n),a?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function nA(e,t){let n,i;null==e[t]&&(n=e[t-1])instanceof eA&&(i=e[t+1])instanceof eA&&e.splice(t-1,3,new eA(n.length+1+i.length))}class iA{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof JT?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new JT(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e=5)&&this.addLineDeco(i,r,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new JT(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new eA(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof JT)return e;let t=new JT(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let i=this.ensureLine();i.length+=n,i.collapsed+=n,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof JT||this.isCovered?(this.writtenTon.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=i.overflow){let i=n.getBoundingClientRect();o=Math.max(o,i.left),s=Math.min(s,i.right),a=Math.max(a,i.top),l=Math.min(t==e.parentNode?r.innerHeight:l,i.bottom)}t="absolute"==i.position||"fixed"==i.position?n.offsetParent:n.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+t),bottom:Math.max(a,l)-(n.top+t)}}function sA(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class aA{constructor(e,t,n,i){this.from=e,this.to=t,this.size=n,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n"function"!=typeof e&&"cm-lineWrapping"==e.class));this.heightOracle=new UT(t),this.stateDeco=e.facet($C).filter((e=>"function"!=typeof e)),this.heightMap=KT.empty().applyChanges(this.stateDeco,RO.empty,this.heightOracle.setDoc(e.doc),[new VC(0,0,0,e.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=NS.set(this.lineGaps.map((e=>e.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let i=n?t.head:t.anchor;if(!e.some((({from:e,to:t})=>i>=e&&i<=t))){let{from:t,to:n}=this.lineBlockAt(i);e.push(new pA(t,n))}}return this.viewports=e.sort(((e,t)=>e.from-t.from)),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?hA:new fA(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(e=>{this.viewportLines.push(mA(e,this.scaler))}))}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet($C).filter((e=>"function"!=typeof e));let i=e.changedRanges,r=VC.extendWithRanges(i,function(e,t,n){let i=new rA;return lk.compare(e,t,n,i,0),i.changes}(n,this.stateDeco,e?e.changes:iP.empty(this.state.doc.length))),o=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);HT(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),(this.heightMap.height!=o||VT)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let l=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(l||!e.changes.empty||2&e.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(_C)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),i=this.heightOracle,r=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?WS.RTL:WS.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),s=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let l=0,c=0;if(s.width&&s.height){let{scaleX:e,scaleY:n}=Hk(t,s);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,l|=8,o=a=!0)}let p=(parseInt(n.paddingTop)||0)*this.scaleY,u=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==p&&this.paddingBottom==u||(this.paddingTop=p,this.paddingBottom=u,l|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=8);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=Zk(e.scrollDOM);let h=(this.printing?sA:oA)(t,this.paddingTop),f=h.top-this.pixelViewport.top,m=h.bottom-this.pixelViewport.bottom;this.pixelViewport=h;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let y=s.width;if(this.contentDOMWidth==y&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,l|=8),a){let t=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(t)&&(o=!0),o||i.lineWrapping&&Math.abs(y-this.contentDOMWidth)>i.charWidth){let{lineHeight:n,charWidth:s,textHeight:a}=e.docView.measureTextSize();o=n>0&&i.refresh(r,n,s,a,y/s,t),o&&(e.docView.minWidth=0,l|=8)}f>0&&m>0?c=Math.max(f,m):f<0&&m<0&&(c=Math.min(f,m)),HT();for(let n of this.viewports){let r=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(o?KT.empty().applyChanges(this.stateDeco,RO.empty,this.heightOracle,[new VC(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new WT(n.from,r))}VT&&(l|=2)}let v=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return v&&(2&l&&(l|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),l|=this.updateForViewport()),(2&l||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,a=new pA(i.lineAt(o-1e3*n,QT.ByHeight,r,0,0).from,i.lineAt(s+1e3*(1-n),QT.ByHeight,r,0,0).to);if(t){let{head:e}=t.range;if(ea.to){let n,o=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=i.lineAt(e,QT.ByPos,r,0,0);n="center"==t.y?(s.top+s.bottom)/2-o/2:"start"==t.y||"nearest"==t.y&&e=s+Math.max(10,Math.min(n,250)))&&i>o-2e3&&r>1,o=i<<1;if(this.defaultTextDirection!=WS.LTR&&!n)return[];let s=[],a=(i,o,l,c)=>{if(o-ii&&ee.from>=l.from&&e.to<=l.to&&Math.abs(e.from-i)e.fromt))));if(!d){if(oe.from<=o&&e.to>=o))){let e=t.moveToLineBoundary(uP.cursor(o),!1,!0).head;e>i&&(o=e)}let e=this.gapSize(l,i,o,c);d=new aA(i,o,e,n||e<2e6?e:2e6)}s.push(d)},l=t=>{if(t.lengthr&&(i.push({from:r,to:e}),o+=e-r),r=t}},20),r2e6)for(let n of e)n.from>=t.from&&n.fromt.from&&a(t.from,s,t,r),le.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];lk.spans(e,this.viewport.from,this.viewport.to,{span(e,n){t.push({from:e,to:n})},point(){}},20);let n=t.length!=this.visibleRanges.length||this.visibleRanges.some(((e,n)=>e.from!=t[n].from||e.to!=t[n].to));return this.visibleRanges=t,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((t=>t.from<=e&&t.to>=e))||mA(this.heightMap.lineAt(e,QT.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((t=>t.top<=e&&t.bottom>=e))||mA(this.heightMap.lineAt(this.scaler.fromDOM(e),QT.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return mA(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class pA{constructor(e,t){this.from=e,this.to=t}}function uA({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let i=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:r}=t[e],o=r-n;if(i<=o)return n+i;i-=o}}function dA(e,t){let n=0;for(let{from:i,to:r}of e.ranges){if(t<=r){n+=t-i;break}n+=r-i}return n/e.total}const hA={toDOM:e=>e,fromDOM:e=>e,scale:1,eq(e){return e==this}};class fA{constructor(e,t,n){let i=0,r=0,o=0;this.viewports=n.map((({from:n,to:r})=>{let o=t.lineAt(n,QT.ByPos,e,0,0).top,s=t.lineAt(r,QT.ByPos,e,0,0).bottom;return i+=s-o,{from:n,to:r,top:o,bottom:s,domTop:0,domBottom:0}})),this.scale=(7e6-i)/(t.height-i);for(let e of this.viewports)e.domTop=o+(e.top-r)*this.scale,o=e.domBottom=e.domTop+(e.bottom-e.top),r=e.bottom}toDOM(e){for(let t=0,n=0,i=0;;t++){let r=tt.from==e.viewports[n].from&&t.to==e.viewports[n].to)))}}function mA(e,t){if(1==t.scale)return e;let n=t.toDOM(e.top),i=t.toDOM(e.bottom);return new GT(e.from,e.length,n,i-n,Array.isArray(e._content)?e._content.map((e=>mA(e,t))):e._content)}const gA=fP.define({combine:e=>e.join(" ")}),yA=fP.define({combine:e=>e.indexOf(!0)>-1}),vA=Ok.newName(),bA=Ok.newName(),xA=Ok.newName(),wA={"&light":"."+bA,"&dark":"."+xA};function _A(e,t,n){return new Ok(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,(t=>{if("&"==t)return e;if(!n||!n[t])throw new RangeError(`Unsupported selector: ${t}`);return n[t]})):e+" "+t})}const EA=_A("."+vA,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},wA),OA={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},PA=bS.ie&&bS.ie_version<=11;class kA{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Uk,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver((t=>{for(let e of t)this.queue.push(e);(bS.ie&&bS.ie_version<=11||bS.ios&&e.composing)&&t.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),!window.EditContext||!1===e.constructor.EDIT_CONTEXT||bS.chrome&&bS.chrome_version<126||(this.editContext=new TA(e),e.state.facet(CC)&&(e.contentDOM.editContext=this.editContext.editContext)),PA&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(e){("change"!=e.type&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some(((t,n)=>t!=e[n])))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,i=this.selectionRange;if(n.state.facet(CC)?n.root.activeElement!=this.dom:!$k(this.dom,i))return;let r=i.anchorNode&&n.docView.nearest(i.anchorNode);r&&r.ignoreEvent(e)?t||(this.selectionChanged=!1):(bS.ie&&bS.ie_version<=11||bS.android&&bS.chrome)&&!n.state.selection.main.empty&&i.focusNode&&Ik(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Rk(e.root);if(!t)return!1;let n=bS.safari&&11==e.root.nodeType&&e.root.activeElement==this.dom&&function(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return CA(e,n)}let n=null;function i(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",i,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",i,!0),n?CA(e,n):null}(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let i=$k(this.dom,n);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let e=this.delayedAndroidKey;if(e){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&Kk(this.dom,e.key,e.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,i=!1;for(let r of e){let e=this.readMutation(r);e&&(e.typeOver&&(i=!0),-1==t?({from:t,to:n}=e):(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:i}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),i=this.selectionChanged&&$k(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new uT(this.view,e,t,n);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,i=dT(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){let n=SA(t,e.previousSibling||e.target.previousSibling,-1),i=SA(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(CC)!=e.state.facet(CC)&&(e.view.contentDOM.editContext=e.state.facet(CC)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function SA(e,t,n){for(;t;){let i=iS.get(t);if(i&&i.parent==e)return i;let r=t.parentNode;t=r!=e.dom?r:n>0?t.nextSibling:t.previousSibling}return null}function CA(e,t){let n=t.startContainer,i=t.startOffset,r=t.endContainer,o=t.endOffset,s=e.docView.domAtPos(e.state.selection.main.anchor);return Ik(s.node,s.offset,r,o)&&([n,i,r,o]=[r,o,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}}class TA{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=t=>{let{anchor:n}=e.state.selection.main,i=this.toEditorPos(t.updateRangeStart),r=this.toEditorPos(t.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:t.updateRangeStart,editorBase:i,drifted:!1});let o={from:i,to:r,insert:RO.of(t.text.split("\n"))};o.from==this.from&&nthis.to&&(o.to=n),(o.from!=o.to||o.insert.length)&&(this.pendingContextChange=o,e.state.readOnly||hT(e,o,uP.single(this.toEditorPos(t.selectionStart),this.toEditorPos(t.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=n=>{let i=[],r=null;for(let t=this.toEditorPos(n.rangeStart),o=this.toEditorPos(n.rangeEnd);t{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,i=e.underlineThickness;if("None"!=t&&"None"!=i){let r=`text-decoration: underline ${"Dashed"==t?"dashed ":"Squiggle"==t?"wavy ":""}${"Thin"==i?1:2}px`;n.push(NS.mark({attributes:{style:r}}).range(this.toEditorPos(e.rangeStart),this.toEditorPos(e.rangeEnd)))}}e.dispatch({effects:kC.of(NS.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=Rk(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,i=this.pendingContextChange;return e.changes.iterChanges(((r,o,s,a,l)=>{if(n)return;let c=l.length-(o-r);if(i&&o>=i.to){if(i.from==r&&i.to==o&&i.insert.eq(l))return i=this.pendingContextChange=null,t+=c,void(this.to+=c);i=null,this.revertPending(e.state)}if(r+=t,(o+=t)<=this.from)this.from+=c,this.to+=c;else if(rthis.to||this.to-this.from+l.length>3e4)return void(n=!0);this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),l.toString()),this.to+=c}t+=c})),i&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange;this.composing&&(this.composing.drifted||e.transactions.some((e=>!e.isUserEvent("input.type")&&e.changes.touchesRange(this.from,this.to))))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):this.applyEdits(e)&&this.rangeIsValid(e.state)?(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state):(this.pendingContextChange=null,this.reset(e.state)),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);this.editContext.selectionStart==n&&this.editContext.selectionEnd==i||this.editContext.updateSelection(n,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to3e4)}toEditorPos(e){let t=this.composing;return t&&t.drifted?t.editorBase+(e-t.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class AA{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(e=>e.forEach((e=>n(e,this))))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new cA(e.state||nk.create(e)),e.scrollTo&&e.scrollTo.is(PC)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(AC).map((e=>new DC(e)));for(let e of this.plugins)e.update(this);this.observer=new kA(this),this.inputState=new fT(this),this.inputState.ensureHandlers(this.plugins),this.docView=new UC(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(t=document.fonts)||void 0===t?void 0:t.ready)&&document.fonts.ready.then((()=>this.requestMeasure()))}dispatch(...e){let t=1==e.length&&e[0]instanceof UP?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,n=!1,i=!1,r=this.state;for(let t of e){if(t.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=t.state}if(this.destroyed)return void(this.viewState.state=r);let o=this.hasFocus,s=0,a=null;e.some((e=>e.annotation(LT)))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=BT(r,o),a||(s=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(c=null)):this.observer.clear(),r.facet(nk.phrases)!=this.state.facet(nk.phrases))return this.setState(r);t=HC.create(this,r,e),t.flags|=s;let p=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(p&&(p=p.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;p=new OC(e.empty?e:uP.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(PC)&&(p=e.value.clip(this.state))}this.viewState.update(t,p),this.bidiCache=RA.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(FC)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some((e=>e.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(t.startState.facet(gA)!=t.state.facet(gA)&&(this.viewState.mustMeasureContent=!0),(n||i||p||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!t.empty)for(let e of this.state.facet(gC))try{e(t)}catch(e){SC(this.state,e,"update listener")}(a||c)&&Promise.resolve().then((()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!dT(this,c)&&l.force&&Kk(this.contentDOM,l.key,l.keyCode)}))}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new cA(e),this.plugins=e.facet(AC).map((e=>new DC(e))),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new UC(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(AC),n=e.state.facet(AC);if(t!=n){let i=[];for(let r of n){let n=t.indexOf(r);if(n<0)i.push(new DC(r));else{let t=this.plugins[n];t.mustUpdate=e,i.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,i=n.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(o<0)if(Zk(n))r=-1,o=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(i);r=e.from,o=e.top}this.updateState=1;let s=this.viewState.measure(this);if(!s&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let a=[];4&s||([this.measureRequests,a]=[a,this.measureRequests]);let l=a.map((e=>{try{return e.read(this)}catch(e){return SC(this.state,e),DA}})),c=HC.create(this,this.state,[]),p=!1;c.flags|=s,t?t.flags|=s:t=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),p=this.docView.update(c),p&&this.docViewUpdate());for(let e=0;e1||e<-1){i+=e,n.scrollTop=i/this.scaleY,o=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(gC))e(t)}get themeClasses(){return vA+" "+(this.state.facet(yA)?xA:bA)+" "+this.state.facet(gA)}updateAttrs(){let e=NA(this,RC,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(CC)?"true":"false",class:"cm-content",style:`${bS.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),NA(this,NC,t);let n=this.observer.ignore((()=>{let n=AS(this.contentDOM,this.contentAttrs,t),i=AS(this.dom,this.editorAttrs,e);return n||i}));return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)if(e.is(AA.announce)){t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(FC);let e=this.state.facet(AA.cspNonce);Ok.mount(this.root,this.styleModules.concat(EA).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;tt.spec==e))||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return sT(this,e,rT(this,e,t,n))}moveByGroup(e,t){return sT(this,e,rT(this,e,t,(t=>function(e,t,n){let i=e.state.charCategorizer(t),r=i(n);return e=>{let t=i(e);return r==ZP.Space&&(r=t),r==t}}(this,e.head,t))))}visualLineSide(e,t){let n=this.bidiSpans(e),i=this.textDirectionAt(e.from),r=n[t?n.length-1:0];return uP.cursor(r.side(t,i)+e.from,r.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,n=!0){return function(e,t,n,i){let r=iT(e,t.head),o=i&&r.type==RS.Text&&(e.lineWrapping||r.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>r.from?t.head-1:t.head):null;if(o){let t=e.dom.getBoundingClientRect(),i=e.textDirectionAt(r.from),s=e.posAtCoords({x:n==(i==WS.LTR)?t.right-1:t.left+1,y:(o.top+o.bottom)/2});if(null!=s)return uP.cursor(s,n?-1:1)}return uP.cursor(n?r.to:r.from,n?-1:1)}(this,e,t,n)}moveVertically(e,t,n){return sT(this,e,function(e,t,n,i){let r=t.head,o=n?1:-1;if(r==(n?e.state.doc.length:0))return uP.cursor(r,t.assoc);let s,a=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(r,t.assoc||-1),p=e.documentTop;if(c)null==a&&(a=c.left-l.left),s=o<0?c.top:c.bottom;else{let t=e.viewState.lineBlockAt(r);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(r-t.from))),s=(o<0?t.top:t.bottom)+p}let u=l.left+a,d=null!=i?i:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=s+(d+t)*o,i=tT(e,{x:u,y:n},!1,o);if(nl.bottom||(o<0?ir)){let t=e.docView.coordsForChar(i),r=!t||n0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(wC)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>MA)return lC(e.length);let t,n=this.textDirectionAt(e.from);for(let i of this.bidiCache)if(i.from==e.from&&i.dir==n&&(i.fresh||iC(i.isolates,t=BC(this,e))))return i.order;t||(t=BC(this,e));let i=aC(e.text,n,t);return this.bidiCache.push(new RA(e.from,e.to,n,t,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||bS.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{Qk(this.contentDOM),this.docView.updateSelection()}))}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return PC.of(new OC("number"==typeof e?uP.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return PC.of(new OC(uP.cursor(n.from),"start","start",n.top-e,t,!0))}setTabFocusMode(e){null==e?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof e?this.inputState.tabFocusMode=e?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return MC.define((()=>({})),{eventHandlers:e})}static domEventObservers(e){return MC.define((()=>({})),{eventObservers:e})}static theme(e,t){let n=Ok.newName(),i=[gA.of(n),FC.of(_A(`.${n}`,e))];return t&&t.dark&&i.push(yA.of(!0)),i}static baseTheme(e){return SP.lowest(FC.of(_A("."+vA,e,wA)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),i=n&&iS.get(n)||iS.get(e);return(null===(t=null==i?void 0:i.rootView)||void 0===t?void 0:t.view)||null}}AA.styleModule=FC,AA.inputHandler=yC,AA.clipboardInputFilter=bC,AA.clipboardOutputFilter=xC,AA.scrollHandler=EC,AA.focusChangeEffect=vC,AA.perLineTextDirection=wC,AA.exceptionSink=mC,AA.updateListener=gC,AA.editable=CC,AA.mouseSelectionStyle=fC,AA.dragMovesSelection=hC,AA.clickAddsSelectionRange=dC,AA.decorations=$C,AA.outerDecorations=jC,AA.atomicRanges=IC,AA.bidiIsolatedRanges=LC,AA.scrollMargins=qC,AA.darkTheme=yA,AA.cspNonce=fP.define({combine:e=>e.length?e[0]:""}),AA.contentAttributes=NC,AA.editorAttributes=RC,AA.lineWrapping=AA.contentAttributes.of({class:"cm-lineWrapping"}),AA.announce=HP.define();const MA=4096,DA={};class RA{constructor(e,t,n,i,r,o){this.from=e,this.to=t,this.dir=n,this.isolates=i,this.fresh=r,this.order=o}static update(e,t){if(t.empty&&!e.some((e=>e.fresh)))return e;let n=[],i=e.length?e[e.length-1].dir:WS.LTR;for(let r=Math.max(0,e.length-10);r=0;r--){let t=i[r],o="function"==typeof t?t(e):t;o&&SS(o,n)}return n}const $A=bS.mac?"mac":bS.windows?"win":bS.linux?"linux":"key";function jA(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}const IA=SP.default(AA.domEventHandlers({keydown:(e,t)=>HA(qA(t.state),e,t,"editor")})),LA=fP.define({enables:IA}),BA=new WeakMap;function qA(e){let t=e.facet(LA),n=BA.get(t);return n||BA.set(t,n=function(e,t=$A){let n=Object.create(null),i=Object.create(null),r=(e,t)=>{let n=i[e];if(null==n)i[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},o=(e,i,o,s,a)=>{var l,c;let p=n[e]||(n[e]=Object.create(null)),u=i.split(/ (?!$)/).map((e=>function(e,t){const n=e.split(/-(?!$)/);let i,r,o,s,a=n[n.length-1];"Space"==a&&(a=" ");for(let e=0;e{let i=zA={view:t,prefix:n,scope:e};return setTimeout((()=>{zA==i&&(zA=null)}),FA),!0}]})}let d=u.join(" ");r(d,!1);let h=p[d]||(p[d]={preventDefault:!1,stopPropagation:!1,run:(null===(c=null===(l=p._any)||void 0===l?void 0:l.run)||void 0===c?void 0:c.slice())||[]});o&&h.run.push(o),s&&(h.preventDefault=!0),a&&(h.stopPropagation=!0)};for(let i of e){let e=i.scope?i.scope.split(" "):["editor"];if(i.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:r}=i;for(let t in e)e[t].run.push((e=>r(e,VA)))}let r=i[t]||i.key;if(r)for(let t of e)o(t,r,i.run,i.preventDefault,i.stopPropagation),i.shift&&o(t,"Shift-"+r,i.shift,i.preventDefault,i.stopPropagation)}return n}(t.reduce(((e,t)=>e.concat(t)),[]))),n}let zA=null;const FA=4e3;let VA=null;function HA(e,t,n,i){VA=t;let r=function(e){var t=!(Tk&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||Ak&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?Ck:Sk)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(t),o=JO(YO(r,0))==r.length&&" "!=r,s="",a=!1,l=!1,c=!1;zA&&zA.view==n&&zA.scope==i&&(s=zA.prefix+" ",bT.indexOf(t.keyCode)<0&&(l=!0,zA=null));let p,u,d=new Set,h=e=>{if(e){for(let t of e.run)if(!d.has(t)&&(d.add(t),t(n)))return e.stopPropagation&&(c=!0),!0;e.preventDefault&&(e.stopPropagation&&(c=!0),l=!0)}return!1},f=e[i];return f&&(h(f[s+jA(r,t,!o)])?a=!0:o&&(t.altKey||t.metaKey||t.ctrlKey)&&!(bS.windows&&t.ctrlKey&&t.altKey)&&(p=Sk[t.keyCode])&&p!=r?(h(f[s+jA(p,t,!0)])||t.shiftKey&&(u=Ck[t.keyCode])!=r&&u!=p&&h(f[s+jA(u,t,!1)]))&&(a=!0):o&&t.shiftKey&&h(f[s+jA(r,t,!0)])&&(a=!0),!a&&h(f._any)&&(a=!0)),l&&(a=!0),a&&c&&t.stopPropagation(),VA=null,a}const UA=!bS.ios;const WA={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};UA&&(WA[".cm-line"].caretColor=WA[".cm-content"].caretColor="transparent !important");class GA extends DS{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild("string"==typeof this.content?document.createTextNode(this.content):"function"==typeof this.content?this.content(e):this.content.cloneNode(!0)),"string"==typeof this.content?t.setAttribute("aria-label","placeholder "+this.content):t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?jk(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),i=Fk(t[0],"rtl"!=n.direction),r=parseInt(n.lineHeight);return i.bottom-i.top>1.5*r?{left:i.left,right:i.right,top:i.top,bottom:i.top+r}:i}ignoreEvent(){return!1}}function QA(e){return MC.fromClass(class{constructor(t){this.view=t,this.placeholder=e?NS.set([NS.widget({widget:new GA(e),side:1}).range(0)]):NS.none}get decorations(){return this.view.state.doc.length?NS.none:this.placeholder}},{decorations:e=>e.decorations})}const XA="-10000px";class KA{constructor(e,t,n,i){this.facet=t,this.createTooltipView=n,this.removeTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter((e=>e));let r=null;this.tooltipViews=this.tooltips.map((e=>r=n(e,r)))}update(e,t){var n;let i=e.state.facet(this.facet),r=i.filter((e=>e));if(i===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let o=[],s=t?[]:null;for(let n=0;nt[n]=e)),t.length=s.length),this.input=i,this.tooltips=r,this.tooltipViews=o,!0}}function YA(e={}){return JA.of(e)}function ZA(e){let{win:t}=e;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}const JA=fP.define({combine:e=>{var t,n,i;return{position:bS.ios?"absolute":(null===(t=e.find((e=>e.position)))||void 0===t?void 0:t.position)||"fixed",parent:(null===(n=e.find((e=>e.parent)))||void 0===n?void 0:n.parent)||null,tooltipSpace:(null===(i=e.find((e=>e.tooltipSpace)))||void 0===i?void 0:i.tooltipSpace)||ZA}}}),eM=new WeakMap,tM=MC.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(JA);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver((()=>this.measureSoon())):null,this.manager=new KA(e,rM,((e,t)=>this.createTooltip(e,t)),(e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()})),this.above=this.manager.tooltips.map((e=>!!e.above)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,i=e.state.facet(JA);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),i=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",n.dom.appendChild(e)}return n.dom.style.position=this.position,n.dom.style.top=XA,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),null===(e=t.destroy)||void 0===e||e.call(t);this.parent&&this.container.remove(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),null===(n=this.intersectionObserver)||void 0===n||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,n=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(bS.gecko)n=e.offsetParent!=this.container.ownerDocument.body;else if(e.style.top==XA&&"0px"==e.style.left){let t=e.getBoundingClientRect();n=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}}if(n||"absolute"==this.position)if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(e=n.width/this.parent.offsetWidth,t=n.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),r=zC(this.view);return{visible:{left:i.left+r.left,top:i.top+r.top,right:i.right-r.right,bottom:i.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map(((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)})),size:this.manager.tooltipViews.map((({dom:e})=>e.getBoundingClientRect())),space:this.view.state.facet(JA).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let e of this.manager.tooltipViews)e.dom.style.position="absolute"}let{visible:n,space:i,scaleX:r,scaleY:o}=e,s=[];for(let a=0;a=Math.min(n.bottom,i.bottom)||u.rightMath.min(n.right,i.right)+.1)){p.style.top=XA;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,f=h?7:0,m=d.right-d.left,g=null!==(t=eM.get(c))&&void 0!==t?t:d.bottom-d.top,y=c.offset||iM,v=this.view.textDirection==WS.LTR,b=d.width>i.right-i.left?v?i.left:i.right-d.width:v?Math.max(i.left,Math.min(u.left-(h?14:0)+y.x,i.right-m)):Math.min(Math.max(i.left,u.left-m+(h?14:0)-y.x),i.right-m),x=this.above[a];!l.strictSide&&(x?u.top-g-f-y.yi.bottom)&&x==i.bottom-u.bottom>u.top-i.top&&(x=this.above[a]=!x);let w=(x?u.top-i.top:i.bottom-u.bottom)-f;if(wb&&e.top<_+g&&e.bottom>_&&(_=x?e.top-g-2-f:e.bottom+f+2);if("absolute"==this.position?(p.style.top=(_-e.parent.top)/o+"px",p.style.left=(b-e.parent.left)/r+"px"):(p.style.top=_/o+"px",p.style.left=b/r+"px"),h){let e=u.left+(v?y.x:-y.x)-(b+14-7);h.style.left=e/r+"px"}!0!==c.overlap&&s.push({left:b,top:_,right:E,bottom:_+g}),p.classList.toggle("cm-tooltip-above",x),p.classList.toggle("cm-tooltip-below",!x),c.positioned&&c.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=XA}},{eventObservers:{scroll(){this.maybeMeasure()}}}),nM=AA.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),iM={x:0,y:0},rM=fP.define({enables:[tM,nM]}),oM=fP.define({combine:e=>e.reduce(((e,t)=>e.concat(t)),[])});class sM{static create(e){return new sM(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new KA(e,oM,((e,t)=>this.createHostedView(e,t)),(e=>e.dom.remove()))}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null===(e=t.destroy)||void 0===e||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let i=n[e];if(void 0!==i)if(void 0===t)t=i;else if(t!==i)return}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const aM=rM.compute([oM],(e=>{let t=e.facet(oM);return 0===t.length?null:{pos:Math.min(...t.map((e=>e.pos))),end:Math.max(...t.map((e=>{var t;return null!==(t=e.end)&&void 0!==t?t:e.pos}))),create:sM.create,above:t[0].above,arrow:t.some((e=>e.arrow))}}));class lM{constructor(e,t,n,i,r){this.view=e,this.source=t,this.field=n,this.setHover=i,this.hoverTime=r,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;en.bottom||t.xn.right+e.defaultCharacterWidth)return;let o=e.bidiSpans(e.state.doc.lineAt(i)).find((e=>e.from<=i&&e.to>=i)),s=o&&o.dir==WS.RTL?-1:1;r=t.x{this.pending==t&&(this.pending=null,!n||Array.isArray(n)&&!n.length||e.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])}))}),(t=>SC(e.state,t,"hover tooltip")))}else!o||Array.isArray(o)&&!o.length||e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(tM),t=e?e.manager.tooltips.findIndex((e=>e.create==sM.create)):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:r}=this;if(i.length&&r&&!function(e,t){let n,{left:i,right:r,top:o,bottom:s}=e.getBoundingClientRect();if(n=e.querySelector(".cm-tooltip-arrow")){let e=n.getBoundingClientRect();o=Math.min(e.top,o),s=Math.max(e.bottom,s)}return t.clientX>=i-cM&&t.clientX<=r+cM&&t.clientY>=o-cM&&t.clientY<=s+cM}(r.dom,e)||this.pending){let{pos:r}=i[0]||this.pending,o=null!==(n=null===(t=i[0])||void 0===t?void 0:t.end)&&void 0!==n?n:r;(r==o?this.view.posAtCoords(this.lastMove)==r:function(e,t,n,i,r){let o=e.scrollDOM.getBoundingClientRect(),s=e.documentTop+e.documentPadding.top+e.contentHeight;if(o.left>i||o.rightr||Math.min(o.bottom,s)=t&&a<=n}(this.view,r,o,e.clientX,e.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:t}=this;t&&t.dom.contains(e.relatedTarget)?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const cM=4;function pM(e,t={}){let n=HP.define(),i=wP.define({create:()=>[],update(e,i){if(e.length&&(t.hideOnChange&&(i.docChanged||i.selection)?e=[]:t.hideOn&&(e=e.filter((e=>!t.hideOn(i,e)))),i.docChanged)){let t=[];for(let n of e){let e=i.changes.mapPos(n.pos,-1,tP.TrackDel);if(null!=e){let r=Object.assign(Object.create(null),n);r.pos=e,null!=r.end&&(r.end=i.changes.mapPos(r.end)),t.push(r)}}e=t}for(let t of i.effects)t.is(n)&&(e=t.value),t.is(dM)&&(e=[]);return e},provide:e=>oM.from(e)});return{active:i,extension:[i,MC.define((r=>new lM(r,e,i,n,t.hoverTime||300))),aM]}}function uM(e,t){let n=e.plugin(tM);if(!n)return null;let i=n.manager.tooltips.indexOf(t);return i<0?null:n.manager.tooltipViews[i]}const dM=HP.define();const hM=fP.define({combine(e){let t,n;for(let i of e)t=t||i.topContainer,n=n||i.bottomContainer;return{topContainer:t,bottomContainer:n}}});const fM=MC.fromClass(class{constructor(e){this.input=e.state.facet(yM),this.specs=this.input.filter((e=>e)),this.panels=this.specs.map((t=>t(e)));let t=e.state.facet(hM);this.top=new mM(e,!0,t.topContainer),this.bottom=new mM(e,!1,t.bottomContainer),this.top.sync(this.panels.filter((e=>e.top))),this.bottom.sync(this.panels.filter((e=>!e.top)));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(hM);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new mM(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new mM(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(yM);if(n!=this.input){let t=n.filter((e=>e)),i=[],r=[],o=[],s=[];for(let n of t){let t,a=this.specs.indexOf(n);a<0?(t=n(e.view),s.push(t)):(t=this.panels[a],t.update&&t.update(e)),i.push(t),(t.top?r:o).push(t)}this.specs=t,this.panels=i,this.top.sync(r),this.bottom.sync(o);for(let e of s)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>AA.scrollMargins.of((t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}}))});class mM{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=gM(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=gM(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function gM(e){let t=e.nextSibling;return e.remove(),t}const yM=fP.define({enables:fM});class vM extends rk{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}vM.prototype.elementClass="",vM.prototype.toDOM=void 0,vM.prototype.mapMode=tP.TrackBefore,vM.prototype.startSide=vM.prototype.endSide=-1,vM.prototype.point=!0;const bM=fP.define(),xM=fP.define(),wM=fP.define();const _M=fP.define({combine:e=>e.some((e=>e))});function EM(e){let t=[OM];return e&&!1===e.fixed&&t.push(_M.of(!0)),t}const OM=MC.fromClass(class{constructor(e){this.view=e,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(wM).map((t=>new CM(e,t)));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!e.state.facet(_M),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,i=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(i<.8*(n.to-n.from))}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(_M)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&this.dom.remove();let n=lk.iter(this.view.state.facet(bM),this.view.viewport.from),i=[],r=this.gutters.map((e=>new SM(e,this.view.viewport,-this.view.documentPadding.top)));for(let e of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(e.type)){let t=!0;for(let o of e.type)if(o.type==RS.Text&&t){kM(n,i,o.from);for(let e of r)e.line(this.view,o,i);t=!1}else if(o.widget)for(let e of r)e.widget(this.view,o)}else if(e.type==RS.Text){kM(n,i,e.from);for(let t of r)t.line(this.view,e,i)}else if(e.widget)for(let t of r)t.widget(this.view,e);for(let e of r)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(e){let t=e.startState.facet(wM),n=e.state.facet(wM),i=e.docChanged||e.heightChanged||e.viewportChanged||!lk.eq(e.startState.facet(bM),e.state.facet(bM),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(i=!0);else{i=!0;let r=[];for(let i of n){let n=t.indexOf(i);n<0?r.push(new CM(this.view,i)):(this.gutters[n].update(e),r.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),r.indexOf(e)<0&&e.destroy();for(let e of r)this.dom.appendChild(e.dom);this.gutters=r}return i}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}},{provide:e=>AA.scrollMargins.of((t=>{let n=t.plugin(e);return n&&0!=n.gutters.length&&n.fixed?t.textDirection==WS.LTR?{left:n.dom.offsetWidth*t.scaleX}:{right:n.dom.offsetWidth*t.scaleX}:null}))});function PM(e){return Array.isArray(e)?e:[e]}function kM(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class SM{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=lk.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:i}=this,r=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==i.elements.length){let t=new TM(e,o,r,n);i.elements.push(t),i.dom.appendChild(t.dom)}else i.elements[this.i].update(e,o,r,n);this.height=t.bottom,this.i++}line(e,t,n){let i=[];kM(this.cursor,i,t.from),n.length&&(i=i.concat(n));let r=this.gutter.config.lineMarker(e,t,i);r&&i.unshift(r);let o=this.gutter;(0!=i.length||o.config.renderEmptyElements)&&this.addElement(e,t,i)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),i=n?[n]:null;for(let n of e.state.facet(xM)){let r=n(e,t.widget,t);r&&(i||(i=[])).push(r)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class CM{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,(i=>{let r,o=i.target;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let e=o.getBoundingClientRect();r=(e.top+e.bottom)/2}else r=i.clientY;let s=e.lineBlockAtHeight(r-e.documentTop);t.domEventHandlers[n](e,s,i)&&i.preventDefault()}));this.markers=PM(t.markers(e)),t.initialSpacer&&(this.spacer=new TM(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=PM(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!lk.eq(this.markers,t,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class TM{constructor(e,t,n,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,i)}update(e,t,n,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(e,t){if(e.length!=t.length)return!1;for(let n=0;nik(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let i=n[e],r=t[e];n[e]=i?(e,t,n)=>i(e,t,n)||r(e,t,n):r}return n}})});class RM extends vM{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function NM(e,t){return e.state.facet(DM).formatNumber(t,e.state)}const $M=wM.compute([DM],(e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(AM),lineMarker:(e,t,n)=>n.some((e=>e.toDOM))?null:new RM(NM(e,e.state.doc.lineAt(t.from).number)),widgetMarker:(e,t,n)=>{for(let i of e.state.facet(MM)){let r=i(e,t,n);if(r)return r}return null},lineMarkerChange:e=>e.startState.facet(DM)!=e.state.facet(DM),initialSpacer:e=>new RM(NM(e,IM(e.state.doc.lines))),updateSpacer(e,t){let n=NM(t.view,IM(t.view.state.doc.lines));return n==e.number?e:new RM(n)},domEventHandlers:e.facet(DM).domEventHandlers})));function jM(e={}){return[DM.of(e),EM(),$M]}function IM(e){let t=9;for(;tt.concat(e):void 0})}const zM=new W_;class FM{constructor(e,t,n=[],i=""){this.data=e,this.name=i,nk.prototype.hasOwnProperty("tree")||Object.defineProperty(nk.prototype,"tree",{get(){return UM(this)}}),this.parser=t,this.extension=[eD.of(this),nk.languageData.of(((e,t,n)=>{let i=VM(e,t,n),r=i.type.prop(BM);if(!r)return[];let o=e.facet(r),s=i.type.prop(zM);if(s){let r=i.resolve(t-i.from,n);for(let t of s)if(t.test(r,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(o)}}return o}))].concat(n)}isActiveAt(e,t,n=-1){return VM(e,t,n).type.prop(BM)==this.data}findRegions(e){let t=e.facet(eD);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],i=(e,t)=>{if(e.prop(BM)==this.data)return void n.push({from:t,to:t+e.length});let r=e.prop(W_.mounted);if(r){if(r.tree.prop(BM)==this.data){if(r.overlay)for(let e of r.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(r.overlay){let e=n.length;if(i(r.tree,r.overlay[0].from+t),n.length>e)return}}for(let n=0;ne.isTop?t:void 0))]}),e.name)}configure(e,t){return new HM(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function UM(e){let t=e.field(FM.state,!1);return t?t.tree:eE.empty}class WM{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let GM=null;class QM{constructor(e,t,n=[],i,r,o,s,a){this.parser=e,this.state=t,this.fragments=n,this.tree=i,this.treeLen=r,this.viewport=o,this.skipped=s,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new QM(e,t,[],eE.empty,0,n,[],null)}startParse(){return this.parser.startParse(new WM(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=eE.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext((()=>{for(;!(t=this.parse.advance()););})),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(vE.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=GM;GM=this;try{return e()}finally{GM=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=XM(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:i,treeLen:r,viewport:o,skipped:s}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,n,i,r)=>t.push({fromA:e,toA:n,fromB:i,toB:r}))),n=vE.applyChanges(n,t),i=eE.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){s=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);ne.from&&(this.fragments=XM(this.fragments,n,i),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends bE{createParse(t,n,i){let r=i[0].from,o=i[i.length-1].to;return{parsedPos:r,advance(){let t=GM;if(t){for(let e of i)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=o,new eE(X_.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return GM}}function XM(e,t,n){return vE.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class KM{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new KM(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=QM.create(e.facet(eD).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new KM(n)}}FM.state=wP.define({create:KM.init,update(e,t){for(let e of t.effects)if(e.is(FM.setState))return e.value;return t.startState.facet(eD)!=t.state.facet(eD)?KM.init(t.state):e.apply(t)}});let YM=e=>{let t=setTimeout((()=>e()),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(YM=e=>{let t=-1,n=setTimeout((()=>{t=requestIdleCallback(e,{timeout:400})}),100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const ZM="undefined"!=typeof navigator&&(null===(LM=navigator.scheduling)||void 0===LM?void 0:LM.isInputPending)?()=>navigator.scheduling.isInputPending():null,JM=MC.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(FM.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(FM.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=YM(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndi+1e3,a=r.context.work((()=>ZM&&ZM()||Date.now()>o),i+(s?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:FM.setState.of(new KM(r.context))})),this.chunkBudget>0&&(!a||s)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((()=>this.scheduleWork())).catch((e=>SC(this.view.state,e))).then((()=>this.workScheduled--)),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),eD=fP.define({combine:e=>e.length?e[0]:null,enables:e=>[FM.state,JM,AA.contentAttributes.compute([e],(t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}}))]});class tD{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const nD=fP.define(),iD=fP.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some((e=>e!=t[0])))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function rD(e){let t=e.facet(iD);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function oD(e,t){let n="",i=e.tabSize,r=e.facet(iD)[0];if("\t"==r){for(;t>=i;)n+="\t",t-=i;r=" "}for(let e=0;e=t?function(e,t,n){let i=t.resolveStack(n),r=i.node.enterUnfinishedNodesBefore(n);if(r!=i.node){let e=[];for(let t=r;t!=i.node;t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)i={node:e[t],next:i}}return cD(i,e,n)}(e,n,t):null}class aD{constructor(e,t={}){this.state=e,this.options=t,this.unit=rD(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:r}=this.options;return null!=i&&i>=n.from&&i<=n.to?r&&i==e?{text:"",from:e}:(t<0?i-1&&(r+=o-this.countColumn(n,n.search(/\S|$/))),r}countColumn(e,t=e.length){return xk(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:i}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let e=r(i);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const lD=new W_;function cD(e,t,n){for(let i=e;i;i=i.next){let e=pD(i.node);if(e)return e(dD.create(t,n,i))}return 0}function pD(e){let t=e.type.prop(lD);if(t)return t;let n,i=e.firstChild;if(i&&(n=i.type.prop(W_.closedBy))){let t=e.lastChild,i=t&&n.indexOf(t.name)>-1;return e=>mD(e,!0,1,void 0,i&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?uD:null}function uD(){return 0}class dD extends aD{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new dD(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(hD(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return cD(this.context.next,this.base,this.pos)}}function hD(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function fD({closing:e,align:t=!0,units:n=1}){return i=>mD(i,t,n,e)}function mD(e,t,n,i,r){let o=e.textAfter,s=o.match(/^\s*/)[0].length,a=i&&o.slice(s,s+i.length)==i||r==e.pos+s,l=t?function(e){let t=e.node,n=t.childAfter(t.from),i=t.lastChild;if(!n)return null;let r=e.options.simulateBreak,o=e.state.doc.lineAt(n.from),s=null==r||r<=o.from?o.to:Math.min(o.to,r);for(let e=n.to;;){let r=t.childAfter(e);if(!r||r==i)return null;if(!r.type.isSkipped){if(r.from>=s)return null;let e=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+e}}e=r.to}}(e):null;return l?a?e.column(l.from):e.column(l.to):e.baseIndent+(a?0:e.unit*n)}function gD({except:e,units:t=1}={}){return n=>{let i=e&&e.test(n.textAfter);return n.baseIndent+(i?0:t*n.unit)}}function yD(){return nk.transactionFilter.of((e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:i}=e.newSelection.main,r=n.lineAt(i);if(i>r.from+200)return e;let o=n.sliceString(r.from,i);if(!t.some((e=>e.test(o))))return e;let{state:s}=e,a=-1,l=[];for(let{head:e}of s.selection.ranges){let t=s.doc.lineAt(e);if(t.from==a)continue;a=t.from;let n=sD(s,t.from);if(null==n)continue;let i=/^\s*/.exec(t.text)[0],r=oD(s,n);i!=r&&l.push({from:t.from,to:t.from+i.length,insert:r})}return l.length?[e,{changes:l,sequential:!0}]:e}))}const vD=new W_;function bD(e){let t=e.firstChild,n=e.lastChild;return t&&t.toe.prop(BM)==o.data:o?e=>e==o:void 0,this.style=fO(e.map((e=>({tag:e.tag,class:e.class||i(Object.assign({},e,{tag:null}))}))),{all:r}).style,this.module=n?new Ok(n):null,this.themeType=t.themeType}static define(e,t){return new xD(e,t||{})}}const wD=fP.define(),_D=fP.define({combine:e=>e.length?[e[0]]:null});function ED(e){let t=e.facet(wD);return t.length?t:e.facet(_D)}function OD(e,t){let n,i=[kD];return e instanceof xD&&(e.module&&i.push(AA.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?i.push(_D.of(e)):n?i.push(wD.computeN([AA.darkTheme],(t=>t.facet(AA.darkTheme)==("dark"==n)?[e]:[]))):i.push(wD.of(e)),i}class PD{constructor(e){this.markCache=Object.create(null),this.tree=UM(e.state),this.decorations=this.buildDeco(e,ED(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=UM(e.state),n=ED(e.state),i=n!=ED(e.startState),{viewport:r}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return NS.none;let n=new ck;for(let{from:i,to:r}of e.visibleRanges)mO(this.tree,t,((e,t,i)=>{n.add(e,t,this.markCache[i]||(this.markCache[i]=NS.mark({class:i})))}),i,r);return n.finish()}}const kD=SP.high(MC.fromClass(PD,{decorations:e=>e.decorations})),SD=(DO.meta,DO.link,DO.heading,DO.emphasis,DO.strong,DO.strikethrough,DO.keyword,DO.atom,DO.bool,DO.url,DO.contentSeparator,DO.labelName,DO.literal,DO.inserted,DO.string,DO.deleted,DO.regexp,DO.escape,DO.string,DO.variableName,DO.variableName,DO.typeName,DO.namespace,DO.className,DO.variableName,DO.macroName,DO.propertyName,DO.comment,DO.invalid,AA.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}})),CD="()[]{}",TD=fP.define({combine:e=>ik(e,{afterCursor:!0,brackets:CD,maxScanDistance:1e4,renderMatch:DD})}),AD=NS.mark({class:"cm-matchingBracket"}),MD=NS.mark({class:"cm-nonmatchingBracket"});function DD(e){let t=[],n=e.matched?AD:MD;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}const RD=wP.define({create:()=>NS.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],i=t.state.facet(TD);for(let e of t.state.selection.ranges){if(!e.empty)continue;let r=BD(t.state,e.head,-1,i)||e.head>0&&BD(t.state,e.head-1,1,i)||i.afterCursor&&(BD(t.state,e.head,1,i)||e.headAA.decorations.from(e)}),ND=[RD,SD];function $D(e={}){return[TD.of(e),ND]}const jD=new W_;function ID(e,t,n){let i=e.prop(t<0?W_.openedBy:W_.closedBy);if(i)return i;if(1==e.name.length){let i=n.indexOf(e.name);if(i>-1&&i%2==(t<0?1:0))return[n[i+t]]}return null}function LD(e){let t=e.type.prop(jD);return t?t(e.node):e}function BD(e,t,n,i={}){let r=i.maxScanDistance||1e4,o=i.brackets||CD,s=UM(e),a=s.resolveInner(t,n);for(let i=a;i;i=i.parent){let r=ID(i.type,n,o);if(r&&i.from0?t>=s.from&&ts.from&&t<=s.to))return qD(e,t,n,i,s,r,o)}}return function(e,t,n,i,r,o,s){let a=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=s.indexOf(a);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?t-1:t,to:n>0?t+1:t},p=e.doc.iterRange(t,n>0?e.doc.length:0),u=0;for(let e=0;!p.next().done&&e<=o;){let o=p.value;n<0&&(e+=o.length);let a=t+e*n;for(let e=n>0?0:o.length-1,t=n>0?o.length:-1;e!=t;e+=n){let t=s.indexOf(o[e]);if(!(t<0||i.resolveInner(a+e,1).type!=r))if(t%2==0==n>0)u++;else{if(1==u)return{start:c,end:{from:a+e,to:a+e+1},matched:t>>1==l>>1};u--}}n>0&&(e+=o.length)}return p.done?{start:c,matched:!1}:null}(e,t,n,s,a.type,r,o)}function qD(e,t,n,i,r,o,s){let a=i.parent,l={from:r.from,to:r.to},c=0,p=null==a?void 0:a.cursor();if(p&&(n<0?p.childBefore(i.from):p.childAfter(i.to)))do{if(n<0?p.to<=i.from:p.from>=i.to){if(0==c&&o.indexOf(p.type.name)>-1&&p.from-1||(VD.push(e),console.warn(t))}function GD(e,t){let n=[];for(let i of t.split(" ")){let t=[];for(let n of i.split(".")){let i=e[n]||DO[n];i?"function"==typeof i?t.length?t=t.map(i):WD(n,`Modifier ${n} used at start of tag`):t.length?WD(n,`Tag ${n} used as modifier`):t=Array.isArray(i)?i:[i]:WD(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let i=t.replace(/ /g,"_"),r=i+" "+n.map((e=>e.id)),o=HD[r];if(o)return o.id;let s=HD[r]=X_.define({id:FD.length,name:i,props:[uO({[i]:n})]});return FD.push(s),s.id}WS.RTL,WS.LTR;class QD{constructor(e,t,n,i){this.state=e,this.pos=t,this.explicit=n,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=UM(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),i=t.text.slice(n-t.from,this.pos-t.from),r=i.search(JD(e,!1));return r<0?null:{from:n+r,to:this.pos,text:i.slice(r)}}get aborted(){return null==this.abortListeners}addEventListener(e,t,n){"abort"==e&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function XD(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function KD(e){let t=e.map((e=>"string"==typeof e?{label:e}:e)),[n,i]=t.every((e=>/^\w+$/.test(e.label)))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:i}of e){t[i[0]]=!0;for(let e=1;e{let r=e.matchBefore(i);return r||e.explicit?{from:r?r.from:e.pos,options:t,validFor:n}:null}}class YD{constructor(e,t,n,i){this.completion=e,this.source=t,this.match=n,this.score=i}}function ZD(e){return e.selection.main.from}function JD(e,t){var n;let{source:i}=e,r=t&&"^"!=i[0],o="$"!=i[i.length-1];return r||o?new RegExp(`${r?"^":""}(?:${i})${o?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}const eR=zP.define();const tR=new WeakMap;function nR(e){if(!Array.isArray(e))return e;let t=tR.get(e);return t||tR.set(e,t=KD(e)),t}const iR=HP.define(),rR=HP.define();class oR{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(v=ZO(l))!=v.toLowerCase()?1:v!=v.toUpperCase()?2:0;(!i||1==b&&m||0==y&&0!=b)&&(t[p]==l||n[p]==l&&(u=!0)?o[p++]=i:o.length&&(g=!1)),y=b,i+=JO(l)}return p==a&&0==o[0]&&g?this.result((u?-200:0)-100,o,e):d==a&&0==h?this.ret(-200-e.length+(f==e.length?0:-100),[0,f]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):d==a?this.ret(-900-e.length,[h,f]):p==a?this.result((u?-200:0)-100-700+(g?0:-1100),o,e):2==t.length?null:this.result((i[0]?-700:0)-200-1100,i,e)}result(e,t,n){let i=[],r=0;for(let e of t){let t=e+(this.astral?JO(YO(n,e)):1);r&&i[r-1]==e?i[r-1]=t:(i[r++]=e,i[r++]=t)}return this.ret(e-n.length,i)}}class sR{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.lengthik(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:cR,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>lR(e(n),t(n)),optionClass:(e,t)=>n=>lR(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})});function lR(e,t){return e?t?e+" "+t:e:t}function cR(e,t,n,i,r,o){let s,a,l=e.textDirection==WS.RTL,c=l,p=!1,u="top",d=t.left-r.left,h=r.right-t.right,f=i.right-i.left,m=i.bottom-i.top;if(c&&d=m||e>t.top?s=n.bottom-t.top:(u="bottom",s=t.bottom-n.top)}return{style:`${u}: ${s/((t.bottom-t.top)/o.offsetHeight)}px; max-width: ${a/((t.right-t.left)/o.offsetWidth)}px`,class:"cm-completionInfo-"+(p?l?"left-narrow":"right-narrow":c?"left":"right")}}function pR(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let i=Math.floor((e-t)/n);return{from:e-(i+1)*n,to:e-i*n}}class uR{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:r,selected:o}=i.open,s=e.state.facet(aR);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map((e=>"cm-completionIcon-"+e))),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,n,i){let r=document.createElement("span");r.className="cm-completionLabel";let o=e.displayLabel||e.label,s=0;for(let e=0;es&&r.appendChild(document.createTextNode(o.slice(s,t)));let a=r.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(o.slice(t,n))),a.className="cm-completionMatchedText",s=n}return se.position-t.position)).map((e=>e.render))}(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=pR(r.length,o,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",(n=>{let{options:i}=e.state.field(t).open;for(let t,r=n.target;r&&r!=this.dom;r=r.parentNode)if("LI"==r.nodeName&&(t=/-(\d+)$/.exec(r.id))&&+t[1]{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(aR).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:rR.of(null)})})),this.showOptions(r,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(e){var t;let n=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=i){let{options:r,selected:o,disabled:s}=n.open;i.open&&i.open.options==r||(this.range=pR(r.length,o,e.state.facet(aR).maxRenderedOptions),this.showOptions(r,n.id)),this.updateSel(),s!=(null===(t=i.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=pR(t.options.length,t.selected,this.view.state.facet(aR).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:i}=n;if(!i)return;let r="string"==typeof i?document.createTextNode(i):i(n);if(!r)return;"then"in r?r.then((t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,n)})).catch((e=>SC(this.view.state,e,"completion info"))):this.addInfoPane(r,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:i}=e;n.appendChild(t),this.infoDestroy=i||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,i=this.range.from;n;n=n.nextSibling,i++)"LI"==n.nodeName&&n.id?i==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):i--;return t&&function(e,t){let n=e.getBoundingClientRect(),i=t.getBoundingClientRect(),r=n.height/e.offsetHeight;i.topn.bottom&&(e.scrollTop+=(i.bottom-n.bottom)/r)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),r=this.space;if(!r){let e=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:e.innerWidth,bottom:e.innerHeight}}return i.top>Math.min(r.bottom,t.bottom)-10||i.bottomn.from||0==n.from))if(r=e,"string"!=typeof l&&l.header)i.appendChild(l.header(l));else{i.appendChild(document.createElement("completion-section")).textContent=e}}const c=i.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let p=this.optionClass(s);p&&(c.className=p);for(let e of this.optionContent){let t=e(s,this.view.state,this.view,a);t&&c.appendChild(t)}}return n.from&&i.classList.add("cm-completionListIncompleteTop"),n.tonew uR(n,e,t)}function hR(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class fR{constructor(e,t,n,i,r,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=i,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new fR(this.options,vR(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,i,r,o){if(i&&!o&&e.some((e=>e.isPending)))return i.setDisabled();let s=function(e,t){let n=[],i=null,r=e=>{n.push(e);let{section:t}=e.completion;if(t){i||(i=[]);let e="string"==typeof t?t:t.name;i.some((t=>t.name==e))||i.push("string"==typeof t?{name:e}:t)}},o=t.facet(aR);for(let i of e)if(i.hasResult()){let e=i.result.getMatch;if(!1===i.result.filter)for(let t of i.result.options)r(new YD(t,i.source,e?e(t):[],1e9-n.length));else{let n,s=t.sliceDoc(i.from,i.to),a=o.filterStrict?new sR(s):new oR(s);for(let t of i.result.options)if(n=a.match(t.label)){let o=t.displayLabel?e?e(t,n.matched):[]:n.matched;r(new YD(t,i.source,o,n.score+(t.boost||0)))}}}if(i){let e=Object.create(null),t=0,r=(e,t)=>{var n,i;return(null!==(n=e.rank)&&void 0!==n?n:1e9)-(null!==(i=t.rank)&&void 0!==i?i:1e9)||(e.namet.score-e.score||l(e.completion,t.completion)))){let t=e.completion;!a||a.label!=t.label||a.detail!=t.detail||null!=a.type&&null!=t.type&&a.type!=t.type||a.apply!=t.apply||a.boost!=t.boost?s.push(e):hR(e.completion)>hR(a)&&(s[s.length-1]=e),a=e.completion}return s}(e,t);if(!s.length)return i&&e.some((e=>e.isPending))?i.setDisabled():null;let a=t.facet(aR).selectOnOpen?0:-1;if(i&&i.selected!=a&&-1!=i.selected){let e=i.options[i.selected].completion;for(let t=0;tt.hasResult()?Math.min(e,t.from):e),1e8),create:SR,above:r.aboveCursor},i?i.timestamp:Date.now(),a,!1)}map(e){return new fR(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new fR(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class mR{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new mR(bR,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(aR),i=(n.override||t.languageDataAt("autocomplete",ZD(t)).map(nR)).map((t=>{let i=this.active.find((e=>e.source==t))||new wR(t,this.active.some((e=>0!=e.state))?1:0);return i.update(e,n)}));i.length==this.active.length&&i.every(((e,t)=>e==this.active[t]))&&(i=this.active);let r=this.open,o=e.effects.some((e=>e.is(ER)));r&&e.docChanged&&(r=r.map(e.changes)),e.selection||i.some((t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to)))||!function(e,t){if(e==t)return!0;for(let n=0,i=0;;){for(;ne.isPending))&&(r=null),!r&&i.every((e=>!e.isPending))&&i.some((e=>e.hasResult()))&&(i=i.map((e=>e.hasResult()?new wR(e.source,0):e)));for(let t of e.effects)t.is(OR)&&(r=r&&r.setSelected(t.value,this.id));return i==this.active&&r==this.open?this:new mR(i,this.id,r)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?gR:yR}}const gR={"aria-autocomplete":"list"},yR={};function vR(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const bR=[];function xR(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(eR);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}class wR{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return 1==this.state}update(e,t){let n=xR(e,t),i=this;(8&n||16&n&&this.touches(e))&&(i=new wR(i.source,0)),4&n&&0==i.state&&(i=new wR(this.source,1)),i=i.updateFor(e,n);for(let t of e.effects)if(t.is(iR))i=new wR(i.source,1,t.value);else if(t.is(rR))i=new wR(i.source,0);else if(t.is(ER))for(let e of t.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(ZD(e.state))}}class _R extends wR{constructor(e,t,n,i,r,o){super(e,3,t),this.limit=n,this.result=i,this.from=r,this.to=o}hasResult(){return!0}updateFor(e,t){var n;if(!(3&t))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),s=ZD(e.state);if(s>o||!i||2&t&&(ZD(e.startState)==this.from||se.map((e=>e.map(t)))}),OR=HP.define(),PR=wP.define({create:()=>mR.start(),update:(e,t)=>e.update(t),provide:e=>[rM.from(e,(e=>e.tooltip)),AA.contentAttributes.from(e,(e=>e.attrs))]});function kR(e,t){const n=t.completion.apply||t.completion.label;let i=e.state.field(PR).active.find((e=>e.source==t.source));return i instanceof _R&&("string"==typeof n?e.dispatch(Object.assign(Object.assign({},function(e,t,n,i){let{main:r}=e.selection,o=n-r.from,s=i-r.from;return Object.assign(Object.assign({},e.changeByRange((a=>{if(a!=r&&n!=i&&e.sliceDoc(a.from+o,a.from+s)!=e.sliceDoc(n,i))return{range:a};let l=e.toText(t);return{changes:{from:a.from+o,to:i==r.from?a.to:a.from+s,insert:l},range:uP.cursor(a.from+o+l.length)}}))),{scrollIntoView:!0,userEvent:"input.complete"})}(e.state,n,i.from,i.to)),{annotations:eR.of(t.completion)})):n(e,t.completion,i.from,i.to),!0)}const SR=dR(PR,kR);function CR(e,t="option"){return n=>{let i=n.state.field(PR,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+o*(e?1:-1):e?0:s-1;return a<0?a="page"==t?0:s-1:a>=s&&(a="page"==t?s-1:0),n.dispatch({effects:OR.of(a)}),!0}}const TR=e=>!!e.state.field(PR,!1)&&(e.dispatch({effects:iR.of(!0)}),!0);class AR{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const MR=MC.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(PR).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(PR),n=e.state.facet(aR);if(!e.selectionSet&&!e.docChanged&&e.startState.field(PR)==t)return;let i=e.transactions.some((e=>{let t=xR(e,n);return 8&t||(e.selection||e.docChanged)&&!(3&t)}));for(let t=0;t50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){SC(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some((e=>e.effects.some((e=>e.is(iR)))))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some((e=>e.isPending&&!this.running.some((t=>t.active.source==e.source))))?setTimeout((()=>this.startUpdate()),r):-1,0!=this.composing)for(let t of e.transactions)t.isUserEvent("input.type")?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(PR);for(let e of t.active)e.isPending&&!this.running.some((t=>t.active.source==e.source))&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(aR).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=ZD(t),i=new QD(t,n,e.explicit,this.view),r=new AR(e,i);this.running.push(r),Promise.resolve(e.source(i)).then((e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())}),(e=>{this.view.dispatch({effects:rR.of(null)}),SC(this.view.state,e)}))}scheduleAccept(){this.running.every((e=>void 0!==e.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(aR).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(aR),i=this.view.state.field(PR);for(let r=0;re.source==o.active.source));if(s&&s.isPending)if(null==o.done){let e=new wR(o.active.source,0);for(let t of o.updates)e=e.update(t,n);e.isPending||t.push(e)}else this.startQuery(s)}(t.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:ER.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(PR,!1);if(t&&t.tooltip&&this.view.state.facet(aR).closeOnBlur){let n=t.open&&uM(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:rR.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:iR.of(!1)})),20),this.composing=0}}}),DR="object"==typeof navigator&&/Win/.test(navigator.platform),RR=SP.highest(AA.domEventHandlers({keydown(e,t){let n=t.state.field(PR,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&(!DR||!e.altKey)||e.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find((e=>e.source==i.source)),o=i.completion.commitCharacters||r.result.commitCharacters;return o&&o.indexOf(e.key)>-1&&kR(t,i),!1}})),NR=AA.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class $R{constructor(e,t,n,i){this.field=e,this.line=t,this.from=n,this.to=i}}class jR{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,tP.TrackDel),n=e.mapPos(this.to,1,tP.TrackDel);return null==t||null==n?null:new jR(this.field,t,n)}}class IR{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],i=[t],r=e.doc.lineAt(t),o=/^\s*/.exec(r.text)[0];for(let r of this.lines){if(n.length){let n=o,s=/^\t*/.exec(r)[0].length;for(let t=0;tnew jR(e.field,i[e.line]+e.from,i[e.line]+e.to)));return{text:n,ranges:s}}static parse(e){let t,n=[],i=[],r=[];for(let o of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let e=t[1]?+t[1]:null,s=t[2]||t[3]||"",a=-1,l=s.replace(/\\[{}]/g,(e=>e[1]));for(let t=0;t=a&&e.field++}r.push(new $R(a,i.length,t.index,t.index+l.length)),o=o.slice(0,t.index)+s+o.slice(t.index+t[0].length)}o=o.replace(/\\([{}])/g,((e,t,n)=>{for(let e of r)e.line==i.length&&e.from>n&&(e.from--,e.to--);return t})),i.push(o)}return new IR(i,r)}}let LR=NS.widget({widget:new class extends DS{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),BR=NS.mark({class:"cm-snippetField"});class qR{constructor(e,t){this.ranges=e,this.active=t,this.deco=NS.set(e.map((e=>(e.from==e.to?LR:BR).range(e.from,e.to))))}map(e){let t=[];for(let n of this.ranges){let i=n.map(e);if(!i)return null;t.push(i)}return new qR(t,this.active)}selectionInsideField(e){return e.ranges.every((e=>this.ranges.some((t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))))}}const zR=HP.define({map:(e,t)=>e&&e.map(t)}),FR=HP.define(),VR=wP.define({create:()=>null,update(e,t){for(let n of t.effects){if(n.is(zR))return n.value;if(n.is(FR)&&e)return new qR(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>AA.decorations.from(e,(e=>e?e.deco:NS.none))});function HR(e,t){return uP.create(e.filter((e=>e.field==t)).map((e=>uP.range(e.from,e.to))))}function UR(e){let t=IR.parse(e);return(e,n,i,r)=>{let{text:o,ranges:s}=t.instantiate(e.state,i),a={changes:{from:i,to:r,insert:RO.of(o)},scrollIntoView:!0,annotations:n?[eR.of(n),UP.userEvent.of("input.complete")]:void 0};if(s.length&&(a.selection=HR(s,0)),s.some((e=>e.field>0))){let t=new qR(s,0),n=a.effects=[zR.of(t)];void 0===e.state.field(VR,!1)&&n.push(HP.appendConfig.of([VR,XR,YR,NR]))}e.dispatch(e.state.update(a))}}function WR(e){return({state:t,dispatch:n})=>{let i=t.field(VR,!1);if(!i||e<0&&0==i.active)return!1;let r=i.active+e,o=e>0&&!i.ranges.some((t=>t.field==r+e));return n(t.update({selection:HR(i.ranges,r),effects:zR.of(o?null:new qR(i.ranges,r)),scrollIntoView:!0})),!0}}const GR=[{key:"Tab",run:WR(1),shift:WR(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(VR,!1)&&(t(e.update({effects:zR.of(null)})),!0)}],QR=fP.define({combine:e=>e.length?e[0]:GR}),XR=SP.highest(LA.compute([QR],(e=>e.facet(QR))));function KR(e,t){return Object.assign(Object.assign({},t),{apply:UR(e)})}const YR=AA.domEventHandlers({mousedown(e,t){let n,i=t.state.field(VR,!1);if(!i||null==(n=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let r=i.ranges.find((e=>e.from<=n&&e.to>=n));return!(!r||r.field==i.active)&&(t.dispatch({selection:HR(i.ranges,r.field),effects:zR.of(i.ranges.some((e=>e.field>r.field))?new qR(i.ranges,r.field):null),scrollIntoView:!0}),!0)}});const ZR={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},JR=HP.define({map(e,t){let n=t.mapPos(e,-1,tP.TrackAfter);return null==n?void 0:n}}),eN=new class extends rk{};eN.startSide=1,eN.endSide=-1;const tN=wP.define({create:()=>lk.empty,update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(JR)&&(e=e.update({add:[eN.range(n.value,n.value+1)]}));return e}});function nN(){return[aN,tN]}const iN="()[]{}<>";function rN(e){for(let t=0;t<8;t+=2)if(iN.charCodeAt(t)==e)return iN.charAt(t+1);return ZO(e<128?e:e+1)}function oN(e,t){return e.languageDataAt("closeBrackets",t)[0]||ZR}const sN="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),aN=AA.inputHandler.of(((e,t,n,i)=>{if((sN?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let r=e.state.selection.main;if(i.length>2||2==i.length&&1==JO(YO(i,0))||t!=r.from||n!=r.to)return!1;let o=function(e,t){let n=oN(e,e.selection.main.head),i=n.brackets||ZR.brackets;for(let r of i){let o=rN(YO(r,0));if(t==r)return o==r?dN(e,r,i.indexOf(r+r+r)>-1,n):pN(e,r,o,n.before||ZR.before);if(t==o&&lN(e,e.selection.main.from))return uN(e,r,o)}return null}(e.state,i);return!!o&&(e.dispatch(o),!0)}));function lN(e,t){let n=!1;return e.field(tN).between(0,e.doc.length,(e=>{e==t&&(n=!0)})),n}function cN(e,t){let n=e.sliceString(t,t+2);return n.slice(0,JO(YO(n,0)))}function pN(e,t,n,i){let r=null,o=e.changeByRange((o=>{if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:n,from:o.to}],effects:JR.of(o.to+t.length),range:uP.range(o.anchor+t.length,o.head+t.length)};let s=cN(e.doc,o.head);return!s||/\s/.test(s)||i.indexOf(s)>-1?{changes:{insert:t+n,from:o.head},effects:JR.of(o.head+t.length),range:uP.cursor(o.head+t.length)}:{range:r=o}}));return r?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function uN(e,t,n){let i=null,r=e.changeByRange((t=>t.empty&&cN(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:uP.cursor(t.head+n.length)}:i={range:t}));return i?null:e.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function dN(e,t,n,i){let r=i.stringPrefixes||ZR.stringPrefixes,o=null,s=e.changeByRange((i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:t,from:i.to}],effects:JR.of(i.to+t.length),range:uP.range(i.anchor+t.length,i.head+t.length)};let s,a=i.head,l=cN(e.doc,a);if(l==t){if(hN(e,a))return{changes:{insert:t+t,from:a},effects:JR.of(a+t.length),range:uP.cursor(a+t.length)};if(lN(e,a)){let i=n&&e.sliceDoc(a,a+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:a,to:a+i.length,insert:i},range:uP.cursor(a+i.length)}}}else{if(n&&e.sliceDoc(a-2*t.length,a)==t+t&&(s=fN(e,a-2*t.length,r))>-1&&hN(e,s))return{changes:{insert:t+t+t+t,from:a},effects:JR.of(a+t.length),range:uP.cursor(a+t.length)};if(e.charCategorizer(a)(l)!=ZP.Word&&fN(e,a,r)>-1&&!function(e,t,n,i){let r=UM(e).resolveInner(t,-1),o=i.reduce(((e,t)=>Math.max(e,t.length)),0);for(let s=0;s<5;s++){let s=e.sliceDoc(r.from,Math.min(r.to,r.from+n.length+o)),a=s.indexOf(n);if(!a||a>-1&&i.indexOf(s.slice(0,a))>-1){let t=r.firstChild;for(;t&&t.from==r.from&&t.to-t.from>n.length+a;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let l=r.to==t&&r.parent;if(!l)break;r=l}return!1}(e,a,t,r))return{changes:{insert:t+t,from:a},effects:JR.of(a+t.length),range:uP.cursor(a+t.length)}}return{range:o=i}}));return o?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function hN(e,t){let n=UM(e).resolveInner(t+1);return n.parent&&n.from==t}function fN(e,t,n){let i=e.charCategorizer(t);if(i(e.sliceDoc(t-1,t))!=ZP.Word)return t;for(let r of n){let n=t-r.length;if(e.sliceDoc(n,t)==r&&i(e.sliceDoc(n-1,n))!=ZP.Word)return n}return-1}function mN(e={}){return[RR,PR,aR.of(e),MR,yN,NR]}const gN=[{key:"Ctrl-Space",run:TR},{mac:"Alt-`",run:TR},{key:"Escape",run:e=>{let t=e.state.field(PR,!1);return!(!t||!t.active.some((e=>0!=e.state)))&&(e.dispatch({effects:rR.of(null)}),!0)}},{key:"ArrowDown",run:CR(!0)},{key:"ArrowUp",run:CR(!1)},{key:"PageDown",run:CR(!0,"page")},{key:"PageUp",run:CR(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(PR,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestampe.facet(aR).defaultKeymap?[gN]:[])));function vN(e,t){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=e(t,n);return!!r&&(i(n.update(r)),!0)}}const bN=vN(PN,0),xN=vN(ON,0),wN=vN(((e,t)=>ON(e,t,function(e){let t=[];for(let n of e.selection.ranges){let i=e.doc.lineAt(n.from),r=n.to<=i.to?i:e.doc.lineAt(n.to);r.from>i.from&&r.from==n.to&&(r=n.to==i.to+1?i:e.doc.lineAt(n.to-1));let o=t.length-1;o>=0&&t[o].to>i.from?t[o].to=r.to:t.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return t}(t))),0);function _N(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}const EN=50;function ON(e,t,n=t.selection.ranges){let i=n.map((e=>_N(t,e.from).block));if(!i.every((e=>e)))return null;let r=n.map(((e,n)=>function(e,{open:t,close:n},i,r){let o,s,a=e.sliceDoc(i-EN,i),l=e.sliceDoc(r,r+EN),c=/\s*$/.exec(a)[0].length,p=/^\s*/.exec(l)[0].length,u=a.length-c;if(a.slice(u-t.length,u)==t&&l.slice(p,p+n.length)==n)return{open:{pos:i-c,margin:c&&1},close:{pos:r+p,margin:p&&1}};r-i<=2*EN?o=s=e.sliceDoc(i,r):(o=e.sliceDoc(i,i+EN),s=e.sliceDoc(r-EN,r));let d=/^\s*/.exec(o)[0].length,h=/\s*$/.exec(s)[0].length,f=s.length-h-n.length;return o.slice(d,d+t.length)==t&&s.slice(f,f+n.length)==n?{open:{pos:i+d+t.length,margin:/\s/.test(o.charAt(d+t.length))?1:0},close:{pos:r-h-n.length,margin:/\s/.test(s.charAt(f-1))?1:0}}:null}(t,i[n],e.from,e.to)));if(2!=e&&!r.every((e=>e)))return{changes:t.changes(n.map(((e,t)=>r[t]?[]:[{from:e.from,insert:i[t].open+" "},{from:e.to,insert:" "+i[t].close}])))};if(1!=e&&r.some((e=>e))){let e=[];for(let t,n=0;nr&&(e==o||o>l.from)){r=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,n=l.text.slice(e,e+a.length)==a?e:-1;ee.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:n,indent:r,empty:o,single:s}of i)!s&&o||e.push({from:t.from+r,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&i.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:n,token:r}of i)if(n>=0){let i=t.from+n,o=i+r.length;" "==t.text[o-t.from]&&o++,e.push({from:i,to:o})}return{changes:e}}return null}const kN=zP.define(),SN=fP.define();class CN{constructor(e,t,n,i,r){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=i,this.selectionsAfter=r}setSelAfter(e){return new CN(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((e=>e.toJSON()))}}static fromJSON(e){return new CN(e.changes&&iP.fromJSON(e.changes),[],e.mapped&&nP.fromJSON(e.mapped),e.startSelection&&uP.fromJSON(e.startSelection),e.selectionsAfter.map(uP.fromJSON))}static fromTransaction(e,t){let n=MN;for(let t of e.startState.facet(SN)){let i=t(e);i.length&&(n=n.concat(i))}return!n.length&&e.changes.empty?null:new CN(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,MN)}static selection(e){return new CN(void 0,MN,void 0,void 0,e)}}function TN(e,t,n,i){let r=t+1>n+20?t-n-1:0,o=e.slice(r,t);return o.push(i),o}function AN(e,t){return e.length?t.length?e.concat(t):e:t}const MN=[],DN=200;function RN(e,t){if(e.length){let n=e[e.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-DN));return i.length&&i[i.length-1].eq(t)?e:(i.push(t),TN(e,e.length-1,1e9,n.setSelAfter(i)))}return[CN.selection([t])]}function NN(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function $N(e,t){if(!e.length)return e;let n=e.length,i=MN;for(;n;){let r=jN(e[n-1],t,i);if(r.changes&&!r.changes.empty||r.effects.length){let t=e.slice(0,n);return t[n-1]=r,t}t=r.mapped,n--,i=r.selectionsAfter}return i.length?[CN.selection(i)]:MN}function jN(e,t,n){let i=AN(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):MN,n);if(!e.changes)return CN.selection(i);let r=e.changes.map(t),o=t.mapDesc(e.changes,!0),s=e.mapped?e.mapped.composeDesc(o):o;return new CN(r,HP.mapEffects(e.effects,t),s,e.startSelection.map(o),i)}const IN=/^(input\.type|delete)($|\.)/;class LN{constructor(e,t,n=0,i=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=i}isolate(){return this.prevTime?new LN(this.done,this.undone):this}addChanges(e,t,n,i,r){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&e.changes&&(!n||IN.test(n))&&(!s.selectionsAfter.length&&t-this.prevTimen.push(e,t))),t.iterChangedRanges(((e,t,r,o)=>{for(let e=0;e=t&&r<=s&&(i=!0)}})),i}(s.changes,e.changes))||"input.type.compose"==n)?TN(o,o.length-1,i.minDepth,new CN(e.changes.compose(s.changes),AN(HP.mapEffects(e.effects,s.changes),s.effects),s.mapped,s.startSelection,MN)):TN(o,o.length,i.minDepth,e),new LN(o,MN,t,n)}addSelection(e,t,n,i){let r=this.done.length?this.done[this.done.length-1].selectionsAfter:MN;return r.length>0&&t-this.prevTimee.empty!=t.ranges[n].empty)).length}(r[r.length-1],e)?this:new LN(RN(this.done,e),this.undone,t,n)}addMapping(e){return new LN($N(this.done,e),$N(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let i=0==e?this.done:this.undone;if(0==i.length)return null;let r=i[i.length-1],o=r.selectionsAfter[0]||t.selection;if(n&&r.selectionsAfter.length)return t.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:kN.of({side:e,rest:NN(i),selection:o}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(r.changes){let n=1==i.length?MN:i.slice(0,i.length-1);return r.mapped&&(n=$N(n,r.mapped)),t.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:kN.of({side:e,rest:n,selection:o}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}LN.empty=new LN(MN,MN);function BN(e,t){return uP.create(e.ranges.map(t),e.mainIndex)}function qN(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function zN({state:e,dispatch:t},n){let i=BN(e.selection,n);return!i.eq(e.selection,!0)&&(t(qN(e,i)),!0)}function FN(e,t){return uP.cursor(t?e.to:e.from)}function VN(e,t){return zN(e,(n=>n.empty?e.moveByChar(n,t):FN(n,t)))}function HN(e){return e.textDirectionAt(e.state.selection.main.head)==WS.LTR}const UN=e=>VN(e,!HN(e)),WN=e=>VN(e,HN(e));function GN(e,t){return zN(e,(n=>n.empty?e.moveByGroup(n,t):FN(n,t)))}"undefined"!=typeof Intl&&Intl.Segmenter;function QN(e,t,n){if(t.type.prop(n))return!0;let i=t.to-t.from;return i&&(i>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function XN(e,t,n){let i,r,o=UM(e).resolveInner(t.head),s=n?W_.closedBy:W_.openedBy;for(let i=t.head;;){let t=n?o.childAfter(i):o.childBefore(i);if(!t)break;QN(e,t,s)?o=t:i=n?t.to:t.from}return r=o.type.prop(s)&&(i=n?BD(e,o.from,1):BD(e,o.to,-1))&&i.matched?n?i.end.to:i.end.from:n?o.to:o.from,uP.cursor(r,n?-1:1)}function KN(e,t){return zN(e,(n=>{if(!n.empty)return FN(n,t);let i=e.moveVertically(n,t);return i.head!=n.head?i:e.moveToLineBoundary(n,t)}))}const YN=e=>KN(e,!1),ZN=e=>KN(e,!0);function JN(e){let t,n=e.scrollDOM.clientHeightn.empty?e.moveVertically(n,t,i.height):FN(n,t)));if(o.eq(r.selection))return!1;if(i.selfScroll){let t=e.coordsAtPos(r.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),a=s.top+i.marginTop,l=s.bottom-i.marginBottom;t&&t.top>a&&t.bottome$(e,!1),n$=e=>e$(e,!0);function i$(e,t,n){let i=e.lineBlockAt(t.head),r=e.moveToLineBoundary(t,n);if(r.head==t.head&&r.head!=(n?i.to:i.from)&&(r=e.moveToLineBoundary(t,n,!1)),!n&&r.head==i.from&&i.length){let n=/^\s*/.exec(e.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;n&&t.head!=i.from+n&&(r=uP.cursor(i.from+n))}return r}function r$(e,t,n){let i=!1,r=BN(e.selection,(t=>{let r=BD(e,t.head,-1)||BD(e,t.head,1)||t.head>0&&BD(e,t.head-1,1)||t.head{let n=t(e);return uP.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(e.state.selection)&&(e.dispatch(qN(e.state,n)),!0)}function s$(e,t){return o$(e,(n=>e.moveByChar(n,t)))}const a$=e=>s$(e,!HN(e)),l$=e=>s$(e,HN(e));function c$(e,t){return o$(e,(n=>e.moveByGroup(n,t)))}function p$(e,t){return o$(e,(n=>e.moveVertically(n,t)))}const u$=e=>p$(e,!1),d$=e=>p$(e,!0);function h$(e,t){return o$(e,(n=>e.moveVertically(n,t,JN(e).height)))}const f$=e=>h$(e,!1),m$=e=>h$(e,!0),g$=({state:e,dispatch:t})=>(t(qN(e,{anchor:0})),!0),y$=({state:e,dispatch:t})=>(t(qN(e,{anchor:e.doc.length})),!0),v$=({state:e,dispatch:t})=>(t(qN(e,{anchor:e.selection.main.anchor,head:0})),!0),b$=({state:e,dispatch:t})=>(t(qN(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function x$(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:i}=e,r=i.changeByRange((i=>{let{from:r,to:o}=i;if(r==o){let s=t(i);sr&&(n="delete.forward",s=w$(e,s,!0)),r=Math.min(r,s),o=Math.max(o,s)}else r=w$(e,r,!1),o=w$(e,o,!0);return r==o?{range:i}:{changes:{from:r,to:o},range:uP.cursor(r,rt(e))))i.between(t,t,((e,i)=>{et&&(t=n?i:e)}));return t}const _$=(e,t,n)=>x$(e,(i=>{let r,o,s=i.from,{state:a}=e,l=a.doc.lineAt(s);if(n&&!t&&s>l.from&&s_$(e,!1,!0),O$=e=>_$(e,!0,!1),P$=(e,t)=>x$(e,(n=>{let i=n.head,{state:r}=e,o=r.doc.lineAt(i),s=r.charCategorizer(i);for(let e=null;;){if(i==(t?o.to:o.from)){i==n.head&&o.number!=(t?r.doc.lines:1)&&(i+=t?1:-1);break}let a=WO(o.text,i-o.from,t)+o.from,l=o.text.slice(Math.min(i,a)-o.from,Math.max(i,a)-o.from),c=s(l);if(null!=e&&c!=e)break;" "==l&&i==n.head||(e=c),i=a}return i})),k$=e=>P$(e,!1);function S$(e){let t=[],n=-1;for(let i of e.selection.ranges){let r=e.doc.lineAt(i.from),o=e.doc.lineAt(i.to);if(i.empty||i.to!=o.from||(o=e.doc.lineAt(i.to-1)),n>=r.number){let e=t[t.length-1];e.to=o.to,e.ranges.push(i)}else t.push({from:r.from,to:o.to,ranges:[i]});n=o.number+1}return t}function C$(e,t,n){if(e.readOnly)return!1;let i=[],r=[];for(let t of S$(e)){if(n?t.to==e.doc.length:0==t.from)continue;let o=e.doc.lineAt(n?t.to+1:t.from-1),s=o.length+1;if(n){i.push({from:t.to,to:o.to},{from:t.from,insert:o.text+e.lineBreak});for(let n of t.ranges)r.push(uP.range(Math.min(e.doc.length,n.anchor+s),Math.min(e.doc.length,n.head+s)))}else{i.push({from:o.from,to:t.from},{from:t.to,insert:e.lineBreak+o.text});for(let e of t.ranges)r.push(uP.range(e.anchor-s,e.head-s))}}return!!i.length&&(t(e.update({changes:i,scrollIntoView:!0,selection:uP.create(r,e.selection.mainIndex),userEvent:"move.line"})),!0)}function T$(e,t,n){if(e.readOnly)return!1;let i=[];for(let t of S$(e))n?i.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):i.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const A$=D$(!1),M$=D$(!0);function D$(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let i=t.changeByRange((n=>{let{from:i,to:r}=n,o=t.doc.lineAt(i),s=!e&&i==r&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,i=UM(e).resolveInner(t),r=i.childBefore(t),o=i.childAfter(t);return r&&o&&r.to<=t&&o.from>=t&&(n=r.type.prop(W_.closedBy))&&n.indexOf(o.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(o.from).from&&!/\S/.test(e.sliceDoc(r.to,o.from))?{from:r.to,to:o.from}:null}(t,i);e&&(i=r=(r<=o.to?o:t.doc.lineAt(r)).to);let a=new aD(t,{simulateBreak:i,simulateDoubleBreak:!!s}),l=sD(a,i);for(null==l&&(l=xk(/^\s*/.exec(t.doc.lineAt(i).text)[0],t.tabSize));ro.from&&i{let r=[];for(let o=i.from;o<=i.to;){let s=e.doc.lineAt(o);s.number>n&&(i.empty||i.to>s.from)&&(t(s,r,i),n=s.number),o=s.to+1}let o=e.changes(r);return{changes:r,range:uP.range(o.mapPos(i.anchor,1),o.mapPos(i.head,1))}}))}const N$=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(R$(e,((t,n)=>{n.push({from:t.from,insert:e.facet(iD)})})),{userEvent:"input.indent"})),!0),$$=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(R$(e,((t,n)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let r=xk(i,e.tabSize),o=0,s=oD(e,Math.max(0,r-rD(e)));for(;ozN(e,(t=>uP.cursor(e.lineBlockAt(t.head).from,1))),shift:e=>o$(e,(t=>uP.cursor(e.lineBlockAt(t.head).from)))},{key:"Ctrl-e",run:e=>zN(e,(t=>uP.cursor(e.lineBlockAt(t.head).to,-1))),shift:e=>o$(e,(t=>uP.cursor(e.lineBlockAt(t.head).to)))},{key:"Ctrl-d",run:O$},{key:"Ctrl-h",run:E$},{key:"Ctrl-k",run:e=>x$(e,(t=>{let n=e.lineBlockAt(t.head).to;return t.head{if(e.readOnly)return!1;let n=e.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:RO.of(["",""])},range:uP.cursor(e.from)})));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange((t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,i=e.doc.lineAt(n),r=n==i.from?n-1:WO(i.text,n-i.from,!1)+i.from,o=n==i.to?n+1:WO(i.text,n-i.from,!0)+i.from;return{changes:{from:r,to:o,insert:e.doc.slice(n,o).append(e.doc.slice(r,n))},range:uP.cursor(o)}}));return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:n$}],I$=[{key:"ArrowLeft",run:UN,shift:a$,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>GN(e,!HN(e)),shift:e=>c$(e,!HN(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>zN(e,(t=>i$(e,t,!HN(e)))),shift:e=>o$(e,(t=>i$(e,t,!HN(e)))),preventDefault:!0},{key:"ArrowRight",run:WN,shift:l$,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>GN(e,HN(e)),shift:e=>c$(e,HN(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>zN(e,(t=>i$(e,t,HN(e)))),shift:e=>o$(e,(t=>i$(e,t,HN(e)))),preventDefault:!0},{key:"ArrowUp",run:YN,shift:u$,preventDefault:!0},{mac:"Cmd-ArrowUp",run:g$,shift:v$},{mac:"Ctrl-ArrowUp",run:t$,shift:f$},{key:"ArrowDown",run:ZN,shift:d$,preventDefault:!0},{mac:"Cmd-ArrowDown",run:y$,shift:b$},{mac:"Ctrl-ArrowDown",run:n$,shift:m$},{key:"PageUp",run:t$,shift:f$},{key:"PageDown",run:n$,shift:m$},{key:"Home",run:e=>zN(e,(t=>i$(e,t,!1))),shift:e=>o$(e,(t=>i$(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:g$,shift:v$},{key:"End",run:e=>zN(e,(t=>i$(e,t,!0))),shift:e=>o$(e,(t=>i$(e,t,!0))),preventDefault:!0},{key:"Mod-End",run:y$,shift:b$},{key:"Enter",run:A$,shift:A$},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:E$,shift:E$},{key:"Delete",run:O$},{key:"Mod-Backspace",mac:"Alt-Backspace",run:k$},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>P$(e,!0)},{mac:"Mod-Backspace",run:e=>x$(e,(t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}))},{mac:"Mod-Delete",run:e=>x$(e,(t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head({mac:e.key,run:e.run,shift:e.shift})))),L$=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>zN(e,(t=>XN(e.state,t,!HN(e)))),shift:e=>o$(e,(t=>XN(e.state,t,!HN(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>zN(e,(t=>XN(e.state,t,HN(e)))),shift:e=>o$(e,(t=>XN(e.state,t,HN(e))))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>C$(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>T$(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>C$(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>T$(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,i=null;return n.ranges.length>1?i=uP.create([n.main]):n.main.empty||(i=uP.create([uP.cursor(n.main.head)])),!!i&&(t(qN(e,i)),!0)}},{key:"Mod-Enter",run:M$},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=S$(e).map((({from:t,to:n})=>uP.range(t,Math.min(n+1,e.doc.length))));return t(e.update({selection:uP.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=BN(e.selection,(t=>{let n=UM(e),i=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=i.node.from&&e.node.to<=i.node.to&&(i=e)}for(let e=i;e;e=e.next){let{node:n}=e;if((n.from=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return uP.range(n.to,n.from)}return t}));return!n.eq(e.selection)&&(t(qN(e,n)),!0)},preventDefault:!0},{key:"Mod-[",run:$$},{key:"Mod-]",run:N$},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),i=new aD(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),r=R$(e,((t,r,o)=>{let s=sD(i,t.from);if(null==s)return;/\S/.test(t.text)||(s=0);let a=/^\s*/.exec(t.text)[0],l=oD(e,s);(a!=l||o.from{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(S$(t).map((({from:e,to:n})=>(e>0?e--:n{let n;if(e.lineWrapping){let i=e.lineBlockAt(t.head),r=e.coordsAtPos(t.head,t.assoc||1);r&&(n=i.bottom+e.documentTop-r.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)})).map(n);return e.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>r$(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),i=_N(e.state,n.from);return i.line?bN(e):!!i.block&&wN(e)}},{key:"Alt-A",run:xN},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat(I$);function B$(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];"string"==typeof r?e.setAttribute(i,r):null!=r&&(e[i]=r)}t++}for(;te.from==e.to||e.from==e.to-1&&n.doc.lineAt(e.from).to==e.from?NS.widget({widget:new oj(e),diagnostic:e}).range(e.from):NS.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity+(e.markClass?" "+e.markClass:"")},diagnostic:e}).range(e.from,e.to))),!0);return new F$(o,t,V$(o))}}function V$(e,t=null,n=0){let i=null;return e.between(n,1e9,((e,n,{spec:r})=>{if(!t||r.diagnostic==t)return i=new z$(e,n,r.diagnostic),!1})),i}function H$(e,t){let n=t.pos,i=t.end||n,r=e.state.facet(tj).hideOn(e,n,i);if(null!=r)return r;let o=e.startState.doc.lineAt(t.pos);return!(!e.effects.some((e=>e.is(W$)))&&!e.changes.touchesRange(o.from,Math.max(o.to,i)))}function U$(e,t){return e.field(X$,!1)?t:t.concat(HP.appendConfig.of(uj))}const W$=HP.define(),G$=HP.define(),Q$=HP.define(),X$=wP.define({create:()=>new F$(NS.none,null,null),update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),i=null,r=e.panel;if(e.selected){let r=t.changes.mapPos(e.selected.from,1);i=V$(n,e.selected.diagnostic,r)||V$(n,null,r)}!n.size&&r&&t.state.facet(tj).autoPanel&&(r=null),e=new F$(n,r,i)}for(let n of t.effects)if(n.is(W$)){let i=t.state.facet(tj).autoPanel?n.value.length?aj.open:null:e.panel;e=F$.init(n.value,i,t.state)}else n.is(G$)?e=new F$(e.diagnostics,n.value?aj.open:null,e.selected):n.is(Q$)&&(e=new F$(e.diagnostics,e.panel,n.value));return e},provide:e=>[yM.from(e,(e=>e.panel)),AA.decorations.from(e,(e=>e.diagnostics))]});const K$=NS.mark({class:"cm-lintRange cm-lintRange-active"});function Y$(e,t,n){let{diagnostics:i}=e.state.field(X$),r=[],o=2e8,s=0;i.between(t-(n<0?1:0),t+(n>0?1:0),((e,i,{spec:a})=>{t>=e&&t<=i&&(e==i||(t>e||n>0)&&(t({dom:Z$(e,r)})}:null}function Z$(e,t){return B$("ul",{class:"cm-tooltip-lint"},t.map((t=>rj(e,t,!1))))}const J$=e=>{let t=e.state.field(X$,!1);return!(!t||!t.panel)&&(e.dispatch({effects:G$.of(!1)}),!0)},ej=MC.fromClass(class{constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet(tj);this.lintTime=Date.now()+t,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,t)}run(){clearTimeout(this.timeout);let e=Date.now();if(e{i.push(n),clearTimeout(r),i.length==e.length?t(i):setTimeout((()=>t(i)),200)}),n)}(t.map((e=>Promise.resolve(e(this.view)))),(t=>{this.view.state.doc==e.doc&&this.view.dispatch(function(e,t){return{effects:U$(e,[W$.of(t)])}}(this.view.state,t.reduce(((e,t)=>e.concat(t)))))}),(e=>{SC(this.view.state,e)}))}}update(e){let t=e.state.facet(tj);(e.docChanged||t!=e.startState.facet(tj)||t.needsRefresh&&t.needsRefresh(e))&&(this.lintTime=Date.now()+t.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,t.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});const tj=fP.define({combine:e=>Object.assign({sources:e.map((e=>e.source)).filter((e=>null!=e))},ik(e.map((e=>e.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))});function nj(e,t={}){return[tj.of({source:e,config:t}),ej,uj]}function ij(e){let t=[];if(e)e:for(let{name:n}of e){for(let e=0;ee.toLowerCase()==i.toLowerCase()))){t.push(i);continue e}}t.push("")}return t}function rj(e,t,n){var i;let r=n?ij(t.actions):[];return B$("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},B$("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),null===(i=t.actions)||void 0===i?void 0:i.map(((n,i)=>{let o=!1,s=i=>{if(i.preventDefault(),o)return;o=!0;let r=V$(e.state.field(X$).diagnostics,t);r&&n.apply(e,r.from,r.to)},{name:a}=n,l=r[i]?a.indexOf(r[i]):-1,c=l<0?a:[a.slice(0,l),B$("u",a.slice(l,l+1)),a.slice(l+1)];return B$("button",{type:"button",class:"cm-diagnosticAction",onclick:s,onmousedown:s,"aria-label":` Action: ${a}${l<0?"":` (access key "${r[i]})"`}.`},c)})),t.source&&B$("div",{class:"cm-diagnosticSource"},t.source))}class oj extends DS{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return B$("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class sj{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=rj(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class aj{constructor(e){this.view=e,this.items=[];this.list=B$("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)J$(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:n}=this.items[this.selectedIndex],i=ij(n.actions);for(let r=0;r{for(let t=0;tJ$(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(X$).selected;if(!e)return-1;for(let t=0;t{let a,l=-1;for(let e=n;en&&(this.items.splice(n,l-n),i=!0)),t&&a.diagnostic==t.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),r=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),n++}));n({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.topt.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=V$(this.view.state.field(X$).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:Q$.of(t)})}static open(e){return new aj(e)}}function lj(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(e)}')`}function cj(e){return lj(``,'width="6" height="3"')}const pj=AA.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:cj("#d11")},".cm-lintRange-warning":{backgroundImage:cj("orange")},".cm-lintRange-info":{backgroundImage:cj("#999")},".cm-lintRange-hint":{backgroundImage:cj("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});const uj=[X$,AA.decorations.compute([X$],(e=>{let{selected:t,panel:n}=e.field(X$);return t&&n&&t.from!=t.to?NS.set([K$.range(t.from,t.to)]):NS.none})),pM(Y$,{hideOn:H$}),pj];class dj{static create(e,t,n,i,r){return new dj(e,t,n,i+(i<<8)+e+(t<<4)|0,r,[],[])}constructor(e,t,n,i,r,o,s){this.type=e,this.value=t,this.from=n,this.hash=i,this.end=r,this.children=o,this.positions=s,this.hashProp=[[W_.contextHash,i]]}addChild(e,t){e.prop(W_.contextHash)!=this.hash&&(e=new eE(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new eE(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,n)=>new eE(X_.none,e,t,n,this.hashProp)})}}var hj;!function(e){e[e.Document=1]="Document",e[e.CodeBlock=2]="CodeBlock",e[e.FencedCode=3]="FencedCode",e[e.Blockquote=4]="Blockquote",e[e.HorizontalRule=5]="HorizontalRule",e[e.BulletList=6]="BulletList",e[e.OrderedList=7]="OrderedList",e[e.ListItem=8]="ListItem",e[e.ATXHeading1=9]="ATXHeading1",e[e.ATXHeading2=10]="ATXHeading2",e[e.ATXHeading3=11]="ATXHeading3",e[e.ATXHeading4=12]="ATXHeading4",e[e.ATXHeading5=13]="ATXHeading5",e[e.ATXHeading6=14]="ATXHeading6",e[e.SetextHeading1=15]="SetextHeading1",e[e.SetextHeading2=16]="SetextHeading2",e[e.HTMLBlock=17]="HTMLBlock",e[e.LinkReference=18]="LinkReference",e[e.Paragraph=19]="Paragraph",e[e.CommentBlock=20]="CommentBlock",e[e.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",e[e.Escape=22]="Escape",e[e.Entity=23]="Entity",e[e.HardBreak=24]="HardBreak",e[e.Emphasis=25]="Emphasis",e[e.StrongEmphasis=26]="StrongEmphasis",e[e.Link=27]="Link",e[e.Image=28]="Image",e[e.InlineCode=29]="InlineCode",e[e.HTMLTag=30]="HTMLTag",e[e.Comment=31]="Comment",e[e.ProcessingInstruction=32]="ProcessingInstruction",e[e.Autolink=33]="Autolink",e[e.HeaderMark=34]="HeaderMark",e[e.QuoteMark=35]="QuoteMark",e[e.ListMark=36]="ListMark",e[e.LinkMark=37]="LinkMark",e[e.EmphasisMark=38]="EmphasisMark",e[e.CodeMark=39]="CodeMark",e[e.CodeText=40]="CodeText",e[e.CodeInfo=41]="CodeInfo",e[e.LinkTitle=42]="LinkTitle",e[e.LinkLabel=43]="LinkLabel",e[e.URL=44]="URL"}(hj||(hj={}));class fj{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class mj{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return bj(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let i=t;i=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let i=(e.type==hj.OrderedList?kj:Pj)(n,t,!1);return i>0&&(e.type!=hj.BulletList||Ej(n,t,!1)<0)&&n.text.charCodeAt(n.pos+i-1)==e.value}const yj={[hj.Blockquote]:(e,t,n)=>62==n.next&&(n.markers.push(eI(hj.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(vj(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0),[hj.ListItem]:(e,t,n)=>!(n.indent-1)&&(n.moveBaseColumn(n.baseIndent+e.value),!0),[hj.OrderedList]:gj,[hj.BulletList]:gj,[hj.Document]:()=>!0};function vj(e){return 32==e||9==e||10==e||13==e}function bj(e,t=0){for(;tn&&vj(e.charCodeAt(t-1));)t--;return t}function wj(e){if(96!=e.next&&126!=e.next)return-1;let t=e.pos+1;for(;t-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(qj.SetextHeading)>-1||i<3?-1:1}function Oj(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function Pj(e,t,n){return 45!=e.next&&43!=e.next&&42!=e.next||e.pos!=e.text.length-1&&!vj(e.text.charCodeAt(e.pos+1))||!(!n||Oj(t,hj.BulletList)||e.skipSpace(e.pos+2)=48&&r<=57;){if(i++,i==e.text.length)return-1;r=e.text.charCodeAt(i)}return i==e.pos||i>e.pos+9||46!=r&&41!=r||ie.pos+1||49!=e.next)?-1:i+1-e.pos}function Sj(e){if(35!=e.next)return-1;let t=e.pos+1;for(;t6?-1:n}function Cj(e){if(45!=e.next&&61!=e.next||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t/,Mj=/\?>/,Dj=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*/i.exec(i);if(o)return e.append(eI(hj.Comment,n,n+1+o[0].length));let s=/^\?[^]*?\?>/.exec(i);if(s)return e.append(eI(hj.ProcessingInstruction,n,n+1+s[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(i);return a?e.append(eI(hj.HTMLTag,n,n+1+a[0].length)):-1},Emphasis(e,t,n){if(95!=t&&42!=t)return-1;let i=n+1;for(;e.char(i)==t;)i++;let r=e.slice(n-1,n),o=e.slice(i,i+1),s=aI.test(r),a=aI.test(o),l=/\s|^$/.test(r),c=/\s|^$/.test(o),p=!c&&(!a||l||s),u=!l&&(!s||c||a),d=p&&(42==t||!u||s),h=u&&(42==t||!p||a);return e.append(new oI(95==t?tI:nI,n,i,(d?1:0)|(h?2:0)))},HardBreak(e,t,n){if(92==t&&10==e.char(n+1))return e.append(eI(hj.HardBreak,n,n+2));if(32==t){let t=n+1;for(;32==e.char(t);)t++;if(10==e.char(t)&&t>=n+2)return e.append(eI(hj.HardBreak,n,t+1))}return-1},Link:(e,t,n)=>91==t?e.append(new oI(iI,n,n+1,1)):-1,Image:(e,t,n)=>33==t&&91==e.char(n+1)?e.append(new oI(rI,n,n+2,1)):-1,LinkEnd(e,t,n){if(93!=t)return-1;for(let t=e.parts.length-1;t>=0;t--){let i=e.parts[t];if(i instanceof oI&&(i.type==iI||i.type==rI)){if(!i.side||e.skipSpace(i.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[t]=null,-1;let r=e.takeContent(t),o=e.parts[t]=cI(e,r,i.type==iI?hj.Link:hj.Image,i.from,n+1);if(i.type==iI)for(let n=0;nt?eI(hj.URL,t+n,r+n):r==e.length&&null}}function uI(e,t,n){let i=e.charCodeAt(t);if(39!=i&&34!=i&&40!=i)return!1;let r=40==i?41:i;for(let i=t+1,o=!1;i=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,i,r){return this.append(new oI(e,t,n,(i?1:0)|(r?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof oI&&(t.type==iI||t.type==rI))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let t=e;t=e;s--){let e=this.parts[s];if(e instanceof oI&&1&e.side&&e.type==n.type&&!(r&&(1&n.side||2&e.side)&&(e.to-e.from+o)%3==0&&((e.to-e.from)%3||o%3))){i=e;break}}if(!i)continue;let a=n.type.resolve,l=[],c=i.from,p=n.to;if(r){let e=Math.min(2,i.to-i.from,o);c=i.to-e,p=n.from+e,a=1==e?"Emphasis":"StrongEmphasis"}i.type.mark&&l.push(this.elt(i.type.mark,c,i.to));for(let e=s+1;e=0;t--){let n=this.parts[t];if(n instanceof oI&&n.type==e)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}skipSpace(e){return bj(this.text,e-this.offset)+this.offset}elt(e,t,n,i){return"string"==typeof e?eI(this.parser.getNodeType(e),t,n,i):new Jj(e,t)}}function fI(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),i=0;for(let e of t){for(;i(e?e-1:0))return!1;if(this.fragmentEnd<0){let e=this.fragment.to;for(;e>0&&"\n"!=this.input.read(e-1,e);)e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let i=e+this.fragment.offset;for(;n.to<=i;)if(!n.parent())return!1;for(;;){if(n.from>=i)return this.fragment.from<=t;if(!n.childAfter(i))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(W_.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),r=e.absoluteLineStart,o=r,s=e.block.children.length,a=o,l=s;for(;;){if(t.to-n>i){if(t.type.isAnonymous&&t.firstChild())continue;break}let r=yI(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,r);else{let n=new eE(e.parser.nodeSet.types[hj.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(n,t.tree),e.addNode(n,r)}if(t.type.is("Block")&&(mI.indexOf(t.type.id)<0?(o=t.to-n,s=e.block.children.length):(o=a,s=l,a=t.to-n,l=e.block.children.length)),!t.nextSibling())break}for(;e.block.children.length>s;)e.block.children.pop(),e.block.positions.pop();return o-r}}function yI(e,t){let n=e;for(let i=1;ijj[e])),Object.keys(jj).map((e=>qj[e])),Object.keys(jj),zj,yj,Object.keys(lI).map((e=>lI[e])),Object.keys(lI),[]);const xI={resolve:"Strikethrough",mark:"StrikethroughMark"};DO.strikethrough,DO.processingInstruction;function wI(e,t,n=0,i,r=0){let o=0,s=!0,a=-1,l=-1,c=!1,p=()=>{i.push(e.elt("TableCell",r+a,r+l,e.parser.parseInline(t.slice(a,l),r+a)))};for(let u=n;u-1)&&o++,s=!1,i&&(a>-1&&p(),i.push(e.elt("TableDelimiter",u+r,u+r+1))),a=l=-1),c=!c&&92==n}return a>-1&&(o++,i&&p()),o}function _I(e,t){for(let n=t;n{if(r!=e||i.char(o+1)==e)return-1;let s=[i.elt(n,o,o+1)];for(let r=o+1;re.charCodeAt(0)))}function iL(e){return e>=48&&e<=57||183===e||e>=768&&e<=879||e>=8255&&e<=8256}function rL(e,t){return t.concat(e.split(/\n/g).join("\n"+t))}function oL(e,t=0){const n=e.peek(t);return n===eL&&e.peek(t+1)===eL?{offset:2,token:"**"}:(i=n,tL.includes(i)?{offset:1,token:String.fromCharCode(n)}:null);var i}function sL(e,t=0,n=!1){for(let r=!1,o=[],s=0;;s++){const a=e.peek(t+s);if(!(63===(i=a)||i>=65&&i<=90||95===i||i>=97&&i<=122||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8204&&i<=8205||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=55296&&i<=56319||i>=56320&&i<=57343||(r||n)&&iL(a)))return o.length?{token:String.fromCharCode(...o),offset:s}:null;r||(r=!0),o.push(a)}var i}function aL(e,t){for(let i=!1,r=0;;r++){let o=e.peek(t+r);if(n=o,!ZI.includes(n))return i?{token:" ",offset:r}:null;i||(i=!0)}var n}const lL={[CI]:"identifier",[TI]:"nameIdentifier"},cL=new HE(((e,t)=>{KI&&console.log("%s: T ",e.pos);const n=function(e,t){const n=t.contextKeys(),i=t.tokens;for(let t=0,r=[],o=null;;){const s=i.length+r.length>0,a=r.length>0,l=sL(e,t,s)||s&&oL(e,t)||a&&aL(e,t);if(!l)return o;const{token:c,offset:p}=l;if(t+=p," "===c)continue;r=[...r,c];const u=[...i,...r].join(" ");if(n.some((e=>e===u))){const e=r[0];o={token:e,offset:e.length,term:123}}if(!n.some((e=>e.startsWith(u)))){if(gL.some((e=>e===u))){const e=r[0];o={token:e,offset:e.length,term:122}}if(!gL.some((e=>e.startsWith(u))))return o}}}(e,t.context),i=t.context.tokens,r=n||sL(e,0,i.length>0);r&&(e.advance(r.offset),e.acceptToken(n?n.term:122),XI&&console.log("%s: MATCH <%s> <%s>",e.pos,n?lL[n.term]:"identifier",r.token))}),{contextual:!0}),pL=new HE(((e,t)=>{KI&&console.log("%s: T ",e.pos);const n=sL(e,0,t.context.tokens.length>0);n&&(e.advance(n.offset),e.acceptToken(121),XI&&console.log("%s: MATCH <%s>",e.pos,n.token))})),uL=new HE(((e,t)=>{let n;KI&&console.log("%s: T ",e.pos);let i=!1;for(n=0;;n++){const t=e.peek(n);if(!ZI.includes(t)){JI.includes(t)&&(i=!0);break}}if(i){const t=sL(e,n+1);if(aL(e,n+1)||t&&/^(then|else|return|satisfies)$/.test(t.token))return;XI&&console.log("%s: MATCH ",e.pos),e.acceptToken(124)}})),dL={[FI]:"FunctionInvocation",[qI]:"FilterExpression",[LI]:"PathExpression"},hL={[QI]:"Context",[WI]:"FunctionDefinition",[MI]:"ForExpression",[VI]:"List",[RI]:"IfExpression",[$I]:"QuantifiedExpression"},fL={[GI]:"Context",[UI]:"FunctionDefinition",[AI]:"ForExpression",[HI]:"List",[DI]:"IfExpression",[NI]:"QuantifiedExpression",[II]:"PathExpression",[zI]:"FunctionInvocation",[BI]:"FilterExpression",[jI]:"ArithmeticExpression"};class mL{constructor(e){this.fn=e}get(e){return this.fn(e)}static of(e){return new mL(e)}}const gL=Object.keys({"date and time":1,date:1,time:1,duration:1});class yL{constructor(e={}){this.value=e}getKeys(){return Object.keys(this.value)}get(e){const t=this.value[e],n=this.constructor;return n.isAtomic(t)?t:n.of(t)}set(e,t){return this.constructor.of({...this.value,[e]:t})}merge(e){const t=this.constructor;return new t(t.__merge(this.value,e))}static isAtomic(e){return!e||e instanceof this||e instanceof mL||"object"!=typeof e}static of(...e){return e.reduce(((e,t)=>e.merge(t)),new this({}))}static __unwrap(e){return e?e instanceof this?e.value:"object"!=typeof e?{}:{...e}:{}}static __merge(e,t){return O(this.__unwrap(t),((e,t,n)=>t instanceof mL?{...e,[n]:t}:(t=this.__unwrap(t),v(e,n)&&(t=this.__merge(this.__unwrap(e[n]),t)),{...e,[n]:t})),this.__unwrap(e))}}class vL{constructor({name:e="Expressions",tokens:t=[],children:n=[],parent:i=null,context:r,value:o,raw:s}){this.name=e,this.tokens=t,this.children=n,this.parent=i,this.context=r,this.value=o,this.raw=s}enterScope(e){const t=this.of({name:e,parent:this});return YI&&console.log("[%s] enter",t.path,t.context),t}exitScope(e){return this.parent?(YI&&console.log("[%s] exit %o\n%s",this.path,this.context,rL(e," ")),this.parent.pushChild(this)):(YI&&console.log("[%s] NO exit %o\n%s",this.path,this.context,rL(e," ")),this)}token(e){return YI&&console.log("[%s] token <%s> + <%s>",this.path,this.tokens.join(" "),e),this.assign({tokens:[...this.tokens,e]})}literal(e){return YI&&console.log("[%s] literal %o",this.path,e),this.pushChild(this.of({name:"Literal",value:e}))}computedValue(){for(let e=this;;e=EL(e.children)){if(!e)return null;if(e.value)return e.value}}contextKeys(){return this.context.getKeys().map(bL)}get path(){return this.parent?.path?.concat(" > ",this.name)||this.name}get(e){const t=[e,e&&bL(e)],n=this.context.getKeys().find((e=>t.includes(bL(e))));if(void 0===n)return;const i=this.context.get(n);return i instanceof mL?i.get(this):i}resolveName(){const e=this.tokens.join(" "),t=this.assign({tokens:[]}),n=this.of({name:"VariableName",parent:t,value:this.get(e),raw:e});return YI&&console.log("[%s] resolve name <%s=%s>",n.path,e,this.get(e)),t.pushChild(n)}pushChild(e){if(!e)return this;const t=this.assign({children:[...this.children,e]});return e.parent=t,t}pushChildren(e){let t=this;for(const n of e)t=t.pushChild(n);return t}declareName(){if(0===this.tokens.length)throw Error("no tokens to declare name");const e=this.tokens.join(" ");return YI&&console.log("[%s] declareName <%s>",this.path,e),this.assign({tokens:[]}).pushChild(this.of({name:"Name",value:e}))}define(e,t){if("string"!=typeof e)return YI&&console.log("[%s] no define <%s=%s>",this.path,e,t),this;YI&&console.log("[%s] define <%s=%s>",this.path,e,t);const n=this.context.set(e,t);return this.assign({context:n})}assign(e={}){return vL.of({...this,...e})}of(e={}){const t={context:this.context,parent:this.parent};return vL.of({...t,...e})}static of(e){const{name:t,tokens:n=[],children:i=[],parent:r=null,context:o,value:s,raw:a}=e;if(!o)throw new Error("must provide ");return new vL({name:t,tokens:[...n],children:[...i],context:o,parent:r,value:s,raw:a})}}function bL(e){return e.replace(/\s*([./\-'+]|\*\*?)\s*/g," $1 ").replace(/\s{2,}/g," ").trim()}function xL(e,t,n){const i=e.children.filter((e=>e.name!==t)),r=e.children.filter((e=>e.name===t)),o=i[0],s=i[Math.max(1,i.length-1)],a=o?.computedValue(),l=s?.computedValue()||null;return e.assign({children:r}).enterScope(t).pushChildren(i).exitScope(n).define(a,l)}function wL(e={},t=yL){const n=vL.of({context:t.of(e)});return new iO({start:n,reduce(e,n,i,r){if(19===n){const[n,i]=e.children.slice(-2);e=e.assign({value:t.of(n?.computedValue(),i?.computedValue())})}if(89===n&&(e=e.assign({value:t.of(...e.children.map((e=>e?.computedValue())))})),70===n){const[t,n]=e.children.slice(-2);e=e.assign({value:t?.computedValue()})}if(72===n){const[t,...n]=e.children;"get value"===t?.raw&&(e=function(e,t){if(!t.length)return e.assign({value:null});"Name"===t[0].name&&(t=function(e,t){const n={};for(let t=0;tn[e]))}(t,["m","key"]));if(2!==t.length)return e.assign({value:null});const[n,i]=t,r=i?.computedValue(),o=n?.computedValue();if(!o||"object"!=typeof o||"string"!=typeof r)return e.assign({value:null});return e.assign({value:[bL(r),r].reduce(((e,t)=>o.get(t)||e),null)})}(e,n))}const o=hL[n];if(o)return e.enterScope(o);const s=dL[n];if(s){const{children:i,context:r}=e,o=i.slice(0,-1),a=EL(i);let l=null;return 154===n&&(l=t.of(a?.computedValue())),155===n&&(l=t.of(r,a?.computedValue()).set("item",a?.computedValue())),e.assign({children:o}).enterScope(s).pushChild(a).assign({context:l||r})}const a=r.read(r.pos,i.pos);if(fL[n])return e.exitScope(a);if(98===n){const n=e.children.filter((e=>"ContextEntry"!==e.name)),i=n[0],r=EL(n);return xL(e,"ContextEntry",a).assign({value:t.of(e.value).set(i?.computedValue(),r?.computedValue())})}if(7===n||27===n)return xL(e,"InExpression",a);if(139===n)return e.define("partial",mL.of((e=>EL(e.children)?.computedValue())));if(76===n){const t=EL(e.children).computedValue();return e.define(t,1)}if(145===n||146===n||147===n){const t=e.children.slice(0,-1),n=EL(e.children);return e.assign({children:t}).enterScope("ArithmeticExpression").pushChild(n)}if(148===n)return e.enterScope("ArithmeticExpression");if(9===n||10===n||101===n)return e.token(a);if(80===n)return e.literal(a.replace(/^"|"$/g,""));if(81===n)return e.literal("true"===a);if(79===n)return e.literal(parseFloat(a));if(161===n)return e.literal(null);if(47===n)return e.resolveName();if(8===n||100===n)return e.declareName();if((128===n||37===n)&&e.tokens.length>0)throw new Error("uncleared name");if(128===n){let t=e;for(;t.parent;)t=t.exitScope(a);return t}return e}})}const _L=wL({});function EL(e){return e[e.length-1]}const OL=uO({StringLiteral:DO.string,NumericLiteral:DO.number,BooleanLiteral:DO.bool,"AtLiteral!":DO.special(DO.string),CompareOp:DO.compareOperator,ArithOp:DO.arithmeticOperator,"for if then else some every satisfies between return":DO.controlKeyword,"in instance of and or":DO.operatorKeyword,function:DO.definitionKeyword,as:DO.keyword,"Type/...":DO.typeName,Wildcard:DO.special(DO.variableName),null:DO.null,LineComment:DO.lineComment,BlockComment:DO.blockComment,'VariableName! "?"':DO.variableName,"DateTimeConstructor! SpecialFunctionName!":DO.function(DO.special(DO.variableName)),"List Interval":DO.list,Context:DO.definition(DO.literal),"Name!":DO.definition(DO.variableName),"Key/Name! ContextEntryType/Name!":DO.definition(DO.propertyName),"PathExpression/VariableName!":DO.function(DO.propertyName),"FormalParameter/ParameterName!":DO.function(DO.definition(DO.variableName)),"( )":DO.paren,"[ ]":DO.squareBracket,"{ }":DO.brace,".":DO.derefOperator,", ;":DO.separator,"..":DO.punctuation}),PL={__proto__:null,for:10,in:32,return:36,if:40,then:42,else:44,some:48,every:50,satisfies:56,or:60,and:64,between:72,instance:86,of:89,days:101,time:103,duration:105,years:107,months:109,date:111,list:117,context:123,function:130,null:156,true:330,false:330,"?":170,external:186,not:211},kL=rO.deserialize({version:14,states:"C|O`QYOOO`QYOOO$mQYOOOOQU'#Ce'#CeO$wQYO'#C`O&QQYO'#FQOOQQ'#Ff'#FfO&[QYO'#FfO`QYO'#DVOOQU'#En'#EnO'{Q^O'#D]OOQU'#D^'#D^OOQU'#D]'#D]OOQO'#Fn'#FnO)xQWO'#DvOOQQ'#D}'#D}OOQQ'#EO'#EOOOQQ'#EP'#EPO)}OWO'#ESO)xQWO'#EQOOQQ'#EQ'#EQOOQQ'#Ft'#FtOOQQ'#Fr'#FrOOQQ'#Fy'#FyOOQQ'#EU'#EUO`QYO'#EWOOQQ'#FS'#FSO*SQ^O'#FSO+yQYO'#EXO,QQWO'#EYOOQP'#F}'#F}O,VQXO'#EaOOQQ'#Fz'#FzOOQQ'#FR'#FRQOQWOOOOQQ'#FT'#FTOOQQ'#F^'#F^O`QYO'#CoOOQQ'#F_'#F_O$wQYO'#CsO,bQYO'#DwOOQQ'#Fs'#FsO,gQYO'#EROOQO'#ER'#ERO`QYO'#EVO`QYO'#EUOOQO'#F{'#F{Q,oQWOOO,tQYO'#DRO-kQWO'#FbOOQO'#DT'#DTO-vQYO'#FfO-}QWOOO.tQYO'#CdO/RQYO'#FVOOQQ'#Cc'#CcO/WQYO'#FUOOQQ'#Cb'#CbO/`QYO,58zO`QYO,59iOOQQ'#Fc'#FcOOQQ'#Fd'#FdOOQQ'#Fe'#FeO`QYO,59qO`QYO,59qO`QYO,59qOOQQ'#Fl'#FlO/eQYO,5:^OOQQ'#Fm'#FmO`QYO,5:`O`QYO,59eO`QYO,59gO`QYO,59iO1^QYO,59iO1eQYO,59rOOQQ,5:i,5:iO1jQYO,59qOOQU-E8l-E8lO3^QYO'#FoOOQQ,5:b,5:bOOQQ,5:n,5:nOOQQ,5:l,5:lO3eQYO,5:rOOQQ,5;n,5;nO3oQYO,5:qO3|QWO,5:sO4RQYO,5:tOOQP'#Ee'#EeO4xQXO'#EdOOQO'#Ec'#EcO5PQWO'#EbO5UQWO'#GOO5^QWO,5:{O5cQYO,59ZO/RQYO'#FaOOQQ'#Cw'#CwO5jQYO'#F`OOQQ'#Cv'#CvO5rQYO,59_O5wQYO,5:cO5|QYO,5:mO3hQYO,5:qO6RQYO,5:pO`QYO'#EwQ,oQWOOO`QYO'#EmO6xQWO,5;|O`QYOOOOQR'#Cf'#CfOOQQ'#Ej'#EjO7rQYO,59OO`QYO,5;qOOQQ'#FY'#FYO$wQYO'#EkO8SQYO,5;pO`QYO1G.fOOQQ'#F]'#F]O8yQYO1G/TO;pQYO1G/]O;zQYO1G/]OPQYO1G/PO?YQYO1G/RO@cQYO1G/TO`QYO1G/TOOQQ1G/T1G/TO@yQYO1G/^OAhQ^O'#CdOBzQYO'#FqOOQO'#Dz'#DzOCUQWO'#DyOCZQWO'#FpOOQO'#Dx'#DxOOQO'#D{'#D{OCcQWO,5fAN>fO/eQYO'#EoO! qQYO<V>vP?oP?rP?v@iA[BTBZB^$tBdBdPPPPC]8xDUD}EQEy!mjOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR![SQ!YSR$m#eS!WS#eS#Qw$`W#w!p!x%O%VT&T%m&c#WXOPQWYilu|}!]!a!b!c!e!g!h!i!j!k#Z#]#_#c#g#r#t$O$P$Y$^$_$b$q$}%U%X%d%g%l%n%y%z&Q&b&f&n&p&q&tb!VSw!x#e$`%O%V%m&cU#a!V#b#uR#u!pU#a!V#b#uT$W!z$XR$l#cR#UwQ#SwR%`$`U!RQ#_#rQ#s!kR$g#]QrQQ$i#_R$s#rQ$|#tQ%t%UQ&S%lU&X%n&f&tQ&i&bT&o&n&qc$u#t%U%l%n&b&f&n&q&t!lkOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zQ#m!eU$t#t%U&nS%|%g&p]&R%l%n&b&f&q&t#V[OPQWilu|}!]!a!b!c!e!g!h!i!j!k!p#Z#]#_#c#g#r#t$O$P$Y$^$_$b$q$}%U%X%d%g%l%n%y%z&b&f&n&p&q&tR&W%mQ&U%mR&j&cQ&[%nR&s&tS&Y%n&tR&l&f!m]OPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR#|!pQ#y!pR%p%OS#x!p%OT$S!x%V!meOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!leOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zQ!rbT!{o$Z!mcOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mdOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mhOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mpOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR$V!xQ$T!xR%u%VQ%x%XR&]%yQ!}oR%[$ZT!|o$ZS!zo$ZT$W!z$XRrQS#b!V#uR$j#bQ#f!YR$n#fQ$a#SR%a$aQ#^!RR$h#^!vYOPQWilu|}!]!a!b!c!e!g!h!i!j!k!p#Z#]#_#c#g#r#t$O$P$Y$^$_$b$q$}%U%X%d%g%y%z&nS!oY&Q_&Q%l%n&b&f&p&q&tQ%h$tS%}%h&`R&`&RQ&d&UR&k&dQ&g&YR&m&gQ%P#yR%q%PS$Q!v#vR%T$QQ%W$TR%v%WQ$X!zR%Y$XQ$[!}R%]$[Q#[!PR$f#[QrOQ!PPR$e#ZUTOP#ZW!QQ!k#]#_Q!nWQ!tiQ!vlQ#PuQ#X|Q#Y}Q#i!]Q#j!aQ#k!bQ#l!cQ#n!gQ#o!hQ#p!iQ#q!jQ#v!pQ$k#cQ$o#gQ$r#rQ%R$OQ%S$PQ%Z$YQ%^$^Q%_$_Q%b$bQ%e$qQ%o$}S%w%X%yQ%{%dR&^%z!mqOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mSOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR!ZST!XS#eQ#c!WR$_#QR#g![!muOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mwOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR#TwT#Rw$`V!SQ#_#r!X!aT!Q!t!v#P#X#Y#i#n#o#p#q#v$k$o$r%R%S%Z%^%_%b%e%o%w%{&^!Z!bT!Q!t!v#P#X#Y#i#j#n#o#p#q#v$k$o$r%R%S%Z%^%_%b%e%o%w%{&^!]!cT!Q!t!v#P#X#Y#i#j#k#n#o#p#q#v$k$o$r%R%S%Z%^%_%b%e%o%w%{&^!mWOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR&V%mT&Z%n&t!a!eT!Q!n!t!v#P#X#Y#i#j#k#l#n#o#p#q#v$k$o$r%R%S%Z%^%_%b%e%o%w%{&^!a!gT!Q!n!t!v#P#X#Y#i#j#k#l#n#o#p#q#v$k$o$r%R%S%Z%^%_%b%e%o%w%{&^!m^OPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zQ!q^R!scR#z!pQ!wlR#{!p!mfOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mlOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mmOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR$U!x!moOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR#Oo",nodeNames:"⚠ LineComment BlockComment Expression ForExpression for InExpressions InExpression Name Identifier Identifier ArithOp ArithOp ArithOp ArithOp ArithOp in IterationContext return IfExpression if then else QuantifiedExpression some every InExpressions InExpression satisfies Disjunction or Conjunction and Comparison CompareOp CompareOp between PositiveUnaryTest ( PositiveUnaryTests ) ArithmeticExpression InstanceOfExpression instance of Type QualifiedName VariableName BacktickIdentifier SpecialType days time duration years months date > ListType list < ContextType context ContextEntryTypes ContextEntryType FunctionType function ArgumentTypes ArgumentType PathExpression ] FilterExpression [ FunctionInvocation SpecialFunctionName NamedParameters NamedParameter ParameterName PositionalParameters null NumericLiteral StringLiteral BooleanLiteral DateTimeLiteral DateTimeConstructor AtLiteral ? SimplePositiveUnaryTest Interval ParenthesizedExpression List FunctionDefinition FormalParameters FormalParameter external FunctionBody } { Context ContextEntry Key Name Identifier Expressions UnaryTests Wildcard not",maxTerm:173,context:_L,nodeProps:[["closedBy",38,")",71,"]",96,"}"],["openedBy",40,"(",69,"[",95,"{"],["group",-5,78,79,80,81,82,"Literal"]],propSources:[OL],skippedNodes:[0,1,2],repeatNodeCount:14,tokenData:"-c~RvXY#iYZ$^Z[#i]^$^pq#iqr$crs$nwx&fxy&kyz&pz{&u{|'S|}'X}!O'^!O!P'k!P!Q(T!Q![*O![!]*a!]!^*f!^!_*k!_!`$i!`!a*z!b!c+U!}#O+Z#P#Q+`#Q#R&}#S#T+e#o#p-X#q#r-^$f$g#i#BY#BZ#i$IS$I_#i$I|$I}$^$I}$JO$^$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~#nY#r~XY#iZ[#ipq#i$f$g#i#BY#BZ#i$IS$I_#i$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~$cO#s~~$fP!_!`$i~$nOr~~$sW$j~OY$nZr$nrs%]s#O$n#O#P%b#P;'S$n;'S;=`&`<%lO$n~%bO$j~~%eRO;'S$n;'S;=`%n;=`O$n~%sX$j~OY$nZr$nrs%]s#O$n#O#P%b#P;'S$n;'S;=`&`;=`<%l$n<%lO$n~&cP;=`<%l$n~&kO#{~~&pOv~~&uOx~~&zP^~z{&}~'SO_~~'XO[~~'^O$O~R'cPZP!`!a'fQ'kO$_Q~'pQ#z~!O!P'v!Q!['{~'{O#}~~(QP$i~!Q!['{~(YQ]~z{(`!P!Q)g~(cTOz(`z{(r{;'S(`;'S;=`)a<%lO(`~(uVOz(`z{(r{!P(`!P!Q)[!Q;'S(`;'S;=`)a<%lO(`~)aOQ~~)dP;=`<%l(`~)lSP~OY)gZ;'S)g;'S;=`)x<%lO)g~){P;=`<%l)g~*TQ$i~!O!P*Z!Q![*O~*^P!Q!['{~*fO$]~~*kO$s~R*rP!]QsP!_!`*uP*zOsPR+RP!YQsP!_!`*u~+ZO$l~~+`O!i~~+eO!g~~+hWOY+eZ#O+e#O#P,Q#P#S+e#S#T,|#T;'S+e;'S;=`-R<%lO+e~,TRO;'S+e;'S;=`,^;=`O+e~,aXOY+eZ#O+e#O#P,Q#P#S+e#S#T,|#T;'S+e;'S;=`-R;=`<%l+e<%lO+e~-RO$Z~~-UP;=`<%l+e~-^O#S~~-cO#R~",tokenizers:[pL,cL,uL,0,1],topRules:{Expression:[0,3],Expressions:[1,102],UnaryTests:[2,103]},dialects:{camunda:2532},dynamicPrecedences:{31:-1,68:1,72:-1,74:-1},specialized:[{term:122,get:e=>PL[e]||-1}],tokenPrec:2534});function SL(e){const t=[];return e.iterate({enter:e=>{const n=e.node;if(!n.type.isError)return;const i=n.parent,r=CL(n),o={from:n.from,to:n.to,severity:"error",type:"Syntax Error"};if(n.from!==n.to)o.message=`Unrecognized token in <${i.name}>`;else if(r)o.message=`Unrecognized token <${r.name}> in <${i.name}>`,o.to=r.to;else{const e=i.enterUnfinishedNodesBefore(n.to);o.message=`Incomplete <${(e||i).name}>`}t.push(o)}}),t}function CL(e){return e?e.nextSibling||CL(e.parent):null}var TL={create:e=>({enter(t){if("FilterExpression"!==t.name)return;const n=e.readContent(t.from,t.to);if(/\[\s*0\s*\]$/.test(n)){const{from:i,to:r}=t;e.report({from:i,to:r,message:"First item is accessed via [1]",severity:"warning",type:"first-item",actions:[{name:"fix",apply(t,o=i,s=r){e.updateContent(o,s,n.replace(/\[\s*0\s*\]$/,"[1]"))}}]})}}})};const AL=[TL];function ML(e){const{readContent:t,syntaxTree:n,updateContent:i}=e,r=[],o={readContent:t,report:e=>{r.push(e)},updateContent:i},s=AL.map((e=>e.create(o)));return n.iterate({enter:e=>{for(const t of s)t.enter&&t.enter(e)},leave:e=>{for(const t of s)t.leave&&t.leave(e)}}),r}function DL(e){return[...SL(e.syntaxTree),...ML(e)]}const RL=()=>e=>{if(0===e.state.doc.length)return[];const t=DL({syntaxTree:UM(e.state),readContent:(t,n)=>e.state.sliceDoc(t,n),updateContent:(t,n,i)=>e.dispatch({changes:{from:t,to:n,insert:i}})});return t.map((e=>({...e,source:e.type})))},NL=OD(xD.define([{tag:DO.strong,fontWeight:"bold"},{tag:DO.emphasis,fontStyle:"italic"}]));var $L=[AA.theme({"& .cm-lintRange":{position:"relative"},"& .cm-lintRange::after":{content:'""',width:"100%",position:"absolute",left:"0px",bottom:"-2px",height:"3px",backgroundRepeat:"repeat-x"},"& .cm-lintRange.cm-lintRange-warning, & .cm-lintRange.cm-lintRange-error":{backgroundImage:"none"},"& .cm-lintPoint::after":{bottom:"-2px"}}),NL];const jL=e=>`%23${e.slice(1)}`,IL={black:"#1f2b36",darkGrey:"#2f3d58",grey:"#404a5c",midGrey:"#576071",lightGrey:"#c5d1e5",offWhite:"#d9e0f5",snowWhite:"#eaf1ff",white:"#ffffff",mossGreen:"#7ab6aa",iceBlue:"#6cbfd8",waterBlue:"#065aaa",brightBlue:"#0a56b9",deepBlue:"#355472",red:"#9f1c15",orangeBrown:"#b4502f",yellow:"#debd71",lila:"#9a4890",purple:"#5b2c83"},LL={lightBackground:IL.white,darkBackground:IL.snowWhite,selection:IL.snowWhite,tooltipBackground:IL.offWhite,error:IL.red,warning:IL.yellow,invalid:"#b40000"};var BL=[AA.theme({"&":{color:IL.black,backgroundColor:LL.lightBackground},".cm-content":{caretColor:IL.darkGrey},".cm-cursor, .cm-dropCursor":{borderLeftColor:IL.darkGrey},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:LL.selection},".cm-panels":{backgroundColor:LL.darkBackground,color:IL.grey},".cm-panels.cm-panels-top":{borderBottom:`2px solid ${IL.black}`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid ${IL.black}`},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:`1px solid ${IL.midGrey}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:IL.offWhite},".cm-activeLine":{backgroundColor:LL.selection},".cm-selectionMatch":{backgroundColor:IL.offWhite},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{outline:`1px solid ${IL.grey}`},"&.cm-focused .cm-matchingBracket":{backgroundColor:IL.snowWhite},".cm-gutters":{backgroundColor:"#f3f7fe",color:"#52668d",border:"none",padding:"0 5px"},".cm-activeLineGutter":{backgroundColor:LL.selection},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:LL.tooltipBackground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:LL.tooltipBackground,borderBottomColor:LL.tooltipBackground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:LL.darkBackground,color:IL.midGrey}},"& .cm-lintRange.cm-lintRange-warning::after":{backgroundImage:`url("data:image/svg+xml,")`},"& .cm-lintRange.cm-lintRange-error::after":{backgroundImage:`url("data:image/svg+xml,")`},"& .cm-diagnostic-warning":{border:`1px solid ${LL.warning}`,borderLeft:`5px solid ${LL.warning}`,background:LL.lightBackground},"& .cm-diagnostic-error":{border:`1px solid ${LL.error}`,borderLeft:`5px solid ${LL.error}`,background:LL.lightBackground},"& .cm-diagnostic":{padding:"3px 8px"}},{dark:!1}),OD(xD.define([{tag:[DO.macroName,DO.variableName],color:IL.waterBlue},{tag:[DO.special(DO.bracket)],color:IL.waterBlue,fontWeight:"bold"},{tag:[DO.color,DO.name,DO.definition(DO.name),DO.constant(DO.name),DO.standard(DO.name),DO.propertyName],color:IL.deepBlue},{tag:[DO.definition(DO.variableName),DO.function(DO.variableName),DO.function(DO.propertyName)],color:IL.brightBlue},{tag:[DO.labelName],color:IL.orangeBrown},{tag:[DO.annotation],color:LL.invalid},{tag:[DO.number,DO.changed,DO.annotation,DO.modifier,DO.self,DO.namespace,DO.atom,DO.bool,DO.special(DO.variableName)],color:IL.red},{tag:[DO.typeName,DO.className,DO.attributeName],color:IL.lila},{tag:[DO.operator,DO.operatorKeyword,DO.tagName,DO.keyword],color:IL.purple},{tag:[DO.angleBracket,DO.squareBracket,DO.brace,DO.separator,DO.punctuation],color:IL.midGrey},{tag:[DO.regexp],color:IL.deepBlue},{tag:[DO.quote],color:IL.darkGrey},{tag:[DO.string,DO.character,DO.deleted],color:IL.orangeBrown},{tag:DO.link,color:IL.mossGreen,textDecoration:"underline",textUnderlinePosition:"under"},{tag:[DO.url,DO.escape,DO.special(DO.string)],color:IL.red},{tag:[DO.meta],color:IL.iceBlue},{tag:[DO.comment],color:IL.midGrey,fontStyle:"italic"},{tag:DO.strong,fontWeight:"bold",color:IL.deepBlue},{tag:DO.emphasis,fontStyle:"italic",color:IL.deepBlue},{tag:DO.strikethrough,textDecoration:"line-through"},{tag:DO.heading,fontWeight:"bold",color:IL.midGray},{tag:DO.special(DO.heading1),fontWeight:"bold",color:IL.darkGrey},{tag:[DO.heading1,DO.heading2,DO.heading3,DO.heading4],fontWeight:"bold",color:IL.midGrey},{tag:[DO.heading5,DO.heading6,DO.processingInstruction,DO.inserted],color:IL.grey},{tag:[DO.contentSeparator],color:IL.yellow},{tag:DO.invalid,color:IL.midGrey,borderBottom:`1px dotted ${LL.invalid}`}]))];const qL="#f07178",zL="#fffce1",FL="#ec9e6f",VL="rgba(0, 0, 0, 0.5)",HL="#353a42",UL="#ffcc00",WL="fff890";var GL=[AA.theme({"&":{color:"#ffffff",backgroundColor:"#292d3e"},".cm-content":{caretColor:UL},"&.cm-focused .cm-cursor":{borderLeftColor:UL},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"rgba(128, 203, 196, 0.2)"},".cm-panels":{backgroundColor:"#21252b",color:"#ffffff"},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:VL},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847",outline:"1px solid #515a6b"},".cm-gutters":{background:"#292d3e",color:"#676e95",border:"none",padding:"0 5px"},".cm-activeLineGutter":{backgroundColor:VL},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:HL},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:HL,borderBottomColor:HL},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:VL,color:"#abb2bf"}},"& .cm-lintRange.cm-lintRange-warning::after":{backgroundImage:`url("data:image/svg+xml,")`},"& .cm-lintRange.cm-lintRange-error::after":{backgroundImage:"url(\"data:image/svg+xml,\")"},"& .cm-diagnostic-warning":{borderLeft:`5px solid #${WL}`,background:"#281e16"},"& .cm-diagnostic-error":{borderLeft:"5px solid red",background:"#281616"},"& .cm-diagnostic":{borderRadius:"2px",padding:"3px 8px"}},{dark:!0}),OD(xD.define([{tag:DO.heading1,color:zL},{tag:DO.heading2,color:zL},{tag:DO.heading3,color:zL},{tag:DO.heading4,color:zL},{tag:DO.heading5,color:zL},{tag:DO.heading6,color:zL},{tag:DO.special(DO.bracket),color:FL,fontWeight:"bold"},{tag:DO.keyword,color:"#c792ea"},{tag:DO.operator,color:"#89ddff"},{tag:DO.special(DO.variableName),color:"#eeffff"},{tag:DO.typeName,color:"#f07178"},{tag:DO.atom,color:"#f78c6c"},{tag:DO.number,color:"#ff5370"},{tag:DO.bool,color:"#ff5370"},{tag:DO.definition(DO.variableName),color:"#82aaff"},{tag:DO.string,color:"#c3e88d"},{tag:DO.comment,color:"#7d8799"},{tag:DO.tagName,color:"#ff5370"},{tag:DO.bracket,color:"#a2a1a4"},{tag:DO.meta,color:"#ffcb6b"},{tag:DO.special(DO.string),color:qL},{tag:DO.propertyName,color:FL},{tag:DO.variableName,color:FL},{tag:DO.attributeName,color:qL},{tag:DO.className,color:qL},{tag:DO.invalid,color:"#ffffff"}]))];const QL=[...$L,...BL],XL=[...$L,...GL],KL=123,YL=125,ZL=(e,t=0)=>{const n=e.peek(t)===YL,i=e.peek(t+1)===YL;return n&&i||-1===e.peek(t)},JL=new HE(((e,t)=>{let n=0;for(;!ZL(e,n);)n++;n>0&&(e.advance(n),e.acceptToken(2))})),eB=(e,t=0)=>{const n=e.peek(t)===KL,i=e.peek(t+1)===KL;return n&&i||-1===e.peek(t)},tB=new HE(((e,t)=>{let n=0;for(;!eB(e,n);)n++;n>0&&(e.advance(n),e.acceptToken(3))})),nB=new HE(((e,t)=>{let n=0;for(;-1!==e.peek(n);)n++;n>0&&(e.advance(n),e.acceptToken(1))})),iB=uO({ConditionalSpanner:DO.special(DO.bracket),ConditionalSpannerClose:DO.special(DO.bracket),ConditionalSpannerCloseNl:DO.special(DO.bracket),LoopSpanner:DO.special(DO.bracket),LoopSpannerClose:DO.special(DO.bracket),LoopSpannerCloseNl:DO.special(DO.bracket),EmptyInsert:DO.special(DO.bracket),Insert:DO.special(DO.bracket)}),rB=rO.deserialize({version:14,states:"$bOQOaOOOfOXO'#CbOOO`'#Cm'#CmOqOWO'#CcOvOWO'#CfOOO`'#Cp'#CpOOO`'#Ci'#CiO{OaO'#ClO!jOSOOQOOOOOO!oOPO,58{O!tOXO,58|OOO`,58|,58|O!|OQO,58}O#ROQO,59QOOO`-E6g-E6gOOO`1G.g1G.gO#WOPO1G.gOOO`1G.h1G.hO#]OaO1G.iO#qOaO1G.lOOO`7+$R7+$RO$VOPO7+$TO$_OPO7+$WOOO`<new tD(function(e=null){const t=rB.configure({wrap:(n=t=>"Feel"==t.name||"FeelBlock"==t.name?{parser:kL}:e&&"SimpleTextBlock"==t.name?{parser:e}:null,(e,t,i,r)=>new PE(e,n,t,i,r)),props:[vD.add(oB)]});var n;return HM.define({parser:t})}(e),[]);function aB(e){const t=[];return e.iterate({enter:e=>{"EmptyInsert"===e.type.name&&t.push({from:e.from,to:e.to,severity:"warning",message:"this insert is empty and will be ignored",type:"emptyInsert"})}}),t}var lB=nj(function(){const e=RL();return t=>{const n=e(t);if(0===t.state.doc.length)return[];return[...n,...function(e){return[...aB(e)]}(UM(t.state)).map((e=>({...e,source:"feelers linter"})))]}}());function cB({container:e,tooltipContainer:t,hostLanguage:n,hostLanguageParser:i,onChange:r=()=>{},onKeyDown:o=()=>{},onLint:s=()=>{},contentAttributes:a={},readOnly:l=!1,value:c="",enableGutters:p=!1,singleLine:u=!1,lineWrap:d=!1,darkMode:h=!1}){const f=AA.updateListener.of((e=>{e.docChanged&&r(e.state.doc.toString())})),m=AA.updateListener.of((e=>{const t=e.transactions.flatMap((e=>e.effects)).filter((e=>e.is(W$)));if(!t.length)return;const n=t.flatMap((e=>e.value));s(n)})),g=AA.contentAttributes.of(a),y=AA.domEventHandlers({keydown:o});"string"==typeof t&&(t=document.querySelector(t));const v=t?YA({tooltipSpace:function(){return t.getBoundingClientRect()}}):[],b=sB(i||n&&(e=>"markdown"===e?bI:null)(n)),x=[$D(),f,g,nN(),yD(),y,LA.of([...L$]),b,lB,m,v,h?XL:QL,...p?[jM()]:[],...u?[nk.transactionFilter.of((e=>e.newDoc.lines>1?[]:e))]:[],...d?[AA.lineWrapping]:[]];return l&&x.push(AA.editable.of(!1)),u&&c&&(c=c.toString().split("\n")[0]),this._cmEditor=new AA({state:nk.create({doc:c,extensions:x}),parent:e}),this}cB.prototype.setValue=function(e){this._cmEditor.dispatch({changes:{from:0,to:this._cmEditor.state.doc.length,insert:e}})},cB.prototype.focus=function(e){const t=this._cmEditor;if(t.contentDOM.focus(),t.focus(),"number"==typeof e){const n=t.state.doc.length;t.dispatch({selection:{anchor:e<=n?e:n}})}},cB.prototype.getSelection=function(){return this._cmEditor.state.selection};const pB=[KR("function(${params}) ${body}",{label:"function",detail:"definition",type:"keyword"}),KR("for ${var} in ${collection} return ${value}",{label:"for",detail:"expression",type:"keyword"}),KR("every ${var} in ${collection} satisfies ${condition}",{label:"every",detail:"quantified expression",type:"keyword"}),KR("some ${var} in ${collection} satisfies ${condition}",{label:"some",detail:"quantified expression",type:"keyword"}),KR("if ${condition} then ${value} else ${other value}",{label:"if",detail:"block",type:"keyword"}),KR("{ ${key}: ${value} }",{label:"context",detail:"block",type:"keyword"})];function uB(){return uB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{state:s,pos:a}=e,l=function(e,t){Array.isArray(t)||(t=[t]);for(;e;e=e.parent){if(t.includes(e.name))return e;if(e.type.isTop)break}return null}(UM(s).resolveInner(a,-1),n);return l?gB(l,a,[o,i])||function(e,t,n){return yB(e,t,n,1)}(l,a,[o,r])||r&&!gB(l,a,[r])?null:t(e):null}}({nodes:t,before:i,after:n,keyword:r},KD([{label:r,type:"keyword",boost:10}]))}const hB=[dB({context:"InExpression",keyword:"in"}),dB({context:"IfExpression",keyword:"then",after:"if",before:"else"}),dB({context:"IfExpression",keyword:"else",after:"then"}),dB({context:"QuantifiedExpression",keyword:"satisfies"}),dB({context:"ForExpression",after:"InExpressions",keyword:"return"})],fB=["StringLiteral","Identifier","LineComment","BlockComment","PathExpression"];function mB(e){return t=fB,n=KD(e.map((e=>uB({},e,{type:"text"})))),e=>{for(let n=UM(e.state).resolveInner(e.pos,-1);n;n=n.parent){if(t.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return n(e)};var t,n}function gB(e,t,n){return yB(e,t,n,-1)}function yB(e,t,n,i){let r=e[i>0?"childAfter":"childBefore"](t);for(;r;){if(n.includes(r.name))return r;if(r.type.isError&&r.firstChild&&n.includes(r.firstChild.name))return r.firstChild;r=r[i>0?"nextSibling":"prevSibling"]}return null}const vB=HM.define({parser:kL.configure({props:[lD.add({Context:fD({closing:"}"}),"List FilterExpression":fD({closing:"]"}),"ParenthesizedExpression FunctionInvocation":gD({except:/^\s*\)/}),"ForExpression QuantifiedExpression IfExpression":gD({except:/^\s*(then|else|return|satisfies)\b/}),FunctionDefinition:gD({except:/^\s*(\(|\))/})}),vD.add({Context:bD,List:bD,ParenthesizedExpression:bD,FunctionDefinition(e){const t=e.getChild(")");return t?{from:t.to,to:e.to}:null}})]}),languageData:{indentOnInput:/^\s*(\)|\}|\]|then|else|return|satisfies)$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}}),bB=vB.configure({top:"UnaryTests"},"FEEL unary tests"),xB=vB.configure({top:"Expression"},"FEEL expression");var wB=[nj(RL())];var _B=[AA.theme({"& .cm-content":{padding:"0px"},"& .cm-line":{padding:"0px"},"&.cm-editor.cm-focused":{outline:"none"},"& .cm-completionInfo":{whiteSpace:"pre-wrap",overflow:"hidden",textOverflow:"ellipsis"},"&.cm-editor":{height:"100%"},"& .cm-completionInfo > *":{whiteSpace:"normal"},"& .cm-completionInfo ul":{margin:0,paddingLeft:"15px"},"& .cm-completionInfo pre":{marginBottom:0,whiteSpace:"pre-wrap"},"& .cm-completionInfo p":{marginTop:0},"& .cm-completionInfo p:not(:last-of-type)":{marginBottom:0}}),AA.baseTheme({"& .variableName":{color:"#10f"},"& .number":{color:"#164"},"& .string":{color:"#a11"},"& .bool":{color:"#219"},"& .function":{color:"#aa3731",fontWeight:"bold"},"& .control":{color:"#708"}}),OD(xD.define([{tag:DO.variableName,class:"variableName"},{tag:DO.name,class:"variableName"},{tag:DO.number,class:"number"},{tag:DO.string,class:"string"},{tag:DO.bool,class:"bool"},{tag:DO.function(DO.variableName),class:"function"},{tag:DO.function(DO.special(DO.variableName)),class:"function"},{tag:DO.controlKeyword,class:"control"},{tag:DO.operatorKeyword,class:"control"}]))];function EB(e){return e&&e.from===e.to}function OB(e){return!!e&&("PathExpression"===e.name||OB(e.parent))}function PB({variables:e}){return t=>{const n=UM(t.state).resolve(t.pos,-1);if(!OB(n))return;const i=function(e){for(;e;){if("PathExpression"===e.name)return e;e=e.parent}}(n),r=n===i?t.pos:n.from,o=kB(i,t);let s=e;for(var a=0;ae.name===o[a].name));if(!l)return null;if("optional"!==l.isList&&!!l.isList!==o[a].isList)return;s=l.entries}if(!s)return;s=s.map((e=>({label:e.name,type:"variable",info:e.info,detail:e.detail})));return{from:r,options:s}}}function kB(e,t){let n=[];for(let i=e.firstChild;i;i=i.nextSibling)"PathExpression"===i.name?n.push(...kB(i,t)):"FilterExpression"===i.name?n.push(...SB(i,t)):n.push({name:CB(i,t),isList:!1});return n}function SB(e,t){const n=e.firstChild;if("PathExpression"===n.name){const e=kB(n,t);return e[e.length-1].isList=!0,e}return[{name:CB(n,t),isList:!0}]}function CB(e,t){return t.state.sliceDoc(e.from,e.to)}function TB({variables:e=[],builtins:t=[]}){const n=function(e,t){return[].concat(e.map((e=>AB(e))),t.map((e=>AB(e))))}(e,t);return n.length?e=>{const{pos:t,state:i}=e,r=UM(i).resolve(t,-1);return function(e,t){const n=e.nextSibling;return EB(e)||n&&n.from===t&&EB(n)}(r,t)?e.explicit?{from:t,options:n}:null:!function(e){return e&&e.parent&&"VariableName"===e.parent.name}(r)||OB(r)?null:{from:r.from,options:n}}:e=>null}function AB(e,t){return"function"===e.type?function(e,t){const{name:n,info:i,detail:r,params:o=[]}=e,s=o.map((({name:e,type:t},n)=>({name:e||`param ${n+1}`,type:t}))),a=`${n}(${s.map((e=>"${"+e.name+"}")).join(", ")})`,l=s.map((({name:e,type:t})=>t?`${e}: ${t}`:e)).join(", ");return KR(a,{label:`${n}(${l})`,type:"function",info:i,detail:r,boost:t})}(e,t):{label:e.name,type:"variable",info:e.info,detail:e.detail,boost:t}}function MB({variables:e=[],builtins:t=[]}){return[PB({variables:e}),TB({variables:e,builtins:t}),mB(pB.map((e=>({...e,boost:-1})))),...hB]}function DB(e){return function(e={}){const t="unaryTests"===e.dialect?bB:xB,n=e.parserDialect,i=wL(e.context),r=t.configure({contextTracker:i,dialect:n}),o=e.completions||[mB(pB),hB].flat();return new tD(r,[...o.map((e=>r.data.of({autocomplete:e})))])}(e)}const RB=fP.define(),NB=fP.define(),$B=fP.define();function jB({dialect:e="expression",variables:t=[],builtins:n=[],completions:i=MB({builtins:n,variables:t})}){const r=function(e){return e.slice().reverse().reduce(((e,t)=>(e[t.name]=()=>{},e)),{})}([...t,...n]);return[$B.of(e),RB.of(n),NB.of(t),DB({dialect:e,context:r,completions:i})]}function IB(e){const{name:t,description:n}=e,i=t.match(/^([\w\s]+)\((.*)\)$/),r=i[1],o=i[2],s=o?o.split(", ").map((e=>({name:e}))):[];return{name:r,type:"function",params:s,info:()=>be(`
    ${n}
    `),boost:0}}const LB=[{name:"not(negand)",description:'

    Returns the logical negation of the given value.

    \n

    Function signature

    \n
    not(negand: boolean): boolean\n
    \n

    Examples

    \n
    not(true)\n// false\n\nnot(null)\n// null\n
    \n'},{name:"is defined(value)",description:'

    Camunda Extension

    \n

    Checks if a given value is not null. If the value is null then the function returns false.\nOtherwise, the function returns true.

    \n

    Function signature

    \n
    is defined(value: Any): boolean\n
    \n

    Examples

    \n
    is defined(1)\n// true\n\nis defined(null)\n// false\n\nis defined(x)\n// false - if no variable "x" exists\n\nis defined(x.y)\n// false - if no variable "x" exists or it doesn't have a property "y"\n
    \n

    :::caution Breaking change

    \n

    This function worked differently in previous versions. It returned true if the value was null.\nSince this version, the function returns false if the value is null.

    \n

    :::

    \n'},{name:"get or else(value, default)",description:'

    Camunda Extension

    \n

    Return the provided value parameter if not null, otherwise return the default parameter

    \n

    Function signature

    \n
    get or else(value: Any, default: Any): Any\n
    \n

    Examples

    \n
    get or else("this", "default")\n// "this"\n\nget or else(null, "default")\n// "default"\n\nget or else(null, null)\n// null\n
    \n'},{name:"assert(value, condition)",description:'

    Camunda Extension

    \n

    Verify that the given condition is met. If the condition is true, the function returns the value.\nOtherwise, the evaluation fails with an error.

    \n

    Function signature

    \n
    assert(value: Any, condition: Any)\n
    \n

    Examples

    \n
    assert(x, x != null)\n// "value" - if x is "value"\n// error - if x is null or doesn't exist\n\nassert(x, x >= 0)\n// 4 - if x is 4\n// error - if x is less than zero\n
    \n'},{name:"assert(value, condition, cause)",description:'

    Camunda Extension

    \n

    Verify that the given condition is met. If the condition is true, the function returns the value.\nOtherwise, the evaluation fails with an error containing the given message.

    \n

    Function signature

    \n
    assert(value: Any, condition: Any, cause: String)\n
    \n

    Examples

    \n
    assert(x, x != null, "'x' should not be null")\n// "value" - if x is "value"\n// error('x' should not be null) - if x is null or doesn't exist\n\nassert(x, x >= 0, "'x' should be positive")\n// 4 - if x is 4\n// error('x' should be positive) - if x is less than zero\n
    \n'},{name:"get value(context, key)",description:'

    Returns the value of the context entry with the given key.

    \n

    Function signature

    \n
    get value(context: context, key: string): Any\n
    \n

    Examples

    \n
    get value({foo: 123}, "foo")\n// 123\n\nget value({a: 1}, "b")\n// null\n
    \n'},{name:"get value(context, keys)",description:'

    Camunda Extension

    \n

    Returns the value of the context entry for a context path defined by the given keys.

    \n

    If keys contains the keys [k1, k2] then it returns the value at the nested entry k1.k2 of the context.

    \n

    If keys are empty or the nested entry defined by the keys doesn't exist in the context, it returns null.

    \n

    Function signature

    \n
    get value(context: context, keys: list<string>): Any\n
    \n

    Examples

    \n
    get value({x:1, y: {z:0}}, ["y", "z"])\n// 0\n\nget value({x: {y: {z:0}}}, ["x", "y"])\n// {z:0}\n\nget value({a: {b: 3}}, ["b"])\n// null\n
    \n'},{name:"get entries(context)",description:'

    Returns the entries of the context as a list of key-value-pairs.

    \n

    Function signature

    \n
    get entries(context: context): list<context>\n
    \n

    The return value is a list of contexts. Each context contains two entries for "key" and "value".

    \n

    Examples

    \n
    get entries({foo: 123})\n// [{key: "foo", value: 123}]\n
    \n'},{name:"context put(context, key, value)",description:'

    Adds a new entry with the given key and value to the context. Returns a new context that includes the entry.

    \n

    If an entry for the same key already exists in the context, it overrides the value.

    \n

    Function signature

    \n
    context put(context: context, key: string, value: Any): context\n
    \n

    Examples

    \n
    context put({x:1}, "y", 2)\n// {x:1, y:2}\n
    \n

    :::info\nThe function context put() replaced the previous function put() (Camunda Extension). The\nprevious function is deprecated and should not be used anymore.\n:::

    \n'},{name:"context put(context, keys, value)",description:'

    Adds a new entry with the given value to the context. The path of the entry is defined by the keys. Returns a new context that includes the entry.

    \n

    If keys contains the keys [k1, k2] then it adds the nested entry k1.k2 = value to the context.

    \n

    If an entry for the same keys already exists in the context, it overrides the value.

    \n

    If keys are empty, it returns null.

    \n

    Function signature

    \n
    context put(context: context, keys: list<string>, value: Any): context\n
    \n

    Examples

    \n
    context put({x:1}, ["y"], 2)\n// {x:1, y:2}\n\ncontext put({x:1, y: {z:0}}, ["y", "z"], 2)\n// {x:1, y: {z:2}}\n\ncontext put({x:1}, ["y", "z"], 2)\n// {x:1, y: {z:2}}\n
    \n'},{name:"context merge(contexts)",description:'

    Union the given contexts. Returns a new context that includes all entries of the given contexts.

    \n

    If an entry for the same key already exists in a context, it overrides the value. The entries are overridden in the same order as in the list of contexts.

    \n

    Function signature

    \n
    context merge(contexts: list<context>): context\n
    \n

    Examples

    \n
    context merge([{x:1}, {y:2}])\n// {x:1, y:2}\n\ncontext merge([{x:1, y: 0}, {y:2}])\n// {x:1, y:2}\n
    \n

    :::info\nThe function context merge() replaced the previous function put all() (Camunda Extension). The\nprevious function is deprecated and should not be used anymore.\n:::

    \n'},{name:"string(from)",description:'

    Returns the given value as a string representation.

    \n

    Function signature

    \n
    string(from: Any): string\n
    \n

    Examples

    \n
    string(1.1)\n// "1.1"\n\nstring(date("2012-12-25"))\n// "2012-12-25"\n
    \n'},{name:"number(from)",description:'

    Parses the given string to a number.

    \n

    Function signature

    \n
    number(from: string): number\n
    \n

    Examples

    \n
    number("1500.5")\n// 1500.5\n
    \n'},{name:"context(entries)",description:'

    Constructs a context of the given list of key-value pairs. It is the reverse function to get entries().

    \n

    Each key-value pair must be a context with two entries: key and value. The entry with name key must have a value of the type string.

    \n

    It might override context entries if the keys are equal. The entries are overridden in the same order as the contexts in the given list.

    \n

    Returns null if one of the entries is not a context or if a context doesn't contain the required entries.

    \n

    Function signature

    \n
    context(entries: list<context>): context\n
    \n

    Examples

    \n
    context([{"key":"a", "value":1}, {"key":"b", "value":2}])\n// {a:1, b:2}\n
    \n'},{name:"date(from)",description:'

    Returns a date from the given value.

    \n

    Function signature

    \n
    date(from: string): date\n
    \n

    Parses the given string into a date.

    \n
    date(from: date and time): date\n
    \n

    Extracts the date component from the given date and time.

    \n

    Examples

    \n
    date("2018-04-29")\n// date("2018-04-29")\n\ndate(date and time("2012-12-25T11:00:00"))\n// date("2012-12-25")\n
    \n'},{name:"date(year, month, day)",description:'

    Returns a date from the given components.

    \n

    Function signature

    \n
    date(year: number, month: number, day: number): date\n
    \n

    Examples

    \n
    date(2012, 12, 25)\n// date("2012-12-25")\n
    \n'},{name:"time(from)",description:'

    Returns a time from the given value.

    \n

    Function signature

    \n
    time(from: string): time\n
    \n

    Parses the given string into a time.

    \n
    time(from: date and time): time\n
    \n

    Extracts the time component from the given date and time.

    \n

    Examples

    \n
    time("12:00:00")\n// time("12:00:00")\n\ntime(date and time("2012-12-25T11:00:00"))\n// time("11:00:00")\n
    \n'},{name:"time(hour, minute, second)",description:'

    Returns a time from the given components.

    \n

    Function signature

    \n
    time(hour: number, minute: number, second: number): time\n
    \n

    Examples

    \n
    time(23, 59, 0)\n// time("23:59:00")\n
    \n'},{name:"time(hour, minute, second, offset)",description:'

    Returns a time from the given components, including a timezone offset.

    \n

    Function signature

    \n
    time(hour: number, minute: number, second: number, offset: days and time duration): time\n
    \n

    Examples

    \n
    time(14, 30, 0, duration("PT1H"))\n// time("14:30:00+01:00")\n
    \n'},{name:"date and time(from)",description:'

    Parses the given string into a date and time.

    \n

    Function signature

    \n
    date and time(from: string): date and time\n
    \n

    Examples

    \n
    date and time("2018-04-29T09:30:00")\n// date and time("2018-04-29T09:30:00")\n
    \n'},{name:"date and time(date, time)",description:'

    Returns a date and time from the given components.

    \n

    Function signature

    \n
    date and time(date: date, time: time): date and time\n
    \n
    date and time(date: date and time, time: time): date and time\n
    \n

    Returns a date and time value that consists of the date component of date combined with time.

    \n

    Examples

    \n
    date and time(date("2012-12-24"),time("T23:59:00"))\n// date and time("2012-12-24T23:59:00")\n\ndate and time(date and time("2012-12-25T11:00:00"),time("T23:59:00"))\n// date and time("2012-12-25T23:59:00")\n
    \n'},{name:"date and time(date, timezone)",description:'

    Camunda Extension

    \n

    Returns the given date and time value at the given timezone.

    \n

    If date has a different timezone than timezone then it adjusts the time to match the local time of timezone.

    \n

    Function signature

    \n
    date and time(date: date and time, timezone: string): date and time\n
    \n

    Examples

    \n
    date and time(@"2020-07-31T14:27:30@Europe/Berlin", "America/Los_Angeles")\n// date and time("2020-07-31T05:27:30@America/Los_Angeles")\n\ndate and time(@"2020-07-31T14:27:30", "Z")\n// date and time("2020-07-31T12:27:30Z")\n
    \n'},{name:"duration(from)",description:'

    Parses the given string into a duration. The duration is either a days and time duration or a years and months duration.

    \n

    Function signature

    \n
    duration(from: string): days and time duration\n
    \n
    duration(from: string): years and months duration\n
    \n

    Examples

    \n
    duration("P5D")\n// duration("P5D")\n\nduration("P32Y")\n// duration("P32Y")\n
    \n'},{name:"years and months duration(from, to)",description:'

    Returns the years and months duration between from and to.

    \n

    Function signature

    \n
    years and months duration(from: date, to: date): years and months duration\n
    \n

    Examples

    \n
    years and months duration(date("2011-12-22"), date("2013-08-24"))\n// duration("P1Y8M")\n
    \n'},{name:"list contains(list, element)",description:'

    Returns true if the given list contains the element. Otherwise, returns false.

    \n

    Function signature

    \n
    list contains(list: list, element: Any): boolean\n
    \n

    Examples

    \n
    list contains([1,2,3], 2)\n// true\n
    \n'},{name:"count(list)",description:'

    Returns the number of elements of the given list.

    \n

    Function signature

    \n
    count(list: list): number\n
    \n

    Examples

    \n
    count([1,2,3])\n// 3\n
    \n'},{name:"min(list)",description:'

    Returns the minimum of the given list.

    \n

    Function signature

    \n
    min(list: list): Any\n
    \n

    All elements in list should have the same type and be comparable.

    \n

    The parameter list can be passed as a list or as a sequence of elements.

    \n

    Examples

    \n
    min([1,2,3])\n// 1\n\nmin(1,2,3)\n// 1\n
    \n'},{name:"max(list)",description:'

    Returns the maximum of the given list.

    \n

    Function signature

    \n
    max(list: list): Any\n
    \n

    All elements in list should have the same type and be comparable.

    \n

    The parameter list can be passed as a list or as a sequence of elements.

    \n

    Examples

    \n
    max([1,2,3])\n// 3\n\nmax(1,2,3)\n// 3\n
    \n'},{name:"sum(list)",description:'

    Returns the sum of the given list of numbers.

    \n

    Function signature

    \n
    sum(list: list<number>): number\n
    \n

    The parameter list can be passed as a list or as a sequence of elements.

    \n

    Examples

    \n
    sum([1,2,3])\n// 6\n\nsum(1,2,3)\n// 6\n
    \n'},{name:"product(list)",description:'

    Returns the product of the given list of numbers.

    \n

    Function signature

    \n
    product(list: list<number>): number\n
    \n

    The parameter list can be passed as a list or as a sequence of elements.

    \n

    Examples

    \n
    product([2, 3, 4])\n// 24\n\nproduct(2, 3, 4)\n// 24\n
    \n'},{name:"mean(list)",description:'

    Returns the arithmetic mean (i.e. average) of the given list of numbers.

    \n

    Function signature

    \n
    mean(list: list<number>): number\n
    \n

    The parameter list can be passed as a list or as a sequence of elements.

    \n

    Examples

    \n
    mean([1,2,3])\n// 2\n\nmean(1,2,3)\n// 2\n
    \n'},{name:"median(list)",description:'

    Returns the median element of the given list of numbers.

    \n

    Function signature

    \n
    median(list: list<number>): number\n
    \n

    The parameter list can be passed as a list or as a sequence of elements.

    \n

    Examples

    \n
    median(8, 2, 5, 3, 4)\n// 4\n\nmedian([6, 1, 2, 3])\n// 2.5\n
    \n'},{name:"stddev(list)",description:'

    Returns the standard deviation of the given list of numbers.

    \n

    Function signature

    \n
    stddev(list: list<number>): number\n
    \n

    The parameter list can be passed as a list or as a sequence of elements.

    \n

    Examples

    \n
    stddev(2, 4, 7, 5)\n// 2.0816659994661326\n\nstddev([2, 4, 7, 5])\n// 2.0816659994661326\n
    \n'},{name:"mode(list)",description:'

    Returns the mode of the given list of numbers.

    \n

    Function signature

    \n
    mode(list: list<number>): number\n
    \n

    The parameter list can be passed as a list or as a sequence of elements.

    \n

    Examples

    \n
    mode(6, 3, 9, 6, 6)\n// [6]\n\nmode([6, 1, 9, 6, 1])\n// [1, 6]\n
    \n'},{name:"all(list)",description:'

    Returns false if any element of the given list is false. Otherwise, returns true.

    \n

    If the given list is empty, it returns true.

    \n

    Function signature

    \n
    all(list: list<boolean>): boolean\n
    \n

    The parameter list can be passed as a list or as a sequence of elements.

    \n

    Examples

    \n
    all([true,false])\n// false\n\nall(false,null,true)\n// false\n
    \n

    :::info\nThe function all() replaced the previous function and(). The previous function is deprecated and\nshould not be used anymore.\n:::

    \n'},{name:"any(list)",description:'

    Returns true if any element of the given list is true. Otherwise, returns false.

    \n

    If the given list is empty, it returns false.

    \n

    Function signature

    \n
    any(list: list<boolean>): boolean\n
    \n

    The parameter list can be passed as a list or as a sequence of elements.

    \n

    Examples

    \n
    any([false,true])\n// true\n\nany(false,null,true)\n// true\n
    \n

    :::info\nThe function any() replaced the previous function or(). The previous function is deprecated and\nshould not be used anymore.\n:::

    \n'},{name:"sublist(list, start position)",description:'

    Returns a partial list of the given value starting at start position.

    \n

    Function signature

    \n
    sublist(list: list, start position: number): list\n
    \n

    The start position starts at the index 1. The last position is -1.

    \n

    Examples

    \n
    sublist([1,2,3], 2)\n// [2,3]\n
    \n'},{name:"sublist(list, start position, length)",description:'

    Returns a partial list of the given value starting at start position.

    \n

    Function signature

    \n
    sublist(list: list, start position: number, length: number): list\n
    \n

    The start position starts at the index 1. The last position is -1.

    \n

    Examples

    \n
    sublist([1,2,3], 1, 2)\n// [1,2]\n
    \n'},{name:"append(list, items)",description:'

    Returns the given list with all items appended.

    \n

    Function signature

    \n
    append(list: list, items: Any): list\n
    \n

    The parameter items can be a single element or a sequence of elements.

    \n

    Examples

    \n
    append([1], 2, 3)\n// [1,2,3]\n
    \n'},{name:"concatenate(lists)",description:'

    Returns a list that includes all elements of the given lists.

    \n

    Function signature

    \n
    concatenate(lists: list): list\n
    \n

    The parameter lists is a sequence of lists.

    \n

    Examples

    \n
    concatenate([1,2],[3])\n// [1,2,3]\n\nconcatenate([1],[2],[3])\n// [1,2,3]\n
    \n'},{name:"insert before(list, position, newItem)",description:'

    Returns the given list with newItem inserted at position.

    \n

    Function signature

    \n
    insert before(list: list, position: number, newItem: Any): list\n
    \n

    The position starts at the index 1. The last position is -1.

    \n

    Examples

    \n
    insert before([1,3],1,2)\n// [2,1,3]\n
    \n'},{name:"remove(list, position)",description:'

    Returns the given list without the element at position.

    \n

    Function signature

    \n
    remove(list: list, position: number): list\n
    \n

    The position starts at the index 1. The last position is -1.

    \n

    Examples

    \n
    remove([1,2,3], 2)\n// [1,3]\n
    \n'},{name:"reverse(list)",description:'

    Returns the given list in revered order.

    \n

    Function signature

    \n
    reverse(list: list): list\n
    \n

    Examples

    \n
    reverse([1,2,3])\n// [3,2,1]\n
    \n'},{name:"index of(list, match)",description:'

    Returns an ascending list of positions containing match.

    \n

    Function signature

    \n
    index of(list: list, match: Any): list<number>\n
    \n

    Examples

    \n
    index of([1,2,3,2],2)\n// [2,4]\n
    \n'},{name:"union(list)",description:'

    Returns a list that includes all elements of the given lists without duplicates.

    \n

    Function signature

    \n
    union(list: list): list\n
    \n

    The parameter list is a sequence of lists.

    \n

    Examples

    \n
    union([1,2],[2,3])\n// [1,2,3]\n
    \n'},{name:"distinct values(list)",description:'

    Returns the given list without duplicates.

    \n

    Function signature

    \n
    distinct values(list: list): list\n
    \n

    Examples

    \n
    distinct values([1,2,3,2,1])\n// [1,2,3]\n
    \n'},{name:"duplicate values(list)",description:'

    Camunda Extension

    \n

    Returns all duplicate values of the given list.

    \n

    Function signature

    \n
    duplicate values(list: list): list\n
    \n

    Examples

    \n
    duplicate values([1,2,3,2,1])\n// [1,2]\n
    \n'},{name:"flatten(list)",description:'

    Returns a list that includes all elements of the given list without nested lists.

    \n

    Function signature

    \n
    flatten(list: list): list\n
    \n

    Examples

    \n
    flatten([[1,2],[[3]], 4])\n// [1,2,3,4]\n
    \n'},{name:"sort(list, precedes)",description:'

    Returns the given list sorted by the precedes function.

    \n

    Function signature

    \n
    sort(list: list, precedes: function<(Any, Any) -> boolean>): list\n
    \n

    Examples

    \n
    sort(list: [3,1,4,5,2], precedes: function(x,y) x < y)\n// [1,2,3,4,5]\n
    \n'},{name:"string join(list)",description:'

    Joins a list of strings into a single string. This is similar to\nJava's joining\nfunction.

    \n

    If an item of the list is null, the item is ignored for the result string. If an item is\nneither a string nor null, the function returns null instead of a string.

    \n

    Function signature

    \n
    string join(list: list<string>): string\n
    \n

    Examples

    \n
    string join(["a","b","c"])\n// "abc"\n\nstring join(["a",null,"c"])\n// "ac"\n\nstring join([])\n// ""\n
    \n'},{name:"string join(list, delimiter)",description:'

    Joins a list of strings into a single string. This is similar to\nJava's joining\nfunction.

    \n

    If an item of the list is null, the item is ignored for the result string. If an item is\nneither a string nor null, the function returns null instead of a string.

    \n

    The resulting string contains a delimiter between each element.

    \n

    Function signature

    \n
    string join(list: list<string>, delimiter: string): string\n
    \n

    Examples

    \n
    string join(["a"], "X")\n// "a"\n\nstring join(["a","b","c"], ", ")\n// "a, b, c"\n
    \n'},{name:"string join(list, delimiter, prefix, suffix)",description:'

    Camunda Extension

    \n

    Joins a list of strings into a single string. This is similar to\nJava's joining\nfunction.

    \n

    If an item of the list is null, the item is ignored for the result string. If an item is\nneither a string nor null, the function returns null instead of a string.

    \n

    The resulting string starts with prefix, contains a delimiter between each element, and ends\nwith suffix.

    \n

    Function signature

    \n
    string join(list: list<string>, delimiter: string, prefix: string, suffix: string): string\n
    \n

    Examples

    \n
    string join(["a","b","c"], ", ", "[", "]")\n// "[a, b, c]"\n
    \n'},{name:"decimal(n, scale)",description:'

    Rounds the given value at the given scale.

    \n

    Function signature

    \n
    decimal(n: number, scale: number): number\n
    \n

    Examples

    \n
    decimal(1/3, 2)\n// .33\n\ndecimal(1.5, 0)\n// 2\n
    \n'},{name:"floor(n)",description:'

    Rounds the given value with rounding mode flooring.

    \n

    Function signature

    \n
    floor(n: number): number\n
    \n

    Examples

    \n
    floor(1.5)\n// 1\n\nfloor(-1.5)\n// -2\n
    \n'},{name:"floor(n, scale)",description:'

    Rounds the given value with rounding mode flooring at the given scale.

    \n

    Function signature

    \n
    floor(n: number, scale: number): number\n
    \n

    Examples

    \n
    floor(-1.56, 1)\n// -1.6\n
    \n'},{name:"ceiling(n)",description:'

    Rounds the given value with rounding mode ceiling.

    \n

    Function signature

    \n
    ceiling(n: number): number\n
    \n

    Examples

    \n
    ceiling(1.5)\n// 2\n\nceiling(-1.5)\n// -1\n
    \n'},{name:"ceiling(n, scale)",description:'

    Rounds the given value with rounding mode ceiling at the given scale.

    \n

    Function signature

    \n
    ceiling(n: number, scale: number): number\n
    \n

    Examples

    \n
    ceiling(-1.56, 1)\n// -1.5\n
    \n'},{name:"round up(n, scale)",description:'

    Rounds the given value with the rounding mode round-up at the given scale.

    \n

    Function signature

    \n
    round up(n: number, scale: number): number\n
    \n

    Examples

    \n
    round up(5.5)\n// 6\n\nround up(-5.5)\n// -6\n\nround up(1.121, 2)\n// 1.13\n\nround up(-1.126, 2)\n// -1.13\n
    \n'},{name:"round down(n, scale)",description:'

    Rounds the given value with the rounding mode round-down at the given scale.

    \n

    Function signature

    \n
    round down(n: number, scale: number): number\n
    \n

    Examples

    \n
    round down(5.5, 0)\n// 5\n\nround down (-5.5, 0)\n// -5\n\nround down (1.121, 2)\n// 1.12\n\nround down (-1.126, 2)\n// -1.12\n
    \n'},{name:"round half up(n, scale)",description:'

    Rounds the given value with the rounding mode round-half-up at the given scale.

    \n

    Function signature

    \n
    round half up(n: number, scale: number): number\n
    \n

    Examples

    \n
    round half up(5.5, 0)\n// 6\n\nround half up(-5.5, 0)\n// -6\n\nround half up(1.121, 2)\n// 1.12\n\nround half up(-1.126, 2)\n// -1.13\n
    \n'},{name:"round half down(n, scale)",description:'

    Rounds the given value with the rounding mode round-half-down at the given scale.

    \n

    Function signature

    \n
    round half down(n: number, scale: number): number\n
    \n

    Examples

    \n
    round half down (5.5, 0)\n// 5\n\nround half down (-5.5, 0)\n// -5\n\nround half down (1.121, 2)\n// 1.12\n\nround half down (-1.126, 2)\n// -1.13\n
    \n'},{name:"abs(number)",description:'

    Returns the absolute value of the given numeric value.

    \n

    Function signature

    \n
    abs(number: number): number\n
    \n

    Examples

    \n
    abs(10)\n// 10\n\nabs(-10)\n// 10\n
    \n'},{name:"modulo(dividend, divisor)",description:'

    Returns the remainder of the division of dividend by divisor.

    \n

    Function signature

    \n
    modulo(dividend: number, divisor: number): number\n
    \n

    Examples

    \n
    modulo(12, 5)\n// 2\n
    \n'},{name:"sqrt(number)",description:'

    Returns the square root of the given value.

    \n

    Function signature

    \n
    sqrt(number: number): number\n
    \n

    Examples

    \n
    sqrt(16)\n// 4\n
    \n'},{name:"log(number)",description:'

    Returns the natural logarithm (base e) of the given value.

    \n

    Function signature

    \n
    log(number: number): number\n
    \n

    Examples

    \n
    log(10)\n// 2.302585092994046\n
    \n'},{name:"exp(number)",description:'

    Returns the Euler’s number e raised to the power of the given number .

    \n

    Function signature

    \n
    exp(number: number): number\n
    \n

    Examples

    \n
    exp(5)\n// 148.4131591025766\n
    \n'},{name:"odd(number)",description:'

    Returns true if the given value is odd. Otherwise, returns false.

    \n

    Function signature

    \n
    odd(number: number): boolean\n
    \n

    Examples

    \n
    odd(5)\n// true\n\nodd(2)\n// false\n
    \n'},{name:"even(number)",description:'

    Returns true if the given is even. Otherwise, returns false.

    \n

    Function signature

    \n
    even(number: number): boolean\n
    \n

    Examples

    \n
    even(5)\n// false\n\neven(2)\n// true\n
    \n'},{name:"random number()",description:'

    Camunda Extension

    \n

    Returns a random number between 0 and 1.

    \n

    Function signature

    \n
    random number(): number\n
    \n

    Examples

    \n
    random number()\n// 0.9701618132579795\n
    \n'},{name:"before(point1, point2)",description:'

    Function signature

    \n
    before(point1: Any, point2: Any): boolean\n
    \n

    Examples

    \n
    before(1, 10)\n// true\n\nbefore(10, 1)\n// false\n
    \n'},{name:"before(range, point)",description:'

    Function signature

    \n
    before(range: range, point: Any): boolean\n
    \n

    Examples

    \n
    before([1..5], 10)\n// true\n
    \n'},{name:"before(point, range)",description:'

    Function signature

    \n
    before(point: Any, range: range): boolean\n
    \n

    Examples

    \n
    before(1, [2..5])\n// true\n
    \n'},{name:"before(range1, range2)",description:'

    Function signature

    \n
    before(range1: range, range2: range): boolean\n
    \n

    Examples

    \n
    before([1..5], [6..10])\n// true\n\nbefore([1..5),[5..10])\n// true\n
    \n'},{name:"after(point1, point2)",description:'

    Function signature

    \n
    after(point1: Any, point2: Any): boolean\n
    \n

    Examples

    \n
    after(10, 1)\n// true\n\nafter(1, 10)\n// false\n
    \n'},{name:"after(range, point)",description:'

    Function signature

    \n
    after(range: range, point: Any): boolean\n
    \n

    Examples

    \n
    after([1..5], 10)\n// false\n
    \n'},{name:"after(point, range)",description:'

    Function signature

    \n
    after(point: Any, range: range): boolean\n
    \n

    Examples

    \n
    after(12, [2..5])\n// true\n
    \n'},{name:"after(range1, range2)",description:'

    Function signature

    \n
    after(range1: range, range2: range): boolean\n
    \n

    Examples

    \n
    after([6..10], [1..5])\n// true\n\nafter([5..10], [1..5))\n// true\n
    \n'},{name:"meets(range1, range2)",description:'

    Function signature

    \n
    meets(range1: range, range2: range): boolean\n
    \n

    Examples

    \n
    meets([1..5], [5..10])\n// true\n\nmeets([1..3], [4..6])\n// false\n\nmeets([1..3], [3..5])\n// true\n\nmeets([1..5], (5..8])\n// false\n
    \n'},{name:"met by(range1, range2)",description:'

    Function signature

    \n
    met by(range1: range, range2: range): boolean\n
    \n

    Examples

    \n
    met by([5..10], [1..5])\n// true\n\nmet by([3..4], [1..2])\n// false\n\nmet by([3..5], [1..3])\n// true\n\nmet by((5..8], [1..5))\n// false\n\nmet by([5..10], [1..5))\n// false\n
    \n'},{name:"overlaps(range1, range2)",description:'

    Function signature

    \n
    overlaps(range1: range, range2: range): boolean\n
    \n

    Examples

    \n
    overlaps([5..10], [1..6])\n// true\n\noverlaps((3..7], [1..4])\n// true\n\noverlaps([1..3], (3..6])\n// false\n\noverlaps((5..8], [1..5))\n// false\n\noverlaps([4..10], [1..5))\n// true\n
    \n'},{name:"overlaps before(range1, range2)",description:'

    Function signature

    \n
    overlaps before(range1: range, range2: range): boolean\n
    \n

    Examples

    \n
    overlaps before([1..5], [4..10])\n// true\n\noverlaps before([3..4], [1..2])\n// false\n\noverlaps before([1..3], (3..5])\n// false\n\noverlaps before([1..5), (3..8])\n// true\n\noverlaps before([1..5), [5..10])\n// false\n
    \n'},{name:"overlaps after(range1, range2)",description:'

    Function signature

    \n
    overlaps after(range1: range, range2: range): boolean\n
    \n

    Examples

    \n
    overlaps after([4..10], [1..5])\n// true\n\noverlaps after([3..4], [1..2])\n// false\n\noverlaps after([3..5], [1..3))\n// false\n\noverlaps after((5..8], [1..5))\n// false\n\noverlaps after([4..10], [1..5))\n// true\n
    \n'},{name:"finishes(point, range)",description:'

    Function signature

    \n
    finishes(point: Any, range: range): boolean\n
    \n

    Examples

    \n
    finishes(5, [1..5])\n// true\n\nfinishes(10, [1..7])\n// false\n
    \n'},{name:"finishes(range1, range2)",description:'

    Function signature

    \n
    finishes(range1: range, range2: range): boolean\n
    \n

    Examples

    \n
    finishes([3..5], [1..5])\n// true\n\nfinishes((1..5], [1..5))\n// false\n\nfinishes([5..10], [1..10))\n// false\n
    \n'},{name:"finished by(range, point)",description:'

    Function signature

    \n
    finished by(range: range, point: Any): boolean\n
    \n

    Examples

    \n
    finished by([5..10], 10)\n// true\n\nfinished by([3..4], 2)\n// false\n
    \n'},{name:"finished by(range1, range2)",description:'

    Function signature

    \n
    finished by(range1: range, range2: range): boolean\n
    \n

    Examples

    \n
    finished by([1..5], [3..5])\n// true\n\nfinished by((5..8], [1..5))\n// false\n\nfinished by([5..10], (1..10))\n// false\n
    \n'},{name:"includes(range, point)",description:'

    Function signature

    \n
    includes(range: range, point: Any): boolean\n
    \n

    Examples

    \n
    includes([5..10], 6)\n// true\n\nincludes([3..4], 5)\n// false\n
    \n'},{name:"includes(range1, range2)",description:'

    Function signature

    \n
    includes(range1: range, range2: range): boolean\n
    \n

    Examples

    \n
    includes([1..10], [4..6])\n// true\n\nincludes((5..8], [1..5))\n// false\n\nincludes([1..10], [1..5))\n// true\n
    \n'},{name:"during(point, range)",description:'

    Function signature

    \n
    during(point: Any, range: range): boolean\n
    \n

    Examples

    \n
    during(5, [1..10])\n// true\n\nduring(12, [1..10])\n// false\n\nduring(1, (1..10])\n// false\n
    \n'},{name:"during(range1, range2)",description:'

    Function signature

    \n
    during(range1: range, range2: range): boolean\n
    \n

    Examples

    \n
    during([4..6], [1..10))\n// true\n\nduring((1..5], (1..10])\n// true\n
    \n'},{name:"starts(point, range)",description:'

    Function signature

    \n
    starts(point: Any, range: range): boolean\n
    \n

    Examples

    \n
    starts(1, [1..5])\n// true\n\nstarts(1, (1..8])\n// false\n
    \n'},{name:"starts(range1, range2)",description:'

    Function signature

    \n
    starts(range1: range, range2: range): boolean\n
    \n

    Examples

    \n
    starts((1..5], [1..5])\n// false\n\nstarts([1..10], [1..5])\n// false\n\nstarts((1..5), (1..10))\n// true\n
    \n'},{name:"started by(range, point)",description:'

    Function signature

    \n
    started by(range: range, point: Any): boolean\n
    \n

    Examples

    \n
    started by([1..10], 1)\n// true\n\nstarted by((1..10], 1)\n// false\n
    \n'},{name:"started by(range1, range2)",description:'

    Function signature

    \n
    started by(range1: range, range2: range): boolean\n
    \n

    Examples

    \n
    started by([1..10], [1..5])\n// true\n\nstarted by((1..10], [1..5))\n// false\n\nstarted by([1..10], [1..10))\n// true\n
    \n'},{name:"coincides(point1, point2)",description:'

    Function signature

    \n
    coincides(point1: Any, point2: Any): boolean\n
    \n

    Examples

    \n
    coincides(5, 5)\n// true\n\ncoincides(3, 4)\n// false\n
    \n'},{name:"coincides(range1, range2)",description:'

    Function signature

    \n
    coincides(range1: range, range2: range): boolean\n
    \n

    Examples

    \n
    coincides([1..5], [1..5])\n// true\n\ncoincides((1..5], [1..5))\n// false\n\ncoincides([1..5], [2..6])\n// false\n
    \n'},{name:"substring(string, start position)",description:'

    Returns a substring of the given value starting at start position.

    \n

    Function signature

    \n
    substring(string: string, start position: number): string\n
    \n

    The start position starts at the index 1. The last position is -1.

    \n

    Examples

    \n
    substring("foobar", 3)\n// "obar"\n
    \n'},{name:"substring(string, start position, length)",description:'

    Returns a substring of the given value starting at start position.

    \n

    Function signature

    \n
    substring(string: string, start position: number, length: number): string\n
    \n

    The start position starts at the index 1. The last position is -1.

    \n

    Examples

    \n
    substring("foobar", 3, 3)\n// "oba"\n
    \n'},{name:"string length(string)",description:'

    Returns the number of characters in the given value.

    \n

    Function signature

    \n
    string length(string: string): number\n
    \n

    Examples

    \n
    string length("foo")\n// 3\n
    \n'},{name:"upper case(string)",description:'

    Returns the given value with all characters are uppercase.

    \n

    Function signature

    \n
    upper case(string: string): string\n
    \n

    Examples

    \n
    upper case("aBc4")\n// "ABC4"\n
    \n'},{name:"lower case(string)",description:'

    Returns the given value with all characters are lowercase.

    \n

    Function signature

    \n
    lower case(string: string): string\n
    \n

    Examples

    \n
    lower case("aBc4")\n// "abc4"\n
    \n'},{name:"substring before(string, match)",description:'

    Returns a substring of the given value that contains all characters before match.

    \n

    Function signature

    \n
    substring before(string: string, match: string): string\n
    \n

    Examples

    \n
    substring before("foobar", "bar")\n// "foo"\n
    \n'},{name:"substring after(string, match)",description:'

    Returns a substring of the given value that contains all characters after match.

    \n

    Function signature

    \n
    substring after(string: string, match: string): string\n
    \n

    Examples

    \n
    substring after("foobar", "ob")\n// "ar"\n
    \n'},{name:"contains(string, match)",description:'

    Returns true if the given value contains the substring match. Otherwise, returns false.

    \n

    Function signature

    \n
    contains(string: string, match: string): boolean\n
    \n

    Examples

    \n
    contains("foobar", "of")\n// false\n
    \n'},{name:"starts with(string, match)",description:'

    Returns true if the given value starts with the substring match. Otherwise, returns false.

    \n

    Function signature

    \n
    starts with(string: string, match: string): boolean\n
    \n

    Examples

    \n
    starts with("foobar", "fo")\n// true\n
    \n'},{name:"ends with(string, match)",description:'

    Returns true if the given value ends with the substring match. Otherwise, returns false.

    \n

    Function signature

    \n
    ends with(string: string, match: string): boolean\n
    \n

    Examples

    \n
    ends with("foobar", "r")\n// true\n
    \n'},{name:"matches(input, pattern)",description:'

    Returns true if the given value matches the pattern. Otherwise, returns false.

    \n

    Function signature

    \n
    matches(input: string, pattern: string): boolean\n
    \n

    The pattern is a string that contains a regular expression.

    \n

    Examples

    \n
    matches("foobar", "^fo*bar")\n// true\n
    \n'},{name:"matches(input, pattern, flags)",description:'

    Returns true if the given value matches the pattern. Otherwise, returns false.

    \n

    Function signature

    \n
    matches(input: string, pattern: string, flags: string): boolean\n
    \n

    The pattern is a string that contains a regular expression.

    \n

    The flags can contain one or more of the following characters:

    \n
      \n
    • s (dot-all)
    • \n
    • m (multi-line)
    • \n
    • i (case insensitive)
    • \n
    • x (comments)
    • \n
    \n

    Examples

    \n
    matches("FooBar", "foo", "i")\n// true\n
    \n'},{name:"replace(input, pattern, replacement)",description:'

    Returns the resulting string after replacing all occurrences of pattern with replacement.

    \n

    Function signature

    \n
    replace(input: string, pattern: string, replacement: string): string\n
    \n

    The pattern is a string that contains a regular expression.

    \n

    The replacement can access the match groups by using $ and the number of the group, for example,\n$1 to access the first group.

    \n

    Examples

    \n
    replace("abcd", "(ab)|(a)", "[1=$1][2=$2]")\n// "[1=ab][2=]cd"\n\nreplace("0123456789", "(\\d{3})(\\d{3})(\\d{4})", "($1) $2-$3")\n// "(012) 345-6789"\n
    \n'},{name:"replace(input, pattern, replacement, flags)",description:'

    Returns the resulting string after replacing all occurrences of pattern with replacement.

    \n

    Function signature

    \n
    replace(input: string, pattern: string, replacement: string, flags: string): string\n
    \n

    The pattern is a string that contains a regular expression.

    \n

    The replacement can access the match groups by using $ and the number of the group, for example,\n$1 to access the first group.

    \n

    The flags can contain one or more of the following characters:

    \n
      \n
    • s (dot-all)
    • \n
    • m (multi-line)
    • \n
    • i (case insensitive)
    • \n
    • x (comments)
    • \n
    \n

    Examples

    \n
    replace("How do you feel?", "Feel", "FEEL", "i")\n// "How do you FEEL?"\n
    \n'},{name:"split(string, delimiter)",description:'

    Splits the given value into a list of substrings, breaking at each occurrence of the delimiter pattern.

    \n

    Function signature

    \n
    split(string: string, delimiter: string): list<string>\n
    \n

    The delimiter is a string that contains a regular expression.

    \n

    Examples

    \n
    split("John Doe", "\\s" )\n// ["John", "Doe"]\n\nsplit("a;b;c;;", ";")\n// ["a", "b", "c", "", ""]\n
    \n'},{name:"extract(string, pattern)",description:'

    Camunda Extension

    \n

    Returns all matches of the pattern in the given string. Returns an empty list if the pattern doesn't\nmatch.

    \n

    Function signature

    \n
    extract(string: string, pattern: string): list<string>\n
    \n

    The pattern is a string that contains a regular expression.

    \n

    Examples

    \n
    extract("references are 1234, 1256, 1378", "12[0-9]*")\n// ["1234","1256"]\n
    \n'},{name:"now()",description:'

    Returns the current date and time including the timezone.

    \n

    Function signature

    \n
    now(): date and time\n
    \n

    Examples

    \n
    now()\n// date and time("2020-07-31T14:27:30@Europe/Berlin")\n
    \n'},{name:"today()",description:'

    Returns the current date.

    \n

    Function signature

    \n
    today(): date\n
    \n

    Examples

    \n
    today()\n// date("2020-07-31")\n
    \n'},{name:"day of week(date)",description:'

    Returns the day of the week according to the Gregorian calendar. Note that it always returns the English name of the day.

    \n

    Function signature

    \n
    day of week(date: date): string\n
    \n
    day of week(date: date and time): string\n
    \n

    Examples

    \n
    day of week(date("2019-09-17"))\n// "Tuesday"\n\nday of week(date and time("2019-09-17T12:00:00"))\n// "Tuesday"\n
    \n'},{name:"day of year(date)",description:'

    Returns the Gregorian number of the day within the year.

    \n

    Function signature

    \n
    day of year(date: date): number\n
    \n
    day of year(date: date and time): number\n
    \n

    Examples

    \n
    day of year(date("2019-09-17"))\n// 260\n\nday of year(date and time("2019-09-17T12:00:00"))\n// 260\n
    \n'},{name:"week of year(date)",description:'

    Returns the Gregorian number of the week within the year, according to ISO 8601.

    \n

    Function signature

    \n
    week of year(date: date): number\n
    \n
    week of year(date: date and time): number\n
    \n

    Examples

    \n
    week of year(date("2019-09-17"))\n// 38\n\nweek of year(date and time("2019-09-17T12:00:00"))\n// 38\n
    \n'},{name:"month of year(date)",description:'

    Returns the month of the year according to the Gregorian calendar. Note that it always returns the English name of the month.

    \n

    Function signature

    \n
    month of year(date: date): string\n
    \n
    month of year(date: date and time): string\n
    \n

    Examples

    \n
    month of year(date("2019-09-17"))\n// "September"\n\nmonth of year(date and time("2019-09-17T12:00:00"))\n// "September"\n
    \n'},{name:"abs(n)",description:'

    Returns the absolute value of a given duration.

    \n

    Function signature

    \n
    abs(n: days and time duration): days and time duration\n
    \n
    abs(n: years and months duration): years and months duration\n
    \n

    Examples

    \n
    abs(duration("-PT5H"))\n// "duration("PT5H")"\n\nabs(duration("PT5H"))\n// "duration("PT5H")"\n\nabs(duration("-P2M"))\n// duration("P2M")\n
    \n'},{name:"last day of month(date)",description:'

    Camunda Extension

    \n

    Takes the month of the given date or date-time value and returns the last day of this month.

    \n

    Function signature

    \n
    last day of month(date: date): date\n
    \n
    last day of month(date: date and time): date\n
    \n

    Examples

    \n
    last day of month(date("2022-10-01"))\n// date("2022-10-31"))\n\nlast day of month(date and time("2022-10-16T12:00:00"))\n// date("2022-10-31"))\n
    \n'},{name:"is empty(list)",description:'

    Camunda Extension

    \n

    Returns true if the given list is empty. Otherwise, returns false.

    \n

    Function signature

    \n
    is empty(list: list): boolean
    \n

    Examples

    \n
    is empty([])\n// true\n\nis empty([1,2,3])\n// false\n
    '},{name:"trim(string)",description:'

    Camunda Extension

    \n

    Returns the given string without leading and trailing spaces.

    \n

    Function signature

    \n
    trim(string: string): string
    \n

    Examples

    \n
    trim("  hello world  ")\n// "hello world"\n\ntrim("hello   world ")\n// "hello   world"\n
    '},{name:"uuid()",description:'

    Camunda Extension

    \n

    Returns a UUID (Universally Unique Identifier) with 36 characters.

    \n

    Function signature

    \n
    uuid(): string
    \n

    Examples

    \n
    uuid()\n// "7793aab1-d761-4d38-916b-b7270e309894"\n
    '},{name:"to base64(string)",description:'

    Camunda Extension

    \n

    Returns the given string encoded in Base64 format.

    \n

    Function signature

    \n
    to base64(value: string): string
    \n

    Examples

    \n
    to base64("FEEL")\n// "RkVFTA=="\n
    '}].map(IB);const BB=new TP,qB=new TP;function zB({extensions:e=[],dialect:t="expression",container:n,contentAttributes:i={},tooltipContainer:r,onChange:o=()=>{},onKeyDown:s=()=>{},onLint:a=()=>{},placeholder:l="",readOnly:c=!1,value:p="",builtins:u=LB,variables:d=[]}){const h=AA.updateListener.of((e=>{e.docChanged&&o(e.state.doc.toString())})),f=AA.updateListener.of((e=>{const t=e.transactions.flatMap((e=>e.effects)).filter((e=>e.is(W$)));if(!t.length)return;const n=t.flatMap((e=>e.value));a(n)})),m=AA.domEventHandlers({keydown:s});"string"==typeof r&&(r=document.querySelector(r));const g=r?YA({tooltipSpace:function(){return r.getBoundingClientRect()}}):[],y=[mN(),BB.of(jB({dialect:t,builtins:u,variables:d})),$D(),yD(),nN(),AA.contentAttributes.of(i),h,m,LA.of([...L$]),wB,f,g,qB.of(QA(l)),_B,...e];return c&&y.push(AA.editable.of(!1)),this._cmEditor=new AA({state:nk.create({doc:p,extensions:y}),parent:n}),this}zB.prototype.setValue=function(e){this._cmEditor.dispatch({changes:{from:0,to:this._cmEditor.state.doc.length,insert:e}})},zB.prototype.focus=function(e){const t=this._cmEditor;if(t.contentDOM.focus(),t.focus(),"number"==typeof e){const n=t.state.doc.length;t.dispatch({selection:{anchor:e<=n?e:n}})}},zB.prototype.getSelection=function(){return this._cmEditor.state.selection},zB.prototype.setVariables=function(e){const{dialect:t,builtins:n}={builtins:(i=this._cmEditor.state).facet(RB)[0],variables:i.facet(NB)[0],dialect:i.facet($B)[0]};var i;this._cmEditor.dispatch({effects:[BB.reconfigure(jB({dialect:t,builtins:n,variables:e}))]})},zB.prototype.setPlaceholder=function(e){this._cmEditor.dispatch({effects:qB.reconfigure(QA(e))})};var FB=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],VB=FB.join(","),HB="undefined"==typeof Element,UB=HB?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,WB=!HB&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},GB=function e(t,n){var i;void 0===n&&(n=!0);var r=null==t||null===(i=t.getAttribute)||void 0===i?void 0:i.call(t,"inert");return""===r||"true"===r||n&&t&&e(t.parentNode)},QB=function(e,t,n){if(GB(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(VB));return t&&UB.call(e,VB)&&i.unshift(e),i=i.filter(n)},XB=function e(t,n,i){for(var r=[],o=Array.from(t);o.length;){var s=o.shift();if(!GB(s,!1))if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,i);i.flatten?r.push.apply(r,l):r.push({scopeParent:s,candidates:l})}else{UB.call(s,VB)&&i.filter(s)&&(n||!t.includes(s))&&r.push(s);var c=s.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(s),p=!GB(c,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(s));if(c&&p){var u=e(!0===c?s.children:c.children,!0,i);i.flatten?r.push.apply(r,u):r.push({scopeParent:s,candidates:u})}else o.unshift.apply(o,s.children)}}return r},KB=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},YB=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!KB(e)?0:e.tabIndex},ZB=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},JB=function(e){return"INPUT"===e.tagName},eq=function(e){return function(e){return JB(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||WB(e),i=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var r=function(e,t){for(var n=0;nsummary:first-of-type")?e.parentElement:e;if(UB.call(r,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return tq(e)}else{if("function"==typeof i){for(var o=e;e;){var s=e.parentElement,a=WB(e);if(s&&!s.shadowRoot&&!0===i(s))return tq(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=o}if(function(e){var t,n,i,r,o=e&&WB(e),s=null===(t=o)||void 0===t?void 0:t.host,a=!1;if(o&&o!==e)for(a=!!(null!==(n=s)&&void 0!==n&&null!==(i=n.ownerDocument)&&void 0!==i&&i.contains(s)||null!=e&&null!==(r=e.ownerDocument)&&void 0!==r&&r.contains(e));!a&&s;){var l,c,p;a=!(null===(c=s=null===(l=o=WB(s))||void 0===l?void 0:l.host)||void 0===c||null===(p=c.ownerDocument)||void 0===p||!p.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},iq=function(e,t){return!(t.disabled||GB(t)||function(e){return JB(e)&&"hidden"===e.type}(t)||nq(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n=0)},sq=function e(t){var n=[],i=[];return t.forEach((function(t,r){var o=!!t.scopeParent,s=o?t.scopeParent:t,a=function(e,t){var n=YB(e);return n<0&&t&&!KB(e)?0:n}(s,o),l=o?e(t.candidates):s;0===a?o?n.push.apply(n,l):n.push(s):i.push({documentOrder:r,tabIndex:a,item:t,isScope:o,content:l})})),i.sort(ZB).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},aq=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==UB.call(e,VB)&&rq(t,e)},lq=FB.concat("iframe").join(","),cq=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==UB.call(e,lq)&&iq(t,e)};function pq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n0){var n=e[e.length-1];n!==t&&n.pause()}var i=e.indexOf(t);-1===i||e.splice(i,1),e.push(t)},gq=function(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()},yq=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},vq=function(e){return yq(e)&&!e.shiftKey},bq=function(e){return yq(e)&&e.shiftKey},xq=function(e){return setTimeout(e,0)},wq=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=t.hasFallback,r=void 0!==n&&n,s=t.params,a=void 0===s?[]:s,l=o[e];if("function"==typeof l&&(l=l.apply(void 0,fq(a))),!0===l&&(l=void 0),!l){if(void 0===l||!1===l)return l;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var c=l;if("string"==typeof l){try{c=i.querySelector(l)}catch(t){throw new Error("`".concat(e,'` appears to be an invalid selector; error="').concat(t.message,'"'))}if(!c&&!r)throw new Error("`".concat(e,"` as selector refers to no known node"))}return c},p=function(){var e=c("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!cq(e,o.tabbableOptions))if(l(i.activeElement)>=0)e=i.activeElement;else{var t=s.tabbableGroups[0];e=t&&t.firstTabbableNode||c("fallbackFocus")}else null===e&&(e=c("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},u=function(){if(s.containerGroups=s.containers.map((function(e){var t=function(e,t){var n;return n=(t=t||{}).getShadowRoot?XB([e],t.includeContainer,{filter:rq.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:oq}):QB(e,t.includeContainer,rq.bind(null,t)),sq(n)}(e,o.tabbableOptions),n=function(e,t){return(t=t||{}).getShadowRoot?XB([e],t.includeContainer,{filter:iq.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):QB(e,t.includeContainer,iq.bind(null,t))}(e,o.tabbableOptions),i=t.length>0?t[0]:void 0,r=t.length>0?t[t.length-1]:void 0,s=n.find((function(e){return aq(e)})),a=n.slice().reverse().find((function(e){return aq(e)})),l=!!t.find((function(e){return YB(e)>0}));return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:l,firstTabbableNode:i,lastTabbableNode:r,firstDomTabbableNode:s,lastDomTabbableNode:a,nextTabbableNode:function(e){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=t.indexOf(e);return r<0?i?n.slice(n.indexOf(e)+1).find((function(e){return aq(e)})):n.slice(0,n.indexOf(e)).reverse().find((function(e){return aq(e)})):t[r+(i?1:-1)]}}})),s.tabbableGroups=s.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),s.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find((function(e){return e.posTabIndexesFound}))&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},d=function(e){var t=e.activeElement;if(t)return t.shadowRoot&&null!==t.shadowRoot.activeElement?d(t.shadowRoot):t},h=function(e){!1!==e&&e!==d(document)&&(e&&e.focus?(e.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):h(p()))},f=function(e){var t=c("setReturnFocus",{params:[e]});return t||!1!==t&&e},m=function(e){var t=e.target,n=e.event,i=e.isBackward,r=void 0!==i&&i;t=t||_q(n),u();var a=null;if(s.tabbableGroups.length>0){var p=l(t,n),d=p>=0?s.containerGroups[p]:void 0;if(p<0)a=r?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(r){var h=s.tabbableGroups.findIndex((function(e){var n=e.firstTabbableNode;return t===n}));if(h<0&&(d.container===t||cq(t,o.tabbableOptions)&&!aq(t,o.tabbableOptions)&&!d.nextTabbableNode(t,!1))&&(h=p),h>=0){var f=0===h?s.tabbableGroups.length-1:h-1,m=s.tabbableGroups[f];a=YB(t)>=0?m.lastTabbableNode:m.lastDomTabbableNode}else yq(n)||(a=d.nextTabbableNode(t,!1))}else{var g=s.tabbableGroups.findIndex((function(e){var n=e.lastTabbableNode;return t===n}));if(g<0&&(d.container===t||cq(t,o.tabbableOptions)&&!aq(t,o.tabbableOptions)&&!d.nextTabbableNode(t))&&(g=p),g>=0){var y=g===s.tabbableGroups.length-1?0:g+1,v=s.tabbableGroups[y];a=YB(t)>=0?v.firstTabbableNode:v.firstDomTabbableNode}else yq(n)||(a=d.nextTabbableNode(t))}}else a=c("fallbackFocus");return a},g=function(e){var t=_q(e);l(t,e)>=0||(wq(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate}):wq(o.allowOutsideClick,e)||e.preventDefault())},y=function(e){var t=_q(e),n=l(t,e)>=0;if(n||t instanceof Document)n&&(s.mostRecentlyFocusedNode=t);else{var i;e.stopImmediatePropagation();var r=!0;if(s.mostRecentlyFocusedNode)if(YB(s.mostRecentlyFocusedNode)>0){var a=l(s.mostRecentlyFocusedNode),c=s.containerGroups[a].tabbableNodes;if(c.length>0){var u=c.findIndex((function(e){return e===s.mostRecentlyFocusedNode}));u>=0&&(o.isKeyForward(s.recentNavEvent)?u+1=0&&(i=c[u-1],r=!1))}}else s.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return YB(e)>0}))}))||(r=!1);else r=!1;r&&(i=m({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),h(i||(s.mostRecentlyFocusedNode||p()))}s.recentNavEvent=void 0},v=function(e){(o.isKeyForward(e)||o.isKeyBackward(e))&&function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s.recentNavEvent=e;var n=m({event:e,isBackward:t});n&&(yq(e)&&e.preventDefault(),h(n))}(e,o.isKeyBackward(e))},b=function(e){(function(e){return"Escape"===(null==e?void 0:e.key)||"Esc"===(null==e?void 0:e.key)||27===(null==e?void 0:e.keyCode)})(e)&&!1!==wq(o.escapeDeactivates,e)&&(e.preventDefault(),n.deactivate())},x=function(e){var t=_q(e);l(t,e)>=0||wq(o.clickOutsideDeactivates,e)||wq(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},w=function(){if(s.active)return mq(r,n),s.delayInitialFocusTimer=o.delayInitialFocus?xq((function(){h(p())})):h(p()),i.addEventListener("focusin",y,!0),i.addEventListener("mousedown",g,{capture:!0,passive:!1}),i.addEventListener("touchstart",g,{capture:!0,passive:!1}),i.addEventListener("click",x,{capture:!0,passive:!1}),i.addEventListener("keydown",v,{capture:!0,passive:!1}),i.addEventListener("keydown",b),n},_=function(){if(s.active)return i.removeEventListener("focusin",y,!0),i.removeEventListener("mousedown",g,!0),i.removeEventListener("touchstart",g,!0),i.removeEventListener("click",x,!0),i.removeEventListener("keydown",v,!0),i.removeEventListener("keydown",b),n},E="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(e){var t=e.some((function(e){return Array.from(e.removedNodes).some((function(e){return e===s.mostRecentlyFocusedNode}))}));t&&h(p())})):void 0,O=function(){E&&(E.disconnect(),s.active&&!s.paused&&s.containers.map((function(e){E.observe(e,{subtree:!0,childList:!0})})))};return(n={get active(){return s.active},get paused(){return s.paused},activate:function(e){if(s.active)return this;var t=a(e,"onActivate"),n=a(e,"onPostActivate"),r=a(e,"checkCanFocusTrap");r||u(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=i.activeElement,null==t||t();var o=function(){r&&u(),w(),O(),null==n||n()};return r?(r(s.containers.concat()).then(o,o),this):(o(),this)},deactivate:function(e){if(!s.active)return this;var t=hq({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,_(),s.active=!1,s.paused=!1,O(),gq(r,n);var i=a(t,"onDeactivate"),l=a(t,"onPostDeactivate"),c=a(t,"checkCanReturnFocus"),p=a(t,"returnFocus","returnFocusOnDeactivate");null==i||i();var u=function(){xq((function(){p&&h(f(s.nodeFocusedBeforeActivation)),null==l||l()}))};return p&&c?(c(f(s.nodeFocusedBeforeActivation)).then(u,u),this):(u(),this)},pause:function(e){if(s.paused||!s.active)return this;var t=a(e,"onPause"),n=a(e,"onPostPause");return s.paused=!0,null==t||t(),_(),O(),null==n||n(),this},unpause:function(e){if(!s.paused||!s.active)return this;var t=a(e,"onUnpause"),n=a(e,"onPostUnpause");return s.paused=!1,null==t||t(),u(),w(),O(),null==n||n(),this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return s.containers=t.map((function(e){return"string"==typeof e?i.querySelector(e):e})),s.active&&u(),O(),this}}).updateContainerElements(e),n},Pq=function(e){return q_("svg",{...e,children:q_("path",{fillRule:"evenodd",d:"m11.657 8-4.95 4.95a1 1 0 0 1-1.414-1.414L8.828 8 5.293 4.464A1 1 0 1 1 6.707 3.05L11.657 8Z"})})};Pq.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16"};var kq=function(e){return q_("svg",{...e,children:q_("path",{fillRule:"evenodd",d:"m12 4.7-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8 12 4.7Z",fill:"currentColor"})})};kq.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16"};var Sq=function(e){return q_("svg",{...e,children:q_("path",{fillRule:"evenodd",d:"M9 13V9h4a1 1 0 0 0 0-2H9V3a1 1 0 1 0-2 0v4H3a1 1 0 1 0 0 2h4v4a1 1 0 0 0 2 0Z"})})};Sq.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16"};var Cq=function(e){return q_("svg",{...e,children:q_("path",{fillRule:"evenodd",d:"M12 6v7c0 1.1-.4 1.55-1.5 1.55h-5C4.4 14.55 4 14.1 4 13V6h8Zm-1.5 1.5h-5v4.3c0 .66.5 1.2 1.111 1.2H9.39c.611 0 1.111-.54 1.111-1.2V7.5ZM13 3h-2l-1-1H6L5 3H3v1.5h10V3Z"})})};Cq.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16"};var Tq=function(e){return q_("svg",{...e,children:[q_("path",{fill:"#fff",style:{mixBlendMode:"multiply"},d:"M0 0h16v16H0z"}),q_("path",{fill:"#fff",style:{mixBlendMode:"multiply"},d:"M0 0h16v16H0z"}),q_("path",{d:"M7 3H5v2h2V3zm4 0H9v2h2V3zM7 7H5v2h2V7zm4 0H9v2h2V7zm-4 4H5v2h2v-2zm4 0H9v2h2v-2z",fill:"#161616"})]})};Tq.defaultProps={width:"16",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var Aq=function(e){return q_("svg",{...e,children:q_("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.637 12.637v-4.72h1.362v4.721c0 .36-.137.676-.411.95-.275.275-.591.412-.95.412H3.362c-.38 0-.703-.132-.967-.396A1.315 1.315 0 0 1 2 12.638V3.362c0-.38.132-.703.396-.967S2.982 2 3.363 2h4.553v1.363H3.363v9.274h9.274ZM14 2H9.28l-.001 1.362h2.408L5.065 9.984l.95.95 6.622-6.622v2.409H14V2Z",fill:"currentcolor"})})};Aq.defaultProps={width:"16",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var Mq=function(e){return q_("svg",{...e,children:q_("path",{d:"M3.617 11.99c-.137.684-.392 1.19-.765 1.518-.362.328-.882.492-1.558.492H0l.309-1.579h1.264l1.515-7.64h-.912l.309-1.579h.911l.236-1.191c.137-.685.387-1.192.75-1.52C4.753.164 5.277 0 5.953 0h1.294L6.94 1.579H5.675l-.323 1.623h1.264l-.309 1.579H5.043l-1.426 7.208ZM5.605 11.021l3.029-4.155L7.28 3.202h2.073l.706 2.547h.176l1.691-2.547H14l-3.014 4.051 1.338 3.768H10.25l-.706-2.606H9.37L7.678 11.02H5.605Z",fill:"currentcolor"})})};Mq.defaultProps={width:"14",height:"14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var Dq=function(e){return q_("svg",{...e,children:[q_("path",{d:"M26 28H6a2.003 2.003 0 0 1-2-2V6a2.003 2.003 0 0 1 2-2h10v2H6v20h20V16h2v10a2.003 2.003 0 0 1-2 2Z"}),q_("path",{d:"M20 2v2h6.586L18 12.586 19.414 14 28 5.414V12h2V2H20z"})]})};Dq.defaultProps={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"};var Rq=function(e){return q_("svg",{...e,children:[q_("path",{fill:"currentColor",d:"M28 4H10a2.006 2.006 0 0 0-2 2v14a2.006 2.006 0 0 0 2 2h18a2.006 2.006 0 0 0 2-2V6a2.006 2.006 0 0 0-2-2Zm0 16H10V6h18Z"}),q_("path",{fill:"currentColor",d:"M18 26H4V16h2v-2H4a2.006 2.006 0 0 0-2 2v10a2.006 2.006 0 0 0 2 2h14a2.006 2.006 0 0 0 2-2v-2h-2Z"})]})};function Nq(e){const{element:t,headerProvider:n}=e,{getElementIcon:i,getDocumentationRef:r,getElementLabel:o,getTypeLabel:s}=n,a=o(t),l=s(t),c=r&&r(t),p=i(t);return q_("div",{class:"bio-properties-panel-header",children:[q_("div",{class:"bio-properties-panel-header-icon",children:p&&q_(p,{width:"32",height:"32",viewBox:"0 0 32 32"})}),q_("div",{class:"bio-properties-panel-header-labels",children:[q_("div",{title:l,class:"bio-properties-panel-header-type",children:l}),a?q_("div",{title:a,class:"bio-properties-panel-header-label",children:a}):null]}),q_("div",{class:"bio-properties-panel-header-actions",children:c?q_("a",{rel:"noreferrer",class:"bio-properties-panel-header-link",href:c,title:"Open documentation",target:"_blank",children:q_(Aq,{})}):null})]})}Rq.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 32 32"};const $q=Dw({description:{},getDescriptionForId:()=>{}}),jq=Dw({errors:{}}),Iq=Dw({eventBus:null}),Lq=Dw({layout:{},setLayout:()=>{},getLayoutForKey:()=>{},setLayoutForKey:()=>{}}),Bq=Dw({tooltip:{},getTooltipForId:()=>{}});function qq(e){const{forId:t,element:n}=e,i=function(e,t){const{getTooltipForId:n}=Jw(Bq);return n(e,t)}(t,n),r=e.value||i;return r?q_(zq,{...e,value:r,forId:Hq(t)}):e.children}function zq(e){const{forId:t,value:n,parent:i,direction:r="right",position:o}=e,[s,a]=Ww(!1),[l,c]=Ww(!1);let p=null;const u=Kw(null),d=Kw(null),h=async e=>{const t=()=>a(!0);s||p||(e instanceof MouseEvent?p=setTimeout(t,200):(t(),c(!0)))},f=()=>{a(!1),c(!1)};Qw((()=>{const{current:e}=u;if(!e)return;const t=e=>{const t=document.activeElement===u.current||document.activeElement.closest(".bio-properties-panel-tooltip");!s||(({x:e,y:t})=>{const n=d.current,i=u.current;return n&&(Fq(e,t,i.getBoundingClientRect())||Fq(e,t,n.getBoundingClientRect()))})({x:e.x,y:e.y})||t&&l||f()},n=e=>{const{relatedTarget:t}=e;s&&!u.current.matches(":hover")&&t&&!t.closest(".bio-properties-panel-tooltip")&&f()};return document.addEventListener("wheel",t),document.addEventListener("focusout",n),document.addEventListener("mousemove",t),()=>{document.removeEventListener("wheel",t),document.removeEventListener("mousemove",t),document.removeEventListener("focusout",n)}}),[u.current,s,l]);const m=()=>q_("div",{class:`bio-properties-panel-tooltip ${r}`,role:"tooltip",id:"bio-properties-panel-tooltip","aria-labelledby":t,style:o||Vq(u.current),ref:d,onClick:e=>e.stopPropagation(),children:[q_("div",{class:"bio-properties-panel-tooltip-content",children:n}),q_("div",{class:"bio-properties-panel-tooltip-arrow"})]});return q_("div",{class:"bio-properties-panel-tooltip-wrapper",tabIndex:"0",ref:u,onMouseEnter:h,onMouseLeave:()=>{clearTimeout(p),p=null},onFocus:h,onKeyDown:e=>{"Escape"===e.code&&f()},children:[e.children,s?i?E_(m(),i.current):m():null]})}function Fq(e,t,n){const{top:i,right:r,bottom:o,left:s}=n;return e>=s&&e<=r&&t>=i&&t<=o}function Vq(e){const t=e.getBoundingClientRect();return`right: ${`calc(100% - ${t.x}px)`}; top: ${t.top-10+"px"};`}function Hq(e){return`bio-properties-panel-${e}`}function Uq(e){const{errors:t}=Jw(jq);return t[e]}function Wq(){const{errors:e}=Jw(jq);return e}function Gq(e,t,n){const i=Jw(Iq);n||({eventBus:n}=i);const r=Kw(!1);n&&!r.current&&n.on(e,t),Qw((()=>(n&&r.current&&n.on(e,t),r.current=!0,()=>{n&&n.off(e,t)})),[t,e,n])}function Qq(e,t){const{getLayoutForKey:n,setLayoutForKey:i}=Jw(Lq);return[n(e,t),Zw((t=>{i(e,t)}),[i])]}function Xq(e){const t=Kw();return Qw((()=>{t.current=e})),t.current}function Kq(e){const{onShow:t}=Jw(Lq),n=Kw(),i=Kw(!1),r=Zw((n=>{n.id===e&&(t(),i.current||(i.current=!0))}),[e]);return Qw((()=>{i.current&&n.current&&(g(n.current.focus)&&n.current.focus(),g(n.current.select)&&n.current.select(),i.current=!1)})),Gq("propertiesPanel.showEntry",r),n}function Yq(e,t,n){const[i,r]=Ww(we(t)),o=Zw((()=>{const e=we(t);e!==i&&r(e)}),[t,i]);Qw((()=>{o()}),[o]),Gq("propertiesPanel.attach",o),Gq("propertiesPanel.detach",o),Qw((()=>{const t=IntersectionObserver;if(!t)return;if(!e.current||!i)return;const r=new t((e=>{0!==i.scrollHeight&&e.forEach((e=>{e.intersectionRatio<1?n(!0):1===e.intersectionRatio&&n(!1)}))}),{root:i,rootMargin:"0px 0px 999999% 0px",threshold:[1]});return r.observe(e.current),()=>{r.unobserve(e.current)}}),[e.current,i,n])}function Zq(e){const t=Kw(e);return t.current=e,Zw(((...e)=>t.current(...e)),[])}function Jq(e){const{element:t,entries:n=[],id:i,label:r,shouldOpen:o=!1}=e,s=Kw(null),[a,l]=Qq(["groups",i,"open"],o),c=Zw((()=>l(!0)),[l]),[p,u]=Ww(!1),[d,h]=Ww(!1);Qw((()=>{const e=requestAnimationFrame((()=>{const e=n.find((e=>{const{id:t,isEdited:n}=e,i=we(`[data-entry-id="${t}"]`);if(!g(n)||!i)return!1;return n(we(".bio-properties-panel-input",i))}));u(e)}));return()=>cancelAnimationFrame(e)}),[n,u]);const f=Wq(),m=n.some((e=>f[e.id]));Yq(s,"div.bio-properties-panel-scroll-container",h);const y={...Jw(Lq),onShow:c};return q_("div",{class:"bio-properties-panel-group","data-group-id":"group-"+i,ref:s,children:[q_("div",{class:F_()("bio-properties-panel-group-header",p?"":"empty",a?"open":"",d&&a?"sticky":""),onClick:()=>l(!a),children:[q_("div",{title:e.tooltip?null:r,"data-title":r,class:"bio-properties-panel-group-header-title",children:q_(qq,{value:e.tooltip,forId:"group-"+i,element:t,parent:s,children:r})}),q_("div",{class:"bio-properties-panel-group-header-buttons",children:[q_(ez,{edited:p,hasErrors:m}),q_("button",{type:"button",title:"Toggle section",class:"bio-properties-panel-group-header-button bio-properties-panel-arrow",children:q_(Pq,{class:a?"bio-properties-panel-arrow-down":"bio-properties-panel-arrow-right"})})]})]}),q_("div",{class:F_()("bio-properties-panel-group-entries",a?"open":""),children:q_(Lq.Provider,{value:y,children:n.map((e=>{const{component:n,id:i}=e;return pw(n,{...e,element:t,key:i})}))})})]})}function ez(e){const{edited:t,hasErrors:n}=e;return n?q_("div",{title:"Section contains an error",class:"bio-properties-panel-dot bio-properties-panel-dot--error"}):t?q_("div",{title:"Section contains data",class:"bio-properties-panel-dot"}):null}function tz(e){const{text:t,icon:n}=e;return q_("div",{class:"bio-properties-panel open",children:q_("section",{class:"bio-properties-panel-placeholder",children:[n&&q_(n,{class:"bio-properties-panel-placeholder-icon"}),q_("p",{class:"bio-properties-panel-placeholder-text",children:t})]})})}function nz(e){const{element:t,forId:n,value:i}=e,r=function(e,t){const{getDescriptionForId:n}=Jw($q);return n(e,t)}(n,t),o=i||r;if(o)return q_("div",{class:"bio-properties-panel-description",children:o})}const iz=()=>{},rz=d_(((e,t)=>{const{onInput:n,disabled:i,tooltipContainer:r,enableGutters:o,value:s,onLint:a=iz,onPopupOpen:l=iz,popupOpen:c,contentAttributes:p={},hostLanguage:u=null,singleLine:d=!1}=e,h=Kw(),[f,m]=Ww(),[g,y]=Ww(s||"");!function(e,t){const[n,i]=Ww(void 0);t.current=Yw((()=>({focus:t=>{e?e.focus(t):(void 0===t&&(t=1/0),i(t))}})),[e]),Qw((()=>{void 0!==n&&e&&(e.focus(n),i(!1))}),[e,n])}(f,t);const v=Zq((e=>{n(e),y(e)}));Qw((()=>{let e;return e=new cB({container:h.current,onChange:v,value:g,onLint:a,contentAttributes:p,tooltipContainer:r,enableGutters:o,hostLanguage:u,singleLine:d,lineWrap:!0}),m(e),()=>{a([]),h.current.innerHTML="",m(null)}}),[]),Qw((()=>{f&&s!==g&&(f.setValue(s),y(s))}),[s]);return q_("div",{class:F_()("bio-properties-panel-feelers-editor-container",c?"popupOpen":null),children:[q_("div",{class:"bio-properties-panel-feelers-editor__open-popup-placeholder",children:"Opened in editor"}),q_("div",{name:e.name,class:F_()("bio-properties-panel-feelers-editor bio-properties-panel-input",g?"edited":null,i?"disabled":null),ref:h,onClick:()=>{t.current.focus()}}),q_("button",{type:"button",title:"Open pop-up editor",class:"bio-properties-panel-open-feel-popup",onClick:()=>l("feelers"),children:q_(Rq,{})})]})})),oz=()=>{},sz=d_(((e,t)=>{const{contentAttributes:n,enableGutters:i,value:r,onInput:o,onFeelToggle:s=oz,onLint:a=oz,onPopupOpen:l=oz,placeholder:c,popupOpen:p,disabled:u,tooltipContainer:d,variables:h}=e,f=Kw(),[m,g]=Ww(),[y,v]=Ww(r||"");!function(e,t){const[n,i]=Ww(void 0);t.current=Yw((()=>({focus:t=>{e?e.focus(t):(void 0===t&&(t=1/0),i(t))}})),[e]),Qw((()=>{void 0!==n&&e&&(e.focus(n),i(!1))}),[e,n])}(m,t);const b=Zq((e=>{o(e),v(e)}));Qw((()=>{let e;return e=new zB({container:f.current,onChange:b,onKeyDown:t=>{if("Backspace"!==t.key||!e)return;const n=e.getSelection(),i=n.ranges[n.mainIndex];0===i.from&&0===i.to&&s()},onLint:a,placeholder:c,tooltipContainer:d,value:y,variables:h,extensions:[...i?[jM()]:[],AA.lineWrapping],contentAttributes:n}),g(e),()=>{a([]),f.current.innerHTML="",g(null)}}),[]),Qw((()=>{m&&r!==y&&(m.setValue(r),v(r))}),[r]),Qw((()=>{m&&m.setVariables(h)}),[h]),Qw((()=>{m&&m.setPlaceholder(c)}),[c]);return q_("div",{class:F_()("bio-properties-panel-feel-editor-container",u?"disabled":null,p?"popupOpen":null),children:[q_("div",{class:"bio-properties-panel-feel-editor__open-popup-placeholder",children:"Opened in editor"}),q_("div",{name:e.name,class:F_()("bio-properties-panel-input",y?"edited":null),ref:f,onClick:()=>{t.current.focus()}}),q_("button",{type:"button",title:"Open pop-up editor",class:"bio-properties-panel-open-feel-popup",onClick:()=>l(),children:q_(Rq,{})})]})}));function az(e){const{active:t}=e;return t?q_("span",{class:"bio-properties-panel-feel-indicator",children:"="}):null}const lz=()=>{};function cz(e){const{feel:t=!1,active:n,disabled:i=!1,onClick:r=lz}=e,o=`Click to ${n?"remove":"set a"} dynamic value with FEEL expression`;return q_("button",{type:"button",class:F_()("bio-properties-panel-feel-icon",n?"active":null,"required"===t?"required":"optional"),onClick:e=>{r(e),e.pointerType||e.stopPropagation()},disabled:"required"===t||i,title:"required"===t?"FEEL expression is mandatory":o,children:q_(Mq,{})})}const pz=Dw({open:()=>{},close:()=>{},source:null});function uz(e,t){let n,i,r;function o(t){const o={x:t.clientX-i,y:t.clientY-r};return e.call(n,t,o)}function s(){document.removeEventListener("dragover",o,!0),document.removeEventListener("dragenter",dz,!0),document.removeEventListener("dragend",s),document.removeEventListener("drop",dz)}return function(e){n=this,i=e.clientX,r=e.clientY,e.dataTransfer&&e.dataTransfer.setDragImage(t||be(''),0,0),document.addEventListener("dragover",o,!0),document.addEventListener("dragenter",dz,!0),document.addEventListener("dragend",s),document.addEventListener("drop",dz)}}function dz(e){e.preventDefault(),e.stopPropagation()}const hz=()=>{};const fz=d_((function(e,t){const{container:n,className:i,delayInitialFocus:r,position:o,width:s,height:a,onClose:l,onPostActivate:c=hz,onPostDeactivate:p=hz,returnFocus:u=!0,closeOnEscape:d=!0,title:h}=e,f=Kw(null),m=Kw(null),g=t||m,y=Yw((()=>function(e){if("string"==typeof e)return we(e);return e}(n)),[n]),v=()=>{f.current&&f.current.activate()};let b={};return o&&(b={...b,top:o.top+"px",left:o.left+"px"}),s&&(b.width=s+"px"),a&&(b.height=a+"px"),Qw((()=>(g.current&&g.current.addEventListener("focusin",v),()=>{g.current.removeEventListener("focusin",v)})),[g]),Qw((()=>(g.current&&(f.current=Oq(g.current,{clickOutsideDeactivates:!0,delayInitialFocus:r,fallbackFocus:g.current,onPostActivate:c,onPostDeactivate:p,returnFocusOnDeactivate:u}),f.current.activate()),()=>f.current&&f.current.deactivate())),[g]),Gq("propertiesPanel.detach",l),E_(q_("div",{"aria-label":h,tabIndex:-1,ref:g,onKeyDown:e=>{e.stopPropagation(),d&&"Escape"===e.key&&l()},role:"dialog",class:F_()("bio-properties-panel-popup",i),style:b,children:e.children}),y||document.body)}));function mz(e){return e.closest(".bio-properties-panel-popup")}fz.Title=function(e){const{children:t,className:n,draggable:i,emit:r=()=>{},title:o,showCloseButton:s=!1,closeButtonTooltip:a="Close popup",onClose:l,...c}=e,p=Kw({startPosition:null,newPosition:null}),u=Kw(),d=Kw(),h=(e,t)=>{!function(e){e.preventDefault(),e.stopPropagation()}(e);const{x:n,y:i}=t,o={x:p.current.startPosition.x+n,y:p.current.startPosition.y+i},s=mz(d.current);s.style.top=o.y+"px",s.style.left=o.x+"px",r("dragover",{newPosition:o,delta:t})};return q_("div",{class:F_()("bio-properties-panel-popup__header",i&&"draggable",n),ref:d,draggable:i,onDragStart:e=>{uz(h,u.current)(e),e.stopPropagation();const t=mz(d.current).getBoundingClientRect();p.current.startPosition={x:t.left,y:t.top},r("dragstart")},onDragEnd:()=>{p.current.newPosition=null,r("dragend")},...c,children:[i&&q_(dw,{children:[q_("div",{ref:u,class:"bio-properties-panel-popup__drag-preview"}),q_("div",{class:"bio-properties-panel-popup__drag-handle",children:q_(Tq,{})})]}),q_("div",{class:"bio-properties-panel-popup__title",children:o}),t,s&&q_("button",{title:a,class:"bio-properties-panel-popup__close",onClick:l,children:q_(kq,{})})]})},fz.Body=function(e){const{children:t,className:n,...i}=e;return q_("div",{class:F_()("bio-properties-panel-popup__body",n),...i,children:t})},fz.Footer=function(e){const{children:t,className:n,...i}=e;return q_("div",{class:F_()("bio-properties-panel-popup__footer",n),...i,children:e.children})};function gz(e){const{element:t,eventBus:n={fire(){},on(){},off(){}},popupContainer:i,getPopupLinks:r=()=>[]}=e,o=Xq(t),[s,a]=Ww({}),[l,c]=Ww(!1),[p,u]=Ww(null),[d,h]=Ww(null),f=(e,t)=>{n.fire("feelPopup."+e,t)},m=Zw((()=>!!l),[l]);!function(e,t){const n=Kw(!1);Qw((()=>{if(n.current)return e();n.current=!0}),t)}((()=>{l||f("closed")}),[l]);const g=(e,t,n)=>{u(e),a(t),c(!0),h(n),f("open")},y=(e={})=>{const{id:t}=e;t&&t!==p||(c(!1),u(null))},v={open:g,close:y,source:p};return Qw((()=>{t&&o&&t!==o&&y()}),[t]),Qw((()=>{const e=()=>m();return n.on("feelPopup._close",y),n.on("feelPopup._open",(e=>{const{entryId:t,popupConfig:n,sourceElement:i}=e;g(t,n,i)})),n.on("feelPopup._isOpen",e),()=>{n.off("feelPopup._close",y),n.off("feelPopup._open",g),n.off("feelPopup._isOpen",e)}}),[n,m]),q_(pz.Provider,{value:v,children:[l&&q_(yz,{onClose:y,container:i,getLinks:r,sourceElement:d,emit:f,...s}),e.children]})}function yz(e){const{container:t,getLinks:n,id:i,hostLanguage:r,onInput:o,onClose:s,position:a,singleLine:l,sourceElement:c,title:p,tooltipContainer:u,type:d,value:h,variables:f,emit:m}=e,g=Kw(),y=Kw(),v=Kw(!1);return Qw((()=>(m("opened",{domNode:y.current}),()=>m("close",{domNode:y.current}))),[]),Qw((()=>{g.current&&g.current.focus()}),[g]),q_(fz,{container:t,className:"bio-properties-panel-feel-popup",emit:m,position:a,title:p,onClose:s,returnFocus:!1,closeOnEscape:!1,delayInitialFocus:!1,onPostDeactivate:()=>{c&&c.focus()},height:250,width:700,ref:y,children:[q_(fz.Title,{title:p,emit:m,showCloseButton:!0,closeButtonTooltip:"Save and close",onClose:s,draggable:!0,children:q_(dw,{children:n(d).map(((e,t)=>q_("a",{rel:"noreferrer",href:e.href,target:"_blank",class:"bio-properties-panel-feel-popup__title-link",children:[e.title,q_(Dq,{})]},t)))})}),q_(fz.Body,{children:q_("div",{onKeyDownCapture:e=>{"Escape"===e.key&&(v.current=e.target.closest(".cm-editor").querySelector(".cm-tooltip-autocomplete"))},onKeyDown:e=>{"Escape"===e.key&&(v.current||(s(),v.current=!1))},class:"bio-properties-panel-feel-popup__body",children:["feel"===d&&q_(sz,{enableGutters:!0,id:vz(i),name:i,onInput:o,value:h,variables:f,ref:g,tooltipContainer:u}),"feelers"===d&&q_(rz,{id:vz(i),contentAttributes:{"aria-label":p},enableGutters:!0,hostLanguage:r,name:i,onInput:o,value:h,ref:g,singleLine:l,tooltipContainer:u})]})})]})}function vz(e){return`bio-properties-panel-${e}`}function bz(e){const{id:t,label:n,onInput:i,value:r,switcherLabel:o,inline:s,onFocus:a,onBlur:l,inputRef:c,tooltip:p}=e,[u,d]=Ww(r);return Qw((()=>{r!==u&&d(r)}),[r]),q_("div",{class:F_()("bio-properties-panel-toggle-switch",{inline:s}),children:[q_("label",{class:"bio-properties-panel-label",for:_z(t),children:q_(qq,{value:p,forId:t,element:e.element,children:n})}),q_("div",{class:"bio-properties-panel-field-wrapper",children:[q_("label",{class:"bio-properties-panel-toggle-switch__switcher",children:[q_("input",{ref:c,id:_z(t),class:"bio-properties-panel-input",type:"checkbox",onFocus:a,onBlur:l,name:t,onInput:e=>{(async()=>{i(!r)})(),d(e.target.value)},checked:!!u}),q_("span",{class:"bio-properties-panel-toggle-switch__slider"})]}),o&&q_("p",{class:"bio-properties-panel-toggle-switch__label",children:o})]})]})}function xz(e){const{element:t,id:n,description:i,label:r,switcherLabel:o,inline:s,getValue:a,setValue:l,onFocus:c,onBlur:p,tooltip:u}=e;return q_("div",{class:"bio-properties-panel-entry bio-properties-panel-toggle-switch-entry","data-entry-id":n,children:[q_(bz,{id:n,label:r,value:a(t),onInput:l,onFocus:c,onBlur:p,switcherLabel:o,inline:s,tooltip:u,element:t}),q_(nz,{forId:n,element:t,value:i})]})}function wz(e){return e&&!!e.checked}function _z(e){return`bio-properties-panel-${e}`}function Ez(e){const{debounce:t,disabled:n,displayLabel:i=!0,id:r,inputRef:o,label:s,max:a,min:l,onInput:c,step:p,value:u="",onFocus:d,onBlur:h}=e,[f,m]=Ww(u),g=Yw((()=>t((e=>{e.validity.valid&&c(e.value?parseFloat(e.value):void 0)}))),[c,t]);return Qw((()=>{u!==f&&m(u)}),[u]),q_("div",{class:"bio-properties-panel-numberfield",children:[i&&q_("label",{for:kz(r),class:"bio-properties-panel-label",children:s}),q_("input",{id:kz(r),ref:o,type:"number",name:r,spellCheck:"false",autoComplete:"off",disabled:n,class:"bio-properties-panel-input",max:a,min:l,onInput:e=>{g(e.target),m(e.target.value)},onFocus:d,onBlur:h,step:p,value:f})]})}function Oz(e){const{debounce:t,description:n,disabled:i,element:r,getValue:o,id:s,label:a,max:l,min:c,setValue:p,step:u,onFocus:d,onBlur:h,validate:f}=e,m=Uq(s),[y,v]=Ww(null);let b=o(r);Qw((()=>{if(g(f)){const e=f(b)||null;v(e)}}),[b,f]);const x=m||y;return q_("div",{class:F_()("bio-properties-panel-entry",x?"has-error":""),"data-entry-id":s,children:[q_(Ez,{debounce:t,disabled:i,id:s,label:a,onFocus:d,onBlur:h,onInput:e=>{let t=null;g(f)&&(t=f(e)||null),p(e,t),v(t)},max:l,min:c,step:u,value:b},r),x&&q_("div",{class:"bio-properties-panel-error",children:x}),q_(nz,{forId:s,element:r,value:n})]})}function Pz(e){return e&&!!e.value}function kz(e){return`bio-properties-panel-${e}`}const Sz=()=>{};const Cz=(Tz=function(e){const{debounce:t,id:n,element:i,label:r,hostLanguage:o,onInput:s,onError:a,placeholder:l,feel:c,value:p="",disabled:u=!1,variables:d,singleLine:h,tooltipContainer:f,OptionalComponent:m=Az,tooltip:g}=e,[v,b]=Ww(p),x=Kq(n),w=Kw(),_=y(v)&&v.startsWith("=")||"required"===c,E=y(v)&&v.startsWith("=")?v.substring(1):v,[O,P]=Ww(void 0),{open:k,source:S}=Jw(pz),C=S===n,T=(e=0)=>{const t=w.current.contains(document.activeElement)?document.activeElement.selectionStart:1/0;P(t+e)},A=Yw((()=>t((e=>{s(e)}))),[s,t]),M=e=>{b(e),A(void 0===e||""===e||"="===e?void 0:e)},D=Zq((()=>{"required"!==c&&M(_?E:"="+v)})),R=e=>{_&&(e="="+e),e!==v&&(M(e),!_&&y(e)&&e.startsWith("=")&&T(-1))},N=Zq(((e=[])=>{const t=e.some((e=>"Syntax Error"===e.type));a(t?"Unparsable FEEL expression.":void 0)})),$=(e="feel")=>{const t={id:n,hostLanguage:o,onInput:R,position:Bz(w.current),singleLine:h,title:qz(i,r),tooltipContainer:f,type:e,value:E,variables:d};k(n,t,x.current)};return Qw((()=>{void 0!==O&&(x.current.focus(O),P(void 0))}),[O]),Qw((()=>{p!==v&&M(p||(_?"=":""))}),[p]),Qw((()=>{const e=e=>{_&&e.clipboardData.setData("application/FEEL",e.clipboardData.getData("text"))},t=e=>{_||C||e.clipboardData.getData("application/FEEL")&&setTimeout((()=>{D(),T()}))};return w.current.addEventListener("copy",e),w.current.addEventListener("cut",e),w.current.addEventListener("paste",t),()=>{w.current.removeEventListener("copy",e),w.current.removeEventListener("cut",e),w.current.removeEventListener("paste",t)}}),[w,_,D,T]),q_("div",{class:F_()("bio-properties-panel-feel-entry",{"feel-active":_}),children:[q_("label",{for:Lz(n),class:"bio-properties-panel-label",onClick:()=>T(),children:[q_(qq,{value:g,forId:n,element:e.element,children:r}),q_(cz,{label:r,feel:c,onClick:D,active:_})]}),q_("div",{class:"bio-properties-panel-feel-container",ref:w,children:[q_(az,{active:_,disabled:"optional"!==c||u,onClick:D}),_?q_(sz,{name:n,onInput:R,contentAttributes:{id:Lz(n),"aria-label":r},disabled:u,popupOpen:C,onFeelToggle:()=>{D(),T(!0)},onLint:N,onPopupOpen:$,placeholder:l,value:E,variables:d,ref:x,tooltipContainer:f}):q_(m,{...e,popupOpen:C,onInput:R,contentAttributes:{id:Lz(n),"aria-label":r},value:v,ref:x,onPopupOpen:$,containerRef:w})]})]})},function(e){const{id:t}=e,{close:n}=Jw(pz),i=Zq(n);return Qw((()=>()=>{i({id:t})}),[]),q_(Tz,{...e})});var Tz;const Az=d_(((e,t)=>{const{id:n,disabled:i,onInput:r,value:o,onFocus:s,onBlur:a,placeholder:l}=e,c=Kw();return t.current={focus:e=>{const t=c.current;t&&(t.focus(),"number"==typeof e&&(e>o.length&&(e=o.length),t.setSelectionRange(e,e)))}},q_("input",{id:Lz(n),type:"text",ref:c,name:n,spellCheck:"false",autoComplete:"off",disabled:i,class:"bio-properties-panel-input",onInput:e=>r(e.target.value),onFocus:s,onBlur:a,placeholder:l,value:o||""})})),Mz=d_(((e,t)=>{const{id:n,debounce:i,disabled:r,onInput:o,value:s,min:a,max:l,step:c,onFocus:p,onBlur:u}=e,d=Kw();return t.current={focus:e=>{const t=d.current;t&&(t.focus(),"number"==typeof e&&e!==1/0&&(e>s.length&&(e=s.length),t.setSelectionRange(e,e)))}},q_(Ez,{id:n,debounce:i,disabled:r,displayLabel:!1,inputRef:d,max:l,min:a,onInput:o,step:c,value:s,onFocus:p,onBlur:u})})),Dz=d_(((e,t)=>{const{id:n,disabled:i,onInput:r,value:o,onFocus:s,onBlur:a,placeholder:l}=e,c=Kw();return t.current={focus:()=>{const e=c.current;e&&(e.focus(),e.setSelectionRange(0,0))}},q_("textarea",{id:Lz(n),type:"text",ref:c,name:n,spellCheck:"false",autoComplete:"off",disabled:i,class:"bio-properties-panel-input",onInput:e=>r(e.target.value),onFocus:s,onBlur:a,placeholder:l,value:o||"","data-gramm":"false"})})),Rz=(d_(((e,t)=>{const{id:n,onInput:i,value:r,onFocus:o,onBlur:s,switcherLabel:a}=e,l=Kw();return t.current={focus:()=>{const e=l.current;e&&e.focus()}},q_(bz,{id:n,value:r,inputRef:l,onInput:i,onFocus:o,onBlur:s,switcherLabel:a})})),d_(((e,t)=>{const{id:n,disabled:i,onInput:r,value:o,onFocus:s,onBlur:a}=e,l=Kw();return t.current={focus:()=>{const e=l.current;e&&e.focus()}},q_("input",{ref:l,id:Lz(n),name:n,onFocus:s,onBlur:a,type:"checkbox",class:"bio-properties-panel-input",onChange:({target:e})=>{r(e.checked)},checked:o,disabled:i})})));function Nz(e){const{element:t,id:n,description:i,debounce:r,disabled:o,feel:s,label:a,getValue:l,setValue:c,tooltipContainer:p,hostLanguage:u,singleLine:d,validate:h,show:f=Sz,example:m,variables:y,onFocus:v,onBlur:b,placeholder:x,tooltip:w}=e,[_,E]=Ww(null),[O,P]=Ww(null);let k=l(t);Qw((()=>{if(g(h)){const e=h(k)||null;E(e)}}),[k,h]);const S=Zq((e=>{let t=null;g(h)&&(t=h(e)||null),e!==k&&c(e,t),E(t)})),C=Zw((e=>{P(e)}),[]),T=Uq(n)||O||_;return q_("div",{class:F_()(e.class,"bio-properties-panel-entry",T?"has-error":""),"data-entry-id":n,children:[pw(Cz,{...e,debounce:r,disabled:o,feel:s,id:n,key:t,label:a,onInput:S,onError:C,onFocus:v,onBlur:b,placeholder:x,example:m,hostLanguage:u,singleLine:d,show:f,value:k,variables:y,tooltipContainer:p,OptionalComponent:e.OptionalComponent,tooltip:w}),T&&q_("div",{class:"bio-properties-panel-error",children:T}),q_(nz,{forId:n,element:t,value:i})]})}function $z(e){return q_(Nz,{class:"bio-properties-panel-feel-number",OptionalComponent:Mz,...e})}function jz(e){return q_(Nz,{class:"bio-properties-panel-feel-checkbox",OptionalComponent:Rz,...e})}function Iz(e){return!!e&&("checkbox"===e.type?!!e.checked||e.classList.contains("edited"):!!e.value||e.classList.contains("edited"))}function Lz(e){return`bio-properties-panel-${e}`}function Bz(e){const{top:t,left:n}=e.getBoundingClientRect();return{left:n-700-20,top:t}}function qz(e,t){let n="";return e&&e.type&&(n=`${e.type} / `),`${n}${t}`}const zz={},Fz={},Vz={};function Hz(e){const{element:t,headerProvider:n,placeholderProvider:i,groups:r,layoutConfig:o,layoutChanged:s,descriptionConfig:a,descriptionLoaded:l,tooltipConfig:c,tooltipLoaded:u,feelPopupContainer:f,getFeelPopupLinks:m,eventBus:g}=e,[y,v]=Ww(Uz(o));!function(e,t){const n=Kw(!1);Xw((()=>{if(n.current)return e();n.current=!0}),t)}((()=>{const e=Uz(o);v(e)}),[o]),Qw((()=>{"function"==typeof s&&s(y)}),[y,s]);const b={layout:y,setLayout:v,getLayoutForKey:(e,t)=>function(e,t,n){let i=e;return _(t,(function(e){if(d(i))return i=void 0,!1;i=i[e]})),p(i)?n:i}(y,e,t),setLayoutForKey:(e,t)=>{const n=z({},y);F(n,e,t),v(n)}},x=Yw((()=>function(e={}){return{...Fz,...e}}(a)),[a]);Qw((()=>{"function"==typeof l&&l(x)}),[x,l]);const w={description:x,getDescriptionForId:(e,t)=>x[e]&&x[e](t)},E=Yw((()=>function(e={}){return{...Vz,...e}}(c)),[c]);Qw((()=>{"function"==typeof u&&u(E)}),[E,u]);const O={tooltip:E,getTooltipForId:(e,t)=>E[e]&&E[e](t)},[P,k]=Ww({});Gq("propertiesPanel.setErrors",(({errors:e})=>k(e)),g);const S={errors:P},C={eventBus:g},T={element:t};return i&&!t?q_(tz,{...i.getEmpty()}):i&&h(t)?q_(tz,{...i.getMultiple()}):q_(Lq.Provider,{value:T,children:q_(jq.Provider,{value:S,children:q_($q.Provider,{value:w,children:q_(Bq.Provider,{value:O,children:q_(Lq.Provider,{value:b,children:q_(Iq.Provider,{value:C,children:q_(gz,{element:t,eventBus:g,popupContainer:f,getPopupLinks:m,children:q_("div",{class:"bio-properties-panel",children:[q_(Nq,{element:t,headerProvider:n}),q_("div",{class:"bio-properties-panel-scroll-container",children:r.map((e=>{const{component:n=Jq,id:i}=e;return pw(n,{...e,key:i,element:t})}))})]})})})})})})})})}function Uz(e={},t=zz){return{...t,...e}}function Wz(e){const{class:t,children:n,menuItems:i=[]}=e,r=Kw(null),o=Kw(null),[s,a]=Ww(!1),l=()=>a(!1);function c(e,t){e.stopPropagation(),l(),t()}var p,u;return p=[r.current],u=()=>l(),Qw((()=>{function e(e){p.some((t=>t&&t.contains(e.target)))||u()}return document.addEventListener("click",e,{capture:!0}),()=>document.removeEventListener("click",e,{capture:!0})}),[...p,u]),q_("div",{class:F_()("bio-properties-panel-dropdown-button",{open:s},t),onClick:function(e){o.current&&o.current.contains(e.target)||(e.stopPropagation(),a((e=>!e)))},ref:r,children:[n,q_("div",{class:"bio-properties-panel-dropdown-button__menu",ref:o,children:i.map(((e,t)=>q_(Gz,{onClick:c,item:e},t)))})]})}function Gz({item:e,onClick:t}){return e.separator?q_("div",{class:"bio-properties-panel-dropdown-button__menu-item bio-properties-panel-dropdown-button__menu-item--separator"}):e.action?q_("button",{type:"button",class:"bio-properties-panel-dropdown-button__menu-item bio-properties-panel-dropdown-button__menu-item--actionable",onClick:n=>t(n,e.action),children:e.entry}):q_("div",{class:"bio-properties-panel-dropdown-button__menu-item",children:e.entry})}function Qz(e){const{children:t=null,class:n,onClick:i=()=>{},...r}=e;return q_("button",{type:"button",...r,onClick:i,class:F_()("bio-properties-panel-group-header-button",n),children:t})}function Xz(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}function Kz(e){const{element:t,entries:n=[],id:i,label:r,open:o,remove:s,translate:a=Xz}=e,[l,c]=Ww(o),{onShow:p}=Jw(Lq),u={...Jw(Lq),onShow:Zw((()=>{c(!0),g(p)&&p()}),[p,c])},d=a("");return q_("div",{"data-entry-id":i,class:F_()("bio-properties-panel-collapsible-entry",l?"open":""),children:[q_("div",{class:"bio-properties-panel-collapsible-entry-header",onClick:()=>c(!l),children:[q_("div",{title:r||d,class:F_()("bio-properties-panel-collapsible-entry-header-title",!r&&"empty"),children:r||d}),q_("button",{type:"button",title:a("Toggle list item"),class:"bio-properties-panel-arrow bio-properties-panel-collapsible-entry-arrow",children:q_(Pq,{class:l?"bio-properties-panel-arrow-down":"bio-properties-panel-arrow-right"})}),s?q_("button",{type:"button",title:a("Delete item"),class:"bio-properties-panel-remove-entry",onClick:s,children:q_(Cq,{})}):null]}),q_("div",{class:F_()("bio-properties-panel-collapsible-entry-entries",l?"open":""),children:q_(Lq.Provider,{value:u,children:n.map((e=>{const{component:n,id:i}=e;return pw(n,{...e,element:t,key:i})}))})})]})}function Yz(e){const{autoFocusEntry:t,autoOpen:n,translate:i=Xz}=e;return Qw((()=>{if(n&&t){const e=we(`[data-entry-id="${t}"]`),n=we(".bio-properties-panel-input",e);n&&(g(n.select)?n.select():g(n.focus)&&n.focus(),n.scrollIntoView())}}),[n,t]),q_("div",{class:"bio-properties-panel-list-item",children:q_(Kz,{...e,open:n,translate:i})})}const Zz=()=>{};function Jz(e){const{add:t,element:n,id:i,items:r,label:o,shouldOpen:s=!1,translate:a=Xz}=e;Qw((()=>{null!=e.shouldSort&&console.warn("the property 'shouldSort' is no longer supported")}),[e.shouldSort]);const l=Kw(null),[c,p]=Qq(["groups",i,"open"],s),[u,d]=Ww(!1),h=Zw((()=>p(!0)),[p]),[f,m]=Ww([]),[g,y]=Ww(!1),v=Xq(n),b=Zw((()=>p(!c)),[c]),x=n===v&&c&&g?function(e,t){const n=e.map((e=>e.id)),i=t.map((e=>e.id));return n.filter((e=>!i.includes(e)))}(r,f):[];Qw((()=>{m(r),y(!1)}),[r]),Yq(l,"div.bio-properties-panel-scroll-container",d);const w=!!r.length,_={...Jw(Lq),onShow:h},E=Wq(),O=r.some((e=>!!E[e.id]||(e.entries?e.entries.some((e=>E[e.id])):void 0)));return q_("div",{class:"bio-properties-panel-group","data-group-id":"group-"+i,ref:l,children:[q_("div",{class:F_()("bio-properties-panel-group-header",w?"":"empty",w&&c?"open":"",u&&c?"sticky":""),onClick:w?b:Zz,children:[q_("div",{title:e.tooltip?null:o,"data-title":o,class:"bio-properties-panel-group-header-title",children:q_(qq,{value:e.tooltip,forId:"group-"+i,element:n,parent:l,children:o})}),q_("div",{class:"bio-properties-panel-group-header-buttons",children:[t?q_("button",{type:"button",title:a("Create new list item"),class:"bio-properties-panel-group-header-button bio-properties-panel-add-entry",onClick:e=>{y(!0),p(!0),t(e)},children:[q_(Sq,{}),w?null:q_("span",{class:"bio-properties-panel-add-entry-label",children:a("Create")})]}):null,w?q_("div",{title:a("List contains {numOfItems} item"+(1!=r.length?"s":""),{numOfItems:r.length}),class:F_()("bio-properties-panel-list-badge",O?"bio-properties-panel-list-badge--error":""),children:r.length}):null,w?q_("button",{type:"button",title:a("Toggle section"),class:"bio-properties-panel-group-header-button bio-properties-panel-arrow",children:q_(Pq,{class:c?"bio-properties-panel-arrow-down":"bio-properties-panel-arrow-right"})}):null]})]}),q_("div",{class:F_()("bio-properties-panel-list",c&&w?"open":""),children:q_(Lq.Provider,{value:_,children:r.map(((e,t)=>{if(!e)return;const{id:i}=e,r=x.includes(e.id);return pw(Yz,{...e,autoOpen:r,element:n,index:t,key:i,translate:a})}))})})]})}function eF(e){const{id:t,label:n,onChange:i,disabled:r,value:o=!1,onFocus:s,onBlur:a,tooltip:l}=e,[c,p]=Ww(o);Qw((()=>{o!==c&&p(o)}),[o]);return q_("div",{class:"bio-properties-panel-checkbox",children:[q_("input",{ref:Kq(t),id:iF(t),name:t,onFocus:s,onBlur:a,type:"checkbox",class:"bio-properties-panel-input",onChange:e=>{(({target:e})=>{i(e.checked)})(e),p(e.target.value)},checked:c,disabled:r}),q_("label",{for:iF(t),class:"bio-properties-panel-label",children:q_(qq,{value:l,forId:t,element:e.element,children:n})})]})}function tF(e){const{element:t,id:n,description:i,label:r,getValue:o,setValue:s,disabled:a,onFocus:l,onBlur:c,tooltip:p}=e,u=o(t),d=Uq(n);return q_("div",{class:"bio-properties-panel-entry bio-properties-panel-checkbox-entry","data-entry-id":n,children:[q_(eF,{disabled:a,id:n,label:r,onChange:s,onFocus:l,onBlur:c,value:u,tooltip:p,element:t},t),d&&q_("div",{class:"bio-properties-panel-error",children:d}),q_(nz,{forId:n,element:t,value:i})]})}function nF(e){return e&&!!e.checked}function iF(e){return`bio-properties-panel-${e}`}function rF(e){const{id:t,element:n,items:i=[],component:r,label:o="",open:s,onAdd:a,onRemove:l,autoFocusEntry:c,...p}=e,[u,d]=Ww(!!s),h=!!i.length,f=function(e=[],t){const n=Xq(e.slice())||[];if(t)return[];return n?e.filter((e=>!n.includes(e))):[]}(i,Xq(n)!==n);return Qw((()=>{u&&!h&&d(!1)}),[u,h]),q_("div",{"data-entry-id":t,class:F_()("bio-properties-panel-entry","bio-properties-panel-list-entry",h?"":"empty",u?"open":""),children:[q_("div",{class:"bio-properties-panel-list-entry-header",onClick:()=>h&&d(!u),children:[q_("div",{title:o,class:F_()("bio-properties-panel-list-entry-header-title",u&&"open"),children:o}),q_("div",{class:"bio-properties-panel-list-entry-header-buttons",children:[q_("button",{type:"button",title:"Create new list item",onClick:function(e){e.stopPropagation(),a(),u||d(!0)},class:"bio-properties-panel-add-entry",children:[q_(Sq,{}),h?null:q_("span",{class:"bio-properties-panel-add-entry-label",children:"Create"})]}),h&&q_("div",{title:`List contains ${i.length} item${1!=i.length?"s":""}`,class:"bio-properties-panel-list-badge",children:i.length}),h&&q_("button",{type:"button",title:"Toggle list item",class:"bio-properties-panel-arrow",children:q_(Pq,{class:u?"bio-properties-panel-arrow-down":"bio-properties-panel-arrow-right"})})]})]}),h&&q_(oF,{...p,autoFocusEntry:c,component:r,element:n,id:t,items:i,newItems:f,onRemove:l,open:u})]})}function oF(e){const{autoFocusEntry:t,component:n,element:i,id:r,items:o,newItems:s,onRemove:a,open:l,...c}=e,p=function(e=[]){const t=Yw((()=>new Map),e);return e=>{let n=t.get(e);return n||(n=Math.random().toString().slice(-6),t.set(e,n)),n}}(),u=s[0];return Qw((()=>{if(u&&t){const e=we(`[data-entry-id="${r}"]`),n=we("boolean"==typeof t?".bio-properties-panel-input":t,e);n&&(g(n.select)?n.select():g(n.focus)&&n.focus())}}),[u,t,r]),q_("ol",{class:F_()("bio-properties-panel-list-entry-items",l?"open":""),children:o.map(((e,t)=>{const o=p(e);return q_("li",{class:"bio-properties-panel-list-entry-item",children:[q_(n,{...c,element:i,id:r,index:t,item:e,open:e===u}),a&&q_("button",{type:"button",title:"Delete item",class:"bio-properties-panel-remove-entry bio-properties-panel-remove-list-entry",onClick:()=>a&&a(e),children:q_(Cq,{})})]},o)}))})}function sF(e){const{id:t,label:n,onChange:i,options:r=[],value:o="",disabled:s,onFocus:a,onBlur:l,tooltip:c}=e,p=Kq(t),[u,d]=Ww(o);return Qw((()=>{o!==u&&d(o)}),[o]),q_("div",{class:"bio-properties-panel-select",children:[q_("label",{for:cF(t),class:"bio-properties-panel-label",children:q_(qq,{value:c,forId:t,element:e.element,children:n})}),q_("select",{ref:p,id:cF(t),name:t,class:"bio-properties-panel-input",onInput:e=>{(({target:e})=>{i(e.value)})(e),d(e.target.value)},onFocus:a,onBlur:l,value:u,disabled:s,children:r.map(((e,t)=>e.children?q_("optgroup",{label:e.label,children:e.children.map(((e,t)=>q_("option",{value:e.value,disabled:e.disabled,children:e.label},t)))},t):q_("option",{value:e.value,disabled:e.disabled,children:e.label},t)))})]})}function aF(e){const{element:t,id:n,description:i,label:r,getValue:o,setValue:s,getOptions:a,disabled:l,onFocus:c,onBlur:p,validate:u,tooltip:d}=e,h=a(t),f=Uq(n),[m,y]=Ww(null);let v=o(t);Qw((()=>{if(g(u)){const e=u(v)||null;y(e)}}),[v,u]);const b=f||m;return q_("div",{class:F_()("bio-properties-panel-entry",b?"has-error":""),"data-entry-id":n,children:[q_(sF,{id:n,label:r,value:v,onChange:e=>{let t=null;g(u)&&(t=u(e)||null),s(e,t),y(t)},onFocus:c,onBlur:p,options:h,disabled:l,tooltip:d,element:t},t),b&&q_("div",{class:"bio-properties-panel-error",children:b}),q_(nz,{forId:n,element:t,value:i})]})}function lF(e){return e&&!!e.value}function cF(e){return`bio-properties-panel-${e}`}function pF(e){const{debounce:t,disabled:n,element:i,getValue:r,id:o,onBlur:s,onFocus:a,setValue:l}=e,c=r(i),[p,u]=Ww(c),d=Yw((()=>t((e=>l(e.value.length?e.value:void 0)))),[l,t]);return Qw((()=>{c!==p&&u(c)}),[c]),q_("div",{class:"bio-properties-panel-simple",children:q_("input",{id:uF(o),type:"text",name:o,spellCheck:"false",autoComplete:"off",disabled:n,class:"bio-properties-panel-input",onInput:e=>{d(e.target),u(e.target.value)},"aria-label":p||"",onFocus:a,onBlur:s,value:p},i)})}function uF(e){return`bio-properties-panel-${e}`}function dF(e){e.style.height="auto",e.style.height=`${e.scrollHeight+2}px`}function hF(e){const{id:t,label:n,debounce:i,onInput:r,value:o="",disabled:s,monospace:a,onFocus:l,onBlur:c,autoResize:p=!0,placeholder:u,rows:d=(p?1:2),tooltip:h}=e,[f,m]=Ww(o),g=Kq(t),y=function(e){const[t,n]=Ww(!!e&&!!e.clientHeight);return Xw((()=>{if(!e)return;const i=new ResizeObserver((([e])=>{requestAnimationFrame((()=>{const i=!!e.contentRect.height;i!==t&&n(i)}))}));return i.observe(e),()=>i.disconnect()}),[e,t]),t}(g.current),v=Yw((()=>i((e=>r(e.value.length?e.value:void 0)))),[r,i]);return Xw((()=>{p&&dF(g.current)}),[]),Xw((()=>{y&&p&&dF(g.current)}),[y]),Qw((()=>{o!==f&&m(o)}),[o]),q_("div",{class:"bio-properties-panel-textarea",children:[q_("label",{for:gF(t),class:"bio-properties-panel-label",children:q_(qq,{value:h,forId:t,element:e.element,children:n})}),q_("textarea",{ref:g,id:gF(t),name:t,spellCheck:"false",class:F_()("bio-properties-panel-input",a?"bio-properties-panel-input-monospace":"",p?"auto-resize":""),onInput:e=>{v(e.target),p&&dF(e.target),m(e.target.value)},onFocus:l,onBlur:c,placeholder:u,rows:d,value:f,disabled:s,"data-gramm":"false"})]})}function fF(e){const{element:t,id:n,description:i,debounce:r,label:o,getValue:s,setValue:a,rows:l,monospace:c,disabled:p,validate:u,onFocus:d,onBlur:h,placeholder:f,autoResize:m,tooltip:y}=e,v=Uq(n),[b,x]=Ww(null);let w=s(t);Qw((()=>{if(g(u)){const e=u(w)||null;x(e)}}),[w,u]);const _=v||b;return q_("div",{class:F_()("bio-properties-panel-entry",_?"has-error":""),"data-entry-id":n,children:[q_(hF,{id:n,label:o,value:w,onInput:e=>{let t=null;g(u)&&(t=u(e)||null),a(e,t),x(t)},onFocus:d,onBlur:h,rows:l,debounce:r,monospace:c,disabled:p,placeholder:f,autoResize:m,tooltip:y,element:t},t),_&&q_("div",{class:"bio-properties-panel-error",children:_}),q_(nz,{forId:n,element:t,value:i})]})}function mF(e){return e&&!!e.value}function gF(e){return`bio-properties-panel-${e}`}function yF(e){const{debounce:t,disabled:n=!1,id:i,label:r,onInput:o,onFocus:s,onBlur:a,placeholder:l,value:c="",tooltip:p}=e,[u,d]=Ww(c||""),h=Kq(i),f=Yw((()=>t((e=>o(e.value.length?e.value:void 0)))),[o,t]);return Qw((()=>{c!==u&&d(c)}),[c]),q_("div",{class:"bio-properties-panel-textfield",children:[q_("label",{for:xF(i),class:"bio-properties-panel-label",children:q_(qq,{value:p,forId:i,element:e.element,children:r})}),q_("input",{ref:h,id:xF(i),type:"text",name:i,spellCheck:"false",autoComplete:"off",disabled:n,class:"bio-properties-panel-input",onInput:e=>{f(e.target),d(e.target.value)},onFocus:s,onBlur:a,placeholder:l,value:u})]})}function vF(e){const{element:t,id:n,description:i,debounce:r,disabled:o,label:s,getValue:a,setValue:l,validate:c,onFocus:p,onBlur:u,placeholder:d,tooltip:h}=e,f=Uq(n),[m,y]=Ww(null);let v=a(t);Qw((()=>{if(g(c)){const e=c(v)||null;y(e)}}),[v,c]);const b=f||m;return q_("div",{class:F_()("bio-properties-panel-entry",b?"has-error":""),"data-entry-id":n,children:[q_(yF,{debounce:r,disabled:o,id:n,label:s,onInput:e=>{let t=null;g(c)&&(t=c(e)||null),l(e,t),y(t)},onFocus:p,onBlur:u,placeholder:d,value:v,tooltip:h,element:t},t),b&&q_("div",{class:"bio-properties-panel-error",children:b}),q_(nz,{forId:n,element:t,value:i})]})}function bF(e){return e&&!!e.value}function xF(e){return`bio-properties-panel-${e}`}function wF(e){return function(t){return!1!==e?B(t,m(e)?e:300):t}}wF.$inject=["config.debounceInput"];var _F={debounceInput:["factory",wF]};class EF{constructor(e){this._eventBus=e}isOpen(){return this._eventBus.fire("feelPopup._isOpen")}open(e,t,n){return this._eventBus.fire("feelPopup._open",{entryId:e,popupConfig:t,sourceElement:n})}close(){return this._eventBus.fire("feelPopup._close")}}EF.$inject=["eventBus"];var OF={feelPopup:["type",EF]};function PF(e){return Hx(e,"bpmn:FlowElement")||Hx(e,"bpmn:Participant")||Hx(e,"bpmn:Lane")||Hx(e,"bpmn:SequenceFlow")||Hx(e,"bpmn:MessageFlow")||Hx(e,"bpmn:DataInput")||Hx(e,"bpmn:DataOutput")?"name":Hx(e,"bpmn:TextAnnotation")?"text":Hx(e,"bpmn:Group")?"categoryValueRef":void 0}function kF(e){var t=e.businessObject,n=PF(t);if(n)return"categoryValueRef"===n?function(e){var t=e.categoryValueRef;return t&&t.value||""}(t):t[n]||""}function SF(e){return e&&!!Wx(e).triggeredByEvent}var CF=["y","Y"],TF=["z","Z"];function AF(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function MF(e,t){return-1!==(e=h(e)?e:[e]).indexOf(t.key)||-1!==e.indexOf(t.code)}function DF(e){return e.shiftKey}function RF(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}function NF(e){return(jF(e,"zeebe:IoMapping")||[])[0]}function $F(e){return function(e,t){var n=NF(e);return n&&n.get(t)||[]}(e,"inputParameters")}function jF(e,t,n){var i=function(e,t){var n=[],i=e.get("extensionElements");if(void 0!==i){var r=i.get("values");void 0!==r&&(n=w(r,(function(e){return function(e,t){return e&&"function"==typeof e.$instanceOf&&e.$instanceOf(t)}(e,t)})))}return n}(e,t);return n?(i[0]||{})[n]||[]:i}function IF(e){for(var t=[],n=e;n.$parent;)t.push(n.$parent),n=n.$parent;return t}function LF(e,t,n){n=n||0,h(e)||(e=[e]),_(e,(function(e,i){var r=t(e,i,n);h(r)&&r.length&&LF(r,t,n+1)}))}function BF(e,t,n){var i=!n||-1===e.indexOf(t);return i&&e.push(t),i}function qF(e,t,n){var i=[],r=[];return LF(e,(function(e,o,s){BF(i,e,t);var a=e.flowElements;if((-1===n||s=0?e[n].origin=function(e,t){return e.concat(t)}(e[n].origin,t.origin):e.push(t)}function VF(e,t,n){var i,r,o,s=(i=n,r=t,o=b(IF(e),(function(e){return function(e,t){return e&&"function"==typeof e.$instanceOf&&e.$instanceOf(t)}(e,"bpmn:SubProcess")&&function(e,t){return b($F(e),(function(e){return e.target===t}))}(e,r)})),o||i);return{name:t,origin:[e],scope:s}}var HF=[function(e){var t=e.elements,n=e.processVariables;return h(t)||(t=[t]),_(t,(function(e){var t=function(e){return(NF(e)||{}).inputParameters}(e);_(t,(function(t){var i=VF(e,t.target,e);FF(n,i)}))})),n},function(e){var t=e.elements,n=e.processVariables;return h(t)||(t=[t]),_(t,(function(e){var t=e.loopCharacteristics,i=t&&function(e){const t=jF(e,"zeebe:LoopCharacteristics")[0];return t&&t.inputElement}(t);if(i){var r=VF(e,i,e);FF(n,r)}})),n},function(e){var t=e.elements,n=e.containerElement,i=e.processVariables;return h(t)||(t=[t]),_(t,(function(e){var t=function(e){return(NF(e)||{}).outputParameters}(e);_(t,(function(t){var r=VF(e,t.target,n);FF(i,r)}))})),i},function(e){var t=e.elements,n=e.containerElement,i=e.processVariables;return h(t)||(t=[t]),_(t,(function(e){var t=e.loopCharacteristics,r=t&&function(e){const t=jF(e,"zeebe:LoopCharacteristics")[0];return t&&t.outputCollection}(t);if(r){var o=VF(e,r,n);FF(i,o)}})),i},function(e){var t=e.elements,n=e.containerElement,i=e.processVariables;return h(t)||(t=[t]),_(t,(function(e){var t=function(e){return(jF(e,"zeebe:CalledDecision")||[])[0]}(e)||function(e){return(jF(e,"zeebe:Script")||[])[0]}(e);if(t){var r=t.resultVariable;if(r){var o=VF(e,r,n);FF(i,o)}}})),i}];function UF(e,t=[]){var n=[],i=zF([e],!1);const r=[];return _([...HF,...t],(function(t){r.push(t({elements:i,containerElement:e,processVariables:n}))})),Promise.all(r).then((()=>n))}async function WF(e,t,n=[]){var i=await UF(t,n),r=function(e,t){return b(zF(t),(function(t){return t.id===e}))}(e,t),o=w(i,(function(e){return e.scope.id===r.id})),s=IF(r);return function(e,t){return e.concat(t)}(o,w(i,(function(e){return b(s,(function(t){return t.id===e.scope.id}))})))}function GF(e,t=[]){return WF(function(e){const t=QF(e);if(XF(e,"bpmn:Participant"))return t.processRef.id;return t.id}(e),function(e){const t=QF(e);if(XF(t,"bpmn:Participant"))return t.processRef;if(XF(t,"bpmn:Process"))return t;let n=t;for(;n.$parent&&!XF(n,"bpmn:Process");)n=n.$parent;return n}(e),t)}function QF(e){return e&&e.businessObject||e}function XF(e,t){var n=QF(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function KF(e,t,n){const i=t<0?e.length+t:t;if(i>=0&&i=0?e[n].origin=function(e,t){return e.concat(t)}(e[n].origin,t.origin):e.push(t)}function sV(e,t,n){var i,r,o,s=(i=n,r=t,o=b(eV(e),(function(e){return function(e,t){return e&&"function"==typeof e.$instanceOf&&e.$instanceOf(t)}(e,"bpmn:SubProcess")&&function(e,t){return b(function(e){return JF(e,"inputParameters")}(e),(function(e){return e.name===t}))}(e,r)})),o||i);return{name:t,origin:[e],scope:s}}function aV(e,t){var n=e.eventDefinitions;return n&&t?w(n,(function(e){return function(e,t){return e&&"function"==typeof e.$instanceOf&&e.$instanceOf(t)}(e,t)})):n}var lV=[function(e){var t=e.elements,n=e.containerElement,i=e.processVariables;return h(t)||(t=[t]),_(t,(function(e){var t=function(e){return JF(e,"outputParameters")}(e);_(t,(function(t){var r=sV(e,t.name,n);oV(i,r)}))})),i},function(e){var t=e.elements,n=e.containerElement,i=e.processVariables;return h(t)||(t=[t]),_(t,(function(e){var t=function(e){return e.get("camunda:resultVariable")}(e);if(t){var r=sV(e,t,n);oV(i,r)}})),i},function(e){var t=e.elements,n=e.containerElement,i=e.processVariables;return h(t)||(t=[t]),_(t,(function(e){_(YF(e),(function(t){var r=sV(e,t.id,n);oV(i,r)}))})),i},function(e){var t=e.elements,n=e.containerElement,i=e.processVariables;return h(t)||(t=[t]),_(t,(function(e){var t=function(e){return ZF(e,"camunda:Out")}(e);_(t,(function(t){if(!t.local){var r=sV(e,t.target,n);oV(i,r)}}))})),i},function(e){var t=e.elements,n=e.containerElement,i=e.processVariables,r=function(e,t){var r=sV(e,t,n);oV(i,r)};return h(t)||(t=[t]),_(t,(function(e){var t=function(e){return aV(e,"bpmn:ErrorEventDefinition")}(e);_(t,(function(t){var n=t.get("errorCodeVariable"),i=t.get("errorMessageVariable");n&&r(e,n),i&&r(e,i)}));var n=function(e){return aV(e,"bpmn:EscalationEventDefinition")}(e);_(n,(function(t){var n=t.get("escalationCodeVariable");n&&r(e,n)}))})),i}];function cV(e,t=[]){const n=[];var i=[],r=rV([e],!1);return _([...lV,...t],(function(t){n.push(t({elements:r,containerElement:e,processVariables:i}))})),Promise.all(n).then((()=>i))}async function pV(e,t,n=[]){var i=await cV(t,n),r=function(e,t){return b(rV(t),(function(t){return t.id===e}))}(e,t),o=w(i,(function(e){return e.scope.id===r.id})),s=eV(r);return function(e,t){return e.concat(t)}(o,w(i,(function(e){return b(s,(function(t){return t.id===e.scope.id}))})))}const uV=Dw({selectedElement:null,injector:null,getService:()=>null});function dV(e,t){const{getService:n}=Jw(uV);return n(e,t)}function hV(){return hV=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",bV({width:"32",height:"32",xmlns:"http://www.w3.org/2000/svg"},t),L_("path",{stroke:"#000",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"1.1,4.3",d:"M1.5 30.5L27 5"}),L_("path",{d:"M31.803.197L26.5 16.107l-1.52-1.52 3.783-11.35-11.35 3.783-1.52-1.52z"}));function wV(){return wV=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",HV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.975.049C8.195-.111.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.454 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.215-2.282-2.022-5.3-3.217-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.082 11.082 0 0116 5.021zm-3.956 3.946l-3.096 3.097 3.985 3.985-3.913 3.913 3.047 3.048 3.913-3.913 3.988 3.987 3.097-3.096L19.076 16l3.914-3.913-3.048-3.048-3.913 3.913-3.986-3.985zm-.002 1.222l3.988 3.987 3.913-3.913 1.826 1.826-3.913 3.913 3.985 3.986-1.873 1.873-3.985-3.985-3.913 3.913-1.827-1.827 3.914-3.913-3.988-3.987 1.873-1.873z"}));function WV(){return WV=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",WV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm-.56 5.772l-7.408 5.231 7.409 5.234v-5.057c2.385 1.687 4.771 3.371 7.157 5.057V10.793l-7.157 5.055v-5.055zm-.865 1.665v7.125l-5.048-3.562 5.048-3.563zm7.161 0v7.132l-5.048-3.566 5.048-3.566z"}));function QV(){return QV=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",QV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.97.04h-.127C8.713-.018 2.003 5.334.437 12.286c-1.51 6.123.98 13.005 6.136 16.665 5.125 3.788 12.546 4.105 17.912.623 5.272-3.276 8.33-9.766 7.325-15.916-.904-6.241-5.79-11.7-11.95-13.143A16.082 16.082 0 0015.97.04zm-.181 1.724c.115 0 .23 0 .347.003 6.625-.066 12.823 5.149 13.89 11.69 1.13 5.91-1.908 12.349-7.262 15.138-5.473 3.013-12.866 1.884-17.116-2.726C1.291 21.372.444 13.914 3.802 8.602c2.493-4.112 7.169-6.819 11.987-6.838zm.283 1.554c-.117 0-.234.002-.351.005-6.1 0-11.691 5.049-12.346 11.114-.78 5.684 2.795 11.612 8.218 13.52 5.139 1.943 11.416.101 14.624-4.38 3.461-4.583 3.262-11.538-.596-15.831-2.36-2.747-5.924-4.423-9.549-4.428zm-.078 1.695c.078 0 .156 0 .234.003 5.4 0 10.321 4.556 10.734 9.942.563 5.13-2.958 10.364-7.971 11.678-4.832 1.41-10.457-.935-12.746-5.446-2.463-4.559-1.2-10.795 3.014-13.883a11.072 11.072 0 016.735-2.294zm-5.352 4.266V22.761h10.716V9.279H10.642zm.863.866h8.987v11.75h-8.987v-11.75zm.927 1.323v.862h7.133v-.862h-7.133zm0 2.602v.866h7.133v-.866h-7.133zm0 3.008v.862h7.133v-.862h-7.133zm0 2.717v.863h7.133v-.863h-7.133z"}));function KV(){return KV=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",KV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm6.132 4.194c-1.21 2.455-2.422 4.91-3.633 7.364l-4.516-5.875-4.103 12.133 4.6-5.912c1.58 1.81 3.162 3.619 4.744 5.429L22.13 9.215zM14.383 13.1l4.295 5.445 1.073-2.387-1.027 4.131-4.384-5.157-1.778 2.75 1.821-4.782z"}));function ZV(){return ZV=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",ZV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm.006 3.927c-1.672 4.654-2.734 9.502-4.406 14.155 1.534-1.525 2.872-3.234 4.406-4.759l4.406 4.76c-1.496-4.71-2.91-9.446-4.406-14.156zm.032 2.929c.822 2.586 1.598 5.186 2.42 7.771l-2.42-2.612c-.682.597-2.452 2.884-2.338 2.388.87-2.487 1.447-5.067 2.338-7.547z"}));function eH(){return eH=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",eH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm1.78 4.093v3.555H9.785v6.714h7.994v3.554l5.829-6.911-5.83-6.912zm.974 2.584l3.61 4.295-3.61 4.294v-1.933h-7.88v-4.688h7.88v-1.968z"}));function nH(){return nH=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",nH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm-7.245 5.475v11.06h14.502v-11.06H8.754zm3.222 1.728h8.057c-1.427.878-2.854 2.806-4.281 3.016l-3.776-3.016zm9.554 1.017v6.587H10.48V13.24l5.524 4.414 5.526-4.414z"}));function rH(){return rH=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",rH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm.006 3.073l-7.62 5.531 2.91 8.95h9.42l2.91-8.95-7.62-5.53zm0 1.067l6.604 4.794-2.523 7.757h-8.162l-2.522-7.757 6.603-4.794z"}));function sH(){return sH=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",sH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M10.638 9.563V23.056h10.724V9.563H10.638zm.863.866h8.995v11.76H11.5V10.43zm.928 1.324v.862h7.139v-.862h-7.14zm0 2.605v.866h7.139v-.866h-7.14zm0 3.01v.863h7.139v-.863h-7.14zm0 2.72v.863h7.139v-.864h-7.14zM15.999.308h-.004l-.188.001h-.011l-.188.004h-.011L15.41.32h-.011l-.187.008h-.005L15.2.33l-.187.01h-.005l-.005.001-.187.013h-.011L14.62.37h-.01l-.186.018h-.011l-.185.02-.005.001h-.006l-.185.022-.005.001h-.005l-.185.025h-.005l-.005.001-.185.027h-.005l-.005.001-.184.029h-.005l-.005.001-.183.031-.006.001-.005.001-.182.033-.006.001-.005.001-.182.035-.005.001-.005.001-.182.038h-.005l-.005.002-.181.04h-.005l-.005.002-.18.042-.006.001-.005.001-.18.044-.005.002h-.005l-.17.045-.152.054-.139.082-.121.106-.1.127-.074.143-.046.155-.017.16.013.16.043.156.07.145.097.13.119.108.137.085.15.058.159.03.16-.001.133-.023.165-.043.168-.041.171-.04.171-.037.172-.036.17-.033.173-.03.17-.03.177-.027.171-.025.175-.022.175-.02.175-.02.176-.016.175-.014.177-.012.176-.01.177-.007.174-.006.177-.003.178-.001h.177l.178.004.174.006.177.007.176.01.177.012.175.014.176.017.175.018.175.02.175.023.171.025.176.027.17.03.174.03.17.033.171.036.154.033.16.02.161-.01.156-.04.146-.069.131-.094.111-.117.087-.135.061-.15.032-.158.002-.16-.027-.16-.057-.15L20 1.023l-.108-.12-.128-.097-.145-.073-.128-.038-.158-.035-.005-.001-.005-.001L19.14.62h-.005l-.005-.002-.182-.035h-.006L18.938.58l-.182-.033h-.006l-.005-.002-.183-.03-.005-.001-.006-.001-.183-.029h-.005l-.006-.001-.184-.027h-.005l-.005-.001-.185-.024h-.005L17.968.43 17.783.41l-.006-.001h-.005l-.185-.02h-.006l-.005-.001L17.39.37h-.005L17.38.368l-.187-.015h-.005l-.005-.001-.187-.013h-.011L16.8.328h-.011L16.6.32h-.011l-.187-.006h-.011L16.204.31h-.011L16.005.31H16zm9.016 2.935l-.16.004-.158.033-.15.062-.134.09-.116.111-.093.132-.067.147-.038.156-.01.161.022.16.05.153.078.141.103.124.102.087.045.034.142.106.137.105.14.11.136.11.135.112.134.115.134.117.13.115.132.122.128.12.127.122.126.125.124.126.124.128.121.13.118.128.118.132.117.133.113.134.113.136.11.136.109.137.109.142.104.14.103.14.101.142.1.144.099.146.095.145.094.147.093.15.092.15.087.149.087.15.084.152.084.155.08.152.08.155.04.081.084.138.11.119.128.096.145.072.155.043.16.013.16-.016.155-.046.144-.074.127-.099.106-.12.083-.14.055-.151.026-.16-.004-.16-.034-.158-.05-.124-.042-.085-.002-.004-.003-.005-.084-.165-.002-.004-.003-.005-.086-.164-.002-.004-.003-.005-.088-.162-.002-.005-.003-.005-.09-.161-.002-.005-.003-.004-.092-.16-.003-.005-.002-.005-.094-.16-.003-.004-.003-.004-.096-.159-.002-.004-.003-.005-.098-.157-.003-.004-.003-.005-.1-.156-.003-.004-.003-.005-.101-.154-.003-.005-.003-.004-.104-.154-.003-.004-.003-.005-.106-.152-.003-.005-.003-.004-.108-.151-.003-.004-.003-.005-.11-.15-.003-.004-.003-.004-.111-.15-.004-.003-.003-.005-.113-.147-.004-.004-.003-.005-.115-.146-.004-.004-.003-.004-.117-.145-.004-.004-.003-.004-.12-.144-.003-.004-.003-.004-.121-.142-.004-.004-.003-.004-.123-.141-.003-.004-.004-.004-.125-.14-.003-.004-.004-.004-.127-.138-.003-.004-.004-.004-.128-.136-.004-.004-.004-.004-.13-.135-.004-.004-.004-.004-.132-.134-.003-.004-.004-.003-.134-.133-.004-.003-.004-.004-.135-.13-.004-.004-.004-.004-.136-.128-.004-.004-.004-.004-.138-.126-.004-.004-.004-.003-.14-.125-.004-.004-.004-.003-.14-.123-.005-.004-.004-.003-.142-.121-.004-.004-.004-.003-.144-.12-.004-.003-.004-.003-.145-.117-.004-.004-.004-.003-.147-.115-.004-.004-.004-.003-.148-.113-.004-.003-.004-.004-.149-.111-.004-.003-.004-.004-.05-.036-.14-.083-.15-.055-.16-.027zm-18.381.344l-.161.008-.157.037-.147.066-.111.074-.04.032-.005.003-.004.004-.145.117-.004.003-.004.004-.144.119-.004.003-.004.004-.142.12-.004.004-.004.004-.141.123-.004.003-.004.004-.14.125-.004.003-.004.004-.138.126-.004.004-.004.004-.136.128-.004.004-.004.004-.135.13-.004.004-.004.003-.134.133-.004.003L4.682 5l-.132.134-.003.004-.004.004-.13.135-.004.004-.004.004-.128.136-.004.004-.004.004-.126.138-.004.004-.003.004-.125.14-.004.004-.003.004-.123.14-.004.005-.003.004-.121.142-.004.004-.003.004-.12.144-.003.004-.003.004-.117.145-.004.004-.003.004-.115.146-.004.005-.003.004-.113.147-.003.005-.004.004-.111.149-.003.004-.004.004-.11.15-.002.005-.003.004-.108.151-.003.004-.003.005-.106.152-.003.005-.003.004-.104.154-.003.004-.003.005-.102.154-.003.005-.002.004-.1.156-.003.005-.003.004-.098.157-.003.005-.003.004-.096.159-.002.004-.003.005-.094.16-.003.004-.002.004-.092.16-.003.005-.003.005-.09.161-.002.005-.003.005-.088.162-.002.005-.003.004-.086.164-.002.005-.002.004-.084.165-.003.005-.002.004-.082.166-.002.004-.003.005-.08.167-.002.004-.002.005-.078.168-.002.004-.002.005-.045.1-.053.153-.023.16.007.16.037.157.065.148.092.132.114.114.134.09.148.064.157.035.161.006.16-.025.152-.054.14-.08.121-.106.1-.126.065-.118.043-.095.074-.16.075-.155.077-.157.08-.155.08-.152.083-.155.085-.152.086-.15.088-.149.091-.15.094-.15.094-.147.095-.145.099-.146.1-.144.1-.142.104-.14.104-.14.11-.142.107-.137.11-.136.114-.136.113-.134.117-.133.118-.132.117-.129.122-.13.124-.127.123-.126.127-.125.127-.122.128-.12.132-.122.13-.115.133-.117.135-.115.135-.111.136-.11.037-.03.117-.11.094-.132.068-.146.04-.156.01-.161-.02-.16-.05-.154-.076-.141-.102-.125-.123-.104-.14-.08-.153-.051-.16-.023zM16 3.595h-.005l-.148.001h-.01l-.147.003h-.011l-.147.005h-.011l-.146.007h-.011l-.146.009h-.011l-.146.01h-.005l-.005.001-.146.012h-.011l-.145.014h-.006l-.005.001-.05.006-.158.031-.15.06-.135.088-.117.111-.094.13-.069.147-.04.156-.01.16.019.16.049.154.076.142.102.125.123.105.14.08.152.051.16.023.134-.003.045-.005.135-.013.133-.01.136-.01.135-.007.137-.006.136-.004.136-.003h.274l.136.003.136.004.136.006.136.007.136.01.133.01.135.013.135.014.135.016.134.018.132.018.134.021.133.023.133.024.133.025.13.027.132.03.132.03.129.031.13.034.129.035.129.036.13.04.126.038.128.042.126.042.128.045.127.047.126.047.12.048.127.051.123.052.006.002.147.048.16.021.16-.009.157-.038.147-.067.131-.093.112-.116.089-.135.062-.149.033-.158.004-.16-.027-.16-.055-.151-.083-.139-.107-.12-.127-.099-.118-.063-.004-.001-.005-.003-.005-.002-.133-.056-.005-.002-.005-.002-.134-.054-.004-.002-.005-.002-.135-.053-.005-.002-.005-.002-.135-.051-.005-.002-.005-.002-.135-.05-.005-.001-.005-.002-.137-.048-.005-.001-.005-.002-.137-.046-.005-.002-.005-.002-.137-.044-.005-.002-.005-.001-.138-.043-.006-.002-.005-.001-.138-.042-.005-.001-.005-.002-.14-.04H19.4l-.005-.002-.14-.038-.005-.001-.005-.002-.14-.036-.005-.001-.005-.001-.141-.035-.005-.001-.005-.001-.142-.033-.005-.001-.005-.001-.142-.031-.005-.002h-.005l-.142-.03-.005-.001-.005-.001-.143-.028h-.005l-.005-.002-.143-.025-.006-.001-.005-.001-.143-.024-.005-.001-.006-.001-.143-.022-.006-.001h-.005l-.144-.022h-.005l-.006-.001-.144-.019h-.005l-.006-.001-.144-.017h-.006l-.005-.001-.145-.016h-.011l-.145-.014H17.1l-.005-.001-.146-.012h-.01l-.146-.01-.006-.001h-.005l-.146-.009h-.011l-.147-.006h-.01L16.32 3.6h-.011l-.147-.003h-.011l-.147-.001H16zm-5.482 1.366l-.16.008-.157.037-.123.053-.06.032-.005.002-.004.003-.128.069-.004.002-.005.003-.126.07-.005.003-.004.002-.126.072-.005.003-.004.003-.125.073-.004.003-.005.003-.124.075-.004.003-.005.002-.123.077-.004.003-.005.003-.122.078-.004.003-.005.003-.121.08-.004.002-.005.003-.12.082-.005.003-.004.003-.12.083-.004.003-.004.003-.118.084-.005.003-.004.003-.118.086-.004.003-.004.003-.117.088-.004.003-.004.003-.116.089-.004.003-.004.004-.114.09-.005.003-.004.003-.113.092-.004.004-.004.003-.113.093-.004.004-.004.003-.111.095-.005.003-.004.004-.11.096-.004.004-.004.003-.11.098-.003.003-.004.004-.108.1-.004.003-.004.003-.107.101-.004.004-.004.003-.106.102-.004.004-.003.004-.105.103-.004.004-.004.004-.103.105-.004.004-.004.003-.102.106-.003.004-.004.004-.1.107-.004.004-.004.004-.099.108-.004.004-.003.004-.098.11-.003.003-.004.004-.096.11-.004.005-.003.004-.095.111-.003.004-.004.004-.093.113-.003.004-.004.004-.092.113-.003.004-.003.005-.09.114-.004.004-.003.004-.089.116-.003.004-.003.004-.088.117-.003.004-.003.004-.086.118-.003.004-.003.005-.084.118-.003.004-.003.005-.083.12-.003.003-.003.005-.082.12-.003.005-.002.004-.068.103-.076.142-.048.154-.018.16.011.161.041.156.07.146.095.13.117.11.136.086.15.06.158.03.162.002.158-.03.15-.057.138-.085.119-.109.082-.105.065-.099.075-.11.077-.113.077-.107.08-.11.08-.108.084-.108.083-.105.086-.106.086-.104.088-.104.089-.101.09-.102.093-.101.093-.099.094-.097.095-.096.098-.097.098-.095.099-.093.1-.092.103-.091.101-.089.104-.088.104-.086.106-.086.106-.083.106-.082.109-.082.108-.079.11-.078.11-.076.112-.076.112-.074.113-.072.113-.071.115-.07.115-.068.118-.067.117-.065.12-.065.054-.029.135-.088.116-.111.094-.132.068-.146.04-.156.009-.161-.02-.16-.05-.153-.078-.142-.102-.125-.123-.103-.141-.079-.153-.051-.16-.022zm13.91 2.116l-.162.008-.157.037-.147.066-.132.092-.113.116-.09.134-.063.148-.034.157-.005.162.025.159.055.152.082.138.086.103.09.09.094.098.092.099.093.1.091.103.089.101.088.104.086.104.086.106.083.105.083.108.08.108.081.11.077.107.077.112.075.111.075.114.072.113.071.113.07.114.068.118.067.115.065.118.064.117.062.117.061.121.059.119.059.122.056.121.054.12.055.125.051.123.051.125.048.123.048.127.047.126.044.125.043.128.042.129.039.126.038.13.022.076.058.15.085.137.11.119.129.096.145.07.155.043.16.013.161-.017.154-.046.144-.075.126-.1.106-.12.082-.14.055-.151.025-.16-.005-.16-.026-.132-.023-.082-.002-.005-.001-.005-.042-.139-.001-.005-.002-.005-.043-.138-.001-.005-.002-.005-.044-.137-.002-.005-.002-.005-.046-.137-.002-.005-.001-.005-.048-.137-.002-.005-.002-.005-.05-.135-.001-.005-.002-.005-.051-.135-.002-.005-.002-.005-.053-.135-.002-.005-.002-.005-.054-.133-.002-.005-.002-.005-.057-.133-.002-.005-.002-.005-.057-.132-.003-.005-.002-.005-.06-.132-.001-.005-.002-.004-.061-.132-.003-.004-.002-.005-.063-.13-.002-.005-.002-.005-.064-.13-.003-.004-.002-.005-.066-.129-.002-.004-.003-.005-.067-.128-.002-.005-.003-.004-.069-.128-.002-.004-.003-.005-.07-.126-.003-.005-.003-.004-.072-.126-.002-.005-.003-.004-.074-.125-.002-.004-.003-.005-.075-.124-.003-.004-.003-.005-.076-.123-.003-.004-.003-.005-.078-.122-.003-.004-.003-.005-.08-.121-.003-.004-.003-.005-.081-.12-.003-.005-.003-.004-.083-.12-.003-.004-.003-.004-.084-.118-.003-.005-.003-.004-.086-.118-.003-.004-.004-.004-.087-.117-.003-.004-.003-.004-.09-.116-.002-.004-.004-.004-.09-.114-.003-.005-.004-.004-.091-.113-.004-.004-.003-.004-.094-.113-.003-.004-.003-.004-.095-.111-.004-.004-.003-.004-.096-.11-.004-.005-.003-.004-.098-.11-.004-.003-.003-.004-.1-.108-.003-.004-.004-.004-.1-.107-.004-.004-.004-.004-.102-.106-.003-.003-.004-.004-.093-.095-.124-.103-.14-.08-.153-.05-.16-.023zM4.45 13.135l-.161.002-.158.032-.15.06-.135.088-.118.11-.094.131-.069.146-.035.129-.026.132v.005l-.002.005-.025.143-.001.005-.001.006-.024.143-.001.005-.001.006-.022.143-.001.006-.001.005-.02.144-.001.005-.001.005-.019.145v.005l-.001.006-.017.144v.006l-.001.005-.016.145v.011l-.014.145v.005l-.001.006-.012.146v.01l-.01.146-.001.006v.005l-.009.146v.011l-.007.146v.011l-.004.147v.011l-.003.147v.01l-.002.148v.01l.001.148v.01l.003.147v.011l.005.147v.01l.007.147v.011l.009.146v.011l.01.146v.01l.013.146v.011l.014.145v.005l.001.006.016.145v.011l.018.144v.006l.001.005.019.144v.006l.001.005.021.144v.005l.002.006.022.143v.006l.002.005.024.143v.005l.002.006.025.143.001.005.001.005.028.143.001.005.001.005.03.142v.005l.002.006.03.141.002.005.001.005.033.142v.005l.002.005.035.14v.006l.002.005.036.14.002.005.001.005.038.14.001.005.002.005.04.14v.005l.002.005.042.138.001.006.002.005.042.138.002.005.002.005.017.054.064.148.09.134.114.114.132.092.148.065.157.037.16.007.16-.023.153-.052.14-.08.123-.104.102-.125.076-.142.049-.153.02-.16-.011-.161-.031-.13-.017-.051-.039-.126-.038-.13-.037-.128-.035-.13-.033-.128-.033-.134-.03-.13-.029-.131-.026-.13-.026-.133-.024-.133-.023-.133-.02-.132-.02-.136-.017-.132-.016-.135-.014-.135-.012-.133-.012-.138-.009-.133-.007-.136-.006-.138-.004-.134-.003-.136v-.274l.003-.136.004-.134.006-.139.007-.136.01-.133.01-.138.013-.132.014-.135.016-.135.017-.132.02-.137.02-.13.023-.134.024-.133.024-.126.016-.16-.014-.161-.044-.155-.072-.145-.098-.128-.12-.108-.137-.084-.15-.057-.16-.029zm26.698 1.601l-.161.01-.157.04-.146.067-.131.093-.112.117-.088.135-.061.149-.033.157-.005.134.006.14.006.176.003.177.001.178-.001.177-.003.178-.006.177-.007.176-.01.177-.012.176-.015.176-.016.173-.018.175-.02.175-.024.174-.025.175-.026.17-.03.174-.03.173-.033.17-.036.172-.037.17-.04.17-.042.172-.043.168-.045.166-.048.169-.05.167-.052.168-.053.164-.056.166-.058.166-.06.16-.062.165-.062.158-.066.165-.068.16-.07.16-.07.158-.075.159-.074.155-.079.158-.08.158-.06.15-.03.158-.001.161.029.159.058.15.085.137.108.119.13.097.144.07.156.044.16.013.16-.017.155-.046.143-.074.127-.1.107-.12.07-.115.083-.164.003-.005.002-.004.082-.166.002-.005.003-.004.08-.167.002-.005.002-.004.078-.168.002-.005.002-.004.076-.169.002-.004.002-.005.074-.17.002-.004.002-.005.072-.17.002-.005.002-.005.07-.171.001-.005.002-.005.068-.172.002-.004.002-.005.065-.173.002-.005.002-.005.063-.173.002-.005.002-.005.06-.174.003-.005.001-.005.06-.175.001-.005.002-.005.057-.176.001-.005.002-.005.055-.177.001-.005.002-.005.052-.177.002-.005.001-.005.051-.178.001-.005.002-.005.048-.179.002-.005v-.005l.047-.179.001-.005.002-.005.044-.18v-.005l.002-.005.042-.18.001-.006.001-.005.04-.181.001-.005.001-.005.037-.182.002-.005v-.005l.036-.182v-.006l.002-.005.033-.182v-.006l.002-.005.03-.183.001-.005.001-.005.029-.184v-.005l.001-.006.027-.184v-.005l.001-.005.024-.185v-.005l.001-.005.022-.185v-.006l.001-.005.02-.185v-.006l.001-.005.017-.186v-.005l.001-.005.015-.187v-.005l.001-.005.013-.187v-.01l.01-.187.001-.006v-.005l.009-.187v-.011l.006-.187V16.7l.004-.188v-.011l.001-.188v-.01l-.001-.188v-.011l-.004-.188v-.011l-.006-.187v-.011l-.007-.145-.022-.16-.05-.152-.08-.141-.103-.124-.125-.102-.141-.077-.153-.05-.16-.02zm-30.21.572l-.161.001-.158.032-.15.06-.136.087-.117.11-.095.131-.068.146-.04.156-.012.133-.001.14v.01l.001.188v.011l.004.188v.011l.006.187v.011l.008.187v.011l.011.187v.005l.001.005.013.187v.01l.016.187v.01l.018.186v.011l.02.185.001.005v.006l.022.185.001.005v.005l.025.185v.005l.001.005.027.184v.006l.001.005.029.184v.005l.001.005.031.183.001.005.001.006.033.182.001.005.001.006.035.182.001.005.001.005.038.182v.005l.002.005.04.181v.005l.002.005.042.18.001.006.001.005.044.18.002.005v.005l.047.18.001.004.002.005.048.179.002.005.001.005.05.178.002.005.001.005.053.177.002.005.001.005.055.177.002.005.001.005.057.176.002.005.001.005.06.175.001.005.002.005.061.174.002.005.002.005.063.173.002.005.002.005.065.173.002.005.002.004.067.172.002.005.002.005.07.171.002.005.002.005.072.17.002.005.002.004.074.17.002.005.002.004.076.169.002.004.002.005.078.168.002.004.002.005.08.167.003.004.002.005.082.166.002.004.003.005.02.04.086.136.11.118.13.095.146.07.156.041.16.012.16-.019.155-.048.142-.075.126-.1.105-.123.08-.14.054-.152.024-.16-.006-.16-.036-.158-.051-.123-.018-.034-.078-.158-.074-.155-.074-.16-.071-.157-.07-.16-.068-.16-.067-.165-.062-.158-.062-.164-.059-.161-.058-.166-.056-.166-.053-.164-.052-.168-.05-.167-.048-.17-.045-.165-.043-.168-.043-.172-.039-.17-.037-.17-.036-.172-.033-.17-.03-.173-.03-.174-.027-.17-.025-.175-.022-.174-.021-.175-.018-.175-.017-.173-.014-.176-.012-.176-.01-.177-.007-.176-.006-.177-.003-.178-.001-.177v-.134l-.013-.16-.044-.156-.072-.144-.097-.129-.12-.108-.137-.085-.15-.057-.159-.028zm26.798 2.024l-.16.007-.157.038-.148.066-.132.092-.113.115-.09.134-.062.148-.03.127-.001.004-.023.134-.024.133-.026.133-.026.13-.03.132-.03.129-.032.134-.033.128-.035.13-.037.128-.038.13-.04.126-.04.128-.044.128-.044.126-.046.126-.048.126-.05.125-.05.125-.051.122-.054.123-.055.122-.056.12-.058.122-.06.12-.061.12-.063.119-.062.116-.067.119-.066.116-.069.115-.069.115-.07.113-.073.113-.074.112-.076.113-.077.112-.077.107-.08.11-.08.107-.085.11-.044.056-.088.135-.06.15-.033.158-.002.16.027.16.057.15.083.138.108.12.128.098.144.072.155.045.16.015.161-.016.155-.044.144-.073.128-.098.09-.099.05-.061.003-.004.003-.005.089-.115.003-.004.003-.005.088-.116.003-.004.003-.005.086-.117.003-.004.003-.005.084-.118.003-.004.003-.005.083-.12.003-.004.003-.004.081-.12.003-.005.003-.004.08-.121.003-.005.003-.004.078-.122.003-.005.003-.004.077-.123.002-.005.003-.004.075-.124.003-.005.003-.004.073-.125.003-.005.003-.004.072-.126.002-.004.003-.005.07-.126.003-.005.002-.005.07-.127.002-.004.002-.005.068-.128.002-.005.002-.004.066-.13.003-.004.002-.005.064-.13.002-.004.003-.005.062-.13.002-.005.003-.005.06-.13.003-.005.002-.005.06-.132.002-.005.002-.005.057-.132.003-.005.002-.005.056-.133.002-.005.002-.005.054-.134.002-.004.002-.005.053-.135.002-.005.002-.005.051-.135.002-.005.002-.005.05-.135.001-.005.002-.005.048-.137.001-.005.002-.005.046-.137.002-.005.002-.005.044-.137.002-.005.002-.005.042-.138.002-.005.001-.006.042-.138.001-.005.002-.005.04-.14v-.005l.002-.005.038-.14.001-.005.002-.005.036-.14.001-.005.001-.005.035-.141.001-.005.001-.005.033-.142.001-.005.001-.005.031-.141.001-.006.002-.005.029-.142v-.005l.002-.005.028-.143v-.005l.002-.005.025-.143.001-.006.001-.005.024-.143.001-.005.001-.006.001-.006.01-.161-.02-.16-.05-.154-.077-.141-.102-.125-.123-.104-.141-.079-.153-.051-.16-.022zM6.841 23.019l-.16.024-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.018.16.011.161.041.156.07.146.077.109.04.048.003.004.003.004.095.111.003.004.004.004.096.11.004.005.003.004.098.109.003.004.004.004.1.108.003.004.003.004.101.107.004.004.003.004.102.105.004.004.004.004.103.105.004.004.004.003.105.104.003.004.004.003.106.102.004.004.004.004.107.1.004.004.004.004.108.099.004.003.004.004.11.098.003.003.004.004.11.096.004.003.005.004.11.095.005.003.004.004.113.093.004.003.004.004.113.091.004.004.005.003.114.09.004.004.004.003.116.089.004.003.004.003.117.088.004.003.004.003.118.086.004.003.005.003.118.084.004.003.005.003.119.083.004.003.005.003.12.081.005.003.004.003.121.08.005.003.004.003.122.078.005.003.004.003.123.076.005.003.004.003.124.075.005.003.004.003.125.073.004.003.005.002.126.073.004.002.005.003.126.07.005.003.004.002.128.07.004.002.005.002.128.067.005.003.004.002.13.066.004.002.005.003.13.064.004.002.005.003.13.062.005.002.004.003.132.06.004.003.005.002.132.06.005.002.005.002.132.057.005.002.005.002.133.057.005.002.005.002.133.054.005.002.005.002.13.05.154.045.16.016.16-.015.156-.045.144-.072.128-.098.108-.12.083-.138.057-.15.028-.16-.003-.16-.032-.159-.061-.149-.088-.135-.11-.117-.132-.094-.12-.058-.124-.049-.126-.051-.122-.051-.122-.054-.12-.054-.126-.058-.119-.057-.12-.06-.12-.06-.118-.063-.117-.064-.119-.066-.116-.066-.115-.068-.115-.07-.113-.07-.115-.074-.112-.074-.11-.075-.11-.076-.112-.08-.11-.08-.109-.081-.106-.082-.104-.082-.106-.086-.105-.087-.101-.086-.105-.091-.1-.09-.1-.091-.1-.094-.097-.094-.1-.098-.093-.095-.096-.1-.093-.098-.092-.101-.089-.1-.09-.102-.088-.104-.036-.043-.114-.114-.133-.091-.148-.065-.157-.036-.161-.006zm15.063 2.701l-.16.014-.156.044-.12.057-.06.034-.12.066-.117.064-.118.062-.12.061-.12.06-.118.057-.126.058-.12.054-.122.054-.122.05-.126.052-.125.05-.124.046-.127.047-.125.044-.129.043-.126.04-.13.042-.128.038-.127.035-.13.036-.131.034-.129.031-.132.03-.13.03-.135.027-.133.026-.13.023-.13.022-.137.021-.132.02-.134.017-.132.015-.138.015-.135.013-.133.01-.138.01-.136.007-.134.006-.136.004-.14.003-.16.018-.155.047-.142.076-.127.1-.105.122-.08.14-.054.151-.025.16.006.16.035.158.064.148.09.134.114.114.133.092.147.065.157.036.134.008.145-.002h.011l.147-.005h.01l.147-.007h.011l.146-.009h.011l.146-.01h.005l.005-.001.146-.012h.011l.145-.014h.005l.006-.001.145-.016h.011l.144-.018h.006l.005-.001.144-.02h.011l.144-.021.005-.001h.006l.143-.023.006-.001h.005l.143-.025h.005l.006-.002.143-.026h.005l.005-.002.143-.027.005-.001.005-.001.142-.03h.005l.005-.002.142-.03.005-.002.005-.001.142-.033.005-.001.005-.001.14-.035.006-.001.005-.001.14-.037h.005l.005-.002.14-.038.005-.002h.005l.14-.04.005-.002.005-.001.138-.042.005-.001.006-.002.138-.043.005-.001.005-.002.137-.044.005-.002.005-.002.137-.046.005-.002.005-.001.137-.048.005-.002.005-.002.135-.05.005-.001.005-.002.135-.051.005-.002.005-.002.135-.053.005-.002.004-.002.134-.054.005-.002.005-.002.133-.057.005-.002.005-.002.132-.057.005-.003.005-.002.132-.06.005-.001.004-.002.131-.061.005-.003.005-.002.13-.062.005-.003.005-.002.13-.064.004-.003.005-.002.128-.066.005-.002.005-.003.128-.067.005-.002.004-.003.127-.069.005-.002.005-.003.126-.07.005-.003.004-.003.065-.037.132-.093.112-.115.089-.135.062-.149.034-.157.003-.161-.026-.16-.055-.15-.082-.14-.107-.12-.127-.1-.144-.073-.154-.046-.16-.016zM6.33 27.127l-.16.023-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.02.16.012.161.041.156.07.146.094.13.096.093.032.026.004.003.004.004.145.117.004.003.004.004.146.115.005.003.004.004.147.113.005.003.004.004.149.111.004.003.004.003.15.11.005.003.004.003.151.108.004.003.005.003.152.106.005.003.004.003.154.104.004.003.005.003.154.102.005.002.004.003.156.1.005.003.004.003.157.098.005.003.004.002.159.096.004.003.005.003.16.094.004.003.004.002.16.092.005.003.005.002.161.09.005.003.005.002.162.088.005.003.004.002.164.086.005.003.004.002.165.084.005.003.004.002.166.082.004.002.005.003.167.08.004.002.005.002.168.078.004.002.005.002.168.076.005.002.005.002.17.074.004.002.005.002.17.072.005.002.005.002.17.07.006.002.005.001.171.068.005.002.005.002.173.065.005.002.005.002.173.063.005.002.005.002.174.06.005.003.005.001.175.06.005.001.005.002.176.057.005.001.005.002.176.055.006.001.005.002.177.052.005.002.005.001.178.05.005.002.005.002.178.048.006.001.005.002.179.046.005.001.005.002.18.044h.005l.005.002.18.042.006.001.005.001.159.035.16.02.16-.01.157-.04.146-.069.13-.094.112-.117.087-.136.06-.149.033-.158.002-.161-.028-.159-.057-.15-.084-.138-.108-.12-.128-.098-.144-.072-.128-.039-.154-.033-.168-.04-.171-.041-.17-.044-.168-.046-.167-.047-.168-.05-.165-.051-.166-.054-.166-.056-.163-.057-.165-.06-.161-.062-.164-.064-.16-.065-.16-.068-.162-.07-.157-.07-.157-.074-.157-.075-.156-.077-.153-.079-.156-.082-.153-.082-.154-.086-.15-.086-.152-.09-.148-.09-.147-.092-.149-.095-.145-.095-.144-.098-.145-.1-.143-.102-.14-.103-.14-.104-.14-.108-.139-.11-.136-.11-.027-.022-.133-.091-.148-.065-.157-.036-.161-.006zm19.215.087l-.16.01-.157.039-.146.067-.11.076-.064.051-.139.11-.14.108-.14.104-.14.103-.143.101-.145.101-.144.098-.145.095-.149.095-.148.093-.147.089-.152.09-.15.086-.154.086-.153.082-.156.082-.153.079-.156.077-.157.075-.158.073-.157.071-.16.07-.16.068-.161.065-.164.064-.161.061-.165.06-.163.058-.166.056-.166.054-.166.051-.167.05-.167.047-.17.046-.168.044-.171.042-.168.039-.17.037-.11.023-.154.047-.143.075-.126.1-.106.122-.081.139-.054.152-.025.16.006.16.035.158.063.148.09.133.114.115.132.092.148.065.157.037.16.007.133-.016.115-.024.005-.001.005-.001.181-.04h.005l.005-.002.18-.042.006-.001.005-.001.18-.044.005-.002.005-.001.18-.046.004-.002h.005l.179-.05h.005l.005-.002.178-.05.005-.002.005-.002.177-.052.005-.002.005-.001.177-.055.005-.002.005-.001.176-.057.005-.002.005-.002.175-.059.005-.001.005-.002.174-.061.005-.002.005-.002.173-.063.005-.002.005-.002.173-.065.004-.002.005-.002.172-.068.005-.002.005-.002.171-.07.005-.001.005-.002.17-.072.005-.002.004-.002.17-.074.005-.002.004-.002.169-.076.004-.002.005-.002.168-.078.004-.002.005-.003.167-.08.004-.002.005-.002.166-.082.004-.002.005-.003.165-.084.004-.002.005-.003.163-.086.005-.002.005-.003.162-.088.005-.002.005-.003.161-.09.005-.002.004-.003.16-.092.005-.003.005-.002.16-.094.004-.003.004-.003.158-.096.005-.002.004-.003.158-.098.004-.003.005-.003.156-.1.004-.003.004-.003.155-.101.005-.003.004-.003.154-.104.004-.003.004-.003.153-.106.004-.003.005-.003.151-.108.004-.003.005-.003.15-.11.004-.003.004-.003.149-.112.004-.003.004-.003.148-.113.004-.004.004-.003.147-.115.004-.004.004-.003.068-.055.116-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.05-.153-.08-.14-.103-.125-.124-.102-.142-.077-.153-.05-.16-.02z"}));function lH(){return lH=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",lH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M16.012 9.222c-1.673 4.657-2.735 9.508-4.409 14.164 1.536-1.526 2.874-3.236 4.41-4.762l4.408 4.762c-1.497-4.712-2.911-9.451-4.409-14.164zm.032 2.93c.823 2.588 1.599 5.19 2.421 7.777l-2.42-2.614c-.683.598-2.454 2.886-2.34 2.39.871-2.489 1.448-5.07 2.34-7.552zM16.012.312c-1.448.02-2.93.157-4.302.628-.852.447-.255 1.863.66 1.574 2.255-.608 4.648-.607 6.922-.108.934.075 1.228-1.376.338-1.67C18.451.44 17.227.317 16.012.311zm9.012 2.934c-.913-.104-1.272 1.258-.454 1.648 1.834 1.36 3.293 3.185 4.31 5.22.526.776 1.842.098 1.515-.78a15.522 15.522 0 00-5.06-6.006c-.1-.044-.203-.07-.31-.082zM6.65 3.59c-.762.089-1.24.809-1.805 1.267C3.38 6.295 2.163 8.007 1.37 9.905c-.266.898 1.094 1.484 1.564.675a14.825 14.825 0 014.327-5.56c.476-.515.09-1.419-.612-1.431zm9.362.007c-.698.066-1.689-.16-2.033.635-.282.733.535 1.358 1.217 1.125 1.806-.147 3.63.203 5.293.907.902.255 1.472-1.112.656-1.573-1.6-.735-3.374-1.089-5.133-1.094zm-5.479 1.365c-.835.15-1.517.76-2.21 1.226-1.203.94-2.318 2.061-3.057 3.402-.33.904 1.063 1.552 1.547.723 1.045-1.656 2.596-2.925 4.285-3.873.545-.499.171-1.463-.565-1.478zm13.903 2.115c-.875-.07-1.22 1.173-.501 1.627 1.325 1.34 2.188 3.062 2.748 4.84.468.84 1.869.21 1.557-.699-.604-2.118-1.751-4.097-3.351-5.615a.93.93 0 00-.453-.153zM4.467 13.132c-.822-.07-.996.826-1.046 1.455-.256 1.93-.094 3.933.562 5.769.406.844 1.807.365 1.612-.551a11.498 11.498 0 01-.334-5.808.874.874 0 00-.794-.865zm26.687 1.6c-.746-.037-1.014.785-.879 1.395.043 2.393-.57 4.771-1.66 6.894-.31.884 1.02 1.536 1.53.75a15.632 15.632 0 001.821-8.372.876.876 0 00-.812-.667zm-30.197.571c-.782-.073-1.044.775-.933 1.404.068 2.414.661 4.833 1.809 6.962.534.77 1.842.076 1.505-.798a14.833 14.833 0 01-1.603-6.861.876.876 0 00-.778-.707zm26.787 2.024c-.777-.048-.952.797-1.021 1.392-.354 1.692-1.202 3.231-2.216 4.608-.407.872.925 1.638 1.48.852 1.361-1.733 2.296-3.827 2.582-6.017a.874.874 0 00-.825-.835zM6.857 23.012c-.808.018-1.082 1.122-.47 1.59 1.393 1.607 3.187 2.886 5.194 3.599.91.222 1.43-1.165.598-1.596a11.495 11.495 0 01-4.723-3.396.899.899 0 00-.599-.197zm15.057 2.7c-.81.194-1.504.76-2.325.972-1.203.458-2.5.536-3.758.664-.869.307-.573 1.728.346 1.663 2.201-.034 4.412-.626 6.293-1.778.604-.495.227-1.532-.556-1.521zM6.346 27.118c-.833.008-1.11 1.218-.395 1.617 1.986 1.602 4.358 2.749 6.868 3.226.933.076 1.227-1.376.338-1.67a14.838 14.838 0 01-6.345-3.066.929.929 0 00-.466-.107zm19.208.087c-.766.09-1.241.841-1.922 1.158-1.516.991-3.251 1.58-4.996 2.005-.872.405-.346 1.849.584 1.604 2.543-.526 4.98-1.66 6.963-3.344.47-.52.072-1.42-.63-1.423z"}));function pH(){return pH=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",pH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M8.742 10.464v11.072h14.516V10.464H8.742zm3.224 1.73h8.066a69569 69569 0 00-4.034 3.22l-4.032-3.22zm9.565 1.018v6.594H10.469v-6.593L16 17.63l5.532-4.419zM16 0h-.005l-.188.001h-.011l-.188.004h-.011l-.187.006h-.011l-.187.008h-.005L15.2.02l-.187.01h-.005l-.005.001-.187.013h-.011L14.62.06h-.01l-.186.018h-.011l-.185.02-.005.001h-.006l-.185.022-.005.001h-.005l-.185.025h-.005l-.005.001-.185.027h-.005l-.005.001-.184.029h-.005l-.005.001-.183.031-.006.001-.005.001-.182.033-.006.001-.005.001-.182.035-.005.001-.005.001-.182.038h-.005l-.005.002-.181.04h-.005l-.005.002-.18.042-.006.001-.005.001-.18.044-.005.002h-.005l-.17.045-.152.054-.139.082-.121.106-.1.127-.074.143-.046.155-.017.16.013.16.043.156.07.145.097.13.119.108.137.085.15.058.159.03.16-.001.133-.023.165-.043.168-.041.171-.04.171-.037.172-.036.17-.033.173-.03.17-.03.177-.027.171-.025.175-.022.175-.02.175-.02.176-.016.175-.014.177-.012.176-.01.177-.007.174-.006.177-.003L16 1.73h.177l.178.004.174.006.177.007.176.01.177.012.175.014.176.017.175.018.175.02.175.023.171.025.176.027.17.03.174.03.17.033.171.036.154.033.16.02.161-.01.156-.04.146-.069.131-.094.111-.117.087-.135.061-.15.032-.158.002-.16-.027-.16-.057-.15L20 .714l-.108-.12-.128-.097-.145-.073-.128-.038-.158-.035-.005-.001-.005-.001L19.14.31h-.005l-.005-.002-.182-.035h-.006l-.005-.002-.182-.033h-.006l-.005-.002-.183-.03-.005-.001-.006-.001-.183-.029h-.005l-.006-.001-.184-.027h-.005l-.005-.001-.185-.024h-.005L17.968.12 17.783.1l-.006-.001h-.005l-.185-.02h-.006l-.005-.001L17.39.06h-.005L17.38.06l-.187-.015h-.005l-.005-.001-.187-.013h-.011L16.8.02h-.011L16.6.01h-.011l-.187-.006h-.011L16.204 0h-.011L16.005 0H16zm9.015 2.935l-.16.004-.158.033-.15.062-.134.09-.116.111-.093.132-.067.147-.038.156-.01.161.022.16.05.153.078.141.103.124.102.087.045.034.142.106.137.105.14.11.136.11.135.112.134.115.134.117.13.115.132.122.128.12.127.122.126.125.124.126.124.128.121.13.118.128.118.132.117.133.113.134.113.136.11.136.109.137.109.142.104.14.103.14.101.142.1.144.099.146.095.145.094.147.093.15.092.15.087.149.087.15.084.152.084.155.08.152.08.155.04.081.084.138.11.119.128.096.145.072.155.043.16.013.16-.016.155-.046.144-.074.127-.099.106-.12.083-.14.055-.151.026-.16-.004-.16-.034-.158-.05-.124-.042-.085-.002-.004-.003-.005-.084-.165-.002-.004-.003-.005-.086-.164-.002-.004-.003-.005-.088-.162-.002-.005-.003-.005-.09-.161-.002-.005-.003-.004-.092-.16-.003-.005-.002-.005-.094-.16-.003-.004-.003-.004-.096-.159-.002-.004-.003-.005-.098-.157-.003-.004-.003-.005-.1-.156-.003-.004-.003-.005-.101-.154-.003-.005-.003-.004-.104-.154-.003-.004-.003-.005-.106-.152-.003-.005-.003-.004-.108-.151-.003-.004-.003-.005-.11-.15-.003-.004-.003-.004-.111-.15-.004-.003-.003-.005-.113-.147-.004-.004-.003-.005-.115-.146-.004-.004-.003-.004-.117-.145-.004-.004-.003-.004-.12-.144-.003-.004-.003-.004-.121-.142-.004-.004-.003-.004-.123-.141-.003-.004-.004-.004-.125-.14-.003-.004-.004-.004-.127-.138-.003-.004-.004-.004-.128-.136-.004-.004-.004-.004-.13-.135-.004-.004-.004-.004-.132-.134-.003-.004-.004-.003-.134-.133-.004-.003-.004-.004-.135-.13-.004-.004-.004-.004-.136-.128-.004-.004-.004-.004-.138-.126-.004-.004-.004-.003-.14-.125-.004-.004-.004-.003-.14-.123-.005-.004-.004-.003-.142-.121-.004-.004-.004-.003-.144-.12-.004-.003-.004-.003-.145-.117-.004-.004-.004-.003-.147-.115-.004-.004-.004-.003-.148-.113-.004-.003-.004-.004-.149-.111-.004-.003-.004-.004-.05-.036-.14-.083-.15-.055-.16-.027zM6.634 3.28l-.161.008-.157.037-.147.066-.111.074-.04.032-.005.003-.004.004-.145.117-.004.003-.004.004-.144.119-.004.003-.004.004-.142.12-.004.004-.004.004-.141.123-.004.003-.004.004-.14.125-.004.003-.004.004-.138.126-.004.004-.004.004-.136.128-.004.004-.004.004-.135.13-.004.004-.004.003-.134.133-.004.003-.004.004-.132.134-.003.004-.004.004-.13.135-.004.004-.004.004-.128.136-.004.004-.004.004-.126.138-.004.004-.003.004-.125.14-.004.004-.003.004-.123.14-.004.005-.003.004-.121.142-.004.004-.003.004-.12.144-.003.004-.003.004-.117.145-.004.004-.003.004-.115.146-.004.005-.003.004-.113.147-.003.005-.004.004-.111.149-.003.004-.004.004-.11.15-.002.005-.003.004-.108.151-.003.004-.003.005-.106.152-.003.005-.003.004-.104.154-.003.004-.003.005-.102.154-.003.005-.002.004-.1.156-.003.005-.003.004-.098.157-.003.005-.003.004-.096.159-.002.004-.003.005-.094.16-.003.004-.002.004-.092.16-.003.005-.003.005-.09.161-.002.005-.003.005-.088.162-.002.005-.003.004-.086.164-.002.005-.002.004-.084.165-.003.005-.002.004-.082.166-.002.004-.003.005-.08.167-.002.004-.002.005-.078.168-.002.004-.002.005-.045.1-.053.153-.023.16.007.16.037.157.065.148.092.132.114.114.134.09.148.064.157.035.161.006.16-.025.152-.054.14-.08.121-.106.1-.126.065-.118.043-.095.074-.16.075-.155.077-.157.08-.155.08-.152.083-.155.085-.152.086-.15.088-.149.091-.15.094-.15.094-.147.095-.145.099-.146.1-.144.1-.142.104-.14.104-.14.11-.142.107-.137.11-.136.114-.136.113-.134.117-.133.118-.132.117-.129.122-.13.124-.127.123-.126.127-.125.127-.122.128-.12.132-.122.13-.115.133-.117.135-.115.135-.111.136-.11.037-.03.117-.11.094-.132.068-.146.04-.156.01-.161-.02-.16-.05-.154-.076-.141-.102-.125-.123-.104-.14-.08-.153-.051-.16-.023zM16 3.286h-.005l-.148.001h-.01l-.147.003h-.011l-.147.005h-.011l-.146.007h-.011l-.146.009h-.011l-.146.01h-.005l-.005.001-.146.012h-.011l-.145.014h-.006l-.005.001-.05.006-.158.031-.15.06-.135.088-.117.111-.094.13-.069.147-.04.156-.01.16.019.16.049.154.076.142.102.125.123.105.14.08.152.051.16.023.134-.003.045-.005.135-.013.133-.01.136-.01.135-.007.137-.006.136-.004.136-.003h.274l.136.003.136.004.136.006.136.007.136.01.133.01.135.013.135.014.135.016.134.018.132.018.134.021.133.023.133.024.133.025.13.027.132.03.132.03.129.031.13.034.129.035.129.036.13.04.126.038.128.042.126.042.128.045.127.047.126.047.12.048.127.051.123.052.006.002.147.048.16.021.16-.009.157-.038.147-.067.131-.093.112-.116.089-.135.062-.149.033-.158.004-.16-.027-.16-.055-.151-.083-.139-.107-.12-.127-.099-.118-.063-.004-.001-.005-.003-.005-.002-.133-.056-.005-.002-.005-.002-.134-.054-.004-.002-.005-.002-.135-.053-.005-.002-.005-.002-.135-.051-.005-.002-.005-.002-.135-.05-.005-.001-.005-.002-.137-.048-.005-.001-.005-.002-.137-.046-.005-.002-.005-.002-.137-.044-.005-.002-.005-.001-.138-.043-.006-.002-.005-.001-.138-.042-.005-.001-.005-.002-.14-.04H19.4l-.005-.002-.14-.038-.005-.001-.005-.002-.14-.036-.005-.001-.005-.001-.141-.035-.005-.001-.005-.001-.142-.033-.005-.001-.005-.001-.142-.031-.005-.002h-.005l-.142-.03-.005-.001-.005-.001-.143-.028h-.005l-.005-.002-.143-.025-.006-.001-.005-.001-.143-.024-.005-.001-.006-.001-.143-.022-.006-.001h-.005l-.144-.022h-.005l-.006-.001-.144-.019h-.005l-.006-.001-.144-.017h-.006l-.005-.001-.145-.016h-.011l-.145-.014H17.1l-.005-.001-.146-.012h-.01l-.146-.01-.006-.001h-.005l-.146-.009h-.011l-.147-.006h-.01l-.147-.005h-.011l-.147-.003h-.011l-.147-.001H16zm-5.482 1.366l-.16.008-.157.037-.123.053-.06.032-.005.002-.004.003-.128.069-.004.002-.005.003-.126.07-.005.003-.004.002-.126.072-.005.003-.004.003-.125.073-.004.003-.005.003-.124.075-.004.003-.005.002-.123.077-.004.003-.005.003-.122.078-.004.003-.005.003-.121.08-.004.002-.005.003-.12.082-.005.003-.004.003-.12.083-.004.003-.004.003-.118.084-.005.003-.004.003-.118.086-.004.003-.004.003-.117.088-.004.003-.004.003-.116.089-.004.003-.004.004-.114.09-.005.003-.004.003-.113.092-.004.004-.004.003-.113.093-.004.004-.004.003-.111.095-.005.003-.004.004-.11.096-.004.004-.004.003-.11.098-.003.003-.004.004-.108.1-.004.003-.004.003-.107.101-.004.004-.004.003-.106.102-.004.004-.003.004-.105.103-.004.004-.004.004-.103.105-.004.004-.004.003-.102.106-.003.004-.004.004-.1.107-.004.004-.004.004-.099.108-.004.004-.003.004-.098.11-.003.003-.004.004-.096.11-.004.005-.003.004-.095.111-.003.004-.004.004-.093.113-.003.004-.004.004-.092.113-.003.004-.003.005-.09.114-.004.004-.003.004-.089.116-.003.004-.003.004-.088.117-.003.004-.003.004-.086.118-.003.004-.003.005-.084.118-.003.004-.003.005-.083.12-.003.003-.003.005-.082.12-.003.005-.002.004-.068.103-.076.142-.048.154-.018.16.011.161.041.156.07.146.095.13.117.11.136.086.15.06.158.03.162.002.158-.03.15-.057.138-.085.119-.109.082-.105.065-.099.075-.11.077-.113.077-.107.08-.11.08-.108.084-.108.083-.105.086-.106.086-.104.088-.104.089-.101.09-.102.093-.101.093-.099.094-.097.095-.096.098-.097.098-.095.099-.093.1-.092.103-.091.101-.089.104-.088.104-.086.106-.086.106-.083.106-.082.109-.082.108-.079.11-.078.11-.076.112-.076.112-.074.113-.072.113-.071.115-.07.115-.068.118-.067.117-.065.12-.065.054-.029.135-.088.116-.111.094-.132.068-.146.04-.156.009-.161-.02-.16-.05-.153-.078-.142-.102-.125-.123-.103-.141-.079-.153-.051-.16-.022zm13.91 2.116l-.162.008-.157.037-.147.066-.132.092-.113.116-.09.134-.063.148-.034.157-.005.162.025.159.055.152.082.138.086.103.09.09.094.098.092.099.093.1.091.103.089.101.088.104.086.104.086.106.083.105.083.108.08.108.081.11.077.107.077.112.075.111.075.114.072.113.071.113.07.114.068.118.067.115.065.118.064.117.062.117.061.121.059.119.059.122.056.121.054.12.055.125.051.123.051.125.048.123.048.127.047.126.044.125.043.128.042.129.039.126.038.13.022.076.058.15.085.137.11.119.129.096.145.07.155.043.16.013.161-.017.154-.046.144-.075.126-.1.106-.12.082-.14.055-.151.025-.16-.005-.16-.026-.132-.023-.082-.002-.005-.001-.005-.042-.139-.001-.005-.002-.005-.043-.138-.001-.005-.002-.005-.044-.137-.002-.005-.002-.005-.046-.137-.002-.005-.001-.005-.048-.137-.002-.005-.002-.005-.05-.135-.001-.005-.002-.005-.051-.135-.002-.005-.002-.005-.053-.135-.002-.005-.002-.005-.054-.133-.002-.005-.002-.005-.057-.133-.002-.005-.002-.005-.057-.132-.003-.005-.002-.005-.06-.132-.001-.005-.002-.004-.061-.132-.003-.004-.002-.005-.063-.13-.002-.005-.002-.005-.064-.13-.003-.004-.002-.005-.066-.129-.002-.004-.003-.005-.067-.128-.002-.005-.003-.004-.069-.128-.002-.004-.003-.005-.07-.126-.003-.005-.003-.004-.072-.126-.002-.005-.003-.004-.074-.125-.002-.004-.003-.005-.075-.124-.003-.004-.003-.005-.076-.123-.003-.004-.003-.005-.078-.122-.003-.004-.003-.005-.08-.121-.003-.004-.003-.005-.081-.12-.003-.005-.003-.004-.083-.12-.003-.004-.003-.004-.084-.118-.003-.005-.003-.004-.086-.118-.003-.004-.004-.004-.087-.117-.003-.004-.003-.004-.09-.116-.002-.004-.004-.004-.09-.114-.003-.005-.004-.004-.091-.113-.004-.004-.003-.004-.094-.113-.003-.004-.003-.004-.095-.111-.004-.004-.003-.004-.096-.11-.004-.005-.003-.004-.098-.11-.004-.003-.003-.004-.1-.108-.003-.004-.004-.004-.1-.107-.004-.004-.004-.004-.102-.106-.003-.003-.004-.004-.093-.095-.124-.103-.14-.08-.153-.05-.16-.023zM4.45 12.826l-.161.002-.158.032-.15.06-.135.088-.118.11-.094.131-.069.146-.035.129-.026.132v.005l-.002.005-.025.143-.001.005-.001.006-.024.143-.001.005-.001.006-.022.143-.001.006-.001.005-.02.144-.001.005-.001.005-.019.145v.005l-.001.006-.017.144v.006l-.001.005-.016.145v.011l-.014.145v.005l-.001.006-.012.146v.01l-.01.146-.001.006v.005l-.009.146v.011l-.007.146v.011l-.004.147v.011l-.003.147v.01l-.002.148v.01l.001.148v.01l.003.147v.011l.005.147v.01l.007.147v.011l.009.146v.011l.01.146v.01l.013.146v.011l.014.145v.005l.001.006.016.145v.011l.018.144v.006l.001.005.019.144v.006l.001.005.021.144v.005l.002.006.022.143v.006l.002.005.024.143v.005l.002.006.025.143.001.005.001.005.028.143.001.005.001.005.03.142v.005l.002.006.03.141.002.005.001.005.033.142v.005l.002.005.035.14v.006l.002.005.036.14.002.005.001.005.038.14.001.005.002.005.04.14v.005l.002.005.042.138.001.006.002.005.042.138.002.005.002.005.017.054.064.148.09.134.114.114.132.092.148.065.157.037.16.007.16-.023.153-.052.14-.08.123-.104.102-.125.076-.142.049-.153.02-.16-.011-.161-.031-.13-.017-.051-.039-.126-.038-.13-.037-.128-.035-.13-.033-.128-.033-.134-.03-.13-.029-.131-.026-.13-.026-.133-.024-.133-.023-.133-.02-.132-.02-.136-.017-.132-.016-.135-.014-.135-.012-.133-.012-.138-.009-.133-.007-.136-.006-.138-.004-.134-.003-.136v-.274l.003-.136.004-.134.006-.139.007-.136.01-.133.01-.138.013-.132.014-.135.016-.135.017-.132.02-.137.02-.13.023-.134.024-.133.024-.126.016-.16-.014-.161-.044-.155-.072-.145-.098-.128-.12-.108-.137-.084-.15-.057-.16-.029zm26.698 1.601l-.161.01-.157.04-.146.067-.131.093-.112.117-.088.135-.061.149-.033.157-.005.134.006.14.006.176.003.177.001.178-.001.177-.003.178-.006.177-.007.176-.01.177-.012.176-.015.176-.016.173-.018.175-.02.175-.024.174-.025.175-.026.17-.03.174-.03.173-.033.17-.036.172-.037.17-.04.17-.042.172-.043.168-.045.166-.048.169-.05.167-.052.168-.053.164-.056.166-.058.166-.06.16-.062.165-.062.158-.066.165-.068.16-.07.16-.07.158-.075.159-.074.155-.079.158-.08.158-.06.15-.03.158-.001.161.029.159.058.15.085.137.108.119.13.097.144.07.156.044.16.013.16-.017.155-.046.143-.074.127-.1.107-.12.07-.115.083-.164.003-.005.002-.004.082-.166.002-.005.003-.004.08-.167.002-.005.002-.004.078-.168.002-.005.002-.004.076-.169.002-.004.002-.005.074-.17.002-.004.002-.005.072-.17.002-.005.002-.005.07-.171.001-.005.002-.005.068-.172.002-.004.002-.005.065-.173.002-.005.002-.005.063-.173.002-.005.002-.005.06-.174.003-.005.001-.005.06-.175.001-.005.002-.005.057-.176.001-.005.002-.005.055-.177.001-.005.002-.005.052-.177.002-.005.001-.005.051-.178.001-.005.002-.005.048-.179.002-.005v-.005l.047-.179.001-.005.002-.005.044-.18v-.005l.002-.005.042-.18.001-.006.001-.005.04-.181.001-.005.001-.005.037-.182.002-.005v-.005l.036-.182v-.006l.002-.005.033-.182v-.006l.002-.005.03-.183.001-.005.001-.005.029-.184v-.005l.001-.006.027-.184v-.005l.001-.005.024-.185v-.005l.001-.005.022-.185v-.006l.001-.005.02-.185v-.006l.001-.005.017-.186v-.005l.001-.005.015-.187v-.005l.001-.005.013-.187v-.01l.01-.187.001-.006v-.005l.009-.187v-.011l.006-.187v-.011l.004-.188v-.011l.001-.188v-.01l-.001-.188v-.011l-.004-.188v-.011l-.006-.187v-.011l-.007-.145-.022-.16-.05-.152-.08-.141-.103-.124-.125-.102-.141-.077-.153-.05-.16-.02zM.938 15L.777 15l-.158.032-.15.06-.136.087-.117.11-.095.131-.068.146-.04.156-.012.133-.001.14v.01l.001.188v.011l.004.188v.011l.006.187v.011l.008.187v.011l.011.187v.005l.001.005.013.187v.01l.016.187v.01l.018.186v.011l.02.185.001.005v.006l.022.185.001.005v.005l.025.185v.005l.001.005.027.184v.006l.001.005.029.184v.005l.001.005.031.183.001.005.001.006.033.182.001.005.001.006.035.182.001.005.001.005.038.182v.005l.002.005.04.181v.005l.002.005.042.18.001.006.001.005.044.18.002.005v.005l.047.18.001.004.002.005.048.179.002.005.001.005.05.178.002.005.001.005.053.177.002.005.001.005.055.177.002.005.001.005.057.176.002.005.001.005.06.175.001.005.002.005.061.174.002.005.002.005.063.173.002.005.002.005.065.173.002.005.002.004.067.172.002.005.002.005.07.171.002.005.002.005.072.17.002.005.002.004.074.17.002.005.002.004.076.169.002.004.002.005.078.168.002.004.002.005.08.167.003.004.002.005.082.166.002.004.003.005.02.04.086.136.11.118.13.095.146.07.156.041.16.012.16-.019.155-.048.142-.075.126-.1.105-.123.08-.14.054-.152.024-.16-.006-.16-.036-.158-.051-.123-.018-.034-.078-.158L3.1 22.1l-.074-.16-.071-.157-.07-.16-.068-.16-.067-.165-.062-.158-.062-.164-.059-.161-.058-.166-.056-.166-.053-.164-.052-.168-.05-.167-.048-.17-.045-.165-.043-.168-.043-.172-.039-.17-.037-.17-.036-.172-.033-.17-.03-.173-.03-.174-.027-.17-.025-.175-.022-.174-.021-.175-.018-.175-.017-.173-.014-.176-.012-.176-.01-.177-.007-.176-.006-.177-.003-.178L1.73 16v-.134l-.013-.16-.044-.156-.072-.144-.097-.129-.12-.108-.137-.085-.15-.057L.938 15zm26.798 2.024l-.16.007-.157.038-.148.066-.132.092-.113.115-.09.134-.062.148-.03.127-.001.004-.023.134-.024.133-.026.133-.026.13-.03.132-.03.129-.032.134-.033.128-.035.13-.037.128-.038.13-.04.126-.04.128-.044.128-.044.126-.046.126-.048.126-.05.125-.05.125-.051.122-.054.123-.055.122-.056.12-.058.122-.06.12-.061.12-.063.119-.062.116-.067.119-.066.116-.069.115-.069.115-.07.113-.073.113-.074.112-.076.113-.077.112-.077.107-.08.11-.08.107-.085.11-.044.056-.088.135-.06.15-.033.158-.002.16.027.16.057.15.083.138.108.12.128.098.144.072.155.045.16.015.161-.016.155-.044.144-.073.128-.098.09-.099.05-.061.003-.004.003-.005.089-.115.003-.004.003-.005.088-.116.003-.004.003-.005.086-.117.003-.004.003-.005.084-.118.003-.004.003-.005.083-.12.003-.004.003-.004.081-.12.003-.005.003-.004.08-.121.003-.005.003-.004.078-.122.003-.005.003-.004.077-.123.002-.005.003-.004.075-.124.003-.005.003-.004.073-.125.003-.005.003-.004.072-.126.002-.004.003-.005.07-.126.003-.005.002-.005.07-.127.002-.004.002-.005.068-.128.002-.005.002-.004.066-.13.003-.004.002-.005.064-.13.002-.004.003-.005.062-.13.002-.005.003-.005.06-.13.003-.005.002-.005.06-.132.002-.005.002-.005.057-.132.003-.005.002-.005.056-.133.002-.005.002-.005.054-.134.002-.004.002-.005.053-.135.002-.005.002-.005.051-.135.002-.005.002-.005.05-.135.001-.005.002-.005.048-.137.001-.005.002-.005.046-.137.002-.005.002-.005.044-.137.002-.005.002-.005.042-.138.002-.005.001-.006.042-.138.001-.005.002-.005.04-.14V19.4l.002-.005.038-.14.001-.005.002-.005.036-.14.001-.005.001-.005.035-.141.001-.005.001-.005.033-.142.001-.005.001-.005.031-.141.001-.006.002-.005.029-.142v-.005l.002-.005.028-.143v-.005l.002-.005.025-.143.001-.006.001-.005.024-.143.001-.005.001-.006.001-.006.01-.161-.02-.16-.05-.154-.077-.141-.102-.125-.123-.104-.141-.079-.153-.051-.16-.022zM6.841 22.71l-.16.024-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.018.16.011.161.041.156.07.146.077.109.04.048.003.004.003.004.095.111.003.004.004.004.096.11.004.005.003.004.098.109.003.004.004.004.1.108.003.004.003.004.101.107.004.004.003.004.102.105.004.004.004.004.103.105.004.004.004.003.105.104.003.004.004.003.106.102.004.004.004.004.107.1.004.004.004.004.108.099.004.003.004.004.11.098.003.003.004.004.11.096.004.003.005.004.11.095.005.003.004.004.113.093.004.003.004.004.113.091.004.004.005.003.114.09.004.004.004.003.116.089.004.003.004.003.117.088.004.003.004.003.118.086.004.003.005.003.118.084.004.003.005.003.119.083.004.003.005.003.12.081.005.003.004.003.121.08.005.003.004.003.122.078.005.003.004.003.123.076.005.003.004.003.124.075.005.003.004.003.125.073.004.003.005.002.126.073.004.002.005.003.126.07.005.003.004.002.128.07.004.002.005.002.128.067.005.003.004.002.13.066.004.002.005.003.13.064.004.002.005.003.13.062.005.002.004.003.132.06.004.003.005.002.132.06.005.002.005.002.132.057.005.002.005.002.133.057.005.002.005.002.133.054.005.002.005.002.13.05.154.045.16.016.16-.015.156-.045.144-.072.128-.098.108-.12.083-.138.057-.15.028-.16-.003-.16-.032-.159-.061-.149-.088-.135-.11-.117-.132-.094-.12-.058-.124-.049-.126-.051-.122-.051-.122-.054-.12-.054-.126-.058-.119-.057-.12-.06-.12-.06-.118-.063-.117-.064-.119-.066-.116-.066-.115-.068-.115-.07-.113-.07-.115-.074-.112-.074-.11-.075-.11-.076-.112-.08-.11-.08-.109-.081-.106-.082-.104-.082-.106-.086-.105-.087-.101-.086-.105-.091-.1-.09-.1-.091-.1-.094-.097-.094-.1-.098-.093-.095-.096-.1-.093-.098-.092-.101-.089-.1-.09-.102-.088-.104-.036-.043-.114-.114-.133-.091-.148-.065-.157-.036-.161-.006zm15.063 2.701l-.16.014-.156.044-.12.057-.06.034-.12.066-.117.064-.118.062-.12.061-.12.06-.118.057-.126.058-.12.054-.122.054-.122.05-.126.052-.125.05-.124.046-.127.047-.125.044-.129.043-.126.04-.13.042-.128.038-.127.035-.13.036-.131.034-.129.031-.132.03-.13.03-.135.027-.133.026-.13.023-.13.022-.137.021-.132.02-.134.017-.132.015-.138.015-.135.013-.133.01-.138.01-.136.007-.134.006-.136.004-.14.003-.16.018-.155.047-.142.076-.127.1-.105.122-.08.14-.054.151-.025.16.006.16.035.158.064.148.09.134.114.114.133.092.147.065.157.036.134.008.145-.002h.011l.147-.005h.01l.147-.007h.011l.146-.009h.011l.146-.01h.005l.005-.001.146-.012h.011l.145-.014h.005l.006-.001.145-.016h.011l.144-.018h.006l.005-.001.144-.02h.011l.144-.021.005-.001h.006l.143-.023.006-.001h.005l.143-.025h.005l.006-.002.143-.026h.005l.005-.002.143-.027.005-.001.005-.001.142-.03h.005l.005-.002.142-.03.005-.002.005-.001.142-.033.005-.001.005-.001.14-.035.006-.001.005-.001.14-.037h.005l.005-.002.14-.038.005-.002h.005l.14-.04.005-.002.005-.001.138-.042.005-.001.006-.002.138-.043.005-.001.005-.002.137-.044.005-.002.005-.002.137-.046.005-.002.005-.001.137-.048.005-.002.005-.002.135-.05.005-.001.005-.002.135-.051.005-.002.005-.002.135-.053.005-.002.004-.002.134-.054.005-.002.005-.002.133-.057.005-.002.005-.002.132-.057.005-.003.005-.002.132-.06.005-.001.004-.002.131-.061.005-.003.005-.002.13-.062.005-.003.005-.002.13-.064.004-.003.005-.002.128-.066.005-.002.005-.003.128-.067.005-.002.004-.003.127-.069.005-.002.005-.003.126-.07.005-.003.004-.003.065-.037.132-.093.112-.115.089-.135.062-.149.034-.157.003-.161-.026-.16-.055-.15-.082-.14-.107-.12-.127-.1-.144-.073-.154-.046-.16-.016zM6.33 26.818l-.16.023-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.02.16.012.161.041.156.07.146.094.13.096.093.032.026.004.003.004.004.145.117.004.003.004.004.146.115.005.003.004.004.147.113.005.003.004.004.149.111.004.003.004.003.15.11.005.003.004.003.151.108.004.003.005.003.152.106.005.003.004.003.154.104.004.003.005.003.154.102.005.002.004.003.156.1.005.003.004.003.157.098.005.003.004.002.159.096.004.003.005.003.16.094.004.003.004.002.16.092.005.003.005.002.161.09.005.003.005.002.162.088.005.003.004.002.164.086.005.003.004.002.165.084.005.003.004.002.166.082.004.002.005.003.167.08.004.002.005.002.168.078.004.002.005.002.168.076.005.002.005.002.17.074.004.002.005.002.17.072.005.002.005.002.17.07.006.002.005.001.171.068.005.002.005.002.173.065.005.002.005.002.173.063.005.002.005.002.174.06.005.003.005.001.175.06.005.001.005.002.176.057.005.001.005.002.176.055.006.001.005.002.177.052.005.002.005.001.178.05.005.002.005.002.178.048.006.001.005.002.179.046.005.001.005.002.18.044h.005l.005.002.18.042.006.001.005.001.159.035.16.02.16-.01.157-.04.146-.069.13-.094.112-.117.087-.136.06-.149.033-.158.002-.161-.028-.159-.057-.15-.084-.138-.108-.12-.128-.098-.144-.072-.128-.039-.154-.033-.168-.04-.171-.041-.17-.044-.168-.046-.167-.047-.168-.05-.165-.051-.166-.054-.166-.056-.163-.057-.165-.06-.161-.062-.164-.064-.16-.065-.16-.068-.162-.07-.157-.07-.157-.074-.157-.075-.156-.077-.153-.079-.156-.082-.153-.082-.154-.086-.15-.086-.152-.09-.148-.09-.147-.092-.149-.095-.145-.095-.144-.098-.145-.1-.143-.102-.14-.103-.14-.104-.14-.108-.139-.11-.136-.11-.027-.022-.133-.091-.148-.065-.157-.036-.161-.006zm19.215.087l-.16.01-.157.039-.146.067-.11.076-.064.051-.139.11-.14.108-.14.104-.14.103-.143.101-.145.101-.144.098-.145.095-.149.095-.148.093-.147.089-.152.09-.15.086-.154.086-.153.082-.156.082-.153.079-.156.077-.157.075-.158.073-.157.071-.16.07-.16.068-.161.065-.164.064-.161.061-.165.06-.163.058-.166.056-.166.054-.166.051-.167.05-.167.047-.17.046-.168.044-.171.042-.168.039-.17.037-.11.023-.154.047-.143.075-.126.1-.106.122-.081.139-.054.152-.025.16.006.16.035.158.063.148.09.133.114.115.132.092.148.065.157.037.16.007.133-.016.115-.024.005-.001.005-.001.181-.04h.005l.005-.002.18-.042.006-.001.005-.001.18-.044.005-.002.005-.001.18-.046.004-.002h.005l.179-.05h.005l.005-.002.178-.05.005-.002.005-.002.177-.052.005-.002.005-.001.177-.055.005-.002.005-.001.176-.057.005-.002.005-.002.175-.059.005-.001.005-.002.174-.061.005-.002.005-.002.173-.063.005-.002.005-.002.173-.065.004-.002.005-.002.172-.068.005-.002.005-.002.171-.07.005-.001.005-.002.17-.072.005-.002.004-.002.17-.074.005-.002.004-.002.169-.076.004-.002.005-.002.168-.078.004-.002.005-.003.167-.08.004-.002.005-.002.166-.082.004-.002.005-.003.165-.084.004-.002.005-.003.163-.086.005-.002.005-.003.162-.088.005-.002.005-.003.161-.09.005-.002.004-.003.16-.092.005-.003.005-.002.16-.094.004-.003.004-.003.158-.096.005-.002.004-.003.158-.098.004-.003.005-.003.156-.1.004-.003.004-.003.155-.101.005-.003.004-.003.154-.104.004-.003.004-.003.153-.106.004-.003.005-.003.151-.108.004-.003.005-.003.15-.11.004-.003.004-.003.149-.112.004-.003.004-.003.148-.113.004-.004.004-.003.147-.115.004-.004.004-.003.068-.055.116-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.05-.153-.08-.14-.103-.125-.124-.102-.142-.077-.153-.05-.16-.02z"}));function dH(){return dH=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",dH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M23.637 13.902l-7.625-5.535-7.624 5.535 2.912 8.956h9.425l2.912-8.956zm-1.017.33l-2.524 7.762H11.93l-2.524-7.762 6.607-4.796 6.608 4.796zM16.012.311c-1.448.02-2.93.157-4.302.628-.852.447-.255 1.863.66 1.574 2.255-.608 4.648-.607 6.922-.108.934.075 1.228-1.376.338-1.67C18.451.44 17.227.317 16.012.311zm9.012 2.934c-.913-.104-1.272 1.258-.454 1.648 1.834 1.36 3.293 3.185 4.31 5.22.526.776 1.842.098 1.515-.78a15.522 15.522 0 00-5.06-6.006c-.1-.044-.203-.07-.31-.082zM6.65 3.59c-.762.089-1.24.809-1.805 1.267C3.38 6.295 2.163 8.007 1.37 9.905c-.266.898 1.094 1.484 1.564.675a14.825 14.825 0 014.327-5.56c.476-.515.09-1.419-.612-1.431zm9.362.007c-.698.066-1.689-.16-2.033.635-.282.733.535 1.358 1.217 1.125 1.806-.147 3.63.203 5.293.907.902.255 1.472-1.112.656-1.573-1.6-.735-3.374-1.089-5.133-1.094zm-5.479 1.365c-.835.15-1.517.76-2.21 1.226-1.203.94-2.318 2.061-3.057 3.402-.33.904 1.063 1.552 1.547.723 1.045-1.656 2.596-2.925 4.285-3.873.545-.499.171-1.463-.565-1.478zm13.903 2.115c-.875-.07-1.22 1.173-.501 1.627 1.325 1.34 2.188 3.062 2.748 4.84.468.84 1.869.21 1.557-.699-.604-2.118-1.751-4.097-3.351-5.615a.93.93 0 00-.453-.153zM4.467 13.132c-.822-.07-.996.826-1.046 1.455-.256 1.93-.094 3.933.562 5.769.406.844 1.807.365 1.612-.551a11.498 11.498 0 01-.334-5.808.874.874 0 00-.794-.865zm26.687 1.6c-.746-.037-1.014.785-.879 1.395.043 2.393-.57 4.771-1.66 6.894-.31.884 1.02 1.536 1.53.75a15.632 15.632 0 001.821-8.372.876.876 0 00-.812-.667zm-30.197.571c-.782-.073-1.044.775-.933 1.404.068 2.414.661 4.833 1.809 6.962.534.77 1.842.076 1.505-.798a14.833 14.833 0 01-1.603-6.861.876.876 0 00-.778-.707zm26.787 2.024c-.777-.048-.952.797-1.021 1.392-.354 1.692-1.202 3.231-2.216 4.608-.407.872.925 1.638 1.48.852 1.361-1.733 2.296-3.827 2.582-6.017a.874.874 0 00-.825-.835zM6.857 23.012c-.808.018-1.082 1.122-.47 1.59 1.393 1.607 3.187 2.886 5.194 3.599.91.222 1.43-1.165.598-1.596a11.495 11.495 0 01-4.723-3.396.899.899 0 00-.599-.197zm15.057 2.7c-.81.194-1.504.76-2.325.972-1.203.458-2.5.536-3.758.664-.869.307-.573 1.728.346 1.663 2.201-.034 4.412-.626 6.293-1.778.604-.495.227-1.532-.556-1.521zM6.346 27.118c-.833.008-1.11 1.218-.395 1.617 1.986 1.602 4.358 2.749 6.868 3.226.933.076 1.227-1.376.338-1.67a14.838 14.838 0 01-6.345-3.066.929.929 0 00-.466-.107zm19.208.087c-.766.09-1.241.841-1.922 1.158-1.516.991-3.251 1.58-4.996 2.005-.872.405-.346 1.849.584 1.604 2.543-.526 4.98-1.66 6.963-3.344.47-.52.072-1.42-.63-1.423z"}));function fH(){return fH=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",fH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M13.51 9.081v4.428H9.08v4.982h4.428v4.428h4.982V18.49h4.428v-4.982H18.49V9.081h-4.982zm.83.83h3.32v4.428h4.429v3.322H17.66v4.428h-3.32v-4.454H9.91v-3.296h4.428V9.911zM16 0h-.005l-.188.001h-.011l-.188.004h-.011l-.187.006h-.011l-.187.008h-.005L15.2.02l-.187.01h-.005l-.005.001-.187.013h-.011L14.62.06h-.01l-.186.018h-.011l-.185.02-.005.001h-.006l-.185.022-.005.001h-.005l-.185.025h-.005l-.005.001-.185.027h-.005l-.005.001-.184.029h-.005l-.005.001-.183.031-.006.001-.005.001-.182.033-.006.001-.005.001-.182.035-.005.001-.005.001-.182.038h-.005l-.005.002-.181.04h-.005l-.005.002-.18.042-.006.001-.005.001-.18.044-.005.002h-.005l-.17.045-.152.054-.139.082-.121.106-.1.127-.074.143-.046.155-.017.16.013.16.043.156.07.145.097.13.119.108.137.085.15.058.159.03.16-.001.133-.023.165-.043.168-.041.171-.04.171-.037.172-.036.17-.033.173-.03.17-.03.177-.027.171-.025.175-.022.175-.02.175-.02.176-.016.175-.014.177-.012.176-.01.177-.007.174-.006.177-.003L16 1.73h.177l.178.004.174.006.177.007.176.01.177.012.175.014.176.017.175.018.175.02.175.023.171.025.176.027.17.03.174.03.17.033.171.036.154.033.16.02.161-.01.156-.04.146-.069.131-.094.111-.117.087-.135.061-.15.032-.158.002-.16-.027-.16-.057-.15L20 .714l-.108-.12-.128-.097-.145-.073-.128-.038-.158-.035-.005-.001-.005-.001L19.14.31h-.005l-.005-.002-.182-.035h-.006l-.005-.002-.182-.033h-.006l-.005-.002-.183-.03-.005-.001-.006-.001-.183-.029h-.005l-.006-.001-.184-.027h-.005l-.005-.001-.185-.024h-.005L17.968.12 17.783.1l-.006-.001h-.005l-.185-.02h-.006l-.005-.001L17.39.06h-.005L17.38.06l-.187-.015h-.005l-.005-.001-.187-.013h-.011L16.8.02h-.011L16.6.01h-.011l-.187-.006h-.011L16.204 0h-.011L16.005 0H16zm9.015 2.935l-.16.004-.158.033-.15.062-.134.09-.116.111-.093.132-.067.147-.038.156-.01.161.022.16.05.153.078.141.103.124.102.087.045.034.142.106.137.105.14.11.136.11.135.112.134.115.134.117.13.115.132.122.128.12.127.122.126.125.124.126.124.128.121.13.118.128.118.132.117.133.113.134.113.136.11.136.109.137.109.142.104.14.103.14.101.142.1.144.099.146.095.145.094.147.093.15.092.15.087.149.087.15.084.152.084.155.08.152.08.155.04.081.084.138.11.119.128.096.145.072.155.043.16.013.16-.016.155-.046.144-.074.127-.099.106-.12.083-.14.055-.151.026-.16-.004-.16-.034-.158-.05-.124-.042-.085-.002-.004-.003-.005-.084-.165-.002-.004-.003-.005-.086-.164-.002-.004-.003-.005-.088-.162-.002-.005-.003-.005-.09-.161-.002-.005-.003-.004-.092-.16-.003-.005-.002-.005-.094-.16-.003-.004-.003-.004-.096-.159-.002-.004-.003-.005-.098-.157-.003-.004-.003-.005-.1-.156-.003-.004-.003-.005-.101-.154-.003-.005-.003-.004-.104-.154-.003-.004-.003-.005-.106-.152-.003-.005-.003-.004-.108-.151-.003-.004-.003-.005-.11-.15-.003-.004-.003-.004-.111-.15-.004-.003-.003-.005-.113-.147-.004-.004-.003-.005-.115-.146-.004-.004-.003-.004-.117-.145-.004-.004-.003-.004-.12-.144-.003-.004-.003-.004-.121-.142-.004-.004-.003-.004-.123-.141-.003-.004-.004-.004-.125-.14-.003-.004-.004-.004-.127-.138-.003-.004-.004-.004-.128-.136-.004-.004-.004-.004-.13-.135-.004-.004-.004-.004-.132-.134-.003-.004-.004-.003-.134-.133-.004-.003-.004-.004-.135-.13-.004-.004-.004-.004-.136-.128-.004-.004-.004-.004-.138-.126-.004-.004-.004-.003-.14-.125-.004-.004-.004-.003-.14-.123-.005-.004-.004-.003-.142-.121-.004-.004-.004-.003-.144-.12-.004-.003-.004-.003-.145-.117-.004-.004-.004-.003-.147-.115-.004-.004-.004-.003-.148-.113-.004-.003-.004-.004-.149-.111-.004-.003-.004-.004-.05-.036-.14-.083-.15-.055-.16-.027zM6.634 3.28l-.161.008-.157.037-.147.066-.111.074-.04.032-.005.003-.004.004-.145.117-.004.003-.004.004-.144.119-.004.003-.004.004-.142.12-.004.004-.004.004-.141.123-.004.003-.004.004-.14.125-.004.003-.004.004-.138.126-.004.004-.004.004-.136.128-.004.004-.004.004-.135.13-.004.004-.004.003-.134.133-.004.003-.004.004-.132.134-.003.004-.004.004-.13.135-.004.004-.004.004-.128.136-.004.004-.004.004-.126.138-.004.004-.003.004-.125.14-.004.004-.003.004-.123.14-.004.005-.003.004-.121.142-.004.004-.003.004-.12.144-.003.004-.003.004-.117.145-.004.004-.003.004-.115.146-.004.005-.003.004-.113.147-.003.005-.004.004-.111.149-.003.004-.004.004-.11.15-.002.005-.003.004-.108.151-.003.004-.003.005-.106.152-.003.005-.003.004-.104.154-.003.004-.003.005-.102.154-.003.005-.002.004-.1.156-.003.005-.003.004-.098.157-.003.005-.003.004-.096.159-.002.004-.003.005-.094.16-.003.004-.002.004-.092.16-.003.005-.003.005-.09.161-.002.005-.003.005-.088.162-.002.005-.003.004-.086.164-.002.005-.002.004-.084.165-.003.005-.002.004-.082.166-.002.004-.003.005-.08.167-.002.004-.002.005-.078.168-.002.004-.002.005-.045.1-.053.153-.023.16.007.16.037.157.065.148.092.132.114.114.134.09.148.064.157.035.161.006.16-.025.152-.054.14-.08.121-.106.1-.126.065-.118.043-.095.074-.16.075-.155.077-.157.08-.155.08-.152.083-.155.085-.152.086-.15.088-.149.091-.15.094-.15.094-.147.095-.145.099-.146.1-.144.1-.142.104-.14.104-.14.11-.142.107-.137.11-.136.114-.136.113-.134.117-.133.118-.132.117-.129.122-.13.124-.127.123-.126.127-.125.127-.122.128-.12.132-.122.13-.115.133-.117.135-.115.135-.111.136-.11.037-.03.117-.11.094-.132.068-.146.04-.156.01-.161-.02-.16-.05-.154-.076-.141-.102-.125-.123-.104-.14-.08-.153-.051-.16-.023zM16 3.286h-.005l-.148.001h-.01l-.147.003h-.011l-.147.005h-.011l-.146.007h-.011l-.146.009h-.011l-.146.01h-.005l-.005.001-.146.012h-.011l-.145.014h-.006l-.005.001-.05.006-.158.031-.15.06-.135.088-.117.111-.094.13-.069.147-.04.156-.01.16.019.16.049.154.076.142.102.125.123.105.14.08.152.051.16.023.134-.003.045-.005.135-.013.133-.01.136-.01.135-.007.137-.006.136-.004.136-.003h.274l.136.003.136.004.136.006.136.007.136.01.133.01.135.013.135.014.135.016.134.018.132.018.134.021.133.023.133.024.133.025.13.027.132.03.132.03.129.031.13.034.129.035.129.036.13.04.126.038.128.042.126.042.128.045.127.047.126.047.12.048.127.051.123.052.006.002.147.048.16.021.16-.009.157-.038.147-.067.131-.093.112-.116.089-.135.062-.149.033-.158.004-.16-.027-.16-.055-.151-.083-.139-.107-.12-.127-.099-.118-.063-.004-.001-.005-.003-.005-.002-.133-.056-.005-.002-.005-.002-.134-.054-.004-.002-.005-.002-.135-.053-.005-.002-.005-.002-.135-.051-.005-.002-.005-.002-.135-.05-.005-.001-.005-.002-.137-.048-.005-.001-.005-.002-.137-.046-.005-.002-.005-.002-.137-.044-.005-.002-.005-.001-.138-.043-.006-.002-.005-.001-.138-.042-.005-.001-.005-.002-.14-.04H19.4l-.005-.002-.14-.038-.005-.001-.005-.002-.14-.036-.005-.001-.005-.001-.141-.035-.005-.001-.005-.001-.142-.033-.005-.001-.005-.001-.142-.031-.005-.002h-.005l-.142-.03-.005-.001-.005-.001-.143-.028h-.005l-.005-.002-.143-.025-.006-.001-.005-.001-.143-.024-.005-.001-.006-.001-.143-.022-.006-.001h-.005l-.144-.022h-.005l-.006-.001-.144-.019h-.005l-.006-.001-.144-.017h-.006l-.005-.001-.145-.016h-.011l-.145-.014H17.1l-.005-.001-.146-.012h-.01l-.146-.01-.006-.001h-.005l-.146-.009h-.011l-.147-.006h-.01l-.147-.005h-.011l-.147-.003h-.011l-.147-.001H16zm-5.482 1.366l-.16.008-.157.037-.123.053-.06.032-.005.002-.004.003-.128.069-.004.002-.005.003-.126.07-.005.003-.004.002-.126.072-.005.003-.004.003-.125.073-.004.003-.005.003-.124.075-.004.003-.005.002-.123.077-.004.003-.005.003-.122.078-.004.003-.005.003-.121.08-.004.002-.005.003-.12.082-.005.003-.004.003-.12.083-.004.003-.004.003-.118.084-.005.003-.004.003-.118.086-.004.003-.004.003-.117.088-.004.003-.004.003-.116.089-.004.003-.004.004-.114.09-.005.003-.004.003-.113.092-.004.004-.004.003-.113.093-.004.004-.004.003-.111.095-.005.003-.004.004-.11.096-.004.004-.004.003-.11.098-.003.003-.004.004-.108.1-.004.003-.004.003-.107.101-.004.004-.004.003-.106.102-.004.004-.003.004-.105.103-.004.004-.004.004-.103.105-.004.004-.004.003-.102.106-.003.004-.004.004-.1.107-.004.004-.004.004-.099.108-.004.004-.003.004-.098.11-.003.003-.004.004-.096.11-.004.005-.003.004-.095.111-.003.004-.004.004-.093.113-.003.004-.004.004-.092.113-.003.004-.003.005-.09.114-.004.004-.003.004-.089.116-.003.004-.003.004-.088.117-.003.004-.003.004-.086.118-.003.004-.003.005-.084.118-.003.004-.003.005-.083.12-.003.003-.003.005-.082.12-.003.005-.002.004-.068.103-.076.142-.048.154-.018.16.011.161.041.156.07.146.095.13.117.11.136.086.15.06.158.03.162.002.158-.03.15-.057.138-.085.119-.109.082-.105.065-.099.075-.11.077-.113.077-.107.08-.11.08-.108.084-.108.083-.105.086-.106.086-.104.088-.104.089-.101.09-.102.093-.101.093-.099.094-.097.095-.096.098-.097.098-.095.099-.093.1-.092.103-.091.101-.089.104-.088.104-.086.106-.086.106-.083.106-.082.109-.082.108-.079.11-.078.11-.076.112-.076.112-.074.113-.072.113-.071.115-.07.115-.068.118-.067.117-.065.12-.065.054-.029.135-.088.116-.111.094-.132.068-.146.04-.156.009-.161-.02-.16-.05-.153-.078-.142-.102-.125-.123-.103-.141-.079-.153-.051-.16-.022zm13.91 2.116l-.162.008-.157.037-.147.066-.132.092-.113.116-.09.134-.063.148-.034.157-.005.162.025.159.055.152.082.138.086.103.09.09.094.098.092.099.093.1.091.103.089.101.088.104.086.104.086.106.083.105.083.108.08.108.081.11.077.107.077.112.075.111.075.114.072.113.071.113.07.114.068.118.067.115.065.118.064.117.062.117.061.121.059.119.059.122.056.121.054.12.055.125.051.123.051.125.048.123.048.127.047.126.044.125.043.128.042.129.039.126.038.13.022.076.058.15.085.137.11.119.129.096.145.07.155.043.16.013.161-.017.154-.046.144-.075.126-.1.106-.12.082-.14.055-.151.025-.16-.005-.16-.026-.132-.023-.082-.002-.005-.001-.005-.042-.139-.001-.005-.002-.005-.043-.138-.001-.005-.002-.005-.044-.137-.002-.005-.002-.005-.046-.137-.002-.005-.001-.005-.048-.137-.002-.005-.002-.005-.05-.135-.001-.005-.002-.005-.051-.135-.002-.005-.002-.005-.053-.135-.002-.005-.002-.005-.054-.133-.002-.005-.002-.005-.057-.133-.002-.005-.002-.005-.057-.132-.003-.005-.002-.005-.06-.132-.001-.005-.002-.004-.061-.132-.003-.004-.002-.005-.063-.13-.002-.005-.002-.005-.064-.13-.003-.004-.002-.005-.066-.129-.002-.004-.003-.005-.067-.128-.002-.005-.003-.004-.069-.128-.002-.004-.003-.005-.07-.126-.003-.005-.003-.004-.072-.126-.002-.005-.003-.004-.074-.125-.002-.004-.003-.005-.075-.124-.003-.004-.003-.005-.076-.123-.003-.004-.003-.005-.078-.122-.003-.004-.003-.005-.08-.121-.003-.004-.003-.005-.081-.12-.003-.005-.003-.004-.083-.12-.003-.004-.003-.004-.084-.118-.003-.005-.003-.004-.086-.118-.003-.004-.004-.004-.087-.117-.003-.004-.003-.004-.09-.116-.002-.004-.004-.004-.09-.114-.003-.005-.004-.004-.091-.113-.004-.004-.003-.004-.094-.113-.003-.004-.003-.004-.095-.111-.004-.004-.003-.004-.096-.11-.004-.005-.003-.004-.098-.11-.004-.003-.003-.004-.1-.108-.003-.004-.004-.004-.1-.107-.004-.004-.004-.004-.102-.106-.003-.003-.004-.004-.093-.095-.124-.103-.14-.08-.153-.05-.16-.023zM4.45 12.826l-.161.002-.158.032-.15.06-.135.088-.118.11-.094.131-.069.146-.035.129-.026.132v.005l-.002.005-.025.143-.001.005-.001.006-.024.143-.001.005-.001.006-.022.143-.001.006-.001.005-.02.144-.001.005-.001.005-.019.145v.005l-.001.006-.017.144v.006l-.001.005-.016.145v.011l-.014.145v.005l-.001.006-.012.146v.01l-.01.146-.001.006v.005l-.009.146v.011l-.007.146v.011l-.004.147v.011l-.003.147v.01l-.002.148v.01l.001.148v.01l.003.147v.011l.005.147v.01l.007.147v.011l.009.146v.011l.01.146v.01l.013.146v.011l.014.145v.005l.001.006.016.145v.011l.018.144v.006l.001.005.019.144v.006l.001.005.021.144v.005l.002.006.022.143v.006l.002.005.024.143v.005l.002.006.025.143.001.005.001.005.028.143.001.005.001.005.03.142v.005l.002.006.03.141.002.005.001.005.033.142v.005l.002.005.035.14v.006l.002.005.036.14.002.005.001.005.038.14.001.005.002.005.04.14v.005l.002.005.042.138.001.006.002.005.042.138.002.005.002.005.017.054.064.148.09.134.114.114.132.092.148.065.157.037.16.007.16-.023.153-.052.14-.08.123-.104.102-.125.076-.142.049-.153.02-.16-.011-.161-.031-.13-.017-.051-.039-.126-.038-.13-.037-.128-.035-.13-.033-.128-.033-.134-.03-.13-.029-.131-.026-.13-.026-.133-.024-.133-.023-.133-.02-.132-.02-.136-.017-.132-.016-.135-.014-.135-.012-.133-.012-.138-.009-.133-.007-.136-.006-.138-.004-.134-.003-.136v-.274l.003-.136.004-.134.006-.139.007-.136.01-.133.01-.138.013-.132.014-.135.016-.135.017-.132.02-.137.02-.13.023-.134.024-.133.024-.126.016-.16-.014-.161-.044-.155-.072-.145-.098-.128-.12-.108-.137-.084-.15-.057-.16-.029zm26.698 1.601l-.161.01-.157.04-.146.067-.131.093-.112.117-.088.135-.061.149-.033.157-.005.134.006.14.006.176.003.177.001.178-.001.177-.003.178-.006.177-.007.176-.01.177-.012.176-.015.176-.016.173-.018.175-.02.175-.024.174-.025.175-.026.17-.03.174-.03.173-.033.17-.036.172-.037.17-.04.17-.042.172-.043.168-.045.166-.048.169-.05.167-.052.168-.053.164-.056.166-.058.166-.06.16-.062.165-.062.158-.066.165-.068.16-.07.16-.07.158-.075.159-.074.155-.079.158-.08.158-.06.15-.03.158-.001.161.029.159.058.15.085.137.108.119.13.097.144.07.156.044.16.013.16-.017.155-.046.143-.074.127-.1.107-.12.07-.115.083-.164.003-.005.002-.004.082-.166.002-.005.003-.004.08-.167.002-.005.002-.004.078-.168.002-.005.002-.004.076-.169.002-.004.002-.005.074-.17.002-.004.002-.005.072-.17.002-.005.002-.005.07-.171.001-.005.002-.005.068-.172.002-.004.002-.005.065-.173.002-.005.002-.005.063-.173.002-.005.002-.005.06-.174.003-.005.001-.005.06-.175.001-.005.002-.005.057-.176.001-.005.002-.005.055-.177.001-.005.002-.005.052-.177.002-.005.001-.005.051-.178.001-.005.002-.005.048-.179.002-.005v-.005l.047-.179.001-.005.002-.005.044-.18v-.005l.002-.005.042-.18.001-.006.001-.005.04-.181.001-.005.001-.005.037-.182.002-.005v-.005l.036-.182v-.006l.002-.005.033-.182v-.006l.002-.005.03-.183.001-.005.001-.005.029-.184v-.005l.001-.006.027-.184v-.005l.001-.005.024-.185v-.005l.001-.005.022-.185v-.006l.001-.005.02-.185v-.006l.001-.005.017-.186v-.005l.001-.005.015-.187v-.005l.001-.005.013-.187v-.01l.01-.187.001-.006v-.005l.009-.187v-.011l.006-.187v-.011l.004-.188v-.011l.001-.188v-.01l-.001-.188v-.011l-.004-.188v-.011l-.006-.187v-.011l-.007-.145-.022-.16-.05-.152-.08-.141-.103-.124-.125-.102-.141-.077-.153-.05-.16-.02zM.938 15L.777 15l-.158.032-.15.06-.136.087-.117.11-.095.131-.068.146-.04.156-.012.133-.001.14v.01l.001.188v.011l.004.188v.011l.006.187v.011l.008.187v.011l.011.187v.005l.001.005.013.187v.01l.016.187v.01l.018.186v.011l.02.185.001.005v.006l.022.185.001.005v.005l.025.185v.005l.001.005.027.184v.006l.001.005.029.184v.005l.001.005.031.183.001.005.001.006.033.182.001.005.001.006.035.182.001.005.001.005.038.182v.005l.002.005.04.181v.005l.002.005.042.18.001.006.001.005.044.18.002.005v.005l.047.18.001.004.002.005.048.179.002.005.001.005.05.178.002.005.001.005.053.177.002.005.001.005.055.177.002.005.001.005.057.176.002.005.001.005.06.175.001.005.002.005.061.174.002.005.002.005.063.173.002.005.002.005.065.173.002.005.002.004.067.172.002.005.002.005.07.171.002.005.002.005.072.17.002.005.002.004.074.17.002.005.002.004.076.169.002.004.002.005.078.168.002.004.002.005.08.167.003.004.002.005.082.166.002.004.003.005.02.04.086.136.11.118.13.095.146.07.156.041.16.012.16-.019.155-.048.142-.075.126-.1.105-.123.08-.14.054-.152.024-.16-.006-.16-.036-.158-.051-.123-.018-.034-.078-.158L3.1 22.1l-.074-.16-.071-.157-.07-.16-.068-.16-.067-.165-.062-.158-.062-.164-.059-.161-.058-.166-.056-.166-.053-.164-.052-.168-.05-.167-.048-.17-.045-.165-.043-.168-.043-.172-.039-.17-.037-.17-.036-.172-.033-.17-.03-.173-.03-.174-.027-.17-.025-.175-.022-.174-.021-.175-.018-.175-.017-.173-.014-.176-.012-.176-.01-.177-.007-.176-.006-.177-.003-.178L1.73 16v-.134l-.013-.16-.044-.156-.072-.144-.097-.129-.12-.108-.137-.085-.15-.057L.938 15zm26.798 2.024l-.16.007-.157.038-.148.066-.132.092-.113.115-.09.134-.062.148-.03.127-.001.004-.023.134-.024.133-.026.133-.026.13-.03.132-.03.129-.032.134-.033.128-.035.13-.037.128-.038.13-.04.126-.04.128-.044.128-.044.126-.046.126-.048.126-.05.125-.05.125-.051.122-.054.123-.055.122-.056.12-.058.122-.06.12-.061.12-.063.119-.062.116-.067.119-.066.116-.069.115-.069.115-.07.113-.073.113-.074.112-.076.113-.077.112-.077.107-.08.11-.08.107-.085.11-.044.056-.088.135-.06.15-.033.158-.002.16.027.16.057.15.083.138.108.12.128.098.144.072.155.045.16.015.161-.016.155-.044.144-.073.128-.098.09-.099.05-.061.003-.004.003-.005.089-.115.003-.004.003-.005.088-.116.003-.004.003-.005.086-.117.003-.004.003-.005.084-.118.003-.004.003-.005.083-.12.003-.004.003-.004.081-.12.003-.005.003-.004.08-.121.003-.005.003-.004.078-.122.003-.005.003-.004.077-.123.002-.005.003-.004.075-.124.003-.005.003-.004.073-.125.003-.005.003-.004.072-.126.002-.004.003-.005.07-.126.003-.005.002-.005.07-.127.002-.004.002-.005.068-.128.002-.005.002-.004.066-.13.003-.004.002-.005.064-.13.002-.004.003-.005.062-.13.002-.005.003-.005.06-.13.003-.005.002-.005.06-.132.002-.005.002-.005.057-.132.003-.005.002-.005.056-.133.002-.005.002-.005.054-.134.002-.004.002-.005.053-.135.002-.005.002-.005.051-.135.002-.005.002-.005.05-.135.001-.005.002-.005.048-.137.001-.005.002-.005.046-.137.002-.005.002-.005.044-.137.002-.005.002-.005.042-.138.002-.005.001-.006.042-.138.001-.005.002-.005.04-.14V19.4l.002-.005.038-.14.001-.005.002-.005.036-.14.001-.005.001-.005.035-.141.001-.005.001-.005.033-.142.001-.005.001-.005.031-.141.001-.006.002-.005.029-.142v-.005l.002-.005.028-.143v-.005l.002-.005.025-.143.001-.006.001-.005.024-.143.001-.005.001-.006.001-.006.01-.161-.02-.16-.05-.154-.077-.141-.102-.125-.123-.104-.141-.079-.153-.051-.16-.022zM6.841 22.71l-.16.024-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.018.16.011.161.041.156.07.146.077.109.04.048.003.004.003.004.095.111.003.004.004.004.096.11.004.005.003.004.098.109.003.004.004.004.1.108.003.004.003.004.101.107.004.004.003.004.102.105.004.004.004.004.103.105.004.004.004.003.105.104.003.004.004.003.106.102.004.004.004.004.107.1.004.004.004.004.108.099.004.003.004.004.11.098.003.003.004.004.11.096.004.003.005.004.11.095.005.003.004.004.113.093.004.003.004.004.113.091.004.004.005.003.114.09.004.004.004.003.116.089.004.003.004.003.117.088.004.003.004.003.118.086.004.003.005.003.118.084.004.003.005.003.119.083.004.003.005.003.12.081.005.003.004.003.121.08.005.003.004.003.122.078.005.003.004.003.123.076.005.003.004.003.124.075.005.003.004.003.125.073.004.003.005.002.126.073.004.002.005.003.126.07.005.003.004.002.128.07.004.002.005.002.128.067.005.003.004.002.13.066.004.002.005.003.13.064.004.002.005.003.13.062.005.002.004.003.132.06.004.003.005.002.132.06.005.002.005.002.132.057.005.002.005.002.133.057.005.002.005.002.133.054.005.002.005.002.13.05.154.045.16.016.16-.015.156-.045.144-.072.128-.098.108-.12.083-.138.057-.15.028-.16-.003-.16-.032-.159-.061-.149-.088-.135-.11-.117-.132-.094-.12-.058-.124-.049-.126-.051-.122-.051-.122-.054-.12-.054-.126-.058-.119-.057-.12-.06-.12-.06-.118-.063-.117-.064-.119-.066-.116-.066-.115-.068-.115-.07-.113-.07-.115-.074-.112-.074-.11-.075-.11-.076-.112-.08-.11-.08-.109-.081-.106-.082-.104-.082-.106-.086-.105-.087-.101-.086-.105-.091-.1-.09-.1-.091-.1-.094-.097-.094-.1-.098-.093-.095-.096-.1-.093-.098-.092-.101-.089-.1-.09-.102-.088-.104-.036-.043-.114-.114-.133-.091-.148-.065-.157-.036-.161-.006zm15.063 2.701l-.16.014-.156.044-.12.057-.06.034-.12.066-.117.064-.118.062-.12.061-.12.06-.118.057-.126.058-.12.054-.122.054-.122.05-.126.052-.125.05-.124.046-.127.047-.125.044-.129.043-.126.04-.13.042-.128.038-.127.035-.13.036-.131.034-.129.031-.132.03-.13.03-.135.027-.133.026-.13.023-.13.022-.137.021-.132.02-.134.017-.132.015-.138.015-.135.013-.133.01-.138.01-.136.007-.134.006-.136.004-.14.003-.16.018-.155.047-.142.076-.127.1-.105.122-.08.14-.054.151-.025.16.006.16.035.158.064.148.09.134.114.114.133.092.147.065.157.036.134.008.145-.002h.011l.147-.005h.01l.147-.007h.011l.146-.009h.011l.146-.01h.005l.005-.001.146-.012h.011l.145-.014h.005l.006-.001.145-.016h.011l.144-.018h.006l.005-.001.144-.02h.011l.144-.021.005-.001h.006l.143-.023.006-.001h.005l.143-.025h.005l.006-.002.143-.026h.005l.005-.002.143-.027.005-.001.005-.001.142-.03h.005l.005-.002.142-.03.005-.002.005-.001.142-.033.005-.001.005-.001.14-.035.006-.001.005-.001.14-.037h.005l.005-.002.14-.038.005-.002h.005l.14-.04.005-.002.005-.001.138-.042.005-.001.006-.002.138-.043.005-.001.005-.002.137-.044.005-.002.005-.002.137-.046.005-.002.005-.001.137-.048.005-.002.005-.002.135-.05.005-.001.005-.002.135-.051.005-.002.005-.002.135-.053.005-.002.004-.002.134-.054.005-.002.005-.002.133-.057.005-.002.005-.002.132-.057.005-.003.005-.002.132-.06.005-.001.004-.002.131-.061.005-.003.005-.002.13-.062.005-.003.005-.002.13-.064.004-.003.005-.002.128-.066.005-.002.005-.003.128-.067.005-.002.004-.003.127-.069.005-.002.005-.003.126-.07.005-.003.004-.003.065-.037.132-.093.112-.115.089-.135.062-.149.034-.157.003-.161-.026-.16-.055-.15-.082-.14-.107-.12-.127-.1-.144-.073-.154-.046-.16-.016zM6.33 26.818l-.16.023-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.02.16.012.161.041.156.07.146.094.13.096.093.032.026.004.003.004.004.145.117.004.003.004.004.146.115.005.003.004.004.147.113.005.003.004.004.149.111.004.003.004.003.15.11.005.003.004.003.151.108.004.003.005.003.152.106.005.003.004.003.154.104.004.003.005.003.154.102.005.002.004.003.156.1.005.003.004.003.157.098.005.003.004.002.159.096.004.003.005.003.16.094.004.003.004.002.16.092.005.003.005.002.161.09.005.003.005.002.162.088.005.003.004.002.164.086.005.003.004.002.165.084.005.003.004.002.166.082.004.002.005.003.167.08.004.002.005.002.168.078.004.002.005.002.168.076.005.002.005.002.17.074.004.002.005.002.17.072.005.002.005.002.17.07.006.002.005.001.171.068.005.002.005.002.173.065.005.002.005.002.173.063.005.002.005.002.174.06.005.003.005.001.175.06.005.001.005.002.176.057.005.001.005.002.176.055.006.001.005.002.177.052.005.002.005.001.178.05.005.002.005.002.178.048.006.001.005.002.179.046.005.001.005.002.18.044h.005l.005.002.18.042.006.001.005.001.159.035.16.02.16-.01.157-.04.146-.069.13-.094.112-.117.087-.136.06-.149.033-.158.002-.161-.028-.159-.057-.15-.084-.138-.108-.12-.128-.098-.144-.072-.128-.039-.154-.033-.168-.04-.171-.041-.17-.044-.168-.046-.167-.047-.168-.05-.165-.051-.166-.054-.166-.056-.163-.057-.165-.06-.161-.062-.164-.064-.16-.065-.16-.068-.162-.07-.157-.07-.157-.074-.157-.075-.156-.077-.153-.079-.156-.082-.153-.082-.154-.086-.15-.086-.152-.09-.148-.09-.147-.092-.149-.095-.145-.095-.144-.098-.145-.1-.143-.102-.14-.103-.14-.104-.14-.108-.139-.11-.136-.11-.027-.022-.133-.091-.148-.065-.157-.036-.161-.006zm19.215.087l-.16.01-.157.039-.146.067-.11.076-.064.051-.139.11-.14.108-.14.104-.14.103-.143.101-.145.101-.144.098-.145.095-.149.095-.148.093-.147.089-.152.09-.15.086-.154.086-.153.082-.156.082-.153.079-.156.077-.157.075-.158.073-.157.071-.16.07-.16.068-.161.065-.164.064-.161.061-.165.06-.163.058-.166.056-.166.054-.166.051-.167.05-.167.047-.17.046-.168.044-.171.042-.168.039-.17.037-.11.023-.154.047-.143.075-.126.1-.106.122-.081.139-.054.152-.025.16.006.16.035.158.063.148.09.133.114.115.132.092.148.065.157.037.16.007.133-.016.115-.024.005-.001.005-.001.181-.04h.005l.005-.002.18-.042.006-.001.005-.001.18-.044.005-.002.005-.001.18-.046.004-.002h.005l.179-.05h.005l.005-.002.178-.05.005-.002.005-.002.177-.052.005-.002.005-.001.177-.055.005-.002.005-.001.176-.057.005-.002.005-.002.175-.059.005-.001.005-.002.174-.061.005-.002.005-.002.173-.063.005-.002.005-.002.173-.065.004-.002.005-.002.172-.068.005-.002.005-.002.171-.07.005-.001.005-.002.17-.072.005-.002.004-.002.17-.074.005-.002.004-.002.169-.076.004-.002.005-.002.168-.078.004-.002.005-.003.167-.08.004-.002.005-.002.166-.082.004-.002.005-.003.165-.084.004-.002.005-.003.163-.086.005-.002.005-.003.162-.088.005-.002.005-.003.161-.09.005-.002.004-.003.16-.092.005-.003.005-.002.16-.094.004-.003.004-.003.158-.096.005-.002.004-.003.158-.098.004-.003.005-.003.156-.1.004-.003.004-.003.155-.101.005-.003.004-.003.154-.104.004-.003.004-.003.153-.106.004-.003.005-.003.151-.108.004-.003.005-.003.15-.11.004-.003.004-.003.149-.112.004-.003.004-.003.148-.113.004-.004.004-.003.147-.115.004-.004.004-.003.068-.055.116-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.05-.153-.08-.14-.103-.125-.124-.102-.142-.077-.153-.05-.16-.02z",opacity:".98"}));function gH(){return gH=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",gH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M16.012 8.816L9.21 21.026h13.606l-6.803-12.21zm0 1.776l5.332 9.57H10.681l5.331-9.57zm0-10.281c-1.448.02-2.93.157-4.302.628-.852.447-.255 1.863.66 1.574 2.255-.608 4.648-.607 6.922-.108.934.075 1.228-1.376.338-1.67C18.451.44 17.227.317 16.012.311zm9.012 2.934c-.913-.104-1.272 1.258-.454 1.648 1.834 1.36 3.293 3.185 4.31 5.22.526.776 1.842.098 1.515-.78a15.522 15.522 0 00-5.06-6.006c-.1-.044-.203-.07-.31-.082zM6.65 3.59c-.762.089-1.24.809-1.805 1.267C3.38 6.295 2.163 8.007 1.37 9.905c-.266.898 1.094 1.484 1.564.675a14.825 14.825 0 014.327-5.56c.476-.515.09-1.419-.612-1.431zm9.362.007c-.698.066-1.689-.16-2.033.635-.282.733.535 1.358 1.217 1.125 1.806-.147 3.63.203 5.293.907.902.255 1.472-1.112.656-1.573-1.6-.735-3.374-1.089-5.133-1.094zm-5.479 1.365c-.835.15-1.517.76-2.21 1.226-1.203.94-2.318 2.061-3.057 3.402-.33.904 1.063 1.552 1.547.723 1.045-1.656 2.596-2.925 4.285-3.873.545-.499.171-1.463-.565-1.478zm13.903 2.115c-.875-.07-1.22 1.173-.501 1.627 1.325 1.34 2.188 3.062 2.748 4.84.468.84 1.869.21 1.557-.699-.604-2.118-1.751-4.097-3.351-5.615a.93.93 0 00-.453-.153zM4.467 13.132c-.822-.07-.996.826-1.046 1.455-.256 1.93-.094 3.933.562 5.769.406.844 1.807.365 1.612-.551a11.498 11.498 0 01-.334-5.808.874.874 0 00-.794-.865zm26.687 1.6c-.746-.037-1.014.785-.879 1.395.043 2.393-.57 4.771-1.66 6.894-.31.884 1.02 1.536 1.53.75a15.632 15.632 0 001.821-8.372.876.876 0 00-.812-.667zm-30.197.571c-.782-.073-1.044.775-.933 1.404.068 2.414.661 4.833 1.809 6.962.534.77 1.842.076 1.505-.798a14.833 14.833 0 01-1.603-6.861.876.876 0 00-.778-.707zm26.787 2.024c-.777-.048-.952.797-1.021 1.392-.354 1.692-1.202 3.231-2.216 4.608-.407.872.925 1.638 1.48.852 1.361-1.733 2.296-3.827 2.582-6.017a.874.874 0 00-.825-.835zM6.857 23.012c-.808.018-1.082 1.122-.47 1.59 1.393 1.607 3.187 2.886 5.194 3.599.91.222 1.43-1.165.598-1.596a11.495 11.495 0 01-4.723-3.396.899.899 0 00-.599-.197zm15.057 2.7c-.81.194-1.504.76-2.325.972-1.203.458-2.5.536-3.758.664-.869.307-.573 1.728.346 1.663 2.201-.034 4.412-.626 6.293-1.778.604-.495.227-1.532-.556-1.521zM6.346 27.118c-.833.008-1.11 1.218-.395 1.617 1.986 1.602 4.358 2.749 6.868 3.226.933.076 1.227-1.376.338-1.67a14.838 14.838 0 01-6.345-3.066.929.929 0 00-.466-.107zm19.208.087c-.766.09-1.241.841-1.922 1.158-1.516.991-3.251 1.58-4.996 2.005-.872.405-.346 1.849.584 1.604 2.543-.526 4.98-1.66 6.963-3.344.47-.52.072-1.42-.63-1.423z"}));function vH(){return vH=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",vH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.998 8.406c-3.018-.041-5.92 1.926-7.031 4.727-1.138 2.695-.51 6.012 1.537 8.103 1.99 2.141 5.268 2.93 8.014 1.927 2.878-.98 4.992-3.827 5.068-6.87.153-2.957-1.624-5.88-4.3-7.137a7.552 7.552 0 00-3.288-.75zm0 1.384c2.759-.052 5.373 1.973 6.015 4.655.704 2.578-.482 5.517-2.791 6.867-2.358 1.48-5.682 1.086-7.618-.918-2.043-1.971-2.407-5.381-.84-7.745 1.11-1.763 3.15-2.88 5.234-2.86zm1.962 1.765l-2.074 3.762c-.64.068-.793 1.04-.202 1.3.39.27.696-.18 1.052-.165h3.17v-.865h-3.182l1.993-3.615c-.252-.14-.505-.278-.757-.417zm-1.965-8.268h-.158l-.147.003h-.011l-.147.005h-.011l-.146.007h-.011l-.146.009h-.011l-.146.01h-.005l-.005.001-.146.012h-.011l-.145.014h-.006l-.005.001-.05.006-.158.031-.15.06-.135.088-.117.111-.094.13-.069.147-.04.156-.01.16.019.16.049.154.076.142.102.125.123.105.14.08.152.051.16.023.134-.003.045-.005.135-.013.133-.01.136-.01.135-.007.137-.006.136-.004.136-.003h.274l.136.003.136.004.136.006.136.007.136.01.133.01.135.013.135.014.135.016.134.018.132.018.134.021.133.023.133.024.133.025.13.027.132.03.132.03.129.031.13.034.129.035.129.036.13.04.126.038.128.042.126.042.128.045.127.047.126.048.12.047.127.051.123.052.006.002.147.048.16.021.16-.009.157-.038.147-.067.131-.093.112-.116.089-.135.062-.149.033-.158.004-.16-.027-.16-.055-.151-.083-.138-.107-.121-.127-.099-.118-.063-.004-.001-.005-.003-.005-.002-.133-.056-.005-.002-.005-.002-.134-.054-.004-.002-.005-.002-.135-.053-.005-.002-.005-.002-.135-.051-.005-.002-.005-.002-.135-.05-.005-.001-.005-.002-.137-.048-.005-.001-.005-.002-.137-.046-.005-.002-.005-.002-.137-.044-.005-.002-.005-.001-.138-.043-.005-.002-.006-.001-.138-.042-.005-.001-.005-.002-.14-.04H19.4l-.005-.002-.14-.038-.005-.001-.005-.002-.14-.036-.005-.001-.005-.001-.141-.035-.005-.001-.005-.001-.142-.033-.005-.001-.005-.001-.141-.031-.006-.002h-.005l-.142-.03-.005-.001-.005-.001-.143-.028h-.005l-.005-.001-.143-.026-.006-.001-.005-.001-.143-.024-.005-.001-.006-.001-.143-.022-.006-.001h-.005l-.144-.022h-.005l-.006-.001-.144-.019h-.005l-.006-.001-.144-.017h-.006l-.005-.001-.145-.016h-.011l-.145-.014H17.1l-.005-.001-.146-.012h-.01l-.146-.01-.006-.001h-.005l-.146-.009h-.011l-.147-.006h-.01l-.147-.005h-.011l-.147-.003h-.01l-.148-.001h-.01zM10.357 4.66l-.156.037-.123.053-.06.032-.005.002-.004.003-.128.069-.004.002-.005.003-.126.07-.005.003-.004.002-.126.072-.005.003-.004.003-.125.073-.004.003-.005.003-.124.075-.004.003-.005.002-.123.077-.004.003-.005.003-.122.078-.004.003-.005.003-.121.08-.004.002-.005.003-.12.082-.005.003-.004.003-.12.083-.004.003-.004.003-.118.084-.005.003-.004.003-.118.086-.004.003-.004.003-.117.088-.004.003-.004.003-.116.089-.004.003-.004.004-.114.09-.005.003-.004.003-.113.092-.004.004-.004.003-.113.093-.004.004-.004.003-.111.095-.004.003-.005.004-.11.096-.004.004-.004.003-.109.098-.004.003-.004.004-.108.1-.004.003-.004.003-.107.101-.004.004-.004.003-.106.102-.003.004-.004.004-.105.103-.004.004-.004.004-.103.105-.004.004-.004.003-.102.106-.003.004-.004.004-.1.107-.004.004-.004.004-.099.108-.004.004-.003.004-.098.11-.003.003-.004.004-.096.11-.004.005-.003.004-.095.111-.003.004-.004.004-.093.113-.003.004-.004.004-.092.113-.003.004-.003.005-.09.114-.004.004-.003.004-.089.116-.003.004-.003.004-.088.117-.003.004-.003.005-.086.117-.003.004-.003.005-.084.118-.003.004-.003.005-.083.12-.003.003-.003.005-.082.12-.003.005-.002.004-.068.103-.076.142-.048.154-.018.16.011.161.041.156.07.146.095.13.117.11.136.086.15.06.158.03.162.002.158-.029.15-.058.138-.085.119-.108.082-.106.065-.099.075-.11.077-.113.077-.107.08-.11.08-.108.084-.108.083-.105.086-.106.086-.104.088-.104.089-.101.09-.102.093-.101.093-.099.094-.097.095-.096.098-.097.098-.095.099-.093.1-.092.103-.091.101-.089.104-.088.104-.086.106-.086.106-.083.106-.082.109-.082.108-.079.11-.078.11-.076.112-.076.112-.074.113-.072.113-.071.115-.07.115-.068.118-.067.117-.065.12-.065.054-.029.135-.088.116-.111.094-.132.068-.146.04-.156.009-.161-.02-.16-.05-.153-.078-.142-.102-.125-.123-.103-.141-.079-.153-.051-.16-.022-.16.008zm13.91 2.116l-.158.037-.147.066-.132.092-.113.116-.09.134-.063.148-.034.157-.005.162.026.159.054.152.082.139.086.102.09.09.094.098.093.099.092.1.091.103.089.101.088.104.086.104.086.106.083.105.083.108.08.108.081.11.077.107.077.112.075.111.075.114.072.113.071.113.07.115.068.117.067.115.065.118.064.117.062.118.061.12.059.119.059.122.056.121.054.12.055.125.051.123.051.125.048.123.049.127.046.126.044.125.043.128.042.129.039.126.038.13.022.076.058.15.086.137.109.119.129.096.145.07.155.043.16.013.161-.017.155-.046.143-.074.126-.1.106-.122.082-.138.055-.152.025-.16-.005-.16-.026-.132-.023-.082-.002-.005-.001-.005-.042-.139-.001-.005-.002-.005-.043-.138-.001-.005-.002-.005-.044-.137-.002-.005-.002-.005-.046-.137-.002-.005-.001-.005-.048-.137-.002-.005-.002-.005-.05-.135-.001-.005-.002-.005-.051-.135-.002-.005-.002-.005-.053-.135-.002-.005-.002-.005-.054-.133-.002-.005-.002-.005-.057-.133-.002-.005-.002-.005-.057-.132-.003-.005-.002-.005-.059-.132-.002-.005-.002-.004-.061-.132-.003-.004-.002-.005-.062-.13-.003-.005-.002-.005-.064-.13-.003-.004-.002-.005-.066-.129-.002-.004-.003-.005-.067-.128-.002-.005-.003-.004-.069-.128-.002-.004-.003-.005-.07-.126-.003-.005-.003-.004-.072-.126-.002-.005-.003-.004-.073-.125-.003-.004-.003-.005-.075-.124-.003-.004-.003-.005-.076-.123-.003-.004-.003-.005-.078-.122-.003-.004-.003-.005-.08-.121-.003-.004-.003-.005-.08-.12-.004-.005-.003-.004-.083-.12-.003-.004-.003-.004-.084-.118-.003-.005-.003-.004-.086-.117-.003-.005-.003-.004-.088-.117-.003-.004-.003-.004-.09-.116-.002-.004-.004-.004-.09-.114-.003-.005-.004-.004-.091-.113-.004-.004-.003-.004-.093-.113-.004-.004-.003-.004-.095-.111-.004-.004-.003-.004-.096-.11-.004-.005-.003-.004-.098-.109-.004-.004-.003-.004-.1-.108-.003-.004-.004-.004-.1-.107-.004-.004-.004-.004-.102-.106-.003-.003-.004-.004-.093-.095-.124-.103-.14-.08-.153-.05-.16-.023-.16.008zM4.288 12.828l-.158.032-.15.06-.135.088-.117.11-.095.131-.069.146-.035.129-.026.132v.005l-.002.005-.025.143-.001.005-.001.006-.024.143-.001.005-.001.006-.022.143-.001.006-.001.005-.02.144-.001.005-.001.006-.019.144v.005l-.001.006-.017.144v.006l-.001.005-.016.145v.011l-.014.145v.006l-.001.005-.012.146v.01l-.01.146-.001.006v.005l-.009.146v.011l-.007.146v.011l-.004.147v.011l-.003.147v.01l-.002.148v.01l.001.148v.01l.003.147v.011l.005.147v.01l.007.147v.011l.009.146v.011l.01.146v.01l.013.146v.011l.014.145v.005l.001.006.016.145v.011l.018.144v.006l.001.005.019.144v.006l.001.005.021.144v.005l.002.006.022.143v.006l.002.005.024.143v.005l.002.006.025.143.001.005.001.005.028.143.001.005.001.005.03.142v.005l.002.006.03.141.002.005.001.006.033.14v.006l.002.005.035.14v.006l.002.005.036.14.002.005.001.005.038.14.001.005.002.005.04.14v.005l.002.005.042.138.001.006.002.005.042.138.002.005.002.005.017.054.064.148.09.134.114.114.132.092.148.065.157.037.16.007.16-.023.153-.052.14-.08.123-.103.102-.126.076-.142.049-.153.02-.16-.01-.161-.032-.13-.017-.051-.039-.126-.038-.13-.037-.128-.035-.13-.033-.128-.033-.134-.03-.13-.029-.131-.026-.13-.026-.132-.024-.134-.023-.133-.02-.132-.02-.136-.017-.132-.016-.135-.014-.135-.012-.133-.012-.138-.009-.133-.007-.136-.006-.138-.004-.134-.003-.136v-.274l.003-.136.004-.134.006-.139.007-.136.01-.132.01-.139.013-.132.014-.135.016-.135.017-.132.02-.137.02-.13.023-.134.024-.133.024-.126.016-.16-.014-.161-.044-.155-.072-.145-.098-.128-.12-.108-.137-.084-.15-.057-.16-.029-.16.002zm23.286 4.202l-.156.038-.148.066-.132.092-.113.115-.09.134-.062.148-.03.127-.001.004-.023.134-.024.134-.026.132-.026.13-.03.132-.03.129-.032.134-.033.128-.035.13-.037.128-.038.13-.04.126-.04.128-.044.128-.044.126-.046.126-.048.126-.05.125-.05.125-.051.122-.054.123-.055.122-.056.12-.058.122-.06.12-.061.12-.062.119-.063.116-.067.119-.066.116-.068.115-.07.115-.07.113-.073.113-.074.112-.076.113-.077.112-.077.107-.08.11-.08.108-.085.109-.044.056-.088.135-.06.15-.033.158-.002.16.027.16.057.15.083.138.108.12.128.098.144.072.155.045.16.015.161-.016.155-.044.144-.073.128-.098.09-.099.05-.061.003-.004.003-.005.089-.115.003-.004.003-.005.088-.116.003-.004.003-.005.086-.117.003-.004.003-.005.084-.118.003-.004.003-.005.083-.12.003-.004.003-.004.082-.12.003-.005.002-.004.08-.121.003-.005.003-.004.078-.122.003-.005.003-.004.077-.123.002-.005.003-.004.075-.124.003-.005.003-.004.073-.125.003-.004.003-.005.072-.126.002-.004.003-.005.07-.126.003-.005.002-.005.07-.127.002-.004.002-.005.068-.128.002-.005.002-.004.066-.13.003-.004.002-.005.064-.13.002-.004.003-.005.062-.13.003-.005.002-.005.06-.13.003-.005.002-.005.06-.132.002-.005.002-.005.057-.132.003-.005.002-.005.056-.133.002-.005.002-.005.054-.134.002-.004.002-.005.053-.135.002-.005.002-.005.051-.135.002-.005.002-.005.05-.135.001-.005.002-.005.048-.137.001-.005.002-.005.046-.137.002-.005.002-.005.044-.137.002-.005.002-.005.042-.138.002-.005.002-.006.04-.138.002-.005.002-.005.04-.14V19.4l.002-.005.038-.14.001-.005.002-.005.036-.14.001-.005.001-.005.035-.141.001-.005.001-.005.033-.141.001-.006.001-.005.031-.141.002-.006v-.005l.03-.142.001-.005.001-.005.028-.143v-.005l.002-.005.025-.143.001-.006.001-.005.024-.143.001-.005.001-.006.001-.006.01-.161-.02-.16-.05-.154-.077-.141-.102-.125-.123-.104-.141-.079-.153-.051-.16-.022-.16.007zM6.681 22.734l-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.018.16.011.161.041.156.07.146.077.11.04.047.003.004.003.004.095.111.003.004.004.004.096.11.004.005.003.004.098.109.003.004.004.004.1.108.003.004.003.004.101.107.004.004.003.004.102.106.004.003.004.004.103.105.004.004.004.004.105.103.004.004.003.003.106.102.004.004.004.004.107.1.004.004.004.004.108.099.004.003.004.004.11.098.003.003.004.004.11.096.005.004.004.003.11.095.005.003.004.004.113.093.004.003.004.004.113.091.004.004.005.003.114.09.004.004.004.003.116.089.004.003.004.003.117.088.004.003.004.003.118.086.004.003.005.003.118.084.004.003.005.003.119.083.004.003.005.003.12.081.005.003.004.003.121.08.005.003.004.003.122.078.005.003.004.003.123.076.005.003.004.003.124.075.005.003.004.003.125.073.004.003.005.003.126.072.004.002.005.003.126.07.005.003.004.002.128.07.004.002.005.002.128.068.005.002.004.002.13.066.004.003.005.002.13.064.004.002.005.003.13.062.005.002.004.003.132.06.004.003.005.002.132.06.005.002.005.002.132.057.005.002.005.003.133.056.005.002.005.002.133.054.005.002.005.002.13.05.154.045.16.016.161-.015.155-.045.144-.072.128-.098.108-.12.083-.138.057-.15.028-.16-.003-.16-.032-.158-.061-.15-.088-.135-.11-.117-.132-.094-.12-.058-.124-.049-.126-.051-.122-.051-.122-.054-.12-.054-.126-.058-.119-.057-.12-.06-.12-.06-.118-.063-.117-.064-.119-.066-.116-.066-.115-.068-.115-.07-.113-.07-.115-.074-.112-.074-.11-.075-.11-.076-.112-.079-.11-.08-.109-.082-.106-.082-.104-.082-.106-.086-.105-.087-.101-.086-.105-.091-.1-.09-.1-.091-.1-.094-.097-.094-.1-.098-.093-.095-.096-.1-.093-.098-.092-.101-.089-.1-.09-.102-.088-.104-.036-.043-.114-.114-.133-.091-.148-.065-.157-.036-.161-.006-.16.024zm15.063 2.691l-.156.044-.12.057-.06.034-.12.066-.116.064-.119.062-.12.061-.12.06-.118.057-.126.058-.12.054-.122.054-.122.05-.126.052-.125.05-.124.046-.127.047-.125.044-.129.043-.126.04-.13.042-.128.038-.127.036-.13.035-.131.034-.129.031-.132.03-.13.03-.135.027-.133.026-.13.023-.13.022-.137.021-.132.02-.134.017-.132.015-.138.015-.135.013-.133.01-.138.01-.136.007-.134.006-.136.004-.14.003-.16.018-.155.047-.142.076-.127.1-.105.122-.08.14-.054.151-.025.16.006.16.035.158.064.148.09.134.114.114.133.092.147.065.157.036.134.008.145-.002h.011l.147-.005h.01l.147-.007h.011l.146-.009h.011l.146-.01h.005l.005-.001.146-.012h.011l.145-.014h.005l.006-.001.145-.016h.011l.144-.018h.006l.005-.001.144-.02h.011l.144-.021h.005l.006-.002.143-.022h.006l.005-.002.143-.024h.005l.006-.002.143-.026h.005l.005-.002.143-.027.005-.001.005-.001.142-.03h.005l.005-.002.142-.03.005-.002.005-.001.142-.033.005-.001.005-.001.14-.035.006-.001.005-.001.14-.036.005-.002.005-.001.14-.038.005-.001.005-.002.14-.04h.005l.005-.002.138-.042.005-.001.006-.002.138-.043.005-.001.005-.002.137-.044.005-.002.005-.002.137-.046.005-.002.005-.001.137-.048.005-.002.005-.002.135-.05.005-.001.005-.002.135-.051.005-.002.005-.002.135-.053.005-.002.004-.002.134-.054.005-.002.005-.002.133-.056.005-.003.005-.002.132-.057.005-.002.005-.003.132-.059.005-.002.004-.002.131-.061.005-.003.005-.002.13-.062.005-.003.005-.002.13-.064.004-.002.005-.003.129-.066.004-.002.005-.003.128-.067.005-.002.004-.003.127-.069.005-.002.005-.003.126-.07.005-.003.004-.002.065-.038.132-.093.112-.115.089-.135.062-.149.034-.157.004-.161-.027-.16-.055-.15-.082-.14-.107-.12-.127-.1-.144-.073-.154-.045-.16-.017-.161.014zM15.994 0l-.187.001h-.011l-.188.004h-.011l-.187.006h-.011l-.187.008h-.005L15.2.02l-.187.01h-.005l-.005.001-.187.013h-.01L14.62.06h-.01l-.186.018h-.011l-.185.02-.005.001h-.006l-.185.022-.005.001h-.005l-.185.025h-.005l-.005.001-.184.027h-.006l-.005.001-.184.029h-.005l-.005.001-.183.031-.005.001-.006.001-.182.033-.006.001-.005.001-.182.035-.005.001-.005.001-.182.038h-.005l-.005.002-.181.04h-.005l-.005.002-.18.042-.006.001-.005.001-.18.044-.005.002h-.005l-.17.045-.152.054-.139.082-.121.106-.1.127-.074.143-.046.155-.017.16.013.16.043.156.07.145.097.13.119.108.137.085.15.058.159.03.16-.001.133-.023.165-.043.168-.041.171-.04.171-.037.172-.036.17-.033.173-.03.17-.03.177-.027.171-.025.175-.022.175-.02.175-.02.176-.016.175-.014.177-.012.176-.01.177-.007.174-.006.177-.003L16 1.73h.177l.178.004.174.006.177.007.176.01.177.012.175.014.176.017.175.018.175.02.175.023.171.025.177.027.17.03.173.03.17.033.171.036.154.033.16.02.161-.01.156-.04.146-.069.131-.094.111-.117.088-.135.06-.15.032-.158.002-.16-.027-.16-.057-.15L20 .714l-.108-.12-.128-.097-.144-.073-.129-.038-.158-.035-.005-.001-.005-.001L19.14.31h-.005l-.005-.002-.182-.035h-.006l-.005-.002-.182-.033h-.006l-.005-.002-.183-.03-.005-.001-.005-.001-.184-.029h-.005l-.006-.001-.184-.027h-.005l-.005-.001-.185-.024h-.005L17.968.12 17.783.1l-.006-.001h-.005l-.185-.02h-.006l-.005-.001L17.39.06 17.385.06h-.005l-.187-.015h-.005l-.005-.001-.187-.013h-.01L16.799.02h-.011L16.6.01h-.011l-.187-.006h-.011L16.204 0h-.011L16.005 0h-.01zm8.86 2.939l-.157.033-.15.062-.134.09-.116.111-.093.132-.067.147-.038.156-.01.161.022.16.05.153.078.141.103.124.102.087.045.034.142.106.137.105.14.11.136.11.135.112.134.115.134.117.13.115.132.122.128.12.127.122.127.125.123.126.124.128.121.13.118.128.118.132.117.133.113.134.113.136.11.136.109.137.109.142.104.14.103.14.101.142.1.144.099.146.095.145.094.147.093.15.092.15.087.149.087.15.085.152.083.155.08.152.08.155.04.081.084.138.11.119.128.096.145.072.155.043.16.013.161-.016.155-.046.143-.074.127-.099.106-.12.083-.14.055-.151.026-.16-.004-.16-.034-.158-.05-.124-.042-.085-.002-.004-.003-.005-.084-.165-.002-.004-.003-.005-.086-.164-.002-.004-.003-.005-.088-.162-.002-.005-.003-.005-.09-.161-.002-.005-.003-.004-.092-.16-.002-.005-.003-.005-.094-.16-.003-.004-.003-.004-.096-.159-.002-.004-.003-.005-.098-.157-.003-.004-.003-.005-.1-.156-.003-.004-.002-.005-.102-.154-.003-.005-.003-.004-.104-.154-.003-.004-.003-.005-.106-.152-.003-.004-.003-.005-.108-.151-.003-.004-.003-.005-.11-.15-.003-.004-.003-.004-.111-.15-.004-.003-.003-.005-.113-.147-.004-.004-.003-.005-.115-.146-.004-.004-.003-.004-.117-.145-.004-.004-.003-.004-.12-.144-.003-.004-.003-.004-.121-.142-.003-.004-.004-.004-.123-.141-.003-.004-.004-.004-.125-.14-.003-.004-.004-.004-.127-.138-.003-.004-.004-.004-.128-.136-.004-.004-.004-.004-.13-.135-.004-.004-.003-.004-.133-.134-.003-.004-.004-.003-.134-.133-.004-.003-.004-.004-.135-.13-.004-.004-.004-.004-.136-.128-.004-.004-.004-.004-.138-.126-.004-.004-.004-.003-.14-.125-.004-.004-.004-.003-.14-.123-.005-.004-.004-.003-.142-.121-.004-.004-.004-.003-.144-.12-.004-.003-.004-.003-.145-.117-.004-.004-.004-.003-.147-.115-.004-.004-.004-.003-.148-.113-.004-.003-.004-.004-.149-.111-.004-.003-.004-.004-.05-.036-.14-.083-.15-.055-.16-.027-.16.004zm-18.381.348l-.157.037-.147.066-.111.074-.04.032-.005.003-.004.004-.145.117-.004.003-.004.004-.144.119-.004.003-.004.004-.142.12-.004.004-.004.004-.141.123-.004.003-.004.004-.14.125-.004.003-.004.004-.138.126-.004.004-.004.004-.136.128-.004.004-.004.004-.135.13-.004.004-.004.003-.134.133-.004.003-.004.004-.132.134-.003.004-.004.004-.13.135-.004.004-.004.004-.128.136-.004.004-.004.004-.126.138-.004.004-.003.004-.125.14-.004.004-.003.004-.123.14-.004.005-.003.004-.121.142-.004.004-.003.004-.12.144-.003.004-.003.004-.117.145-.004.004-.003.004-.115.146-.004.005-.003.004-.113.147-.003.005-.004.004-.111.149-.003.004-.004.004-.11.15-.002.005-.003.004-.108.151-.003.005-.003.004-.106.152-.003.005-.003.004-.104.154-.003.004-.003.005-.102.154-.003.005-.002.004-.1.156-.003.005-.003.004-.098.157-.003.005-.003.004-.096.159-.002.004-.003.005-.094.16-.003.004-.002.004-.092.16-.003.005-.003.005-.09.161-.002.005-.003.005-.088.162-.002.005-.003.004-.086.164-.002.005-.002.004-.084.165-.003.005-.002.004-.082.166-.002.005-.003.004-.08.167-.002.004-.002.005-.078.168-.002.004-.002.005-.045.1-.053.153-.023.16.007.16.037.157.065.148.092.132.114.114.134.09.148.064.157.035.161.006.16-.025.152-.054.14-.08.121-.106.1-.126.065-.118.043-.095.074-.16.075-.155.077-.157.08-.155.08-.152.083-.155.085-.152.086-.15.088-.149.091-.15.094-.15.094-.147.095-.145.099-.146.1-.144.1-.142.104-.14.104-.14.11-.142.107-.137.11-.136.114-.136.113-.134.117-.133.118-.132.117-.129.122-.13.124-.127.123-.126.127-.125.127-.122.128-.12.132-.122.13-.115.133-.117.135-.115.135-.111.136-.11.037-.03.117-.11.094-.132.068-.146.04-.156.01-.161-.02-.16-.05-.154-.076-.141-.102-.125-.123-.104-.14-.08-.153-.051-.16-.023-.161.008zm24.514 11.15l-.157.04-.146.067-.131.093-.112.117-.088.135-.061.149-.033.157-.005.134.006.14.006.176.003.177.001.178-.001.177-.003.178-.006.177-.007.176-.01.177-.012.176-.015.176-.016.173-.018.175-.02.175-.024.174-.024.175-.027.17-.03.174-.03.173-.033.17-.036.172-.037.17-.04.17-.042.172-.043.168-.045.166-.048.169-.05.167-.052.168-.053.164-.056.166-.058.166-.06.161-.061.164-.063.158-.066.165-.068.16-.07.16-.07.158-.075.159-.074.155-.078.158-.081.158-.06.15-.03.158-.001.161.029.159.058.15.085.137.108.12.13.096.144.07.156.044.16.013.16-.017.155-.046.143-.074.127-.1.107-.12.07-.115.083-.164.003-.005.002-.004.082-.166.002-.005.003-.004.08-.167.002-.005.002-.004.078-.168.002-.004.002-.005.076-.169.002-.004.002-.005.074-.17.002-.004.002-.005.072-.17.002-.005.002-.005.07-.17.002-.006.001-.005.068-.172.002-.004.002-.005.065-.173.002-.005.002-.005.063-.173.002-.005.002-.005.06-.174.003-.005.001-.005.06-.175.001-.005.002-.005.057-.176.001-.005.002-.005.055-.177.001-.005.002-.005.052-.177.002-.005.001-.005.051-.178.001-.005.002-.005.048-.179.002-.005v-.005l.047-.179.001-.005.002-.005.044-.18v-.005l.002-.005.042-.18.001-.006.001-.005.04-.18.001-.006.001-.005.038-.182v-.005l.002-.005.035-.182v-.006l.002-.005.033-.182v-.006l.002-.005.03-.183.001-.005.001-.005.029-.184v-.005l.001-.006.027-.184v-.005l.001-.005.024-.185v-.005l.001-.005.022-.185v-.006l.001-.005.02-.185v-.006l.001-.005.017-.186v-.005l.001-.005.015-.187v-.005l.001-.005.013-.187v-.01l.01-.187.001-.006v-.005l.009-.187v-.011l.006-.187v-.011l.004-.188v-.011l.001-.188v-.01l-.001-.188v-.011l-.004-.188v-.011l-.006-.187v-.011l-.007-.145-.022-.16-.05-.152-.08-.141-.103-.124-.125-.102-.141-.077-.153-.05-.16-.02-.161.009zM.777 15l-.158.032-.15.06-.136.087-.117.11-.095.131-.068.146-.04.156-.012.133-.001.14v.01l.001.188v.011l.004.188v.011l.006.187v.011l.008.187v.011l.011.187v.005l.001.005.013.187v.01l.016.187v.01l.018.186v.011l.02.185.001.005v.006l.022.185.001.005v.005l.025.185v.005l.001.005.027.184v.006l.001.005.029.184v.005l.001.005.031.183.001.005.001.006.033.182.001.005.001.006.035.182.001.005.001.005.038.182v.005l.002.005.04.181v.005l.002.005.042.18.001.006.001.005.044.18.002.005v.005l.047.18.001.004.002.005.048.179.002.005.001.005.05.178.002.005.001.005.053.177.002.005.001.005.055.177.002.005.001.005.057.176.002.005.001.005.06.175.001.005.002.005.061.174.002.005.002.005.063.173.002.005.002.005.065.173.002.005.002.004.067.172.002.005.002.005.07.171.002.005.002.005.072.17.002.005.002.005.074.169.002.005.002.004.076.169.002.005.002.004.078.168.002.004.002.005.08.167.003.004.002.005.082.166.002.004.003.005.02.04.086.136.11.118.13.095.146.07.156.041.16.012.16-.019.155-.048.142-.075.126-.1.105-.123.08-.14.054-.152.024-.16-.006-.16-.036-.158-.051-.123-.018-.034-.078-.158L3.1 22.1l-.074-.16-.071-.156-.07-.162-.068-.16-.067-.164-.062-.158-.062-.164-.059-.161-.058-.166-.056-.166-.053-.164-.052-.168-.05-.167-.048-.17-.045-.165-.043-.168-.043-.172-.039-.17-.037-.17-.036-.172-.033-.17-.03-.173-.03-.174-.027-.17-.025-.175-.022-.174-.021-.175-.018-.175-.017-.173-.014-.176-.012-.176-.01-.177-.007-.176-.006-.177-.003-.178L1.73 16v-.134l-.013-.16-.044-.156-.072-.144-.097-.129-.12-.108-.137-.085-.15-.057L.938 15 .777 15zM6.17 26.842l-.152.052-.14.08-.122.105-.101.126-.076.142-.048.154-.02.16.012.161.041.156.07.146.094.13.096.093.032.026.004.003.004.004.145.117.004.003.004.004.146.115.005.003.004.004.147.113.005.003.004.004.149.111.004.003.004.003.15.11.005.003.004.003.151.108.005.003.004.003.152.106.005.003.004.003.154.104.004.003.005.003.154.102.005.002.004.003.156.1.005.003.004.003.157.098.005.003.004.002.159.096.004.003.005.003.16.094.004.003.004.002.16.092.005.003.005.002.161.09.005.003.005.003.162.088.005.002.004.002.164.087.005.002.004.002.165.084.005.003.004.002.166.082.004.002.005.003.167.08.004.002.005.002.168.078.004.002.005.002.169.076.004.002.005.002.17.074.004.002.005.002.17.072.005.002.005.002.17.07.006.002.005.001.171.068.005.002.005.002.173.065.005.002.005.002.173.063.005.002.005.002.174.061.005.002.005.001.175.06.005.001.005.002.176.057.005.001.005.002.177.055.005.001.005.002.177.052.005.002.005.001.178.051.005.001.005.002.178.048.006.002h.005l.179.047.005.001.005.002.18.044h.005l.005.002.18.042.006.001.005.001.159.035.16.02.16-.01.157-.04.146-.069.13-.094.112-.117.087-.136.06-.149.033-.158.002-.161-.028-.159-.057-.15-.084-.138-.108-.12-.128-.098-.144-.072-.128-.039-.154-.033-.168-.04-.171-.041-.169-.044-.17-.045-.166-.048-.168-.05-.165-.051-.166-.054-.166-.056-.163-.057-.165-.06-.161-.062-.164-.064-.16-.065-.16-.068-.162-.07-.157-.07-.157-.074-.157-.075-.156-.077-.153-.079-.156-.082-.153-.082-.154-.086-.15-.086-.152-.09-.148-.09-.147-.092-.149-.095-.145-.095-.144-.098-.145-.1-.143-.102-.14-.103-.14-.104-.14-.108-.139-.11-.136-.11-.027-.022-.133-.091-.148-.065-.157-.036-.161-.006-.16.024zm19.214.073l-.156.039-.146.067-.11.076-.064.051-.139.11-.14.108-.14.104-.14.103-.143.101-.145.101-.144.098-.145.095-.149.095-.148.093-.147.089-.152.09-.15.086-.154.086-.153.082-.156.082-.153.079-.156.077-.157.075-.157.073-.158.071-.16.07-.16.068-.161.065-.164.064-.161.061-.165.06-.163.058-.166.056-.166.054-.166.051-.167.05-.167.048-.17.045-.168.044-.171.042-.168.039-.17.037-.11.023-.154.047-.143.075-.126.1-.106.122-.081.139-.054.152-.025.16.006.16.035.158.063.148.09.133.114.115.132.092.148.065.157.037.16.008.133-.017.115-.024h.005l.005-.002.181-.04h.005l.005-.002.18-.042.006-.001.005-.001.18-.044.005-.002h.005l.18-.047.004-.001.005-.002.179-.048.005-.002.005-.001.178-.05.005-.002.005-.002.177-.052.005-.002.005-.001.177-.055.005-.002.005-.001.176-.057.005-.002.005-.002.175-.059.005-.001.005-.002.174-.061.005-.002.005-.002.173-.063.005-.002.005-.002.173-.065.005-.002.004-.002.172-.068.005-.001.005-.002.171-.07.005-.002.005-.002.17-.072.005-.002.005-.002.169-.074.005-.002.004-.002.169-.076.004-.002.005-.002.168-.078.004-.002.005-.002.167-.08.004-.003.005-.002.166-.082.004-.002.005-.003.165-.084.004-.002.005-.002.163-.087.005-.002.005-.002.162-.088.005-.003.005-.003.161-.09.005-.002.004-.003.16-.092.005-.002.005-.003.16-.094.004-.003.004-.003.158-.096.005-.002.004-.003.158-.098.004-.003.005-.003.156-.1.004-.003.004-.002.155-.102.005-.003.004-.003.154-.104.004-.003.005-.003.152-.106.004-.003.005-.003.151-.108.004-.003.005-.003.15-.11.004-.003.004-.003.149-.111.004-.004.004-.003.148-.113.004-.004.004-.003.147-.115.004-.004.004-.003.068-.055.116-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.05-.153-.08-.14-.103-.125-.124-.102-.142-.077-.153-.05-.16-.02-.16.009z"}));function xH(){return xH=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",xH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.975.003C8.195-.157.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.408 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.215-2.282-2.022-5.3-3.217-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.082 11.082 0 0116 4.975zm-2.15 3.281v5.534H8.213v4.38h5.636v5.534h4.31V18.17h5.639v-4.38h-5.64V8.256h-4.31zm.865.865h2.583v5.534h5.635v2.65h-5.635v5.533h-2.583v-5.534h-5.64v-2.649h5.64V9.121z"}));function _H(){return _H=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",_H({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm.006 3.521L9.206 20.745h13.598L16.005 8.542zm0 1.775l5.329 9.564H10.677l5.328-9.564z"}));function OH(){return OH=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",OH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.97.04h-.127C8.713-.018 2.003 5.334.437 12.286c-1.51 6.123.98 13.005 6.136 16.665 5.125 3.788 12.546 4.105 17.912.623 5.272-3.276 8.33-9.766 7.325-15.916-.904-6.241-5.79-11.7-11.95-13.143A16.082 16.082 0 0015.97.04zm-.181 1.724c.115 0 .23 0 .347.003 6.625-.066 12.823 5.149 13.89 11.69 1.13 5.91-1.908 12.349-7.262 15.138-5.473 3.013-12.866 1.884-17.116-2.726C1.291 21.372.444 13.914 3.802 8.602c2.493-4.112 7.169-6.819 11.987-6.838zm.283 1.554c-.117 0-.234.002-.351.005-6.1 0-11.691 5.049-12.346 11.114-.78 5.684 2.795 11.612 8.218 13.52 5.139 1.943 11.416.101 14.624-4.38 3.461-4.583 3.262-11.538-.596-15.831-2.36-2.747-5.924-4.423-9.549-4.428zm-.078 1.695c.078 0 .156 0 .234.003 5.4 0 10.321 4.556 10.734 9.942.563 5.13-2.958 10.364-7.971 11.678-4.832 1.41-10.457-.935-12.746-5.446-2.463-4.559-1.2-10.795 3.014-13.883a11.072 11.072 0 016.735-2.294zm-.137 3.42c-2.965.02-5.792 1.968-6.884 4.722-1.137 2.693-.509 6.007 1.536 8.096 1.988 2.14 5.263 2.929 8.007 1.926 2.875-.98 4.987-3.824 5.063-6.865.154-2.954-1.622-5.875-4.295-7.13a7.545 7.545 0 00-3.427-.75zm.27 1.381c2.708.013 5.249 2.014 5.88 4.652.704 2.576-.481 5.512-2.788 6.862-2.356 1.478-5.677 1.084-7.611-.918-2.042-1.97-2.405-5.376-.839-7.738 1.11-1.762 3.146-2.877 5.229-2.857h.13zm1.831 1.764l-2.072 3.76c-.64.068-.792 1.039-.202 1.298.39.27.696-.18 1.051-.164h3.168v-.864h-3.18l1.992-3.612-.757-.418z"}));function kH(){return kH=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",kH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.848.001C8.113-.093.931 6.281.125 13.983c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.207C29.105 4.938 23.55.48 17.367.06A16.448 16.448 0 0015.848 0v.001zm.293 1.727c7.113-.099 13.662 5.97 14.077 13.08.56 6.299-3.516 12.735-9.582 14.679-5.798 2.004-12.806-.12-16.283-5.237C.717 19.159.874 11.638 5.016 6.876 7.722 3.638 11.902 1.63 16.14 1.728zm-.415 1.555C9.157 3.258 3.256 9.156 3.278 15.729c-.16 5.965 4.365 11.725 10.293 12.737 5.409 1.065 11.37-1.744 13.775-6.753 2.534-4.986 1.386-11.627-2.953-15.251-2.364-2.077-5.512-3.27-8.667-3.18zm.507 1.692c5.82-.026 11.013 5.318 10.79 11.143-.024 5.3-4.313 10.267-9.636 10.803-5.075.667-10.426-2.588-11.885-7.553-1.535-4.744.494-10.46 4.925-12.885a11.072 11.072 0 015.806-1.508z"}));function CH(){return CH=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",sU({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M5.637 3A5.644 5.644 0 000 8.637v15.417a5.644 5.644 0 005.637 5.637h20.726A5.644 5.644 0 0032 24.054V8.637A5.644 5.644 0 0026.363 3H5.637zm0 1.778h20.726a3.83 3.83 0 013.859 3.859v15.417a3.83 3.83 0 01-3.859 3.858h-4.201V16.695H9.838v11.217H5.637a3.83 3.83 0 01-3.859-3.858V8.637a3.83 3.83 0 013.859-3.859zm5.33 13.046h10.066v10.065H10.967V17.824zm4.189 1.431V22.06H12.35v1.689h2.804V26.554h1.69V23.749h2.804V22.06h-2.804V19.255h-1.69z"}));function lU(){return lU=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",lU({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M5.636 3A5.642 5.642 0 000 8.636v15.418a5.643 5.643 0 005.636 5.636h20.728A5.643 5.643 0 0032 24.054V8.636A5.642 5.642 0 0026.364 3H5.636zm0 1.778h20.728a3.83 3.83 0 013.858 3.858v15.418a3.83 3.83 0 01-3.858 3.858h-4.203V16.723H9.84v11.189H5.636a3.83 3.83 0 01-3.858-3.858V8.636a3.83 3.83 0 013.858-3.858zm5.331 13.074h10.066v10.06H10.967v-10.06zm1.336 3.996v1.711h7.394v-1.71h-7.394z"}));function pU(){return pU=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",hV({width:"32",height:"32",xmlns:"http://www.w3.org/2000/svg"},t),L_("path",{stroke:"#000",strokeWidth:"2",fill:"none",strokeDasharray:"3.3,6",strokeLinecap:"square",d:"M1.5 30.5l29-29"})),BusinessRuleTask:({styles:e={},...t})=>L_("svg",fV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zM5.296 7.398v12.665h16.87V7.398H5.296zm.718 4.386h15.433v3.44H9.985v-3.432h-.719v3.431H6.014v-3.44zm0 4.158h3.252v3.403H6.014v-3.403zm3.97 0h11.463v3.403H9.985v-3.403z"}),L_("path",{d:"M6.079 8.209v3.587H21.44V8.209z"})),CallActivity:({styles:e={},...t})=>L_("svg",mV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M24.978 3c3.761 0 6.89 2.979 7.018 6.695l.004.238V22.4c0 3.747-3.05 6.804-6.783 6.93l-.24.003H7.023c-3.761 0-6.89-2.978-7.018-6.695L0 22.4V9.933C0 6.187 3.05 3.13 6.783 3.004L7.023 3h17.955zm0 3.667H7.022c-1.842 0-3.255 1.344-3.35 3.079l-.005.187V22.4c0 1.761 1.35 3.167 3.16 3.262l.195.005L10 25.666V15h12v10.666h2.978c1.842 0 3.255-1.344 3.35-3.079l.005-.187V9.933c0-1.761-1.35-3.166-3.16-3.261l-.195-.005zm-3.732 9.087H10.754v9.912h10.491v-9.912zm-4.475 1.817v2.658h2.658v1.542H16.77v2.658H15.23V21.77H12.57V20.23h2.658V17.57h1.542z"})),Collaboration:({styles:e={},...t})=>L_("svg",gV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("g",{fillRule:"evenodd"},L_("path",{fillRule:"nonzero",d:"M0 0v8.62h32V0H0zm1.655 7.054v-5.37h28.62v5.37H1.656zM0 23.38V32h32v-8.62H0zm1.655 7.054v-5.37h28.62v5.37H1.656z"}),L_("path",{d:"M24 8l4 7h-8l4-7zm0 2l-2.28 4h4.56L24 10zM23.5 21h1v3h-1zM23.5 15h1v3h-1zM8 24l-4-7h8l-4 7zm0-2l2.28-4H5.72L8 22zM7.5 8h1v3h-1zM7.5 14h1v3h-1z"}))),ConditionalFlow:({styles:e={},...t})=>L_("svg",yV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M32 .041S20.42 5.95 14.537 8.713c1.26 1.15 2.432 2.392 3.648 3.588-5.703 5.78-3.15 3.303-8.087 8.316l-8.472 1.377L0 32l10.006-1.626.098-.598 1.279-7.873c4.975-5.052 2.403-2.555 8.118-8.346 1.218 1.214 2.43 2.435 3.648 3.648C26.29 11.018 32 .041 32 .041zM9.603 22.397L8.54 28.91 2.03 29.97l1.061-6.515 6.512-1.058z"})),SequenceFlow:({styles:e={},...t})=>L_("svg",vV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M32 .06S20.33 6.014 14.403 8.798c1.27 1.16 2.451 2.41 3.676 3.616L0 30.734 1.325 32l18.08-18.32c1.227 1.223 2.448 2.453 3.676 3.676C26.247 11.12 32 .06 32 .06z"})),DataInput:({styles:e={},...t})=>L_("svg",wV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M20.833 0H3.488v32H28V7.36L20.833 0zm-2.105 1.818v7.507h7.454v20.857H5.306V1.818h13.422zm1.818.493l5.06 5.196h-5.06V2.311zm-9.182.86v3.744H7.081v3.222h4.283v3.743l5.7-5.354-5.7-5.354zm.808 1.868l3.711 3.487-3.71 3.487V9.329H7.888V7.723h4.283V5.039z"})),DataInputAssociation:xV,DataOutput:({styles:e={},...t})=>L_("svg",EV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M20.833 0H3.488v32H28V7.36L20.833 0zm-2.105 1.818v7.507h7.454v20.857H5.306V1.818h13.422zm1.818.493l5.06 5.196h-5.06V2.311zm-9.182.86v3.744H7.081v3.222h4.283v3.743l5.7-5.354-5.7-5.354z"})),DataOutputAssociation:xV,DataObjectReference:({styles:e={},...t})=>L_("svg",_V({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M21.345 0H4v32h24.512V7.36L21.345 0zM19.24 1.818v7.507h7.454v20.857H5.818V1.818H19.24zm1.818.493l5.06 5.196h-5.06V2.311z"})),DataStoreReference:({styles:e={},...t})=>L_("svg",OV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M16.008 1c-3.712 0-7.417.306-10.319.939-1.45.316-2.7.71-3.68 1.226C1.065 3.662.297 4.304.061 5.23a.823.823 0 00-.035.15L0 5.502l.017.084c-.012 7.41 0 14.46 0 22.08l.017.082c.203.985.995 1.656 1.975 2.172.98.517 2.23.91 3.68 1.226 2.902.633 6.607.94 10.319.94 3.711 0 7.416-.307 10.318-.94 1.451-.316 2.701-.71 3.68-1.226.98-.516 1.772-1.187 1.975-2.172l.017-.082V5.541a.825.825 0 000-.106v-.016l-.002-.013a.823.823 0 00-.046-.197c-.244-.916-1.007-1.55-1.943-2.044-.98-.516-2.23-.91-3.68-1.226C23.423 1.306 19.718 1 16.006 1zm0 1.646c3.62 0 7.245.308 9.968.901 1.36.297 2.497.67 3.263 1.074.612.323.932.643 1.063.882-.131.24-.451.56-1.063.882-.766.404-1.902.777-3.263 1.074-2.723.594-6.349.901-9.968.901-3.62 0-7.245-.307-9.968-.901-1.361-.297-2.497-.67-3.264-1.074-.611-.322-.931-.642-1.062-.882.13-.24.451-.56 1.062-.882.767-.403 1.903-.777 3.264-1.074 2.723-.593 6.348-.9 9.968-.9zM1.664 7.647c.112.067.227.132.345.194.98.517 2.23.91 3.68 1.226 2.902.633 6.607.94 10.319.94 3.711 0 7.416-.307 10.318-.94 1.451-.316 2.701-.71 3.68-1.226.119-.062.234-.127.346-.194v1.93c-.08.245-.398.619-1.113.995-.766.404-1.902.777-3.263 1.074-2.723.594-6.349.901-9.968.901-3.62 0-7.245-.307-9.968-.9-1.361-.298-2.497-.671-3.264-1.075-.714-.376-1.032-.75-1.112-.995v-1.93zm0 4.187c.112.067.227.132.345.195.98.516 2.23.91 3.68 1.226 2.902.632 6.607.938 10.319.938 3.711 0 7.416-.306 10.318-.938 1.451-.317 2.701-.71 3.68-1.226.119-.063.234-.128.346-.195v1.93c-.08.245-.398.619-1.113.995-.766.404-1.902.777-3.263 1.074-2.723.594-6.349.901-9.968.901-3.62 0-7.245-.307-9.968-.9-1.361-.298-2.497-.67-3.264-1.075-.714-.376-1.032-.75-1.112-.995v-1.93zm0 4.188c.112.067.227.131.345.194.98.516 2.23.91 3.68 1.226 2.902.633 6.607.939 10.319.939 3.711 0 7.416-.306 10.318-.94 1.451-.316 2.701-.709 3.68-1.225.119-.063.234-.127.346-.194V27.47c-.08.245-.398.618-1.113.995-.766.404-1.902.777-3.263 1.074-2.723.594-6.349.9-9.968.9-3.62 0-7.245-.306-9.968-.9-1.361-.297-2.497-.67-3.264-1.074-.714-.377-1.032-.75-1.112-.995V16.022z"})),DefaultFlow:({styles:e={},...t})=>L_("svg",PV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M32 .06S20.33 6.014 14.403 8.798c1.27 1.16 2.451 2.41 3.676 3.616L6.84 23.804H.046v1.755h5.063L0 30.735 1.325 32l6.357-6.441h7.145v-1.756H9.414l9.99-10.123c1.228 1.223 2.45 2.453 3.677 3.676C26.247 11.12 32 .06 32 .06z"})),CancelEndEvent:({styles:e={},...t})=>L_("svg",kV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm-3.955 3.918L8.94 12.072l3.985 3.985-3.913 3.913 3.048 3.047 3.913-3.913 3.987 3.987 3.096-3.096-3.987-3.987 3.913-3.913-3.047-3.048-3.913 3.913-3.985-3.985z"})),CompensateEndEvent:({styles:e={},...t})=>L_("svg",SV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm-.56 5.744l-7.407 5.23 7.408 5.234v-5.057c2.384 1.687 4.771 3.371 7.157 5.057V10.801l-7.157 5.054v-5.054z"})),ErrorEndEvent:({styles:e={},...t})=>L_("svg",CV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm6.132 4.166l-3.633 7.363-4.516-5.874-4.102 12.131 4.599-5.91 4.743 5.427 2.909-13.137z"})),EscalationEndEvent:({styles:e={},...t})=>L_("svg",TV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm.006 3.9c-1.672 4.653-2.733 9.5-4.406 14.153 1.535-1.525 2.872-3.234 4.406-4.759l4.406 4.76c-1.497-4.71-2.91-9.445-4.406-14.155z"})),LinkEndEvent:({styles:e={},...t})=>L_("svg",AV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.676 0C7.943.007.834 6.45.104 14.16c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 4.958 23.394.313 16.978.032A18.532 18.532 0 0015.676 0zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm1.78 4.065v3.555H9.779v6.713h7.994v3.554l5.828-6.91-5.828-6.912z"})),MessageEndEvent:({styles:e={},...t})=>L_("svg",MV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.676 0C7.943.007.834 6.45.104 14.16c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 4.958 23.394.313 16.978.032A18.532 18.532 0 0015.676 0zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm-5.91 5.448l6.041 4.9 6.04-4.9H10.084zm-1.34 1.137v9.92h14.513v-9.718l-7.132 5.786-7.381-5.988z"})),MultipleEndEvent:({styles:e={},...t})=>L_("svg",DV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.676 0C7.943.007.834 6.45.104 14.16c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 4.958 23.394.313 16.978.032A18.529 18.529 0 0015.676 0zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm.011 3.039l-7.619 5.53 2.91 8.95h9.418l2.91-8.95-7.619-5.53z"})),EndEvent:({styles:e={},...t})=>L_("svg",RV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.84.042C8.654-.01 1.913 5.437.4 12.454-1.057 18.62 1.554 25.495 6.784 29.09c5.076 3.636 12.31 3.92 17.59.544 5.309-3.251 8.435-9.744 7.445-15.921C30.91 7.307 25.795 1.738 19.442.422a16.064 16.064 0 00-3.602-.38zm.382 5.01c5.28-.017 10.13 4.353 10.669 9.61.687 5.025-2.552 10.281-7.423 11.792-4.754 1.617-10.486-.447-12.962-4.856-2.74-4.575-1.574-11.094 2.768-14.27a11.05 11.05 0 016.948-2.276z"})),SignalEndEvent:({styles:e={},...t})=>L_("svg",NV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm.006 3.492c-2.261 4.07-4.532 8.136-6.797 12.204h13.595L15.999 8.55z"})),TerminateEndEvent:({styles:e={},...t})=>L_("svg",$V({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm.006 2.859c-5.264-.2-9.495 5.551-7.755 10.516 1.366 5.085 8.108 7.436 12.339 4.301 4.455-2.807 4.708-9.943.462-13.058A8.128 8.128 0 0016 7.915z"})),EventSubProcess:({styles:e={},...t})=>L_("svg",jV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M7.295 4.78h1.779V3.003h-1.78V4.78zm3.558 0h1.779V3.003h-1.78V4.78zm3.557 0h1.78V3.003h-1.78V4.78zm3.558 0h1.78V3.003h-1.78V4.78zm3.558 0h1.779V3.003h-1.779V4.78zm3.558 0c.55.014 1.106-.034 1.654.045l.245-1.762c-.629-.096-1.266-.05-1.9-.061V4.78zM5.732 3.004a5.933 5.933 0 00-.915.093c.111.582.226 1.164.315 1.75.358-.101.947.098.746-.483-.096-.382.164-1.208-.146-1.36zm22.372 2.281c.427.234.812.547 1.13.915.42-.4 1.002-.777 1.33-1.18a5.863 5.863 0 00-1.593-1.289l-.867 1.554zm-25.27-1.44c-.587.354-1.11.811-1.539 1.345.47.333.96.86 1.417 1.077.299-.362.66-.673 1.065-.913-.328-.493-.55-1.055-.944-1.509zM30.515 7.26c-.563.046-.557.342-.378.784.154.25-.097.862.25.85.525-.023 1.14.043 1.612-.032a5.891 5.891 0 00-.362-2.027l-1.122.425zM.268 7.114A6.042 6.042 0 000 9.052h1.78c-.013-.5.047-1.003.208-1.478L.296 7.027l-.026.079-.002.008zM30.22 12.45H32v-1.779h-1.779v1.779zm-30.22.16h1.78v-1.779H0v1.78zm30.22 3.398H32v-1.78h-1.779v1.78zm-30.22.16h1.78v-1.779H0v1.779zm30.22 3.398H32v-1.78h-1.779v1.78zm-30.22.16h1.78v-1.78H0v1.78zm30.22 3.397H32v-1.779h-1.779v1.78zm-30.22.16h1.78v-1.778H0v1.778zm30.137 1.47a4.059 4.059 0 01-.522 1.32c.506.283 1.046.715 1.53.908a5.836 5.836 0 00.744-1.918c-.576-.094-1.209-.264-1.752-.31zm-29.984.51c.157.676.435 1.325.82 1.904l1.486-.977a4.065 4.065 0 01-.577-1.347l-1.73.42zm28.427 1.943c-.371.277-.79.49-1.234.627l.548 1.693a5.84 5.84 0 001.835-.96l-1.082-1.412-.066.05-.001.002zm-26.164 1.47c.567.413 1.21.722 1.886.907.14-.569.343-1.175.444-1.722a4.062 4.062 0 01-1.283-.624l-1.047 1.438zm3.88 1.119h1.779v-1.78h-1.78v1.78zm3.55 0h1.787v-1.78H9.846v1.78zm3.565 0h1.78v-1.78h-1.78v1.78zm3.558 0h1.78v-1.78h-1.78v1.78zm3.451 0h1.743v-1.78h-1.743v1.78zm3.665 0h1.779v-1.78h-1.78v1.78zm-1.922-.545V16.776H9.846V29.25h12.318zM10.967 17.905h10.068V27.97H10.967V17.905zm1.336 3.998v1.711h7.396v-1.711h-7.396z",opacity:".97"})),ComplexGateway:({styles:e={},...t})=>L_("svg",IV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M16.001 0a1.29 1.29 0 00-.917.373L.373 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.917.372A1.294 1.294 0 0016.002 0zM16 2.181l13.821 13.821L16 29.823 2.179 16.003 16 2.18zm-.327 6.79v.007l-.145.027-.118.08-.083.123-.028.145v4.954L11.793 10.8l-.125-.08-.14-.029-.144.027-.122.082-.46.46-.085.125-.026.142.028.14.08.125 3.505 3.505H9.347l-.001-.002-.145.032-.118.08-.083.122-.028.146v.652l.029.147.082.119.12.08.144.032h4.956L10.8 20.207v-.001l-.084.124-.026.142.028.14.08.124.46.461.126.082.14.029.143-.027.124-.084L15.3 17.69v4.964-.001l.028.147.082.12.12.08.144.031h.652l.148-.03.118-.08.083-.12.028-.146v-4.962l3.505 3.505.126.082.14.027.142-.027.124-.084.461-.46.083-.123s.028-.144.027-.146l-.028-.14-.082-.126-3.496-3.496h4.948l.148-.03.119-.08.082-.12.028-.147v-.652l-.028-.145-.083-.122-.119-.08s-.147-.033-.147-.031h-4.964l3.512-3.512.082-.122.029-.144-.028-.14-.084-.124-.46-.461-.123-.082-.14-.027-.145.027-.122.082-3.507 3.507V9.348l-.028-.146-.082-.122-.12-.08-.147-.029h-.652z"})),EventBasedGateway:({styles:e={},...t})=>L_("svg",LV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M16 0a1.29 1.29 0 00-.918.373L.371 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.915.372A1.294 1.294 0 0016 0zm-.002 2.181l13.821 13.821-13.821 13.821-13.821-13.82L15.998 2.18zm0 5.876l-.254.185-7.377 5.355 2.915 8.964h9.433l2.915-8.964-7.631-5.54zm0 1.07l6.614 4.8-2.526 7.769h-8.175l-2.526-7.768 6.614-4.802z"})),ExclusiveGateway:({styles:e={},...t})=>L_("svg",FV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M16 0a1.29 1.29 0 00-.918.373L.371 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.915.372A1.294 1.294 0 0016 0zm-.002 2.181l13.821 13.821-13.821 13.821-13.821-13.82L15.998 2.18zm-5.162 7.69l-.166.032-.141.096-.532.532s-.097.142-.097.144l-.03.164.032.162.093.144 4.857 4.858-4.855 4.855v-.001L9.9 21l-.03.164.032.162s.093.142.093.144l.531.532.146.095.162.032.164-.03.144-.097 4.855-4.856 4.857 4.857.145.095.162.032.164-.03.144-.097.531-.532.095-.14.033-.168-.033-.162-.095-.146L17.144 16 22 11.144l.095-.14.033-.166-.033-.163-.097-.144-.532-.532-.14-.095-.163-.032-.166.032-.141.095L16 14.855l-4.858-4.858v-.002l-.144-.092-.162-.032z"})),Gateway:({styles:e={},...t})=>L_("svg",BV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M.373 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.917.373a1.313 1.313 0 00-1.833 0L.373 15.084zm1.806.918L16 2.182l13.821 13.82L16 29.823 2.179 16.003z"})),InclusiveGateway:({styles:e={},...t})=>L_("svg",qV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M16.001 0a1.29 1.29 0 00-.917.373L.373 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.917.372A1.294 1.294 0 0016.002 0zM16 2.181l13.821 13.821L16 29.823 2.179 16.003 16 2.18zm0 6.379a7.447 7.447 0 00-7.44 7.441A7.447 7.447 0 0016 23.443 7.447 7.447 0 0023.443 16a7.447 7.447 0 00-7.441-7.441zm0 .825a6.61 6.61 0 016.617 6.616A6.61 6.61 0 0116 22.618 6.61 6.61 0 019.385 16 6.61 6.61 0 0116 9.385z"})),ParallelGateway:({styles:e={},...t})=>L_("svg",zV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M16.001 0a1.29 1.29 0 00-.917.373L.373 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.917.372A1.294 1.294 0 0016.002 0zM16 2.181l13.821 13.821L16 29.823 2.179 16.003 16 2.18zm-.377 5.708l-.168.032-.136.092-.096.14-.032.168v6.868h-6.87l-.002-.002-.166.037-.137.092v-.002l-.095.141-.033.167v.753s.032.169.034.17l.094.138.138.092.167.036h6.87v6.867l-.001-.001.033.17.095.138.138.092s.166.035.167.037h.752l.17-.036.137-.092.095-.137.033-.17v-6.867h6.868l.17-.035.137-.092.095-.137.033-.17v-.753s-.033-.165-.032-.167l-.096-.14-.138-.093s-.17-.037-.17-.035H16.81V8.323l-.033-.168-.094-.14-.138-.092-.17-.034h-.752z"})),Group:({styles:e={},...t})=>L_("svg",VV({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M6.34.016c-2.333.025-4.684 1.77-5.29 4.17C.608 5.848.88 7.608.804 9.314v2.922h2.041c.038-2.332-.076-4.673.062-7C3.14 3.355 4.869 1.938 6.643 2.04h8.956V.009c-3.086 0-6.173-.02-9.258 0v.007zm13.094 2.023h1.92V.009h-1.92v2.03zm5.756 0c1.265-.069 2.66.045 3.602 1.055 1.036.983 1.201 2.523 1.122 3.91v6.313h2.078c-.03-2.677.062-5.36-.047-8.032-.17-2.743-2.62-5.111-5.215-5.236-.511-.064-1.027-.02-1.54-.033v2.023zM.803 18.319h2.041v-2.026H.804v2.026zm29.11 1.084h2.08v-2.03h-2.08v2.03zM.804 26.148c.004 2.218 1.393 4.366 3.313 5.28 1.728.853 3.681.448 5.521.544.43-.112 1.29.231 1.435-.183v-1.847c-1.788-.043-3.584.094-5.365-.082-1.67-.354-2.919-2.048-2.863-3.844v-3.644H.804v3.777zm29.11-.068c.04 1.961-1.508 3.787-3.381 3.842-1.954.06-3.914.02-5.87.026v2.03c2.118-.042 4.242.08 6.355-.063 2.524-.264 4.818-2.644 4.94-5.323.08-1.039.014-2.085.035-3.126h-2.078v2.613zm-15.006 5.898h1.92v-2.03h-1.92v2.03z"})),CancelIntermediateCatchEvent:UV,CompensateIntermediateCatchEvent:GV,ConditionalIntermediateCatchEvent:XV,ErrorIntermediateCatchEvent:YV,EscalationIntermediateCatchEvent:JV,LinkIntermediateCatchEvent:tH,MessageIntermediateCatchEvent:iH,MultipleIntermediateCatchEvent:oH,ConditionalIntermediateCatchEventNonInterrupting:aH,EscalationIntermediateCatchEventNonInterrupting:cH,MessageIntermediateCatchEventNonInterrupting:uH,MultipleIntermediateCatchEventNonInterrupting:hH,ParallelIntermediateCatchEventNonInterrupting:mH,SignalIntermediateCatchEventNonInterrupting:yH,TimerIntermediateCatchEventNonInterrupting:bH,ParallelMultipleIntermediateCatchEvent:wH,SignalIntermediateCatchEvent:EH,TimerIntermediateCatchEvent:PH,IntermediateThrowEvent:SH,CompensateIntermediateThrowEvent:({styles:e={},...t})=>L_("svg",CH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm-.56 5.772l-7.408 5.231 7.409 5.234v-5.057c2.385 1.687 4.771 3.371 7.157 5.057V10.747l-7.157 5.055v-5.055z"})),EscalationIntermediateThrowEvent:({styles:e={},...t})=>L_("svg",TH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm.006 3.927c-1.672 4.654-2.734 9.502-4.406 14.155 1.534-1.525 2.872-3.234 4.406-4.759l4.406 4.76c-1.496-4.71-2.91-9.446-4.406-14.156z"})),LinkIntermediateThrowEvent:({styles:e={},...t})=>L_("svg",AH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm1.78 4.093v3.555H9.785v6.714h7.994v3.554l5.829-6.911-5.83-6.912z"})),MessageIntermediateThrowEvent:({styles:e={},...t})=>L_("svg",MH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm-5.91 5.475l6.04 4.901 6.042-4.9H10.088zm-1.341 1.138v9.921h14.514V11.79l-7.132 5.787-7.382-5.99z"})),MultipleIntermediateThrowEvent:({styles:e={},...t})=>L_("svg",DH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm.006 3.073l-7.62 5.532 2.91 8.95h9.42l2.91-8.95-7.62-5.532z"})),SignalIntermediateThrowEvent:({styles:e={},...t})=>L_("svg",RH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm.006 3.52c-2.261 4.07-4.533 8.136-6.798 12.205h13.596L16.005 8.495z"})),Lane:({styles:e={},...t})=>L_("svg",NH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M0 7v18.62h32V7H0zm1.655 17.056V8.684h28.62v15.372H1.656z"})),ManualTask:({styles:e={},...t})=>L_("svg",$H({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zm4.43 1.328c-.222.005-.43.09-.606.203-.985.638-4.356 2.977-5.096 3.486-.67.46-1.12 1.153-1.38 1.974-.27.858-.235 1.793-.232 2.576.002.59.016 1.104.17 1.727.22.908.634 1.63 1.23 2.118.597.49 1.363.732 2.23.734 3.038.012 6.078.016 9.119 0 .327-.002.645-.127.848-.37.204-.241.287-.56.291-.914a1.732 1.732 0 00-.097-.625h.327c.335 0 .641-.11.852-.316.21-.206.317-.475.374-.754a1.783 1.783 0 00-.126-1.143 1.18 1.18 0 00.877-.521c.196-.306.257-.666.258-1.025.001-.375-.088-.738-.293-1.033a1.179 1.179 0 00-.958-.512h-.478c.108-.237.156-.505.155-.782-.003-.373-.098-.721-.316-.99a1.21 1.21 0 00-.943-.43c-2.273-.004-4.236.018-6.412.012l-.19-.001c.102-.104.202-.205.312-.314.337-.336.662-.652.83-.869.4-.516.46-1.215.123-1.729-.178-.272-.439-.456-.72-.494a.93.93 0 00-.148-.008zm.029.728l.022.001c.055.008.115.027.209.172.132.201.126.606-.09.884-.079.102-.431.465-.767.8-.337.334-.657.643-.815.836-.153.186-.096.338-.056.435.04.096.085.212.298.263.063.014.066.01.086.012l.066.003c2.429.027 4.986-.004 7.223-.003.194 0 .293.056.379.162.086.105.151.286.153.533 0 .257-.065.467-.155.59-.09.124-.183.182-.37.183-1.706-.001-3.411-.005-5.117-.009v.731c2.23.004 4.461.01 6.692.012.17 0 .265.06.361.2.096.138.164.364.163.615 0 .268-.058.501-.143.634-.085.132-.162.193-.385.195-2.32-.001-4.554-.006-6.688-.003v.73c1.905 0 3.809.003 5.713.001.194.005.316.09.416.26.102.173.151.442.093.728-.04.193-.102.313-.17.38-.067.065-.148.108-.343.108h-5.71l.002.734c1.445 0 2.89-.01 4.334-.001.162 0 .232.041.297.123.064.081.123.238.12.488-.003.244-.061.385-.12.455-.06.07-.127.11-.296.11-3.037.016-6.076.012-9.113 0-.735-.002-1.316-.196-1.77-.568-.454-.372-.793-.935-.986-1.728-.134-.546-.146-.978-.148-1.558-.003-.796-.018-1.664.199-2.354.222-.705.582-1.24 1.096-1.593.75-.515 4.14-2.866 5.079-3.474a.504.504 0 01.241-.087z"})),MessageFlow:({styles:e={},...t})=>L_("svg",jH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M4.073 26.607l1.295 1.296L1.325 32l-.662-.633L0 30.735l4.073-4.128zm6.953-7.046l1.296 1.296L1.325 32l7.555-7.656-1.295-1.296 1.455-1.474 1.986-2.013zM32 .06s-2.699 5.189-5.417 10.462l-.326.633c-1.14 2.214-2.265 4.407-3.176 6.2-1.228-1.222-2.449-2.452-3.676-3.675l-3.57 3.618-1.297-1.296 3.541-3.588c-.98-.964-1.932-1.958-2.923-2.91l-.753-.706c2.68-1.258 6.533-3.165 9.95-4.876l.617-.309C28.838 1.673 32 .06 32 .06zm-4.126 4.06l-.015.007-.115.057-.048.024-.115.057L17.7 9.172l5.017 4.948 5.157-10z"})),Participant:({styles:e={},...t})=>L_("svg",IH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M0 5v22.069h32V5H0zm30.276 1.684v18.82H6.62V6.684h23.655zm-28.62 0h3.31v18.82h-3.31V6.684z"})),Process:({styles:e={},...t})=>L_("svg",LH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{fillRule:"evenodd",d:"M16.177 0l.137.002c.452.009.9.037 1.342.082.346.036.62.303.68.646l.437 2.536c.055.319.296.57.608.655.986.269 1.923.653 2.796 1.14.28.155.624.145.885-.039l2.083-1.47a.775.775 0 01.937.022c.86.699 1.645 1.484 2.343 2.343.22.27.223.653.023.937l-1.439 2.038a.833.833 0 00-.031.896c.512.889.92 1.846 1.204 2.855a.833.833 0 00.653.601l2.435.42c.342.059.61.333.645.679a15.928 15.928 0 01.08 2.064l-.003.114c-.012.382-.038.76-.077 1.134a.775.775 0 01-.645.68l-2.396.412a.835.835 0 00-.656.61 12.511 12.511 0 01-1.2 2.917.832.832 0 00.034.892l1.396 1.978c.2.284.196.667-.023.936a16.104 16.104 0 01-2.343 2.343.775.775 0 01-.937.023l-1.99-1.404a.833.833 0 00-.88-.026c-.907.516-1.886.922-2.916 1.2a.833.833 0 00-.61.656l-.414 2.396a.775.775 0 01-.679.646 16.096 16.096 0 01-3.312 0 .775.775 0 01-.679-.646l-.423-2.452a.834.834 0 00-.598-.636 12.474 12.474 0 01-1.468-.514 12.49 12.49 0 01-1.417-.68.833.833 0 00-.878.03l-2.026 1.43a.775.775 0 01-.937-.023 16.069 16.069 0 01-2.342-2.342.774.774 0 01-.024-.936l1.402-1.986a.833.833 0 00.032-.896 12.507 12.507 0 01-1.214-2.911.833.833 0 00-.655-.606l-2.386-.412a.775.775 0 01-.646-.678 16.097 16.097 0 010-3.314.775.775 0 01.646-.678l2.386-.412a.833.833 0 00.655-.606 12.507 12.507 0 011.214-2.911.833.833 0 00-.032-.896L3.552 6.853a.774.774 0 01.023-.936 16.091 16.091 0 012.343-2.343.775.775 0 01.937-.023l2.03 1.433c.26.177.6.182.874.028.915-.512 1.88-.9 2.87-1.167a.833.833 0 00.612-.656l.424-2.46a.775.775 0 01.679-.645C14.845.032 15.348.004 15.85 0h.326zM16 6.4c-5.302 0-9.6 4.297-9.6 9.599 0 5.302 4.298 9.6 9.6 9.6s9.6-4.298 9.6-9.6-4.298-9.6-9.6-9.6zm-3 4.283c0-1.425 1.637-2.203 2.715-1.29l5.69 4.815c.794.672.794 1.91 0 2.583l-5.69 4.815c-1.078.913-2.715.134-2.715-1.29z"})),ReceiveTask:({styles:e={},...t})=>L_("svg",BH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zM5.23 7.764v11.577h17.55V7.764H5.23zm1.816.758h13.917l-6.959 4.577-6.958-4.577zm-1.06.21l8.018 5.274 8.018-5.275v9.853H5.987V8.73z"})),ScriptTask:({styles:e={},...t})=>L_("svg",qH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zm2.99 3.077l-.077.045-.026.015c-1.09.646-1.84 1.239-2.336 1.818-.496.579-.735 1.162-.742 1.725-.014 1.119.812 1.958 1.544 2.708.732.75 1.385 1.456 1.446 2.041.032.298-.039.598-.364 1.008-.324.408-.911.897-1.85 1.445l-1.388.808h8.56l.101-.059c.996-.58 1.667-1.116 2.094-1.655.429-.54.603-1.107.547-1.638-.11-1.052-.967-1.818-1.688-2.556-.721-.739-1.306-1.436-1.298-2.092.004-.331.132-.7.535-1.171.402-.47 1.08-1.02 2.119-1.636l1.362-.806h-8.54zm.241.867h5.271a6.83 6.83 0 00-1.113 1.01c-.496.58-.736 1.163-.743 1.726-.014 1.119.812 1.958 1.544 2.708.732.75 1.385 1.456 1.446 2.041.032.298-.039.598-.364 1.008-.312.393-.872.862-1.753 1.386H8.728c.367-.286.658-.566.88-.847.43-.54.604-1.107.548-1.638-.11-1.052-.968-1.818-1.688-2.556-.721-.739-1.306-1.435-1.298-2.092.004-.331.132-.7.534-1.171.389-.454 1.04-.984 2.021-1.575zm-1.233 1.48v.4h4.12v-.4h-4.12zm-.154 2.158v.4H12.6v-.4H8.34zm1.931 2.158v.4h4.126v-.4H10.27zm.59 2.158v.4h4.276v-.4h-4.276z"})),SendTask:({styles:e={},...t})=>L_("svg",zH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zm-1.38 3.16l8.332 4.717L21.78 8.16H5.114zm.021 1.745v9.309H21.8V9.905l-8.353 4.655-8.31-4.655z"})),ServiceTask:({styles:e={},...t})=>L_("svg",FH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zm1.22 1.681V7.84c-.329.093-.63.223-.914.382l-.83-.82-1.554 1.561.83.82c-.16.288-.285.594-.372.911l-1.177.002v2.2l1.189-.004c.109.431.345.819.58 1.165v-1.898l-1.038.004v-.737l1.034-.002.058-.294c.084-.429.252-.838.493-1.203l.165-.25-.727-.718.523-.526.728.719.247-.165c.379-.25.793-.417 1.206-.505l.291-.06-.002-1.01h.75L9.19 8.417H11.16c-.185-.221-.951-.508-1.237-.588L9.93 6.68H7.713zm2.078 2.105l.003 1.158a4.19 4.19 0 00-.915.383l-.83-.821-1.553 1.562.83.82c-.16.288-.286.593-.373.91l-1.176.003v2.2l1.188-.004c.094.326.224.624.383.905l-.85.847 1.57 1.543.847-.843c.29.161.599.286.919.373v1.198c.756.006 1.56.003 2.206.003V17.81a4.19 4.19 0 00.915-.383l.847.835 1.554-1.56-.848-.836c.16-.288.286-.594.373-.912l1.152-.007V12.75l-1.165.007a4.09 4.09 0 00-.382-.905l.805-.807-1.57-1.546-.804.806a4.16 4.16 0 00-.915-.372l.007-1.147H9.792zm.732.73h.751l-.006 1.005.297.058c.43.085.844.252 1.21.492l.25.162.701-.704.528.52-.702.704.169.25c.248.374.412.779.505 1.196l.061.292 1.016-.006v.737l-1.01.006-.058.292c-.085.43-.252.838-.494 1.205l-.165.25.744.733-.523.525-.743-.734-.248.165c-.378.247-.789.418-1.203.503l-.294.058v1.067h-.745v-1.059l-.295-.057a3.395 3.395 0 01-1.21-.492l-.248-.162-.747.743-.528-.52.747-.744-.17-.25a3.546 3.546 0 01-.506-1.196l-.06-.291-1.04.004v-.738l1.034-.002.058-.294c.085-.428.252-.837.493-1.203l.165-.25-.726-.718.522-.526.728.72.248-.166a3.546 3.546 0 011.205-.504l.292-.06-.003-1.01zm.388 2.685a1.65 1.65 0 00-1.645 1.645c0 .904.74 1.645 1.645 1.645a1.65 1.65 0 001.645-1.645 1.65 1.65 0 00-1.645-1.645zm0 .73a.91.91 0 01.915.915.91.91 0 01-.915.914.91.91 0 01-.915-.914.91.91 0 01.915-.915z"})),CompensateStartEvent:({styles:e={},...t})=>L_("svg",VH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.995.001C9.705-.084 3.643 3.964 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994 0zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626C2.101 23.171.377 16.07 2.848 10.44c2.14-5.205 7.515-8.774 13.147-8.708zm-.566 9.03l-7.415 5.235 7.415 5.238v-5.062c2.386 1.689 4.775 3.375 7.163 5.062V10.761l-7.163 5.058v-5.058zm-.866 1.666v7.13L9.51 15.993l5.052-3.565zm7.166 0v7.137l-5.052-3.568 5.052-3.569z"})),ConditionalStartEvent:({styles:e={},...t})=>L_("svg",HH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M16 0C7.174 0 0 7.174 0 16s7.174 16 16 16 16-7.174 16-16S24.826 0 16 0zm0 1.73c7.892 0 14.27 6.378 14.27 14.27 0 7.891-6.379 14.27-14.27 14.27S1.73 23.891 1.73 16C1.73 8.108 8.108 1.73 16 1.73zm-5.362 7.523v13.493h10.724V9.253H10.638zm.863.866h8.995V21.88H11.501V10.12zm.928 1.324v.863h7.139v-.863h-7.139zm0 2.605v.867h7.139v-.867h-7.139zm0 3.01v.864h7.139v-.863h-7.139zm0 2.72v.863h7.139v-.863h-7.139z"})),ErrorStartEvent:({styles:e={},...t})=>L_("svg",UH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.995.005C9.705-.08 3.643 3.968 1.257 9.78-1.235 15.49.06 22.581 4.42 27.034c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994.005zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626-4.814-3.838-6.538-10.939-4.067-16.57 2.14-5.205 7.515-8.774 13.147-8.708zm6.13 7.45l-3.635 7.37-4.52-5.88c-1.37 4.048-2.738 8.095-4.106 12.143l4.603-5.917 4.748 5.433 2.91-13.149zm-7.754 3.889l4.299 5.449 1.073-2.39-1.028 4.135-4.387-5.16-1.78 2.75 1.823-4.784z"})),EscalationStartEvent:({styles:e={},...t})=>L_("svg",WH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.995.001C9.705-.084 3.643 3.964 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994 0zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626C2.101 23.171.377 16.07 2.848 10.44c2.14-5.205 7.515-8.774 13.147-8.708zm0 7.183c-1.674 4.658-2.736 9.509-4.41 14.166 1.535-1.526 2.874-3.236 4.41-4.763l4.41 4.763c-1.499-4.713-2.913-9.453-4.41-14.166zm.032 2.931c.822 2.588 1.598 5.19 2.42 7.778l-2.42-2.615c-.683.598-2.455 2.887-2.34 2.39.871-2.489 1.448-5.07 2.34-7.553z"})),MessageStartEvent:({styles:e={},...t})=>L_("svg",GH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.995.001C9.705-.084 3.643 3.964 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994 0zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626C2.101 23.171.377 16.07 2.848 10.44c2.14-5.205 7.515-8.774 13.147-8.708zm-7.257 8.732v11.069h14.513v-11.07H8.738zm3.224 1.73h8.064c-1.428.878-2.857 2.807-4.285 3.018l-3.779-3.019zm9.562 1.017v6.593H10.465V13.21l5.528 4.417 5.53-4.418z"})),MultipleStartEvent:({styles:e={},...t})=>L_("svg",QH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.995.001C9.705-.084 3.643 3.964 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994 0zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626C2.101 23.171.377 16.07 2.848 10.44c2.14-5.205 7.515-8.774 13.147-8.708zm0 6.328l-7.626 5.536c.97 2.986 1.942 5.971 2.913 8.957h9.426l2.912-8.957-7.625-5.536zm0 1.068l6.609 4.798-2.525 7.763H11.91l-2.524-7.763 6.609-4.798z"})),ConditionalStartEventNonInterrupting:({styles:e={},...t})=>L_("svg",XH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M10.632 9.189V22.68h10.723V9.189H10.632zm.862.865h8.994v11.76H11.494v-11.76zm.928 1.324v.863h7.138v-.863h-7.138zm0 2.605v.866h7.138v-.866h-7.138zm0 3.01v.863h7.138v-.863h-7.138zm0 2.72v.862h7.138v-.863h-7.138zM16.12 0h-.232l-.22.004h-.012l-.221.006h-.012l-.22.01h-.012l-.22.013h-.012l-.22.016h-.012l-.22.019h-.005l-.006.001-.22.021h-.006l-.005.001-.22.025h-.011l-.22.028h-.005l-.006.002-.219.03h-.005l-.006.001-.218.033-.006.001-.006.001-.217.036-.006.001-.006.001-.217.039-.006.001-.006.001-.216.042-.006.001-.006.001-.215.045-.006.001-.006.002-.215.047-.006.002-.006.001-.214.05-.006.002-.006.002-.115.029-.152.053-.14.081-.122.106-.1.126-.075.143-.047.154-.018.16.012.16.042.156.07.145.095.13.118.11.137.086.15.059.158.03h.161l.132-.022.11-.028.202-.047.203-.046.208-.043.202-.039.206-.037.206-.034.205-.03.208-.03.205-.025.209-.023.208-.02.21-.017.209-.015.207-.011.21-.009.21-.006.207-.003h.21l.21.002.207.005.207.008.212.011.207.014.208.017.209.019.208.022.205.025.206.028.207.03.208.035.205.036.202.039.052.01.16.018.16-.012.156-.042.146-.07.13-.096.109-.119.085-.136.06-.15.03-.159v-.16l-.03-.16-.059-.15-.086-.136-.109-.118-.13-.096-.145-.07-.128-.038-.057-.011-.006-.002h-.006l-.216-.042-.006-.001-.006-.001-.217-.039H18.9l-.006-.002-.217-.035-.006-.001-.006-.001-.218-.032-.006-.001-.006-.001-.218-.03h-.006l-.006-.001-.219-.027h-.011l-.22-.024-.005-.001h-.006l-.22-.021h-.006l-.006-.001-.22-.017-.005-.001h-.006L17.06.03h-.012l-.22-.012h-.012l-.22-.01h-.012l-.22-.005h-.012L16.132 0h-.012zm8.715 2.783l-.157.034-.149.063-.134.089-.116.112-.092.132-.067.147-.038.157-.008.16.021.16.051.153.079.141.103.124.102.087.052.038h.001l.087.064v.001l.082.061.002.001.076.059h.001l.084.065.082.066.002.001.079.063.002.002.077.063.081.067.002.002.077.065.076.065.001.002.08.07.078.07h.002l.075.068.077.072.002.001.073.069.077.073.072.07.002.001.077.076.07.07v.001l.075.076.07.073.002.001.074.079.002.002.069.074.069.075.074.082.07.08.002.001.068.079h.001l.067.079.068.082.065.078.001.002.068.083.067.084.063.081.001.002.067.087.002.002.063.084.001.001.064.087.008.01.008.01.095.12.093.121.09.119.087.119.088.122.086.123.084.12.081.122.001.002.084.126.08.126.08.127.077.126.079.131.074.127.075.131.073.131.07.13.07.133.069.133.045.09.086.137.109.119.13.096.144.07.156.042.16.013.16-.017.155-.047.143-.075.126-.1.106-.121.082-.14.054-.151.025-.16-.005-.16-.035-.158-.05-.124-.048-.095-.002-.004-.002-.004-.073-.14-.002-.005-.002-.004-.074-.14-.002-.004-.002-.004-.076-.14-.002-.003-.002-.004-.077-.139-.003-.004-.002-.004-.078-.138-.003-.004-.002-.003-.08-.137-.002-.004-.003-.004-.081-.136-.002-.004-.003-.004-.083-.136-.002-.003-.002-.004-.085-.135-.002-.004-.003-.003-.085-.134-.003-.004-.002-.004-.087-.132-.003-.004-.003-.004-.088-.132-.003-.003-.002-.004-.09-.13-.003-.005-.003-.003-.091-.13-.003-.004-.002-.004-.093-.129-.003-.003-.003-.004-.094-.128-.003-.004-.003-.003-.095-.127-.003-.004-.003-.004-.097-.125-.003-.004-.003-.004-.09-.114-.06-.082-.003-.003-.002-.003-.069-.091-.002-.004-.002-.003-.07-.09-.003-.003-.002-.003-.07-.09-.003-.003-.002-.003-.071-.09-.002-.003-.003-.002-.072-.089-.002-.003-.002-.003-.073-.088-.002-.003-.002-.002-.074-.087-.002-.003-.002-.003-.074-.086-.003-.003-.002-.003-.074-.086-.003-.002-.002-.003-.075-.085-.003-.003-.002-.002-.076-.084-.002-.003-.003-.003-.076-.083-.002-.003-.003-.003-.077-.082-.002-.003-.003-.002-.077-.082-.003-.003-.003-.002-.078-.081-.002-.003-.003-.003-.078-.08-.003-.002-.003-.003-.079-.08-.002-.002-.003-.002-.08-.08-.002-.002-.003-.002-.08-.078-.003-.003-.003-.002-.08-.077-.003-.003-.003-.002-.082-.077-.002-.002-.003-.002-.082-.076-.003-.002-.002-.003-.083-.075-.003-.002-.002-.003-.084-.074-.002-.002-.003-.002-.084-.074-.003-.002-.002-.002-.085-.073-.002-.002-.003-.003-.085-.071-.003-.003-.002-.002-.086-.07-.003-.003-.002-.002-.086-.07-.003-.003-.003-.002-.086-.07-.003-.002-.003-.002-.087-.069-.002-.002-.003-.002-.088-.068-.002-.002-.003-.002-.088-.067-.003-.003-.003-.002-.088-.066-.003-.002-.003-.002-.089-.066-.003-.002-.003-.002-.057-.042-.14-.082-.15-.055-.16-.026-.16.004zM6.377 3.21l-.157.037-.148.066-.111.074-.007.006-.003.002-.003.002-.086.069-.003.002-.002.002-.086.07-.003.002-.002.002-.086.07-.002.003-.003.002-.085.071-.002.002-.003.003-.084.071-.003.003-.002.002-.084.072-.003.003-.002.002-.083.073-.003.003-.002.002-.083.074-.002.002-.003.003-.082.074-.003.003-.002.002-.081.076-.003.002-.003.002-.08.077-.003.002-.003.003-.08.076-.002.003-.003.002-.08.078-.002.002-.003.003-.079.078-.002.003-.003.002-.078.08-.003.002-.002.002-.078.08-.002.003-.003.002-.077.08-.003.004-.002.002-.077.081-.002.003-.003.003-.076.082-.002.002-.003.003-.075.082-.002.003-.003.003-.074.083-.003.003-.002.003-.074.084-.003.003-.002.002-.074.085-.002.003-.002.003-.073.085-.003.003-.002.003-.072.086-.002.003-.003.003-.071.087-.003.003-.002.002-.07.088-.003.003-.002.003-.07.088-.003.003-.002.003-.07.09-.002.002-.002.003-.069.09-.002.003-.003.003-.068.09-.002.003-.002.003-.067.092-.003.003-.002.003-.067.092-.002.003-.002.003-.066.092-.002.003-.002.004-.066.093-.002.003-.002.003-.065.094-.002.003-.002.004-.064.094-.002.003-.002.004-.063.095-.002.003-.002.003-.063.097-.002.003-.002.003-.046.073-.05.07-.003.002-.002.003-.067.093-.003.003-.002.003-.066.094-.002.003-.002.003-.066.094-.002.003-.002.003-.064.094-.002.004-.002.003-.064.094-.002.004-.002.003-.062.095-.002.003-.002.003-.062.096-.002.003-.002.003-.06.096-.003.003-.002.003-.06.096-.001.004-.002.003-.059.096-.002.004-.002.003-.058.097-.002.003-.001.003-.057.098-.002.003-.002.003-.056.098-.002.003-.002.003-.055.098-.002.004-.001.003-.055.098-.001.004-.002.003-.054.099-.001.003-.002.003-.052.1-.002.002-.002.004-.051.1-.002.002-.002.004-.05.1-.002.003-.002.003-.05.1v.003l-.002.004-.05.1v.003l-.002.004-.048.1-.002.004-.001.003-.047.101-.002.003-.001.004-.013.027-.052.152-.024.16.006.16.037.157.064.148.091.133.114.114.134.09.147.065.157.036.162.006.159-.024.152-.053.14-.08.122-.105.1-.126.066-.117.01-.023.044-.095.045-.095.002-.003.042-.087.048-.097.048-.095v-.001l.048-.092.001-.001.047-.09.05-.093.002-.002.049-.09.052-.092.001-.002.051-.089.001-.002.051-.087.053-.088.001-.002.055-.091.057-.091.057-.09.001-.002.057-.089.055-.083.001-.002.06-.09.06-.088.062-.089.001-.001.06-.084.063-.088.065-.089.017-.023.016-.025.06-.094.059-.09v-.002l.058-.086.057-.086.001-.001.062-.09.062-.088.001-.002.06-.085.002-.002.06-.082.063-.087.064-.084.002-.002.061-.08.065-.084.064-.08v-.001l.067-.083.067-.082.07-.083.069-.08.063-.074.074-.083.068-.077.002-.002.07-.076.07-.075.072-.077.001-.001.067-.07.076-.078.002-.002.07-.07.075-.075.002-.002.072-.07.075-.072.002-.002.073-.069.074-.068.001-.001.08-.073.076-.068.002-.002.072-.063v-.001l.078-.067.079-.068.002-.001.08-.068.002-.002.077-.063.082-.066.001-.001.075-.06.002-.002.006-.004.117-.111.094-.131.068-.146.04-.156.01-.161-.019-.16-.049-.154-.076-.141-.102-.125-.123-.105-.14-.079-.153-.052-.16-.023-.16.007zm24.596 11.088l-.156.04-.146.067-.131.094-.112.117-.087.135-.061.15-.033.157-.004.134.007.142.005.152.004.15.002.149v.153l.001.011v.015l.004.11.002.11v.002l.002.106v.321l-.003.102-.002.106-.004.107-.005.105-.006.106-.006.106-.008.106v.002l-.008.103v.002l-.01.1-.01.105-.01.105-.013.105-.012.099v.002l-.014.108-.014.1-.016.105-.016.103v.002l-.017.099-.018.104-.019.103v.002l-.019.097-.02.104-.022.103v.001l-.022.098-.023.103v.002l-.024.096-.025.103v.002l-.024.096-.027.102v.003l-.026.093v.001l-.029.103v.002l-.03.099-.028.097v.002l-.03.095-.03.096v.001l-.033.1-.031.095v.002l-.035.1v.003l-.034.094v.003l-.035.096v.001l-.034.09v.002l-.038.098-.036.093v.002l-.038.095-.079.194-.08.188-.085.189-.087.19-.09.184-.092.183-.095.184-.05.093-.064.148-.034.158-.005.16.026.16.054.151.082.14.106.12.127.1.143.075.154.046.16.017.161-.013.156-.042.144-.071.13-.096.109-.119.072-.112.053-.099.003-.005.003-.006.102-.195.003-.006.003-.006.098-.196.003-.006.003-.006.096-.197.002-.006.003-.006.093-.2.002-.006.003-.006.09-.2.002-.006.003-.007.086-.202.003-.006.002-.006.084-.203.002-.005.001-.005.04-.102.002-.003.001-.003.04-.103.001-.003.001-.003.04-.103v-.004l.001-.003.039-.103v-.003l.002-.003.037-.104.001-.003.001-.003.037-.104v-.004l.002-.003.035-.104.002-.003v-.004l.035-.104.002-.004v-.003l.034-.105.002-.003v-.003l.034-.105v-.004l.002-.003.032-.106.001-.003.001-.003.031-.106.001-.003.001-.004.031-.106.001-.003.001-.004.03-.106v-.003l.002-.004.028-.107.001-.003.001-.003.028-.107.001-.004.001-.003.027-.107.001-.004v-.003l.027-.108.001-.003v-.004l.026-.108.001-.003v-.004l.025-.108.001-.003v-.004l.025-.108v-.004l.001-.003.023-.109v-.003l.001-.004.022-.109v-.003l.002-.004.02-.109.001-.004v-.003l.02-.11.002-.003v-.004l.02-.11v-.007l.019-.11v-.003l.001-.004.017-.11v-.004l.001-.003.017-.11v-.008l.016-.11v-.004l.001-.004.015-.11v-.008l.015-.111v-.008l.013-.111v-.007l.013-.112v-.007l.011-.112v-.004l.001-.004.01-.112v-.007l.01-.112v-.008l.008-.112v-.008l.007-.113v-.007l.007-.113v-.008l.005-.113v-.007l.005-.114v-.007l.003-.114v-.007l.003-.114v-.129l.001-.114v-.13l-.003-.114v-.008l-.003-.115v-.007l-.003-.102v-.155l-.003-.158v-.01l-.004-.158v-.01l-.006-.158v-.01l-.007-.148-.023-.16-.051-.152-.08-.14-.103-.124-.125-.102-.142-.077-.153-.05-.16-.02-.161.01zm-30.213.66l-.157.034-.149.063-.134.09-.115.113-.092.132-.067.147-.037.156-.009.134.001.11V15.95l.006.22v.012l.01.22v.012l.012.22v.006l.001.006.015.22v.005l.001.006.018.22.001.006v.006l.022.219v.006l.001.006.024.219.001.006v.006l.028.218.001.006v.006l.031.218.001.006.001.006.033.218.001.006.001.005.037.218v.006l.002.005.04.217v.006l.001.006.043.216.001.006.001.006.046.216v.005l.002.006.048.215.002.006.001.006.051.214.002.006v.006l.055.214.002.005.001.006.057.213.002.006.001.005.06.213.002.005.001.006.063.212.002.005.001.006.066.21.002.006.002.006.068.21.002.005.002.005.07.21.003.005.002.005.074.208.002.006.002.005.077.207.002.006.002.005.08.206.002.005.002.006.082.204.002.006.002.005.086.204.002.005.002.006.088.202.002.005.003.006.09.2.003.006.002.005.094.2.002.006.003.005.096.199.002.005.003.005.03.062.086.137.11.118.128.097.145.07.156.043.16.013.16-.017.155-.047.143-.074.127-.1.106-.121.081-.14.055-.15.025-.16-.005-.161-.034-.158-.05-.124-.028-.055-.092-.19-.087-.188-.087-.192-.083-.19-.08-.193-.078-.194-.076-.196-.073-.195-.07-.197-.067-.198-.065-.199-.063-.2-.059-.2-.056-.2-.055-.204-.05-.201-.049-.202-.046-.205-.043-.206-.04-.203-.038-.207-.034-.204-.032-.207-.028-.205-.026-.207-.023-.208-.02-.207-.018-.207-.014-.208-.011-.207-.009-.208-.005-.207-.002-.104-.017-.16-.046-.155-.074-.143-.1-.126-.121-.107-.139-.081-.152-.055-.159-.025-.161.004zm24.585 11.83l-.156.039-.146.068-.11.076-.015.012-.163.129-.166.127-.168.125-.17.124-.17.12-.172.118-.173.115-.176.114-.177.111-.18.11-.178.105-.182.104-.182.101-.184.1-.184.095-.189.095-.186.09-.188.089-.19.086-.19.082-.193.081-.195.078-.191.074-.197.073-.195.07-.196.065-.198.064-.198.061-.2.058-.2.055-.2.052-.2.049-.151.035-.153.05-.141.078-.125.103-.103.124-.078.14-.05.154-.022.16.009.16.038.157.067.147.093.132.116.112.134.089.149.062.158.034.16.003.133-.02.158-.035.006-.002.006-.001.213-.052.006-.002.007-.001.212-.056.006-.001.006-.002.212-.058.006-.002.006-.002.211-.061.006-.002.006-.002.21-.064.006-.002.006-.002.21-.067.005-.002.006-.002.208-.07.006-.002.006-.003.207-.073.006-.002.006-.002.206-.077.006-.002.005-.002.206-.08.005-.001.006-.003.204-.082.006-.002.005-.002.203-.085.006-.003.005-.002.202-.088.006-.002.005-.003.2-.09.006-.003.006-.003.2-.093.005-.003.005-.002.198-.096.006-.003.005-.003.197-.099.005-.002.005-.003.196-.102.005-.002.005-.003.195-.105.005-.002.005-.003.193-.107.005-.003.005-.003.191-.11.005-.003.005-.003.19-.112.005-.003.005-.003.189-.115.005-.003.005-.003.187-.117.005-.003.004-.004.186-.12.005-.003.004-.003.184-.122.005-.003.005-.004.182-.125.004-.003.005-.003.18-.128.005-.003.005-.003.179-.13.004-.003.005-.004.177-.132.004-.004.005-.003.175-.135.005-.003.004-.004.173-.137.005-.003.004-.004.019-.015.115-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.052-.153-.079-.14-.103-.124-.125-.102-.142-.078-.153-.05-.16-.02-.16.01zm-19.17.054l-.153.051-.14.079-.124.103-.103.125-.077.141-.05.153-.02.16.009.161.04.156.067.147.093.131.095.094.047.04.005.004.005.004.17.14.005.004.005.004.172.137.004.004.005.003.086.067.003.002.003.002.087.067.003.002.003.002.088.066.002.003.003.002.089.065.002.002.003.002.09.065.002.002.003.002.09.064.002.002.003.002.09.063.003.002.003.002.09.063.003.002.003.002.092.062.002.002.003.002.092.061.003.002.003.002.092.06.003.003.003.001.093.06.003.002.003.002.093.06.003.001.003.002.094.058.003.002.003.002.095.058.003.001.003.002.095.057.003.002.003.002.095.056.003.002.003.002.096.055.004.002.003.001.096.055.003.002.003.002.098.053.003.002.003.002.097.053.004.002.003.001.098.053.003.001.003.002.099.052.003.001.003.002.1.05.003.002.003.002.1.05.003.002.003.001.1.05h.003l.004.003.1.048.004.001.003.002.101.048.003.001.004.002.101.046.004.002.003.001.102.046.004.002.003.001.103.045.003.002.003.001.103.045.004.001.003.002.104.043.003.001.004.002.104.042.003.002.004.001.104.042.004.001.003.002.105.04.004.002.003.001.106.04.003.002h.004l.106.04.004.001.003.002.107.038.003.001.004.001.107.038.003.001.004.001.107.037.004.001.004.001.108.036.003.001.004.001.108.035.004.001.003.001.11.034.003.001.004.001.109.033.004.002h.003l.11.033h.004l.003.002.11.031.004.001.004.001.084.023.081.028.004.001.003.001.109.037.003.001.004.001.109.036.003.001.004.001.109.035h.003l.004.002.11.033.003.001.003.001.11.033.003.001.004.001.109.031.004.002h.003l.11.031.003.001.004.001.11.03h.003l.003.001.11.029h.004l.003.002.11.027.003.001.004.001.11.027h.003l.004.001.004.001.16.022.16-.008.157-.038.147-.067.132-.092.112-.116.09-.134.062-.149.034-.157.004-.161-.025-.16-.055-.151-.082-.139-.107-.12-.127-.1-.143-.074-.124-.04h-.003l-.104-.025-.103-.026h-.002l-.095-.026h-.001l-.101-.027h-.002l-.1-.028h-.002l-.103-.03-.104-.032-.097-.03h-.002l-.103-.033-.102-.033-.101-.034-.106-.036-.027-.01-.027-.007-.107-.03-.104-.029-.104-.03h-.002l-.097-.03-.102-.032-.102-.032-.102-.034-.103-.035-.096-.034-.1-.036-.101-.037h-.002l-.094-.036-.096-.037-.097-.04h-.002l-.099-.04-.098-.042h-.002l-.092-.04-.097-.043-.095-.043-.097-.044h-.002l-.09-.043-.094-.045-.094-.046-.093-.047-.09-.046-.096-.05-.088-.047-.002-.001-.09-.049-.094-.052-.002-.002-.087-.049-.087-.05h-.002l-.088-.053h-.001l-.09-.055-.086-.052-.002-.001-.089-.055-.084-.054h-.002l-.09-.059h-.001l-.085-.056-.001-.001-.084-.056-.082-.056h-.001l-.086-.06-.082-.058H7.79l-.086-.062-.002-.002-.08-.058-.081-.06h-.001l-.085-.064-.002-.002-.076-.058-.002-.002-.082-.064-.161-.128-.162-.133-.04-.034-.132-.092-.147-.066-.157-.038-.16-.008-.16.022z"})),EscalationStartEventNonInterrupting:({styles:e={},...t})=>L_("svg",KH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M16 9.209c-1.674 4.655-2.735 9.504-4.408 14.16 1.534-1.526 2.873-3.235 4.407-4.761l4.408 4.76c-1.497-4.71-2.91-9.448-4.408-14.16zm.031 2.93c.822 2.586 1.598 5.187 2.42 7.774l-2.42-2.614c-.682.598-2.453 2.886-2.34 2.389.873-2.488 1.45-5.068 2.34-7.55zM16.132.364c-1.51.016-3.055.139-4.492.614-.854.442-.266 1.861.651 1.578 2.266-.58 4.656-.596 6.944-.144.935.063 1.21-1.391.318-1.674-1.118-.26-2.274-.361-3.42-.374zm8.865 2.777c-.931-.1-1.262 1.29-.425 1.666 1.863 1.364 3.222 3.298 4.322 5.296.617.737 1.875-.145 1.398-.979-1.184-2.275-2.808-4.384-4.923-5.866a.863.863 0 00-.372-.117zM6.55 3.564c-.734.078-1.196.762-1.735 1.206C3.552 6.02 2.55 7.511 1.681 9.053c-.31.533-.71 1.33-.03 1.767.615.432 1.282-.132 1.446-.742.796-1.475 1.746-2.89 2.934-4.08.43-.548 1.292-.822 1.34-1.595a.874.874 0 00-.822-.839zm24.582 11.078c-.771-.033-1.004.82-.873 1.437.13 2.395-.471 4.797-1.615 6.897-.33.876.984 1.559 1.512.785a14.276 14.276 0 001.761-8.54.865.865 0 00-.785-.579zm-30.195.666c-.774-.06-1.032.785-.905 1.407.117 2.41.732 4.81 1.858 6.945.528.774 1.84.09 1.51-.786A15.932 15.932 0 011.728 16a.876.876 0 00-.79-.692zm24.57 11.817c-.762.099-1.243.835-1.919 1.16-1.514 1.002-3.237 1.632-4.978 2.092-.864.423-.307 1.855.616 1.591 2.528-.578 4.93-1.75 6.913-3.421.469-.522.07-1.42-.631-1.422zm-19.16.042c-.845.001-1.12 1.228-.395 1.628 1.665 1.401 3.667 2.348 5.76 2.912.618.178 1.482.565 1.893-.177.355-.628-.226-1.297-.87-1.326-1.972-.515-3.912-1.285-5.5-2.594-.26-.213-.522-.472-.888-.443z"})),MessageStartEventNonInterrupting:({styles:e={},...t})=>L_("svg",YH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M8.746 10.393v11.064h14.506V10.393H8.746zm3.223 1.728h8.06c-1.428.879-2.856 2.807-4.283 3.018l-3.777-3.018zm9.557 1.018v6.59H10.473v-6.59l5.525 4.416 5.528-4.416zM16.132 0c-1.51.016-3.055.139-4.492.614-.854.442-.266 1.861.651 1.578 2.266-.58 4.656-.596 6.944-.144.935.063 1.21-1.391.318-1.674-1.118-.26-2.274-.361-3.42-.374zm8.865 2.777c-.931-.1-1.262 1.29-.425 1.666 1.863 1.364 3.222 3.298 4.322 5.296.617.737 1.875-.145 1.398-.979-1.184-2.275-2.808-4.384-4.923-5.866a.863.863 0 00-.372-.117zM6.55 3.2c-.734.078-1.196.762-1.735 1.206C3.552 5.656 2.55 7.147 1.681 8.69c-.31.533-.71 1.33-.03 1.767.615.432 1.282-.132 1.446-.742.796-1.475 1.746-2.89 2.934-4.08.43-.548 1.292-.822 1.34-1.595a.874.874 0 00-.822-.839zm24.582 11.078c-.771-.033-1.004.82-.873 1.437.13 2.395-.471 4.797-1.615 6.897-.33.876.984 1.559 1.512.785a14.276 14.276 0 001.761-8.54.865.865 0 00-.785-.579zm-30.195.666c-.774-.06-1.032.785-.905 1.407.117 2.41.732 4.81 1.858 6.945.528.774 1.84.09 1.51-.786a15.932 15.932 0 01-1.672-6.874.876.876 0 00-.79-.692zm24.57 11.817c-.762.099-1.243.835-1.919 1.16-1.514 1.002-3.237 1.632-4.978 2.092-.864.423-.307 1.855.616 1.591 2.528-.578 4.93-1.75 6.913-3.421.469-.522.07-1.42-.631-1.422zm-19.16.042c-.845.001-1.12 1.228-.395 1.628 1.665 1.401 3.667 2.348 5.76 2.912.618.178 1.482.565 1.893-.177.355-.628-.226-1.297-.87-1.326-1.972-.515-3.912-1.285-5.5-2.594-.26-.213-.522-.472-.888-.443z"})),MultipleStartEventNonInterrupting:({styles:e={},...t})=>L_("svg",ZH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M23.621 13.524L16 7.99l-7.622 5.534 2.911 8.952h9.422l2.911-8.952zm-1.016.33l-2.523 7.759h-8.165l-2.524-7.76L16 9.059l6.606 4.796zM16.132 0c-1.51.016-3.055.139-4.492.614-.854.442-.266 1.861.651 1.578 2.266-.58 4.656-.596 6.944-.144.935.063 1.21-1.391.318-1.674-1.118-.26-2.274-.361-3.42-.374zm8.865 2.777c-.931-.1-1.262 1.29-.425 1.666 1.863 1.364 3.222 3.298 4.322 5.296.617.737 1.875-.145 1.398-.979-1.184-2.275-2.808-4.384-4.923-5.866a.863.863 0 00-.372-.117zM6.55 3.2c-.734.078-1.196.762-1.735 1.206C3.552 5.656 2.55 7.147 1.681 8.69c-.31.533-.71 1.33-.03 1.767.615.432 1.282-.132 1.446-.742.796-1.475 1.746-2.89 2.934-4.08.43-.548 1.292-.822 1.34-1.595a.874.874 0 00-.822-.839zm24.582 11.078c-.771-.033-1.004.82-.873 1.437.13 2.395-.471 4.797-1.615 6.897-.33.876.984 1.559 1.512.785a14.276 14.276 0 001.761-8.54.865.865 0 00-.785-.579zm-30.195.666c-.774-.06-1.032.785-.905 1.407.117 2.41.732 4.81 1.858 6.945.528.774 1.84.09 1.51-.786a15.932 15.932 0 01-1.672-6.874.876.876 0 00-.79-.692zm24.57 11.817c-.762.099-1.243.835-1.919 1.16-1.514 1.002-3.237 1.632-4.978 2.092-.864.423-.307 1.855.616 1.591 2.528-.578 4.93-1.75 6.913-3.421.469-.522.07-1.42-.631-1.422zm-19.16.042c-.845.001-1.12 1.228-.395 1.628 1.665 1.401 3.667 2.348 5.76 2.912.618.178 1.482.565 1.893-.177.355-.628-.226-1.297-.87-1.326-1.972-.515-3.912-1.285-5.5-2.594-.26-.213-.522-.472-.888-.443z"})),ParallelMultipleStartEventNonInterrupting:({styles:e={},...t})=>L_("svg",JH({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M13.503 9.016v4.428H9.075v4.98h4.428v4.428h4.98v-4.427h4.428v-4.981h-4.427V9.016h-4.981zm.83.83h3.32v4.428h4.428v3.32h-4.428v4.428h-3.32v-4.454H9.905v-3.294h4.428V9.846zM16.12 0h-.232l-.22.004h-.012l-.221.006h-.012l-.22.01h-.012l-.22.013h-.012l-.22.016h-.012l-.22.019h-.005l-.006.001-.22.021h-.006l-.005.001-.22.025h-.011l-.22.028h-.005l-.006.002-.219.03h-.005l-.006.001-.218.033-.006.001-.006.001-.217.036-.006.001-.006.001-.217.039-.006.001-.006.001-.216.042-.006.001-.006.001-.215.045-.006.001-.006.002-.215.047-.006.002-.006.001-.214.05-.006.002-.006.002-.115.029-.152.053-.14.081-.122.106-.1.126-.075.143-.047.154-.018.16.012.16.042.156.07.145.095.13.118.11.137.086.15.059.158.03h.161l.132-.022.11-.028.202-.047.203-.046.208-.043.202-.039.206-.037.206-.034.205-.03.208-.03.205-.025.209-.023.208-.02.21-.017.209-.015.207-.011.21-.009.21-.006.207-.003h.21l.21.002.207.005.207.008.212.011.207.014.208.017.209.019.208.022.205.025.206.028.207.03.208.035.205.036.202.039.052.01.16.018.16-.012.156-.042.146-.07.13-.096.109-.119.085-.136.06-.15.03-.159v-.16l-.03-.16-.059-.15-.086-.136-.109-.118-.13-.096-.145-.07-.128-.038-.057-.011-.006-.002h-.006l-.216-.042-.006-.001-.006-.001-.217-.039H18.9l-.006-.002-.217-.035-.006-.001-.006-.001-.218-.032-.006-.001-.006-.001-.218-.03h-.006l-.006-.001-.219-.027h-.011l-.22-.024-.005-.001h-.006l-.22-.021h-.006l-.006-.001-.22-.017-.005-.001h-.006L17.06.03h-.012l-.22-.012h-.012l-.22-.01h-.012l-.22-.005h-.012L16.132 0h-.012zm8.715 2.783l-.157.034-.149.063-.134.089-.116.112-.092.132-.067.147-.038.157-.008.16.021.16.051.153.079.141.103.124.102.087.052.038h.001l.087.064v.001l.082.061.002.001.076.059h.001l.084.065.082.066.002.001.079.063.002.002.077.063.081.067.002.002.077.065.076.065.001.002.08.07.078.07h.002l.075.068.077.072.002.001.073.069.077.073.072.07.002.001.077.076.07.07v.001l.075.076.07.073.002.001.074.079.002.002.069.074.069.075.074.082.07.08.002.001.068.079h.001l.067.079.068.082.065.078.001.002.068.083.067.084.063.081.001.002.067.087.002.002.063.084.001.001.064.087.008.01.008.01.095.12.093.121.09.119.087.119.088.122.086.123.084.12.081.122.001.002.084.126.08.126.08.127.077.126.079.131.074.127.075.131.073.131.07.13.07.133.069.133.045.09.086.137.109.119.13.096.144.07.156.042.16.013.16-.017.155-.047.143-.075.126-.1.106-.121.082-.14.054-.151.025-.16-.005-.16-.035-.158-.05-.124-.048-.095-.002-.004-.002-.004-.073-.14-.002-.005-.002-.004-.074-.14-.002-.004-.002-.004-.076-.14-.002-.003-.002-.004-.077-.139-.003-.004-.002-.004-.078-.138-.003-.004-.002-.003-.08-.137-.002-.004-.003-.004-.081-.136-.002-.004-.003-.004-.083-.136-.002-.003-.002-.004-.085-.135-.002-.004-.003-.003-.085-.134-.003-.004-.002-.004-.087-.132-.003-.004-.003-.004-.088-.132-.003-.003-.002-.004-.09-.13-.003-.005-.003-.003-.091-.13-.003-.004-.002-.004-.093-.129-.003-.003-.003-.004-.094-.128-.003-.004-.003-.003-.095-.127-.003-.004-.003-.004-.097-.125-.003-.004-.003-.004-.09-.114-.06-.082-.003-.003-.002-.003-.069-.091-.002-.004-.002-.003-.07-.09-.003-.003-.002-.003-.07-.09-.003-.003-.002-.003-.071-.09-.002-.003-.003-.002-.072-.089-.002-.003-.002-.003-.073-.088-.002-.003-.002-.002-.074-.087-.002-.003-.002-.003-.074-.086-.003-.003-.002-.003-.074-.086-.003-.002-.002-.003-.075-.085-.003-.003-.002-.002-.076-.084-.002-.003-.003-.003-.076-.083-.002-.003-.003-.003-.077-.082-.002-.003-.003-.002-.077-.082-.003-.003-.003-.002-.078-.081-.002-.003-.003-.003-.078-.08-.003-.002-.003-.003-.079-.08-.002-.002-.003-.002-.08-.08-.002-.002-.003-.002-.08-.078-.003-.003-.003-.002-.08-.077-.003-.003-.003-.002-.082-.077-.002-.002-.003-.002-.082-.076-.003-.002-.002-.003-.083-.075-.003-.002-.002-.003-.084-.074-.002-.002-.003-.002-.084-.074-.003-.002-.002-.002-.085-.073-.002-.002-.003-.003-.085-.071-.003-.003-.002-.002-.086-.07-.003-.003-.002-.002-.086-.07-.003-.003-.003-.002-.086-.07-.003-.002-.003-.002-.087-.069-.002-.002-.003-.002-.088-.068-.002-.002-.003-.002-.088-.067-.003-.003-.003-.002-.088-.066-.003-.002-.003-.002-.089-.066-.003-.002-.003-.002-.057-.042-.14-.082-.15-.055-.16-.026-.16.004zM6.377 3.21l-.157.037-.148.066-.111.074-.007.006-.003.002-.003.002-.086.069-.003.002-.002.002-.086.07-.003.002-.002.002-.086.07-.002.003-.003.002-.085.071-.002.002-.003.003-.084.071-.003.003-.002.002-.084.072-.003.003-.002.002-.083.073-.003.003-.002.002-.083.074-.002.002-.003.003-.082.074-.003.003-.002.002-.081.076-.003.002-.003.002-.08.077-.003.002-.003.003-.08.076-.002.003-.003.002-.08.078-.002.002-.003.003-.079.078-.002.003-.003.002-.078.08-.003.002-.002.002-.078.08-.002.003-.003.002-.077.08-.003.004-.002.002-.077.081-.002.003-.003.003-.076.082-.002.002-.003.003-.075.082-.002.003-.003.003-.074.083-.003.003-.002.003-.074.084-.003.003-.002.002-.074.085-.002.003-.002.003-.073.085-.003.003-.002.003-.072.086-.002.003-.003.003-.071.087-.003.003-.002.002-.07.088-.003.003-.002.003-.07.088-.003.003-.002.003-.07.09-.002.002-.002.003-.069.09-.002.003-.003.003-.068.09-.002.003-.002.003-.067.092-.003.003-.002.003-.067.092-.002.003-.002.003-.066.092-.002.003-.002.004-.066.093-.002.003-.002.003-.065.094-.002.003-.002.004-.064.094-.002.003-.002.004-.063.095-.002.003-.002.003-.063.097-.002.003-.002.003-.046.073-.05.07-.003.002-.002.003-.067.093-.003.003-.002.003-.066.094-.002.003-.002.003-.066.094-.002.003-.002.003-.064.094-.002.004-.002.003-.064.094-.002.004-.002.003-.062.095-.002.003-.002.003-.062.096-.002.003-.002.003-.06.096-.003.003-.002.003-.06.096-.001.004-.002.003-.059.096-.002.004-.002.003-.058.097-.002.003-.001.003-.057.098-.002.003-.002.003-.056.098-.002.003-.002.003-.055.098-.002.004-.001.003-.055.098-.001.004-.002.003-.054.099-.001.003-.002.003-.052.1-.002.002-.002.004-.051.1-.002.002-.002.004-.05.1-.002.003-.002.003-.05.1v.003l-.002.004-.05.1v.003l-.002.004-.048.1-.002.004-.001.003-.047.101-.002.003-.001.004-.013.027-.052.152-.024.16.006.16.037.157.064.148.091.133.114.114.134.09.147.065.157.036.162.006.159-.024.152-.053.14-.08.122-.105.1-.126.066-.117.01-.023.044-.095.045-.095.002-.003.042-.087.048-.097.048-.095v-.001l.048-.092.001-.001.047-.09.05-.093.002-.002.049-.09.052-.092.001-.002.051-.089.001-.002.051-.087.053-.088.001-.002.055-.091.057-.091.057-.09.001-.002.057-.089.055-.083.001-.002.06-.09.06-.088.062-.089.001-.001.06-.084.063-.088.065-.089.017-.023.016-.025.06-.094.059-.09v-.002l.058-.086.057-.086.001-.001.062-.09.062-.088.001-.002.06-.085.002-.002.06-.082.063-.087.064-.084.002-.002.061-.08.065-.084.064-.08v-.001l.067-.083.067-.082.07-.083.069-.08.063-.074.074-.083.068-.077.002-.002.07-.076.07-.075.072-.077.001-.001.067-.07.076-.078.002-.002.07-.07.075-.075.002-.002.072-.07.075-.072.002-.002.073-.069.074-.068.001-.001.08-.073.076-.068.002-.002.072-.063v-.001l.078-.067.079-.068.002-.001.08-.068.002-.002.077-.063.082-.066.001-.001.075-.06.002-.002.006-.004.117-.111.094-.131.068-.146.04-.156.01-.161-.019-.16-.049-.154-.076-.141-.102-.125-.123-.105-.14-.079-.153-.052-.16-.023-.16.007zm24.596 11.088l-.156.04-.146.067-.131.094-.112.117-.087.135-.061.15-.033.157-.004.134.007.142.005.152.004.15.002.149v.153l.001.011v.015l.004.11.002.11v.002l.002.106v.321l-.003.102-.002.106-.004.107-.005.105-.006.106-.006.106-.008.106v.002l-.008.103v.002l-.01.1-.01.105-.01.105-.013.105-.012.099v.002l-.014.108-.014.1-.016.105-.016.103v.002l-.017.099-.018.104-.019.103v.002l-.019.097-.02.104-.022.103v.001l-.022.098-.023.103v.002l-.024.096-.025.103v.002l-.024.096-.027.102v.003l-.026.093v.001l-.029.103v.002l-.03.099-.028.097v.002l-.03.095-.03.096v.001l-.033.1-.031.095v.002l-.035.1v.003l-.034.094v.003l-.035.096v.001l-.034.09v.002l-.038.098-.036.093v.002l-.038.095-.079.194-.08.188-.085.189-.087.19-.09.184-.092.183-.095.184-.05.093-.064.148-.034.158-.005.16.026.16.054.151.082.14.106.12.127.1.143.075.154.046.16.017.161-.013.156-.042.144-.071.13-.096.109-.119.072-.112.053-.099.003-.005.003-.006.102-.195.003-.006.003-.006.098-.196.003-.006.003-.006.096-.197.002-.006.003-.006.093-.2.002-.006.003-.006.09-.2.002-.006.003-.007.086-.202.003-.006.002-.006.084-.203.002-.005.001-.005.04-.102.002-.003.001-.003.04-.103.001-.003.001-.003.04-.103v-.004l.001-.003.039-.103v-.003l.002-.003.037-.104.001-.003.001-.003.037-.104v-.004l.002-.003.035-.104.002-.003v-.004l.035-.104.002-.004v-.003l.034-.105.002-.003v-.003l.034-.105v-.004l.002-.003.032-.106.001-.003.001-.003.031-.106.001-.003.001-.004.031-.106.001-.003.001-.004.03-.106v-.003l.002-.004.028-.107.001-.003.001-.003.028-.107.001-.004.001-.003.027-.107.001-.004v-.003l.027-.108.001-.003v-.004l.026-.108.001-.003v-.004l.025-.108.001-.003v-.004l.025-.108v-.004l.001-.003.023-.109v-.003l.001-.004.022-.109v-.003l.002-.004.02-.109.001-.004v-.003l.02-.11.002-.003v-.004l.02-.11v-.007l.019-.11v-.003l.001-.004.017-.11v-.004l.001-.003.017-.11v-.008l.016-.11v-.004l.001-.004.015-.11v-.008l.015-.111v-.008l.013-.111v-.007l.013-.112v-.007l.011-.112v-.004l.001-.004.01-.112v-.007l.01-.112v-.008l.008-.112v-.008l.007-.113v-.007l.007-.113v-.008l.005-.113v-.007l.005-.114v-.007l.003-.114v-.007l.003-.114v-.129l.001-.114v-.13l-.003-.114v-.008l-.003-.115v-.007l-.003-.102v-.155l-.003-.158v-.01l-.004-.158v-.01l-.006-.158v-.01l-.007-.148-.023-.16-.051-.152-.08-.14-.103-.124-.125-.102-.142-.077-.153-.05-.16-.02-.161.01zm-30.213.66l-.157.034-.149.063-.134.09-.115.113-.092.132-.067.147-.037.156-.009.134.001.11V15.95l.006.22v.012l.01.22v.012l.012.22v.006l.001.006.015.22v.005l.001.006.018.22.001.006v.006l.022.219v.006l.001.006.024.219.001.006v.006l.028.218.001.006v.006l.031.218.001.006.001.006.033.218.001.006.001.005.037.218v.006l.002.005.04.217v.006l.001.006.043.216.001.006.001.006.046.216v.005l.002.006.048.215.002.006.001.006.051.214.002.006v.006l.055.214.002.005.001.006.057.213.002.006.001.005.06.213.002.005.001.006.063.212.002.005.001.006.066.21.002.006.002.006.068.21.002.005.002.005.07.21.003.005.002.005.074.208.002.006.002.005.077.207.002.006.002.005.08.206.002.005.002.006.082.204.002.006.002.005.086.204.002.005.002.006.088.202.002.005.003.006.09.2.003.006.002.005.094.2.002.006.003.005.096.199.002.005.003.005.03.062.086.137.11.118.128.097.145.07.156.043.16.013.16-.017.155-.047.143-.074.127-.1.106-.121.081-.14.055-.15.025-.16-.005-.161-.034-.158-.05-.124-.028-.055-.092-.19-.087-.188-.087-.192-.083-.19-.08-.193-.078-.194-.076-.196-.073-.195-.07-.197-.067-.198-.065-.199-.063-.2-.059-.2-.056-.2-.055-.204-.05-.201-.049-.202-.046-.205-.043-.206-.04-.203-.038-.207-.034-.204-.032-.207-.028-.205-.026-.207-.023-.208-.02-.207-.018-.207-.014-.208-.011-.207-.009-.208-.005-.207-.002-.104-.017-.16-.046-.155-.074-.143-.1-.126-.121-.107-.139-.081-.152-.055-.159-.025-.161.004zm24.585 11.83l-.156.039-.146.068-.11.076-.015.012-.163.129-.166.127-.168.125-.17.124-.17.12-.172.118-.173.115-.176.114-.177.111-.18.11-.178.105-.182.104-.182.101-.184.1-.184.095-.189.095-.186.09-.188.089-.19.086-.19.082-.193.081-.195.078-.191.074-.197.073-.195.07-.196.065-.198.064-.198.061-.2.058-.2.055-.2.052-.2.049-.151.035-.153.05-.141.078-.125.103-.103.124-.078.14-.05.154-.022.16.009.16.038.157.067.147.093.132.116.112.134.089.149.062.158.034.16.003.133-.02.158-.035.006-.002.006-.001.213-.052.006-.002.007-.001.212-.056.006-.001.006-.002.212-.058.006-.002.006-.002.211-.061.006-.002.006-.002.21-.064.006-.002.006-.002.21-.067.005-.002.006-.002.208-.07.006-.002.006-.003.207-.073.006-.002.006-.002.206-.077.006-.002.005-.002.206-.08.005-.001.006-.003.204-.082.006-.002.005-.002.203-.085.006-.003.005-.002.202-.088.006-.002.005-.003.2-.09.006-.003.006-.003.2-.093.005-.003.005-.002.198-.096.006-.003.005-.003.197-.099.005-.002.005-.003.196-.102.005-.002.005-.003.195-.105.005-.002.005-.003.193-.107.005-.003.005-.003.191-.11.005-.003.005-.003.19-.112.005-.003.005-.003.189-.115.005-.003.005-.003.187-.117.005-.003.004-.004.186-.12.005-.003.004-.003.184-.122.005-.003.005-.004.182-.125.004-.003.005-.003.18-.128.005-.003.005-.003.179-.13.004-.003.005-.004.177-.132.004-.004.005-.003.175-.135.005-.003.004-.004.173-.137.005-.003.004-.004.019-.015.115-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.052-.153-.079-.14-.103-.124-.125-.102-.142-.078-.153-.05-.16-.02-.16.01zm-19.17.054l-.153.051-.14.079-.124.103-.103.125-.077.141-.05.153-.02.16.009.161.04.156.067.147.093.131.095.094.047.04.005.004.005.004.17.14.005.004.005.004.172.137.004.004.005.003.086.067.003.002.003.002.087.067.003.002.003.002.088.066.002.003.003.002.089.065.002.002.003.002.09.065.002.002.003.002.09.064.002.002.003.002.09.063.003.002.003.002.09.063.003.002.003.002.092.062.002.002.003.002.092.061.003.002.003.002.092.06.003.003.003.001.093.06.003.002.003.002.093.06.003.001.003.002.094.058.003.002.003.002.095.058.003.001.003.002.095.057.003.002.003.002.095.056.003.002.003.002.096.055.004.002.003.001.096.055.003.002.003.002.098.053.003.002.003.002.097.053.004.002.003.001.098.053.003.001.003.002.099.052.003.001.003.002.1.05.003.002.003.002.1.05.003.002.003.001.1.05h.003l.004.003.1.048.004.001.003.002.101.048.003.001.004.002.101.046.004.002.003.001.102.046.004.002.003.001.103.045.003.002.003.001.103.045.004.001.003.002.104.043.003.001.004.002.104.042.003.002.004.001.104.042.004.001.003.002.105.04.004.002.003.001.106.04.003.002h.004l.106.04.004.001.003.002.107.038.003.001.004.001.107.038.003.001.004.001.107.037.004.001.004.001.108.036.003.001.004.001.108.035.004.001.003.001.11.034.003.001.004.001.109.033.004.002h.003l.11.033h.004l.003.002.11.031.004.001.004.001.084.023.081.028.004.001.003.001.109.037.003.001.004.001.109.036.003.001.004.001.109.035h.003l.004.002.11.033.003.001.003.001.11.033.003.001.004.001.109.031.004.002h.003l.11.031.003.001.004.001.11.03h.003l.003.001.11.029h.004l.003.002.11.027.003.001.004.001.11.027h.003l.004.001.004.001.16.022.16-.008.157-.038.147-.067.132-.092.112-.116.09-.134.062-.149.034-.157.004-.161-.025-.16-.055-.151-.082-.139-.107-.12-.127-.1-.143-.074-.124-.04h-.003l-.104-.025-.103-.026h-.002l-.095-.026h-.001l-.101-.027h-.002l-.1-.028h-.002l-.103-.03-.104-.032-.097-.03h-.002l-.103-.033-.102-.033-.101-.034-.106-.036-.027-.01-.027-.007-.107-.03-.104-.029-.104-.03h-.002l-.097-.03-.102-.032-.102-.032-.102-.034-.103-.035-.096-.034-.1-.036-.101-.037h-.002l-.094-.036-.096-.037-.097-.04h-.002l-.099-.04-.098-.042h-.002l-.092-.04-.097-.043-.095-.043-.097-.044h-.002l-.09-.043-.094-.045-.094-.046-.093-.047-.09-.046-.096-.05-.088-.047-.002-.001-.09-.049-.094-.052-.002-.002-.087-.049-.087-.05h-.002l-.088-.053h-.001l-.09-.055-.086-.052-.002-.001-.089-.055-.084-.054h-.002l-.09-.059h-.001l-.085-.056-.001-.001-.084-.056-.082-.056h-.001l-.086-.06-.082-.058H7.79l-.086-.062-.002-.002-.08-.058-.081-.06h-.001l-.085-.064-.002-.002-.076-.058-.002-.002-.082-.064-.161-.128-.162-.133-.04-.034-.132-.092-.147-.066-.157-.038-.16-.008-.16.022z",opacity:".98"})),SignalStartEventNonInterrupting:({styles:e={},...t})=>L_("svg",eU({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M16.007 8.82L9.21 21.022h13.596L16.007 8.82zm0 1.775l5.328 9.563H10.68l5.327-9.563zM16.14.386c-1.571.236-4.195-.284-4.9 1.381.619 1.703 2.745.069 4.085.365 1.421-.13 2.84.2 4.235.259C21.27.784 18.19.344 17 .413a20.456 20.456 0 00-.86-.027zM25 3.162c-2.19.694.401 2.26 1.181 3.094 1.083 1.152 1.954 2.484 2.715 3.864 1.48 1.005 1.845-1.26.81-2.03-1.158-1.897-2.613-3.704-4.513-4.89l-.192-.038zm-18.438.423c-1.793.712-2.909 2.548-4.01 4.061-.773.814-2.211 3.653.005 3.211 1.123-1.469 1.87-3.306 3.267-4.614.664-.7 2.73-2.013.738-2.658zm24.57 11.072c-1.659.435-.468 2.667-.99 3.895a13.427 13.427 0 01-1.497 4.435c-.23 1.659 1.991 1.165 2.018-.199a14.277 14.277 0 001.254-7.552.865.865 0 00-.785-.579zm-30.18.666c-1.677.386-.633 2.667-.608 3.876.371 1.623.792 3.35 1.79 4.696 2.382.321.571-2.338.292-3.492a15.92 15.92 0 01-.684-4.39.877.877 0 00-.79-.69zm24.558 11.81c-1.755.865-3.303 2.266-5.274 2.765-1.162-.016-3.074 1.271-1.331 2.102 2.66-.447 5.163-1.733 7.236-3.445.472-.506.06-1.432-.631-1.421zm-19.151.043c-2.004.786.416 2.405 1.43 2.913 1.608.904 3.379 1.636 5.208 1.877 1.77-.804-.228-2.094-1.357-2.073-1.75-.537-3.403-1.396-4.798-2.586l-.227-.104-.256-.027z"})),TimerStartEventNonInterrupting:({styles:e={},...t})=>L_("svg",tU({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.991 8.7c-3.018-.042-5.92 1.925-7.03 4.725-1.138 2.695-.509 6.011 1.537 8.102 1.99 2.142 5.267 2.93 8.013 1.927 2.877-.98 4.99-3.826 5.067-6.87.153-2.956-1.624-5.88-4.299-7.135a7.551 7.551 0 00-3.288-.75zm0 1.383c2.758-.052 5.372 1.972 6.014 4.654.704 2.578-.482 5.516-2.79 6.867-2.358 1.48-5.682 1.085-7.617-.919-2.043-1.97-2.407-5.38-.84-7.743 1.11-1.764 3.149-2.88 5.233-2.86zm1.962 1.764l-2.074 3.762c-.64.068-.793 1.04-.202 1.3.39.27.696-.18 1.052-.165h3.17v-.865h-3.182l1.993-3.614-.757-.418zM16.12.358h-.232l-.22.004h-.012l-.221.006h-.012l-.22.01h-.012l-.22.013h-.012l-.22.016h-.012l-.22.019h-.005l-.006.001-.22.021h-.006l-.005.001-.22.025h-.011l-.22.028h-.005l-.006.002-.219.03h-.005l-.006.001-.218.033-.006.001-.006.001-.217.036-.006.001-.006.001-.217.039-.006.001-.006.001-.216.042-.006.001-.006.001-.215.045-.006.001-.006.002-.215.047-.006.002-.006.001-.214.05-.006.002-.006.002-.115.029-.152.053-.14.081-.122.106-.1.126-.075.143-.047.154-.018.16.012.16.042.156.07.145.095.13.118.11.137.086.15.059.158.03h.161l.132-.022.11-.028.202-.047.203-.046.208-.043.202-.039.206-.037.206-.034.205-.03.208-.03.205-.025.209-.023.208-.02.21-.017.209-.015.207-.011.21-.009.21-.006.207-.003h.21l.21.002.207.005.207.008.212.011.207.014.208.017.209.019.208.022.205.025.206.028.207.03.208.035.205.036.202.039.052.01.16.018.16-.012.156-.042.146-.07.13-.096.109-.119.085-.136.06-.15.03-.159v-.16l-.03-.16-.059-.15-.086-.136L19.823.9l-.13-.096-.145-.07-.128-.038-.057-.011-.006-.002h-.006L19.135.64l-.006-.001-.006-.001-.217-.039H18.9l-.006-.002-.217-.035-.006-.001-.006-.001-.218-.032-.006-.001-.006-.001-.218-.03h-.006l-.006-.001-.219-.027h-.011l-.22-.024-.005-.001h-.006l-.22-.021h-.006L17.512.42l-.22-.017-.005-.001h-.006l-.22-.015h-.012l-.22-.012h-.012l-.22-.01h-.012l-.22-.005h-.012l-.221-.003h-.012zm8.715 2.783l-.157.034-.149.063-.134.089-.116.112-.092.132-.067.147-.038.157-.008.16.021.16.051.153.079.141.103.124.102.087.052.038h.001l.087.064v.001l.082.061.002.001.076.059h.001l.084.065.082.066.002.001.079.063.002.002.077.063.081.067.002.002.077.065.076.065.001.002.08.07.078.07h.002l.075.068.077.072.002.001.073.069.077.073.072.07.002.001.077.076.07.07v.001l.075.076.07.073.002.001.074.079.002.002.069.074.069.075.074.082.07.08.002.001.068.079h.001l.067.079.068.082.065.078.001.002.068.083.067.084.063.081.001.002.067.087.002.002.063.084.001.001.064.087.008.01.008.01.095.12.093.121.09.119.087.119.088.122.086.123.084.12.081.122.001.002.084.126.08.126.08.127.077.126.079.131.074.127.075.131.073.131.07.13.07.133.069.133.045.09.086.137.109.119.13.096.144.07.156.042.16.013.16-.017.155-.047.143-.075.126-.1.106-.121.082-.14.054-.151.025-.16-.005-.16-.035-.158-.05-.124-.048-.095-.002-.004-.002-.004-.073-.14-.002-.005-.002-.004-.074-.14-.002-.004-.002-.004-.076-.14-.002-.003-.002-.004-.077-.139-.003-.004-.002-.004-.078-.138-.003-.004-.002-.003-.08-.137-.002-.004-.003-.004-.081-.136-.002-.004-.003-.004-.083-.136-.002-.003-.002-.004-.085-.135-.002-.004-.003-.003-.085-.134-.003-.004-.002-.004-.087-.132-.003-.004-.003-.004-.088-.132-.003-.003-.002-.004-.09-.13-.003-.005-.003-.003-.091-.13-.003-.004-.002-.004-.093-.129-.003-.003-.003-.004-.094-.128-.003-.004-.003-.003-.095-.127-.003-.004-.003-.004-.097-.125-.003-.004-.003-.004-.09-.114-.06-.082-.003-.003-.002-.003-.069-.091-.002-.004-.002-.003-.07-.09-.003-.003-.002-.003-.07-.09-.003-.003-.002-.003-.071-.09-.002-.003-.003-.002-.072-.089-.002-.003-.002-.003-.073-.088-.002-.003-.002-.002-.074-.087-.002-.003-.002-.003-.074-.086-.003-.003-.002-.003-.074-.086-.003-.002-.002-.003-.075-.085-.003-.003-.002-.002-.076-.084-.002-.003-.003-.003-.076-.083-.002-.003-.003-.003-.077-.082-.002-.003-.003-.002-.077-.082-.003-.003-.003-.002-.078-.081-.002-.003-.003-.003-.078-.08-.003-.002-.003-.003-.079-.08-.002-.002-.003-.002-.08-.08-.002-.002-.003-.002-.08-.078-.003-.003-.003-.002-.08-.077-.003-.003-.003-.002-.082-.077-.002-.002-.003-.002-.082-.076-.003-.002-.002-.003-.083-.075-.003-.002-.002-.003-.084-.074-.002-.002-.003-.002-.084-.074-.003-.002-.002-.002-.085-.073-.002-.002-.003-.003-.085-.071-.003-.003-.002-.002-.086-.07-.003-.003-.002-.002-.086-.07-.003-.003-.003-.002-.086-.07-.003-.002-.003-.002-.087-.069-.002-.002-.003-.002-.088-.068-.002-.002-.003-.002-.088-.067-.003-.003-.003-.002-.088-.066-.003-.002-.003-.002-.089-.066-.003-.002-.003-.002-.057-.042-.14-.082-.15-.055-.16-.026-.16.004zm-18.458.426l-.157.037-.148.066-.111.074-.007.006-.003.002-.003.002-.086.069-.003.002-.002.002-.086.07-.003.002-.002.002-.086.07-.002.003-.003.002-.085.071-.002.002-.003.003-.084.071-.003.003-.002.002-.084.072-.003.003-.002.002-.083.073-.003.003-.002.002-.083.074-.002.002-.003.003-.082.074-.003.003-.002.002-.081.076-.003.002-.003.002-.08.077-.003.002-.003.003-.08.076-.002.003-.003.002-.08.078-.002.002-.003.003-.079.078-.002.003-.003.002-.078.08-.003.002-.002.002-.078.08-.002.003-.003.002-.077.08-.003.004-.002.002-.077.081-.002.003-.003.003-.076.082-.002.002-.003.003-.075.082-.002.003-.003.003-.074.083-.003.003-.002.003-.074.084-.003.003-.002.002-.074.085-.002.003-.002.003-.073.085-.003.003-.002.003-.072.086-.002.003-.003.003-.071.087-.003.003-.002.002-.07.088-.003.003-.002.003-.07.088-.003.003-.002.003-.07.09-.002.002-.002.003-.069.09-.002.003-.003.003-.068.09-.002.003-.002.003-.067.092-.003.003-.002.003-.067.092-.002.003-.002.003-.066.092-.002.003-.002.004-.066.093-.002.003-.002.003-.065.094-.002.003-.002.004-.064.094-.002.003-.002.004-.063.095-.002.003-.002.003-.063.097-.002.003-.002.003-.046.073-.05.07-.003.002-.002.003-.067.093-.003.003-.002.003-.066.094-.002.003-.002.003-.066.094-.002.003-.002.003-.064.094-.002.004-.002.003-.064.094-.002.004-.002.003-.062.095-.002.003-.002.003-.062.096-.002.003-.002.003-.06.096-.003.003-.002.003-.06.096-.001.004-.002.003-.059.096-.002.004-.002.003-.058.097-.002.003-.001.003-.057.098-.002.003-.002.003-.056.098-.002.003-.002.003-.055.098-.002.004-.001.003-.055.098-.001.004-.002.003-.054.099-.001.003-.002.003-.052.1-.002.002-.002.004-.051.1-.002.002-.002.004-.05.1-.002.003-.002.003-.05.1v.003l-.002.004-.05.1V9.5l-.002.004-.048.1-.002.004-.001.003-.047.101-.002.003-.001.004-.013.027-.052.152-.024.16.006.16.037.157.064.148.091.133.114.114.134.09.147.065.157.036.162.006.159-.024.152-.053.14-.08.122-.105.1-.126.066-.117.01-.023.044-.095.045-.095.002-.003.042-.087.048-.097.048-.095v-.001l.048-.092.001-.001.047-.09.05-.093.002-.002.049-.09.052-.092.001-.002.051-.089.001-.002.051-.087.053-.088.001-.002.055-.091.057-.091.057-.09.001-.002.057-.089.055-.083.001-.002.06-.09.06-.088.062-.089.001-.001.06-.084.063-.088.065-.089.017-.023.016-.025.06-.094.059-.09v-.002l.058-.086.057-.086.001-.001.062-.09.062-.088.001-.002.06-.085.002-.002.06-.082.063-.087.064-.084.002-.002.061-.08.065-.084.064-.08v-.001l.067-.083.067-.082.07-.083.069-.08.063-.074.074-.083.068-.077.002-.002.07-.076.07-.075.072-.077.001-.001.067-.07.076-.078.002-.002.07-.07.075-.075.002-.002.072-.07.075-.072.002-.002.073-.069.074-.068.001-.001.08-.073.076-.068.002-.002.072-.063v-.001l.078-.067.079-.068.002-.001.08-.068.002-.002.077-.063.082-.066.001-.001.075-.06.002-.002.006-.004.117-.111.094-.131.068-.146.04-.156.01-.161-.019-.16-.049-.154-.076-.141-.102-.125-.123-.105-.14-.079-.153-.052-.16-.023-.16.007zm24.596 11.088l-.156.04-.146.067-.131.094-.112.117-.087.135-.061.15-.033.157-.004.134.007.142.005.152.004.15.002.149v.153l.001.011v.015l.004.11.002.11v.002l.002.106v.321l-.003.102-.002.106-.004.107-.005.105-.006.106-.006.106-.008.106v.002l-.008.103v.002l-.01.1-.01.105-.01.105-.013.105-.012.099v.002l-.014.108-.014.1-.016.105-.016.103v.002l-.017.099-.018.104-.019.103v.002l-.019.097-.02.104-.022.103v.001l-.022.098-.023.103v.002l-.024.096-.025.103v.002l-.024.096-.027.102v.003l-.026.093v.001l-.029.103v.002l-.03.099-.028.097v.002l-.03.095-.03.096v.001l-.033.1-.031.095v.002l-.035.1v.003l-.034.094v.003l-.035.096v.001l-.034.09v.002l-.038.098-.036.093v.002l-.038.095-.079.194-.08.188-.085.189-.087.19-.09.184-.092.183-.095.184-.05.093-.064.148-.034.158-.005.16.026.16.054.151.082.14.106.12.127.1.143.075.154.046.16.017.161-.013.156-.042.144-.071.13-.096.109-.119.072-.112.053-.099.003-.005.003-.006.102-.195.003-.006.003-.006.098-.196.003-.006.003-.006.096-.197.002-.006.003-.006.093-.2.002-.006.003-.006.09-.2.002-.006.003-.007.086-.202.003-.006.002-.006.084-.203.002-.005.001-.005.04-.102.002-.003.001-.003.04-.103.001-.003.001-.003.04-.103v-.004l.001-.003.039-.103v-.003l.002-.003.037-.104.001-.003.001-.003.037-.104v-.004l.002-.003.035-.104.002-.003v-.004l.035-.104.002-.004v-.003l.034-.105.002-.003v-.003l.034-.105v-.004l.002-.003.032-.106.001-.003.001-.003.031-.106.001-.003.001-.004.031-.106.001-.003.001-.004.03-.106v-.003l.002-.004.028-.107.001-.003.001-.003.028-.107.001-.004.001-.003.027-.107.001-.004v-.003l.027-.108.001-.003v-.004l.026-.108.001-.003v-.004l.025-.108.001-.003v-.004l.025-.108v-.004l.001-.003.023-.109v-.003l.001-.004.022-.109v-.003l.002-.004.02-.109.001-.004v-.003l.02-.11.002-.003v-.004l.02-.11v-.007l.019-.11v-.003l.001-.004.017-.11v-.004l.001-.003.017-.11v-.008l.016-.11v-.004l.001-.004.015-.11v-.008l.015-.111v-.008l.013-.111v-.007l.013-.112v-.007l.011-.112v-.004l.001-.004.01-.112v-.007l.01-.112v-.008l.008-.112v-.008l.007-.113v-.007l.007-.113v-.008l.005-.113v-.007l.005-.114v-.007l.003-.114v-.007l.003-.114v-.129l.001-.114v-.13l-.003-.114V16.5l-.003-.115v-.007l-.003-.102v-.155l-.003-.158v-.01l-.004-.158v-.01l-.006-.158v-.01l-.007-.148-.023-.16-.051-.152-.08-.14-.103-.124-.125-.102-.142-.077-.153-.05-.16-.02-.161.01zm-30.213.66l-.157.034-.149.063-.134.09-.115.113-.092.132-.067.147-.037.156-.009.134.001.11V16.308l.006.22v.012l.01.22v.012l.012.22v.006l.001.006.015.22v.005l.001.006.018.22.001.006v.006l.022.219v.006l.001.006.024.219.001.006v.006l.028.218.001.006v.006l.031.218.001.006.001.006.033.218.001.006.001.005.037.218v.006l.002.005.04.217v.006l.001.006.043.216.001.006.001.006.046.216v.005l.002.006.048.215.002.006.001.006.051.214.002.006v.006l.055.214.002.005.001.006.057.213.002.006.001.005.06.213.002.005.001.006.063.212.002.005.001.006.066.21.002.006.002.006.068.21.002.005.002.005.07.21.003.005.002.005.074.208.002.006.002.005.077.207.002.006.002.005.08.206.002.005.002.006.082.204.002.006.002.005.086.204.002.005.002.006.088.202.002.005.003.006.09.2.003.006.002.005.094.2.002.006.003.005.096.199.002.005.003.005.03.062.086.137.11.118.128.097.145.07.156.043.16.013.16-.017.155-.047.143-.074.127-.1.106-.121.081-.14.055-.15.025-.16-.005-.161-.034-.158-.05-.124-.028-.055-.092-.19-.087-.188-.087-.192-.083-.19-.08-.193-.078-.194-.076-.196-.073-.195-.07-.197-.067-.198-.065-.199-.063-.2-.059-.2-.056-.2-.055-.204-.05-.201-.049-.202-.046-.205-.043-.206-.04-.203-.038-.207-.034-.204-.032-.207-.028-.205-.026-.207-.023-.208-.02-.207-.018-.207-.014-.208-.011-.207-.009-.208-.005-.207-.002-.104-.017-.16-.046-.155-.074-.143-.1-.126-.121-.107-.139-.081-.152-.055-.159-.025-.161.004zm24.585 11.83l-.156.039-.146.068-.11.076-.015.012-.163.129-.166.127-.168.125-.17.124-.17.12-.172.118-.173.115-.176.114-.177.111-.18.11-.178.105-.182.104-.182.101-.184.1-.184.095-.189.095-.186.09-.188.089-.19.086-.19.082-.193.081-.195.078-.191.074-.197.073-.195.07-.196.065-.198.064-.198.061-.2.058-.2.055-.2.052-.2.049-.151.035-.153.05-.141.078-.125.103-.103.124-.078.14-.05.154-.022.16.009.16.038.157.067.147.093.132.116.112.134.089.149.062.158.034.16.003.133-.02.158-.035.006-.002.006-.001.213-.052.006-.002.007-.001.212-.056.006-.001.006-.002.212-.058.006-.002.006-.002.211-.061.006-.002.006-.002.21-.064.006-.002.006-.002.21-.067.005-.002.006-.002.208-.07.006-.002.006-.003.207-.073.006-.002.006-.002.206-.077.006-.002.005-.002.206-.08.005-.001.006-.003.204-.082.006-.002.005-.002.203-.085.006-.003.005-.002.202-.088.006-.002.005-.003.2-.09.006-.003.006-.003.2-.093.005-.003.005-.002.198-.096.006-.003.005-.003.197-.099.005-.002.005-.003.196-.102.005-.002.005-.003.195-.105.005-.002.005-.003.193-.107.005-.003.005-.003.191-.11.005-.003.005-.003.19-.112.005-.003.005-.003.189-.115.005-.003.005-.003.187-.117.005-.003.004-.004.186-.12.005-.003.004-.003.184-.122.005-.003.005-.004.182-.125.004-.003.005-.003.18-.128.005-.003.005-.003.179-.13.004-.003.005-.004.177-.132.004-.004.005-.003.175-.135.005-.003.004-.004.173-.137.005-.003.004-.004.019-.015.115-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.052-.153-.079-.14-.103-.124-.125-.102-.142-.078-.153-.05-.16-.02-.16.01zm-19.17.054l-.153.051-.14.079-.124.103-.103.125-.077.141-.05.153-.02.16.009.161.04.156.067.147.093.131.095.094.047.04.005.004.005.004.17.14.005.004.005.004.172.137.004.004.005.003.086.067.003.002.003.002.087.067.003.002.003.002.088.066.002.003.003.002.089.065.002.002.003.002.09.065.002.002.003.002.09.064.002.002.003.002.09.063.003.002.003.002.09.063.003.002.003.002.092.062.002.002.003.002.092.061.003.002.003.002.092.06.003.003.003.001.093.06.003.002.003.002.093.06.003.001.003.002.094.058.003.002.003.002.095.058.003.001.003.002.095.057.003.002.003.002.095.056.003.002.003.002.096.055.004.002.003.001.096.055.003.002.003.002.098.053.003.002.003.002.097.053.004.002.003.001.098.053.003.001.003.002.099.052.003.001.003.002.1.05.003.002.003.002.1.05.003.002.003.001.1.05h.003l.004.003.1.048.004.001.003.002.101.048.003.001.004.002.101.046.004.002.003.001.102.046.004.002.003.001.103.045.003.002.003.001.103.045.004.001.003.002.104.043.003.001.004.002.104.042.003.002.004.001.104.042.004.001.003.002.105.04.004.002.003.001.106.04.003.002h.004l.106.04.004.001.003.002.107.038.003.001.004.001.107.038.003.001.004.001.107.037.004.001.004.001.108.036.003.001.004.001.108.035.004.001.003.001.11.034.003.001.004.001.109.033.004.002h.003l.11.033h.004l.003.002.11.031.004.001.004.001.084.023.081.028.004.001.003.001.109.037.003.001.004.001.109.036.003.001.004.001.109.035h.003l.004.002.11.033.003.001.003.001.11.033.003.001.004.001.109.031.004.002h.003l.11.031.003.001.004.001.11.03h.003l.003.001.11.029h.004l.003.002.11.027.003.001.004.001.11.027h.003l.004.001.004.001.16.022.16-.008.157-.038.147-.067.132-.092.112-.116.09-.134.062-.149.034-.157.004-.161-.025-.16-.055-.151-.082-.139-.107-.12-.127-.1-.143-.074-.124-.04h-.003l-.104-.025-.103-.026h-.002l-.095-.026h-.001l-.101-.027h-.002l-.1-.028h-.002l-.103-.03-.104-.032-.097-.03h-.002l-.103-.033-.102-.033-.101-.034-.106-.036-.027-.01-.027-.007-.107-.03-.104-.029-.104-.03h-.002l-.097-.03-.102-.032-.102-.032-.102-.034-.103-.035-.096-.034-.1-.036-.101-.037h-.002l-.094-.036-.096-.037-.097-.04h-.002l-.099-.04-.098-.042h-.002l-.092-.04-.097-.043-.095-.043-.097-.044h-.002l-.09-.043-.094-.045-.094-.046-.093-.047-.09-.046-.096-.05-.088-.047-.002-.001-.09-.049-.094-.052-.002-.002-.087-.049-.087-.05h-.002l-.088-.053h-.001l-.09-.055-.086-.052-.002-.001-.089-.055-.084-.054h-.002l-.09-.059h-.001l-.085-.056-.001-.001-.084-.056-.082-.056h-.001l-.086-.06-.082-.058H7.79l-.086-.062-.002-.002-.08-.058-.081-.06h-.001l-.085-.064-.002-.002-.076-.058-.002-.002-.082-.064-.161-.128-.162-.133-.04-.034-.132-.092-.147-.066-.157-.038-.16-.008-.16.022z"})),CancelBoundaryEvent:UV,CompensateBoundaryEvent:GV,ConditionalBoundaryEvent:XV,ErrorBoundaryEvent:YV,EscalationBoundaryEvent:JV,LinkBoundaryEvent:tH,MessageBoundaryEvent:iH,MultipleBoundaryEvent:oH,BoundaryEvent:SH,ConditionalBoundaryEventNonInterrupting:aH,EscalationBoundaryEventNonInterrupting:cH,MessageBoundaryEventNonInterrupting:uH,MultipleBoundaryEventNonInterrupting:hH,ParallelBoundaryEventNonInterrupting:mH,SignalBoundaryEventNonInterrupting:yH,TimerBoundaryEventNonInterrupting:bH,ParallelMultipleBoundaryEvent:wH,SignalBoundaryEvent:EH,TimerBoundaryEvent:PH,StartEvent:({styles:e={},...t})=>L_("svg",nU({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.847.004C9.61-.016 3.624 4.014 1.257 9.78-1.235 15.49.06 22.581 4.42 27.034c4.193 4.513 11.101 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.268.403-6.228-3.26-12.441-8.87-15.154A15.924 15.924 0 0015.846.004zm.439 1.729c6.105.033 11.856 4.45 13.435 10.359 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.625-4.814-3.84-6.538-10.94-4.067-16.57 2.14-5.206 7.515-8.775 13.147-8.71.097-.001.194-.002.29-.001z"})),ParallelMultipleStartEvent:({styles:e={},...t})=>L_("svg",iU({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.847 0C9.61-.02 3.624 4.01 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.101 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.268.403-6.228-3.26-12.441-8.87-15.154A15.924 15.924 0 0015.846 0zm.439 1.729c6.105.033 11.856 4.45 13.435 10.359 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.625C2.101 23.17.377 16.07 2.848 10.44c2.134-5.2 7.522-8.78 13.147-8.71.097-.001.194-.002.29-.001zM13.504 9.08v4.427H9.077v4.98h4.427v4.427h4.98v-4.427h4.428v-4.98h-4.427V9.08h-4.98zm.83.83h3.32v4.427h4.428v3.32h-4.427v4.427h-3.32v-4.453H9.906v-3.294h4.427V9.91z"})),SignalStartEvent:({styles:e={},...t})=>L_("svg",rU({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M15.995.005C9.705-.08 3.643 3.968 1.257 9.78-1.235 15.49.06 22.581 4.42 27.034c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994.005zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626-4.814-3.838-6.538-10.939-4.067-16.57 2.14-5.205 7.515-8.774 13.147-8.708zm0 6.776L9.19 20.724H22.8L15.995 8.511zm0 1.777l5.332 9.572H10.662l5.333-9.572z"})),TimerStartEvent:({styles:e={},...t})=>L_("svg",oU({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M16 0C7.174 0 0 7.174 0 16s7.174 16 16 16 16-7.174 16-16S24.826 0 16 0zm0 1.73c7.892 0 14.27 6.378 14.27 14.27 0 7.891-6.379 14.27-14.27 14.27S1.73 23.891 1.73 16C1.73 8.108 8.108 1.73 16 1.73zm-.143 6.676c-2.967.02-5.797 1.97-6.89 4.727-1.138 2.695-.51 6.012 1.537 8.102 1.99 2.142 5.268 2.932 8.014 1.928 2.878-.98 4.992-3.827 5.068-6.87.153-2.957-1.624-5.881-4.3-7.137a7.552 7.552 0 00-3.43-.75zm.27 1.383c2.71.012 5.254 2.015 5.886 4.656.704 2.577-.482 5.517-2.791 6.867-2.358 1.48-5.682 1.085-7.618-.918-2.043-1.971-2.407-5.381-.84-7.745 1.11-1.763 3.15-2.88 5.234-2.86h.13zm1.833 1.765l-2.074 3.763c-.64.068-.793 1.04-.202 1.3.39.27.696-.18 1.052-.165h3.17v-.865h-3.181l1.992-3.615-.757-.418z"})),CollapsedSubProcess:aU,CollapsedAdHocSubProcess:aU,ExpandedSubProcess:cU,ExpandedAdHocSubProcess:cU,Task:({styles:e={},...t})=>L_("svg",pU({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M6.494 2.667C2.916 2.667 0 5.57 0 9.142v13.383C0 26.097 2.916 29 6.494 29h19.012C29.084 29 32 26.097 32 22.525V9.142c0-3.572-2.916-6.475-6.494-6.475H6.494zm0 2h19.012c2.509 0 4.494 1.98 4.494 4.475v13.383C30 25.02 28.015 27 25.506 27H6.494C3.985 27 2 25.02 2 22.525V9.142c0-2.495 1.985-4.475 4.494-4.475z"})),TextAnnotation:({styles:e={},...t})=>L_("svg",uU({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M22.087 0v31.647H32v-1.788h-8.125V1.788H32V0h-9.913zm-2.924 13.999l-2.737 2.167 2.167 2.738 2.738-2.167-2.168-2.738zm-5.475 4.335L10.95 20.5l2.168 2.738 2.737-2.168-2.167-2.737zm-5.475 4.335l-2.738 2.167 2.168 2.738 2.737-2.168-2.167-2.737zm-5.476 4.335L0 29.17l2.167 2.738 2.738-2.168-2.168-2.737z"})),Transaction:({styles:e={},...t})=>L_("svg",dU({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{d:"M5.422 3A5.424 5.424 0 000 8.422v15.822a5.424 5.424 0 005.422 5.423h21.156A5.424 5.424 0 0032 24.244V8.422A5.424 5.424 0 0026.578 3H5.422zm0 1.244h21.156a4.155 4.155 0 014.178 4.178v15.822a4.155 4.155 0 01-4.178 4.178H5.422a4.155 4.155 0 01-4.178-4.178V8.422a4.155 4.155 0 014.178-4.178zm1.056 1.778a3.373 3.373 0 00-3.367 3.366v13.89a3.373 3.373 0 003.367 3.366h19.044a3.373 3.373 0 003.367-3.366V9.388a3.373 3.373 0 00-3.367-3.366H6.478zm0 1.245h19.044c1.187 0 2.122.935 2.122 2.121v13.89a2.104 2.104 0 01-2.122 2.122H6.478a2.104 2.104 0 01-2.122-2.122V9.388c0-1.186.935-2.121 2.122-2.121z"})),UserTask:({styles:e={},...t})=>L_("svg",hU({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32"},t),L_("path",{fillRule:"evenodd",d:"M10.263 7.468c-1.698 0-2.912 1.305-2.915 2.791v.001c0 .45.121.924.311 1.352.138.309.308.593.516.82-1.235.423-2.683 1.119-3.414 2.49l-.04.075v4.44h11.083v-4.44l-.04-.074c-.72-1.352-2.136-2.047-3.36-2.471.597-.608.774-1.392.774-2.192-.004-1.487-1.218-2.792-2.915-2.792zm-1.16 1.583c.08 0 .165.003.26.008.757.045 1.012.181 1.207.31.196.13.334.252.851.268.404-.016.598-.087.737-.169.056-.033.103-.067.152-.1.128.275.197.578.198.893 0 .894-.154 1.52-.975 2.034l.08.604c.171.052.348.11.527.171.025.105.054.242.073.387.02.153.029.311.016.43a.422.422 0 01-.056.19c-.417.417-1.157.66-1.908.66-.75 0-1.49-.243-1.908-.66a.422.422 0 01-.056-.19 1.949 1.949 0 01.016-.43c.02-.146.049-.284.074-.388.177-.062.352-.118.521-.17l.048-.648a.616.616 0 00-.126-.118c-.183-.138-.405-.44-.562-.793-.157-.353-.254-.757-.254-1.08 0-.387.105-.758.297-1.079l.11-.04c.143-.046.339-.09.679-.09zm-1.448 4.304l-.002.014c-.025.185-.04.387-.018.589.021.202.074.42.248.593.595.594 1.494.857 2.382.857.889 0 1.788-.263 2.382-.857.174-.174.227-.391.249-.593a2.496 2.496 0 00-.018-.59l-.002-.01c.903.396 1.776.963 2.258 1.81v3.599H13.53v-2.538h-.67v2.538H7.651v-2.538h-.67v2.538H5.39v-3.599c.483-.849 1.359-1.416 2.264-1.813zM6.495 3C2.914 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.01C28.016 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5z"}))};function mU(e){const{type:t}=e;let n=yU(t);const i=function(e){const t=Wx(e),n=t.eventDefinitions;return n&&n[0]}(e);if(i)return n=`${function(e){const t=yU(e.$type);return t.replace("EventDefinition","")}(i)}${n}`,(Hx(e,"bpmn:StartEvent")&&!function(e){return e&&!1!==Wx(e).isInterrupting}(e)||Hx(e,"bpmn:BoundaryEvent")&&!function(e){const t=Wx(e);return t&&!1!==t.cancelActivity}(e))&&(n=`${n}NonInterrupting`),n;if(Hx(e,"bpmn:SubProcess")&&!Hx(e,"bpmn:Transaction"))if(SF(e))n=`Event${n}`;else{const t=function(e,t){return!Hx(e,"bpmn:CallActivity")&&(Hx(e,"bpmn:SubProcess")?!(!(t=t||Gx(e))||!Hx(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded:!Hx(e,"bpmn:Participant")||!!Wx(e).processRef)}(e)&&!function(e){const t=e&&(e.di||Wx(e).di);return Hx(t,"bpmndi:BPMNPlane")}(e);n=`${t?"Expanded":"Collapsed"}${n}`}return function(e){const t=Wx(e),n=Wx(e.source);if(!Hx(e,"bpmn:SequenceFlow")||!n)return!1;return n.default&&n.default===t&&(Hx(n,"bpmn:Gateway")||Hx(n,"bpmn:Activity"))}(e)&&(n="DefaultFlow"),function(e){const t=Wx(e),n=Wx(e.source);if(!Hx(e,"bpmn:SequenceFlow")||!n)return!1;return t.conditionExpression&&Hx(n,"bpmn:Activity")}(e)&&(n="ConditionalFlow"),n}const gU=e=>(e||(e=e=>e),{getDocumentationRef:e=>{const t=vU();if(t)return function(e,t){const n=bU(e,t);return n&&n.documentationRef}(e,t)},getElementLabel:e=>Hx(e,"bpmn:Process")?Wx(e).name:kF(e),getElementIcon:e=>{const t=mU(e),n=dV("config.elementTemplateIconRenderer",!1),{iconProperty:i="zeebe:modelerTemplateIcon"}=n||{},r=Wx(e).get(i);return r?()=>q_("img",{class:"bio-properties-panel-header-template-icon",width:"32",height:"32",src:r}):fU[t]},getTypeLabel:t=>{const n=vU();if(n){const i=bU(t,n);if(i&&i.name)return e(i.name)}const i=mU(t);return e(i.replace(/(\B[A-Z])/g," $1").replace(/(\bNon Interrupting)/g,"($1)"))}});function yU(e){return e.split(":")[1]}function vU(){return dV("elementTemplates",!1)}function bU(e,t){return t.get(e)}function xU(){return xU=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",xU({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"64",height:"64"},t),L_("defs",null,L_("rect",{id:"a",width:"57",height:"47",x:"3",y:"8",rx:"7"}),L_("mask",{id:"b",width:"57",height:"47",x:"0",y:"0",fill:"#fff",maskContentUnits:"userSpaceOnUse",maskUnits:"objectBoundingBox"},L_("use",{xlinkHref:"#a"}))),L_("g",{fill:"none",fillRule:"evenodd"},L_("path",{fill:"#818798",d:"M52 11a5 5 0 015 5v31a5 5 0 01-5 5H11a5 5 0 01-5-5V16a5 5 0 015-5h41zm0 2H11a3 3 0 00-2.995 2.824L8 16v31a3 3 0 002.824 2.995L11 50h41a3 3 0 002.995-2.824L55 47V16a3 3 0 00-2.824-2.995L52 13z"}),L_("path",{fill:"#D5D7DD",d:"M16 24h31v6H16zM21 33h21v6H21z"}),L_("use",{stroke:"#B9BCC6",strokeDasharray:"5 2",strokeWidth:"2",mask:"url(#b)",xlinkHref:"#a"})));function _U(){return _U=Object.assign?Object.assign.bind():function(e){for(var t=1;tL_("svg",_U({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"128",height:"64"},t),L_("defs",null,L_("path",{id:"a",d:"M9 9h110v47H9z"}),L_("mask",{id:"b",width:"110",height:"47",x:"0",y:"0",fill:"#fff",maskContentUnits:"userSpaceOnUse",maskUnits:"objectBoundingBox"},L_("use",{xlinkHref:"#a"}))),L_("g",{fill:"none",fillRule:"evenodd"},L_("path",{fill:"#818798",d:"M25 20.272L37.728 33 25 45.728 12.272 33 25 20.272zm0 2.829L15.1 33l9.9 9.9 9.9-9.9-9.9-9.9z"}),L_("path",{fill:"#D5D7DD",d:"M17 47h16v6H17z"}),L_("path",{fill:"#818798",d:"M35 32h27v2H35z"}),L_("path",{fill:"#818798",d:"M60 30v6l6-3z"}),L_("path",{fill:"#D5D7DD",d:"M80 34h21v6H80z"}),L_("g",null,L_("path",{fill:"#818798",d:"M111 12a5 5 0 015 5v31a5 5 0 01-5 5H70a5 5 0 01-5-5V17a5 5 0 015-5h41zm0 2H70a3 3 0 00-3 3v31a3 3 0 003 3h41a3 3 0 003-3V17a3 3 0 00-3-3z"}),L_("path",{fill:"#D5D7DD",d:"M75 25h31v6H75z"})),L_("use",{stroke:"#B9BCC6",strokeDasharray:"5 2",strokeWidth:"2",mask:"url(#b)",xlinkHref:"#a"})));const OU=e=>(e||(e=e=>e),{getEmpty:()=>({text:e("Select an element to edit its properties."),icon:wU}),getMultiple:()=>({text:e("Multiple elements are selected. Select a single element to edit its properties."),icon:EU})});function PU(e){const{element:t,injector:n,getProviders:i,layoutConfig:r,descriptionConfig:o,tooltipConfig:s,feelPopupContainer:a,getFeelPopupLinks:l}=e,c=n.get("canvas"),p=n.get("elementRegistry"),u=n.get("eventBus"),d=n.get("translate"),[f,m]=Ww({selectedElement:t}),g=f.selectedElement,y=e=>{if(!e)return;let t=e;t&&"label"===t.type&&(t=t.labelTarget),m({...f,selectedElement:t}),u.fire("propertiesPanel.updated",{element:t})};Qw((()=>{const e=e=>{const{newSelection:t=[]}=e;if(t.length>1)return y(t);const n=t[0],i=c.getRootElement();(function(e){return e&&e.isImplicit})(i)||y(n||i)};return u.on("selection.changed",e),()=>{u.off("selection.changed",e)}}),[]),Qw((()=>{const e=e=>{const t=function(e,t){return b(e,(e=>e===t))}(e.elements,g);t&&function(e,t){return e&&t.get(e.id)}(t,p)&&y(t)};return u.on("elements.changed",e),()=>{u.off("elements.changed",e)}}),[g]),Qw((()=>{const e=e=>{const t=e.element;y(t)};return u.on("root.added",e),()=>{u.off("root.added",e)}}),[g]),Qw((()=>{const e=()=>{y(g)};return u.on("propertiesPanel.providersChanged",e),()=>{u.off("propertiesPanel.providersChanged",e)}}),[g]),Qw((()=>{const e=()=>{y(g)};return u.on("elementTemplates.changed",e),()=>{u.off("elementTemplates.changed",e)}}),[g]);const v={selectedElement:g,injector:n,getService:(e,t)=>n.get(e,t)},x=i(g),w=Yw((()=>O(x,(function(e,t){if(h(g))return[];return t.getGroups(g)(e)}),[])),[x,g]),[_,E]=Ww(r||{}),P=Zw((e=>{u.fire("propertiesPanel.layoutChanged",{layout:e})}),[u]);Qw((()=>{const e=e=>{const{layout:t}=e;E(t)};return u.on("propertiesPanel.setLayout",e),()=>u.off("propertiesPanel.setLayout",e)}),[u,E]);return q_(uV.Provider,{value:v,children:q_(Hz,{element:g,headerProvider:gU(d),placeholderProvider:OU(d),groups:w,layoutConfig:_,layoutChanged:P,descriptionConfig:o,descriptionLoaded:e=>{u.fire("propertiesPanel.descriptionLoaded",{description:e})},tooltipConfig:s,tooltipLoaded:e=>{u.fire("propertiesPanel.tooltipLoaded",{tooltip:e})},feelPopupContainer:a,getFeelPopupLinks:l,eventBus:u})})}class kU{constructor(e,t,n){const{parent:i,layout:r,description:o,tooltip:s,feelPopupContainer:a,getFeelPopupLinks:l}=e||{};this._eventBus=n,this._injector=t,this._layoutConfig=r,this._descriptionConfig=o,this._tooltipConfig=s,this._feelPopupContainer=a,this._getFeelPopupLinks=l,this._container=be('
    ');var c=t.get("commandStack",!1);c&&function(e,t,n){function i(e){e.preventDefault(),e.stopPropagation()}function r(e){return function(e){return AF(e)&&!DF(e)&&MF(TF,e)}(e)?(n.undo(),i(e)):function(e){return AF(e)&&(MF(CF,e)||MF(TF,e)&&DF(e))}(e)?(n.redo(),i(e)):void 0}t.on("keyboard.bind",(function(){de.bind(e,"keydown",r)})),t.on("keyboard.unbind",(function(){de.unbind(e,"keydown",r)}))}(this._container,n,c),n.on("diagram.init",(()=>{i&&this.attachTo(i)})),n.on("diagram.destroy",(()=>{this.detach()})),n.on("root.added",(e=>{const{element:t}=e;this._render(t)}))}attachTo(e){if(!e)throw new Error("container required");e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),"string"==typeof e&&(e=we(e)),this.detach(),e.appendChild(this._container),this._eventBus.fire("propertiesPanel.attach")}detach(){const e=this._container.parentNode;e&&(e.removeChild(this._container),this._eventBus.fire("propertiesPanel.detach"))}registerProvider(e,t){t||(t=e,e=1e3),"function"==typeof t.getGroups?(this._eventBus.on("propertiesPanel.getProviders",e,(function(e){e.providers.push(t)})),this._eventBus.fire("propertiesPanel.providersChanged")):console.error("Properties provider does not implement #getGroups(element) API")}setLayout(e){this._eventBus.fire("propertiesPanel.setLayout",{layout:e})}_getProviders(){const e=this._eventBus.createEvent({type:"propertiesPanel.getProviders",providers:[]});return this._eventBus.fire(e),e.providers}_render(e){const t=this._injector.get("canvas");e||(e=t.getRootElement()),function(e){return e&&e.isImplicit}(e)||(Mw(q_(PU,{element:e,injector:this._injector,getProviders:this._getProviders.bind(this),layoutConfig:this._layoutConfig,descriptionConfig:this._descriptionConfig,tooltipConfig:this._tooltipConfig,feelPopupContainer:this._feelPopupContainer,getFeelPopupLinks:this._getFeelPopupLinks}),this._container),this._eventBus.fire("propertiesPanel.rendered"))}_destroy(){this._container&&(Mw(null,this._container),this._eventBus.fire("propertiesPanel.destroyed"))}}kU.$inject=["config.propertiesPanel","injector","eventBus"];class SU{constructor(e){this._commandStack=e}preExecute(e){const t=this._commandStack;_(e,(function(e){t.execute(e.cmd,e.context)}))}}SU.$inject=["commandStack"];const CU={"properties-panel.multi-command-executor":SU};function TU(e,t){e.on("diagram.init",(function(){_(CU,(function(e,n){t.registerHandler(n,e)}))}))}TU.$inject=["eventBus","commandStack"];var AU={__depends__:[{__init__:[TU]},_F,OF],__init__:["propertiesPanel"],propertiesPanel:["type",kU]};function MU(e){const{autoFocusEntry:t,element:n,getOptions:i}=e,r=i(n),o=Xq(r);return Qw((()=>{if(t&&o&&r.length>o.length){const e=we(`[data-entry-id="${t}"]`),n=we(".bio-properties-panel-input",e);n&&n.select()}}),[r]),q_(aF,{...e})}function DU(e){return Ux(e,["bpmn:StartEvent","bpmn:BoundaryEvent","bpmn:EndEvent"])&&!!RU(e)}function RU(e){return jU(e,"bpmn:ErrorEventDefinition")}function NU(e){return jU(e,"bpmn:TimerEventDefinition")}function $U(e){const t=RU(e);return t&&t.get("errorRef")}function jU(e,t){return b(Wx(e).get("eventDefinitions")||[],(function(e){return Hx(e,t)}))}function IU(e){return Hx(e,"bpmn:ReceiveTask")?Wx(e):jU(e,"bpmn:MessageEventDefinition")}function LU(e){const t=IU(e);return t&&t.get("messageRef")}function BU(e){return jU(e,"bpmn:LinkEventDefinition")}function qU(e){return jU(e,"bpmn:SignalEventDefinition")}function zU(e){const t=qU(e);return t&&t.get("signalRef")}function FU(e){return jU(e,"bpmn:EscalationEventDefinition")}function VU(e){return Hx(e,"bpmn:Event")&&!!FU(e)}function HU(e){const t=FU(e);return t&&t.get("escalationRef")}function UU(e){return jU(e,"bpmn:CompensateEventDefinition")}function WU(e){const{element:t}=e;return function(e){return Ux(e,["bpmn:EndEvent","bpmn:IntermediateThrowEvent"])&&!!UU(e)}(t)?[{id:"waitForCompletion",component:GU,isEdited:nF},{id:"activityRef",component:QU,isEdited:lF}]:[]}function GU(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=UU(t);return tF({element:t,id:"waitForCompletion",label:i("Wait for completion"),getValue:()=>r.get("waitForCompletion"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:r,properties:{waitForCompletion:e}})}})}function QU(e){const{element:t}=e,n=dV("commandStack"),i=dV("elementRegistry"),r=dV("translate"),o=UU(t);return MU({element:t,id:"activityRef",label:r("Activity reference"),getValue:()=>{const e=function(e){const t=UU(e);return t&&t.get("activityRef")}(t);return e&&e.get("id")},setValue:e=>{const r=e?Wx(i.get(e)):void 0;n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{activityRef:r}})},getOptions:()=>{let e=[{value:"",label:r("")}];const n=function(e){const t=Wx(e);let n=t.$parent,i=YU(n);Hx(n,"bpmn:SubProcess")&&n.triggeredByEvent&&(n=n.$parent,n&&(i=[...i,...YU(n)]));return i}(t);var i;return(i=n,R(i,(e=>(e.name||"").toLowerCase()))).forEach((function(t){e.push({value:t.id,label:ZU(t)})})),e}})}function XU(e,t){const{flowElements:n}=e;return n.filter((function(e){return Hx(e,t)}))}function KU(e,t){return Hx(e,"bpmn:CallActivity")||Hx(e,"bpmn:SubProcess")&&!e.triggeredByEvent&&!e.isForCompensation||function(e,t){const{id:n}=e;return!!b(t,(function(e){const{attachedToRef:t}=e,i=UU(e);return t&&i&&t.id===n}))}(e,t)}function YU(e){const t=function(e){return XU(e,"bpmn:Activity")}(e),n=function(e){return XU(e,"bpmn:BoundaryEvent")}(e);return t.filter((function(e){return KU(e,n)}))}function ZU(e){const{id:t,name:n}=e;return`${n?n+" ":""}(id=${t})`}const JU="text/plain";function eW(e){const{element:t}=e,n=[{id:"documentation",component:tW,isEdited:mF}];return function(e){return Hx(e,"bpmn:Participant")&&e.businessObject.get("processRef")}(t)&&n.push({id:"processDocumentation",component:nW,isEdited:mF}),n}function tW(e){const{element:t}=e,n=dV("bpmnFactory"),i=dV("commandStack"),r=dV("translate"),o=dV("debounceInput"),s=rW(Wx(t)),a=oW(t,Wx(t),n,i);return fF({element:t,id:"documentation",label:r("Element documentation"),getValue:s,setValue:a,debounce:o})}function nW(e){const{element:t}=e,n=dV("bpmnFactory"),i=dV("commandStack"),r=dV("translate"),o=dV("debounceInput"),s=Wx(t).processRef,a=rW(s),l=oW(t,s,n,i);return fF({element:t,id:"processDocumentation",label:r("Process documentation"),getValue:a,setValue:l,debounce:o})}function iW(e){return e.find((function(e){return(e.textFormat||JU)===JU}))}function rW(e){return function(){const t=iW(e&&e.get("documentation"));return t&&t.text}}function oW(e,t,n,i){return function(r){let o=iW(t&&t.get("documentation"));return o?r?i.execute("element.updateModdleProperties",{element:e,moddleElement:o,properties:{text:r}}):i.execute("element.updateModdleProperties",{element:e,moddleElement:t,properties:{documentation:E(t.get("documentation"),o)}}):r?(o=n.create("bpmn:Documentation",{text:r}),i.execute("element.updateModdleProperties",{element:e,moddleElement:t,properties:{documentation:[...t.get("documentation"),o]}})):void 0}}function sW(e,t,n,i){const r=i.create(e,t);return n&&(r.$parent=n),r}function aW(e){return new s([32,32,1]).nextPrefixed(e)}function lW(e){let t=e;for(;t.$parent;)t=t.$parent;return t}function cW(e,t){const n=lW(e);return i=n.get("rootElements"),r=t,(i||[]).filter((e=>Hx(e,r)));var i,r}function pW(e,t,n){return cW(e,t).find((e=>e.id===n))}const uW="create-new";function dW(e){const{element:t}=e;if(!DU(t))return[];let n=[{id:"errorRef",component:hW,isEdited:lF}];return $U(t)&&(n=[...n,{id:"errorName",component:fW,isEdited:bF},{id:"errorCode",component:mW,isEdited:bF}]),n}function hW(e){const{element:t}=e,n=dV("bpmnFactory"),i=dV("commandStack"),r=dV("translate"),o=RU(t);return MU({element:t,id:"errorRef",label:r("Global error reference"),autoFocusEntry:"errorName",getValue:()=>{const e=$U(t);return e?e.get("id"):""},setValue:e=>{const r=lW(o),s=[];let a;return e===uW&&(a=sW("bpmn:Error",{name:aW("Error_")},r,n),e=a.get("id"),s.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:r,properties:{rootElements:[...r.get("rootElements"),a]}}})),a=a||pW(o,"bpmn:Error",e),s.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{errorRef:a}}}),i.execute("properties-panel.multi-command-executor",s)},getOptions:()=>{let e=[{value:"",label:r("")},{value:uW,label:r("Create new ...")}];const n=cW(Wx(t),"bpmn:Error");var i;return(i=n,R(i,(e=>(e.name||"").toLowerCase()))).forEach((t=>{e.push({value:t.get("id"),label:t.get("name")})})),e}})}function fW(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=$U(t);return vF({element:t,id:"errorName",label:i("Name"),getValue:()=>o.get("name"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{name:e}}),debounce:r})}function mW(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=$U(t);return vF({element:t,id:"errorCode",label:i("Code"),getValue:()=>o.get("errorCode"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{errorCode:e}}),debounce:r})}const gW="create-new";function yW(e){const{element:t}=e;if(!VU(t))return[];let n=[{id:"escalationRef",component:vW,isEdited:lF}];return HU(t)&&(n=[...n,{id:"escalationName",component:bW,isEdited:bF},{id:"escalationCode",component:xW,isEdited:bF}]),n}function vW(e){const{element:t}=e,n=dV("bpmnFactory"),i=dV("commandStack"),r=dV("translate"),o=FU(t);return MU({element:t,id:"escalationRef",label:r("Global escalation reference"),autoFocusEntry:"escalationName",getValue:()=>{const e=HU(t);return e&&e.get("id")},setValue:e=>{const r=lW(o),s=[];let a;if(e===gW){const i=aW("Escalation_");a=sW("bpmn:Escalation",{id:i,name:i},r,n),e=a.get("id"),s.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:r,properties:{rootElements:[...r.get("rootElements"),a]}}})}return a=a||pW(o,"bpmn:Escalation",e),s.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{escalationRef:a}}}),i.execute("properties-panel.multi-command-executor",s)},getOptions:()=>{let e=[{value:"",label:r("")},{value:gW,label:r("Create new ...")}];const n=cW(Wx(t),"bpmn:Escalation");var i;return(i=n,R(i,(e=>(e.name||"").toLowerCase()))).forEach((t=>{e.push({value:t.get("id"),label:t.get("name")})})),e}})}function bW(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=HU(t);return vF({element:t,id:"escalationName",label:i("Name"),getValue:()=>o.get("name"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{name:e}}),debounce:r})}function xW(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=HU(t);return vF({element:t,id:"escalationCode",label:i("Code"),getValue:()=>o.get("escalationCode"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{escalationCode:e}}),debounce:r})}function wW(e){const{element:t}=e;return Hx(t,"bpmn:Process")||function(e){return Hx(e,"bpmn:Participant")&&e.businessObject.get("processRef")}(t)?[{id:"isExecutable",component:_W,isEdited:nF}]:[]}function _W(e){const{element:t}=e,n=dV("modeling"),i=dV("commandStack"),r=dV("translate");let o,s;if(s=e=>{n.updateProperties(t,{isExecutable:e})},o=e=>e.businessObject.isExecutable,Hx(t,"bpmn:Participant")){const e=t.businessObject.get("processRef");s=n=>{i.execute("element.updateModdleProperties",{element:t,moddleElement:e,properties:{isExecutable:n}})},o=()=>e.get("isExecutable")}return tF({element:t,id:"isExecutable",label:r("Executable"),getValue:o,setValue:s})}const EW=/\s/,OW=/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i,PW=/^[a-z_][\w-.]*$/i;function kW(e,t,n){const i=e.$model.ids.assigned(t);return t?i&&i!==e?n("ID must be unique."):function(e,t){if(n=e,EW.test(n))return t("ID must not contain spaces.");var n;if(!PW.test(e))return OW.test(e)?t("ID must not contain prefix."):t("ID must be a valid QName.")}(t,n):n("ID must not be empty.")}function SW(e){const{element:t}=e,n=dV("modeling"),i=dV("debounceInput"),r=dV("translate"),o=Zw((e=>Wx(e).id),[t]),s=Zw((e=>kW(Wx(t),e,r)),[t,r]);return vF({element:t,id:"id",label:r(Hx(t,"bpmn:Participant")?"Participant ID":"ID"),getValue:o,setValue:(e,i)=>{i||n.updateProperties(t,{id:e})},debounce:i,validate:s})}function CW(e){const{element:t}=e;return function(e){return Ux(e,["bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"])&&!!BU(e)}(t)?[{id:"linkName",component:TW,isEdited:bF}]:[]}function TW(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=BU(t);return vF({element:t,id:"linkName",label:i("Name"),getValue:()=>o.get("name"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{name:e}})},debounce:r})}const AW="create-new";function MW(e){const{element:t}=e;if(!function(e){return Hx(e,"bpmn:ReceiveTask")||Ux(e,["bpmn:StartEvent","bpmn:EndEvent","bpmn:IntermediateThrowEvent","bpmn:BoundaryEvent","bpmn:IntermediateCatchEvent"])&&!!IU(e)}(t))return[];let n=[{id:"messageRef",component:DW,isEdited:lF}];return LU(t)&&(n=[...n,{id:"messageName",component:RW,isEdited:bF}]),n}function DW(e){const{element:t}=e,n=dV("bpmnFactory"),i=dV("commandStack"),r=dV("translate"),o=IU(t);return MU({element:t,id:"messageRef",label:r("Global message reference"),autoFocusEntry:"messageName",getValue:()=>{const e=LU(t);return e?e.get("id"):""},setValue:e=>{const r=lW(o),s=[];let a;if(e===AW){const i=aW("Message_");a=sW("bpmn:Message",{id:i,name:i},r,n),e=a.get("id"),s.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:r,properties:{rootElements:[...r.get("rootElements"),a]}}})}return a=a||pW(o,"bpmn:Message",e),s.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{messageRef:a}}}),i.execute("properties-panel.multi-command-executor",s)},getOptions:()=>{let e=[{value:"",label:r("")},{value:AW,label:r("Create new ...")}];const n=cW(Wx(t),"bpmn:Message");var i;return(i=n,R(i,(e=>(e.name||"").toLowerCase()))).forEach((t=>{e.push({value:t.get("id"),label:t.get("name")})})),e}})}function RW(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=LU(t);return vF({element:t,id:"messageName",label:i("Name"),getValue:()=>o.get("name"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{name:e}}),debounce:r})}function NW(e){const{element:t}=e;if(!function(e){const t=BW(e);return!!t&&Hx(t,"bpmn:MultiInstanceLoopCharacteristics")}(t))return[];return[{id:"loopCardinality",component:$W,isEdited:bF},{id:"completionCondition",component:jW,isEdited:bF}]}function $W(e){const{element:t}=e,n=dV("bpmnFactory"),i=dV("debounceInput"),r=dV("commandStack"),o=dV("translate");return vF({element:t,id:"loopCardinality",label:o("Loop cardinality"),getValue:()=>function(e){const t=function(e){return LW(e,"loopCardinality")}(e);return IW(t)}(t),setValue:e=>r.execute("element.updateModdleProperties",qW(t,"loopCardinality",e,n)),debounce:i})}function jW(e){const{element:t}=e,n=dV("bpmnFactory"),i=dV("debounceInput"),r=dV("commandStack"),o=dV("translate");return vF({element:t,id:"completionCondition",label:o("Completion condition"),getValue:()=>function(e){const t=function(e){return LW(e,"completionCondition")}(e);return IW(t)}(t),setValue:e=>r.execute("element.updateModdleProperties",qW(t,"completionCondition",e,n)),debounce:i})}function IW(e){return e&&e.get("body")}function LW(e,t){const n=BW(e);return n&&n.get(t)}function BW(e){return Wx(e).loopCharacteristics}function qW(e,t,n,i){const r=BW(e),o={};if(!n)return o[t]=void 0,{element:e,moddleElement:r,properties:o};const s=r.get(t);return s?{element:e,moddleElement:s,properties:{body:n}}:(o[t]=function(e,t,n){return sW("bpmn:FormalExpression",{body:t},e,n)}(r,n,i),{element:e,moddleElement:r,properties:o})}function zW(e){const{element:t}=e;return Ux(t,["bpmn:Collaboration","bpmn:DataAssociation","bpmn:Association"])?[]:[{id:"name",component:FW,isEdited:mF}]}function FW(e){const{element:t}=e,n=dV("modeling"),i=dV("debounceInput"),r=dV("canvas"),o=dV("bpmnFactory"),s=dV("translate");let a={element:t,id:"name",label:s("Name"),debounce:i,setValue:e=>{n.updateProperties(t,{name:e})},getValue:e=>e.businessObject.name,autoResize:!0};return Hx(t,"bpmn:TextAnnotation")?a={...a,setValue:e=>{n.updateProperties(t,{text:e})},getValue:e=>e.businessObject.text}:Hx(t,"bpmn:Group")?a={...a,setValue:e=>{const i=Wx(t);i.categoryValueRef||function(e,t,n){const i=function(e,t){const n=t.create("bpmn:CategoryValue"),i=t.create("bpmn:Category",{categoryValue:[n]});return RF(e.get("rootElements"),i),Wx(i).$parent=e,Wx(n).$parent=i,n}(Wx(t).$parent,n);e.categoryValueRef=i}(i,r.getRootElement(),o),n.updateLabel(t,e)},getValue:e=>{const t=Wx(e).categoryValueRef;return t&&t.value}}:Hx(t,"bpmn:Participant")&&(a.label=s("Participant Name")),fF(a)}function VW(e){const{element:t}=e;return function(e){return Hx(e,"bpmn:Participant")&&e.businessObject.get("processRef")}(t)?[{id:"processId",component:UW,isEdited:bF},{id:"processName",component:HW,isEdited:bF}]:[]}function HW(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=t.businessObject.get("processRef");return vF({element:t,id:"processName",label:i("Process name"),getValue:()=>o.get("name"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{name:e}})},debounce:r})}function UW(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=t.businessObject.get("processRef"),s=Zw((e=>kW(o,e,i)),[o,i]);return vF({element:t,id:"processId",label:i("Process ID"),getValue:()=>o.get("id"),setValue:(e,i)=>{i||n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{id:e}})},debounce:r,validate:s})}const WW="create-new";function GW(e){const{element:t}=e;if(!function(e){return Hx(e,"bpmn:Event")&&!!qU(e)}(t))return[];let n=[{id:"signalRef",component:QW,isEdited:lF}];return zU(t)&&(n=[...n,{id:"signalName",component:XW,isEdited:bF}]),n}function QW(e){const{element:t}=e,n=dV("bpmnFactory"),i=dV("commandStack"),r=dV("translate"),o=qU(t);return MU({element:t,id:"signalRef",label:r("Global signal reference"),autoFocusEntry:"signalName",getValue:()=>{const e=zU(t);return e?e.get("id"):""},setValue:e=>{const r=lW(o),s=[];let a;if(e===WW){const i=aW("Signal_");a=sW("bpmn:Signal",{id:i,name:i},r,n),e=a.get("id"),s.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:r,properties:{rootElements:[...r.get("rootElements"),a]}}})}return a=a||pW(o,"bpmn:Signal",e),s.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{signalRef:a}}}),i.execute("properties-panel.multi-command-executor",s)},getOptions:()=>{let e=[{value:"",label:r("")},{value:WW,label:r("Create new ...")}];const n=cW(Wx(t),"bpmn:Signal");var i;return(i=n,R(i,(e=>(e.name||"").toLowerCase()))).forEach((t=>{e.push({value:t.get("id"),label:t.get("name")})})),e}})}function XW(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=zU(t);return vF({element:t,id:"signalName",label:i("Name"),getValue:()=>o.get("name"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{name:e}}),debounce:r})}function KW(e){return Ux(e,["bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:BoundaryEvent"])&&!!ZW(e)}function YW(e){if(!e)return;if(void 0!==e.get("timeDate"))return"timeDate";if(void 0!==e.get("timeCycle"))return"timeCycle";return void 0!==e.get("timeDuration")?"timeDuration":void 0}function ZW(e){return JW(e,"bpmn:TimerEventDefinition")}function JW(e,t){return b(Wx(e).get("eventDefinitions")||[],(function(e){return Hx(e,t)}))}function eG(e){return JW(e,"bpmn:SignalEventDefinition")}function tG(e){const t=eG(e);return t&&t.get("signalRef")}function nG(e){const{element:t,idPrefix:n}=e;let{timerEventDefinition:i}=e;if(!i){i=ZW(Wx(t))}const r=YW(i);if(!KW(t))return[];const o=[];return o.push({id:sG(n,"timerEventDefinitionType"),component:iG,isEdited:lF,timerEventDefinition:i,timerEventDefinitionType:r}),r&&o.push({id:sG(n,"timerEventDefinitionValue"),component:rG,isEdited:bF,timerEventDefinition:i,timerEventDefinitionType:r}),o}function iG(e){const{element:t,timerEventDefinition:n,timerEventDefinitionType:i}=e,r=dV("commandStack"),o=dV("bpmnFactory"),s=dV("translate");return aF({element:t,id:"timerEventDefinitionType",label:s("Type"),getValue:()=>i||"",setValue:e=>{if(e===i)return;const s=o.create("bpmn:FormalExpression",{body:void 0});s.$parent=n;const a={timeDuration:void 0,timeDate:void 0,timeCycle:void 0};""!==e&&(a[e]=s),r.execute("element.updateModdleProperties",{element:t,moddleElement:n,properties:a})},getOptions:e=>[{value:"",label:s("")},{value:"timeDate",label:s("Date")},{value:"timeDuration",label:s("Duration")},{value:"timeCycle",label:s("Cycle")}]})}function rG(e){const{element:t,timerEventDefinition:n,timerEventDefinitionType:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput"),a=n.get(i);return vF({element:t,id:"timerEventDefinitionValue",label:o("Value"),getValue:()=>a&&a.get("body"),setValue:e=>{r.execute("element.updateModdleProperties",{element:t,moddleElement:a,properties:{body:e}})},debounce:s,tooltip:oG(i,o)})}function oG(e,t){switch(e){case"timeDate":return q_("div",{children:[q_("p",{children:t("A specific point in time defined as ISO 8601 combined date and time representation.")}),q_("ul",{children:[q_("li",{children:[q_("code",{children:"2019-10-01T12:00:00Z"})," - ",t("UTC time")]}),q_("li",{children:[q_("code",{children:"2019-10-02T08:09:40+02:00"})," - ",t("UTC plus 2 hours zone offset")]})]}),q_("a",{href:"https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-date",target:"_blank",rel:"noopener noreferrer",children:t("Documentation: Timer events")})]});case"timeCycle":return q_("div",{children:[q_("p",{children:t("A cycle defined as ISO 8601 repeating intervals format.")}),q_("ul",{children:[q_("li",{children:[q_("code",{children:"R5/PT10S"})," - ",t("every 10 seconds, up to 5 times")]}),q_("li",{children:[q_("code",{children:"R/P1D"})," - ",t("every day, infinitely")]})]}),q_("a",{href:"https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-cycle",target:"_blank",rel:"noopener noreferrer",children:t("Documentation: Timer events")})]});case"timeDuration":return q_("div",{children:[q_("p",{children:t("A time duration defined as ISO 8601 durations format.")}),q_("ul",{children:[q_("li",{children:[q_("code",{children:"PT15S"})," - ",t("15 seconds")]}),q_("li",{children:[q_("code",{children:"PT1H30M"})," - ",t("1 hour and 30 minutes")]}),q_("li",{children:[q_("code",{children:"P14D"})," - ",t("14 days")]})]}),q_("a",{href:"https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-duration",target:"_blank",rel:"noopener noreferrer",children:t("Documentation: Timer events")})]})}}function sG(e,t){return e?e+t:t}function aG(e,t){const n=t.get("translate"),i=[...zW({element:e}),{id:"id",component:SW,isEdited:bF},...VW({element:e}),...wW({element:e})];return{id:"general",label:n("General"),entries:i,component:Jq}}function lG(e,t){const n={label:t.get("translate")("Compensation"),id:"compensation",component:Jq,entries:[...WU({element:e})]};return n.entries.length?n:null}function cG(e,t){const n=t.get("translate"),i=[...eW({element:e})];return{id:"documentation",label:n("Documentation"),entries:i,component:Jq}}function pG(e,t){const n={id:"error",label:t.get("translate")("Error"),component:Jq,entries:[...dW({element:e})]};return n.entries.length?n:null}function uG(e,t){const n={id:"message",label:t.get("translate")("Message"),component:Jq,entries:[...MW({element:e})]};return n.entries.length?n:null}function dG(e,t){const n={id:"signal",label:t.get("translate")("Signal"),component:Jq,entries:[...GW({element:e})]};return n.entries.length?n:null}function hG(e,t){const n={label:t.get("translate")("Link"),id:"link",component:Jq,entries:[...CW({element:e})]};return n.entries.length?n:null}function fG(e,t){const n={id:"escalation",label:t.get("translate")("Escalation"),component:Jq,entries:[...yW({element:e})]};return n.entries.length?n:null}function mG(e,t){const n={label:t.get("translate")("Timer"),id:"timer",component:Jq,entries:[...nG({element:e})]};return n.entries.length?n:null}function gG(e,t){const n={label:t.get("translate")("Multi-instance"),id:"multiInstance",component:Jq,entries:[...NW({element:e})]};return n.entries.length?n:null}class yG{constructor(e,t){e.registerProvider(this),this._injector=t}getGroups(e){return t=>(t=t.concat(function(e,t){return[aG(e,t),cG(e,t),lG(e,t),pG(e,t),hG(e,t),uG(e,t),gG(e,t),dG(e,t),fG(e,t),mG(e,t)].filter((e=>null!==e))}(e,this._injector)),t)}}yG.$inject=["propertiesPanel","injector"];var vG={__init__:["bpmnPropertiesProvider"],bpmnPropertiesProvider:["type",yG]};function bG(e,t=void 0){const n=e.get("extensionElements");if(!n)return[];const i=n.get("values");return i&&i.length?t?i.filter((e=>Hx(e,t))):i:[]}function xG(e,t,n,i,r){const o=[];let s=t.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},t,i),o.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:t,properties:{extensionElements:s}}})),n.$parent=s,o.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:s,properties:{values:[...s.get("values"),n]}}}),r.execute("properties-panel.multi-command-executor",o)}function wG(e,t,n,i){h(n)||(n=[n]);const r=t.get("extensionElements"),o=r.get("values").filter((e=>!n.includes(e)));i.execute("element.updateModdleProperties",{element:e,moddleElement:r,properties:{values:o}})}function _G(e,t){return n=>q_(e,{...n,...t})}const EG={getVariablesForElement:e=>GF(e)};const OG=function(e){return t=>{const n=Yw((()=>{const e=dV("config");return e&&e.propertiesPanel&&e.propertiesPanel.feelTooltipContainer}),[]);return q_(e,{...t,tooltipContainer:n})}}(Nz),PG=function(e){return t=>{const{bpmnElement:n,element:i}=t,r=(n||i).businessObject,[o,s]=Ww([]),a=dV("eventBus"),l=function(e,t){const n=dV(e,!1);if(!n)return t;return n}("variableResolver",EG);return Qw((()=>{const e=()=>{(async()=>{const e=await l.getVariablesForElement(r,i);s(e.map((e=>({...e,info:e.info||e.origin&&"Written in "+e.origin.map((e=>e.name||e.id)).join(", ")}))))})()};return a.on("commandStack.changed",e),e(),()=>{a.off("commandStack.changed",e)}}),[r]),q_(e,{...t,variables:o})}}(OG);function kG(e){const{element:t}=e;return Hx(t,"bpmn:UserTask")?[{id:"assignmentDefinitionAssignee",component:SG,isEdited:Iz},{id:"assignmentDefinitionCandidateGroups",component:CG,isEdited:Iz},{id:"assignmentDefinitionCandidateUsers",component:TG,isEdited:Iz}]:[]}function SG(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory"),r=dV("translate"),o=dV("debounceInput");return PG({element:t,id:"assignmentDefinitionAssignee",label:r("Assignee"),feel:"optional",getValue:()=>(AG(t)||{}).assignee,setValue:e=>{const r=[],o=Wx(t);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,i),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{extensionElements:s}}}));let a=AG(t);a||(a=sW("zeebe:AssignmentDefinition",{},s,i),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{values:[...s.get("values"),a]}}})),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{assignee:e}}}),n.execute("properties-panel.multi-command-executor",r)},debounce:o})}function CG(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory"),r=dV("translate"),o=dV("debounceInput");return PG({element:t,id:"assignmentDefinitionCandidateGroups",label:r("Candidate groups"),feel:"optional",getValue:()=>(AG(t)||{}).candidateGroups,setValue:e=>{let r=[];const o=Wx(t);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,i),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{extensionElements:s}}}));let a=AG(t);a||(a=sW("zeebe:AssignmentDefinition",{},s,i),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{values:[...s.get("values"),a]}}})),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{candidateGroups:e}}}),n.execute("properties-panel.multi-command-executor",r)},debounce:o})}function TG(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory"),r=dV("translate"),o=dV("debounceInput");return PG({element:t,id:"assignmentDefinitionCandidateUsers",label:r("Candidate users"),feel:"optional",getValue:()=>(AG(t)||{}).candidateUsers,setValue:e=>{let r=[];const o=Wx(t);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,i),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{extensionElements:s}}}));let a=AG(t);a||(a=sW("zeebe:AssignmentDefinition",{},s,i),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{values:[...s.get("values"),a]}}})),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{candidateUsers:e}}}),n.execute("properties-panel.multi-command-executor",r)},debounce:o})}function AG(e){return bG(Wx(e),"zeebe:AssignmentDefinition")[0]}function MG(e){return!!Hx(e,"zeebe:ZeebeServiceTask")&&(Hx(e,"bpmn:EndEvent")||Hx(e,"bpmn:IntermediateThrowEvent")?!!IU(e):!(Ux(e,["bpmn:BusinessRuleTask","bpmn:ScriptTask"])&&!function(e){const t=Wx(e);return bG(t,"zeebe:TaskDefinition")[0]}(e)))}function DG(e){return bG(Wx(e),"zeebe:TaskHeaders")[0]}const RG="dmn",NG="jobWorker";function $G(e){const{element:t}=e;return Hx(t,"bpmn:BusinessRuleTask")?[{id:"businessRuleImplementation",component:jG,isEdited:()=>function(e){return IG(e)||LG(e)}(t)}]:[]}function jG(e){const{element:t,id:n}=e,i=dV("commandStack"),r=dV("bpmnFactory"),o=dV("translate");return aF({element:t,id:n,label:o("Implementation"),getValue:()=>LG(t)?RG:IG(t)?NG:"",setValue:e=>{let n,o;e===RG?(n=LG(t),o="zeebe:CalledDecision"):e===NG?(n=IG(t),o="zeebe:TaskDefinition"):function(e,t){const n=Wx(e),i=[IG(e),DG(e),LG(e)].filter(Boolean);wG(e,n,i,t)}(t,i),!n&&o&&(n=sW(o,{},null,r),function(e,t,n,i){const r=Wx(e),o=[];let s,a=r.get("extensionElements");a||(a=sW("bpmn:ExtensionElements",{values:[]},r,n),o.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:r,properties:{extensionElements:a}}}));t.$parent=a,Hx(t,"zeebe:TaskDefinition")?s=E(a.get("values"),LG(e)):Hx(t,"zeebe:CalledDecision")&&(s=E(a.get("values"),IG(e)));o.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:a,properties:{values:[...s,t]}}}),i.execute("properties-panel.multi-command-executor",o)}(t,n,r,i))},getOptions:()=>[{value:"",label:o("")},{value:RG,label:o("DMN decision")},{value:NG,label:o("Job worker")}]})}function IG(e){return bG(Wx(e),"zeebe:TaskDefinition")[0]}function LG(e){return bG(Wx(e),"zeebe:CalledDecision")[0]}function BG(e){const{element:t,type:n}=e,i=dV("bpmnFactory"),r=dV("commandStack"),o=dV("translate");return q_(aF,{element:t,id:"bindingType",label:o("Binding"),getValue:()=>qG(t,n),setValue:e=>{const o=[],s=Wx(t);let a=s.get("extensionElements");a||(a=sW("bpmn:ExtensionElements",{values:[]},s,i),o.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{extensionElements:a}}}));let l=bG(s,n)[0];l||(l=sW(n,{},a,i),o.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{values:[...a.get("values"),l]}}})),o.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:l,properties:{bindingType:e}}}),r.execute("properties-panel.multi-command-executor",o)},getOptions:()=>[{value:"latest",label:o("latest")},{value:"deployment",label:o("deployment")},{value:"versionTag",label:o("version tag")}]})}function qG(e,t){const n=bG(Wx(e),t)[0];return n?n.get("bindingType"):"latest"}function zG(e){const{element:t,type:n}=e,i=dV("bpmnFactory"),r=dV("commandStack"),o=dV("debounceInput"),s=dV("translate");return vF({element:t,id:"versionTag",label:s("Version tag"),getValue:()=>function(e,t){const n=Wx(e),i=bG(n,t)[0];if(!i)return"";return i.get("versionTag")||""}(t,n),setValue:e=>{const o=[],s=Wx(t);let a=s.get("extensionElements");a||(a=sW("bpmn:ExtensionElements",{values:[]},s,i),o.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{extensionElements:a}}}));let l=bG(s,n)[0];l||(l=sW(n,{},a,i),o.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{values:[...a.get("values"),l]}}})),o.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:l,properties:{versionTag:e}}}),r.execute("properties-panel.multi-command-executor",o)},debounce:o})}const FG=_G(BG,{type:"zeebe:CalledDecision"}),VG=_G(zG,{type:"zeebe:CalledDecision"});function HG(e){const{element:t}=e;if(!Hx(t,"bpmn:BusinessRuleTask")||!GG(t))return[];const n=[{id:"decisionId",component:UG,isEdited:Iz},{id:"bindingType",component:FG,isEdited:lF}];return"versionTag"===qG(t,"zeebe:CalledDecision")&&n.push({id:"versionTag",component:VG,isEdited:bF}),n.push({id:"resultVariable",component:WG,isEdited:bF}),n}function UG(e){const{element:t,id:n}=e,i=dV("commandStack"),r=dV("bpmnFactory"),o=dV("translate"),s=dV("debounceInput");return PG({element:t,id:n,label:o("Decision ID"),feel:"optional",getValue:()=>(GG(t)||{}).decisionId,setValue:e=>{const n=[],o=Wx(t);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,r),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{extensionElements:s}}}));let a=GG(t);a||(a=sW("zeebe:CalledDecision",{},s,r),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{values:[...s.get("values"),a]}}})),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{decisionId:e}}}),i.execute("properties-panel.multi-command-executor",n)},debounce:s})}function WG(e){const{element:t,id:n}=e,i=dV("commandStack"),r=dV("bpmnFactory"),o=dV("translate"),s=dV("debounceInput");return vF({element:t,id:n,label:o("Result variable"),getValue:()=>(GG(t)||{}).resultVariable,setValue:e=>{const n=[],o=Wx(t);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,r),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{extensionElements:s}}}));let a=GG(t);a||(a=sW("zeebe:CalledDecision",{},s,r),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{values:[...s.get("values"),a]}}})),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{resultVariable:e}}}),i.execute("properties-panel.multi-command-executor",n)},debounce:s})}function GG(e){return bG(Wx(e),"zeebe:CalledDecision")[0]}function QG(e){const{element:t}=e;if(!Hx(t,"bpmn:SequenceFlow"))return[];const n=[];return function(e){return Ux(e,KG)}(t.source)&&n.push({id:"conditionExpression",component:XG,isEdited:Iz}),n}function XG(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory"),r=dV("translate"),o=dV("debounceInput");return PG({element:t,id:"conditionExpression",label:r("Condition expression"),feel:"required",getValue:()=>function(e){const t=Wx(e),n=t.conditionExpression;if(n)return n.get("body")}(t),setValue:e=>{const r=[],o=Wx(t),s=t.source;s.businessObject.default===o&&r.push({cmd:"element.updateProperties",context:{element:s,properties:{default:void 0}}});const a=e&&""!=e?sW("bpmn:FormalExpression",{body:e},o,i):void 0;r.push({cmd:"element.updateProperties",context:{element:t,properties:{conditionExpression:a}}}),n.execute("properties-panel.multi-command-executor",r)},debounce:o})}const KG=["bpmn:Activity","bpmn:ExclusiveGateway","bpmn:InclusiveGateway"];function YG(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=$U(t);return PG({element:t,id:"errorCode",label:i("Code"),feel:"optional",getValue:()=>o.get("errorCode"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{errorCode:e}}),debounce:r})}function ZG(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=HU(t);return PG({element:t,id:"escalationCode",label:i("Code"),feel:"optional",getValue:()=>o.get("escalationCode"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{escalationCode:e}}),debounce:r})}function JG(e){const{idPrefix:t,element:n,listener:i}=e,r=dV("modeling"),o=dV("translate"),s=dV("debounceInput");return PG({element:n,id:t+"-listenerType",label:o("Listener type"),getValue:()=>i.get("type"),setValue:e=>{r.updateModdleProperties(n,i,{type:e})},debounce:s,feel:"optional"})}function eQ(e){const{idPrefix:t,element:n,listener:i}=e,r=dV("modeling"),o=dV("translate"),s=dV("debounceInput");return PG({element:n,id:t+"-retries",label:o("Retries"),getValue:()=>i.get("retries"),setValue:e=>{r.updateModdleProperties(n,i,{retries:e})},debounce:s,feel:"optional"})}const tQ={start:"Start",end:"End"};function nQ(e){const{element:t,idPrefix:n,listener:i}=e,r=rQ(t),o=r.length>1?[{id:n+"-eventType",component:iQ,idPrefix:n,listener:i,eventTypes:r}]:[];return o.push({id:n+"-listenerType",component:JG,idPrefix:n,listener:i},{id:n+"-retries",component:eQ,idPrefix:n,listener:i}),o}function iQ(e){const{idPrefix:t,element:n,listener:i,eventTypes:r}=e,o=dV("modeling"),s=dV("translate");return aF({element:n,id:t+"-eventType",label:s("Event type"),getValue:()=>i.get("eventType"),setValue:e=>{o.updateModdleProperties(n,i,{eventType:e})},getOptions:()=>r.map((e=>({value:e,label:s(tQ[e])})))})}function rQ(e){return Ux(e,["bpmn:BoundaryEvent","bpmn:StartEvent"])?["end"]:Hx(e,"bpmn:EndEvent")&&function(e){return JW(e,"bpmn:ErrorEventDefinition")}(e)||Hx(e,"bpmn:Gateway")?["start"]:["start","end"]}function oQ({element:e,injector:t}){let n=lQ(e);if(!n)return;if(!function(e,t){const n=t.getTypeDescriptor("zeebe:ExecutionListeners");if(!Ux(e,n.meta.allowedIn))return!1;if(function(e){return Hx(e,"bpmn:BoundaryEvent")&&function(e){return JW(e,"bpmn:CompensateEventDefinition")}(e)}(e))return!1;return!0}(n,t.get("moddle")))return;const i=function(e){const t=cQ(e);return t&&t.get("listeners")}(n)||[],r=t.get("bpmnFactory"),o=t.get("commandStack"),s=t.get("modeling"),a=t.get("translate"),l=i.map(((t,n)=>{const i=e.id+"-executionListener-"+n,r=t.get("type")||"";return{id:i,label:a(`${tQ[t.get("eventType")]}: {type}`,{type:r}),entries:nQ({idPrefix:i,element:e,listener:t}),autoFocusEntry:i+"-eventType",remove:sQ({modeling:s,element:e,listener:t})}}));return{items:l,add:aQ({bpmnFactory:r,commandStack:o,element:e})}}function sQ({modeling:e,element:t,listener:n}){return function(i){i.stopPropagation();const r=cQ(lQ(t));if(!r)return;const o=E(r.get("listeners"),n);e.updateModdleProperties(t,r,{listeners:o})}}function aQ({bpmnFactory:e,commandStack:t,element:n}){return function(i){i.stopPropagation();let r=[];const o=lQ(n);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,e),r.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:o,properties:{extensionElements:s}}}));let a=cQ(o);if(!a){a=sW("zeebe:ExecutionListeners",{listeners:[]},s,e),r.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:s,properties:{values:[...s.get("values"),a]}}})}const l=sW("zeebe:ExecutionListener",function(e){const t=rQ(e);return{eventType:t[0]}}(n),a,e);r.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:a,properties:{listeners:[...a.get("listeners"),l]}}}),t.execute("properties-panel.multi-command-executor",r)}}function lQ(e){let t=Wx(e);return Hx(e,"bpmn:Participant")?t.get("processRef"):t}function cQ(e){const t=bG(e,"zeebe:ExecutionListeners");return t&&t[0]}const pQ="camunda-form-embedded",uQ="camunda-form-linked",dQ="custom-form",hQ="external-reference";function fQ(e){return bG(Wx(e),"zeebe:FormDefinition")[0]}function mQ(e,t){t=t||yQ(e);const n=fQ(e);if(!n)return;const i=n.get("formKey");return bG(t,"zeebe:UserTaskForm").find((e=>gQ(e.get("id"))===i))}function gQ(e){return`camunda-forms:bpmn:${e}`}function yQ(e){let t=Wx(e);for(;t.$parent&&!Hx(t,"bpmn:Process");)t=t.$parent;return t}function vQ(e){const t=fQ(e);if(!t)return;const n=t.get("formId"),i=t.get("formKey"),r=t.get("externalReference");return u(n)?uQ:u(r)?hQ:u(i)?mQ(e)?pQ:dQ:void 0}function bQ(e){return bG(Wx(e),"zeebe:UserTask").length>0}const xQ=_G(BG,{type:"zeebe:FormDefinition"}),wQ=_G(zG,{type:"zeebe:FormDefinition"}),_Q="none";function EQ(e){const{element:t}=e;if(!Hx(t,"bpmn:UserTask"))return[];const n=[{id:"formType",component:OQ,isEdited:e=>e.value!==_Q}],i=vQ(t);return i===pQ?n.push({id:"formConfiguration",component:PQ,isEdited:mF}):i===uQ?n.push({id:"formId",component:kQ,isEdited:bF}):i===dQ?n.push({id:"customFormKey",component:SQ,isEdited:bF}):i===hQ&&n.push({id:"externalReference",component:CQ,isEdited:Iz}),i===uQ&&(n.push({id:"bindingType",component:xQ,isEdited:lF}),"versionTag"===qG(t,"zeebe:FormDefinition")&&n.push({id:"versionTag",component:wQ,isEdited:bF})),n}function OQ(e){const{element:t}=e,n=dV("injector"),i=dV("translate");return aF({element:t,id:"formType",label:i("Type"),getValue:()=>vQ(t)||_Q,setValue:e=>{!function(e,t,n){n===pQ?$Q(e,t,""):n===uQ?DQ(e,t,""):n===dQ?RQ(e,t,""):n===hQ?NQ(e,t,""):function(e,t){const n=fQ(t),i=e.get("modeling");if(n){const e=Wx(t).get("extensionElements");i.updateModdleProperties(t,e,{values:E(e.get("values"),n)})}}(e,t)}(n,t,e)},getOptions:()=>function(e,t){if(bQ(t))return[{value:_Q,label:e("")},{value:uQ,label:e("Camunda Form")},{value:hQ,label:e("External form reference")}];return[{value:_Q,label:e("")},{value:uQ,label:e("Camunda Form (linked)")},{value:pQ,label:e("Camunda Form (embedded)")},{value:dQ,label:e("Custom form key")}]}(i,t)})}function PQ(e){const{element:t}=e,n=dV("debounceInput"),i=dV("injector"),r=dV("translate");return fF({element:t,id:"formConfiguration",label:r("Form JSON configuration"),rows:4,getValue:()=>mQ(t).get("body"),setValue:e=>{$Q(i,t,p(e)?"":e)},debounce:n})}function kQ(e){const{element:t}=e,n=dV("debounceInput"),i=dV("injector"),r=dV("translate");return vF({element:t,id:"formId",label:r("Form ID"),getValue:()=>fQ(t).get("formId"),setValue:e=>{DQ(i,t,p(e)?"":e)},debounce:n})}function SQ(e){const{element:t}=e,n=dV("debounceInput"),i=dV("injector"),r=dV("translate");return vF({element:t,id:"customFormKey",label:r("Custom form key"),getValue:()=>fQ(t).get("formKey"),setValue:e=>{RQ(i,t,p(e)?"":e)},debounce:n})}function CQ(e){const{element:t}=e,n=dV("debounceInput"),i=dV("injector"),r=dV("translate");return PG({element:t,id:"externalReference",label:r("External form reference"),feel:"optional",getValue:()=>fQ(t).get("externalReference"),setValue:e=>{NQ(i,t,p(e)?"":e)},debounce:n})}function TQ(e,t,n){const i=n||Wx(t);let r=i.get("extensionElements");if(r)return{commands:[],extensionElements:r};return r=sW("bpmn:ExtensionElements",{values:[]},i,e.get("bpmnFactory")),{commands:[jQ(t,i,{extensionElements:r})],extensionElements:r}}function AQ(e,t){let n=fQ(t);if(n)return{commands:[],formDefinition:n};const{extensionElements:i,commands:r}=TQ(e,t);return n=function(e,t,n){const i=e.get("bpmnFactory");return sW("zeebe:FormDefinition",t,n,i)}(e,{},i),{commands:[...r,jQ(t,i,{values:[...i.get("values"),n]})],formDefinition:n}}function MQ(e,t){let n=mQ(t);if(n)return{commands:[],formDefinition:fQ(t),userTaskForm:n};const i=yQ(t),{extensionElements:r,commands:o}=TQ(e,t,i),{formDefinition:s,commands:a}=AQ(e,t),l=aW("UserTaskForm_");return n=function(e,t,n){const i=e.get("bpmnFactory");return sW("zeebe:UserTaskForm",t,n,i)}(e,{id:l},r),{commands:[...o,...a,jQ(t,r,{values:[...r.get("values"),n]}),jQ(t,s,{formKey:gQ(l)})],formDefinition:s,userTaskForm:n}}function DQ(e,t,n){let{commands:i,formDefinition:r}=AQ(e,t);e.get("commandStack").execute("properties-panel.multi-command-executor",[...i,jQ(t,r,{formId:n})])}function RQ(e,t,n){let{commands:i,formDefinition:r}=AQ(e,t);e.get("commandStack").execute("properties-panel.multi-command-executor",[...i,jQ(t,r,{formKey:n})])}function NQ(e,t,n){let{commands:i,formDefinition:r}=AQ(e,t);e.get("commandStack").execute("properties-panel.multi-command-executor",[...i,jQ(t,r,{externalReference:n})])}function $Q(e,t,n){let{commands:i,userTaskForm:r}=MQ(e,t);e.get("commandStack").execute("properties-panel.multi-command-executor",[...i,jQ(t,r,{body:n})])}function jQ(e,t,n){return{cmd:"element.updateModdleProperties",context:{element:e,moddleElement:t,properties:n}}}function IQ(e){const{idPrefix:t,header:n}=e;return[{id:t+"-key",component:LQ,header:n,idPrefix:t},{id:t+"-value",component:BQ,header:n,idPrefix:t}]}function LQ(e){const{idPrefix:t,element:n,header:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-key",label:o("Key"),getValue:e=>e.key,setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{key:e}})},debounce:s})}function BQ(e){const{idPrefix:t,element:n,header:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return fF({element:i,id:t+"-value",label:o("Value"),getValue:e=>e.value,setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{value:e}})},debounce:s,autoResize:!0})}function qQ({element:e,injector:t}){if(!function(e){return Hx(e,"bpmn:UserTask")||MG(e)}(e))return null;const n=function(e){const t=DG(e);return t?t.get("values"):[]}(e)||[],i=t.get("bpmnFactory"),r=t.get("commandStack"),o=n.map(((t,n)=>{const i=e.id+"-header-"+n;return{id:i,label:t.get("key")||"",entries:IQ({idPrefix:i,element:e,header:t}),autoFocusEntry:i+"-key",remove:zQ({commandStack:r,element:e,header:t})}}));return{items:o,add:FQ({bpmnFactory:i,commandStack:r,element:e})}}function zQ({commandStack:e,element:t,header:n}){return function(i){i.stopPropagation();let r=[];const o=DG(t);if(!o)return;const s=E(o.get("values"),n);if(r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{values:s}}}),!s.length){const e=Wx(t).get("extensionElements");r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:e,properties:{values:E(e.get("values"),o)}}})}e.execute("properties-panel.multi-command-executor",r)}}function FQ({bpmnFactory:e,commandStack:t,element:n}){return function(i){i.stopPropagation();let r=[];const o=Wx(n);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,e),r.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:o,properties:{extensionElements:s}}}));let a=DG(n);if(!a){a=sW("zeebe:TaskHeaders",{values:[]},s,e),r.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:s,properties:{values:[...s.get("values"),a]}}})}const l=sW("zeebe:Header",{},a,e);r.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:a,properties:{values:[...a.get("values"),l]}}}),t.execute("properties-panel.multi-command-executor",r)}}function VQ(e){const t=function(e){const t=Wx(e);return bG(t,"zeebe:CalledElement")}(e);return t[0]}function HQ(e){const{element:t}=e;return Hx(t,"bpmn:CallActivity")?[{id:"propagateAllParentVariables",component:UQ,isEdited:wz}]:[]}function UQ(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory"),r=dV("translate"),o=function(e){if(!Hx(e,"bpmn:CallActivity"))return;const t=Wx(e),n=VQ(t);return!n||!v(n,"propagateAllParentVariables")||n.get("propagateAllParentVariables")}(t);return xz({id:"propagateAllParentVariables",label:r("Propagate all parent process variables"),switcherLabel:r(o?"On":"Off"),tooltip:q_("div",{children:[q_("p",{children:r("If turned on, all variables from the parent process instance will be propagated to the child process instance.")}),q_("p",{children:r("Otherwise, only variables defined via input mappings will be propagated.")})]}),getValue:()=>o,setValue:e=>{const r=[],o=Wx(t);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,i),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{extensionElements:s}}}));let a=VQ(o);a||(a=sW("zeebe:CalledElement",{},s,i),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{values:[...s.get("values"),a]}}})),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{propagateAllParentVariables:e}}}),n.execute("properties-panel.multi-command-executor",r)}})}function WQ(e){const{idPrefix:t,parameter:n}=e;return[{id:t+"-target",component:GQ,idPrefix:t,parameter:n},{id:t+"-source",component:QQ,idPrefix:t,parameter:n}]}function GQ(e){const{idPrefix:t,element:n,parameter:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-target",label:o(Hx(i,"zeebe:Input")?"Local variable name":"Process variable name"),getValue:e=>e.target,setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{target:e}})},debounce:s})}function QQ(e){const{idPrefix:t,element:n,parameter:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return PG({bpmnElement:n,element:i,id:t+"-source",label:o("Variable assignment value"),feel:"required",getValue:e=>e.source,setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{source:e}})},debounce:s})}function XQ(e,t){const n=KQ(e);return n&&n.get(t)||[]}function KQ(e){return(function(e,t,n){const i=bG(e,t);return n?(i[0]||{})[n]||[]:i}(Wx(e),"zeebe:IoMapping")||[])[0]}function YQ(e){return XQ.apply(this,[e,"outputParameters"])}function ZQ(e){return Ux(e,["bpmn:UserTask","bpmn:SubProcess","bpmn:CallActivity","bpmn:BusinessRuleTask","bpmn:ScriptTask"])||MG(e)||function(e){if(!Ux(e,["bpmn:EndEvent","bpmn:IntermediateThrowEvent"]))return!1;return!!jU(e,"bpmn:SignalEventDefinition")}(e)}function JQ(e){return(!Hx(e,"bpmn:EndEvent")||!RU(e)&&!function(e){return jU(e,"bpmn:TerminateEventDefinition")}(e))&&Ux(e,["zeebe:ZeebeServiceTask","bpmn:UserTask","bpmn:SubProcess","bpmn:ReceiveTask","bpmn:CallActivity","bpmn:Event","bpmn:BusinessRuleTask"])}function eX(e,t,n){return sW("zeebe:IoMapping",e,t,n)}function tX({element:e,injector:t}){if(!ZQ(e))return null;const n=function(e){return XQ.apply(this,[e,"inputParameters"])}(e)||[],i=t.get("bpmnFactory"),r=t.get("commandStack"),o=n.map(((t,n)=>{const i=e.id+"-input-"+n;return{id:i,label:t.get("target")||"",entries:WQ({idPrefix:i,element:e,parameter:t}),autoFocusEntry:i+"-target",remove:nX({commandStack:r,element:e,parameter:t})}}));return{items:o,add:iX({element:e,bpmnFactory:i,commandStack:r})}}function nX({commandStack:e,element:t,parameter:n}){return function(i){i.stopPropagation();const r=[],o=KQ(t);if(!o)return;const s=E(o.get("inputParameters"),n);r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{inputParameters:s}}});const a=Wx(t).get("extensionElements"),l=E(a.get("values"),o);s.length||o.get("outputParameters").length||r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{values:l}}}),e.execute("properties-panel.multi-command-executor",r)}}function iX({element:e,bpmnFactory:t,commandStack:n}){return function(i){i.stopPropagation();const r=[],o=Wx(e);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,t),r.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:o,properties:{extensionElements:s}}}));let a=KQ(e);a||(a=eX({inputParameters:[],outputParameters:[]},s,t),r.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:s,properties:{values:[...s.get("values"),a]}}}));const l=sW("zeebe:Input",{target:aW("InputVariable_")},a,t);r.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:a,properties:{inputParameters:[...a.get("inputParameters"),l]}}}),n.execute("properties-panel.multi-command-executor",r)}}function rX(e){const{element:t}=e,n=LU(t),i=[];return n&&i.push({id:"messageName",component:oX,isEdited:Iz}),n&&function(e){if(Hx(e,"bpmn:ReceiveTask"))return!0;if(!Hx(e,"bpmn:StartEvent"))return!0;if(Hx(e,"bpmn:StartEvent")&&SF(e.parent))return!0;return!1}(t)&&i.push({id:"messageSubscriptionCorrelationKey",component:sX,isEdited:Iz}),i}function oX(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=LU(t);return PG({element:t,id:"messageName",label:i("Name"),feel:"optional",getValue:()=>o.get("name"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{name:e}}),debounce:r})}function sX(e){const{element:t}=e,n=dV("bpmnFactory"),i=dV("commandStack"),r=dV("translate"),o=dV("debounceInput");return PG({element:t,id:"messageSubscriptionCorrelationKey",label:r("Subscription correlation key"),feel:"required",getValue:()=>function(e){const t=aX(e);return t?t.get("correlationKey"):""}(t),setValue:e=>{const r=[],o={correlationKey:e},s=LU(t);let a=s.get("extensionElements");a||(a=sW("bpmn:ExtensionElements",{values:[]},s,n),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{extensionElements:a}}}));let l=aX(t);l?r.push({cmd:"element.updateModdleProperties",context:{element:t,properties:o,moddleElement:l}}):(l=sW("zeebe:Subscription",o,a,n),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{values:[...a.get("values"),l]}}})),i.execute("properties-panel.multi-command-executor",r)},debounce:o})}function aX(e){const t=function(e){const t=bG(e,"zeebe:Subscription");return t}(LU(e));return t[0]}function lX(e){const{element:t}=e;return function(e){return!!fX(e)}(t)?[{id:"multiInstance-inputCollection",component:cX,isEdited:Iz},{id:"multiInstance-inputElement",component:pX,isEdited:bF},{id:"multiInstance-outputCollection",component:uX,isEdited:bF},{id:"multiInstance-outputElement",component:dX,isEdited:Iz},{id:"multiInstance-completionCondition",component:hX,isEdited:Iz}]:[]}function cX(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory"),r=dV("translate"),o=dV("debounceInput");return PG({element:t,id:"multiInstance-inputCollection",label:r("Input collection"),feel:"required",getValue:()=>yX(t,"inputCollection"),setValue:e=>vX(t,"inputCollection",e,n,i),debounce:o})}function pX(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory"),r=dV("translate"),o=dV("debounceInput");return vF({element:t,id:"multiInstance-inputElement",label:r("Input element"),getValue:()=>yX(t,"inputElement"),setValue:e=>vX(t,"inputElement",e,n,i),debounce:o})}function uX(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory"),r=dV("translate"),o=dV("debounceInput");return vF({element:t,id:"multiInstance-outputCollection",label:r("Output collection"),getValue:()=>yX(t,"outputCollection"),setValue:e=>vX(t,"outputCollection",e,n,i),debounce:o})}function dX(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory"),r=dV("translate"),o=dV("debounceInput");return PG({element:t,id:"multiInstance-outputElement",label:r("Output element"),feel:"required",getValue:()=>yX(t,"outputElement"),setValue:e=>vX(t,"outputElement",e,n,i),debounce:o})}function hX(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory"),r=dV("translate"),o=dV("debounceInput");return PG({element:t,id:"multiInstance-completionCondition",label:r("Completion condition"),feel:"required",getValue:()=>{const e=function(e){return fX(e).get("completionCondition")}(t);return e&&e.get("body")},setValue:e=>{if(e&&""!==e){const r=sW("bpmn:FormalExpression",{body:e},fX(t),i);gX(t,n,r)}else gX(t,n,void 0)},debounce:o})}function fX(e){return Wx(e).get("loopCharacteristics")}function mX(e){const t=bG(e,"zeebe:LoopCharacteristics");return t&&t[0]}function gX(e,t,n=void 0){t.execute("element.updateModdleProperties",{element:e,moddleElement:fX(e),properties:{completionCondition:n}})}function yX(e,t){const n=mX(fX(e));return n&&n.get(t)}function vX(e,t,n,i,r){const o=fX(e),s=[];let a=o.get("extensionElements");a||(a=sW("bpmn:ExtensionElements",{values:[]},o,r),s.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:o,properties:{extensionElements:a}}}));let l=mX(o);l||(l=sW("zeebe:LoopCharacteristics",{},a,r),s.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:a,properties:{values:[...a.get("values"),l]}}})),s.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:l,properties:{[t]:n}}}),i.execute("properties-panel.multi-command-executor",s)}function bX(e){const{element:t}=e;return Hx(t,"bpmn:CallActivity")?[{id:"propagateAllChildVariables",component:xX,isEdited:wz}]:[]}function xX(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory"),r=dV("translate"),o=function(e){if(!Hx(e,"bpmn:CallActivity"))return;const t=Wx(e),n=VQ(t);return n&&v(n,"propagateAllChildVariables")?n.get("propagateAllChildVariables"):function(e){const t=YQ(e);if(t)return!(t.length>0)}(e)}(t);return xz({id:"propagateAllChildVariables",label:r("Propagate all child process variables"),switcherLabel:r(o?"On":"Off"),tooltip:q_("div",{children:[q_("p",{children:r("If turned on, all variables from the child process instance will be propagated to the parent process instance.")}),q_("p",{children:r("Otherwise, only variables defined via output mappings will be propagated.")})]}),getValue:()=>o,setValue:e=>{const r=[],o=Wx(t);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,i),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{extensionElements:s}}}));let a=VQ(o);a||(a=sW("zeebe:CalledElement",{},s,i),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{values:[...s.get("values"),a]}}})),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{propagateAllChildVariables:e}}}),n.execute("properties-panel.multi-command-executor",r)}})}function wX({element:e,injector:t}){if(!JQ(e))return null;const n=YQ(e)||[],i=t.get("bpmnFactory"),r=t.get("commandStack"),o=n.map(((t,n)=>{const i=e.id+"-output-"+n;return{id:i,label:t.get("target")||"",entries:WQ({idPrefix:i,element:e,parameter:t}),autoFocusEntry:i+"-target",remove:_X({commandStack:r,element:e,parameter:t})}}));return{items:o,add:EX({element:e,bpmnFactory:i,commandStack:r})}}function _X({commandStack:e,element:t,parameter:n}){return function(i){i.stopPropagation();let r=[];const o=KQ(t);if(!o)return;const s=E(o.get("outputParameters"),n);if(r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{outputParameters:s}}}),!o.get("inputParameters").length&&!s.length){const e=Wx(t).get("extensionElements"),n=E(e.get("values"),o);r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:e,properties:{values:n}}})}e.execute("properties-panel.multi-command-executor",r)}}function EX({element:e,bpmnFactory:t,commandStack:n}){return function(i){i.stopPropagation();let r=[];const o=Wx(e);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,t),r.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:o,properties:{extensionElements:s}}}));let a=KQ(e);if(!a){a=eX({inputParameters:[],outputParameters:[]},s,t),r.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:s,properties:{values:[...s.get("values"),a]}}})}const l=sW("zeebe:Output",{target:aW("OutputVariable_")},a,t);r.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:a,properties:{outputParameters:[...a.get("outputParameters"),l]}}}),n.execute("properties-panel.multi-command-executor",r)}}function OX(e){const{element:t}=e;return function(e){const t=Wx(e);return Hx(e,"bpmn:UserTask")&&!!bG(t,"zeebe:UserTask")[0]}(t)?[{id:"priorityDefinitionPriority",component:PX,isEdited:Iz}]:[]}function PX(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory"),r=dV("translate"),o=dV("debounceInput");return PG({element:t,id:"priorityDefinitionPriority",label:r("Priority"),feel:"optional",getValue:()=>(kX(t)||{}).priority,setValue:e=>{const r=[];let o=Wx(t).get("extensionElements"),s=kX(t);const a=null===e||""===e||void 0===e;s&&a?r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{values:o.get("values").filter((e=>e!==s))}}}):s&&!a?r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{priority:e}}}):s||a||(s=sW("zeebe:PriorityDefinition",{priority:e},o,i),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{values:[...o.get("values"),s]}}})),n.execute("properties-panel.multi-command-executor",r)},debounce:o})}function kX(e){return bG(Wx(e),"zeebe:PriorityDefinition")[0]}const SX="script",CX="jobWorker";function TX(e){const{element:t}=e;return Hx(t,"bpmn:ScriptTask")?[{id:"scriptImplementation",component:AX,isEdited:()=>function(e){return MX(e)||DX(e)}(t)}]:[]}function AX(e){const{element:t,id:n}=e,i=dV("commandStack"),r=dV("bpmnFactory"),o=dV("translate");return aF({element:t,id:n,label:o("Implementation"),getValue:()=>DX(t)?SX:MX(t)?CX:"",setValue:e=>{let n,o;e===SX?(n=DX(t),o="zeebe:Script"):e===CX?(n=MX(t),o="zeebe:TaskDefinition"):function(e,t){const n=Wx(e),i=MX(e),r=function(e){const t=Wx(e);return bG(t,"zeebe:TaskHeaders")}(e),o=DX(e);if(i){return void wG(e,n,[i,r].filter(Boolean),t)}o&&wG(e,n,o,t)}(t,i),!n&&o&&(n=sW(o,{},null,r),function(e,t,n,i){const r=Wx(e),o=[];let s,a=r.get("extensionElements");a||(a=sW("bpmn:ExtensionElements",{values:[]},r,n),o.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:r,properties:{extensionElements:a}}}));if(t.$parent=a,Hx(t,"zeebe:TaskDefinition"))s=E(a.get("values"),DX(e));else if(Hx(t,"zeebe:Script")){const e=e=>Ux(e,["zeebe:TaskDefinition","zeebe:TaskHeaders"]);s=E(a.get("values"),e)}o.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:a,properties:{values:[...s,t]}}}),i.execute("properties-panel.multi-command-executor",o)}(t,n,r,i))},getOptions:()=>[{value:"",label:o("")},{value:SX,label:o("FEEL expression")},{value:CX,label:o("Job worker")}]})}function MX(e){return bG(Wx(e),"zeebe:TaskDefinition")[0]}function DX(e){return bG(Wx(e),"zeebe:Script")[0]}function RX(e){const{element:t}=e;return Hx(t,"bpmn:ScriptTask")&&jX(t)?[{id:"resultVariable",component:$X,isEdited:bF},{id:"scriptExpression",component:NX,isEdited:Iz}]:[]}function NX(e){const{element:t,id:n}=e,i=dV("commandStack"),r=dV("bpmnFactory"),o=dV("translate"),s=dV("debounceInput");return PG({element:t,id:n,label:o("FEEL expression"),feel:"required",getValue:()=>(jX(t)||{}).get("expression"),setValue:e=>{const n=[],o=Wx(t);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,r),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{extensionElements:s}}}));let a=jX(t);a||(a=sW("zeebe:Script",{},s,r),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{values:[...s.get("values"),a]}}})),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{expression:e}}}),i.execute("properties-panel.multi-command-executor",n)},debounce:s})}function $X(e){const{element:t,id:n}=e,i=dV("commandStack"),r=dV("bpmnFactory"),o=dV("translate"),s=dV("debounceInput");return vF({element:t,id:n,label:o("Result variable"),getValue:()=>(jX(t)||{}).resultVariable,setValue:e=>{const n=[],o=Wx(t);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,r),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{extensionElements:s}}}));let a=jX(t);a||(a=sW("zeebe:Script",{},s,r),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{values:[...s.get("values"),a]}}})),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{resultVariable:e}}}),i.execute("properties-panel.multi-command-executor",n)},debounce:s})}function jX(e){return bG(Wx(e),"zeebe:Script")[0]}function IX(e){const{element:t}=e;if(!function(e){return Hx(e,"bpmn:Event")&&!!eG(e)}(t))return[];let n=[];return tG(t)&&(n=[...n,{id:"signalName",component:LX,isEdited:Iz}]),n}function LX(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=tG(t);return PG({element:t,id:"signalName",label:i("Name"),feel:"optional",getValue:()=>o.get("name"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{name:e}}),debounce:r})}const BX=_G(BG,{type:"zeebe:CalledElement"}),qX=_G(zG,{type:"zeebe:CalledElement"});function zX(e){const{element:t}=e;if(!Hx(t,"bpmn:CallActivity"))return[];const n=[{id:"targetProcessId",component:FX,isEdited:Iz},{id:"bindingType",component:BX,isEdited:lF}];return"versionTag"===qG(t,"zeebe:CalledElement")&&n.push({id:"versionTag",component:qX,isEdited:bF}),n}function FX(e){const{element:t,id:n}=e,i=dV("commandStack"),r=dV("bpmnFactory"),o=dV("translate"),s=dV("debounceInput");return PG({element:t,id:n,label:o("Process ID"),feel:"optional",getValue:()=>function(e){const t=VQ(e);return t?t.get("processId"):""}(t),setValue:e=>{const n=[],o=Wx(t);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,r),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{extensionElements:s}}}));let a=VQ(o);a||(a=sW("zeebe:CalledElement",{},s,r),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{values:[...s.get("values"),a]}}})),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{processId:e}}}),i.execute("properties-panel.multi-command-executor",n)},debounce:s})}function VX(e){const{element:t}=e;return MG(t)?[{id:"taskDefinitionType",component:HX,isEdited:Iz},{id:"taskDefinitionRetries",component:UX,isEdited:Iz}]:[]}function HX(e){const{element:t,id:n}=e,i=dV("commandStack"),r=dV("bpmnFactory"),o=dV("translate"),s=dV("debounceInput");return PG({element:t,id:n,label:o("Job type"),feel:"optional",getValue:()=>(WX(t)||{}).type,setValue:e=>{const n=[],o=Wx(t);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,r),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{extensionElements:s}}}));let a=WX(t);a||(a=sW("zeebe:TaskDefinition",{},s,r),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{values:[...s.get("values"),a]}}})),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{type:e}}}),i.execute("properties-panel.multi-command-executor",n)},debounce:s})}function UX(e){const{element:t,id:n}=e,i=dV("commandStack"),r=dV("bpmnFactory"),o=dV("translate"),s=dV("debounceInput");return PG({element:t,id:n,label:o("Retries"),feel:"optional",getValue:()=>(WX(t)||{}).retries,setValue:e=>{let n=[];const o=Wx(t);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,r),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{extensionElements:s}}}));let a=WX(t);a||(a=sW("zeebe:TaskDefinition",{},s,r),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{values:[...s.get("values"),a]}}})),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{retries:e}}}),i.execute("properties-panel.multi-command-executor",n)},debounce:s})}function WX(e){return bG(Wx(e),"zeebe:TaskDefinition")[0]}const GX=["complete","assignment"],QX={complete:"Complete",assignment:"Assignment"};function XX(e){const{idPrefix:t,listener:n}=e;return[{id:t+"-eventType",component:KX,idPrefix:t,listener:n,eventTypes:GX},{id:t+"-listenerType",component:JG,idPrefix:t,listener:n},{id:t+"-retries",component:eQ,idPrefix:t,listener:n}]}function KX(e){const{idPrefix:t,element:n,listener:i,eventTypes:r}=e,o=dV("modeling"),s=dV("translate");return aF({element:n,id:t+"-eventType",label:s("Event type"),getValue:()=>i.get("eventType"),setValue:e=>{o.updateModdleProperties(n,i,{eventType:e})},getOptions:()=>r.map((e=>({value:e,label:s(QX[e])})))})}function YX({element:e,injector:t}){let n=eK(e);if(!n)return;if(!bQ(e))return;if(!function(e,t){const n=t.getTypeDescriptor("zeebe:TaskListeners");return Ux(e,n.meta.allowedIn)}(n,t.get("moddle")))return;const i=function(e){const t=tK(e);return t&&t.get("listeners")}(n)||[],r=t.get("bpmnFactory"),o=t.get("commandStack"),s=t.get("modeling"),a=t.get("translate"),l=i.map(((t,n)=>{const i=e.id+"-taskListener-"+n,r=t.get("type")||"";return{id:i,label:a(`${QX[t.get("eventType")]}: {type}`,{type:r}),entries:XX({idPrefix:i,listener:t}),autoFocusEntry:i+"-eventType",remove:ZX({modeling:s,element:e,listener:t})}}));return{items:l,add:JX({bpmnFactory:r,commandStack:o,element:e})}}function ZX({modeling:e,element:t,listener:n}){return function(i){i.stopPropagation();const r=tK(eK(t));if(!r)return;const o=E(r.get("listeners"),n);e.updateModdleProperties(t,r,{listeners:o})}}function JX({bpmnFactory:e,commandStack:t,element:n}){return function(i){i.stopPropagation();let r=[];const o=eK(n);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,e),r.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:o,properties:{extensionElements:s}}}));let a=tK(o);if(!a){a=sW("zeebe:TaskListeners",{listeners:[]},s,e),r.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:s,properties:{values:[...s.get("values"),a]}}})}const l=sW("zeebe:TaskListener",{eventType:GX[0]},a,e);r.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:a,properties:{listeners:[...a.get("listeners"),l]}}}),t.execute("properties-panel.multi-command-executor",r)}}function eK(e){let t=Wx(e);return Hx(e,"bpmn:Participant")?t.get("processRef"):t}function tK(e){const t=bG(e,"zeebe:TaskListeners");return t&&t[0]}function nK(e){const{element:t}=e;return Hx(t,"bpmn:UserTask")?[{id:"taskScheduleDueDate",component:iK,isEdited:Iz},{id:"taskScheduleFollowUpDate",component:rK,isEdited:Iz}]:[]}function iK(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory"),r=dV("translate"),o=dV("debounceInput");return PG({element:t,id:"taskScheduleDueDate",label:r("Due date"),feel:"optional",getValue:()=>{const e=oK(t);if(e)return e.get("dueDate")},setValue:e=>{let r=[];const o=Wx(t);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,i),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{extensionElements:s}}}));let a=oK(t);a||(a=sW("zeebe:TaskSchedule",{},s,i),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{values:[...s.get("values"),a]}}})),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{dueDate:e}}}),n.execute("properties-panel.multi-command-executor",r)},debounce:o})}function rK(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory"),r=dV("translate"),o=dV("debounceInput");return PG({element:t,id:"taskScheduleFollowUpDate",label:r("Follow up date"),feel:"optional",getValue:()=>{const e=oK(t);if(e)return e.get("followUpDate")},setValue:e=>{let r=[];const o=Wx(t);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,i),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{extensionElements:s}}}));let a=oK(t);a||(a=sW("zeebe:TaskSchedule",{},s,i),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{values:[...s.get("values"),a]}}})),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{followUpDate:e}}}),n.execute("properties-panel.multi-command-executor",r)},debounce:o})}function oK(e){return bG(Wx(e),"zeebe:TaskSchedule")[0]}function sK(e,t){const n=Wx(t);switch(e){case"timeDate":return Ux(t,["bpmn:BoundaryEvent","bpmn:IntermediateCatchEvent","bpmn:StartEvent"]);case"timeCycle":return!((!Hx(t,"bpmn:StartEvent")||lK(n))&&aK(n))||!(!Hx(t,"bpmn:BoundaryEvent")||aK(n));case"timeDuration":return!!Ux(t,["bpmn:BoundaryEvent","bpmn:IntermediateCatchEvent"])||!(!Hx(t,"bpmn:StartEvent")||!lK(n));default:return!1}}function aK(e){return Hx(e,"bpmn:BoundaryEvent")?!1!==e.get("cancelActivity"):!1!==e.get("isInterrupting")}function lK(e){const t=e.$parent;return t&&Hx(t,"bpmn:SubProcess")&&t.get("triggeredByEvent")}function cK(e){const{element:t,injector:n}=e,i=n.get("translate"),r=YW(ZW(Wx(t)));if(!KW(t))return[];const o=function(e,t){const n=[];sK("timeDate",e)&&n.push({value:"timeDate",label:t("Date")});sK("timeDuration",e)&&n.push({value:"timeDuration",label:t("Duration")});sK("timeCycle",e)&&n.push({value:"timeCycle",label:t("Cycle")});return n}(t,i),s=[];return s.push({id:"timerEventDefinitionType",component:pK,isEdited:lF,options:o}),r&&s.push({id:"timerEventDefinitionValue",component:uK,isEdited:Iz,timerEventDefinitionType:r||o[0].value}),s}function pK(e){const{element:t,options:n}=e,i=dV("commandStack"),r=dV("bpmnFactory"),o=dV("translate"),s=ZW(Wx(t)),a=YW(s);return aF({element:t,id:"timerEventDefinitionType",label:o("Type"),getValue:()=>a||"",setValue:e=>{if(e===a)return;const n=dK(r,s),o={timeDuration:void 0,timeDate:void 0,timeCycle:void 0};""!==e&&(o[e]=n),i.execute("element.updateModdleProperties",{element:t,moddleElement:s,properties:o})},getOptions:e=>[{value:"",label:o("")},...n]})}function uK(e){const{element:t,label:n,timerEventDefinitionType:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput"),a=dV("bpmnFactory"),l=ZW(Wx(t)),c=l.get(i);return PG({element:t,id:"timerEventDefinitionValue",label:n||o("Value"),feel:"optional",getValue:()=>c&&c.get("body"),setValue:e=>{if(!c){const n=dK(a,l);return n.set("body",e),void r.execute("element.updateModdleProperties",{element:t,moddleElement:l,properties:{[i]:n}})}r.execute("element.updateModdleProperties",{element:t,moddleElement:c,properties:{body:e}})},debounce:s,tooltip:hK(i,o)})}function dK(e,t){const n=e.create("bpmn:FormalExpression",{body:void 0});return n.$parent=t,n}function hK(e,t){switch(e){case"timeDate":return q_("div",{children:[q_("p",{children:t("A specific point in time defined as ISO 8601 combined date and time representation.")}),q_("ul",{children:[q_("li",{children:[q_("code",{children:"2019-10-01T12:00:00Z"})," - ",t("UTC time")]}),q_("li",{children:[q_("code",{children:"2019-10-02T08:09:40+02:00"})," - ",t("UTC plus 2 hours zone offset")]})]}),q_("a",{href:"https://docs.camunda.io/docs/reference/bpmn-processes/timer-events/timer-events#time-date",target:"_blank",rel:"noopener noreferrer",title:t("Timer documentation"),children:t("How to configure a timer")})]});case"timeCycle":return q_("div",{children:[q_("p",{children:t("A cycle defined as ISO 8601 repeating intervals format, or a cron expression.")}),q_("ul",{children:[q_("li",{children:[q_("code",{children:"R5/PT10S"})," - ",t("every 10 seconds, up to 5 times")]}),q_("li",{children:[q_("code",{children:"R/P1D"})," - ",t("every day, infinitely")]}),q_("li",{children:[q_("code",{children:"0 0 9-17 * * MON-FRI"})," - ",t("every hour on the hour from 9-5 p.m. UTC Monday-Friday")]})]}),q_("a",{href:"https://docs.camunda.io/docs/reference/bpmn-processes/timer-events/timer-events#time-cycle",target:"_blank",rel:"noopener noreferrer",title:t("Timer documentation"),children:t("How to configure a timer")})]});case"timeDuration":return q_("div",{children:[q_("p",{children:t("A time duration defined as ISO 8601 durations format.")}),q_("ul",{children:[q_("li",{children:[q_("code",{children:"PT15S"})," - ",t("15 seconds")]}),q_("li",{children:[q_("code",{children:"PT1H30M"})," - ",t("1 hour and 30 minutes")]}),q_("li",{children:[q_("code",{children:"P14D"})," - ",t("14 days")]})]}),q_("a",{href:"https://docs.camunda.io/docs/reference/bpmn-processes/timer-events/timer-events#time-duration",target:"_blank",rel:"noopener noreferrer",title:t("Timer documentation"),children:t("How to configure a timer")})]})}}const fK="zeebeUserTask",mK="jobWorker";function gK(e){const{element:t}=e;return Hx(t,"bpmn:UserTask")?[{id:"userTaskImplementation",component:yK,isEdited:()=>function(e){return vK(e)}(t)}]:[]}function yK(e){const{element:t,id:n}=e,i=dV("commandStack"),r=dV("bpmnFactory"),o=dV("translate");return aF({element:t,id:n,label:o("Type"),getValue:()=>vK(t)?fK:mK,setValue:e=>{e===fK?function(e,t,n){const i=Wx(e),r=sW("zeebe:UserTask",{},i,t);xG(e,i,r,t,n)}(t,r,i):e===mK&&function(e,t){const n=vK(e);wG(e,Wx(e),n,t)}(t,i)},getOptions:()=>[{value:fK,label:o("Zeebe user task")},{value:mK,label:o("Job worker")}]})}function vK(e){return bG(Wx(e),"zeebe:UserTask")[0]}function bK(e){const{element:t}=e,n=dV("bpmnFactory"),i=dV("commandStack"),r=dV("debounceInput"),o=dV("translate");return vF({element:t,id:"versionTag",label:o("Version tag"),getValue:()=>{const e=wK(t);if(e)return e.get("value")},setValue:e=>{let r=[];const o=xK(t);let s=o.get("extensionElements");s||(s=sW("bpmn:ExtensionElements",{values:[]},o,n),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{extensionElements:s}}}));let a=wK(t);a||(a=sW("zeebe:VersionTag",{},s,n),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{values:[...s.get("values"),a]}}})),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{value:e}}}),i.execute("properties-panel.multi-command-executor",r)},debounce:r})}function xK(e){return Hx(e,"bpmn:Process")?Wx(e):Wx(e).get("processRef")}function wK(e){return bG(xK(e),"zeebe:VersionTag")[0]}function _K(e){const{idPrefix:t,property:n}=e;return[{id:t+"-name",component:EK,idPrefix:t,property:n},{id:t+"-value",component:OK,idPrefix:t,property:n}]}function EK(e){const{idPrefix:t,element:n,property:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-name",label:o("Name"),getValue:()=>i.name,setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{name:e}})},debounce:s})}function OK(e){const{idPrefix:t,element:n,property:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-value",label:o("Value"),getValue:()=>i.value,setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{value:e}})},debounce:s})}function PK({element:e,injector:t,namespace:n="camunda"}){let i=CK(e);if(!i)return;const r=function(e,t="camunda"){const n=CK(e),i=AK(n,t);return i&&i.get(TK(t))}(i,n)||[],o=t.get("bpmnFactory"),s=t.get("commandStack"),a=r.map(((t,i)=>{const r=e.id+"-extensionProperty-"+i;return{id:r,label:t.get("name")||"",entries:_K({idPrefix:r,element:e,property:t}),autoFocusEntry:r+"-name",remove:kK({commandStack:s,element:e,property:t,namespace:n})}}));return{items:a,add:SK({bpmnFactory:o,commandStack:s,element:e,namespace:n})}}function kK({commandStack:e,element:t,property:n,namespace:i}){return function(r){r.stopPropagation();const o=[],s=CK(t),a=s.get("extensionElements"),l=AK(s,i);if(!l)return;const c=TK(i),p=E(l.get(c),n);o.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:l,properties:{[c]:p}}}),p.length||o.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{values:E(a.get("values"),l)}}}),e.execute("properties-panel.multi-command-executor",o)}}function SK({bpmnFactory:e,commandStack:t,element:n,namespace:i}){return function(r){r.stopPropagation();let o=[];const s=CK(n);let a=s.get("extensionElements");a||(a=sW("bpmn:ExtensionElements",{values:[]},s,e),o.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:s,properties:{extensionElements:a}}}));const l=TK(i);let c=AK(s,i);if(!c){const t=a;c=sW(`${i}:Properties`,{[l]:[]},t,e),o.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:a,properties:{values:[...a.get("values"),c]}}})}const p=sW(`${i}:Property`,{},c,e);o.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:c,properties:{[l]:[...c.get(l),p]}}}),t.execute("properties-panel.multi-command-executor",o)}}function CK(e){let t=Wx(e);return Hx(e,"bpmn:Participant")?t.get("processRef"):t}function TK(e="camunda"){return"zeebe"===e?"properties":"values"}function AK(e,t="camunda"){return bG(CK(e),`${t}:Properties`)[0]}const MK=[function(e,t){const n=t.get("translate"),i={id:"businessRuleImplementation",label:n("Implementation"),entries:[...$G({element:e})],component:Jq};return i.entries.length?i:null},function(e,t){const n=t.get("translate"),i={id:"calledDecision",label:n("Called decision"),entries:[...HG({element:e})],component:Jq};return i.entries.length?i:null},function(e,t){const n=t.get("translate"),i={id:"scriptImplementation",label:n("Implementation"),entries:[...TX({element:e})],component:Jq};return i.entries.length?i:null},function(e,t){const n=t.get("translate"),i={id:"script",label:n("Script"),entries:[...RX({element:e})],component:Jq};return i.entries.length?i:null},function(e,t){const n=t.get("translate"),i={id:"userTaskImplementation",label:n("Implementation"),entries:[...gK({element:e})],component:Jq};return i.entries.length?i:null},function(e,t){const n=t.get("translate"),i={id:"taskDefinition",label:n("Task definition"),entries:[...VX({element:e})],component:Jq};return i.entries.length?i:null},function(e,t){const n=t.get("translate"),i={id:"assignmentDefinition",label:n("Assignment"),entries:[...kG({element:e}),...nK({element:e}),...OX({element:e})],component:Jq};return i.entries.length?i:null},function(e,t){const n=t.get("translate"),i={id:"form",label:n("Form"),entries:[...EQ({element:e,injector:t})],component:Jq};return i.entries.length?i:null},function(e,t){const n=t.get("translate"),i={id:"condition",label:n("Condition"),entries:[...QG({element:e})],component:Jq};return i.entries.length?i:null},function(e,t){const n=t.get("translate"),i={id:"calledElement",label:n("Called element"),entries:[...zX({element:e})],component:Jq};return i.entries.length?i:null},function(e,t){const n=t.get("translate"),i={id:"inputPropagation",label:n("Input propagation"),entries:[...HQ({element:e})],component:Jq};return i.entries.length?i:null},function(e,t){const n=t.get("translate"),i={id:"inputs",label:n("Inputs"),component:Jz,...tX({element:e,injector:t})};return i.items?i:null},function(e,t){const n=t.get("translate"),i={id:"outputPropagation",label:n("Output propagation"),entries:[...bX({element:e})],component:Jq};return i.entries.length?i:null},function(e,t){const n=t.get("translate"),i={id:"outputs",label:n("Outputs"),component:Jz,...wX({element:e,injector:t})};return i.items?i:null},function(e,t){const n=t.get("translate"),i={id:"headers",label:n("Headers"),component:Jz,...qQ({element:e,injector:t})};return i.items?i:null},function(e,t){const n=t.get("translate"),i={label:n("Task listeners"),id:"Zeebe__TaskListeners",component:Jz,...YX({element:e,injector:t})};if(i.items)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Execution listeners"),id:"Zeebe__ExecutionListeners",component:Jz,...oQ({element:e,injector:t})};if(i.items)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Extension properties"),id:"Zeebe__ExtensionProperties",component:Jz,...PK({element:e,injector:t,namespace:"zeebe"})};if(i.items)return i;return null}];class DK{constructor(e,t){e.registerProvider(500,this),this._injector=t}getGroups(e){return t=>(function(e,t){const n=RK(e,"general");if(!n)return;const{entries:i}=n,r=x(i,(e=>"isExecutable"===e.id)),o=r>=0?r:i.length;i.splice(o,0,...function(e){const{element:t}=e,n=Wx(t);return Hx(t,"bpmn:Process")||Hx(t,"bpmn:Participant")&&n.get("processRef")?[{id:"versionTag",component:bK,isEdited:bF}]:[]}({element:t}))}(t=t.concat(this._getGroups(e)),e),function(e,t){const n=RK(e,"error");if(!n)return;n.entries=NK(n.entries,function(e){const{element:t}=e,n=[];return $U(t)&&Hx(t,"bpmn:ThrowEvent")&&n.push({id:"errorCode",component:YG,isEdited:Iz}),n}({element:t}))}(t,e),function(e,t){const n=RK(e,"escalation");if(!n)return;n.entries=NK(n.entries,function(e){const{element:t}=e;if(!Hx(t,"bpmn:ThrowEvent"))return[];const n=[];return HU(t)&&n.push({id:"escalationCode",component:ZG,isEdited:Iz}),n}({element:t}))}(t,e),function(e,t){const n=RK(e,"message");if(!n)return;n.entries=NK(n.entries,rX({element:t}))}(t,e),function(e,t){const n=RK(e,"signal");if(!n)return;n.entries=NK(n.entries,IX({element:t}))}(t,e),function(e,t,n){const i=RK(e,"timer");if(!i)return;i.entries=[...cK({element:t,injector:n})]}(t,e,this._injector),function(e,t){const n=RK(e,"multiInstance");if(!n)return;n.entries=[...lX({element:t})]}(t,e),t=function(e,t){const n=RK(e,"message");(function(e){return Hx(e,"bpmn:EndEvent")&&!!IU(e)}(t)||function(e){return Hx(e,"bpmn:IntermediateThrowEvent")&&!!IU(e)}(t))&&(e=e.filter((e=>e!=n)));return e}(t,e),t)}_getGroups(e){const t=MK.map((t=>t(e,this._injector)));return t.filter((e=>null!==e))}}function RK(e,t){return e.find((e=>e.id===t))}function NK(e,t){return[...e.filter((e=>!t.find((t=>t.id===e.id)))),...t]}DK.$inject=["propertiesPanel","injector"];function $K(e){const{element:t}=e,n=e=>e&&!e.checked,i=Wx(t),r=[];return Hx(t,"camunda:AsyncCapable")&&(r.push({id:"asynchronousContinuationBefore",component:jK,isEdited:nF},{id:"asynchronousContinuationAfter",component:IK,isEdited:nF}),(BK(i)||qK(i))&&r.push({id:"exclusive",component:LK,isEdited:n})),r}function jK(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=Wx(t);return tF({element:t,id:"asynchronousContinuationBefore",label:i("Before"),getValue:()=>BK(r),setValue:e=>{const i={"camunda:asyncBefore":e,"camunda:async":void 0};n.execute("element.updateModdleProperties",{element:t,moddleElement:r,properties:i})}})}function IK(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=Wx(t);return tF({element:t,id:"asynchronousContinuationAfter",label:i("After"),getValue:()=>qK(r),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:r,properties:{"camunda:asyncAfter":e}})}})}function LK(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=Wx(t);return tF({element:t,id:"exclusive",label:i("Exclusive"),getValue:()=>!!r.get("camunda:exclusive"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:r,properties:{"camunda:exclusive":e}})}})}function BK(e){return!(!e.get("camunda:asyncBefore")&&!e.get("camunda:async"))}function qK(e){return!!e.get("camunda:asyncAfter")}function zK(e){const{element:t}=e;return Hx(t,"bpmn:StartEvent")&&function(e){const t=Wx(e),n=VK(t);return n&&n.get("camunda:fields").length}(t)?[{id:"businessKey",component:FK,isEdited:lF}]:[]}function FK(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=VK(t);return aF({element:t,id:"businessKey",label:i("Key"),getValue:()=>r.get("camunda:businessKey")||"",setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:r,properties:{"camunda:businessKey":e}})},getOptions:()=>{const e=[{value:"",label:i("")}];return r.get("fields").forEach((t=>{const n=t.get("camunda:id");n&&e.push({value:n,label:n})})),e}})}function VK(e){return bG(Wx(e),"camunda:FormData")[0]}function HK(e){const{element:t}=e,n=dV("modeling"),i=dV("translate"),r=dV("debounceInput");return q_(vF,{element:t,id:"calledElement",label:i("Called element"),getValue:()=>Wx(t).get("calledElement"),setValue:e=>{n.updateProperties(t,{calledElement:e||""})},debounce:r})}function UK(e){const{element:t}=e,n=dV("modeling"),i=dV("translate");return q_(aF,{element:t,id:"calledElementBinding",label:i("Binding"),getValue:()=>Wx(t).get("camunda:calledElementBinding")||"latest",setValue:e=>{n.updateProperties(t,{calledElementBinding:"latest"===e?void 0:e,calledElementVersion:void 0,calledElementVersionTag:void 0})},getOptions:()=>[{value:"latest",label:i("latest")},{value:"deployment",label:i("deployment")},{value:"version",label:i("version")},{value:"versionTag",label:i("version tag")}]})}function WK(e){const{element:t}=e,n=dV("modeling"),i=dV("translate"),r=dV("debounceInput");return q_(vF,{element:t,id:"calledElementVersion",label:i("Version"),getValue:()=>Wx(t).get("camunda:calledElementVersion"),setValue:e=>{n.updateProperties(t,{calledElementVersion:e})},debounce:r})}function GK(e){const{element:t}=e,n=dV("modeling"),i=dV("translate"),r=dV("debounceInput");return q_(vF,{element:t,id:"calledElementVersionTag",label:i("Version tag"),getValue:()=>Wx(t).get("camunda:calledElementVersionTag"),setValue:e=>{n.updateProperties(t,{calledElementVersionTag:e})},debounce:r})}function QK(e){const{element:t}=e,n=dV("modeling"),i=dV("translate"),r=dV("debounceInput");return q_(vF,{element:t,id:"calledElementTenantId",label:i("Tenant ID"),getValue:()=>Wx(t).get("camunda:calledElementTenantId"),setValue:e=>{n.updateProperties(t,{calledElementTenantId:e})},debounce:r})}function XK(e){const{element:t}=e,n=dV("modeling"),i=dV("translate"),r=dV("debounceInput");return q_(vF,{element:t,id:"calledElementCaseRef",label:i("Case ref"),getValue:()=>Wx(t).get("camunda:caseRef"),setValue:e=>{n.updateProperties(t,{caseRef:e||""})},debounce:r})}function KK(e){const{element:t}=e,n=dV("modeling"),i=dV("translate");return q_(aF,{element:t,id:"calledElementCaseBinding",label:i("Binding"),getValue:()=>Wx(t).get("camunda:caseBinding")||"latest",setValue:e=>{n.updateProperties(t,{caseBinding:"latest"===e?void 0:e,caseVersion:void 0})},getOptions:()=>[{value:"latest",label:i("latest")},{value:"deployment",label:i("deployment")},{value:"version",label:i("version")}]})}function YK(e){const{element:t}=e,n=dV("modeling"),i=dV("translate"),r=dV("debounceInput");return q_(vF,{element:t,id:"calledElementCaseVersion",label:i("Version"),getValue:()=>Wx(t).get("camunda:caseVersion"),setValue:e=>{n.updateProperties(t,{caseVersion:e})},debounce:r})}function ZK(e){const{element:t}=e,n=dV("modeling"),i=dV("translate"),r=dV("debounceInput");return q_(vF,{element:t,id:"calledElementCaseTenantId",label:i("Tenant ID"),getValue:()=>Wx(t).get("camunda:caseTenantId"),setValue:e=>{n.updateProperties(t,{caseTenantId:e})},debounce:r})}const JK={"camunda:variableMappingClass":void 0,"camunda:variableMappingDelegateExpression":void 0};function eY(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate");return q_(aF,{element:t,id:"calledElementDelegateVariableMappingType",label:i("Delegate Variable Mapping"),getValue:()=>iY(t),setValue:e=>{const i={...JK};"class"===e?i["camunda:variableMappingClass"]="":"delegateExpression"===e&&(i["camunda:variableMappingDelegateExpression"]=""),n.execute("element.updateProperties",{element:t,properties:i})},getOptions:()=>[{value:"none",label:i("")},{value:"class",label:i("Class")},{value:"delegateExpression",label:i("Delegate expression")}]})}function tY(e){const{element:t}=e,n=dV("modeling"),i=dV("translate"),r=dV("debounceInput");return q_(vF,{element:t,id:"calledElementVariableMappingDelegateExpression",label:i("Delegate Expression"),getValue:()=>Wx(t).get("camunda:variableMappingDelegateExpression"),setValue:e=>{n.updateProperties(t,{variableMappingDelegateExpression:e||"",variableMappingClass:void 0})},debounce:r})}function nY(e){const{element:t}=e,n=dV("modeling"),i=dV("translate"),r=dV("debounceInput");return q_(vF,{element:t,id:"calledElementVariableMappingClass",label:i("Delegate Class"),getValue:()=>Wx(t).get("camunda:variableMappingClass"),setValue:e=>{n.updateProperties(t,{variableMappingDelegateExpression:void 0,variableMappingClass:e||""})},debounce:r})}function iY(e){const t=Wx(e);return void 0!==t.get("camunda:variableMappingClass")?"class":void 0!==t.get("camunda:variableMappingDelegateExpression")?"delegateExpression":"none"}function rY(e){const{element:t}=e;if(!Hx(t,"bpmn:CallActivity"))return[];const n=[];n.push({id:"calledElementType",component:aY,isEdited:lF});const i=uY(t);return"bpmn"===i?n.push(...function(e){const{element:t}=e,n=[{id:"calledElement",component:HK,isEdited:bF},{id:"calledElementBinding",component:UK,isEdited:lF},{id:"calledElementTenantId",component:QK,isEdited:bF}],i=Wx(t).get("camunda:calledElementBinding");return"version"===i?n.splice(-1,0,{id:"calledElementVersion",component:WK,isEdited:bF}):"versionTag"===i&&n.splice(-1,0,{id:"calledElementVersionTag",component:GK,isEdited:bF}),n}({element:t}),...lY({element:t}),...function(e){const{element:t}=e,n=[{id:"calledElementDelegateVariableMappingType",component:eY,isEdited:lF}],i=iY(t);return"class"===i?n.push({id:"calledElementVariableMappingClass",component:nY,isEdited:bF}):"delegateExpression"===i&&n.push({id:"calledElementVariableMappingDelegateExpression",component:tY,isEdited:bF}),n}({element:t})):"cmmn"===i?n.push(...function(e){const{element:t}=e,n=[{id:"calledElementCaseRef",component:XK,isEdited:bF},{id:"calledElementCaseBinding",component:KK,isEdited:lF},{id:"calledElementCaseTenantId",component:ZK,isEdited:bF}];return"version"===Wx(t).get("camunda:caseBinding")&&n.splice(-1,0,{id:"calledElementCaseVersion",component:YK,isEdited:bF}),n}({element:t}),...lY({element:t})):n.push(...lY({element:t})),n}const oY={calledElement:void 0,"camunda:calledElementBinding":void 0,"camunda:calledElementVersion":void 0,"camunda:calledElementTenantId":void 0,"camunda:variableMappingClass":void 0,"camunda:variableMappingDelegateExpression":void 0,"camunda:caseRef":void 0,"camunda:caseBinding":void 0,"camunda:caseVersion":void 0,"camunda:caseTenantId":void 0},sY="#{execution.processBusinessKey}";function aY(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate");return q_(aF,{element:t,id:"calledElementType",label:i("Type"),getValue:()=>uY(t),setValue:e=>{const i={...oY};"bpmn"===e?i.calledElement="":"cmmn"===e&&(i["camunda:caseRef"]=""),n.execute("element.updateProperties",{element:t,properties:i})},getOptions:()=>[{value:"",label:i("")},{value:"bpmn",label:i("BPMN")},{value:"cmmn",label:i("CMMN")}]})}function lY(e){const{element:t}=e,n=[{id:"calledElementBusinessKey",component:cY,isEdited:nF}];return dY(t)&&n.push({id:"calledElementBusinessKeyExpression",component:pY,isEdited:bF}),n}function cY(e){const{element:t}=e,n=dV("commandStack"),i=dV("modeling"),r=dV("bpmnFactory"),o=dV("translate");function s(e){return sW("camunda:In",{businessKey:sY},e,r)}return q_(tF,{element:t,id:"calledElementBusinessKey",label:o("Business key"),getValue:()=>dY(t),setValue:e=>{e?function(){const e=Wx(t);let o=e.get("extensionElements");if(o){const i=s(o);xG(t,e,i,r,n)}else{o=sW("bpmn:ExtensionElements",{},e,r);const n=s(o);o.set("values",[n]),i.updateProperties(t,{extensionElements:o})}}():function(){const e=Wx(t),i=bG(e,"camunda:In").filter((e=>void 0!==e.get("businessKey")));wG(t,e,i,n)}()}})}function pY(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput");return q_(vF,{element:t,id:"calledElementBusinessKeyExpression",label:i("Business key expression"),getValue:()=>hY(t),setValue:e=>{const i=fY(t);n.execute("element.updateModdleProperties",{element:t,moddleElement:i,properties:{businessKey:e||""}})},debounce:r})}function uY(e){const t=Wx(e);return void 0!==t.get("calledElement")?"bpmn":void 0!==t.get("camunda:caseRef")?"cmmn":""}function dY(e){return void 0!==hY(e)}function hY(e){const t=fY(e);if(t)return t.get("businessKey")}function fY(e){const t=bG(Wx(e),"camunda:In");for(const e of t){if(void 0!==e.get("businessKey"))return e}}function mY(e){const{element:t}=e,n=Wx(t);return Hx(t,"bpmn:Process")||Hx(t,"bpmn:Participant")&&n.get("processRef")?[{id:"candidateStarterGroups",component:gY,isEdited:bF},{id:"candidateStarterUsers",component:yY,isEdited:bF}]:[]}function gY(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=vY(t);return vF({element:t,id:"candidateStarterGroups",label:i("Candidate starter groups"),description:i("Specify more than one group as a comma separated list."),getValue:()=>o.get("camunda:candidateStarterGroups")||"",setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:candidateStarterGroups":e}})},debounce:r})}function yY(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=vY(t);return vF({element:t,id:"candidateStarterUsers",label:i("Candidate starter users"),description:i("Specify more than one user as a comma separated list."),getValue:()=>o.get("camunda:candidateStarterUsers")||"",setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:candidateStarterUsers":e}})},debounce:r})}function vY(e){return Hx(e,"bpmn:Process")?Wx(e):Wx(e).get("processRef")}function bY(e){const{element:t}=e;if(!(Hx(t,"bpmn:SequenceFlow")&&function(e){return Ux(e,CY)}(t.source)||TY(t)))return[];const n=[];TY(t)&&n.push(...function(e){const{element:t}=e,n=[];n.push({id:"conditionVariableName",component:kY,isEdited:bF}),(!Hx(t,"bpmn:StartEvent")||function(e){const t=Wx(e),n=t.$parent;return Hx(n,"bpmn:SubProcess")&&n.triggeredByEvent}(t))&&n.push({id:"conditionVariableEvents",component:SY,isEdited:bF});return n}({element:t})),n.push({id:"conditionType",component:xY,isEdited:lF});const i=AY(t);return"script"===i?n.push(...function(e){const{element:t}=e,n=[],i=DY(t);n.push({id:"conditionScriptLanguage",component:_Y,isEdited:bF}),n.push({id:"conditionScriptType",component:EY,isEdited:lF}),"script"===i?n.push({id:"conditionScriptValue",component:OY,isEdited:mF}):"resource"===i&&n.push({id:"conditionScriptResource",component:PY,isEdited:bF});return n}({element:t})):"expression"===i&&n.push({id:"conditionExpression",component:wY,isEdited:bF}),n}function xY(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory"),r=dV("translate");return q_(aF,{element:t,id:"conditionType",label:r("Type"),getValue:()=>AY(t),setValue:e=>{if(""===e)RY(t,n,void 0);else{const r=NY(t,{body:"",language:"script"===e?"":void 0},i);RY(t,n,r)}},getOptions:()=>[{value:"",label:r("")},{value:"script",label:r("Script")},{value:"expression",label:r("Expression")}]})}function wY(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory"),r=dV("translate"),o=dV("debounceInput");return q_(vF,{element:t,id:"conditionExpression",label:r("Condition Expression"),getValue:()=>MY(t).get("body"),setValue:e=>{const r=NY(t,{body:e},i);RY(t,n,r)},debounce:o})}function _Y(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput");return q_(vF,{element:t,id:"conditionScriptLanguage",label:i("Format"),getValue:()=>MY(t).get("language"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:MY(t),properties:{language:e||""}})},debounce:r})}function EY(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate");return aF({element:t,id:"conditionScriptType",label:i("Script type"),getValue:()=>DY(t),setValue:e=>{const i={body:"script"===e?"":void 0,"camunda:resource":"resource"===e?"":void 0};n.execute("element.updateModdleProperties",{element:t,moddleElement:MY(t),properties:i})},getOptions:()=>[{value:"resource",label:i("External resource")},{value:"script",label:i("Inline script")}]})}function OY(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput");return q_(fF,{element:t,id:"conditionScriptValue",label:i("Script"),getValue:()=>MY(t).get("body"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:MY(t),properties:{body:e||""}})},debounce:r,monospace:!0})}function PY(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput");return q_(vF,{element:!0,id:"conditionScriptResource",label:i("Resource"),getValue:()=>MY(t).get("camunda:resource"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:MY(t),properties:{"camunda:resource":e||""}})},debounce:r})}function kY(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput");return q_(vF,{element:t,id:"conditionVariableName",label:i("Variable name"),getValue:()=>TY(t).get("variableName"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:TY(t),properties:{variableName:e||""}})},debounce:r})}function SY(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=q_("div",{children:[q_("p",{children:i("Specify more than one variable change event as a comma separated list. Variable change events are:")}),q_("ul",{children:[q_("li",{children:q_("code",{children:"create"})}),q_("li",{children:q_("code",{children:"update"})}),q_("li",{children:q_("code",{children:"delete"})})]}),q_("a",{href:"https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-attributes/#variableevents",target:"_blank",rel:"noopener noreferrer",children:i("Documentation: Variable events")})]});return q_(vF,{element:t,id:"conditionVariableEvents",label:i("Variable events"),getValue:()=>TY(t).get("variableEvents"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:TY(t),properties:{variableEvents:e||""}})},debounce:r,tooltip:o})}const CY=["bpmn:Activity","bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:ComplexGateway"];function TY(e){return!!Hx(e,"bpmn:Event")&&jU(e,"bpmn:ConditionalEventDefinition")}function AY(e){const t=MY(e);return t?void 0===t.get("language")?"expression":"script":""}function MY(e){const t=Wx(e);return Hx(t,"bpmn:SequenceFlow")?t.get("conditionExpression"):TY(t)?TY(t).get("condition"):void 0}function DY(e){return void 0!==MY(e).get("camunda:resource")?"resource":"script"}function RY(e,t,n=void 0){Hx(e,"bpmn:SequenceFlow")?t.execute("element.updateProperties",{element:e,properties:{conditionExpression:n}}):t.execute("element.updateModdleProperties",{element:e,moddleElement:TY(e),properties:{condition:n}})}function NY(e,t,n){return sW("bpmn:FormalExpression",t,Hx(e,"bpmn:SequenceFlow")?Wx(e):TY(e),n)}function $Y(e){const{element:t,script:n,prefix:i}=e,r=[],o=qY(n||t),s=i||"";return r.push({id:s+"scriptFormat",component:jY,isEdited:bF,idPrefix:s,script:n}),r.push({id:s+"scriptType",component:IY,isEdited:lF,idPrefix:s,script:n}),"script"===o&&r.push({id:s+"scriptValue",component:LY,isEdited:mF,idPrefix:s,script:n}),"resource"===o&&r.push({id:s+"scriptResource",component:BY,isEdited:bF,idPrefix:s,script:n}),r}function jY(e){const{element:t,idPrefix:n,script:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput"),a=i||Wx(t);return vF({element:t,id:n+"scriptFormat",label:o("Format"),getValue:()=>a.get("scriptFormat"),setValue:e=>{r.execute("element.updateModdleProperties",{element:t,moddleElement:a,properties:{scriptFormat:e}})},debounce:s})}function IY(e){const{element:t,idPrefix:n,script:i}=e,r=dV("commandStack"),o=dV("translate"),s=i||Wx(t),a=FY(s);return aF({element:t,id:n+"scriptType",label:o("Type"),getValue:()=>qY(s),setValue:e=>{const n={[a]:"script"===e?"":void 0,"camunda:resource":"resource"===e?"":void 0};r.execute("element.updateModdleProperties",{element:t,moddleElement:s,properties:n})},getOptions:()=>[{value:"",label:o("")},{value:"resource",label:o("External resource")},{value:"script",label:o("Inline script")}]})}function LY(e){const{element:t,idPrefix:n,script:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput"),a=i||Wx(t),l=FY(a);return fF({element:t,id:n+"scriptValue",label:o("Script"),getValue:()=>zY(a),setValue:e=>{r.execute("element.updateModdleProperties",{element:t,moddleElement:a,properties:{[l]:e||""}})},debounce:s,monospace:!0})}function BY(e){const{element:t,idPrefix:n,script:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput"),a=i||Wx(t);return vF({element:t,id:n+"scriptResource",label:o("Resource"),getValue:()=>a.get("camunda:resource"),setValue:e=>{r.execute("element.updateModdleProperties",{element:t,moddleElement:a,properties:{"camunda:resource":e||""}})},debounce:s})}function qY(e){const t=Wx(e);if(void 0!==zY(t))return"script";return void 0!==t.get("camunda:resource")?"resource":void 0}function zY(e){return e.get(FY(e))}function FY(e){return Hx(e,"camunda:Script")?"value":"script"}function VY(e,t){const n=HY(e);return n&&n.get(t)||[]}function HY(e){if(Hx(e,"camunda:Connector"))return e.get("inputOutput");return(function(e,t,n){const i=bG(e,t);return n?(i[0]||{})[n]||[]:i}(Wx(e),"camunda:InputOutput")||[])[0]}function UY(e){return VY(e,"inputParameters")}function WY(e){return VY(e,"outputParameters")}function GY(e){const t=Wx(e);return Hx(t,"bpmn:FlowNode")&&!(Ux(t,["bpmn:StartEvent","bpmn:BoundaryEvent","bpmn:Gateway"])||Hx(t,"bpmn:SubProcess")&&t.get("triggeredByEvent"))}function QY(e){const t={"camunda:Map":"map","camunda:List":"list","camunda:Script":"script"};let n="stringOrExpression";const i=e.get("definition");return void 0!==i&&(n=t[i.$type]),n}function XY(e,t,n,i){const r="camunda:InputParameter"===t,o=sW(t,{name:aW(r?"Input_":"Output_")},n,i),s=r?"inputParameters":"outputParameters";return{cmd:"element.updateModdleProperties",context:{element:e,moddleElement:n,properties:{[s]:[...n.get(s),o]}}}}function KY(e,t,n){const i=[],r=Wx(e);let o=r.get("extensionElements");o||(o=sW("bpmn:ExtensionElements",{values:[]},r,n),i.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:r,properties:{extensionElements:o}}}));let s=HY(e);if(!s){s=sW("camunda:InputOutput",{inputParameters:[],outputParameters:[]},o,n),i.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:o,properties:{values:[...o.get("values"),s]}}})}return i.push(XY(e,t,s,n)),i}function YY(e){const{element:t,id:n,index:i,item:r}=e;return q_(JY,{idPrefix:`${n}-listItem-${i}`,element:t,item:r})}function ZY(e){const{idPrefix:t,element:n,parameter:i}=e,r=dV("bpmnFactory"),o=dV("commandStack"),s=dV("translate"),a=i.get("definition"),l=a.get("items");return rF({element:n,autoFocusEntry:!0,id:t+"-list",items:l,label:s("List values"),onAdd:function(){const e=sW("camunda:Value",{},i,r);o.execute("element.updateModdleProperties",{element:n,moddleElement:a,properties:{items:[...a.get("items"),e]}})},onRemove:function(e){o.execute("element.updateModdleProperties",{element:n,moddleElement:a,properties:{items:E(a.get("items"),e)}})},component:YY})}function JY(e){const{idPrefix:t,element:n,item:i}=e,r=dV("commandStack"),o=dV("translate"),s={"camunda:Map":o("Map"),"camunda:List":o("List"),"camunda:Script":o("Script")};return function(e){const{id:t,disabled:n,getValue:i,setValue:r}=e,o=dV("debounceInput",!0);return q_(pF,{id:t,getValue:i,setValue:r,disabled:n,debounce:o})}({id:t+"-value",disabled:eZ(i),getValue:()=>eZ(i)?s[i.$type]:i.get("value"),setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{value:e}})}})}function eZ(e){return function(e){return Hx(e,"camunda:Script")}(e)||function(e){return Hx(e,"camunda:List")}(e)||function(e){return Hx(e,"camunda:Map")}(e)}function tZ(e){const{element:t,id:n,index:i,item:r,open:o}=e,s=`${n}-mapEntry-${i}`,a=dV("translate");return q_(Kz,{id:s,element:t,entries:iZ({element:t,entry:r,idPrefix:s}),label:r.get("key")||a(""),open:o})}function nZ(e){const{idPrefix:t,element:n,parameter:i}=e,r=dV("bpmnFactory"),o=dV("commandStack"),s=dV("translate"),a=t+"-map",l=i.get("definition"),c=l.get("entries");return rF({element:n,autoFocusEntry:`[data-entry-id="${a}-mapEntry-${c.length-1}"] input`,id:t+"-map",items:c,label:s("Map entries"),onAdd:function(){const e=sW("camunda:Entry",{},i,r);o.execute("element.updateModdleProperties",{element:n,moddleElement:l,properties:{entries:[...l.get("entries"),e]}})},onRemove:function(e){o.execute("element.updateModdleProperties",{element:n,moddleElement:l,properties:{entries:E(l.get("entries"),e)}})},component:tZ})}function iZ(e){const{element:t,entry:n,idPrefix:i}=e;return[{id:i+"-key",component:rZ,entry:n,idPrefix:i,element:t},{id:i+"-value",component:oZ,entry:n,idPrefix:i,element:t}]}function rZ(e){const{element:t,entry:n,idPrefix:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:n,id:i+"-key",label:o("Key"),getValue:()=>n.get("key"),setValue:e=>{r.execute("element.updateModdleProperties",{element:t,moddleElement:n,properties:{key:e}})},debounce:s})}function oZ(e){const{element:t,entry:n,idPrefix:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput"),a=n.get("definition"),l={"camunda:Map":o("Map"),"camunda:List":o("List"),"camunda:Script":o("Script")};return vF({element:n,id:i+"-value",label:o("Value"),getValue:()=>sZ(a)?l[a.$type]:n.get("value"),setValue:e=>{r.execute("element.updateModdleProperties",{element:t,moddleElement:n,properties:{value:e}})},disabled:sZ(a),debounce:s})}function sZ(e){return function(e){return Hx(e,"camunda:Script")}(e)||function(e){return Hx(e,"camunda:List")}(e)||function(e){return Hx(e,"camunda:Map")}(e)}const aZ={value:void 0,definition:void 0};function lZ(e){const{idPrefix:t,element:n,parameter:i}=e,r=QY(i);let o=[{id:t+"-name",component:cZ,isEdited:bF,idPrefix:t,parameter:i},{id:t+"-type",component:pZ,isEdited:lF,idPrefix:t,parameter:i}];if("stringOrExpression"===r)o.push({id:t+"-stringOrExpression",component:uZ,isEdited:mF,idPrefix:t,parameter:i});else if("script"===r){const e=i.get("definition");o=[...o,...$Y({element:n,prefix:t+"-",script:e})]}else"list"===r?o.push({id:`${t}-list`,component:ZY,idPrefix:t,parameter:i}):"map"===r&&o.push({id:`${t}-map`,component:nZ,idPrefix:t,parameter:i});return o}function cZ(e){const{idPrefix:t,element:n,parameter:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-name",label:o(dZ(i)?"Local variable name":"Process variable name"),getValue:e=>e.get("name"),setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{name:e}})},debounce:s})}function pZ(e){const{idPrefix:t,element:n,parameter:i}=e,r=dV("bpmnFactory"),o=dV("commandStack"),s=dV("translate"),a=e=>sW(e,{},i,r);return aF({element:i,id:t+"-type",label:s("Assignment type"),getValue:e=>QY(e),setValue:e=>{let t={...aZ};"script"===e?t.definition=a("camunda:Script"):"list"===e?t.definition=a("camunda:List"):"map"===e&&(t.definition=a("camunda:Map")),o.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:t})},getOptions:()=>[{label:s("List"),value:"list"},{label:s("Map"),value:"map"},{label:s("Script"),value:"script"},{label:s("String or expression"),value:"stringOrExpression"}]})}function uZ(e){const{idPrefix:t,element:n,parameter:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return fF({element:i,id:t+"-stringOrExpression",label:o("Value"),description:o('Start typing "${}" to create an expression.'),getValue:e=>e.get("value"),setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{value:e}})},rows:1,debounce:s})}function dZ(e){return Hx(e,"camunda:InputParameter")}function hZ(e){return Hx(e,"camunda:ServiceTaskLike")}function fZ(e){return Hx(e,"camunda:DmnCapable")}function mZ(e){return Hx(e,"camunda:ExternalCapable")}function gZ(e){if(Hx(e,"bpmn:IntermediateThrowEvent")||Hx(e,"bpmn:EndEvent")){const t=IU(e);t&&(e=t)}return hZ(e)&&Wx(e)}function yZ(e){const t=function(e){if(Ux(e,["camunda:ExecutionListener","camunda:TaskListener"]))return e}(e)||gZ(e);if(!t)return;if(fZ(t)){if(void 0!==t.get("camunda:decisionRef"))return"dmn"}if(hZ(t)){if(bG(t,"camunda:Connector").length)return"connector"}if(mZ(t)){if("external"===t.get("camunda:type"))return"external"}if(void 0!==t.get("camunda:class"))return"class";if(void 0!==t.get("camunda:expression"))return"expression";if(void 0!==t.get("camunda:delegateExpression"))return"delegateExpression";return void 0!==t.get("script")?"script":void 0}function vZ(e){const t=gZ(e);return t&&"connector"===yZ(t)}function bZ(e){const t=function(e){return bG(e,"camunda:Connector")}(gZ(e));return t[0]}function xZ(e){const{element:t,injector:n}=e;if(!vZ(t))return null;const i=bZ(t),r=n.get("commandStack"),o=n.get("bpmnFactory"),s=(UY(i)||[]).map(((e,n)=>{const o=t.id+"-connector-inputParameter-"+n;return{id:o,label:e.get("name")||"",entries:lZ({element:t,idPrefix:o,parameter:e}),autoFocusEntry:o+"-name",remove:wZ({connector:i,element:t,parameter:e,commandStack:r})}}));return{items:s,add:function(e){e.stopPropagation();const n=[];let s=HY(i);s||(s=sW("camunda:InputOutput",{inputParameters:[],outputParameters:[]},i,o),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:i,properties:{inputOutput:s}}})),n.push(XY(t,"camunda:InputParameter",s,o)),r.execute("properties-panel.multi-command-executor",n)}}}function wZ(e){const{commandStack:t,connector:n,element:i,parameter:r}=e;return function(e){e.stopPropagation();const o=HY(n);o&&t.execute("element.updateModdleProperties",{element:i,moddleElement:o,properties:{inputParameters:E(o.get("inputParameters"),r)}})}}function _Z(e){const{element:t,injector:n}=e;if(!vZ(t))return null;const i=bZ(t),r=n.get("commandStack"),o=n.get("bpmnFactory"),s=(WY(i)||[]).map(((e,n)=>{const o=t.id+"-connector-outputParameter-"+n;return{id:o,label:e.get("name")||"",entries:lZ({idPrefix:o,element:t,parameter:e}),autoFocusEntry:o+"-name",remove:EZ({connector:i,element:t,commandStack:r,parameter:e})}}));return{items:s,add:function(e){e.stopPropagation();const n=[];let s=HY(i);s||(s=sW("camunda:InputOutput",{inputParameters:[],outputParameters:[]},i,o),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:i,properties:{inputOutput:s}}})),n.push(XY(t,"camunda:OutputParameter",s,o)),r.execute("properties-panel.multi-command-executor",n)}}}function EZ(e){const{commandStack:t,connector:n,element:i,parameter:r}=e;return function(e){e.stopPropagation();const o=HY(n);o&&t.execute("element.updateModdleProperties",{element:i,moddleElement:o,properties:{outputParameters:E(o.get("outputParameters"),r)}})}}function OZ(e){const{element:t,entries:n}=e;if(!DU(t))return n;if($U(t)){const e=function(e,t){const n=x(e,(e=>e.id===t));return n>=0?n+1:e.length}(n,"errorCode");n.splice(e,0,{id:"errorMessage",component:PZ,isEdited:bF})}return function(e){return Hx(e,"bpmn:StartEvent")||Hx(e,"bpmn:BoundaryEvent")}(t)?(n.push({id:"errorCodeVariable",component:kZ,isEdited:bF},{id:"errorMessageVariable",component:SZ,isEdited:bF}),n):n}function PZ(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=$U(t);return vF({element:t,id:"errorMessage",label:i("Message"),getValue:()=>o.get("camunda:errorMessage"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:errorMessage":e}}),debounce:r})}function kZ(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=RU(t);return vF({element:t,id:"errorCodeVariable",label:i("Code variable"),description:i("Define the name of the variable that will contain the error code."),getValue:()=>o.get("camunda:errorCodeVariable"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:errorCodeVariable":e}}),debounce:r})}function SZ(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=RU(t);return vF({element:t,id:"errorMessageVariable",label:i("Message variable"),description:i("Define the name of the variable that will contain the error message."),getValue:()=>o.get("camunda:errorMessageVariable"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:errorMessageVariable":e}}),debounce:r})}const CZ="create-new";function TZ(e){const{idPrefix:t,errorEventDefinition:n}=e;let i=[{id:t+"-errorRef",component:AZ,isEdited:lF,errorEventDefinition:n,idPrefix:t}];const r=n.get("errorRef");return r&&(i=[...i,{id:t+"-errorName",component:MZ,isEdited:bF,error:r,errorEventDefinition:n,idPrefix:t},{id:t+"-errorCode",component:DZ,isEdited:bF,error:r,errorEventDefinition:n,idPrefix:t},{id:t+"-errorMessage",component:RZ,isEdited:bF,error:r,errorEventDefinition:n,idPrefix:t}]),i.push({id:t+"-expression",component:NZ,errorEventDefinition:n,idPrefix:t}),i}function AZ(e){const{element:t,errorEventDefinition:n,idPrefix:i}=e,r=dV("bpmnFactory"),o=dV("commandStack"),s=dV("translate"),a=Wx(t);return MU({element:t,id:i+"-errorRef",label:s("Global error reference"),autoFocusEntry:i+"-errorName",getValue:()=>{const e=n.get("errorRef");return e?e.get("id"):""},setValue:e=>{const i=lW(a),s=[];let l;return e===CZ&&(l=sW("bpmn:Error",{name:aW("Error_")},i,r),e=l.get("id"),s.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:i,properties:{rootElements:[...i.get("rootElements"),l]}}})),l=l||pW(a,"bpmn:Error",e),s.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:n,properties:{errorRef:l}}}),o.execute("properties-panel.multi-command-executor",s)},getOptions:()=>{let e=[{value:"",label:s("")},{value:CZ,label:s("Create new ...")}];const n=cW(Wx(t),"bpmn:Error");var i;return(i=n,R(i,(e=>(e.name||"").toLowerCase()))).forEach((t=>{e.push({value:t.get("id"),label:t.get("name")||t.get("id")})})),e}})}function MZ(e){const{element:t,error:n,idPrefix:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:t,id:i+"-errorName",label:o("Name"),getValue:()=>n.get("name"),setValue:e=>r.execute("element.updateModdleProperties",{element:t,moddleElement:n,properties:{name:e}}),debounce:s})}function DZ(e){const{element:t,error:n,idPrefix:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:t,id:i+"-errorCode",label:o("Code"),getValue:()=>n.get("errorCode"),setValue:e=>r.execute("element.updateModdleProperties",{element:t,moddleElement:n,properties:{errorCode:e}}),debounce:s})}function RZ(e){const{element:t,error:n,idPrefix:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:t,id:i+"-errorMessage",label:o("Message"),getValue:()=>n.get("errorMessage"),setValue:e=>r.execute("element.updateModdleProperties",{element:t,moddleElement:n,properties:{errorMessage:e}}),debounce:s})}function NZ(e){const{element:t,errorEventDefinition:n,idPrefix:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:n,id:i+"-expression",label:o("Throw expression"),getValue:()=>n.get("camunda:expression"),setValue:e=>{r.execute("element.updateModdleProperties",{element:t,moddleElement:n,properties:{"camunda:expression":e}})},debounce:s})}function $Z({element:e,injector:t}){const n=Wx(e);if(!Hx(e,"bpmn:ServiceTask")||"external"!==yZ(e))return null;const i=bG(n,"camunda:ErrorEventDefinition"),r=t.get("bpmnFactory"),o=t.get("commandStack"),s=i.map(((t,n)=>{const i=e.id+"-error-"+n;return{id:i,label:LZ(t),entries:TZ({idPrefix:i,element:e,errorEventDefinition:t}),autoFocusEntry:i+"-errorRef",remove:jZ({commandStack:o,element:e,errorEventDefinition:t})}}));return{items:s,add:IZ({bpmnFactory:r,commandStack:o,element:e})}}function jZ({commandStack:e,element:t,errorEventDefinition:n}){return function(i){i.stopPropagation();const r=Wx(t);wG(t,r,n,e)}}function IZ({bpmnFactory:e,commandStack:t,element:n}){return function(i){i.stopPropagation();const r=Wx(n),o=sW("camunda:ErrorEventDefinition",{},void 0,e);xG(n,r,o,e,t)}}function LZ(e){const t=e.get("errorRef");if(!t)return"";const n=t.get("errorCode"),i=t.get("name")||"";return n?`${i} (code = ${n})`:i}function BZ(e){const{element:t,entries:n}=e;return VU(t)&&function(e){return Hx(e,"bpmn:StartEvent")||Hx(e,"bpmn:BoundaryEvent")}(t)?(n.push({id:"escalationCodeVariable",component:qZ,isEdited:bF}),n):n}function qZ(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=FU(t);return vF({element:t,id:"escalationCodeVariable",label:i("Code variable"),description:i("Define the name of the variable that will contain the escalation code."),getValue:()=>o.get("camunda:escalationCodeVariable"),setValue:e=>n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:escalationCodeVariable":e}}),debounce:r})}function zZ(e){const{element:t}=e,n=Wx(t);return Hx(t,"bpmn:Process")||Hx(t,"bpmn:Participant")&&n.get("processRef")||VZ(t)?[{id:"externalTaskPriority",component:FZ,isEdited:bF}]:[]}function FZ(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput");let o;o=Hx(t,"bpmn:Participant")?Wx(t).get("processRef"):VZ(t)?gZ(t):Wx(t);return vF({element:t,id:"externalTaskPriority",label:i("Priority"),getValue:()=>o.get("camunda:taskPriority"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:taskPriority":e}})},debounce:r})}function VZ(e){const t=gZ(e),n=t&&t.get("camunda:type");return Hx(t,"camunda:ServiceTaskLike")&&n&&"external"===n}const HZ={stringValue:void 0,string:void 0,expression:void 0};function UZ(e){const{element:t,idPrefix:n,field:i}=e;return[{id:n+"-name",component:WZ,field:i,idPrefix:n,element:t},{id:n+"-type",component:GZ,field:i,idPrefix:n,element:t},{id:n+"-value",component:QZ,field:i,idPrefix:n,element:t}]}function WZ(e){const{idPrefix:t,element:n,field:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-name",label:o("Name"),getValue:e=>e.name,setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{name:e}})},debounce:s})}function GZ(e){const{idPrefix:t,element:n,field:i}=e,r=dV("commandStack"),o=dV("translate");return aF({element:i,id:t+"-type",label:o("Type"),getValue:e=>XZ(e),setValue:e=>{const t=Object.assign({},HZ);t[e]="",r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:t})},getOptions:e=>[{value:"string",label:o("String")},{value:"expression",label:o("Expression")}]})}function QZ(e){const{idPrefix:t,element:n,field:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return fF({element:i,id:t+"-value",label:o("Value"),getValue:e=>e.string||e.stringValue||e.expression,setValue:e=>{const t=XZ(i),o=Object.assign({},HZ);o[t]=e||"",r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:o})},debounce:s,autoResize:!0})}function XZ(e){return("string"in e?"string":"expression"in e&&"expression")||"stringValue"in e&&"string"||"string"}function KZ({element:e,injector:t}){const n=gZ(e);if(!n)return null;const i=bG(n,"camunda:Field"),r=t.get("bpmnFactory"),o=t.get("commandStack"),s=i.map(((t,n)=>{const i=e.id+"-fieldInjection-"+n;return{id:i,label:JZ(t),entries:UZ({idPrefix:i,element:e,field:t}),autoFocusEntry:i+"-name",remove:YZ({commandStack:o,element:e,field:t})}}));return{items:s,add:ZZ({bpmnFactory:r,commandStack:o,element:e})}}function YZ({commandStack:e,element:t,field:n}){return function(i){i.stopPropagation();const r=gZ(t);wG(t,r,n,e)}}function ZZ({bpmnFactory:e,commandStack:t,element:n}){return function(i){i.stopPropagation();const r=gZ(n),o=sW("camunda:Field",{name:void 0,string:"",stringValue:void 0},null,e);xG(n,r,o,e,t)}}function JZ(e){return e.name||""}function eJ(e){const{constraint:t,element:n,idPrefix:i}=e;return[{id:i+"-name",component:tJ,constraint:t,idPrefix:i,element:n},{id:i+"-config",component:nJ,constraint:t,idPrefix:i,element:n}]}function tJ(e){const{idPrefix:t,element:n,constraint:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-name",label:o("Name"),getValue:()=>i.name,setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{name:e}})},debounce:s})}function nJ(e){const{idPrefix:t,element:n,constraint:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-config",label:o("Config"),getValue:()=>i.config,setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{config:e}})},debounce:s})}function iJ(e){const{element:t,idPrefix:n,property:i}=e;return[{id:n+"-id",component:rJ,idPrefix:n,property:i,element:t},{id:n+"-value",component:oJ,idPrefix:n,property:i,element:t}]}function rJ(e){const{idPrefix:t,element:n,property:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-id",label:o("ID"),getValue:()=>i.id,setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{id:e}})},debounce:s})}function oJ(e){const{idPrefix:t,element:n,property:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-value",label:o("Value"),getValue:()=>i.value,setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{value:e}})},debounce:s})}function sJ(e){const{element:t,idPrefix:n,value:i}=e;return[{id:n+"-id",component:aJ,idPrefix:n,value:i,element:t},{id:n+"-name",component:lJ,idPrefix:n,value:i,element:t}]}function aJ(e){const{idPrefix:t,element:n,value:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-id",label:o("ID"),getValue:()=>i.id,setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{id:e}})},debounce:s})}function lJ(e){const{idPrefix:t,element:n,value:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-name",label:o("Name"),getValue:()=>i.name,setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{name:e}})},debounce:s})}const cJ=["boolean","date","enum","long","string",void 0];function pJ(e){const{idPrefix:t,formField:n}=e,i=[{id:t+"-formFieldID",component:uJ,idPrefix:t,formField:n},{id:t+"-formFieldLabel",component:dJ,idPrefix:t,formField:n},{id:t+"-formFieldType",component:hJ,idPrefix:t,formField:n}];return cJ.includes(n.get("type"))||i.push({id:t+"-formFieldCustomType",component:fJ,idPrefix:t,formField:n}),i.push({id:t+"-formFieldDefaultValue",component:mJ,idPrefix:t,formField:n}),"enum"===n.get("type")&&i.push({id:t+"-formFieldValues",component:yJ,formField:n,idPrefix:t}),i.push({id:t+"-formFieldConstraints",component:bJ,formField:n,idPrefix:t},{id:t+"-formFieldProperties",component:wJ,formField:n,idPrefix:t}),i}function uJ(e){const{idPrefix:t,element:n,formField:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-formFieldID",label:o("ID"),description:o("Refers to the process variable name"),getValue:()=>i.get("id"),setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{id:e}})},debounce:s})}function dJ(e){const{idPrefix:t,element:n,formField:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-formFieldLabel",label:o("Label"),getValue:()=>i.get("label"),setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{label:e}})},debounce:s})}function hJ(e){const{idPrefix:t,element:n,formField:i}=e,r=dV("commandStack"),o=dV("translate");return aF({element:i,id:t+"-formFieldType",label:o("Type"),getValue:()=>{const e=i.get("type");return cJ.includes(e)?e:""},setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{type:e}})},getOptions:()=>{const e=[{label:o("boolean"),value:"boolean"},{label:o("date"),value:"date"},{label:o("enum"),value:"enum"},{label:o("long"),value:"long"},{label:o("string"),value:"string"},{label:o(""),value:""}];return void 0===i.get("type")&&e.unshift({label:o(""),value:""}),e}})}function fJ(e){const{idPrefix:t,element:n,formField:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-formFieldCustomType",label:o("Custom type"),getValue:()=>i.get("type"),setValue:e=>{const t=e||"";r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{type:t}})},debounce:s})}function mJ(e){const{idPrefix:t,element:n,formField:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-formFieldDefaultValue",label:o("Default value"),getValue:()=>i.get("defaultValue"),setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{defaultValue:e}})},debounce:s})}function gJ(e){const{element:t,id:n,index:i,item:r,open:o}=e,s=dV("translate"),a=`${n}-value-${i}`;return q_(Kz,{id:a,element:t,entries:sJ({idPrefix:a,element:t,value:r}),label:r.get("id")||s(""),open:o})}function yJ(e){const{element:t,formField:n,idPrefix:i}=e,r=`${i}-formFieldValues`,o=dV("bpmnFactory"),s=dV("commandStack"),a=dV("translate"),l=n.get("values")||[];return q_(rF,{element:t,autoFocusEntry:`[data-entry-id="${r}-value-${l.length-1}"] input`,id:r,label:a("Values"),items:l,component:gJ,onAdd:function(){const e=sW("camunda:Value",{id:void 0,name:void 0},n,o);s.execute("element.updateModdleProperties",{element:t,moddleElement:n,properties:{values:[...n.get("values"),e]}})},onRemove:function(e){s.execute("element.updateModdleProperties",{element:t,moddleElement:n,properties:{values:E(n.get("values"),e)}})}})}function vJ(e){const{element:t,id:n,index:i,item:r,open:o}=e,s=dV("translate"),a=`${n}-constraint-${i}`;return q_(Kz,{id:a,element:t,entries:eJ({constraint:r,element:t,idPrefix:a}),label:r.get("name")||s(""),open:o})}function bJ(e){const{element:t,formField:n,idPrefix:i}=e,r=`${i}-formFieldConstraints`,o=dV("bpmnFactory"),s=dV("commandStack"),a=dV("translate"),l=Wx(t);let c=n.get("validation");const p=c&&c.get("constraints")||[];return q_(rF,{element:t,autoFocusEntry:`[data-entry-id="${r}-constraint-${p.length-1}"] input`,id:r,label:a("Constraints"),items:p,component:vJ,onAdd:function(){const e=[];c||(c=sW("camunda:Validation",{},l,o),e.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:n,properties:{validation:c}}}));const i=sW("camunda:Constraint",{name:void 0,config:void 0},c,o);e.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:c,properties:{constraints:[...c.get("constraints"),i]}}}),s.execute("properties-panel.multi-command-executor",e)},onRemove:function(e){s.execute("element.updateModdleProperties",{element:t,moddleElement:c,properties:{constraints:E(c.get("constraints"),e)}})}})}function xJ(e){const{element:t,id:n,index:i,item:r,open:o}=e,s=dV("translate"),a=`${n}-property-${i}`;return q_(Kz,{id:a,element:t,entries:iJ({element:t,idPrefix:a,property:r}),label:r.get("id")||s(""),open:o})}function wJ(e){const{element:t,formField:n,idPrefix:i}=e,r=`${i}-formFieldProperties`,o=dV("bpmnFactory"),s=dV("commandStack"),a=dV("translate"),l=Wx(t);let c=n.get("properties");const p=c&&c.get("values")||[];return q_(rF,{element:t,autoFocusEntry:`[data-entry-id="${r}-property-${p.length-1}"] input`,id:r,label:a("Properties"),items:p,component:xJ,onAdd:function(){const e=[];c||(c=sW("camunda:Properties",{},l,o),e.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:n,properties:{properties:c}}}));const i=sW("camunda:Property",{id:void 0,value:void 0},c,o);e.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:c,properties:{values:[...c.get("values"),i]}}}),s.execute("properties-panel.multi-command-executor",e)},onRemove:function(e){s.execute("element.updateModdleProperties",{element:t,moddleElement:c,properties:{values:E(c.get("values"),e)}})}})}function _J({element:e,injector:t}){if(!function(e){const t=PJ(e);return(Hx(e,"bpmn:StartEvent")&&!Hx(e.parent,"bpmn:SubProcess")||Hx(e,"bpmn:UserTask"))&&t}(e))return;const n=kJ(e)||[],i=t.get("bpmnFactory"),r=t.get("commandStack"),o=n.map(((t,n)=>{const i=e.id+"-formField-"+n;return{id:i,label:t.get("id")||"",entries:pJ({idPrefix:i,element:e,formField:t}),autoFocusEntry:i+"-formFieldID",remove:OJ({commandStack:r,element:e,formField:t})}}));return{items:o,add:EJ({bpmnFactory:i,commandStack:r,element:e})}}function EJ({bpmnFactory:e,commandStack:t,element:n}){return function(i){i.stopPropagation();const r=[],o=PJ(n),s=sW("camunda:FormField",{},o,e);r.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:o,properties:{fields:[...o.get("fields"),s]}}}),t.execute("properties-panel.multi-command-executor",r)}}function OJ({commandStack:e,element:t,formField:n}){return function(i){i.stopPropagation();const r=PJ(t),o=kJ(t);if(!o||!o.length)return;const s=E(r.get("fields"),n);e.execute("element.updateModdleProperties",{element:t,moddleElement:r,properties:{fields:s}})}}function PJ(e){return bG(Wx(e),"camunda:FormData")[0]}function kJ(e){const t=PJ(Wx(e));return t&&t.fields}const SJ={"camunda:formRef":void 0,"camunda:formRefBinding":void 0,"camunda:formRefVersion":void 0},CJ={"camunda:formKey":void 0};function TJ(e){const{element:t}=e,n=dV("translate"),i=dV("bpmnFactory"),r=Wx(t),o=dV("commandStack");let s=r.get("extensionElements");return aF({element:t,id:"formType",label:n("Type"),getValue:()=>u(r.get("camunda:formKey"))?"formKey":u(r.get("camunda:formRef"))?"formRef":AJ(t)?"formData":"",setValue:e=>{const n=function(e){const t=Wx(e),n=t.get("extensionElements"),i=[];i.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:t,properties:{...SJ,...CJ}}}),n&&AJ(e)&&i.push({cmd:"element.updateModdleProperties",context:{element:e,moddleElement:n,properties:{values:E(n.get("values"),AJ(e))}}});return i}(t);if("formData"===e){s||(s=sW("bpmn:ExtensionElements",{values:[]},r,i),n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:r,properties:{extensionElements:s}}}));const e=sW("camunda:FormData",{fields:[]},s,i);n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{values:[...s.get("values"),e]}}})}else"formKey"===e?n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:r,properties:{"camunda:formKey":""}}}):"formRef"===e&&n.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:r,properties:{"camunda:formRef":""}}});o.execute("properties-panel.multi-command-executor",n)},getOptions:()=>[{value:"",label:n("")},{value:"formRef",label:n("Camunda Forms")},{value:"formKey",label:n("Embedded or External Task Forms")},{value:"formData",label:n("Generated Task Forms")}]})}function AJ(e){return bG(Wx(e),"camunda:FormData")[0]}function MJ(e){return Wx(e).get("camunda:formRefBinding")||"latest"}function DJ(e){const{element:t}=e;if(!function(e){return Hx(e,"bpmn:StartEvent")&&!Hx(e.parent,"bpmn:SubProcess")||Hx(e,"bpmn:UserTask")}(t))return[];const n=function(e){const t=Wx(e);return u(t.get("camunda:formKey"))?"formKey":u(t.get("camunda:formRef"))?"formRef":void 0}(t),i=MJ(t),r=[{id:"formType",component:TJ,isEdited:lF}];return"formKey"===n?r.push({id:"formKey",component:RJ,isEdited:bF}):"formRef"===n&&(r.push({id:"formRef",component:NJ,isEdited:bF},{id:"formRefBinding",component:$J,isEdited:lF}),"version"===i&&r.push({id:"formRefVersion",component:jJ,isEdited:bF})),r}function RJ(e){const{element:t}=e,n=dV("debounceInput"),i=dV("modeling"),r=dV("translate"),o=Wx(t);return vF({element:t,id:"formKey",label:r("Form key"),getValue:()=>o.get("camunda:formKey"),setValue:e=>{i.updateProperties(t,{"camunda:formKey":p(e)?"":e})},debounce:n})}function NJ(e){const{element:t}=e,n=dV("debounceInput"),i=dV("modeling"),r=dV("translate"),o=Wx(t);return vF({element:t,id:"formRef",label:r("Form reference"),getValue:()=>o.get("camunda:formRef"),setValue:e=>{i.updateProperties(t,{"camunda:formRef":p(e)?"":e})},debounce:n})}function $J(e){const{element:t}=e,n=dV("modeling"),i=dV("translate");return aF({element:t,id:"formRefBinding",label:i("Binding"),getValue:()=>MJ(t),setValue:e=>{n.updateProperties(t,{"camunda:formRefBinding":e})},getOptions:()=>[{value:"deployment",label:i("deployment")},{value:"latest",label:i("latest")},{value:"version",label:i("version")}]})}function jJ(e){const{element:t}=e,n=dV("debounceInput"),i=dV("modeling"),r=dV("translate"),o=Wx(t);return vF({element:t,id:"formRefVersion",label:r("Version"),getValue:()=>o.get("camunda:formRefVersion"),setValue:e=>{i.updateProperties(t,{"camunda:formRefVersion":e})},debounce:n})}function IJ(e){const{element:t}=e,n=Wx(t);return Hx(t,"bpmn:Process")||Hx(t,"bpmn:Participant")&&n.get("processRef")?[{id:"historyTimeToLive",component:LJ,isEdited:bF}]:[]}function LJ(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=function(e){return Hx(e,"bpmn:Process")?Wx(e):Wx(e).get("processRef")}(t);return vF({element:t,id:"historyTimeToLive",label:i("Time to live"),getValue:()=>o.get("camunda:historyTimeToLive")||"",setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:historyTimeToLive":e}})},debounce:r})}function BJ(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=Wx(t);return vF({element:t,id:"decisionRef",label:i("Decision reference"),getValue:()=>o.get("camunda:decisionRef"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:decisionRef":e||""}})},debounce:r})}function qJ(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate");return aF({element:t,id:"decisionRefBinding",label:i("Binding"),getValue:()=>WJ(t),setValue:e=>{const i=Wx(t),r={"camunda:decisionRefVersion":void 0,"camunda:decisionRefVersionTag":void 0,"camunda:decisionRefBinding":e};n.execute("element.updateModdleProperties",{element:t,moddleElement:i,properties:r})},getOptions:()=>[{value:"deployment",label:i("deployment")},{value:"latest",label:i("latest")},{value:"version",label:i("version")},{value:"versionTag",label:i("versionTag")}]})}function zJ(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=Wx(t);return vF({element:t,id:"decisionRefVersion",label:i("Version"),getValue:()=>o.get("camunda:decisionRefVersion"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:decisionRefVersion":e}})},debounce:r})}function FJ(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=Wx(t);return vF({element:t,id:"decisionRefVersionTag",label:i("Version tag"),getValue:()=>o.get("camunda:decisionRefVersionTag"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:decisionRefVersionTag":e}})},debounce:r})}function VJ(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=Wx(t);return vF({element:t,id:"decisionRefTenantId",label:i("Tenant ID"),getValue:()=>o.get("camunda:decisionRefTenantId"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:decisionRefTenantId":e}})},debounce:r})}function HJ(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=Wx(t);return vF({element:t,id:"decisionRefResultVariable",label:i("Result variable"),getValue:()=>GJ(o),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:resultVariable":e}})},debounce:r})}function UJ(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=Wx(t);return aF({element:t,id:"mapDecisionResult",label:i("Map decision result"),getValue:()=>r.get("camunda:mapDecisionResult")||"resultList",setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:r,properties:{"camunda:mapDecisionResult":e}})},getOptions:()=>[{value:"collectEntries",label:i("collectEntries (List)")},{value:"resultList",label:i("resultList (List>)")},{value:"singleEntry",label:i("singleEntry (TypedValue)")},{value:"singleResult",label:i("singleResult (Map)")}]})}function WJ(e){return Wx(e).get("camunda:decisionRefBinding")||"latest"}function GJ(e){return Wx(e).get("camunda:resultVariable")}const QJ={"camunda:class":void 0,"camunda:expression":void 0,"camunda:delegateExpression":void 0,"camunda:resultVariable":void 0},XJ={"camunda:decisionRef":void 0,"camunda:decisionRefBinding":"latest","camunda:decisionRefVersion":void 0,"camunda:mapDecisionResult":"resultList","camunda:decisionRefTenantId":void 0},KJ={"camunda:type":void 0,"camunda:topic":void 0},YJ="",ZJ="Java class",JJ="Expression",e0="Delegate expression",t0="DMN",n0="External",i0="Connector";function r0(e){const{element:t}=e,n=dV("bpmnFactory"),i=dV("commandStack"),r=dV("translate");return aF({element:t,id:"implementationType",label:r("Type"),getValue:()=>yZ(t)||"",setValue:e=>{const r=yZ(t),o=gZ(t),s=[];let a=QJ,l=o.get("extensionElements");if(o0(e)&&(a={...a,[e]:o0(r)?o.get(`camunda:${r}`):""}),fZ(o)&&(a={...a,...XJ},"dmn"===e&&(a={...a,"camunda:decisionRef":""})),mZ(o)&&(a={...a,...KJ},"external"===e&&(a={...a,"camunda:type":"external","camunda:topic":""})),hZ(o)){const i=function(e){return bG(e,"camunda:Connector")}(o);if(i.length&&s.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:l,properties:{values:E(l.get("values"),(e=>i.includes(e)))}}}),"connector"===e){l||(l=sW("bpmn:ExtensionElements",{values:[]},o,n),s.push(s0(t,o,{extensionElements:l})));const e=sW("camunda:Connector",{},l,n);s.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:l,properties:{values:[...l.get("values"),e]}}})}}s.push(s0(t,o,a)),i.execute("properties-panel.multi-command-executor",s)},getOptions:()=>{const e=gZ(t),n=[{value:"",label:r(YJ)},{value:"class",label:r(ZJ)},{value:"expression",label:r(JJ)},{value:"delegateExpression",label:r(e0)}];return fZ(e)&&n.push({value:"dmn",label:r("DMN")}),mZ(e)&&n.push({value:"external",label:r(n0)}),hZ(e)&&n.push({value:"connector",label:r(i0)}),function(e){const t={[YJ]:0,[ZJ]:3,[JJ]:4,[e0]:5,[t0]:1,[n0]:2,[i0]:6};return R(e,(e=>t[e.label]))}(n)}})}function o0(e){return["class","expression","delegateExpression"].includes(e)}function s0(e,t,n){return{cmd:"element.updateModdleProperties",context:{element:e,moddleElement:t,properties:n}}}function a0(e){const{element:t}=e;if(!gZ(t))return[];const n=yZ(t),i=[{id:"implementationType",component:r0,isEdited:lF}];return"class"===n?i.push({id:"javaClass",component:l0,isEdited:bF}):"expression"===n?i.push({id:"expression",component:c0,isEdited:bF},{id:"expressionResultVariable",component:p0,isEdited:bF}):"delegateExpression"===n?i.push({id:"delegateExpression",component:u0,isEdited:bF}):"dmn"===n?i.push(...function(e){const{element:t}=e,n=[],i=yZ(t),r=WJ(t);return"dmn"!==i||(n.push({id:"decisionRef",component:BJ,isEdited:bF}),n.push({id:"decisionRefBinding",component:qJ,isEdited:lF}),"version"===r&&n.push({id:"decisionRefVersion",component:zJ,isEdited:bF}),"versionTag"===r&&n.push({id:"decisionRefVersionTag",component:FJ,isEdited:bF}),n.push({id:"decisionRefTenantId",component:VJ,isEdited:bF}),n.push({id:"decisionRefResultVariable",component:HJ,isEdited:bF}),GJ(t)&&n.push({id:"mapDecisionResult",component:UJ,isEdited:lF})),n}({element:t})):"external"===n?i.push({id:"externalTopic",component:d0,isEdited:bF}):"connector"===n&&i.push({id:"connectorId",component:h0,isEdited:bF}),i}function l0(e){const{element:t,businessObject:n=gZ(t),id:i="javaClass"}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:t,id:i,label:o("Java class"),getValue:()=>n.get("camunda:class"),setValue:e=>{r.execute("element.updateModdleProperties",{element:t,moddleElement:n,properties:{"camunda:class":e||""}})},debounce:s})}function c0(e){const{element:t,businessObject:n=gZ(t),id:i="expression"}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:t,id:i,label:o("Expression"),getValue:()=>n.get("camunda:expression"),setValue:e=>{r.execute("element.updateModdleProperties",{element:t,moddleElement:n,properties:{"camunda:expression":e||""}})},debounce:s})}function p0(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=gZ(t);return vF({element:t,id:"expressionResultVariable",label:i("Result variable"),getValue:()=>o.get("camunda:resultVariable"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:resultVariable":e}})},debounce:r})}function u0(e){const{element:t,businessObject:n=gZ(t),id:i="delegateExpression"}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:t,id:i,label:o("Delegate expression"),getValue:()=>n.get("camunda:delegateExpression"),setValue:e=>{r.execute("element.updateModdleProperties",{element:t,moddleElement:n,properties:{"camunda:delegateExpression":e||""}})},debounce:s})}function d0(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=gZ(t);return vF({element:t,id:"externalTopic",label:i("Topic"),getValue:()=>o.get("camunda:topic"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:topic":e}})},debounce:r})}function h0(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=function(e){const t=gZ(e),n=function(e){return bG(e,"camunda:Connector")}(t);return n[0]}(t);return vF({element:t,id:"connectorId",label:i("Connector ID"),getValue:()=>o.get("camunda:connectorId"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:connectorId":e}})},debounce:r})}function f0(e){const{element:t}=e;return function(e){return Hx(e,"camunda:Initiator")&&!Hx(e.parent,"bpmn:SubProcess")}(t)?[{id:"initiator",component:m0,isEdited:bF}]:[]}function m0(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=Wx(t);return vF({element:t,id:"initiator",label:i("Initiator"),getValue:()=>o.get("camunda:initiator"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:initiator":e}})},debounce:r})}function g0(e){const{element:t}=e;if(!function(e){const t=qU(e);if(t)return Ux(e,["bpmn:IntermediateThrowEvent","bpmn:EndEvent"]);return Hx(e,"bpmn:CallActivity")}(t))return[];const n=[{id:"inMapping-propagation",component:y0,isEdited:nF}];return x0(t)&&n.push({id:"inMapping-propagation-local",component:v0,isEdited:nF}),n}function y0(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory");return tF({id:"inMapping-propagation",label:dV("translate")("Propagate all variables"),getValue:()=>x0(t),setValue:e=>{e?function(){const e=qU(t)||Wx(t),r=sW("camunda:In",{variables:"all"},null,i);xG(t,e,r,i,n)}():function(){const e=qU(t)||Wx(t),i=b0(t);wG(t,e,i,n)}()}})}function v0(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=b0(t)[0];return tF({element:t,id:"inMapping-propagation-local",label:i("Local"),getValue:()=>r.get("camunda:local"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:r,properties:{local:e}})}})}function b0(e){const t=function(e){const t=Wx(e);return bG(qU(t)||t,"camunda:In")}(e);return w(t,(function(e){const t=e.get("variables");return t&&"all"===t}))}function x0(e){return!!b0(e).length}const w0={source:void 0,sourceExpression:void 0};function _0(e){const{idPrefix:t,mapping:n}=e,i=C0(n),r=[];return r.push({id:t+"-type",component:E0,idPrefix:t,mapping:n}),"source"===i&&r.push({id:t+"-source",component:O0,idPrefix:t,mapping:n}),"sourceExpression"===i&&r.push({id:t+"-sourceExpression",component:P0,idPrefix:t,mapping:n}),r.push({id:t+"-target",component:k0,idPrefix:t,mapping:n}),r.push({id:t+"-local",component:S0,idPrefix:t,mapping:n}),r}function E0(e){const{idPrefix:t,element:n,mapping:i}=e,r=dV("commandStack"),o=dV("translate");return aF({element:i,id:t+"-type",label:o("Type"),getValue:e=>C0(e),setValue:e=>{const t={...w0,[e]:""};r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:t})},getOptions:()=>[{label:o("Source"),value:"source"},{label:o("Source expression"),value:"sourceExpression"}]})}function O0(e){const{idPrefix:t,element:n,mapping:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-source",label:o("Source"),getValue:e=>e.get("camunda:source"),setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{source:e}})},debounce:s})}function P0(e){const{idPrefix:t,element:n,mapping:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-sourceExpression",label:o("Source expression"),getValue:e=>e.get("camunda:sourceExpression"),setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{sourceExpression:e}})},debounce:s})}function k0(e){const{idPrefix:t,element:n,mapping:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput");return vF({element:i,id:t+"-target",label:o("Target"),getValue:e=>e.get("camunda:target"),setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{target:e}})},debounce:s})}function S0(e){const{idPrefix:t,element:n,mapping:i}=e,r=dV("commandStack"),o=dV("translate");return tF({element:n,id:t+"-local",label:o("Local"),getValue:()=>i.get("camunda:local"),setValue:e=>{r.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{local:e}})}})}function C0(e){let t="";return void 0!==e.source?t="source":void 0!==e.sourceExpression&&(t="sourceExpression"),t}function T0({element:e,injector:t}){if(!function(e){const t=qU(e);if(t)return Ux(e,["bpmn:IntermediateThrowEvent","bpmn:EndEvent"]);return Hx(e,"bpmn:CallActivity")}(e))return null;const n=function(e){const t=Wx(e),n=qU(t);return w(bG(n||t,"camunda:In"),(function(e){return!(e.businessKey||e.variables&&"all"===e.variables)}))}(e)||[],i=t.get("bpmnFactory"),r=t.get("commandStack"),o=n.map(((t,n)=>{const i=e.id+"-inMapping-"+n;return{id:i,label:t.get("target")||"",entries:_0({idPrefix:i,element:e,mapping:t}),autoFocusEntry:i+"-target",remove:A0({commandStack:r,element:e,mapping:t})}}));return{items:o,add:M0({bpmnFactory:i,commandStack:r,element:e})}}function A0({commandStack:e,element:t,mapping:n}){return function(i){i.stopPropagation();const r=qU(t)||Wx(t);wG(t,r,n,e)}}function M0({bpmnFactory:e,commandStack:t,element:n}){return function(i){i.stopPropagation();const r=qU(n)||Wx(n),o=sW("camunda:In",{source:""},null,e);xG(n,r,o,e,t)}}function D0(e){const{element:t,injector:n}=e;if(!function(e){return GY(e)}(t))return null;const i=UY(t)||[],r=n.get("bpmnFactory"),o=n.get("commandStack"),s=i.map(((e,n)=>{const i=t.id+"-inputParameter-"+n;return{id:i,label:e.get("name")||"",entries:lZ({idPrefix:i,element:t,parameter:e}),autoFocusEntry:i+"-name",remove:R0({element:t,commandStack:o,parameter:e})}}));return{items:s,add:function(e){e.stopPropagation(),o.execute("properties-panel.multi-command-executor",KY(t,"camunda:InputParameter",r))}}}function R0(e){const{commandStack:t,element:n,parameter:i}=e;return function(e){e.stopPropagation();const r=HY(n);r&&t.execute("element.updateModdleProperties",{element:n,moddleElement:r,properties:{inputParameters:E(r.get("inputParameters"),i)}})}}function N0(e){const{element:t}=e,n=Wx(t),i=[];return(Hx(t,"camunda:AsyncCapable")&&I0(n)||L0(t))&&i.push({id:"retryTimeCycle",component:j0,isEdited:bF}),(Hx(t,"camunda:JobPriorized")&&I0(n)||Hx(t,"bpmn:Process")||Hx(t,"bpmn:Participant")&&n.get("processRef")||L0(t))&&i.push({id:"jobPriority",component:$0,isEdited:bF}),i}function $0(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=Hx(t,"bpmn:Participant")?Wx(t).get("processRef"):Wx(t);return vF({element:t,id:"jobPriority",label:i("Priority"),getValue:()=>o.get("camunda:jobPriority"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:jobPriority":e}})},debounce:r})}function j0(e){const{element:t}=e,n=dV("bpmnFactory"),i=dV("commandStack"),r=dV("translate"),o=dV("debounceInput"),s=Wx(t);return vF({element:t,id:"retryTimeCycle",label:r("Retry time cycle"),getValue:()=>{const e=bG(s,"camunda:FailedJobRetryTimeCycle")[0];return e&&e.body},setValue:e=>{const r=[];let o=s.get("extensionElements");o||(o=sW("bpmn:ExtensionElements",{values:[]},s,n),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{extensionElements:o}}}));let a=bG(s,"camunda:FailedJobRetryTimeCycle")[0];a||(a=sW("camunda:FailedJobRetryTimeCycle",{},o,n),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:o,properties:{values:[...o.get("values"),a]}}})),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{body:e}}}),i.execute("properties-panel.multi-command-executor",r)},debounce:o})}function I0(e){return function(e){return!!e.get("camunda:asyncAfter")}(e)||function(e){return!(!e.get("camunda:asyncBefore")&&!e.get("camunda:async"))}(e)}function L0(e){return Hx(e,"bpmn:Event")&&NU(e)}function B0(e){const{element:t}=e,n=G0(t);let i=e.entries||[];return function(e){const t=G0(e);return!!t&&Hx(t,"camunda:Collectable")}(t)?(i.push({id:"collection",component:q0,isEdited:bF},{id:"elementVariable",component:z0,isEdited:bF},{id:"multiInstanceAsynchronousBefore",component:F0,isEdited:nF},{id:"multiInstanceAsynchronousAfter",component:V0,isEdited:nF}),(X0(r=n)||Q0(r))&&i.push({id:"multiInstanceExclusive",component:H0,isEdited:K0},{id:"multiInstanceRetryTimeCycle",component:U0,isEdited:bF}),i):i;var r}function q0(e){const{element:t}=e,n=dV("debounceInput"),i=dV("commandStack"),r=dV("translate"),o=G0(t);return vF({element:t,id:"collection",label:r("Collection"),getValue:()=>function(e){return W0(e,"camunda:collection")}(t),setValue:e=>i.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:collection":e}}),debounce:n})}function z0(e){const{element:t}=e,n=dV("debounceInput"),i=dV("commandStack"),r=dV("translate"),o=G0(t);return vF({element:t,id:"elementVariable",label:r("Element variable"),getValue:()=>function(e){return W0(e,"camunda:elementVariable")}(t),setValue:e=>i.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:elementVariable":e}}),debounce:n})}function F0(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=G0(t);return tF({element:t,id:"multiInstanceAsynchronousBefore",label:i("Asynchronous before"),getValue:()=>Q0(r),setValue:e=>{const i={"camunda:asyncBefore":e,"camunda:async":void 0};n.execute("element.updateModdleProperties",{element:t,moddleElement:r,properties:i})}})}function V0(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=G0(t);return tF({element:t,id:"multiInstanceAsynchronousAfter",label:i("Asynchronous after"),getValue:()=>X0(r),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:r,properties:{"camunda:asyncAfter":e}})}})}function H0(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=G0(t);return tF({element:t,id:"multiInstanceExclusive",label:i("Exclusive"),getValue:()=>!!r.get("camunda:exclusive"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:r,properties:{"camunda:exclusive":e}})}})}function U0(e){const{element:t}=e,n=dV("bpmnFactory"),i=dV("commandStack"),r=dV("translate"),o=dV("debounceInput"),s=G0(t);return vF({element:t,id:"multiInstanceRetryTimeCycle",label:r("Retry time cycle"),getValue:()=>{const e=bG(s,"camunda:FailedJobRetryTimeCycle")[0];return e&&e.body},setValue:e=>{const r=[];let o=s.get("extensionElements");o||(o=sW("bpmn:ExtensionElements",{values:[]},s,n),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:s,properties:{extensionElements:o}}}));let a=bG(s,"camunda:FailedJobRetryTimeCycle")[0];a||(a=sW("camunda:FailedJobRetryTimeCycle",{},o,n),r.push({cmd:"element.updateModdleProperties",context:{element:s,moddleElement:o,properties:{values:[...o.get("values"),a]}}})),r.push({cmd:"element.updateModdleProperties",context:{element:t,moddleElement:a,properties:{body:e}}}),i.execute("properties-panel.multi-command-executor",r)},debounce:o})}function W0(e,t){var n=G0(e);return n&&n.get(t)}function G0(e){return Wx(e).loopCharacteristics}function Q0(e){return!(!e.get("camunda:asyncBefore")&&!e.get("camunda:async"))}function X0(e){return!!e.get("camunda:asyncAfter")}function K0(e){return e&&!e.checked}function Y0(e){const{element:t}=e;if(!function(e){return Hx(e,"bpmn:CallActivity")}(t))return[];const n=[{id:"outMapping-propagation",component:Z0,isEdited:nF}];return t1(t)&&n.push({id:"outMapping-propagation-local",component:J0,isEdited:nF}),n}function Z0(e){const{element:t}=e,n=dV("commandStack"),i=dV("bpmnFactory");return tF({id:"outMapping-propagation",label:dV("translate")("Propagate all variables"),getValue:()=>t1(t),setValue:e=>{e?function(){const e=Wx(t),r=sW("camunda:Out",{variables:"all"},null,i);xG(t,e,r,i,n)}():function(){const e=Wx(t),i=e1(t);wG(t,e,i,n)}()}})}function J0(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=e1(t)[0];return tF({element:t,id:"outMapping-propagation-local",label:i("Local"),getValue:()=>r.get("camunda:local"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:r,properties:{local:e}})}})}function e1(e){const t=function(e){return bG(Wx(e),"camunda:Out")}(e);return w(t,(function(e){const t=e.get("variables");return t&&"all"===t}))}function t1(e){return!!e1(e).length}function n1({element:e,injector:t}){if(!function(e){return Hx(e,"bpmn:CallActivity")}(e))return null;const n=function(e){const t=Wx(e);return w(bG(t,"camunda:Out"),(function(e){return!(e.businessKey||e.variables&&"all"===e.variables)}))}(e)||[],i=t.get("bpmnFactory"),r=t.get("commandStack"),o=n.map(((t,n)=>{const i=e.id+"-outMapping-"+n;return{id:i,label:t.get("target")||"",entries:_0({idPrefix:i,element:e,mapping:t}),autoFocusEntry:i+"-target",remove:i1({commandStack:r,element:e,mapping:t})}}));return{items:o,add:r1({bpmnFactory:i,commandStack:r,element:e})}}function i1({commandStack:e,element:t,mapping:n}){return function(i){i.stopPropagation();const r=Wx(t);wG(t,r,n,e)}}function r1({bpmnFactory:e,commandStack:t,element:n}){return function(i){i.stopPropagation();const r=Wx(n),o=sW("camunda:Out",{source:""},null,e);xG(n,r,o,e,t)}}function o1({element:e,injector:t}){if(!function(e){const t=Wx(e);return GY(e)&&!Hx(t,"bpmn:EndEvent")&&!t.loopCharacteristics}(e))return null;const n=WY(e)||[],i=t.get("bpmnFactory"),r=t.get("commandStack"),o=n.map(((t,n)=>{const i=e.id+"-outputParameter-"+n;return{id:i,label:t.get("name")||"",entries:lZ({idPrefix:i,element:e,parameter:t}),autoFocusEntry:i+"-name",remove:s1({commandStack:r,element:e,parameter:t})}}));return{items:o,add:a1({bpmnFactory:i,commandStack:r,element:e})}}function s1({commandStack:e,element:t,parameter:n}){return function(i){i.stopPropagation();const r=HY(t);r&&e.execute("element.updateModdleProperties",{element:t,moddleElement:r,properties:{outputParameters:E(r.get("outputParameters"),n)}})}}function a1({bpmnFactory:e,commandStack:t,element:n}){return function(i){i.stopPropagation(),t.execute("properties-panel.multi-command-executor",KY(n,"camunda:OutputParameter",e))}}function l1(e){const{element:t,listener:n,idPrefix:i}=e;let{timerEventDefinition:r}=e;if(!r){r=ZW(Wx(t))}const o=YW(r);if(!KW(t)&&!function(e){return e&&Hx(e,"camunda:TaskListener")&&ZW(e)}(n))return[];const s=[];return s.push({id:d1(i,"timerEventDefinitionType"),component:c1,isEdited:lF,timerEventDefinition:r,timerEventDefinitionType:o}),o&&s.push({id:d1(i,"timerEventDefinitionValue"),component:p1,isEdited:bF,timerEventDefinition:r,timerEventDefinitionType:o}),s}function c1(e){const{element:t,timerEventDefinition:n,timerEventDefinitionType:i}=e,r=dV("commandStack"),o=dV("bpmnFactory"),s=dV("translate");return aF({element:t,id:"timerEventDefinitionType",label:s("Type"),getValue:()=>i||"",setValue:e=>{if(e===i)return;const s=o.create("bpmn:FormalExpression",{body:void 0});s.$parent=n;const a={timeDuration:void 0,timeDate:void 0,timeCycle:void 0};""!==e&&(a[e]=s),r.execute("element.updateModdleProperties",{element:t,moddleElement:n,properties:a})},getOptions:e=>[{value:"",label:s("")},{value:"timeDate",label:s("Date")},{value:"timeDuration",label:s("Duration")},{value:"timeCycle",label:s("Cycle")}]})}function p1(e){const{element:t,timerEventDefinition:n,timerEventDefinitionType:i}=e,r=dV("commandStack"),o=dV("translate"),s=dV("debounceInput"),a=n.get(i);return vF({element:t,id:"timerEventDefinitionValue",label:o("Value"),getValue:()=>a&&a.get("body"),setValue:e=>{r.execute("element.updateModdleProperties",{element:t,moddleElement:a,properties:{body:e}})},debounce:s,tooltip:u1(i,o)})}function u1(e,t){switch(e){case"timeDate":return q_("div",{children:[q_("p",{children:t("A specific point in time defined as ISO 8601 combined date and time representation.")}),q_("ul",{children:[q_("li",{children:[q_("code",{children:"2019-10-01T12:00:00Z"})," - ",t("UTC time")]}),q_("li",{children:[q_("code",{children:"2019-10-02T08:09:40+02:00"})," - ",t("UTC plus 2 hours zone offset")]})]}),q_("a",{href:"https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-date",target:"_blank",rel:"noopener noreferrer",children:t("Documentation: Timer events")})]});case"timeCycle":return q_("div",{children:[q_("p",{children:t("A cycle defined as ISO 8601 repeating intervals format, or a cron expression.")}),q_("ul",{children:[q_("li",{children:[q_("code",{children:"R5/PT10S"})," - ",t("every 10 seconds, up to 5 times")]}),q_("li",{children:[q_("code",{children:"R/P1D"})," - ",t("every day, infinitely")]}),q_("li",{children:[q_("code",{children:"0 0 9-17 * * MON-FRI"})," - ",t("every hour on the hour from 9-5 p.m. UTC Monday-Friday")]})]}),q_("a",{href:"https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-cycle",target:"_blank",rel:"noopener noreferrer",children:t("Documentation: Timer events")})]});case"timeDuration":return q_("div",{children:[q_("p",{children:t("A time duration defined as ISO 8601 durations format.")}),q_("ul",{children:[q_("li",{children:[q_("code",{children:"PT15S"})," - ",t("15 seconds")]}),q_("li",{children:[q_("code",{children:"PT1H30M"})," - ",t("1 hour and 30 minutes")]}),q_("li",{children:[q_("code",{children:"P14D"})," - ",t("14 days")]})]}),q_("a",{href:"https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-duration",target:"_blank",rel:"noopener noreferrer",children:t("Documentation: Timer events")})]})}}function d1(e,t){return e?e+t:t}const h1=["bpmn:Activity","bpmn:Event","bpmn:Gateway","bpmn:SequenceFlow","bpmn:Process","bpmn:Participant"],f1={...{script:void 0,resource:void 0,scriptFormat:void 0},...{class:void 0},...{expression:void 0},...{delegateExpression:void 0}},m1={eventDefinitions:void 0,event:void 0},g1={class:"Java class",expression:"Expression",delegateExpression:"Delegate expression",script:"Script"},y1={start:"Start",end:"End",take:"Take",create:"Create",assignment:"Assignment",complete:"Complete",delete:"Delete",update:"Update",timeout:"Timeout"};function v1({element:e,injector:t}){if(!Ux(e,h1))return;const n=t.get("bpmnFactory"),i=t.get("commandStack");if(Hx(e,"bpmn:Participant")&&!e.businessObject.processRef)return;return{items:bG($1(e),"camunda:ExecutionListener").map(((t,n)=>{const r=`${e.id}-executionListener-${n}`;return{id:r,label:M1(t),entries:b1({idPrefix:r,element:e,listener:t}),autoFocusEntry:r+"-javaClass",remove:_1({element:e,listener:t,commandStack:i})}})),add:(r={bpmnFactory:n,commandStack:i,element:e},A1({...r,listenerGroup:"camunda:ExecutionListener"}))};var r}function b1(e){const{idPrefix:t,element:n,listener:i}=e;return[{id:`${t}-eventType`,component:E1,listener:i},{id:`${t}-listenerType`,component:P1,listener:i},...k1({idPrefix:t,element:n,listener:i}),{id:`${t}-fields`,component:T1,listener:i}]}function x1({element:e,injector:t}){if(!Hx(e,"bpmn:UserTask"))return;const n=t.get("bpmnFactory"),i=t.get("commandStack");return{items:bG($1(e),"camunda:TaskListener").map(((t,n)=>{const r=`${e.id}-taskListener-${n}`;return{id:r,label:M1(t),entries:w1({idPrefix:r,element:e,listener:t}),autoFocusEntry:r+"-listenerId",remove:_1({element:e,listener:t,commandStack:i})}})),add:(r={bpmnFactory:n,commandStack:i,element:e},A1({...r,listenerGroup:"camunda:TaskListener"}))};var r}function w1(e){const{idPrefix:t,element:n,listener:i}=e;return[{id:`${t}-eventType`,component:E1,listener:i},{id:`${t}-listenerId`,component:O1,listener:i},{id:`${t}-listenerType`,component:P1,listener:i},...k1({idPrefix:t,element:n,listener:i}),...S1({idPrefix:t,element:n,listener:i}),{id:`${t}-fields`,component:T1,listener:i}]}function _1({element:e,listener:t,commandStack:n}){return function(i){i.stopPropagation(),wG(e,$1(e),t,n)}}function E1({id:e,element:t,listener:n}){const i=dV("translate"),r=dV("bpmnFactory"),o=dV("commandStack");return q_(aF,{id:e,label:i("Event type"),getValue:function(){return n.get("event")},setValue:function(e){const i=function(e,t){if("timeout"===e)return{...m1,eventDefinitions:[t.create("bpmn:TimerEventDefinition")],event:e};return{...m1,event:e}}(e,r);o.execute("element.updateModdleProperties",{element:t,moddleElement:n,properties:i})},getOptions:function(){return Hx(n,"camunda:TaskListener")?[{value:"create",label:i("create")},{value:"assignment",label:i("assignment")},{value:"complete",label:i("complete")},{value:"delete",label:i("delete")},{value:"update",label:i("update")},{value:"timeout",label:i("timeout")}]:Hx(t,"bpmn:SequenceFlow")?[{value:"take",label:i("take")}]:[{value:"start",label:i("start")},{value:"end",label:i("end")}]}})}function O1({id:e,element:t,listener:n}){const i=dV("translate"),r=dV("debounceInput"),o=dV("commandStack");return vF({element:t,id:e,label:i("Listener ID"),debounce:r,isEdited:bF,setValue:e=>{o.execute("element.updateModdleProperties",{element:t,moddleElement:n,properties:{"camunda:id":e}})},getValue:()=>n.get("camunda:id")})}function P1({id:e,element:t,listener:n}){const i=dV("modeling"),r=dV("translate"),o=dV("bpmnFactory");return q_(aF,{id:e,label:r("Listener type"),getValue:function(){return D1(n)},setValue:function(e){const r=function(e,t){switch(e){case"class":return{...f1,class:""};case"expression":return{...f1,expression:""};case"delegateExpression":return{...f1,delegateExpression:""};case"script":return{...f1,script:t.create("camunda:Script")}}}(e,o);i.updateModdleProperties(t,n,r)},getOptions:function(){return function(e){return Object.entries(g1).map((([t,n])=>({value:t,label:e(n)})))}(r)}})}function k1(e){const{idPrefix:t,element:n,listener:i}=e,r=D1(i);return"class"===r?[{id:N1(t,"javaClass"),component:l0,businessObject:i}]:"expression"===r?[{id:N1(t,"expression"),component:c0,businessObject:i}]:"delegateExpression"===r?[{id:N1(t,"delegateExpression"),component:u0,businessObject:i}]:"script"===r?$Y({element:n,script:i.get("script"),prefix:t}):[]}function S1(e){const{idPrefix:t,element:n,listener:i}=e;return"timeout"===i.get("event")?l1({element:n,listener:i,timerEventDefinition:NU(i),idPrefix:t}):[]}function C1(e){const{element:t,id:n,index:i,item:r,open:o}=e,s=`${n}-field-${i}`;return q_(Kz,{id:s,element:t,entries:UZ({element:t,field:r,idPrefix:s}),label:r.get("name")||"",open:o})}function T1(e){const{id:t,element:n,listener:i}=e,r=dV("bpmnFactory"),o=dV("commandStack"),s=dV("translate"),a=i.get("fields");return q_(rF,{id:t,element:n,label:s("Field injection"),items:a,component:C1,onAdd:function(){const e=sW("camunda:Field",{},i,r);o.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{fields:[...i.get("fields"),e]}})},onRemove:function(e){o.execute("element.updateModdleProperties",{element:n,moddleElement:i,properties:{fields:E(i.get("fields"),e)}})},autoFocusEntry:`[data-entry-id="${t}-field-${a.length-1}"] input`})}function A1({bpmnFactory:e,commandStack:t,element:n,listenerGroup:i}){return function(r){r.stopPropagation();const o=e.create(i,{event:R1(n,i),class:""}),s=$1(n);xG(n,s,o,e,t)}}function M1(e,t=e=>e){const n=e.get("event"),i=D1(e);return`${t(y1[n])}: ${t(g1[i])}`}function D1(e){return yZ(e)}function R1(e,t){return"camunda:TaskListener"===t?"create":Hx(e,"bpmn:SequenceFlow")?"take":"start"}function N1(e,t){return`${e}-${t}`}function $1(e){const t=Wx(e);return t.get("processRef")||t}function j1(e){const{element:t}=e,[n,i]=Ww([]);if(Qw((async()=>{const e=function(e){const t=Wx(e);if(Hx(t,"bpmn:Participant"))return t.processRef;if(Hx(t,"bpmn:Process"))return t;let n=t;for(;n.$parent&&!Hx(n,"bpmn:Process");)n=n.$parent;return n}(Wx(t)),n=function(e){const t=Wx(e);if(Hx(e,"bpmn:Participant"))return t.processRef.id;return t.id}(t),r=function(e){return _(e,(function(e){const t=S(e.origin,(function(e){return e.name||e.id}));e.origin=t,e.scope=e.scope.name||e.scope.id})),e}(function(e){return R(e,(function(e){return e.name}))}(await pV(n,e)));i(r)}),[t]),!n.length)return null;const r=function(e){return A(e,"scope")}(n),o=C(r).length>1;let s=[];if(o){const e=S(S(l=C(r),(function(e,t){return l[l.length-1-t]})),(e=>r[e]));s=a(e)}else s=n;var l;const c=s.map(((e,n)=>{const i=t.id+"-variable-"+n;return{id:i,label:e.name,entries:[...L1({idPrefix:i,multiScope:o,variable:e})]}}));return q_(Jz,{...e,items:c})}function I1(e){const{element:t}=e;return function(e){const t=Wx(e);return Ux(e,["bpmn:Process","bpmn:SubProcess"])||Hx(e,"bpmn:Participant")&&t.get("processRef")}(t)?{component:j1}:null}function L1(e){const{idPrefix:t,multiScope:n,variable:i}=e;let r=[];return n&&r.push({id:t+"-scope",component:B1,idPrefix:t,variable:i}),r.push({id:t+"-createdIn",component:q1,idPrefix:t,variable:i}),r}function B1(e){const{idPrefix:t,variable:n}=e,i=t+"-scope";return q_("div",{"data-entry-id":i,class:"bio-properties-panel-entry",children:[q_("b",{style:"font-weight: bold",class:"bio-properties-panel-label",children:dV("translate")("Scope")}),q_("label",{id:z1(i),class:"bio-properties-panel-label",children:n.scope})]})}function q1(e){const{idPrefix:t,variable:n}=e,i=dV("translate"),r=t+"-createdIn",o=n.origin.join(", ");return q_("div",{"data-entry-id":r,class:"bio-properties-panel-entry",children:[q_("b",{style:"font-weight: bold",class:"bio-properties-panel-label",children:i("Created in")}),q_("label",{id:z1(r),class:"bio-properties-panel-label",children:o})]})}function z1(e){return`bio-properties-panel-${e}`}function F1(e){const{element:t}=e;if(!Hx(t,"bpmn:ScriptTask"))return[];const n=[...$Y({element:t})];return n.push({id:"scriptResultVariable",component:V1,isEdited:bF}),n}function V1(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=Wx(t);return vF({element:t,id:"scriptResultVariable",label:i("Result variable"),getValue:()=>o.get("camunda:resultVariable"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:resultVariable":e}})},debounce:r})}function H1(e){const{element:t}=e,n=Wx(t);return Hx(t,"bpmn:Process")||Hx(t,"bpmn:Participant")&&n.get("processRef")?[{id:"isStartableInTasklist",component:U1,isEdited:e=>e&&!e.checked}]:[]}function U1(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=function(e){return Hx(e,"bpmn:Process")?Wx(e):Wx(e).get("processRef")}(t);return tF({element:t,id:"isStartableInTasklist",label:i("Startable"),getValue:()=>r.get("camunda:isStartableInTasklist"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:r,properties:{"camunda:isStartableInTasklist":e}})}})}function W1(e){const{element:t}=e;return Hx(t,"camunda:Assignable")?[{id:"assignee",component:G1,isEdited:bF},{id:"candidateGroups",component:X1,isEdited:bF},{id:"candidateUsers",component:Q1,isEdited:bF},{id:"dueDate",component:K1,isEdited:bF},{id:"followUpDate",component:Y1,isEdited:bF},{id:"priority",component:Z1,isEdited:bF}]:[]}function G1(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=Wx(t);return vF({element:t,id:"assignee",label:i("Assignee"),getValue:()=>o.get("camunda:assignee"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:assignee":e}})},debounce:r})}function Q1(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=Wx(t);return vF({element:t,id:"candidateUsers",label:i("Candidate users"),getValue:()=>o.get("camunda:candidateUsers"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:candidateUsers":e}})},debounce:r})}function X1(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=Wx(t);return vF({element:t,id:"candidateGroups",label:i("Candidate groups"),getValue:()=>o.get("camunda:candidateGroups"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:candidateGroups":e}})},debounce:r})}function K1(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=Wx(t);return vF({element:t,id:"dueDate",label:i("Due date"),description:i("The due date as an EL expression (e.g. ${someDate}) or an ISO date (e.g. 2015-06-26T09:54:00)."),getValue:()=>o.get("camunda:dueDate"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:dueDate":e}})},debounce:r})}function Y1(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=Wx(t);return vF({element:t,id:"followUpDate",label:i("Follow up date"),description:i("The follow up date as an EL expression (e.g. ${someDate}) or an ISO date (e.g. 2015-06-26T09:54:00)."),getValue:()=>o.get("camunda:followUpDate"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:followUpDate":e}})},debounce:r})}function Z1(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=Wx(t);return vF({element:t,id:"priority",label:i("Priority"),getValue:()=>o.get("camunda:priority"),setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:priority":e}})},debounce:r})}function J1(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=function(e){return Hx(e,"bpmn:Process")?Wx(e):Wx(e).get("processRef")}(t);return vF({element:t,id:"versionTag",label:i("Version tag"),getValue:()=>o.get("camunda:versionTag")||"",setValue:e=>{n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{"camunda:versionTag":e}})},debounce:r})}function e2(e){const{element:t}=e,n=dV("modeling"),i=dV("debounceInput"),r=dV("translate"),o=Zw((e=>Wx(e).id),[t]),s=Zw((e=>kW(Wx(t),e,r)),[t,r]),a=Hx(t,"bpmn:Process")?r("This maps to the process definition key."):null;return vF({element:t,id:"id",label:r(Hx(t,"bpmn:Participant")?"Participant ID":"ID"),getValue:o,setValue:(e,i)=>{i||n.updateProperties(t,{id:e})},debounce:i,validate:s,description:a})}function t2(e){const{element:t}=e;return function(e){return Hx(e,"bpmn:Participant")&&e.businessObject.get("processRef")}(t)?[{id:"processId",component:n2,isEdited:bF}]:[]}function n2(e){const{element:t}=e,n=dV("commandStack"),i=dV("translate"),r=dV("debounceInput"),o=t.businessObject.get("processRef"),s=Zw((e=>kW(o,e,i)),[o,i]),a=Hx(t,"bpmn:Participant")?i("This maps to the process definition key."):null;return vF({element:t,id:"processId",label:i("Process ID"),getValue:()=>o.get("id"),setValue:(e,i)=>{i||n.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{id:e}})},debounce:r,validate:s,description:a})}const i2=[function(e,t){const n=t.get("translate"),i={label:n("History cleanup"),id:"CamundaPlatform__HistoryCleanup",component:Jq,entries:[...IJ({element:e})]};if(i.entries.length)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Tasklist"),id:"CamundaPlatform__Tasklist",component:Jq,entries:[...H1({element:e})]};if(i.entries.length)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Candidate starter"),id:"CamundaPlatform__CandidateStarter",component:Jq,entries:[...mY({element:e})]};if(i.entries.length)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Implementation"),id:"CamundaPlatform__Implementation",component:Jq,entries:[...a0({element:e})]};if(i.entries.length)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("External task"),id:"CamundaPlatform__ExternalTask",component:Jq,entries:[...zZ({element:e})]};if(i.entries.length)return i;return null},function(e,t){const n=t.get("translate"),i=I1({element:e,injector:t});if(!i)return null;const r={label:n("Process variables"),id:"CamundaPlatform__ProcessVariables",...i};return r},function(e,t){const n=t.get("translate"),i={label:n("Errors"),id:"CamundaPlatform__Errors",component:Jz,...$Z({element:e,injector:t})};if(i.items)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("User assignment"),id:"CamundaPlatform__UserAssignment",component:Jq,entries:[...W1({element:e})]};if(i.entries.length)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Forms"),id:"CamundaPlatform__Form",component:Jq,entries:[...DJ({element:e})]};if(i.entries.length)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Form fields"),id:"CamundaPlatform__FormData",component:Jz,..._J({element:e,injector:t})};if(i.items)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Task listeners"),id:"CamundaPlatform__TaskListener",component:Jz,...x1({element:e,injector:t})};if(i.items)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Start initiator"),id:"CamundaPlatform__StartInitiator",component:Jq,entries:[...f0({element:e})]};if(i.entries.length)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Script"),id:"CamundaPlatform__Script",component:Jq,entries:[...F1({element:e})]};if(i.entries.length)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Condition"),id:"CamundaPlatform__Condition",component:Jq,entries:[...bY({element:e})]};if(i.entries.length)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Called element"),id:"CamundaPlatform__CallActivity",component:Jq,entries:[...rY({element:e})]};if(i.entries.length)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Asynchronous continuations"),id:"CamundaPlatform__AsynchronousContinuations",component:Jq,entries:[...$K({element:e})]};if(i.entries.length)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Job execution"),id:"CamundaPlatform__JobExecution",component:Jq,entries:[...N0({element:e})]};if(i.entries.length)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("In mapping propagation"),id:"CamundaPlatform__InMappingPropagation",component:Jq,entries:[...g0({element:e})]};if(i.entries.length)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("In mappings"),id:"CamundaPlatform__InMapping",component:Jz,...T0({element:e,injector:t})};if(i.items)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Inputs"),id:"CamundaPlatform__Input",component:Jz,...D0({element:e,injector:t})};if(i.items)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Connector inputs"),id:"CamundaPlatform__ConnectorInput",component:Jz,...xZ({element:e,injector:t})};if(i.items)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Out mapping propagation"),id:"CamundaPlatform__OutMappingPropagation",component:Jq,entries:[...Y0({element:e})]};if(i.entries.length)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Out mappings"),id:"CamundaPlatform__OutMapping",component:Jz,...n1({element:e,injector:t})};if(i.items)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Outputs"),id:"CamundaPlatform__Output",component:Jz,...o1({element:e,injector:t})};if(i.items)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Connector outputs"),id:"CamundaPlatform__ConnectorOutput",component:Jz,..._Z({element:e,injector:t})};if(i.items)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Execution listeners"),id:"CamundaPlatform__ExecutionListener",component:Jz,...v1({element:e,injector:t})};if(i.items)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Extension properties"),id:"CamundaPlatform__ExtensionProperties",component:Jz,...PK({element:e,injector:t})};if(i.items)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Field injections"),id:"CamundaPlatform__FieldInjection",component:Jz,...KZ({element:e,injector:t})};if(i.items)return i;return null},function(e,t){const n=t.get("translate"),i={label:n("Business key"),id:"CamundaPlatform__BusinessKey",component:Jq,entries:[...zK({element:e})]};if(i.entries.length)return i;return null}];class r2{constructor(e,t){e.registerProvider(500,this),this._injector=t}getGroups(e){return t=>(function(e,t){const n=o2(e,"general");if(!n)return;const{entries:i}=n,r=x(i,(e=>"id"===e.id));i.splice(r,1,{id:"id",component:e2,isEdited:bF});const o=x(i,(e=>"processId"===e.id));o&&o>=0&&i.splice(o,1,...t2({element:t}));const s=x(i,(e=>"isExecutable"===e.id)),a=s>=0?s:i.length;i.splice(a,0,...function(e){const{element:t}=e,n=Wx(t);return Hx(t,"bpmn:Process")||Hx(t,"bpmn:Participant")&&n.get("processRef")?[{id:"versionTag",component:J1,isEdited:bF}]:[]}({element:t}))}(t=t.concat(this._getGroups(e)),e),function(e,t){const n=o2(e,"error");if(!n)return;const{entries:i}=n;OZ({element:t,entries:i})}(t,e),function(e,t){const n=o2(e,"escalation");if(!n)return;const{entries:i}=n;BZ({element:t,entries:i})}(t,e),function(e,t){const n=o2(e,"multiInstance");if(!n)return;const{entries:i}=n;B0({element:t,entries:i})}(t,e),function(e,t){const n=o2(e,"timer");if(!n)return;n.entries=[...l1({element:t})]}(t,e),function(e){const t=s2(e,"documentation");if(t<0)return;(function(e,t,n){const i=s2(e,t);if(n<0||i<0)return;KF(e,i,n)})(e,"CamundaPlatform__Implementation",t+1)}(t),t)}_getGroups(e){const t=i2.map((t=>t(e,this._injector)));return t.filter((e=>null!==e))}}function o2(e,t){return e.find((e=>e.id===t))}function s2(e,t){return x(e,(e=>e.id===t))}r2.$inject=["propertiesPanel","injector"];var a2={__init__:["camundaPlatformPropertiesProvider"],camundaPlatformPropertiesProvider:["type",r2]};function l2(e={}){hx.call(this,e)}i(l2,hx),l2.prototype.getModules=function(e={}){return[...hx.prototype.getModules.call(this,e),e.disableAdjustOrigin?qx:Vx,e.disableGrid?{}:$x]},l2.prototype._extensionModules=[Sx,Xx,AU,vG],l2.prototype._modules=[].concat(hx.prototype._modules,l2.prototype._extensionModules);class c2{constructor(e){e.on("moddleCopy.canCopyProperty",(e=>{const{parent:t,property:n}=e;return this.canCopyProperty(n,t)}))}canCopyProperty(e,t){return!(f(e)&&!function(e,t){var n=e.$type&&e.$model.getTypeDescriptor(e.$type),i=n&&n.meta&&n.meta.allowedIn;if(!i||function(e){return e.includes("*")}(i))return!0;return k(i,(function(e){return p2(t,e)}))}(e,t))&&(!(Hx(e,"camunda:InputOutput")&&!this.canHostInputOutput(t))&&(!(Ux(e,["camunda:Connector","camunda:Field"])&&!this.canHostConnector(t))&&(!(Hx(e,"camunda:In")&&!this.canHostIn(t))&&void 0)))}canHostInputOutput(e){if(p2(e,"camunda:Connector"))return!0;const t=p2(e,"bpmn:FlowNode");return!!t&&(!Ux(t,["bpmn:StartEvent","bpmn:Gateway","bpmn:BoundaryEvent"])&&(!Hx(t,"bpmn:SubProcess")||!t.get("triggeredByEvent")))}canHostConnector(e){return!Hx(p2(e,"camunda:ServiceTaskLike"),"bpmn:MessageEventDefinition")||(p2(e,"bpmn:IntermediateThrowEvent")||p2(e,"bpmn:EndEvent"))}canHostIn(e){if(p2(e,"bpmn:CallActivity"))return!0;return!p2(e,"bpmn:SignalEventDefinition")||(p2(e,"bpmn:IntermediateThrowEvent")||p2(e,"bpmn:EndEvent"))}}function p2(e,t){return t?Hx(e,t)?e:e.$parent?p2(e.$parent,t):void 0:e.$parent}c2.$inject=["eventBus"];function u2(e){this._eventBus=e}function d2(e){return function(t,n,i,r,o){(g(t)||m(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}}u2.$inject=["eventBus"],u2.prototype.on=function(e,t,n,i,r,o){if((g(t)||m(t))&&(o=r,r=i,i=n,n=t,t=null),g(n)&&(o=r,r=i,i=n,n=1e3),f(r)&&(o=r,r=!1),!g(i))throw new Error("handlerFn must be a function");h(e)||(e=[e]);var s=this._eventBus;_(e,(function(e){var a=["commandStack",e,t].filter((function(e){return e})).join(".");s.on(a,n,r?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(i,o):i,o)}))},u2.prototype.canExecute=d2("canExecute"),u2.prototype.preExecute=d2("preExecute"),u2.prototype.preExecuted=d2("preExecuted"),u2.prototype.execute=d2("execute"),u2.prototype.executed=d2("executed"),u2.prototype.postExecute=d2("postExecute"),u2.prototype.postExecuted=d2("postExecuted"),u2.prototype.revert=d2("revert"),u2.prototype.reverted=d2("reverted");class h2 extends u2{constructor(e,t,n,i){function r(e){return!!b(t.getDefinitions().get("rootElements"),N({id:e.get("id")}))}super(n),this.executed("shape.create",(e=>{const{shape:n}=e,i=Wx(n);if(!g2(i))return;const o=y2(i,f2(n)),s=t.getDefinitions().get("rootElements");e.addedRootElements=[],o.forEach((t=>{const{referencedElement:n}=t;n&&!r(n)&&(RF(s,n),e.addedRootElements.push(n))}))}),!0),this.reverted("shape.create",(e=>{const{addedRootElements:n}=e;if(!n)return;const i=t.getDefinitions().get("rootElements");n.forEach((e=>{!function(e,t){if(!e||!t)return-1;var n=e.indexOf(t);-1!==n&&e.splice(n,1)}(i,e)}))}),!0),n.on("copyPaste.copyElement",(function(e){const{descriptor:t,element:n}=e,i=Wx(n);if(n.labelTarget||!g2(i))return;const r=y2(i,f2(n));r&&(t.referencedRootElements=r)})),n.on("copyPaste.pasteElement",500,(t=>{const{descriptor:n}=t,{businessObject:o,referencedRootElements:s}=n;s&&(s.forEach((t=>{let{idx:n,referencedElement:s}=t;s&&(r(s)||(s=i.copyElement(s,e.create(s.$type))),function(e,t,n){const i=e.get("extensionElements").get("values")[n];i.set(m2(i),t)}(o,s,n))})),delete n.referencedRootElements)}))}}function f2(e){if(Hx(e,"bpmn:ServiceTask"))return"camunda:ErrorEventDefinition"}function m2(e){if(Hx(e,"camunda:ErrorEventDefinition"))return"errorRef"}function g2(e){return Hx(e,"bpmn:ServiceTask")&&"external"===e.get("type")}function y2(e,t){const n=e.get("extensionElements");return n?n.get("values").filter((e=>Hx(e,t))).reduce(((t,n)=>{const i=n.get(m2(n));return i&&t.push({idx:v2(e,n),referencedElement:i}),t}),[]):[]}function v2(e,t){const n=e.get("extensionElements");return n?n.get("values").indexOf(t):-1}function b2(e,t=void 0){const n=Wx(e).get("extensionElements");if(!n)return[];const i=n.get("values");return i&&i.length?t?i.filter((e=>Hx(e,t))):i:[]}function x2(e,t,n,i){h(n)||(n=[n]);const r=t.get("extensionElements"),o=r.get("values").filter((e=>!n.includes(e)));i.execute("element.updateModdleProperties",{element:e,moddleElement:r,properties:{values:o}})}h2.$inject=["bpmnFactory","bpmnjs","eventBus","moddleCopy"];class w2 extends u2{constructor(e,t){super(t),this.postExecute(["element.updateProperties","element.updateModdleProperties"],5e3,(function(t){const{element:n,moddleElement:i,properties:r}=t,o=i||Wx(n);if(Hx(n,"camunda:ExternalCapable")&&Hx(o,"camunda:ExternalCapable")&&"external"!==r["camunda:type"]){const t=b2(o,"camunda:ErrorEventDefinition");t.length&&x2(n,o,t,e)}}),!0)}}w2.$inject=["commandStack","eventBus"];class _2 extends u2{constructor(e,t,n){super(e),this.postExecuted("shape.delete",250,(function(e){const{collaborationRoot:i,shape:r}=e,o=t.getRootElement();if(Hx(r,"bpmn:Participant")&&i&&!i.businessObject.get("participants").length&&Hx(o,"bpmn:Process")){const e=r.businessObject.get("processRef");if(!e)return;n.updateProperties(o,{isExecutable:e.get("isExecutable")})}}),!0)}}_2.$inject=["eventBus","canvas","modeling"];class E2 extends u2{constructor(e,t){super(t),this.postExecute(["element.updateProperties","element.updateModdleProperties"],5e3,(function(t){const{element:n,moddleElement:i,properties:r={}}=t,o=r["camunda:asyncAfter"],s=r["camunda:asyncBefore"],a=i||Wx(n),l=function(e){return b2(e,"camunda:FailedJobRetryTimeCycle")[0]}(n);!Hx(n,"camunda:AsyncCapable")||!Hx(a,"camunda:AsyncCapable")||!1!==o&&!1!==s||!l||function(e){return function(e,t){const n=Wx(e),i=n.get("eventDefinitions");if(!i||!i.length)return;return i.find((e=>Hx(e,t)))}(e,"bpmn:TimerEventDefinition")}(n)||function(e){return!(!e.get("camunda:asyncBefore")&&!e.get("camunda:async"))}(a)||function(e){return!!e.get("camunda:asyncAfter")}(a)||x2(n,a,l,e)}),!0)}}E2.$inject=["commandStack","eventBus"];class O2 extends u2{constructor(e,t){super(e),this.postExecuted(["shape.create","shape.move"],(e=>{const{shape:n,parent:i,newParent:r=i}=e,o=Wx(n);Hx(n,"bpmn:StartEvent")&&u(o.get("camunda:initiator"))&&Hx(r||i,"bpmn:SubProcess")&&t.updateProperties(n,{"camunda:initiator":void 0})}),!0)}}O2.$inject=["eventBus","modeling"];class P2 extends u2{constructor(e,t,n,i){super(t),this.postExecuted(["shape.create","shape.move"],(t=>{const{parent:r,newParent:o=r,shape:s}=t,a=Wx(o),l=Wx(s);if(Hx(s,"bpmn:StartEvent")&&(!Hx(o,"bpmn:SubProcess")||!a.get("triggeredByEvent"))){const t=l.get("eventDefinitions").slice(),r=t.reduce(((i,r,o)=>{if(Hx(r,"bpmn:ConditionalEventDefinition")){if(r.get("camunda:variableEvents")){const i=e.create("bpmn:ConditionalEventDefinition");return n.copyElement(r,i),i.$parent=r.$parent,i.variableEvents=void 0,t[o]=i,!0}return i}}),!1);r&&i.updateProperties(s,{eventDefinitions:t})}}),!0)}}P2.$inject=["bpmnFactory","eventBus","moddleCopy","modeling"];class k2 extends u2{constructor(e){super(e),this.preExecute(["element.updateProperties","element.updateModdleProperties"],5e3,(function(e){const{element:t,moddleElement:n,properties:i={}}=e,r=n||Wx(t),o=i["camunda:asyncAfter"],s=i["camunda:asyncBefore"];!Hx(t,"camunda:AsyncCapable")||!Hx(r,"camunda:AsyncCapable")||!1!==o&&!1!==s||function(e){return!!e.get("camunda:exclusive")}(r)||function(e){return!!e.get("camunda:asyncAfter")}(r)&&!1!==o||function(e){return!(!e.get("camunda:asyncBefore")&&!e.get("camunda:async"))}(r)&&!1!==s||!0===o||!0===s||(i["camunda:exclusive"]=!0)}),!0)}}k2.$inject=["eventBus"];class S2 extends u2{constructor(e,t){super(t),this.postExecuted("element.updateModdleProperties",250,(function(t){const{element:n,moddleElement:i}=t;Hx(i,"camunda:InputOutput")&&function(e){const t=function(e){return e.get("inputParameters")}(e),n=function(e){return e.get("outputParameters")}(e);return!t.length&&!n.length}(i)&&x2(n,Wx(n),i,e)}),!0)}}S2.$inject=["commandStack","eventBus"];class C2 extends u2{constructor(e){super(e),this.preExecute(["element.updateProperties","element.updateModdleProperties"],5e3,(function(e){const{element:t,moddleElement:n,properties:i}=e,r=n||Wx(t);var o;Hx(t,"camunda:DmnCapable")&&Hx(r,"camunda:DmnCapable")&&v(i,"camunda:resultVariable")&&(null==(o=i["camunda:resultVariable"])||""===o)&&(i["camunda:mapDecisionResult"]=void 0)}),!0)}}C2.$inject=["eventBus"];class T2 extends u2{constructor(e){super(e),this.preExecute(["element.updateProperties","element.updateModdleProperties"],(function(e){const{element:t,moddleElement:n,properties:i}=e,r=n||Wx(t);v(i,"camunda:formKey")?Object.assign(i,{"camunda:formRef":void 0,"camunda:formRefBinding":void 0,"camunda:formRefVersion":void 0}):v(i,"camunda:formRef")&&(Object.assign(i,{"camunda:formKey":void 0}),p(i["camunda:formRef"])&&Object.assign(i,{"camunda:formRefBinding":void 0,"camunda:formRefVersion":void 0}),!v(i,"camunda:formRefBinding")&&p(r.get("camunda:formRefBinding"))&&Object.assign(i,{"camunda:formRefBinding":"latest"})),v(i,"camunda:formRefBinding")&&"version"!==i["camunda:formRefBinding"]&&Object.assign(i,{"camunda:formRefVersion":void 0})}),!0)}}T2.$inject=["eventBus"];class A2 extends u2{constructor(e,t){super(e),this.preExecute("element.updateModdleProperties",(function(e){const{moddleElement:t,properties:n}=e;Hx(t,"camunda:FormField")&&("type"in n&&"enum"!==n.type||"camunda:type"in n&&"enum"!==n["camunda:type"])&&(n["camunda:values"]=void 0)}),!0),this.preExecute("element.updateModdleProperties",(function(e){const{element:n,moddleElement:i,properties:r}=e;if(!Hx(i,"camunda:FormField")||!v(r,"id")&&!v(r,"camunda:id"))return;const o=function(e){const t=Wx(e),n=t.get("extensionElements");if(!n)return;const i=n.get("values");return i.find((e=>Hx(e,"camunda:FormData")))}(n);o.get("camunda:businessKey")&&function(e,t){return e.get("camunda:id")===t.get("camunda:businessKey")}(i,o)&&t.updateModdleProperties(n,o,{"camunda:businessKey":v(r,"id")?r.id:r["camunda:id"]})}),!0),this.postExecute("element.updateModdleProperties",(function(e){const{element:n,moddleElement:i,properties:r}=e;if(!Hx(i,"camunda:FormData")||!v(r,"fields"))return;const o=i.get("camunda:businessKey");if(!o)return;i.get("fields").find((e=>e.get("camunda:id")===o))||t.updateModdleProperties(n,i,{"camunda:businessKey":void 0})}),!0)}}A2.$inject=["eventBus","modeling"];const M2={__init__:["copyPasteBehavior","copyPasteRootElementBehavior","deleteErrorEventDefinitionBehavior","deleteParticipantBehaviour","deleteRetryTimeCycleBehavior","removeInitiatorBehaviour","removeVariableEventBehaviour","updateCamundaExclusiveBehavior","updateResultVariableBehavior","updateInputOutputBehavior","userTaskFormsBehavior","userTaskGeneratedFormsBehavior"],copyPasteBehavior:["type",c2],copyPasteRootElementBehavior:["type",h2],deleteErrorEventDefinitionBehavior:["type",w2],deleteParticipantBehaviour:["type",_2],deleteRetryTimeCycleBehavior:["type",E2],removeInitiatorBehaviour:["type",O2],removeVariableEventBehaviour:["type",P2],updateCamundaExclusiveBehavior:["type",k2],updateResultVariableBehavior:["type",C2],updateInputOutputBehavior:["type",S2],userTaskFormsBehavior:["type",T2],userTaskGeneratedFormsBehavior:["type",A2]},D2={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let R2;const N2=new Uint8Array(16);function $2(){if(!R2&&(R2="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!R2))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return R2(N2)}const j2=[];for(let e=0;e<256;++e)j2.push((e+256).toString(16).slice(1));function I2(e,t=0){return j2[e[t+0]]+j2[e[t+1]]+j2[e[t+2]]+j2[e[t+3]]+"-"+j2[e[t+4]]+j2[e[t+5]]+"-"+j2[e[t+6]]+j2[e[t+7]]+"-"+j2[e[t+8]]+j2[e[t+9]]+"-"+j2[e[t+10]]+j2[e[t+11]]+j2[e[t+12]]+j2[e[t+13]]+j2[e[t+14]]+j2[e[t+15]]}const L2=function(e,t,n){if(D2.randomUUID&&!t&&!e)return D2.randomUUID();const i=(e=e||{}).random||(e.rng||$2)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=i[e];return t}return I2(i)};var B2=n(651),q2=n.n(B2);function z2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var F2={exports:{}},V2={};Object.defineProperty(V2,"__esModule",{value:!0});const H2=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var i,r,o;if(Array.isArray(t)){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((i=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,o[r]))return!1;for(r=i;0!=r--;){var s=o[r];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n};H2.code='require("ajv/dist/runtime/equal").default',V2.default=H2,F2.exports=o3,F2.exports.default=o3;const U2={type:"object",allOf:[{required:["name","id","appliesTo","properties"],properties:{name:{$id:"#/name",type:"string",description:"The name of the element template."},id:{$id:"#/id",type:"string",description:"The identifier of the element template."},description:{$id:"#/description",type:"string",description:"The description of the element template."},version:{$id:"#/version",type:"integer",description:"Optional version of the template. If you add a version to a template it will be considered unique based on its ID and version. Two templates can have the same ID if their version is different."},isDefault:{$id:"#/isDefault",type:"boolean",description:"Indicates whether the element template is a default template."},deprecated:{$id:"#/deprecated",type:["boolean","object"],description:"Indicates whether the element template is deprecated.",properties:{message:{$id:"#/deprecated/message",type:"string",description:"Optional message to describe migration path."},documentationRef:{$id:"#/deprecated/documentationRef",type:"string",pattern:"^(https|http)://.*",description:"Optional link to migration documentation."}}},appliesTo:{$id:"#/appliesTo",type:"array",description:"List of BPMN types the template can be applied to.",default:[],items:{$id:"#/appliesTo/items",type:"string",pattern:"^[\\w\\d]+:[\\w\\d]+$",allOf:[{examples:["bpmn:Task","bpmn:ServiceTask","bpmn:SequenceFlow","bpmn:Process","bpmn:StartEvent","bpmn:Gateway"]}],errorMessage:{pattern:'invalid item for "appliesTo", should contain namespaced property, example: "bpmn:Task"'}}},elementType:{$id:"#/elementType",type:"object",description:"The BPMN type the element will be transformed into.",default:{},required:["value"],properties:{value:{$id:"#/elementType/value",type:"string",pattern:"^[\\w\\d]+:[\\w\\d]+$",allOf:[{examples:["bpmn:ServiceTask","bpmn:UserTask","bpmn:StartEvent","bpmn:ExclusiveGateway","bpmn:ParallelGateway"]}],errorMessage:{pattern:'invalid item for "elementType", should contain namespaced property, example: "bpmn:Task"'}}},errorMessage:{required:{value:"missing elementType value"}}},metadata:{$id:"#/metadata",type:"object",description:"Some custom properties for further configuration.",default:{}},entriesVisible:{$id:"#/entriesVisible",type:"boolean",description:"Select whether non-template entries are visible in the properties panel."},groups:{$id:"#/groups",type:"array",description:"Custom fields can be ordered together via groups.",allOf:[{examples:[[{id:"group-1",label:"My Group"}]]}],items:{$id:"#/groups/group",type:"object",default:{},required:["id","label"],properties:{id:{$id:"#/groups/group/id",type:"string",description:"The id of the custom group"},label:{$id:"#/groups/group/label",type:"string",description:"The label of the custom group"}},errorMessage:{required:{id:'missing id for group "${0#}"',label:'missing label for group "${0#}"'}}}},documentationRef:{$id:"#/documentationRef",type:"string",pattern:"^(https|http)://.*",errorMessage:{pattern:'Malformed documentation URL, must match "^(https|http)://.*"'}}},errorMessage:{required:{name:"missing template name",id:"missing template id",appliesTo:"missing appliesTo=[]",properties:"missing properties=[]"}}}],properties:{properties:{$ref:"#/definitions/properties",$id:"#/properties"},scopes:{$id:"#/scopes",type:"array",description:"Special scoped bindings that allow you to configure nested elements.",allOf:[{examples:[[{type:"bpmn:Error",id:"Error_1",properties:[{value:"error-code",binding:{type:"property",name:"errorCode"}},{value:"error-message",binding:{type:"property",name:"camunda:errorMessage"}},{value:"error-name",binding:{type:"property",name:"name"}}]}]]}],items:{$id:"#/scopes/item",type:"object",default:{},properties:{type:{$id:"#scopes/item/type",type:"string",description:"The type of a scope.",enum:["camunda:Connector","bpmn:Error"],errorMessage:"invalid scope type ${0}; must be any of { camunda:Connector, bpmn:Error }"},properties:{$id:"#/scopes/properties",description:"List of properties of a scope.",default:[],allOf:[{$ref:"#/definitions/properties/allOf/0"},{$ref:"#/definitions/properties/allOf/1"}]}},required:["type","properties"],allOf:[{if:{properties:{type:{enum:["bpmn:Error"]}},required:["type"]},then:{required:["id"],errorMessage:"invalid scope ${0/type}, missing id"}}],errorMessage:{required:{type:"invalid scope, missing type",properties:"invalid scope ${0/type}, missing properties=[]"}}}}}},W2={$schema:"http://json-schema.org/draft-07/schema",type:"array",description:"List of properties of the element template.",items:{type:"object",default:{},required:["binding"],allOf:[{if:{properties:{binding:{properties:{type:{const:"property"}},required:["type"]}},required:["binding"]},then:{properties:{type:{enum:["String","Text","Hidden","Dropdown","Boolean"],errorMessage:'invalid property type ${0} for binding type "property"; must be any of { String, Text, Hidden, Dropdown, Boolean }'}}}},{if:{properties:{binding:{properties:{type:{const:"camunda:executionListener"}},required:["type"]}},required:["binding"]},then:{properties:{type:{enum:["Hidden"],errorMessage:'invalid property type ${1/type} for binding type "camunda:executionListener"; must be "Hidden"'},binding:{properties:{implementationType:{enum:["class","delegateExpression","expression","script"]}},oneOf:[{not:{properties:{implementationType:{const:"script"}}}},{required:["scriptFormat"]},{allOf:[{not:{required:["implementationType"]}},{not:{required:["scriptFormat"]}}]}]}}}},{if:{properties:{binding:{properties:{type:{enum:["camunda:property","camunda:outputParameter","camunda:in","camunda:in:businessKey","camunda:out","camunda:errorEventDefinition"]}},required:["type"]}},required:["binding"]},then:{properties:{type:{enum:["String","Hidden","Dropdown"],errorMessage:"invalid property type ${0} for binding type ${1/binding/type}; must be any of { String, Hidden, Dropdown }"}}}},{if:{properties:{binding:{properties:{type:{enum:["camunda:inputParameter","camunda:field"]}},required:["type"]}},required:["binding"]},then:{properties:{type:{enum:["String","Text","Hidden","Dropdown"],errorMessage:"invalid property type ${0} for binding type ${1/binding/type}; must be any of { String, Text, Hidden, Dropdown }"}}}}],properties:{binding:{$id:"#/properties/property/binding",type:"object",description:"Specifying how the property is mapped to BPMN or Camunda extension elements and attributes.",required:["type"],allOf:[{if:{properties:{type:{enum:["property","camunda:property","camunda:inputParameter","camunda:field"]}},required:["type"]},then:{required:["name"],errorMessage:"property.binding ${0/type} requires name"}},{if:{properties:{type:{const:"camunda:outputParameter"}},required:["type"]},then:{required:["source"],errorMessage:"property.binding ${0/type} requires source"}},{if:{properties:{type:{const:"camunda:in"}},required:["type"]},then:{anyOf:[{required:["variables"]},{required:["target"]}],errorMessage:"property.binding ${0/type} requires variables, target, or both"}},{if:{properties:{type:{const:"camunda:out"}},required:["type"]},then:{oneOf:[{required:["variables"],not:{anyOf:[{required:["source"]},{required:["sourceExpression"]}]}},{required:["source"],not:{anyOf:[{required:["variables"]},{required:["sourceExpression"]}]}},{required:["sourceExpression"],not:{anyOf:[{required:["variables"]},{required:["source"]}]}},{required:["variables","sourceExpression"],not:{required:["source"]}},{required:["variables","source"],not:{required:["sourceExpression"]}}],errorMessage:"property.binding ${0/type} requires one of the following: variables, sourceExpression, source, (sourceExpression and variables), or (source and variables)"}},{if:{properties:{type:{const:"camunda:errorEventDefinition"}},required:["type"]},then:{oneOf:[{required:["errorRef"]}],errorMessage:"property.binding ${0/type} requires errorRef"}},{examples:[{type:"property",name:"name"},{type:"camunda:property",name:"property"},{type:"camunda:inputParameter",name:"input"},{type:"camunda:outputParameter",source:"output"},{type:"camunda:in",target:"target"},{type:"camunda:in:businessKey"},{type:"camunda:out",source:"output"},{type:"camunda:executionListener",event:"start"},{type:"camunda:field",name:"field"},{type:"camunda:errorEventDefinition",errorRef:"error"},{type:"camunda:errorEventDefinition",errorRef:"error"}]}],properties:{type:{$id:"#/properties/property/binding/type",type:"string",enum:["property","camunda:property","camunda:inputParameter","camunda:outputParameter","camunda:in","camunda:out","camunda:in:businessKey","camunda:executionListener","camunda:field","camunda:errorEventDefinition"],description:"The type of a property binding.",errorMessage:"invalid property.binding type ${0}; must be any of { property, camunda:property, camunda:inputParameter, camunda:outputParameter, camunda:in, camunda:out, camunda:in:businessKey, camunda:executionListener, camunda:field, camunda:errorEventDefinition }"},name:{$id:"#/properties/property/binding/name",type:"string",description:"The name of a property binding."},event:{$id:"#/properties/property/binding/event",type:"string",description:"The event type of a property binding (camunda:executionListener)."},scriptFormat:{$id:"#/properties/property/binding/scriptFormat",type:"string",description:"The script format of a property binding (camunda:outputParameter, camunda:inputParameter)."},source:{$id:"#/properties/property/binding/source",type:"string",description:"The source value of a property binding (camunda:outputParameter, camunda:out)."},target:{$id:"#/properties/property/binding/target",type:"string",description:"The target value of a property binding (camunda:in)."},expression:{$id:"#/properties/property/binding/expression",type:"boolean",description:"Indicates whether the control field value is an expression (camunda:in, camunda:field)."},variables:{$id:"#/properties/property/binding/variables",type:"string",enum:["all","local"],description:"The variable mapping of a property binding (camunda:in)."},sourceExpression:{$id:"#/properties/property/binding/sourceExpression",type:"string",description:"The string containing the expression for the source attribute (camunda:out)."}}}},errorMessage:{required:'missing binding for property "${0#}"'}}},G2=new RegExp("^(https|http)://.*","u"),Q2=new RegExp("^[\\w\\d]+:[\\w\\d]+$","u"),X2={required:"missingProperty",dependencies:"property",dependentRequired:"property"},K2={allOf:[{type:"array",description:"List of properties of the element template.",allOf:[{examples:[[{label:"Name",type:"String",binding:{type:"property",name:"name"}}]]}],items:{type:"object",default:{},allOf:[{if:{properties:{type:{const:"Dropdown"}},required:["type"]},then:{required:["choices"],errorMessage:'must provide choices=[] with "Dropdown" type'}},{definitions:{condition:{type:"object",required:["property"],properties:{type:{$id:"#/condition/type",const:"simple",description:"The type of the condition.",default:"simple"},property:{$id:"#/condition/property",type:"string",description:"The id of the property to check."}},oneOf:[{properties:{equals:{type:["string","number","boolean"]}},required:["equals"]},{properties:{oneOf:{type:"array",items:{type:["string","number"]}}},required:["oneOf"]},{properties:{isActive:{type:"boolean",description:"For `true`, activates the property when given property is active"}},required:["isActive"]}],errorMessage:{required:{property:"missing property name for condition"}}},conditionDependingOnId:{required:["property"],properties:{property:{const:{$data:"2/id"}}}}},allOf:[{$comment:"property#condition should not depend on property#id",if:{required:["id","condition"],properties:{condition:{$ref:"#/definitions/properties/allOf/0/items/allOf/1/definitions/conditionDependingOnId"}}},then:{not:{required:["condition"]},errorMessage:"Invalid condition.property, must be different than property.id"}},{then:{errorMessage:"Invalid condition.property, must be different than property.id"}}],properties:{id:{type:"string",description:"Unique identifier of the property."},condition:{type:"object",description:"Condition(s) to activate the binding.",allOf:[{examples:[{type:"simple",property:"httpMethod",equals:"GET"},{type:"simple",property:"httpMethod",oneOf:["POST","PUT","DELETE"]},{allMatch:[{type:"simple",property:"authType",equals:"Basic"},{type:"simple",property:"httpMethod",oneOf:["POST","PUT","DELETE"]}]}]}],oneOf:[{$ref:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition"},{properties:{allMatch:{$id:"#/allMatch",type:"array",items:{$ref:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition"},minItems:1}},required:["allMatch"]}]}}},{if:{properties:{type:{not:{const:"Number"}}},required:["type"]},then:{properties:{value:{type:["string","boolean"]}}}},{if:{oneOf:[{properties:{type:{enum:["String","Text"]}},required:["type"]},{not:{required:["type"]}}]},then:{properties:{placeholder:{type:"string"}}},else:{not:{required:["placeholder"]}}}],properties:{value:{$id:"#/properties/property/value",type:["string","number","boolean"],description:"The value of a control field."},description:{$id:"#/properties/property/description",type:"string",description:"The description of a control field."},label:{$id:"#/properties/property/label",type:"string",description:"The label of a control field."},type:{$id:"#/properties/property/type",type:"string",description:"The type of a control field."},editable:{$id:"#/properties/property/editable",type:"boolean",description:"Indicates whether a control field is editable or not."},choices:{$id:"#/properties/property/choices",type:"array",description:"The choices for dropdown fields.",default:[],items:{$id:"#/properties/property/choices/item",type:"object",default:{},properties:{name:{$id:"#/properties/property/choices/item/name",type:"string",description:"The name of a choice."},value:{$id:"#/properties/property/choices/item/value",type:"string",description:"The value of a choice."},condition:{$ref:"#/definitions/properties/allOf/0/items/allOf/1/properties/condition"}},required:["value","name"],errorMessage:{required:'{ name, value } must be specified for "Dropdown" choices'}}},constraints:{$id:"#/properties/property/constraints",type:"object",description:"The validation constraints of a control field.",allOf:[{examples:[{notEmpty:!0}]}],properties:{notEmpty:{$id:"#/properties/property/constraints/notEmpty",type:"boolean",description:"The control field must not be empty."},minLength:{$id:"#/properties/property/constraints/minLength",type:"number",description:"The minimal length of a control field value."},maxLength:{$id:"#/properties/property/constraints/maxLength",type:"number",description:"The maximal length for a control field value."},pattern:{$id:"#/properties/property/constraints/pattern",description:"A regular expression pattern for a constraint.",oneOf:[{type:"object",default:{},properties:{value:{$id:"#/properties/property/constraints/pattern/value",type:"string",description:"The regular expression of a pattern."},message:{$id:"#/properties/property/constraints/pattern/message",type:"string",description:"The validation message of a pattern."}}},{type:"string"}]}}},group:{$id:"#/properties/property/group",type:"string",description:"The custom group of a control field."}}}},{$schema:"http://json-schema.org/draft-07/schema",type:"array",description:"List of properties of the element template.",items:{type:"object",default:{},required:["binding"],allOf:[{if:{properties:{binding:{properties:{type:{const:"property"}},required:["type"]}},required:["binding"]},then:{properties:{type:{enum:["String","Text","Hidden","Dropdown","Boolean"],errorMessage:'invalid property type ${0} for binding type "property"; must be any of { String, Text, Hidden, Dropdown, Boolean }'}}}},{if:{properties:{binding:{properties:{type:{const:"camunda:executionListener"}},required:["type"]}},required:["binding"]},then:{properties:{type:{enum:["Hidden"],errorMessage:'invalid property type ${1/type} for binding type "camunda:executionListener"; must be "Hidden"'},binding:{properties:{implementationType:{enum:["class","delegateExpression","expression","script"]}},oneOf:[{not:{properties:{implementationType:{const:"script"}}}},{required:["scriptFormat"]},{allOf:[{not:{required:["implementationType"]}},{not:{required:["scriptFormat"]}}]}]}}}},{if:{properties:{binding:{properties:{type:{enum:["camunda:property","camunda:outputParameter","camunda:in","camunda:in:businessKey","camunda:out","camunda:errorEventDefinition"]}},required:["type"]}},required:["binding"]},then:{properties:{type:{enum:["String","Hidden","Dropdown"],errorMessage:"invalid property type ${0} for binding type ${1/binding/type}; must be any of { String, Hidden, Dropdown }"}}}},{if:{properties:{binding:{properties:{type:{enum:["camunda:inputParameter","camunda:field"]}},required:["type"]}},required:["binding"]},then:{properties:{type:{enum:["String","Text","Hidden","Dropdown"],errorMessage:"invalid property type ${0} for binding type ${1/binding/type}; must be any of { String, Text, Hidden, Dropdown }"}}}}],properties:{binding:{$id:"#/properties/property/binding",type:"object",description:"Specifying how the property is mapped to BPMN or Camunda extension elements and attributes.",required:["type"],allOf:[{if:{properties:{type:{enum:["property","camunda:property","camunda:inputParameter","camunda:field"]}},required:["type"]},then:{required:["name"],errorMessage:"property.binding ${0/type} requires name"}},{if:{properties:{type:{const:"camunda:outputParameter"}},required:["type"]},then:{required:["source"],errorMessage:"property.binding ${0/type} requires source"}},{if:{properties:{type:{const:"camunda:in"}},required:["type"]},then:{anyOf:[{required:["variables"]},{required:["target"]}],errorMessage:"property.binding ${0/type} requires variables, target, or both"}},{if:{properties:{type:{const:"camunda:out"}},required:["type"]},then:{oneOf:[{required:["variables"],not:{anyOf:[{required:["source"]},{required:["sourceExpression"]}]}},{required:["source"],not:{anyOf:[{required:["variables"]},{required:["sourceExpression"]}]}},{required:["sourceExpression"],not:{anyOf:[{required:["variables"]},{required:["source"]}]}},{required:["variables","sourceExpression"],not:{required:["source"]}},{required:["variables","source"],not:{required:["sourceExpression"]}}],errorMessage:"property.binding ${0/type} requires one of the following: variables, sourceExpression, source, (sourceExpression and variables), or (source and variables)"}},{if:{properties:{type:{const:"camunda:errorEventDefinition"}},required:["type"]},then:{oneOf:[{required:["errorRef"]}],errorMessage:"property.binding ${0/type} requires errorRef"}},{examples:[{type:"property",name:"name"},{type:"camunda:property",name:"property"},{type:"camunda:inputParameter",name:"input"},{type:"camunda:outputParameter",source:"output"},{type:"camunda:in",target:"target"},{type:"camunda:in:businessKey"},{type:"camunda:out",source:"output"},{type:"camunda:executionListener",event:"start"},{type:"camunda:field",name:"field"},{type:"camunda:errorEventDefinition",errorRef:"error"},{type:"camunda:errorEventDefinition",errorRef:"error"}]}],properties:{type:{$id:"#/properties/property/binding/type",type:"string",enum:["property","camunda:property","camunda:inputParameter","camunda:outputParameter","camunda:in","camunda:out","camunda:in:businessKey","camunda:executionListener","camunda:field","camunda:errorEventDefinition"],description:"The type of a property binding.",errorMessage:"invalid property.binding type ${0}; must be any of { property, camunda:property, camunda:inputParameter, camunda:outputParameter, camunda:in, camunda:out, camunda:in:businessKey, camunda:executionListener, camunda:field, camunda:errorEventDefinition }"},name:{$id:"#/properties/property/binding/name",type:"string",description:"The name of a property binding."},event:{$id:"#/properties/property/binding/event",type:"string",description:"The event type of a property binding (camunda:executionListener)."},scriptFormat:{$id:"#/properties/property/binding/scriptFormat",type:"string",description:"The script format of a property binding (camunda:outputParameter, camunda:inputParameter)."},source:{$id:"#/properties/property/binding/source",type:"string",description:"The source value of a property binding (camunda:outputParameter, camunda:out)."},target:{$id:"#/properties/property/binding/target",type:"string",description:"The target value of a property binding (camunda:in)."},expression:{$id:"#/properties/property/binding/expression",type:"boolean",description:"Indicates whether the control field value is an expression (camunda:in, camunda:field)."},variables:{$id:"#/properties/property/binding/variables",type:"string",enum:["all","local"],description:"The variable mapping of a property binding (camunda:in)."},sourceExpression:{$id:"#/properties/property/binding/sourceExpression",type:"string",description:"The string containing the expression for the source attribute (camunda:out)."}}}},errorMessage:{required:'missing binding for property "${0#}"'}}}]},Y2={required:["property"],properties:{property:{const:{$data:"2/id"}}}},Z2={type:"object",required:["property"],properties:{type:{$id:"#/condition/type",const:"simple",description:"The type of the condition.",default:"simple"},property:{$id:"#/condition/property",type:"string",description:"The id of the property to check."}},oneOf:[{properties:{equals:{type:["string","number","boolean"]}},required:["equals"]},{properties:{oneOf:{type:"array",items:{type:["string","number"]}}},required:["oneOf"]},{properties:{isActive:{type:"boolean",description:"For `true`, activates the property when given property is active"}},required:["isActive"]}],errorMessage:{required:{property:"missing property name for condition"}}},J2=V2.default;function e3(e,{instancePath:t="",parentData:n,parentDataProperty:i,rootData:r=e}={}){let o=null,s=0;if(!e||"object"!=typeof e||Array.isArray(e)){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}const a=s;let l=!1,c=null;const p=s,u=s;let d=!1,h=null;const f=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.equals){const e={instancePath:t,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/0/required",keyword:"required",params:{missingProperty:"equals"},message:"must have required property 'equals'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.equals){let n=e.equals;if("string"!=typeof n&&"number"!=typeof n&&"boolean"!=typeof n){const e={instancePath:t+"/equals",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/0/properties/equals/type",keyword:"type",params:{type:Z2.oneOf[0].properties.equals.type},message:"must be string,number,boolean"};null===o?o=[e]:o.push(e),s++}}}(g=f===s)&&(d=!0,h=0);const m=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.oneOf){const e={instancePath:t,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/required",keyword:"required",params:{missingProperty:"oneOf"},message:"must have required property 'oneOf'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.oneOf){let n=e.oneOf;if(Array.isArray(n)){const e=n.length;for(let i=0;i0){const e={required:{property:[]}},n={required:{}};let i,r;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t&&n.keyword in e&&0===n.schemaPath.indexOf("#/definitions/properties/allOf/0/items/allOf/1/definitions/condition")&&/^\/[^\/]*$/.test(n.schemaPath.slice(68))&&(i=X2[n.keyword],r=e[n.keyword][n.params[i]],r&&(r.push(n),n.emUsed=!0));for(const i in e)for(const a in e[i])if(r=e[i][a],r.length){const e=n[i]&&n[i][a],l={instancePath:t,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/errorMessage",keyword:"errorMessage",params:{errors:r},message:e?e():Z2.errorMessage[i][a]};null===o?o=[l]:o.push(l),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}(b=p===s)&&(l=!0,c=0);const y=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.allMatch){const e={instancePath:t,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"allMatch"},message:"must have required property 'allMatch'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.allMatch){let n=e.allMatch;if(Array.isArray(n)){if(n.length<1){const e={instancePath:t+"/allMatch",schemaPath:"#/oneOf/1/properties/allMatch/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};null===o?o=[e]:o.push(e),s++}const e=n.length;for(let i=0;i0){const e={required:{property:[]}},n={required:{}};let r,a;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/allMatch/"+i&&n.keyword in e&&0===n.schemaPath.indexOf("#/definitions/properties/allOf/0/items/allOf/1/definitions/condition")&&/^\/[^\/]*$/.test(n.schemaPath.slice(68))&&(r=X2[n.keyword],a=e[n.keyword][n.params[r]],a&&(a.push(n),n.emUsed=!0));for(const r in e)for(const l in e[r])if(a=e[r][l],a.length){const e=n[r]&&n[r][l],c={instancePath:t+"/allMatch/"+i,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/errorMessage",keyword:"errorMessage",params:{errors:a},message:e?e():Z2.errorMessage[r][l]};null===o?o=[c]:o.push(c),s++}const l=[];for(const e of o)e.emUsed||l.push(e);o=l,s=l.length}}}else{const e={instancePath:t+"/allMatch",schemaPath:"#/oneOf/1/properties/allMatch/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}var b;if((b=y===s)&&l?(l=!1,c=[c,1]):b&&(l=!0,c=1),l)s=a,null!==o&&(a?o.length=a:o=null);else{const e={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:c},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}return e3.errors=o,0===s}function t3(e,{instancePath:t="",parentData:n,parentDataProperty:i,rootData:r=e}={}){let o=null,s=0;if(Array.isArray(e)){const n=e.length;for(let i=0;i0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/"+i&&(0!==n.instancePath.indexOf(t+"/"+i)||"/"!==n.instancePath[t+"/"+i.length])||0!==n.schemaPath.indexOf("#/allOf/0/items/allOf/0/then")||"/"!==n.schemaPath[28]||(e.push(n),n.emUsed=!0);if(e.length){const n={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/0/then/errorMessage",keyword:"errorMessage",params:{errors:e},message:'must provide choices=[] with "Dropdown" type'};null===o?o=[n]:o.push(n),s++}const n=[];for(const e of o)e.emUsed||n.push(e);o=n,s=n.length}y=a=e===s}if(!y){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/0/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const b=s;let x=!0;const w=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.id||void 0===n.condition){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.condition){let e=n.condition;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.property){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.property&&!J2(e.property,Y2.properties.property.const)){const e={};null===o?o=[e]:o.push(e),s++}}var l=w===s;if(s=b,null!==o&&(b?o.length=b:o=null),l){const e=s,r=s,a=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.condition){const e={};null===o?o=[e]:o.push(e),s++}if(a===s){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/1/allOf/0/then/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=r,null!==o&&(r?o.length=r:o=null);if(s>0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/"+i&&(0!==n.instancePath.indexOf(t+"/"+i)||"/"!==n.instancePath[t+"/"+i.length])||0!==n.schemaPath.indexOf("#/allOf/0/items/allOf/1/allOf/0/then")||"/"!==n.schemaPath[36]||(e.push(n),n.emUsed=!0);if(e.length){const n={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/1/allOf/0/then/errorMessage",keyword:"errorMessage",params:{errors:e},message:"Invalid condition.property, must be different than property.id"};null===o?o=[n]:o.push(n),s++}const n=[];for(const e of o)e.emUsed||n.push(e);o=n,s=n.length}x=l=e===s}if(!x){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/1/allOf/0/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0!==n.id&&"string"!=typeof n.id){const e={instancePath:t+"/"+i+"/id",schemaPath:"#/allOf/0/items/allOf/1/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.condition){let e=n.condition;if(!e||"object"!=typeof e||Array.isArray(e)){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/allOf/0/items/allOf/1/properties/condition/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}const r=s;let a=!1,l=null;const d=s,h=s;let f=!1,m=null;const g=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.equals){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/0/required",keyword:"required",params:{missingProperty:"equals"},message:"must have required property 'equals'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.equals){let n=e.equals;if("string"!=typeof n&&"number"!=typeof n&&"boolean"!=typeof n){const e={instancePath:t+"/"+i+"/condition/equals",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/0/properties/equals/type",keyword:"type",params:{type:Z2.oneOf[0].properties.equals.type},message:"must be string,number,boolean"};null===o?o=[e]:o.push(e),s++}}}(c=g===s)&&(f=!0,m=0);const y=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.oneOf){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/required",keyword:"required",params:{missingProperty:"oneOf"},message:"must have required property 'oneOf'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.oneOf){let n=e.oneOf;if(Array.isArray(n)){const e=n.length;for(let r=0;r0){const e={required:{property:[]}},n={required:{}};let r,a;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/"+i+"/condition"&&n.keyword in e&&0===n.schemaPath.indexOf("#/definitions/properties/allOf/0/items/allOf/1/definitions/condition")&&/^\/[^\/]*$/.test(n.schemaPath.slice(68))&&(r=X2[n.keyword],a=e[n.keyword][n.params[r]],a&&(a.push(n),n.emUsed=!0));for(const r in e)for(const l in e[r])if(a=e[r][l],a.length){const e=n[r]&&n[r][l],c={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/errorMessage",keyword:"errorMessage",params:{errors:a},message:e?e():Z2.errorMessage[r][l]};null===o?o=[c]:o.push(c),s++}const l=[];for(const e of o)e.emUsed||l.push(e);o=l,s=l.length}(u=d===s)&&(a=!0,l=0);const v=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.allMatch){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/allOf/0/items/allOf/1/properties/condition/oneOf/1/required",keyword:"required",params:{missingProperty:"allMatch"},message:"must have required property 'allMatch'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.allMatch){let n=e.allMatch;if(Array.isArray(n)){if(n.length<1){const e={instancePath:t+"/"+i+"/condition/allMatch",schemaPath:"#/allOf/0/items/allOf/1/properties/condition/oneOf/1/properties/allMatch/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};null===o?o=[e]:o.push(e),s++}const e=n.length;for(let r=0;r0){const e={required:{property:[]}},n={required:{}};let a,l;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/"+i+"/condition/allMatch/"+r&&n.keyword in e&&0===n.schemaPath.indexOf("#/definitions/properties/allOf/0/items/allOf/1/definitions/condition")&&/^\/[^\/]*$/.test(n.schemaPath.slice(68))&&(a=X2[n.keyword],l=e[n.keyword][n.params[a]],l&&(l.push(n),n.emUsed=!0));for(const a in e)for(const c in e[a])if(l=e[a][c],l.length){const e=n[a]&&n[a][c],p={instancePath:t+"/"+i+"/condition/allMatch/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/errorMessage",keyword:"errorMessage",params:{errors:l},message:e?e():Z2.errorMessage[a][c]};null===o?o=[p]:o.push(p),s++}const c=[];for(const e of o)e.emUsed||c.push(e);o=c,s=c.length}}}else{const e={instancePath:t+"/"+i+"/condition/allMatch",schemaPath:"#/allOf/0/items/allOf/1/properties/condition/oneOf/1/properties/allMatch/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}var u;if((u=v===s)&&a?(a=!1,l=[l,1]):u&&(a=!0,l=1),a)s=r,null!==o&&(r?o.length=r:o=null);else{const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/allOf/0/items/allOf/1/properties/condition/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}}}const _=s;let E=!0;const O=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.type){const e=s,t=s;if("Number"!==n.type){const e={};null===o?o=[e]:o.push(e),s++}if(t===s){const e={};null===o?o=[e]:o.push(e),s++}else s=e,null!==o&&(e?o.length=e:o=null)}var d=O===s;if(s=_,null!==o&&(_?o.length=_:o=null),d){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.value){let e=n.value;if("string"!=typeof e&&"boolean"!=typeof e){const e={instancePath:t+"/"+i+"/value",schemaPath:"#/allOf/0/items/allOf/2/then/properties/value/type",keyword:"type",params:{type:K2.allOf[0].items.allOf[2].then.properties.value.type},message:"must be string,boolean"};null===o?o=[e]:o.push(e),s++}}E=d=e===s}if(!E){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/2/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const P=s;let k=!0;const S=s,C=s;let T=!1;const A=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.type){let e=n.type;if("String"!==e&&"Text"!==e){const e={};null===o?o=[e]:o.push(e),s++}}(h=A===s)&&(T=!0);const M=s,D=s,R=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.type){const e={};null===o?o=[e]:o.push(e),s++}var h;if(R===s){const e={};null===o?o=[e]:o.push(e),s++}else s=D,null!==o&&(D?o.length=D:o=null);if((h=M===s)&&T?T=!1:h&&(T=!0),T)s=C,null!==o&&(C?o.length=C:o=null);else{const e={};null===o?o=[e]:o.push(e),s++}var f=S===s;let N;if(s=P,null!==o&&(P?o.length=P:o=null),f){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.placeholder&&"string"!=typeof n.placeholder){const e={instancePath:t+"/"+i+"/placeholder",schemaPath:"#/allOf/0/items/allOf/3/then/properties/placeholder/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}k=f=e===s,N="then"}else{const e=s,r=s,a=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.placeholder){const e={};null===o?o=[e]:o.push(e),s++}if(a===s){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/3/else/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=r,null!==o&&(r?o.length=r:o=null);k=f=e===s,N="else"}if(!k){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/3/if",keyword:"if",params:{failingKeyword:N},message:'must match "'+N+'" schema'};null===o?o=[e]:o.push(e),s++}if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0!==n.value){let e=n.value;if("string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e){const e={instancePath:t+"/"+i+"/value",schemaPath:"#/allOf/0/items/properties/value/type",keyword:"type",params:{type:K2.allOf[0].items.properties.value.type},message:"must be string,number,boolean"};null===o?o=[e]:o.push(e),s++}}if(void 0!==n.description&&"string"!=typeof n.description){const e={instancePath:t+"/"+i+"/description",schemaPath:"#/allOf/0/items/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.label&&"string"!=typeof n.label){const e={instancePath:t+"/"+i+"/label",schemaPath:"#/allOf/0/items/properties/label/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.type&&"string"!=typeof n.type){const e={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/0/items/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.editable&&"boolean"!=typeof n.editable){const e={instancePath:t+"/"+i+"/editable",schemaPath:"#/allOf/0/items/properties/editable/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.choices){let e=n.choices;if(Array.isArray(e)){const n=e.length;for(let a=0;a0){const e={required:[]},n={};for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/"+i+"/choices/"+a&&n.keyword in e&&0===n.schemaPath.indexOf("#/allOf/0/items/properties/choices/items")&&/^\/[^\/]*$/.test(n.schemaPath.slice(40))&&(e[n.keyword].push(n),n.emUsed=!0);for(const r in e)if(e[r].length){const l={instancePath:t+"/"+i+"/choices/"+a,schemaPath:"#/allOf/0/items/properties/choices/items/errorMessage",keyword:"errorMessage",params:{errors:e[r]},message:r in n?n[r]():K2.allOf[0].items.properties.choices.items.errorMessage[r]};null===o?o=[l]:o.push(l),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}}}else{const e={instancePath:t+"/"+i+"/choices",schemaPath:"#/allOf/0/items/properties/choices/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}if(void 0!==n.constraints){let e=n.constraints;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.notEmpty&&"boolean"!=typeof e.notEmpty){const e={instancePath:t+"/"+i+"/constraints/notEmpty",schemaPath:"#/allOf/0/items/properties/constraints/properties/notEmpty/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.minLength&&"number"!=typeof e.minLength){const e={instancePath:t+"/"+i+"/constraints/minLength",schemaPath:"#/allOf/0/items/properties/constraints/properties/minLength/type",keyword:"type",params:{type:"number"},message:"must be number"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.maxLength&&"number"!=typeof e.maxLength){const e={instancePath:t+"/"+i+"/constraints/maxLength",schemaPath:"#/allOf/0/items/properties/constraints/properties/maxLength/type",keyword:"type",params:{type:"number"},message:"must be number"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.pattern){let n=e.pattern;const r=s;let a=!1,l=null;const c=s;if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0!==n.value&&"string"!=typeof n.value){const e={instancePath:t+"/"+i+"/constraints/pattern/value",schemaPath:"#/allOf/0/items/properties/constraints/properties/pattern/oneOf/0/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.message&&"string"!=typeof n.message){const e={instancePath:t+"/"+i+"/constraints/pattern/message",schemaPath:"#/allOf/0/items/properties/constraints/properties/pattern/oneOf/0/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/"+i+"/constraints/pattern",schemaPath:"#/allOf/0/items/properties/constraints/properties/pattern/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}(m=c===s)&&(a=!0,l=0);const p=s;if("string"!=typeof n){const e={instancePath:t+"/"+i+"/constraints/pattern",schemaPath:"#/allOf/0/items/properties/constraints/properties/pattern/oneOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}var m;if((m=p===s)&&a?(a=!1,l=[l,1]):m&&(a=!0,l=1),a)s=r,null!==o&&(r?o.length=r:o=null);else{const e={instancePath:t+"/"+i+"/constraints/pattern",schemaPath:"#/allOf/0/items/properties/constraints/properties/pattern/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t+"/"+i+"/constraints",schemaPath:"#/allOf/0/items/properties/constraints/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}}if(void 0!==n.group&&"string"!=typeof n.group){const e={instancePath:t+"/"+i+"/group",schemaPath:"#/allOf/0/items/properties/group/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t,schemaPath:"#/allOf/0/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}if(Array.isArray(e)){const n=e.length;for(let i=0;i0){const n=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/"+i+"/type"&&(0!==e.instancePath.indexOf(t+"/"+i+"/type")||"/"!==e.instancePath[t+"/"+i+5])||0!==e.schemaPath.indexOf("#/allOf/1/items/allOf/0/then/properties/type")||"/"!==e.schemaPath[44]||(n.push(e),e.emUsed=!0);if(n.length){const r={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/1/items/allOf/0/then/properties/type/errorMessage",keyword:"errorMessage",params:{errors:n},message:"invalid property type "+JSON.stringify(e)+' for binding type "property"; must be any of { String, Text, Hidden, Dropdown, Boolean }'};null===o?o=[r]:o.push(r),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}}a=g=e===s}if(!a){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/0/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const c=s;let p=!0;const u=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.binding){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.binding){let e=n.binding;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.type&&"camunda:executionListener"!==e.type){const e={};null===o?o=[e]:o.push(e),s++}}var y=u===s;if(s=c,null!==o&&(c?o.length=c:o=null),y){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0!==n.type){if("Hidden"!==n.type){const e={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/1/items/allOf/1/then/properties/type/enum",keyword:"enum",params:{allowedValues:K2.allOf[1].items.allOf[1].then.properties.type.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}if(s>0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/"+i+"/type"&&(0!==n.instancePath.indexOf(t+"/"+i+"/type")||"/"!==n.instancePath[t+"/"+i+5])||0!==n.schemaPath.indexOf("#/allOf/1/items/allOf/1/then/properties/type")||"/"!==n.schemaPath[44]||(e.push(n),n.emUsed=!0);if(e.length){const r={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/1/items/allOf/1/then/properties/type/errorMessage",keyword:"errorMessage",params:{errors:e},message:"invalid property type "+JSON.stringify(n&&n.type)+' for binding type "camunda:executionListener"; must be "Hidden"'};null===o?o=[r]:o.push(r),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}}if(void 0!==n.binding){let e=n.binding;const r=s;let a=!1,l=null;const c=s,p=s,u=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0!==e.implementationType&&"script"!==e.implementationType){const e={};null===o?o=[e]:o.push(e),s++}if(u===s){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/allOf/1/then/properties/binding/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=p,null!==o&&(p?o.length=p:o=null);(v=c===s)&&(a=!0,l=0);const d=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.scriptFormat){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/allOf/1/then/properties/binding/oneOf/1/required",keyword:"required",params:{missingProperty:"scriptFormat"},message:"must have required property 'scriptFormat'"};null===o?o=[e]:o.push(e),s++}if((v=d===s)&&a)a=!1,l=[l,1];else{v&&(a=!0,l=1);const n=s,r=s,c=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.implementationType){const e={};null===o?o=[e]:o.push(e),s++}if(c===s){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/allOf/1/then/properties/binding/oneOf/2/allOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=r,null!==o&&(r?o.length=r:o=null);const p=s,u=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.scriptFormat){const e={};null===o?o=[e]:o.push(e),s++}var v;if(u===s){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/allOf/1/then/properties/binding/oneOf/2/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=p,null!==o&&(p?o.length=p:o=null);(v=n===s)&&a?(a=!1,l=[l,2]):v&&(a=!0,l=2)}if(a)s=r,null!==o&&(r?o.length=r:o=null);else{const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/allOf/1/then/properties/binding/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0!==e.implementationType){let n=e.implementationType;if("class"!==n&&"delegateExpression"!==n&&"expression"!==n&&"script"!==n){const e={instancePath:t+"/"+i+"/binding/implementationType",schemaPath:"#/allOf/1/items/allOf/1/then/properties/binding/properties/implementationType/enum",keyword:"enum",params:{allowedValues:K2.allOf[1].items.allOf[1].then.properties.binding.properties.implementationType.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}}}}p=y=e===s}if(!p){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/1/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const d=s;let h=!0;const f=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.binding){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.binding){let e=n.binding;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.type){let t=e.type;if("camunda:property"!==t&&"camunda:outputParameter"!==t&&"camunda:in"!==t&&"camunda:in:businessKey"!==t&&"camunda:out"!==t&&"camunda:errorEventDefinition"!==t){const e={};null===o?o=[e]:o.push(e),s++}}}var b=f===s;if(s=d,null!==o&&(d?o.length=d:o=null),b){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.type){let e=n.type;if("String"!==e&&"Hidden"!==e&&"Dropdown"!==e){const e={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/1/items/allOf/2/then/properties/type/enum",keyword:"enum",params:{allowedValues:K2.allOf[1].items.allOf[2].then.properties.type.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}if(s>0){const r=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/"+i+"/type"&&(0!==e.instancePath.indexOf(t+"/"+i+"/type")||"/"!==e.instancePath[t+"/"+i+5])||0!==e.schemaPath.indexOf("#/allOf/1/items/allOf/2/then/properties/type")||"/"!==e.schemaPath[44]||(r.push(e),e.emUsed=!0);if(r.length){const a={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/1/items/allOf/2/then/properties/type/errorMessage",keyword:"errorMessage",params:{errors:r},message:"invalid property type "+JSON.stringify(e)+" for binding type "+JSON.stringify(n&&n.binding&&n.binding.type)+"; must be any of { String, Hidden, Dropdown }"};null===o?o=[a]:o.push(a),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}}h=b=e===s}if(!h){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/2/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const m=s;let M=!0;const D=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.binding){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.binding){let e=n.binding;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.type){let t=e.type;if("camunda:inputParameter"!==t&&"camunda:field"!==t){const e={};null===o?o=[e]:o.push(e),s++}}}var x=D===s;if(s=m,null!==o&&(m?o.length=m:o=null),x){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.type){let e=n.type;if("String"!==e&&"Text"!==e&&"Hidden"!==e&&"Dropdown"!==e){const e={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/1/items/allOf/3/then/properties/type/enum",keyword:"enum",params:{allowedValues:K2.allOf[1].items.allOf[3].then.properties.type.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}if(s>0){const r=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/"+i+"/type"&&(0!==e.instancePath.indexOf(t+"/"+i+"/type")||"/"!==e.instancePath[t+"/"+i+5])||0!==e.schemaPath.indexOf("#/allOf/1/items/allOf/3/then/properties/type")||"/"!==e.schemaPath[44]||(r.push(e),e.emUsed=!0);if(r.length){const a={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/1/items/allOf/3/then/properties/type/errorMessage",keyword:"errorMessage",params:{errors:r},message:"invalid property type "+JSON.stringify(e)+" for binding type "+JSON.stringify(n&&n.binding&&n.binding.type)+"; must be any of { String, Text, Hidden, Dropdown }"};null===o?o=[a]:o.push(a),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}}M=x=e===s}if(!M){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/3/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.binding){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/required",keyword:"required",params:{missingProperty:"binding"},message:"must have required property 'binding'"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.binding){let e=n.binding;const r=s;let a=!0;const l=s;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.type){let t=e.type;if("property"!==t&&"camunda:property"!==t&&"camunda:inputParameter"!==t&&"camunda:field"!==t){const e={};null===o?o=[e]:o.push(e),s++}}var w=l===s;if(s=r,null!==o&&(r?o.length=r:o=null),w){const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.name){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/0/then/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===o?o=[e]:o.push(e),s++}if(s>0){const n=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/"+i+"/binding"&&(0!==e.instancePath.indexOf(t+"/"+i+"/binding")||"/"!==e.instancePath[t+"/"+i+8])||0!==e.schemaPath.indexOf("#/allOf/1/items/properties/binding/allOf/0/then")||"/"!==e.schemaPath[47]||(n.push(e),e.emUsed=!0);if(n.length){const r={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/0/then/errorMessage",keyword:"errorMessage",params:{errors:n},message:"property.binding "+JSON.stringify(e&&e.type)+" requires name"};null===o?o=[r]:o.push(r),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}a=w=n===s}if(!a){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/0/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const c=s;let p=!0;const u=s;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.type&&"camunda:outputParameter"!==e.type){const e={};null===o?o=[e]:o.push(e),s++}var _=u===s;if(s=c,null!==o&&(c?o.length=c:o=null),_){const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.source){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/1/then/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};null===o?o=[e]:o.push(e),s++}if(s>0){const n=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/"+i+"/binding"&&(0!==e.instancePath.indexOf(t+"/"+i+"/binding")||"/"!==e.instancePath[t+"/"+i+8])||0!==e.schemaPath.indexOf("#/allOf/1/items/properties/binding/allOf/1/then")||"/"!==e.schemaPath[47]||(n.push(e),e.emUsed=!0);if(n.length){const r={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/1/then/errorMessage",keyword:"errorMessage",params:{errors:n},message:"property.binding "+JSON.stringify(e&&e.type)+" requires source"};null===o?o=[r]:o.push(r),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}p=_=n===s}if(!p){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/1/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const d=s;let h=!0;const f=s;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.type&&"camunda:in"!==e.type){const e={};null===o?o=[e]:o.push(e),s++}var E=f===s;if(s=d,null!==o&&(d?o.length=d:o=null),E){const n=s,r=s;let a=!1;const l=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.variables){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/2/then/anyOf/0/required",keyword:"required",params:{missingProperty:"variables"},message:"must have required property 'variables'"};null===o?o=[e]:o.push(e),s++}var O=l===s;if(a=a||O,!a){const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.target){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/2/then/anyOf/1/required",keyword:"required",params:{missingProperty:"target"},message:"must have required property 'target'"};null===o?o=[e]:o.push(e),s++}O=n===s;a=a||O}if(a)s=r,null!==o&&(r?o.length=r:o=null);else{const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/2/then/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===o?o=[e]:o.push(e),s++}if(s>0){const n=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/"+i+"/binding"&&(0!==e.instancePath.indexOf(t+"/"+i+"/binding")||"/"!==e.instancePath[t+"/"+i+8])||0!==e.schemaPath.indexOf("#/allOf/1/items/properties/binding/allOf/2/then")||"/"!==e.schemaPath[47]||(n.push(e),e.emUsed=!0);if(n.length){const r={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/2/then/errorMessage",keyword:"errorMessage",params:{errors:n},message:"property.binding "+JSON.stringify(e&&e.type)+" requires variables, target, or both"};null===o?o=[r]:o.push(r),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}h=E=n===s}if(!h){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/2/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const m=s;let g=!0;const y=s;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.type&&"camunda:out"!==e.type){const e={};null===o?o=[e]:o.push(e),s++}var P=y===s;if(s=m,null!==o&&(m?o.length=m:o=null),P){const n=s,r=s;let a=!1,l=null;const c=s,p=s,u=s,d=s;let h=!1;const f=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.source){const e={};null===o?o=[e]:o.push(e),s++}var k=f===s;if(h=h||k,!h){const t=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.sourceExpression){const e={};null===o?o=[e]:o.push(e),s++}k=t===s;h=h||k}if(h)s=d,null!==o&&(d?o.length=d:o=null);else{const e={};null===o?o=[e]:o.push(e),s++}if(u===s){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/then/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=p,null!==o&&(p?o.length=p:o=null);if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.variables){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/then/oneOf/0/required",keyword:"required",params:{missingProperty:"variables"},message:"must have required property 'variables'"};null===o?o=[e]:o.push(e),s++}(T=c===s)&&(a=!0,l=0);const m=s,y=s,v=s,b=s;let x=!1;const w=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.variables){const e={};null===o?o=[e]:o.push(e),s++}var S=w===s;if(x=x||S,!x){const t=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.sourceExpression){const e={};null===o?o=[e]:o.push(e),s++}S=t===s;x=x||S}if(x)s=b,null!==o&&(b?o.length=b:o=null);else{const e={};null===o?o=[e]:o.push(e),s++}if(v===s){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/then/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=y,null!==o&&(y?o.length=y:o=null);if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.source){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/then/oneOf/1/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};null===o?o=[e]:o.push(e),s++}if((T=m===s)&&a)a=!1,l=[l,1];else{T&&(a=!0,l=1);const n=s,r=s,c=s,p=s;let u=!1;const d=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.variables){const e={};null===o?o=[e]:o.push(e),s++}var C=d===s;if(u=u||C,!u){const t=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.source){const e={};null===o?o=[e]:o.push(e),s++}C=t===s;u=u||C}if(u)s=p,null!==o&&(p?o.length=p:o=null);else{const e={};null===o?o=[e]:o.push(e),s++}if(c===s){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/then/oneOf/2/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=r,null!==o&&(r?o.length=r:o=null);if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.sourceExpression){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/then/oneOf/2/required",keyword:"required",params:{missingProperty:"sourceExpression"},message:"must have required property 'sourceExpression'"};null===o?o=[e]:o.push(e),s++}if((T=n===s)&&a)a=!1,l=[l,2];else{T&&(a=!0,l=2);const n=s,r=s,c=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.source){const e={};null===o?o=[e]:o.push(e),s++}if(c===s){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/then/oneOf/3/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=r,null!==o&&(r?o.length=r:o=null);if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.variables){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/then/oneOf/3/required",keyword:"required",params:{missingProperty:"variables"},message:"must have required property 'variables'"};null===o?o=[e]:o.push(e),s++}if(void 0===e.sourceExpression){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/then/oneOf/3/required",keyword:"required",params:{missingProperty:"sourceExpression"},message:"must have required property 'sourceExpression'"};null===o?o=[e]:o.push(e),s++}}if((T=n===s)&&a)a=!1,l=[l,3];else{T&&(a=!0,l=3);const n=s,r=s,c=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.sourceExpression){const e={};null===o?o=[e]:o.push(e),s++}var T;if(c===s){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/then/oneOf/4/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=r,null!==o&&(r?o.length=r:o=null);if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.variables){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/then/oneOf/4/required",keyword:"required",params:{missingProperty:"variables"},message:"must have required property 'variables'"};null===o?o=[e]:o.push(e),s++}if(void 0===e.source){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/then/oneOf/4/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};null===o?o=[e]:o.push(e),s++}}(T=n===s)&&a?(a=!1,l=[l,4]):T&&(a=!0,l=4)}}}if(a)s=r,null!==o&&(r?o.length=r:o=null);else{const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/then/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}if(s>0){const n=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/"+i+"/binding"&&(0!==e.instancePath.indexOf(t+"/"+i+"/binding")||"/"!==e.instancePath[t+"/"+i+8])||0!==e.schemaPath.indexOf("#/allOf/1/items/properties/binding/allOf/3/then")||"/"!==e.schemaPath[47]||(n.push(e),e.emUsed=!0);if(n.length){const r={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/then/errorMessage",keyword:"errorMessage",params:{errors:n},message:"property.binding "+JSON.stringify(e&&e.type)+" requires one of the following: variables, sourceExpression, source, (sourceExpression and variables), or (source and variables)"};null===o?o=[r]:o.push(r),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}g=P=n===s}if(!g){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const v=s;let b=!0;const x=s;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.type&&"camunda:errorEventDefinition"!==e.type){const e={};null===o?o=[e]:o.push(e),s++}var A=x===s;if(s=v,null!==o&&(v?o.length=v:o=null),A){const n=s,r=s;let a=!1,l=null;const c=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.errorRef){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/4/then/oneOf/0/required",keyword:"required",params:{missingProperty:"errorRef"},message:"must have required property 'errorRef'"};null===o?o=[e]:o.push(e),s++}if(c===s&&(a=!0,l=0),a)s=r,null!==o&&(r?o.length=r:o=null);else{const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/4/then/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}if(s>0){const n=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/"+i+"/binding"&&(0!==e.instancePath.indexOf(t+"/"+i+"/binding")||"/"!==e.instancePath[t+"/"+i+8])||0!==e.schemaPath.indexOf("#/allOf/1/items/properties/binding/allOf/4/then")||"/"!==e.schemaPath[47]||(n.push(e),e.emUsed=!0);if(n.length){const r={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/4/then/errorMessage",keyword:"errorMessage",params:{errors:n},message:"property.binding "+JSON.stringify(e&&e.type)+" requires errorRef"};null===o?o=[r]:o.push(r),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}b=A=n===s}if(!b){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/4/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.type){let n=e.type;if("string"!=typeof n){const e={instancePath:t+"/"+i+"/binding/type",schemaPath:"#/allOf/1/items/properties/binding/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if("property"!==n&&"camunda:property"!==n&&"camunda:inputParameter"!==n&&"camunda:outputParameter"!==n&&"camunda:in"!==n&&"camunda:out"!==n&&"camunda:in:businessKey"!==n&&"camunda:executionListener"!==n&&"camunda:field"!==n&&"camunda:errorEventDefinition"!==n){const e={instancePath:t+"/"+i+"/binding/type",schemaPath:"#/allOf/1/items/properties/binding/properties/type/enum",keyword:"enum",params:{allowedValues:K2.allOf[1].items.properties.binding.properties.type.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}if(s>0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/"+i+"/binding/type"&&(0!==n.instancePath.indexOf(t+"/"+i+"/binding/type")||"/"!==n.instancePath[t+"/"+i+13])||0!==n.schemaPath.indexOf("#/allOf/1/items/properties/binding/properties/type")||"/"!==n.schemaPath[50]||(e.push(n),n.emUsed=!0);if(e.length){const r={instancePath:t+"/"+i+"/binding/type",schemaPath:"#/allOf/1/items/properties/binding/properties/type/errorMessage",keyword:"errorMessage",params:{errors:e},message:"invalid property.binding type "+JSON.stringify(n)+"; must be any of { property, camunda:property, camunda:inputParameter, camunda:outputParameter, camunda:in, camunda:out, camunda:in:businessKey, camunda:executionListener, camunda:field, camunda:errorEventDefinition }"};null===o?o=[r]:o.push(r),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/"+i+"/binding/name",schemaPath:"#/allOf/1/items/properties/binding/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.event&&"string"!=typeof e.event){const e={instancePath:t+"/"+i+"/binding/event",schemaPath:"#/allOf/1/items/properties/binding/properties/event/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.scriptFormat&&"string"!=typeof e.scriptFormat){const e={instancePath:t+"/"+i+"/binding/scriptFormat",schemaPath:"#/allOf/1/items/properties/binding/properties/scriptFormat/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.source&&"string"!=typeof e.source){const e={instancePath:t+"/"+i+"/binding/source",schemaPath:"#/allOf/1/items/properties/binding/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.target&&"string"!=typeof e.target){const e={instancePath:t+"/"+i+"/binding/target",schemaPath:"#/allOf/1/items/properties/binding/properties/target/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.expression&&"boolean"!=typeof e.expression){const e={instancePath:t+"/"+i+"/binding/expression",schemaPath:"#/allOf/1/items/properties/binding/properties/expression/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.variables){let n=e.variables;if("string"!=typeof n){const e={instancePath:t+"/"+i+"/binding/variables",schemaPath:"#/allOf/1/items/properties/binding/properties/variables/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if("all"!==n&&"local"!==n){const e={instancePath:t+"/"+i+"/binding/variables",schemaPath:"#/allOf/1/items/properties/binding/properties/variables/enum",keyword:"enum",params:{allowedValues:K2.allOf[1].items.properties.binding.properties.variables.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}}if(void 0!==e.sourceExpression&&"string"!=typeof e.sourceExpression){const e={instancePath:t+"/"+i+"/binding/sourceExpression",schemaPath:"#/allOf/1/items/properties/binding/properties/sourceExpression/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){const e={required:[]},n={required:function(){return'missing binding for property "'+JSON.stringify(i)+'"'}};for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/"+i&&n.keyword in e&&0===n.schemaPath.indexOf("#/allOf/1/items")&&/^\/[^\/]*$/.test(n.schemaPath.slice(15))&&(e[n.keyword].push(n),n.emUsed=!0);for(const r in e)if(e[r].length){const a={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/errorMessage",keyword:"errorMessage",params:{errors:e[r]},message:r in n?n[r]():K2.allOf[1].items.errorMessage[r]};null===o?o=[a]:o.push(a),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}}}else{const e={instancePath:t,schemaPath:"#/allOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}return t3.errors=o,0===s}const n3={type:"array",description:"List of properties of the element template.",allOf:[{examples:[[{label:"Name",type:"String",binding:{type:"property",name:"name"}}]]}],items:{type:"object",default:{},allOf:[{if:{properties:{type:{const:"Dropdown"}},required:["type"]},then:{required:["choices"],errorMessage:'must provide choices=[] with "Dropdown" type'}},{definitions:{condition:{type:"object",required:["property"],properties:{type:{$id:"#/condition/type",const:"simple",description:"The type of the condition.",default:"simple"},property:{$id:"#/condition/property",type:"string",description:"The id of the property to check."}},oneOf:[{properties:{equals:{type:["string","number","boolean"]}},required:["equals"]},{properties:{oneOf:{type:"array",items:{type:["string","number"]}}},required:["oneOf"]},{properties:{isActive:{type:"boolean",description:"For `true`, activates the property when given property is active"}},required:["isActive"]}],errorMessage:{required:{property:"missing property name for condition"}}},conditionDependingOnId:{required:["property"],properties:{property:{const:{$data:"2/id"}}}}},allOf:[{$comment:"property#condition should not depend on property#id",if:{required:["id","condition"],properties:{condition:{$ref:"#/definitions/properties/allOf/0/items/allOf/1/definitions/conditionDependingOnId"}}},then:{not:{required:["condition"]},errorMessage:"Invalid condition.property, must be different than property.id"}},{then:{errorMessage:"Invalid condition.property, must be different than property.id"}}],properties:{id:{type:"string",description:"Unique identifier of the property."},condition:{type:"object",description:"Condition(s) to activate the binding.",allOf:[{examples:[{type:"simple",property:"httpMethod",equals:"GET"},{type:"simple",property:"httpMethod",oneOf:["POST","PUT","DELETE"]},{allMatch:[{type:"simple",property:"authType",equals:"Basic"},{type:"simple",property:"httpMethod",oneOf:["POST","PUT","DELETE"]}]}]}],oneOf:[{$ref:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition"},{properties:{allMatch:{$id:"#/allMatch",type:"array",items:{$ref:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition"},minItems:1}},required:["allMatch"]}]}}},{if:{properties:{type:{not:{const:"Number"}}},required:["type"]},then:{properties:{value:{type:["string","boolean"]}}}},{if:{oneOf:[{properties:{type:{enum:["String","Text"]}},required:["type"]},{not:{required:["type"]}}]},then:{properties:{placeholder:{type:"string"}}},else:{not:{required:["placeholder"]}}}],properties:{value:{$id:"#/properties/property/value",type:["string","number","boolean"],description:"The value of a control field."},description:{$id:"#/properties/property/description",type:"string",description:"The description of a control field."},label:{$id:"#/properties/property/label",type:"string",description:"The label of a control field."},type:{$id:"#/properties/property/type",type:"string",description:"The type of a control field."},editable:{$id:"#/properties/property/editable",type:"boolean",description:"Indicates whether a control field is editable or not."},choices:{$id:"#/properties/property/choices",type:"array",description:"The choices for dropdown fields.",default:[],items:{$id:"#/properties/property/choices/item",type:"object",default:{},properties:{name:{$id:"#/properties/property/choices/item/name",type:"string",description:"The name of a choice."},value:{$id:"#/properties/property/choices/item/value",type:"string",description:"The value of a choice."},condition:{$ref:"#/definitions/properties/allOf/0/items/allOf/1/properties/condition"}},required:["value","name"],errorMessage:{required:'{ name, value } must be specified for "Dropdown" choices'}}},constraints:{$id:"#/properties/property/constraints",type:"object",description:"The validation constraints of a control field.",allOf:[{examples:[{notEmpty:!0}]}],properties:{notEmpty:{$id:"#/properties/property/constraints/notEmpty",type:"boolean",description:"The control field must not be empty."},minLength:{$id:"#/properties/property/constraints/minLength",type:"number",description:"The minimal length of a control field value."},maxLength:{$id:"#/properties/property/constraints/maxLength",type:"number",description:"The maximal length for a control field value."},pattern:{$id:"#/properties/property/constraints/pattern",description:"A regular expression pattern for a constraint.",oneOf:[{type:"object",default:{},properties:{value:{$id:"#/properties/property/constraints/pattern/value",type:"string",description:"The regular expression of a pattern."},message:{$id:"#/properties/property/constraints/pattern/message",type:"string",description:"The validation message of a pattern."}}},{type:"string"}]}}},group:{$id:"#/properties/property/group",type:"string",description:"The custom group of a control field."}}}};function i3(e,{instancePath:t="",parentData:n,parentDataProperty:i,rootData:r=e}={}){let o=null,s=0;if(Array.isArray(e)){const n=e.length;for(let i=0;i0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/"+i&&(0!==n.instancePath.indexOf(t+"/"+i)||"/"!==n.instancePath[t+"/"+i.length])||0!==n.schemaPath.indexOf("#/items/allOf/0/then")||"/"!==n.schemaPath[20]||(e.push(n),n.emUsed=!0);if(e.length){const n={instancePath:t+"/"+i,schemaPath:"#/items/allOf/0/then/errorMessage",keyword:"errorMessage",params:{errors:e},message:'must provide choices=[] with "Dropdown" type'};null===o?o=[n]:o.push(n),s++}const n=[];for(const e of o)e.emUsed||n.push(e);o=n,s=n.length}y=a=e===s}if(!y){const e={instancePath:t+"/"+i,schemaPath:"#/items/allOf/0/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const b=s;let x=!0;const w=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.id||void 0===n.condition){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.condition){let e=n.condition;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.property){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.property&&!J2(e.property,Y2.properties.property.const)){const e={};null===o?o=[e]:o.push(e),s++}}var l=w===s;if(s=b,null!==o&&(b?o.length=b:o=null),l){const e=s,r=s,a=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.condition){const e={};null===o?o=[e]:o.push(e),s++}if(a===s){const e={instancePath:t+"/"+i,schemaPath:"#/items/allOf/1/allOf/0/then/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=r,null!==o&&(r?o.length=r:o=null);if(s>0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/"+i&&(0!==n.instancePath.indexOf(t+"/"+i)||"/"!==n.instancePath[t+"/"+i.length])||0!==n.schemaPath.indexOf("#/items/allOf/1/allOf/0/then")||"/"!==n.schemaPath[28]||(e.push(n),n.emUsed=!0);if(e.length){const n={instancePath:t+"/"+i,schemaPath:"#/items/allOf/1/allOf/0/then/errorMessage",keyword:"errorMessage",params:{errors:e},message:"Invalid condition.property, must be different than property.id"};null===o?o=[n]:o.push(n),s++}const n=[];for(const e of o)e.emUsed||n.push(e);o=n,s=n.length}x=l=e===s}if(!x){const e={instancePath:t+"/"+i,schemaPath:"#/items/allOf/1/allOf/0/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0!==n.id&&"string"!=typeof n.id){const e={instancePath:t+"/"+i+"/id",schemaPath:"#/items/allOf/1/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.condition){let e=n.condition;if(!e||"object"!=typeof e||Array.isArray(e)){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/items/allOf/1/properties/condition/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}const r=s;let a=!1,l=null;const d=s,h=s;let f=!1,m=null;const g=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.equals){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/0/required",keyword:"required",params:{missingProperty:"equals"},message:"must have required property 'equals'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.equals){let n=e.equals;if("string"!=typeof n&&"number"!=typeof n&&"boolean"!=typeof n){const e={instancePath:t+"/"+i+"/condition/equals",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/0/properties/equals/type",keyword:"type",params:{type:Z2.oneOf[0].properties.equals.type},message:"must be string,number,boolean"};null===o?o=[e]:o.push(e),s++}}}(c=g===s)&&(f=!0,m=0);const y=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.oneOf){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/required",keyword:"required",params:{missingProperty:"oneOf"},message:"must have required property 'oneOf'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.oneOf){let n=e.oneOf;if(Array.isArray(n)){const e=n.length;for(let r=0;r0){const e={required:{property:[]}},n={required:{}};let r,a;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/"+i+"/condition"&&n.keyword in e&&0===n.schemaPath.indexOf("#/definitions/properties/allOf/0/items/allOf/1/definitions/condition")&&/^\/[^\/]*$/.test(n.schemaPath.slice(68))&&(r=X2[n.keyword],a=e[n.keyword][n.params[r]],a&&(a.push(n),n.emUsed=!0));for(const r in e)for(const l in e[r])if(a=e[r][l],a.length){const e=n[r]&&n[r][l],c={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/errorMessage",keyword:"errorMessage",params:{errors:a},message:e?e():Z2.errorMessage[r][l]};null===o?o=[c]:o.push(c),s++}const l=[];for(const e of o)e.emUsed||l.push(e);o=l,s=l.length}(u=d===s)&&(a=!0,l=0);const v=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.allMatch){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/items/allOf/1/properties/condition/oneOf/1/required",keyword:"required",params:{missingProperty:"allMatch"},message:"must have required property 'allMatch'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.allMatch){let n=e.allMatch;if(Array.isArray(n)){if(n.length<1){const e={instancePath:t+"/"+i+"/condition/allMatch",schemaPath:"#/items/allOf/1/properties/condition/oneOf/1/properties/allMatch/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};null===o?o=[e]:o.push(e),s++}const e=n.length;for(let r=0;r0){const e={required:{property:[]}},n={required:{}};let a,l;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/"+i+"/condition/allMatch/"+r&&n.keyword in e&&0===n.schemaPath.indexOf("#/definitions/properties/allOf/0/items/allOf/1/definitions/condition")&&/^\/[^\/]*$/.test(n.schemaPath.slice(68))&&(a=X2[n.keyword],l=e[n.keyword][n.params[a]],l&&(l.push(n),n.emUsed=!0));for(const a in e)for(const c in e[a])if(l=e[a][c],l.length){const e=n[a]&&n[a][c],p={instancePath:t+"/"+i+"/condition/allMatch/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/errorMessage",keyword:"errorMessage",params:{errors:l},message:e?e():Z2.errorMessage[a][c]};null===o?o=[p]:o.push(p),s++}const c=[];for(const e of o)e.emUsed||c.push(e);o=c,s=c.length}}}else{const e={instancePath:t+"/"+i+"/condition/allMatch",schemaPath:"#/items/allOf/1/properties/condition/oneOf/1/properties/allMatch/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}var u;if((u=v===s)&&a?(a=!1,l=[l,1]):u&&(a=!0,l=1),a)s=r,null!==o&&(r?o.length=r:o=null);else{const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/items/allOf/1/properties/condition/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}}}const _=s;let E=!0;const O=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.type){const e=s,t=s;if("Number"!==n.type){const e={};null===o?o=[e]:o.push(e),s++}if(t===s){const e={};null===o?o=[e]:o.push(e),s++}else s=e,null!==o&&(e?o.length=e:o=null)}var d=O===s;if(s=_,null!==o&&(_?o.length=_:o=null),d){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.value){let e=n.value;if("string"!=typeof e&&"boolean"!=typeof e){const e={instancePath:t+"/"+i+"/value",schemaPath:"#/items/allOf/2/then/properties/value/type",keyword:"type",params:{type:n3.items.allOf[2].then.properties.value.type},message:"must be string,boolean"};null===o?o=[e]:o.push(e),s++}}E=d=e===s}if(!E){const e={instancePath:t+"/"+i,schemaPath:"#/items/allOf/2/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const P=s;let k=!0;const S=s,C=s;let T=!1;const A=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.type){let e=n.type;if("String"!==e&&"Text"!==e){const e={};null===o?o=[e]:o.push(e),s++}}(h=A===s)&&(T=!0);const M=s,D=s,R=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.type){const e={};null===o?o=[e]:o.push(e),s++}var h;if(R===s){const e={};null===o?o=[e]:o.push(e),s++}else s=D,null!==o&&(D?o.length=D:o=null);if((h=M===s)&&T?T=!1:h&&(T=!0),T)s=C,null!==o&&(C?o.length=C:o=null);else{const e={};null===o?o=[e]:o.push(e),s++}var f=S===s;let N;if(s=P,null!==o&&(P?o.length=P:o=null),f){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.placeholder&&"string"!=typeof n.placeholder){const e={instancePath:t+"/"+i+"/placeholder",schemaPath:"#/items/allOf/3/then/properties/placeholder/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}k=f=e===s,N="then"}else{const e=s,r=s,a=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.placeholder){const e={};null===o?o=[e]:o.push(e),s++}if(a===s){const e={instancePath:t+"/"+i,schemaPath:"#/items/allOf/3/else/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=r,null!==o&&(r?o.length=r:o=null);k=f=e===s,N="else"}if(!k){const e={instancePath:t+"/"+i,schemaPath:"#/items/allOf/3/if",keyword:"if",params:{failingKeyword:N},message:'must match "'+N+'" schema'};null===o?o=[e]:o.push(e),s++}if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0!==n.value){let e=n.value;if("string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e){const e={instancePath:t+"/"+i+"/value",schemaPath:"#/items/properties/value/type",keyword:"type",params:{type:n3.items.properties.value.type},message:"must be string,number,boolean"};null===o?o=[e]:o.push(e),s++}}if(void 0!==n.description&&"string"!=typeof n.description){const e={instancePath:t+"/"+i+"/description",schemaPath:"#/items/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.label&&"string"!=typeof n.label){const e={instancePath:t+"/"+i+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.type&&"string"!=typeof n.type){const e={instancePath:t+"/"+i+"/type",schemaPath:"#/items/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.editable&&"boolean"!=typeof n.editable){const e={instancePath:t+"/"+i+"/editable",schemaPath:"#/items/properties/editable/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.choices){let e=n.choices;if(Array.isArray(e)){const n=e.length;for(let a=0;a0){const e={required:[]},n={};for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/"+i+"/choices/"+a&&n.keyword in e&&0===n.schemaPath.indexOf("#/items/properties/choices/items")&&/^\/[^\/]*$/.test(n.schemaPath.slice(32))&&(e[n.keyword].push(n),n.emUsed=!0);for(const r in e)if(e[r].length){const l={instancePath:t+"/"+i+"/choices/"+a,schemaPath:"#/items/properties/choices/items/errorMessage",keyword:"errorMessage",params:{errors:e[r]},message:r in n?n[r]():n3.items.properties.choices.items.errorMessage[r]};null===o?o=[l]:o.push(l),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}}}else{const e={instancePath:t+"/"+i+"/choices",schemaPath:"#/items/properties/choices/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}if(void 0!==n.constraints){let e=n.constraints;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.notEmpty&&"boolean"!=typeof e.notEmpty){const e={instancePath:t+"/"+i+"/constraints/notEmpty",schemaPath:"#/items/properties/constraints/properties/notEmpty/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.minLength&&"number"!=typeof e.minLength){const e={instancePath:t+"/"+i+"/constraints/minLength",schemaPath:"#/items/properties/constraints/properties/minLength/type",keyword:"type",params:{type:"number"},message:"must be number"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.maxLength&&"number"!=typeof e.maxLength){const e={instancePath:t+"/"+i+"/constraints/maxLength",schemaPath:"#/items/properties/constraints/properties/maxLength/type",keyword:"type",params:{type:"number"},message:"must be number"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.pattern){let n=e.pattern;const r=s;let a=!1,l=null;const c=s;if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0!==n.value&&"string"!=typeof n.value){const e={instancePath:t+"/"+i+"/constraints/pattern/value",schemaPath:"#/items/properties/constraints/properties/pattern/oneOf/0/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.message&&"string"!=typeof n.message){const e={instancePath:t+"/"+i+"/constraints/pattern/message",schemaPath:"#/items/properties/constraints/properties/pattern/oneOf/0/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/"+i+"/constraints/pattern",schemaPath:"#/items/properties/constraints/properties/pattern/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}(m=c===s)&&(a=!0,l=0);const p=s;if("string"!=typeof n){const e={instancePath:t+"/"+i+"/constraints/pattern",schemaPath:"#/items/properties/constraints/properties/pattern/oneOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}var m;if((m=p===s)&&a?(a=!1,l=[l,1]):m&&(a=!0,l=1),a)s=r,null!==o&&(r?o.length=r:o=null);else{const e={instancePath:t+"/"+i+"/constraints/pattern",schemaPath:"#/items/properties/constraints/properties/pattern/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t+"/"+i+"/constraints",schemaPath:"#/items/properties/constraints/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}}if(void 0!==n.group&&"string"!=typeof n.group){const e={instancePath:t+"/"+i+"/group",schemaPath:"#/items/properties/group/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/"+i,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}return i3.errors=o,0===s}function r3(e,{instancePath:t="",parentData:n,parentDataProperty:i,rootData:r=e}={}){let o=null,s=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.name){const e={instancePath:t,schemaPath:"#/allOf/0/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===o?o=[e]:o.push(e),s++}if(void 0===e.id){const e={instancePath:t,schemaPath:"#/allOf/0/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===o?o=[e]:o.push(e),s++}if(void 0===e.appliesTo){const e={instancePath:t,schemaPath:"#/allOf/0/required",keyword:"required",params:{missingProperty:"appliesTo"},message:"must have required property 'appliesTo'"};null===o?o=[e]:o.push(e),s++}if(void 0===e.properties){const e={instancePath:t,schemaPath:"#/allOf/0/required",keyword:"required",params:{missingProperty:"properties"},message:"must have required property 'properties'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/allOf/0/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.id&&"string"!=typeof e.id){const e={instancePath:t+"/id",schemaPath:"#/allOf/0/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/allOf/0/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.version){let n=e.version;if("number"!=typeof n||n%1||isNaN(n)){const e={instancePath:t+"/version",schemaPath:"#/allOf/0/properties/version/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),s++}}if(void 0!==e.isDefault&&"boolean"!=typeof e.isDefault){const e={instancePath:t+"/isDefault",schemaPath:"#/allOf/0/properties/isDefault/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.deprecated){let n=e.deprecated;if("boolean"!=typeof n&&(!n||"object"!=typeof n||Array.isArray(n))){const e={instancePath:t+"/deprecated",schemaPath:"#/allOf/0/properties/deprecated/type",keyword:"type",params:{type:U2.allOf[0].properties.deprecated.type},message:"must be boolean,object"};null===o?o=[e]:o.push(e),s++}if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0!==n.message&&"string"!=typeof n.message){const e={instancePath:t+"/deprecated/message",schemaPath:"#/allOf/0/properties/deprecated/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.documentationRef){let e=n.documentationRef;if("string"==typeof e){if(!G2.test(e)){const e={instancePath:t+"/deprecated/documentationRef",schemaPath:"#/allOf/0/properties/deprecated/properties/documentationRef/pattern",keyword:"pattern",params:{pattern:"^(https|http)://.*"},message:'must match pattern "^(https|http)://.*"'};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/deprecated/documentationRef",schemaPath:"#/allOf/0/properties/deprecated/properties/documentationRef/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}}}}if(void 0!==e.appliesTo){let n=e.appliesTo;if(Array.isArray(n)){const e=n.length;for(let i=0;i0){const e={pattern:[]},n={};for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/appliesTo/"+i&&n.keyword in e&&0===n.schemaPath.indexOf("#/allOf/0/properties/appliesTo/items")&&/^\/[^\/]*$/.test(n.schemaPath.slice(36))&&(e[n.keyword].push(n),n.emUsed=!0);for(const r in e)if(e[r].length){const a={instancePath:t+"/appliesTo/"+i,schemaPath:"#/allOf/0/properties/appliesTo/items/errorMessage",keyword:"errorMessage",params:{errors:e[r]},message:r in n?n[r]():U2.allOf[0].properties.appliesTo.items.errorMessage[r]};null===o?o=[a]:o.push(a),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}}}else{const e={instancePath:t+"/appliesTo",schemaPath:"#/allOf/0/properties/appliesTo/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}if(void 0!==e.elementType){let n=e.elementType;if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.value){const e={instancePath:t+"/elementType",schemaPath:"#/allOf/0/properties/elementType/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.value){let e=n.value;if("string"==typeof e){if(!Q2.test(e)){const e={instancePath:t+"/elementType/value",schemaPath:"#/allOf/0/properties/elementType/properties/value/pattern",keyword:"pattern",params:{pattern:"^[\\w\\d]+:[\\w\\d]+$"},message:'must match pattern "^[\\w\\d]+:[\\w\\d]+$"'};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/elementType/value",schemaPath:"#/allOf/0/properties/elementType/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(s>0){const e={pattern:[]},n={};for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/elementType/value"&&n.keyword in e&&0===n.schemaPath.indexOf("#/allOf/0/properties/elementType/properties/value")&&/^\/[^\/]*$/.test(n.schemaPath.slice(49))&&(e[n.keyword].push(n),n.emUsed=!0);for(const i in e)if(e[i].length){const r={instancePath:t+"/elementType/value",schemaPath:"#/allOf/0/properties/elementType/properties/value/errorMessage",keyword:"errorMessage",params:{errors:e[i]},message:i in n?n[i]():U2.allOf[0].properties.elementType.properties.value.errorMessage[i]};null===o?o=[r]:o.push(r),s++}const i=[];for(const e of o)e.emUsed||i.push(e);o=i,s=i.length}}}else{const e={instancePath:t+"/elementType",schemaPath:"#/allOf/0/properties/elementType/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){const e={required:{value:[]}},n={required:{}};let i,r;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/elementType"&&n.keyword in e&&0===n.schemaPath.indexOf("#/allOf/0/properties/elementType")&&/^\/[^\/]*$/.test(n.schemaPath.slice(32))&&(i=X2[n.keyword],r=e[n.keyword][n.params[i]],r&&(r.push(n),n.emUsed=!0));for(const i in e)for(const a in e[i])if(r=e[i][a],r.length){const e=n[i]&&n[i][a],l={instancePath:t+"/elementType",schemaPath:"#/allOf/0/properties/elementType/errorMessage",keyword:"errorMessage",params:{errors:r},message:e?e():U2.allOf[0].properties.elementType.errorMessage[i][a]};null===o?o=[l]:o.push(l),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}}if(void 0!==e.metadata){let n=e.metadata;if(!n||"object"!=typeof n||Array.isArray(n)){const e={instancePath:t+"/metadata",schemaPath:"#/allOf/0/properties/metadata/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}}if(void 0!==e.entriesVisible&&"boolean"!=typeof e.entriesVisible){const e={instancePath:t+"/entriesVisible",schemaPath:"#/allOf/0/properties/entriesVisible/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.groups){let n=e.groups;if(Array.isArray(n)){const e=n.length;for(let i=0;i0){const e={required:{id:[],label:[]}},n={required:{id:function(){return'missing id for group "'+JSON.stringify(i)+'"'},label:function(){return'missing label for group "'+JSON.stringify(i)+'"'}}};let r,a;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/groups/"+i&&n.keyword in e&&0===n.schemaPath.indexOf("#/allOf/0/properties/groups/items")&&/^\/[^\/]*$/.test(n.schemaPath.slice(33))&&(r=X2[n.keyword],a=e[n.keyword][n.params[r]],a&&(a.push(n),n.emUsed=!0));for(const r in e)for(const l in e[r])if(a=e[r][l],a.length){const e=n[r]&&n[r][l],c={instancePath:t+"/groups/"+i,schemaPath:"#/allOf/0/properties/groups/items/errorMessage",keyword:"errorMessage",params:{errors:a},message:e?e():U2.allOf[0].properties.groups.items.errorMessage[r][l]};null===o?o=[c]:o.push(c),s++}const l=[];for(const e of o)e.emUsed||l.push(e);o=l,s=l.length}}}else{const e={instancePath:t+"/groups",schemaPath:"#/allOf/0/properties/groups/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}if(void 0!==e.documentationRef){let n=e.documentationRef;if("string"==typeof n){if(!G2.test(n)){const e={instancePath:t+"/documentationRef",schemaPath:"#/allOf/0/properties/documentationRef/pattern",keyword:"pattern",params:{pattern:"^(https|http)://.*"},message:'must match pattern "^(https|http)://.*"'};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/documentationRef",schemaPath:"#/allOf/0/properties/documentationRef/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(s>0){const e={pattern:[]},n={};for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/documentationRef"&&n.keyword in e&&0===n.schemaPath.indexOf("#/allOf/0/properties/documentationRef")&&/^\/[^\/]*$/.test(n.schemaPath.slice(37))&&(e[n.keyword].push(n),n.emUsed=!0);for(const i in e)if(e[i].length){const r={instancePath:t+"/documentationRef",schemaPath:"#/allOf/0/properties/documentationRef/errorMessage",keyword:"errorMessage",params:{errors:e[i]},message:i in n?n[i]():U2.allOf[0].properties.documentationRef.errorMessage[i]};null===o?o=[r]:o.push(r),s++}const i=[];for(const e of o)e.emUsed||i.push(e);o=i,s=i.length}}}if(s>0){const e={required:{name:[],id:[],appliesTo:[],properties:[]}},n={required:{}};let i,r;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t&&n.keyword in e&&0===n.schemaPath.indexOf("#/allOf/0")&&/^\/[^\/]*$/.test(n.schemaPath.slice(9))&&(i=X2[n.keyword],r=e[n.keyword][n.params[i]],r&&(r.push(n),n.emUsed=!0));for(const i in e)for(const a in e[i])if(r=e[i][a],r.length){const e=n[i]&&n[i][a],l={instancePath:t,schemaPath:"#/allOf/0/errorMessage",keyword:"errorMessage",params:{errors:r},message:e?e():U2.allOf[0].errorMessage[i][a]};null===o?o=[l]:o.push(l),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.properties&&(t3(e.properties,{instancePath:t+"/properties",parentData:e,parentDataProperty:"properties",rootData:r})||(o=null===o?t3.errors:o.concat(t3.errors),s=o.length)),void 0!==e.scopes){let n=e.scopes;if(Array.isArray(n)){const e=n.length;for(let i=0;i0){const n=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/scopes/"+i&&(0!==e.instancePath.indexOf(t+"/scopes/"+i)||"/"!==e.instancePath[t+"/scopes/"+i.length])||0!==e.schemaPath.indexOf("#/properties/scopes/items/allOf/0/then")||"/"!==e.schemaPath[38]||(n.push(e),e.emUsed=!0);if(n.length){const r={instancePath:t+"/scopes/"+i,schemaPath:"#/properties/scopes/items/allOf/0/then/errorMessage",keyword:"errorMessage",params:{errors:n},message:"invalid scope "+JSON.stringify(e&&e.type)+", missing id"};null===o?o=[r]:o.push(r),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}O=a=n===s}if(!O){const e={instancePath:t+"/scopes/"+i,schemaPath:"#/properties/scopes/items/allOf/0/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type){const e={instancePath:t+"/scopes/"+i,schemaPath:"#/properties/scopes/items/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===o?o=[e]:o.push(e),s++}if(void 0===e.properties){const e={instancePath:t+"/scopes/"+i,schemaPath:"#/properties/scopes/items/required",keyword:"required",params:{missingProperty:"properties"},message:"must have required property 'properties'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.type){let n=e.type;if("string"!=typeof n){const e={instancePath:t+"/scopes/"+i+"/type",schemaPath:"#/properties/scopes/items/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if("camunda:Connector"!==n&&"bpmn:Error"!==n){const e={instancePath:t+"/scopes/"+i+"/type",schemaPath:"#/properties/scopes/items/properties/type/enum",keyword:"enum",params:{allowedValues:U2.properties.scopes.items.properties.type.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}if(s>0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/scopes/"+i+"/type"&&(0!==n.instancePath.indexOf(t+"/scopes/"+i+"/type")||"/"!==n.instancePath[t+"/scopes/"+i+5])||0!==n.schemaPath.indexOf("#/properties/scopes/items/properties/type")||"/"!==n.schemaPath[41]||(e.push(n),n.emUsed=!0);if(e.length){const r={instancePath:t+"/scopes/"+i+"/type",schemaPath:"#/properties/scopes/items/properties/type/errorMessage",keyword:"errorMessage",params:{errors:e},message:"invalid scope type "+JSON.stringify(n)+"; must be any of { camunda:Connector, bpmn:Error }"};null===o?o=[r]:o.push(r),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}}if(void 0!==e.properties){let n=e.properties;if(i3(n,{instancePath:t+"/scopes/"+i+"/properties",parentData:e,parentDataProperty:"properties",rootData:r})||(o=null===o?i3.errors:o.concat(i3.errors),s=o.length),Array.isArray(n)){const e=n.length;for(let r=0;r0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/scopes/"+i+"/properties/"+r+"/type"&&(0!==n.instancePath.indexOf(t+"/scopes/"+i+"/properties/"+r+"/type")||"/"!==n.instancePath[t+"/scopes/"+i+"/properties/"+r+5])||0!==n.schemaPath.indexOf("#/definitions/properties/allOf/1/items/allOf/0/then/properties/type")||"/"!==n.schemaPath[67]||(e.push(n),n.emUsed=!0);if(e.length){const a={instancePath:t+"/scopes/"+i+"/properties/"+r+"/type",schemaPath:"#/definitions/properties/allOf/1/items/allOf/0/then/properties/type/errorMessage",keyword:"errorMessage",params:{errors:e},message:"invalid property type "+JSON.stringify(n)+' for binding type "property"; must be any of { String, Text, Hidden, Dropdown, Boolean }'};null===o?o=[a]:o.push(a),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}}E=l=n===s}if(!E){const e={instancePath:t+"/scopes/"+i+"/properties/"+r,schemaPath:"#/definitions/properties/allOf/1/items/allOf/0/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const P=s;let k=!0;const S=s;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.binding){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.binding){let t=e.binding;if(t&&"object"==typeof t&&!Array.isArray(t))if(void 0===t.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==t.type&&"camunda:executionListener"!==t.type){const e={};null===o?o=[e]:o.push(e),s++}}var c=S===s;if(s=P,null!==o&&(P?o.length=P:o=null),c){const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.type){if("Hidden"!==e.type){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/type",schemaPath:"#/definitions/properties/allOf/1/items/allOf/1/then/properties/type/enum",keyword:"enum",params:{allowedValues:W2.items.allOf[1].then.properties.type.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}if(s>0){const n=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/scopes/"+i+"/properties/"+r+"/type"&&(0!==e.instancePath.indexOf(t+"/scopes/"+i+"/properties/"+r+"/type")||"/"!==e.instancePath[t+"/scopes/"+i+"/properties/"+r+5])||0!==e.schemaPath.indexOf("#/definitions/properties/allOf/1/items/allOf/1/then/properties/type")||"/"!==e.schemaPath[67]||(n.push(e),e.emUsed=!0);if(n.length){const a={instancePath:t+"/scopes/"+i+"/properties/"+r+"/type",schemaPath:"#/definitions/properties/allOf/1/items/allOf/1/then/properties/type/errorMessage",keyword:"errorMessage",params:{errors:n},message:"invalid property type "+JSON.stringify(e&&e.type)+' for binding type "camunda:executionListener"; must be "Hidden"'};null===o?o=[a]:o.push(a),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}}if(void 0!==e.binding){let n=e.binding;const a=s;let l=!1,c=null;const u=s,d=s,h=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.implementationType&&"script"!==n.implementationType){const e={};null===o?o=[e]:o.push(e),s++}if(h===s){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/allOf/1/then/properties/binding/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=d,null!==o&&(d?o.length=d:o=null);(p=u===s)&&(l=!0,c=0);const f=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.scriptFormat){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/allOf/1/then/properties/binding/oneOf/1/required",keyword:"required",params:{missingProperty:"scriptFormat"},message:"must have required property 'scriptFormat'"};null===o?o=[e]:o.push(e),s++}if((p=f===s)&&l)l=!1,c=[c,1];else{p&&(l=!0,c=1);const e=s,a=s,u=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.implementationType){const e={};null===o?o=[e]:o.push(e),s++}if(u===s){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/allOf/1/then/properties/binding/oneOf/2/allOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=a,null!==o&&(a?o.length=a:o=null);const d=s,h=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.scriptFormat){const e={};null===o?o=[e]:o.push(e),s++}var p;if(h===s){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/allOf/1/then/properties/binding/oneOf/2/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=d,null!==o&&(d?o.length=d:o=null);(p=e===s)&&l?(l=!1,c=[c,2]):p&&(l=!0,c=2)}if(l)s=a,null!==o&&(a?o.length=a:o=null);else{const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/allOf/1/then/properties/binding/oneOf",keyword:"oneOf",params:{passingSchemas:c},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.implementationType){let e=n.implementationType;if("class"!==e&&"delegateExpression"!==e&&"expression"!==e&&"script"!==e){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding/implementationType",schemaPath:"#/definitions/properties/allOf/1/items/allOf/1/then/properties/binding/properties/implementationType/enum",keyword:"enum",params:{allowedValues:W2.items.allOf[1].then.properties.binding.properties.implementationType.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}}}}k=c=n===s}if(!k){const e={instancePath:t+"/scopes/"+i+"/properties/"+r,schemaPath:"#/definitions/properties/allOf/1/items/allOf/1/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const C=s;let T=!0;const A=s;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.binding){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.binding){let t=e.binding;if(t&&"object"==typeof t&&!Array.isArray(t))if(void 0===t.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==t.type){let e=t.type;if("camunda:property"!==e&&"camunda:outputParameter"!==e&&"camunda:in"!==e&&"camunda:in:businessKey"!==e&&"camunda:out"!==e&&"camunda:errorEventDefinition"!==e){const e={};null===o?o=[e]:o.push(e),s++}}}var u=A===s;if(s=C,null!==o&&(C?o.length=C:o=null),u){const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0!==e.type){let n=e.type;if("String"!==n&&"Hidden"!==n&&"Dropdown"!==n){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/type",schemaPath:"#/definitions/properties/allOf/1/items/allOf/2/then/properties/type/enum",keyword:"enum",params:{allowedValues:W2.items.allOf[2].then.properties.type.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}if(s>0){const a=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/scopes/"+i+"/properties/"+r+"/type"&&(0!==e.instancePath.indexOf(t+"/scopes/"+i+"/properties/"+r+"/type")||"/"!==e.instancePath[t+"/scopes/"+i+"/properties/"+r+5])||0!==e.schemaPath.indexOf("#/definitions/properties/allOf/1/items/allOf/2/then/properties/type")||"/"!==e.schemaPath[67]||(a.push(e),e.emUsed=!0);if(a.length){const l={instancePath:t+"/scopes/"+i+"/properties/"+r+"/type",schemaPath:"#/definitions/properties/allOf/1/items/allOf/2/then/properties/type/errorMessage",keyword:"errorMessage",params:{errors:a},message:"invalid property type "+JSON.stringify(n)+" for binding type "+JSON.stringify(e&&e.binding&&e.binding.type)+"; must be any of { String, Hidden, Dropdown }"};null===o?o=[l]:o.push(l),s++}const l=[];for(const e of o)e.emUsed||l.push(e);o=l,s=l.length}}T=u=n===s}if(!T){const e={instancePath:t+"/scopes/"+i+"/properties/"+r,schemaPath:"#/definitions/properties/allOf/1/items/allOf/2/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const M=s;let D=!0;const R=s;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.binding){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.binding){let t=e.binding;if(t&&"object"==typeof t&&!Array.isArray(t))if(void 0===t.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==t.type){let e=t.type;if("camunda:inputParameter"!==e&&"camunda:field"!==e){const e={};null===o?o=[e]:o.push(e),s++}}}var d=R===s;if(s=M,null!==o&&(M?o.length=M:o=null),d){const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0!==e.type){let n=e.type;if("String"!==n&&"Text"!==n&&"Hidden"!==n&&"Dropdown"!==n){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/type",schemaPath:"#/definitions/properties/allOf/1/items/allOf/3/then/properties/type/enum",keyword:"enum",params:{allowedValues:W2.items.allOf[3].then.properties.type.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}if(s>0){const a=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/scopes/"+i+"/properties/"+r+"/type"&&(0!==e.instancePath.indexOf(t+"/scopes/"+i+"/properties/"+r+"/type")||"/"!==e.instancePath[t+"/scopes/"+i+"/properties/"+r+5])||0!==e.schemaPath.indexOf("#/definitions/properties/allOf/1/items/allOf/3/then/properties/type")||"/"!==e.schemaPath[67]||(a.push(e),e.emUsed=!0);if(a.length){const l={instancePath:t+"/scopes/"+i+"/properties/"+r+"/type",schemaPath:"#/definitions/properties/allOf/1/items/allOf/3/then/properties/type/errorMessage",keyword:"errorMessage",params:{errors:a},message:"invalid property type "+JSON.stringify(n)+" for binding type "+JSON.stringify(e&&e.binding&&e.binding.type)+"; must be any of { String, Text, Hidden, Dropdown }"};null===o?o=[l]:o.push(l),s++}const l=[];for(const e of o)e.emUsed||l.push(e);o=l,s=l.length}}D=d=n===s}if(!D){const e={instancePath:t+"/scopes/"+i+"/properties/"+r,schemaPath:"#/definitions/properties/allOf/1/items/allOf/3/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.binding){const e={instancePath:t+"/scopes/"+i+"/properties/"+r,schemaPath:"#/definitions/properties/allOf/1/items/required",keyword:"required",params:{missingProperty:"binding"},message:"must have required property 'binding'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.binding){let n=e.binding;const a=s;let l=!0;const c=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.type){let e=n.type;if("property"!==e&&"camunda:property"!==e&&"camunda:inputParameter"!==e&&"camunda:field"!==e){const e={};null===o?o=[e]:o.push(e),s++}}var h=c===s;if(s=a,null!==o&&(a?o.length=a:o=null),h){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.name){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/0/then/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===o?o=[e]:o.push(e),s++}if(s>0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/scopes/"+i+"/properties/"+r+"/binding"&&(0!==n.instancePath.indexOf(t+"/scopes/"+i+"/properties/"+r+"/binding")||"/"!==n.instancePath[t+"/scopes/"+i+"/properties/"+r+8])||0!==n.schemaPath.indexOf("#/definitions/properties/allOf/1/items/properties/binding/allOf/0/then")||"/"!==n.schemaPath[70]||(e.push(n),n.emUsed=!0);if(e.length){const a={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/0/then/errorMessage",keyword:"errorMessage",params:{errors:e},message:"property.binding "+JSON.stringify(n&&n.type)+" requires name"};null===o?o=[a]:o.push(a),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}l=h=e===s}if(!l){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/0/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const p=s;let u=!0;const d=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.type&&"camunda:outputParameter"!==n.type){const e={};null===o?o=[e]:o.push(e),s++}var f=d===s;if(s=p,null!==o&&(p?o.length=p:o=null),f){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.source){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/1/then/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};null===o?o=[e]:o.push(e),s++}if(s>0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/scopes/"+i+"/properties/"+r+"/binding"&&(0!==n.instancePath.indexOf(t+"/scopes/"+i+"/properties/"+r+"/binding")||"/"!==n.instancePath[t+"/scopes/"+i+"/properties/"+r+8])||0!==n.schemaPath.indexOf("#/definitions/properties/allOf/1/items/properties/binding/allOf/1/then")||"/"!==n.schemaPath[70]||(e.push(n),n.emUsed=!0);if(e.length){const a={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/1/then/errorMessage",keyword:"errorMessage",params:{errors:e},message:"property.binding "+JSON.stringify(n&&n.type)+" requires source"};null===o?o=[a]:o.push(a),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}u=f=e===s}if(!u){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/1/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const E=s;let O=!0;const P=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.type&&"camunda:in"!==n.type){const e={};null===o?o=[e]:o.push(e),s++}var m=P===s;if(s=E,null!==o&&(E?o.length=E:o=null),m){const e=s,a=s;let l=!1;const c=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.variables){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/2/then/anyOf/0/required",keyword:"required",params:{missingProperty:"variables"},message:"must have required property 'variables'"};null===o?o=[e]:o.push(e),s++}var g=c===s;if(l=l||g,!l){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.target){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/2/then/anyOf/1/required",keyword:"required",params:{missingProperty:"target"},message:"must have required property 'target'"};null===o?o=[e]:o.push(e),s++}g=e===s;l=l||g}if(l)s=a,null!==o&&(a?o.length=a:o=null);else{const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/2/then/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===o?o=[e]:o.push(e),s++}if(s>0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/scopes/"+i+"/properties/"+r+"/binding"&&(0!==n.instancePath.indexOf(t+"/scopes/"+i+"/properties/"+r+"/binding")||"/"!==n.instancePath[t+"/scopes/"+i+"/properties/"+r+8])||0!==n.schemaPath.indexOf("#/definitions/properties/allOf/1/items/properties/binding/allOf/2/then")||"/"!==n.schemaPath[70]||(e.push(n),n.emUsed=!0);if(e.length){const a={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/2/then/errorMessage",keyword:"errorMessage",params:{errors:e},message:"property.binding "+JSON.stringify(n&&n.type)+" requires variables, target, or both"};null===o?o=[a]:o.push(a),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}O=m=e===s}if(!O){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/2/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const k=s;let S=!0;const C=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.type&&"camunda:out"!==n.type){const e={};null===o?o=[e]:o.push(e),s++}var y=C===s;if(s=k,null!==o&&(k?o.length=k:o=null),y){const e=s,a=s;let l=!1,c=null;const p=s,u=s,d=s,h=s;let f=!1;const m=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.source){const e={};null===o?o=[e]:o.push(e),s++}var v=m===s;if(f=f||v,!f){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.sourceExpression){const e={};null===o?o=[e]:o.push(e),s++}v=e===s;f=f||v}if(f)s=h,null!==o&&(h?o.length=h:o=null);else{const e={};null===o?o=[e]:o.push(e),s++}if(d===s){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/3/then/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=u,null!==o&&(u?o.length=u:o=null);if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.variables){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/3/then/oneOf/0/required",keyword:"required",params:{missingProperty:"variables"},message:"must have required property 'variables'"};null===o?o=[e]:o.push(e),s++}(w=p===s)&&(l=!0,c=0);const g=s,_=s,E=s,O=s;let P=!1;const k=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.variables){const e={};null===o?o=[e]:o.push(e),s++}var b=k===s;if(P=P||b,!P){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.sourceExpression){const e={};null===o?o=[e]:o.push(e),s++}b=e===s;P=P||b}if(P)s=O,null!==o&&(O?o.length=O:o=null);else{const e={};null===o?o=[e]:o.push(e),s++}if(E===s){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/3/then/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=_,null!==o&&(_?o.length=_:o=null);if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.source){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/3/then/oneOf/1/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};null===o?o=[e]:o.push(e),s++}if((w=g===s)&&l)l=!1,c=[c,1];else{w&&(l=!0,c=1);const e=s,a=s,p=s,u=s;let d=!1;const h=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.variables){const e={};null===o?o=[e]:o.push(e),s++}var x=h===s;if(d=d||x,!d){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.source){const e={};null===o?o=[e]:o.push(e),s++}x=e===s;d=d||x}if(d)s=u,null!==o&&(u?o.length=u:o=null);else{const e={};null===o?o=[e]:o.push(e),s++}if(p===s){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/3/then/oneOf/2/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=a,null!==o&&(a?o.length=a:o=null);if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.sourceExpression){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/3/then/oneOf/2/required",keyword:"required",params:{missingProperty:"sourceExpression"},message:"must have required property 'sourceExpression'"};null===o?o=[e]:o.push(e),s++}if((w=e===s)&&l)l=!1,c=[c,2];else{w&&(l=!0,c=2);const e=s,a=s,p=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.source){const e={};null===o?o=[e]:o.push(e),s++}if(p===s){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/3/then/oneOf/3/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=a,null!==o&&(a?o.length=a:o=null);if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.variables){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/3/then/oneOf/3/required",keyword:"required",params:{missingProperty:"variables"},message:"must have required property 'variables'"};null===o?o=[e]:o.push(e),s++}if(void 0===n.sourceExpression){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/3/then/oneOf/3/required",keyword:"required",params:{missingProperty:"sourceExpression"},message:"must have required property 'sourceExpression'"};null===o?o=[e]:o.push(e),s++}}if((w=e===s)&&l)l=!1,c=[c,3];else{w&&(l=!0,c=3);const e=s,a=s,p=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.sourceExpression){const e={};null===o?o=[e]:o.push(e),s++}var w;if(p===s){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/3/then/oneOf/4/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=a,null!==o&&(a?o.length=a:o=null);if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.variables){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/3/then/oneOf/4/required",keyword:"required",params:{missingProperty:"variables"},message:"must have required property 'variables'"};null===o?o=[e]:o.push(e),s++}if(void 0===n.source){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/3/then/oneOf/4/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};null===o?o=[e]:o.push(e),s++}}(w=e===s)&&l?(l=!1,c=[c,4]):w&&(l=!0,c=4)}}}if(l)s=a,null!==o&&(a?o.length=a:o=null);else{const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/3/then/oneOf",keyword:"oneOf",params:{passingSchemas:c},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}if(s>0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/scopes/"+i+"/properties/"+r+"/binding"&&(0!==n.instancePath.indexOf(t+"/scopes/"+i+"/properties/"+r+"/binding")||"/"!==n.instancePath[t+"/scopes/"+i+"/properties/"+r+8])||0!==n.schemaPath.indexOf("#/definitions/properties/allOf/1/items/properties/binding/allOf/3/then")||"/"!==n.schemaPath[70]||(e.push(n),n.emUsed=!0);if(e.length){const a={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/3/then/errorMessage",keyword:"errorMessage",params:{errors:e},message:"property.binding "+JSON.stringify(n&&n.type)+" requires one of the following: variables, sourceExpression, source, (sourceExpression and variables), or (source and variables)"};null===o?o=[a]:o.push(a),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}S=y=e===s}if(!S){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/3/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const T=s;let A=!0;const M=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.type&&"camunda:errorEventDefinition"!==n.type){const e={};null===o?o=[e]:o.push(e),s++}var _=M===s;if(s=T,null!==o&&(T?o.length=T:o=null),_){const e=s,a=s;let l=!1,c=null;const p=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.errorRef){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/4/then/oneOf/0/required",keyword:"required",params:{missingProperty:"errorRef"},message:"must have required property 'errorRef'"};null===o?o=[e]:o.push(e),s++}if(p===s&&(l=!0,c=0),l)s=a,null!==o&&(a?o.length=a:o=null);else{const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/4/then/oneOf",keyword:"oneOf",params:{passingSchemas:c},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}if(s>0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/scopes/"+i+"/properties/"+r+"/binding"&&(0!==n.instancePath.indexOf(t+"/scopes/"+i+"/properties/"+r+"/binding")||"/"!==n.instancePath[t+"/scopes/"+i+"/properties/"+r+8])||0!==n.schemaPath.indexOf("#/definitions/properties/allOf/1/items/properties/binding/allOf/4/then")||"/"!==n.schemaPath[70]||(e.push(n),n.emUsed=!0);if(e.length){const a={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/4/then/errorMessage",keyword:"errorMessage",params:{errors:e},message:"property.binding "+JSON.stringify(n&&n.type)+" requires errorRef"};null===o?o=[a]:o.push(a),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}A=_=e===s}if(!A){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/allOf/4/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.type){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.type){let e=n.type;if("string"!=typeof e){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding/type",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if("property"!==e&&"camunda:property"!==e&&"camunda:inputParameter"!==e&&"camunda:outputParameter"!==e&&"camunda:in"!==e&&"camunda:out"!==e&&"camunda:in:businessKey"!==e&&"camunda:executionListener"!==e&&"camunda:field"!==e&&"camunda:errorEventDefinition"!==e){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding/type",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/properties/type/enum",keyword:"enum",params:{allowedValues:W2.items.properties.binding.properties.type.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}if(s>0){const n=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/scopes/"+i+"/properties/"+r+"/binding/type"&&(0!==e.instancePath.indexOf(t+"/scopes/"+i+"/properties/"+r+"/binding/type")||"/"!==e.instancePath[t+"/scopes/"+i+"/properties/"+r+13])||0!==e.schemaPath.indexOf("#/definitions/properties/allOf/1/items/properties/binding/properties/type")||"/"!==e.schemaPath[73]||(n.push(e),e.emUsed=!0);if(n.length){const a={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding/type",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/properties/type/errorMessage",keyword:"errorMessage",params:{errors:n},message:"invalid property.binding type "+JSON.stringify(e)+"; must be any of { property, camunda:property, camunda:inputParameter, camunda:outputParameter, camunda:in, camunda:out, camunda:in:businessKey, camunda:executionListener, camunda:field, camunda:errorEventDefinition }"};null===o?o=[a]:o.push(a),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}}if(void 0!==n.name&&"string"!=typeof n.name){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding/name",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.event&&"string"!=typeof n.event){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding/event",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/properties/event/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.scriptFormat&&"string"!=typeof n.scriptFormat){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding/scriptFormat",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/properties/scriptFormat/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.source&&"string"!=typeof n.source){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding/source",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.target&&"string"!=typeof n.target){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding/target",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/properties/target/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.expression&&"boolean"!=typeof n.expression){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding/expression",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/properties/expression/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.variables){let e=n.variables;if("string"!=typeof e){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding/variables",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/properties/variables/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if("all"!==e&&"local"!==e){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding/variables",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/properties/variables/enum",keyword:"enum",params:{allowedValues:W2.items.properties.binding.properties.variables.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}}if(void 0!==n.sourceExpression&&"string"!=typeof n.sourceExpression){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding/sourceExpression",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/properties/sourceExpression/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/binding",schemaPath:"#/definitions/properties/allOf/1/items/properties/binding/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t+"/scopes/"+i+"/properties/"+r,schemaPath:"#/definitions/properties/allOf/1/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){const e={required:[]},n={required:function(){return'missing binding for property "'+JSON.stringify(r)+'"'}};for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/scopes/"+i+"/properties/"+r&&n.keyword in e&&0===n.schemaPath.indexOf("#/definitions/properties/allOf/1/items")&&/^\/[^\/]*$/.test(n.schemaPath.slice(38))&&(e[n.keyword].push(n),n.emUsed=!0);for(const a in e)if(e[a].length){const l={instancePath:t+"/scopes/"+i+"/properties/"+r,schemaPath:"#/definitions/properties/allOf/1/items/errorMessage",keyword:"errorMessage",params:{errors:e[a]},message:a in n?n[a]():W2.items.errorMessage[a]};null===o?o=[l]:o.push(l),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}}}else{const e={instancePath:t+"/scopes/"+i+"/properties",schemaPath:"#/definitions/properties/allOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t+"/scopes/"+i,schemaPath:"#/properties/scopes/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){const n={required:{type:[],properties:[]}},r={required:{properties:function(){return"invalid scope "+JSON.stringify(e&&e.type)+", missing properties=[]"}}};let a,l;for(const e of o)"errorMessage"!==e.keyword&&!e.emUsed&&e.instancePath===t+"/scopes/"+i&&e.keyword in n&&0===e.schemaPath.indexOf("#/properties/scopes/items")&&/^\/[^\/]*$/.test(e.schemaPath.slice(25))&&(a=X2[e.keyword],l=n[e.keyword][e.params[a]],l&&(l.push(e),e.emUsed=!0));for(const e in n)for(const a in n[e])if(l=n[e][a],l.length){const n=r[e]&&r[e][a],c={instancePath:t+"/scopes/"+i,schemaPath:"#/properties/scopes/items/errorMessage",keyword:"errorMessage",params:{errors:l},message:n?n():U2.properties.scopes.items.errorMessage[e][a]};null===o?o=[c]:o.push(c),s++}const c=[];for(const e of o)e.emUsed||c.push(e);o=c,s=c.length}}}else{const e={instancePath:t+"/scopes",schemaPath:"#/properties/scopes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}return r3.errors=o,0===s}function o3(e,{instancePath:t="",parentData:n,parentDataProperty:i,rootData:r=e}={}){let o=null,s=0;const a=s;let l=!1,c=null;const p=s;r3(e,{instancePath:t,parentData:n,parentDataProperty:i,rootData:r})||(o=null===o?r3.errors:o.concat(r3.errors),s=o.length),(d=p===s)&&(l=!0,c=0);const u=s;if(Array.isArray(e)){const n=e.length;for(let i=0;i=0?i=function(){var t="",n=!0;"-"==e[s]&&(t+=d());t+="0"==e[s]?d():m(),"."==e[s]&&(t+=d()+m(),n=!1);"e"!=e[s]&&"E"!=e[s]||(t+=d(),"+"!=e[s]&&"-"!=e[s]||(t+=d()),t+=m(),n=!1);var i=+t;return a&&n&&(i>Number.MAX_SAFE_INTEGER||i="a"&&n<="f"?t+=n.charCodeAt()-c3+10:n>="0"&&n<="9"?t+=+n:x()}return String.fromCharCode(t)}function m(){for(var t="";e[s]>="0"&&e[s]<="9";)t+=d();if(t.length)return t;w(),b()}function g(e,t){y(e,t,v())}function y(e,t,n){i[e]=i[e]||{},i[e][t]=n}function v(){return{line:r,column:o,pos:s}}function b(){throw new SyntaxError("Unexpected token "+e[s]+" in JSON at position "+s)}function x(){h(),b()}function w(){if(s>=e.length)throw new SyntaxError("Unexpected end of JSON input")}},a3.stringify=function(e,t,n){if(u3(e)){var i,r,o=0,s="object"==typeof n?n.space:n;switch(typeof s){case"number":var a=s>10?10:s<0?0:Math.floor(s);s=a&&v(a," "),i=a,r=a;break;case"string":s=s.slice(0,10),i=0,r=0;for(var l=0;l=0}var d3=/"|\\/g,h3=/[\b]/g,f3=/\f/g,m3=/\n/g,g3=/\r/g,y3=/\t/g;function v3(e){return'"'+(e=e.replace(d3,"\\$&").replace(f3,"\\f").replace(h3,"\\b").replace(m3,"\\n").replace(g3,"\\r").replace(y3,"\\t"))+'"'}var b3=/~/g,x3=/\//g;function w3(e){return e.replace(b3,"~0").replace(x3,"~1")}function _3(e,t){const n=function(e){return a3.stringify(e,null,2).pointers}(e),i=t(e);let r=t.errors;return r&&r.length&&(_(r,E3),r=function(e){return w(e,(function(e){return"if"!==e.keyword}))}(r),_(r,(function(e){!function(e,t){const n=e.instancePath,i=t[n];e.dataPointer=i}(e,n)}))),{valid:i,object:e,errors:r}}function E3(e){const t=e.params;t&&t.errors&&(t.rawErrors=t.errors,delete t.errors)}function O3(e){return _3(e,s3)}var P3={exports:{}};P3.exports=L3,P3.exports.default=L3;const k3={type:"object",allOf:[{required:["name","id","appliesTo","properties"],properties:{name:{$id:"#/name",type:"string",description:"The name of the element template."},id:{$id:"#/id",type:"string",description:"The identifier of the element template."},description:{$id:"#/description",type:"string",description:"The description of the element template."},version:{$id:"#/version",type:"integer",description:"Optional version of the template. If you add a version to a template it will be considered unique based on its ID and version. Two templates can have the same ID if their version is different."},isDefault:{$id:"#/isDefault",type:"boolean",description:"Indicates whether the element template is a default template."},deprecated:{$id:"#/deprecated",type:["boolean","object"],description:"Indicates whether the element template is deprecated.",properties:{message:{$id:"#/deprecated/message",type:"string",description:"Optional message to describe migration path."},documentationRef:{$id:"#/deprecated/documentationRef",type:"string",pattern:"^(https|http)://.*",description:"Optional link to migration documentation."}}},appliesTo:{$id:"#/appliesTo",type:"array",description:"List of BPMN types the template can be applied to.",default:[],items:{$id:"#/appliesTo/items",type:"string",pattern:"^[\\w\\d]+:[\\w\\d]+$",allOf:[{examples:["bpmn:Task","bpmn:ServiceTask","bpmn:SequenceFlow","bpmn:Process","bpmn:StartEvent","bpmn:Gateway"]}],errorMessage:{pattern:'invalid item for "appliesTo", should contain namespaced property, example: "bpmn:Task"'}}},elementType:{$id:"#/elementType",type:"object",description:"The BPMN type the element will be transformed into.",default:{},required:["value"],properties:{value:{$id:"#/elementType/value",type:"string",pattern:"^[\\w\\d]+:[\\w\\d]+$",allOf:[{examples:["bpmn:ServiceTask","bpmn:UserTask","bpmn:StartEvent","bpmn:ExclusiveGateway","bpmn:ParallelGateway"]}],errorMessage:{pattern:'invalid item for "elementType", should contain namespaced property, example: "bpmn:Task"'}}},errorMessage:{required:{value:"missing elementType value"}}},metadata:{$id:"#/metadata",type:"object",description:"Some custom properties for further configuration.",default:{}},entriesVisible:{$id:"#/entriesVisible",type:"boolean",description:"Select whether non-template entries are visible in the properties panel."},groups:{$id:"#/groups",type:"array",description:"Custom fields can be ordered together via groups.",allOf:[{examples:[[{id:"group-1",label:"My Group"}]]}],items:{$id:"#/groups/group",type:"object",default:{},required:["id","label"],properties:{id:{$id:"#/groups/group/id",type:"string",description:"The id of the custom group"},label:{$id:"#/groups/group/label",type:"string",description:"The label of the custom group"}},errorMessage:{required:{id:'missing id for group "${0#}"',label:'missing label for group "${0#}"'}}}},documentationRef:{$id:"#/documentationRef",type:"string",pattern:"^(https|http)://.*",errorMessage:{pattern:'Malformed documentation URL, must match "^(https|http)://.*"'}}},errorMessage:{required:{name:"missing template name",id:"missing template id",appliesTo:"missing appliesTo=[]",properties:"missing properties=[]"}}},{allOf:[{if:{properties:{properties:{contains:{properties:{binding:{properties:{type:{const:"bpmn:Message#property"}},required:["type"]}},required:["binding"]}}},required:["properties"]},then:{required:["elementType"],properties:{elementType:{required:["value"],properties:{value:{enum:["bpmn:ReceiveTask","bpmn:SendTask","bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:BoundaryEvent","bpmn:EndEvent"]}},allOf:[{if:{properties:{value:{enum:["bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:BoundaryEvent","bpmn:EndEvent"]}}},then:{eventDefinition:{const:"bpmn:MessageEventDefinition"},required:["eventDefinition"]}}]}}}},{if:{properties:{properties:{contains:{properties:{binding:{properties:{type:{const:"bpmn:Message#zeebe:subscription#property"}},required:["type"]}},required:["binding"]}}},required:["properties"]},then:{required:["elementType"],properties:{elementType:{required:["value"],properties:{value:{enum:["bpmn:ReceiveTask","bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:BoundaryEvent","bpmn:EndEvent"]}},allOf:[{if:{properties:{value:{enum:["bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:BoundaryEvent","bpmn:EndEvent"]}}},then:{eventDefinition:{const:"bpmn:MessageEventDefinition"},required:["eventDefinition"]}}]}}}},{if:{properties:{properties:{contains:{properties:{binding:{properties:{type:{const:"zeebe:calledElement"}},required:["type"]}},required:["binding"]}}},required:["properties"]},then:{anyOf:[{required:["elementType"],properties:{elementType:{required:["value"],properties:{value:{const:"bpmn:CallActivity"}}}}},{required:["appliesTo"],properties:{appliesTo:{const:["bpmn:CallActivity"]}}}]}}]}],properties:{properties:{$ref:"#/definitions/properties",$id:"#/properties"},icon:{$id:"#/icon",type:"object",description:"Custom icon to be shown on the element",default:{},properties:{contents:{$id:"#/icon/contents",type:"string",description:"The URL of an icon.",pattern:"^(https?|data):.*",errorMessage:{pattern:"Malformed icon source, must be a valid HTTP(s) or data URL"}}},required:["contents"],errorMessage:{required:{contents:"missing icon contents"}}},elementType:{allOf:[{allOf:[{properties:{eventDefinition:{$id:"#/elementType/eventDefinition",enum:["bpmn:MessageEventDefinition"]}}},{if:{required:["eventDefinition"]},then:{properties:{value:{enum:["bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:BoundaryEvent","bpmn:EndEvent"]}},required:["value"]}}]}]},groups:{items:{properties:{tooltip:{$id:"#/groups/group/tooltip",type:"string"},openByDefault:{$id:"#/groups/group/openByDefault",type:"boolean",description:"Specifies whether the Group should be opened when first viewed. Defaults to true.",default:!0}}}}}},S3=new RegExp("^(https|http)://.*","u"),C3=new RegExp("^[\\w\\d]+:[\\w\\d]+$","u"),T3=new RegExp("^(https?|data):.*","u"),A3={required:"missingProperty",dependencies:"property",dependentRequired:"property"},M3=V2.default,D3={allOf:[{type:"array",description:"List of properties of the element template.",allOf:[{examples:[[{label:"Name",type:"String",binding:{type:"property",name:"name"}}]]}],items:{type:"object",default:{},allOf:[{if:{properties:{type:{const:"Dropdown"}},required:["type"]},then:{required:["choices"],errorMessage:'must provide choices=[] with "Dropdown" type'}},{definitions:{condition:{type:"object",required:["property"],properties:{type:{$id:"#/condition/type",const:"simple",description:"The type of the condition.",default:"simple"},property:{$id:"#/condition/property",type:"string",description:"The id of the property to check."}},oneOf:[{properties:{equals:{type:["string","number","boolean"]}},required:["equals"]},{properties:{oneOf:{type:"array",items:{type:["string","number"]}}},required:["oneOf"]},{properties:{isActive:{type:"boolean",description:"For `true`, activates the property when given property is active"}},required:["isActive"]}],errorMessage:{required:{property:"missing property name for condition"}}},conditionDependingOnId:{required:["property"],properties:{property:{const:{$data:"2/id"}}}}},allOf:[{$comment:"property#condition should not depend on property#id",if:{required:["id","condition"],properties:{condition:{$ref:"#/definitions/properties/allOf/0/items/allOf/1/definitions/conditionDependingOnId"}}},then:{not:{required:["condition"]},errorMessage:"Invalid condition.property, must be different than property.id"}},{then:{errorMessage:"Invalid condition.property, must be different than property.id"}}],properties:{id:{type:"string",description:"Unique identifier of the property."},condition:{type:"object",description:"Condition(s) to activate the binding.",allOf:[{examples:[{type:"simple",property:"httpMethod",equals:"GET"},{type:"simple",property:"httpMethod",oneOf:["POST","PUT","DELETE"]},{allMatch:[{type:"simple",property:"authType",equals:"Basic"},{type:"simple",property:"httpMethod",oneOf:["POST","PUT","DELETE"]}]}]}],oneOf:[{$ref:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition"},{properties:{allMatch:{$id:"#/allMatch",type:"array",items:{$ref:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition"},minItems:1}},required:["allMatch"]}]}}},{if:{properties:{type:{not:{const:"Number"}}},required:["type"]},then:{properties:{value:{type:["string","boolean"]}}}},{if:{oneOf:[{properties:{type:{enum:["String","Text"]}},required:["type"]},{not:{required:["type"]}}]},then:{properties:{placeholder:{type:"string"}}},else:{not:{required:["placeholder"]}}}],properties:{value:{$id:"#/properties/property/value",type:["string","number","boolean"],description:"The value of a control field."},description:{$id:"#/properties/property/description",type:"string",description:"The description of a control field."},label:{$id:"#/properties/property/label",type:"string",description:"The label of a control field."},type:{$id:"#/properties/property/type",type:"string",description:"The type of a control field."},editable:{$id:"#/properties/property/editable",type:"boolean",description:"Indicates whether a control field is editable or not."},choices:{$id:"#/properties/property/choices",type:"array",description:"The choices for dropdown fields.",default:[],items:{$id:"#/properties/property/choices/item",type:"object",default:{},properties:{name:{$id:"#/properties/property/choices/item/name",type:"string",description:"The name of a choice."},value:{$id:"#/properties/property/choices/item/value",type:"string",description:"The value of a choice."},condition:{$ref:"#/definitions/properties/allOf/0/items/allOf/1/properties/condition"}},required:["value","name"],errorMessage:{required:'{ name, value } must be specified for "Dropdown" choices'}}},constraints:{$id:"#/properties/property/constraints",type:"object",description:"The validation constraints of a control field.",allOf:[{examples:[{notEmpty:!0}]}],properties:{notEmpty:{$id:"#/properties/property/constraints/notEmpty",type:"boolean",description:"The control field must not be empty."},minLength:{$id:"#/properties/property/constraints/minLength",type:"number",description:"The minimal length of a control field value."},maxLength:{$id:"#/properties/property/constraints/maxLength",type:"number",description:"The maximal length for a control field value."},pattern:{$id:"#/properties/property/constraints/pattern",description:"A regular expression pattern for a constraint.",oneOf:[{type:"object",default:{},properties:{value:{$id:"#/properties/property/constraints/pattern/value",type:"string",description:"The regular expression of a pattern."},message:{$id:"#/properties/property/constraints/pattern/message",type:"string",description:"The validation message of a pattern."}}},{type:"string"}]}}},group:{$id:"#/properties/property/group",type:"string",description:"The custom group of a control field."}}}},{$schema:"http://json-schema.org/draft-07/schema",type:"array",description:"List of properties of the element template.",items:{type:"object",default:{},required:["binding"],allOf:[{if:{properties:{binding:{properties:{type:{const:"property"}},required:["type"]}},required:["binding"]},then:{properties:{type:{enum:["String","Text","Hidden","Dropdown","Boolean","Number"],errorMessage:'invalid property type ${0} for binding type "property"; must be any of { String, Text, Hidden, Dropdown, Boolean, Number }'}}}},{if:{properties:{binding:{properties:{type:{enum:["zeebe:input","zeebe:output","zeebe:property","zeebe:taskHeader","zeebe:taskDefinition:type","bpmn:Message#property","bpmn:Message#zeebe:subscription#property","zeebe:taskDefinition","zeebe:calledElement"]}},required:["type"]}},required:["binding"]},then:{properties:{type:{enum:["String","Text","Hidden","Dropdown","Boolean","Number"],errorMessage:"invalid property type ${0} for binding type ${1/binding/type}; must be any of { String, Text, Hidden, Dropdown, Boolean, Number }"}}}},{if:{properties:{optional:{const:!0}},required:["optional"]},then:{properties:{binding:{properties:{type:{enum:["zeebe:input","zeebe:output","zeebe:property","zeebe:taskHeader"],errorMessage:"optional is not supported for binding type ${0}; must be any of { zeebe:input, zeebe:output, zeebe:property, zeebe:taskHeader }"}},required:["type"]}}}},{if:{properties:{optional:{const:!0}},required:["optional"]},then:{properties:{constraints:{properties:{notEmpty:{const:!1,errorMessage:'optional is not allowed for truthy "notEmpty" constraint'}},required:["notEmpty"]}}}},{if:{properties:{feel:{not:{const:null}}},required:["feel"]},then:{properties:{type:{enum:["String","Text","Number","Boolean"],errorMessage:'feel is only supported for "String", "Text", "Number" and "Boolean" type'}},required:["type"]}},{if:{properties:{language:{not:{const:null}}},required:["language"]},then:{properties:{type:{enum:["Text"],errorMessage:'language is only supported for "Text" type'}}}},{if:{required:["value"]},then:{not:{required:["generatedValue"]}}},{if:{properties:{type:{enum:["Boolean","Dropdown"]}},required:["type"]},then:{not:{required:["generatedValue"]}}},{if:{properties:{type:{enum:["String","Text"]}},required:["feel"]},then:{properties:{feel:{enum:["optional","required"]}}}},{if:{properties:{feel:{const:"required"}},required:["feel"]},then:{properties:{value:{type:"string"}}}}],properties:{binding:{$id:"#/properties/property/binding",type:"object",description:"Specifying how the property is mapped to BPMN or Zeebe extension elements and attributes.",required:["type"],allOf:[{if:{properties:{type:{enum:["property","zeebe:property","zeebe:input","bpmn:Message#property","bpmn:Message#zeebe:subscription#property"]}},required:["type"]},then:{required:["name"],errorMessage:"property.binding ${0/type} requires name"}},{if:{properties:{type:{const:"zeebe:output"}},required:["type"]},then:{required:["source"],errorMessage:"property.binding ${0/type} requires source"}},{if:{properties:{type:{const:"zeebe:taskHeader"}},required:["type"]},then:{required:["key"],errorMessage:"property.binding ${0/type} requires key"}},{if:{properties:{type:{const:"zeebe:taskDefinition"}},required:["type"]},then:{properties:{property:{enum:["type","retries"]}},required:["property"]}},{if:{properties:{type:{const:"zeebe:taskDefinition:type"}},required:["type"]},then:{deprecated:!0}},{if:{properties:{type:{const:"zeebe:calledElement"}},required:["type"]},then:{properties:{property:{const:"processId"}},required:["property"]}},{examples:[{type:"property",name:"name"},{type:"zeebe:input",name:"input"},{type:"zeebe:output",source:"output"},{type:"zeebe:property",name:"property"},{type:"zeebe:taskHeader",key:"key"},{type:"zeebe:taskDefinition",property:"retries"},{type:"zeebe:taskDefinition",property:"type"}]}],properties:{type:{$id:"#/properties/property/binding/type",type:"string",description:"The type of a property binding.",enum:["property","zeebe:taskDefinition:type","zeebe:input","zeebe:output","zeebe:property","zeebe:taskHeader","bpmn:Message#property","bpmn:Message#zeebe:subscription#property","zeebe:taskDefinition","zeebe:calledElement"],errorMessage:"invalid property.binding type ${0}; must be any of { property, zeebe:taskDefinition:type, zeebe:input, zeebe:output, zeebe:property, zeebe:taskHeader, bpmn:Message#property, bpmn:Message#zeebe:subscription#property }"},name:{$id:"#/properties/property/binding/name",type:"string",description:"The name of a property binding."},source:{$id:"#/properties/property/binding/source",type:"string",description:"The source value of a property binding (zeebe:output)."},key:{$id:"#/properties/property/binding/key",type:"string",description:"The key value of a property binding (zeebe:taskHeader)."},property:{$id:"#/properties/property/binding/property",type:"string",description:"The name of the property defined in the binding."}}},optional:{$id:"#/optional",type:"boolean",description:"Indicates whether a property is optional. Optional bindings do not persist empty values in the underlying BPMN 2.0 XML."},feel:{$id:"#/properties/property/feel",type:"string",description:"Indicates whether the property can be a feel expression",enum:["optional","required","static"]},language:{$id:"#/properties/property/language",type:"string",description:"Indicates that the field is a custom language editor"},generatedValue:{$id:"#/properties/property/generatedValue",type:"object",required:["type"],properties:{type:{const:"uuid"}},description:"Sets property to a generated value according to given scheme."},tooltip:{$id:"#/properties/property/tooltip",type:"string",description:"Hints for the control field."}},errorMessage:{required:{binding:'missing binding for property "${0#}"'}}}}]},R3={required:["property"],properties:{property:{const:{$data:"2/id"}}}},N3={type:"object",required:["property"],properties:{type:{$id:"#/condition/type",const:"simple",description:"The type of the condition.",default:"simple"},property:{$id:"#/condition/property",type:"string",description:"The id of the property to check."}},oneOf:[{properties:{equals:{type:["string","number","boolean"]}},required:["equals"]},{properties:{oneOf:{type:"array",items:{type:["string","number"]}}},required:["oneOf"]},{properties:{isActive:{type:"boolean",description:"For `true`, activates the property when given property is active"}},required:["isActive"]}],errorMessage:{required:{property:"missing property name for condition"}}};function $3(e,{instancePath:t="",parentData:n,parentDataProperty:i,rootData:r=e}={}){let o=null,s=0;if(!e||"object"!=typeof e||Array.isArray(e)){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}const a=s;let l=!1,c=null;const p=s,u=s;let d=!1,h=null;const f=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.equals){const e={instancePath:t,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/0/required",keyword:"required",params:{missingProperty:"equals"},message:"must have required property 'equals'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.equals){let n=e.equals;if("string"!=typeof n&&"number"!=typeof n&&"boolean"!=typeof n){const e={instancePath:t+"/equals",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/0/properties/equals/type",keyword:"type",params:{type:N3.oneOf[0].properties.equals.type},message:"must be string,number,boolean"};null===o?o=[e]:o.push(e),s++}}}(g=f===s)&&(d=!0,h=0);const m=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.oneOf){const e={instancePath:t,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/required",keyword:"required",params:{missingProperty:"oneOf"},message:"must have required property 'oneOf'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.oneOf){let n=e.oneOf;if(Array.isArray(n)){const e=n.length;for(let i=0;i0){const e={required:{property:[]}},n={required:{}};let i,r;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t&&n.keyword in e&&0===n.schemaPath.indexOf("#/definitions/properties/allOf/0/items/allOf/1/definitions/condition")&&/^\/[^\/]*$/.test(n.schemaPath.slice(68))&&(i=A3[n.keyword],r=e[n.keyword][n.params[i]],r&&(r.push(n),n.emUsed=!0));for(const i in e)for(const a in e[i])if(r=e[i][a],r.length){const e=n[i]&&n[i][a],l={instancePath:t,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/errorMessage",keyword:"errorMessage",params:{errors:r},message:e?e():N3.errorMessage[i][a]};null===o?o=[l]:o.push(l),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}(b=p===s)&&(l=!0,c=0);const y=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.allMatch){const e={instancePath:t,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"allMatch"},message:"must have required property 'allMatch'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.allMatch){let n=e.allMatch;if(Array.isArray(n)){if(n.length<1){const e={instancePath:t+"/allMatch",schemaPath:"#/oneOf/1/properties/allMatch/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};null===o?o=[e]:o.push(e),s++}const e=n.length;for(let i=0;i0){const e={required:{property:[]}},n={required:{}};let r,a;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/allMatch/"+i&&n.keyword in e&&0===n.schemaPath.indexOf("#/definitions/properties/allOf/0/items/allOf/1/definitions/condition")&&/^\/[^\/]*$/.test(n.schemaPath.slice(68))&&(r=A3[n.keyword],a=e[n.keyword][n.params[r]],a&&(a.push(n),n.emUsed=!0));for(const r in e)for(const l in e[r])if(a=e[r][l],a.length){const e=n[r]&&n[r][l],c={instancePath:t+"/allMatch/"+i,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/errorMessage",keyword:"errorMessage",params:{errors:a},message:e?e():N3.errorMessage[r][l]};null===o?o=[c]:o.push(c),s++}const l=[];for(const e of o)e.emUsed||l.push(e);o=l,s=l.length}}}else{const e={instancePath:t+"/allMatch",schemaPath:"#/oneOf/1/properties/allMatch/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}var b;if((b=y===s)&&l?(l=!1,c=[c,1]):b&&(l=!0,c=1),l)s=a,null!==o&&(a?o.length=a:o=null);else{const e={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:c},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}return $3.errors=o,0===s}function j3(e,{instancePath:t="",parentData:n,parentDataProperty:i,rootData:r=e}={}){let o=null,s=0;if(Array.isArray(e)){const n=e.length;for(let i=0;i0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/"+i&&(0!==n.instancePath.indexOf(t+"/"+i)||"/"!==n.instancePath[t+"/"+i.length])||0!==n.schemaPath.indexOf("#/allOf/0/items/allOf/0/then")||"/"!==n.schemaPath[28]||(e.push(n),n.emUsed=!0);if(e.length){const n={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/0/then/errorMessage",keyword:"errorMessage",params:{errors:e},message:'must provide choices=[] with "Dropdown" type'};null===o?o=[n]:o.push(n),s++}const n=[];for(const e of o)e.emUsed||n.push(e);o=n,s=n.length}y=a=e===s}if(!y){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/0/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const b=s;let x=!0;const w=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.id||void 0===n.condition){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.condition){let e=n.condition;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.property){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.property&&!M3(e.property,R3.properties.property.const)){const e={};null===o?o=[e]:o.push(e),s++}}var l=w===s;if(s=b,null!==o&&(b?o.length=b:o=null),l){const e=s,r=s,a=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.condition){const e={};null===o?o=[e]:o.push(e),s++}if(a===s){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/1/allOf/0/then/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=r,null!==o&&(r?o.length=r:o=null);if(s>0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/"+i&&(0!==n.instancePath.indexOf(t+"/"+i)||"/"!==n.instancePath[t+"/"+i.length])||0!==n.schemaPath.indexOf("#/allOf/0/items/allOf/1/allOf/0/then")||"/"!==n.schemaPath[36]||(e.push(n),n.emUsed=!0);if(e.length){const n={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/1/allOf/0/then/errorMessage",keyword:"errorMessage",params:{errors:e},message:"Invalid condition.property, must be different than property.id"};null===o?o=[n]:o.push(n),s++}const n=[];for(const e of o)e.emUsed||n.push(e);o=n,s=n.length}x=l=e===s}if(!x){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/1/allOf/0/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0!==n.id&&"string"!=typeof n.id){const e={instancePath:t+"/"+i+"/id",schemaPath:"#/allOf/0/items/allOf/1/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.condition){let e=n.condition;if(!e||"object"!=typeof e||Array.isArray(e)){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/allOf/0/items/allOf/1/properties/condition/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}const r=s;let a=!1,l=null;const d=s,h=s;let f=!1,m=null;const g=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.equals){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/0/required",keyword:"required",params:{missingProperty:"equals"},message:"must have required property 'equals'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.equals){let n=e.equals;if("string"!=typeof n&&"number"!=typeof n&&"boolean"!=typeof n){const e={instancePath:t+"/"+i+"/condition/equals",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/0/properties/equals/type",keyword:"type",params:{type:N3.oneOf[0].properties.equals.type},message:"must be string,number,boolean"};null===o?o=[e]:o.push(e),s++}}}(c=g===s)&&(f=!0,m=0);const y=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.oneOf){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/required",keyword:"required",params:{missingProperty:"oneOf"},message:"must have required property 'oneOf'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.oneOf){let n=e.oneOf;if(Array.isArray(n)){const e=n.length;for(let r=0;r0){const e={required:{property:[]}},n={required:{}};let r,a;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/"+i+"/condition"&&n.keyword in e&&0===n.schemaPath.indexOf("#/definitions/properties/allOf/0/items/allOf/1/definitions/condition")&&/^\/[^\/]*$/.test(n.schemaPath.slice(68))&&(r=A3[n.keyword],a=e[n.keyword][n.params[r]],a&&(a.push(n),n.emUsed=!0));for(const r in e)for(const l in e[r])if(a=e[r][l],a.length){const e=n[r]&&n[r][l],c={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/errorMessage",keyword:"errorMessage",params:{errors:a},message:e?e():N3.errorMessage[r][l]};null===o?o=[c]:o.push(c),s++}const l=[];for(const e of o)e.emUsed||l.push(e);o=l,s=l.length}(u=d===s)&&(a=!0,l=0);const v=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.allMatch){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/allOf/0/items/allOf/1/properties/condition/oneOf/1/required",keyword:"required",params:{missingProperty:"allMatch"},message:"must have required property 'allMatch'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.allMatch){let n=e.allMatch;if(Array.isArray(n)){if(n.length<1){const e={instancePath:t+"/"+i+"/condition/allMatch",schemaPath:"#/allOf/0/items/allOf/1/properties/condition/oneOf/1/properties/allMatch/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};null===o?o=[e]:o.push(e),s++}const e=n.length;for(let r=0;r0){const e={required:{property:[]}},n={required:{}};let a,l;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/"+i+"/condition/allMatch/"+r&&n.keyword in e&&0===n.schemaPath.indexOf("#/definitions/properties/allOf/0/items/allOf/1/definitions/condition")&&/^\/[^\/]*$/.test(n.schemaPath.slice(68))&&(a=A3[n.keyword],l=e[n.keyword][n.params[a]],l&&(l.push(n),n.emUsed=!0));for(const a in e)for(const c in e[a])if(l=e[a][c],l.length){const e=n[a]&&n[a][c],p={instancePath:t+"/"+i+"/condition/allMatch/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/errorMessage",keyword:"errorMessage",params:{errors:l},message:e?e():N3.errorMessage[a][c]};null===o?o=[p]:o.push(p),s++}const c=[];for(const e of o)e.emUsed||c.push(e);o=c,s=c.length}}}else{const e={instancePath:t+"/"+i+"/condition/allMatch",schemaPath:"#/allOf/0/items/allOf/1/properties/condition/oneOf/1/properties/allMatch/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}var u;if((u=v===s)&&a?(a=!1,l=[l,1]):u&&(a=!0,l=1),a)s=r,null!==o&&(r?o.length=r:o=null);else{const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/allOf/0/items/allOf/1/properties/condition/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}}}const _=s;let E=!0;const O=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.type){const e=s,t=s;if("Number"!==n.type){const e={};null===o?o=[e]:o.push(e),s++}if(t===s){const e={};null===o?o=[e]:o.push(e),s++}else s=e,null!==o&&(e?o.length=e:o=null)}var d=O===s;if(s=_,null!==o&&(_?o.length=_:o=null),d){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.value){let e=n.value;if("string"!=typeof e&&"boolean"!=typeof e){const e={instancePath:t+"/"+i+"/value",schemaPath:"#/allOf/0/items/allOf/2/then/properties/value/type",keyword:"type",params:{type:D3.allOf[0].items.allOf[2].then.properties.value.type},message:"must be string,boolean"};null===o?o=[e]:o.push(e),s++}}E=d=e===s}if(!E){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/2/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const P=s;let k=!0;const S=s,C=s;let T=!1;const A=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.type){let e=n.type;if("String"!==e&&"Text"!==e){const e={};null===o?o=[e]:o.push(e),s++}}(h=A===s)&&(T=!0);const M=s,D=s,R=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.type){const e={};null===o?o=[e]:o.push(e),s++}var h;if(R===s){const e={};null===o?o=[e]:o.push(e),s++}else s=D,null!==o&&(D?o.length=D:o=null);if((h=M===s)&&T?T=!1:h&&(T=!0),T)s=C,null!==o&&(C?o.length=C:o=null);else{const e={};null===o?o=[e]:o.push(e),s++}var f=S===s;let N;if(s=P,null!==o&&(P?o.length=P:o=null),f){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.placeholder&&"string"!=typeof n.placeholder){const e={instancePath:t+"/"+i+"/placeholder",schemaPath:"#/allOf/0/items/allOf/3/then/properties/placeholder/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}k=f=e===s,N="then"}else{const e=s,r=s,a=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.placeholder){const e={};null===o?o=[e]:o.push(e),s++}if(a===s){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/3/else/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=r,null!==o&&(r?o.length=r:o=null);k=f=e===s,N="else"}if(!k){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/3/if",keyword:"if",params:{failingKeyword:N},message:'must match "'+N+'" schema'};null===o?o=[e]:o.push(e),s++}if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0!==n.value){let e=n.value;if("string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e){const e={instancePath:t+"/"+i+"/value",schemaPath:"#/allOf/0/items/properties/value/type",keyword:"type",params:{type:D3.allOf[0].items.properties.value.type},message:"must be string,number,boolean"};null===o?o=[e]:o.push(e),s++}}if(void 0!==n.description&&"string"!=typeof n.description){const e={instancePath:t+"/"+i+"/description",schemaPath:"#/allOf/0/items/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.label&&"string"!=typeof n.label){const e={instancePath:t+"/"+i+"/label",schemaPath:"#/allOf/0/items/properties/label/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.type&&"string"!=typeof n.type){const e={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/0/items/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.editable&&"boolean"!=typeof n.editable){const e={instancePath:t+"/"+i+"/editable",schemaPath:"#/allOf/0/items/properties/editable/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.choices){let e=n.choices;if(Array.isArray(e)){const n=e.length;for(let a=0;a0){const e={required:[]},n={};for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/"+i+"/choices/"+a&&n.keyword in e&&0===n.schemaPath.indexOf("#/allOf/0/items/properties/choices/items")&&/^\/[^\/]*$/.test(n.schemaPath.slice(40))&&(e[n.keyword].push(n),n.emUsed=!0);for(const r in e)if(e[r].length){const l={instancePath:t+"/"+i+"/choices/"+a,schemaPath:"#/allOf/0/items/properties/choices/items/errorMessage",keyword:"errorMessage",params:{errors:e[r]},message:r in n?n[r]():D3.allOf[0].items.properties.choices.items.errorMessage[r]};null===o?o=[l]:o.push(l),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}}}else{const e={instancePath:t+"/"+i+"/choices",schemaPath:"#/allOf/0/items/properties/choices/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}if(void 0!==n.constraints){let e=n.constraints;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.notEmpty&&"boolean"!=typeof e.notEmpty){const e={instancePath:t+"/"+i+"/constraints/notEmpty",schemaPath:"#/allOf/0/items/properties/constraints/properties/notEmpty/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.minLength&&"number"!=typeof e.minLength){const e={instancePath:t+"/"+i+"/constraints/minLength",schemaPath:"#/allOf/0/items/properties/constraints/properties/minLength/type",keyword:"type",params:{type:"number"},message:"must be number"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.maxLength&&"number"!=typeof e.maxLength){const e={instancePath:t+"/"+i+"/constraints/maxLength",schemaPath:"#/allOf/0/items/properties/constraints/properties/maxLength/type",keyword:"type",params:{type:"number"},message:"must be number"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.pattern){let n=e.pattern;const r=s;let a=!1,l=null;const c=s;if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0!==n.value&&"string"!=typeof n.value){const e={instancePath:t+"/"+i+"/constraints/pattern/value",schemaPath:"#/allOf/0/items/properties/constraints/properties/pattern/oneOf/0/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.message&&"string"!=typeof n.message){const e={instancePath:t+"/"+i+"/constraints/pattern/message",schemaPath:"#/allOf/0/items/properties/constraints/properties/pattern/oneOf/0/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/"+i+"/constraints/pattern",schemaPath:"#/allOf/0/items/properties/constraints/properties/pattern/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}(m=c===s)&&(a=!0,l=0);const p=s;if("string"!=typeof n){const e={instancePath:t+"/"+i+"/constraints/pattern",schemaPath:"#/allOf/0/items/properties/constraints/properties/pattern/oneOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}var m;if((m=p===s)&&a?(a=!1,l=[l,1]):m&&(a=!0,l=1),a)s=r,null!==o&&(r?o.length=r:o=null);else{const e={instancePath:t+"/"+i+"/constraints/pattern",schemaPath:"#/allOf/0/items/properties/constraints/properties/pattern/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t+"/"+i+"/constraints",schemaPath:"#/allOf/0/items/properties/constraints/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}}if(void 0!==n.group&&"string"!=typeof n.group){const e={instancePath:t+"/"+i+"/group",schemaPath:"#/allOf/0/items/properties/group/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t,schemaPath:"#/allOf/0/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}if(Array.isArray(e)){const n=e.length;for(let i=0;i0){const n=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/"+i+"/type"&&(0!==e.instancePath.indexOf(t+"/"+i+"/type")||"/"!==e.instancePath[t+"/"+i+5])||0!==e.schemaPath.indexOf("#/allOf/1/items/allOf/0/then/properties/type")||"/"!==e.schemaPath[44]||(n.push(e),e.emUsed=!0);if(n.length){const r={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/1/items/allOf/0/then/properties/type/errorMessage",keyword:"errorMessage",params:{errors:n},message:"invalid property type "+JSON.stringify(e)+' for binding type "property"; must be any of { String, Text, Hidden, Dropdown, Boolean, Number }'};null===o?o=[r]:o.push(r),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}}a=g=e===s}if(!a){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/0/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const c=s;let p=!0;const u=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.binding){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.binding){let e=n.binding;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.type){let t=e.type;if("zeebe:input"!==t&&"zeebe:output"!==t&&"zeebe:property"!==t&&"zeebe:taskHeader"!==t&&"zeebe:taskDefinition:type"!==t&&"bpmn:Message#property"!==t&&"bpmn:Message#zeebe:subscription#property"!==t&&"zeebe:taskDefinition"!==t&&"zeebe:calledElement"!==t){const e={};null===o?o=[e]:o.push(e),s++}}}var y=u===s;if(s=c,null!==o&&(c?o.length=c:o=null),y){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.type){let e=n.type;if("String"!==e&&"Text"!==e&&"Hidden"!==e&&"Dropdown"!==e&&"Boolean"!==e&&"Number"!==e){const e={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/1/items/allOf/1/then/properties/type/enum",keyword:"enum",params:{allowedValues:D3.allOf[1].items.allOf[1].then.properties.type.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}if(s>0){const r=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/"+i+"/type"&&(0!==e.instancePath.indexOf(t+"/"+i+"/type")||"/"!==e.instancePath[t+"/"+i+5])||0!==e.schemaPath.indexOf("#/allOf/1/items/allOf/1/then/properties/type")||"/"!==e.schemaPath[44]||(r.push(e),e.emUsed=!0);if(r.length){const a={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/1/items/allOf/1/then/properties/type/errorMessage",keyword:"errorMessage",params:{errors:r},message:"invalid property type "+JSON.stringify(e)+" for binding type "+JSON.stringify(n&&n.binding&&n.binding.type)+"; must be any of { String, Text, Hidden, Dropdown, Boolean, Number }"};null===o?o=[a]:o.push(a),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}}p=y=e===s}if(!p){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/1/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const d=s;let h=!0;const f=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.optional){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.optional&&!0!==n.optional){const e={};null===o?o=[e]:o.push(e),s++}var v=f===s;if(s=d,null!==o&&(d?o.length=d:o=null),v){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.binding){let e=n.binding;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/allOf/2/then/properties/binding/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.type){let n=e.type;if("zeebe:input"!==n&&"zeebe:output"!==n&&"zeebe:property"!==n&&"zeebe:taskHeader"!==n){const e={instancePath:t+"/"+i+"/binding/type",schemaPath:"#/allOf/1/items/allOf/2/then/properties/binding/properties/type/enum",keyword:"enum",params:{allowedValues:D3.allOf[1].items.allOf[2].then.properties.binding.properties.type.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}if(s>0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/"+i+"/binding/type"&&(0!==n.instancePath.indexOf(t+"/"+i+"/binding/type")||"/"!==n.instancePath[t+"/"+i+13])||0!==n.schemaPath.indexOf("#/allOf/1/items/allOf/2/then/properties/binding/properties/type")||"/"!==n.schemaPath[63]||(e.push(n),n.emUsed=!0);if(e.length){const r={instancePath:t+"/"+i+"/binding/type",schemaPath:"#/allOf/1/items/allOf/2/then/properties/binding/properties/type/errorMessage",keyword:"errorMessage",params:{errors:e},message:"optional is not supported for binding type "+JSON.stringify(n)+"; must be any of { zeebe:input, zeebe:output, zeebe:property, zeebe:taskHeader }"};null===o?o=[r]:o.push(r),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}}}}h=v=e===s}if(!h){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/2/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const m=s;let M=!0;const D=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.optional){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.optional&&!0!==n.optional){const e={};null===o?o=[e]:o.push(e),s++}var b=D===s;if(s=m,null!==o&&(m?o.length=m:o=null),b){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.constraints){let e=n.constraints;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.notEmpty){const e={instancePath:t+"/"+i+"/constraints",schemaPath:"#/allOf/1/items/allOf/3/then/properties/constraints/required",keyword:"required",params:{missingProperty:"notEmpty"},message:"must have required property 'notEmpty'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.notEmpty){if(!1!==e.notEmpty){const e={instancePath:t+"/"+i+"/constraints/notEmpty",schemaPath:"#/allOf/1/items/allOf/3/then/properties/constraints/properties/notEmpty/const",keyword:"const",params:{allowedValue:!1},message:"must be equal to constant"};null===o?o=[e]:o.push(e),s++}if(s>0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/"+i+"/constraints/notEmpty"&&(0!==n.instancePath.indexOf(t+"/"+i+"/constraints/notEmpty")||"/"!==n.instancePath[t+"/"+i+21])||0!==n.schemaPath.indexOf("#/allOf/1/items/allOf/3/then/properties/constraints/properties/notEmpty")||"/"!==n.schemaPath[71]||(e.push(n),n.emUsed=!0);if(e.length){const n={instancePath:t+"/"+i+"/constraints/notEmpty",schemaPath:"#/allOf/1/items/allOf/3/then/properties/constraints/properties/notEmpty/errorMessage",keyword:"errorMessage",params:{errors:e},message:'optional is not allowed for truthy "notEmpty" constraint'};null===o?o=[n]:o.push(n),s++}const n=[];for(const e of o)e.emUsed||n.push(e);o=n,s=n.length}}}}M=b=e===s}if(!M){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/3/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const R=s;let N=!0;const $=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.feel){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.feel){const e=s,t=s;if(null!==n.feel){const e={};null===o?o=[e]:o.push(e),s++}if(t===s){const e={};null===o?o=[e]:o.push(e),s++}else s=e,null!==o&&(e?o.length=e:o=null)}var x=$===s;if(s=R,null!==o&&(R?o.length=R:o=null),x){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.type){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/4/then/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.type){let e=n.type;if("String"!==e&&"Text"!==e&&"Number"!==e&&"Boolean"!==e){const e={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/1/items/allOf/4/then/properties/type/enum",keyword:"enum",params:{allowedValues:D3.allOf[1].items.allOf[4].then.properties.type.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}if(s>0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/"+i+"/type"&&(0!==n.instancePath.indexOf(t+"/"+i+"/type")||"/"!==n.instancePath[t+"/"+i+5])||0!==n.schemaPath.indexOf("#/allOf/1/items/allOf/4/then/properties/type")||"/"!==n.schemaPath[44]||(e.push(n),n.emUsed=!0);if(e.length){const n={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/1/items/allOf/4/then/properties/type/errorMessage",keyword:"errorMessage",params:{errors:e},message:'feel is only supported for "String", "Text", "Number" and "Boolean" type'};null===o?o=[n]:o.push(n),s++}const n=[];for(const e of o)e.emUsed||n.push(e);o=n,s=n.length}}}N=x=e===s}if(!N){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/4/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const j=s;let I=!0;const L=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.language){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.language){const e=s,t=s;if(null!==n.language){const e={};null===o?o=[e]:o.push(e),s++}if(t===s){const e={};null===o?o=[e]:o.push(e),s++}else s=e,null!==o&&(e?o.length=e:o=null)}var w=L===s;if(s=j,null!==o&&(j?o.length=j:o=null),w){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.type){if("Text"!==n.type){const e={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/1/items/allOf/5/then/properties/type/enum",keyword:"enum",params:{allowedValues:D3.allOf[1].items.allOf[5].then.properties.type.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}if(s>0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/"+i+"/type"&&(0!==n.instancePath.indexOf(t+"/"+i+"/type")||"/"!==n.instancePath[t+"/"+i+5])||0!==n.schemaPath.indexOf("#/allOf/1/items/allOf/5/then/properties/type")||"/"!==n.schemaPath[44]||(e.push(n),n.emUsed=!0);if(e.length){const n={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/1/items/allOf/5/then/properties/type/errorMessage",keyword:"errorMessage",params:{errors:e},message:'language is only supported for "Text" type'};null===o?o=[n]:o.push(n),s++}const n=[];for(const e of o)e.emUsed||n.push(e);o=n,s=n.length}}I=w=e===s}if(!I){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/5/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const B=s;let q=!0;const z=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.value){const e={};null===o?o=[e]:o.push(e),s++}var _=z===s;if(s=B,null!==o&&(B?o.length=B:o=null),_){const e=s,r=s,a=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.generatedValue){const e={};null===o?o=[e]:o.push(e),s++}if(a===s){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/6/then/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=r,null!==o&&(r?o.length=r:o=null);q=_=e===s}if(!q){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/6/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const F=s;let V=!0;const H=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.type){let e=n.type;if("Boolean"!==e&&"Dropdown"!==e){const e={};null===o?o=[e]:o.push(e),s++}}var E=H===s;if(s=F,null!==o&&(F?o.length=F:o=null),E){const e=s,r=s,a=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.generatedValue){const e={};null===o?o=[e]:o.push(e),s++}if(a===s){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/7/then/not",keyword:"not",params:{},message:"must NOT be valid"};null===o?o=[e]:o.push(e),s++}else s=r,null!==o&&(r?o.length=r:o=null);V=E=e===s}if(!V){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/7/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const U=s;let W=!0;const G=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.feel){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.type){let e=n.type;if("String"!==e&&"Text"!==e){const e={};null===o?o=[e]:o.push(e),s++}}var O=G===s;if(s=U,null!==o&&(U?o.length=U:o=null),O){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.feel){let e=n.feel;if("optional"!==e&&"required"!==e){const e={instancePath:t+"/"+i+"/feel",schemaPath:"#/allOf/1/items/allOf/8/then/properties/feel/enum",keyword:"enum",params:{allowedValues:D3.allOf[1].items.allOf[8].then.properties.feel.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}}W=O=e===s}if(!W){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/8/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const Q=s;let X=!0;const K=s;if(n&&"object"==typeof n&&!Array.isArray(n))if(void 0===n.feel){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==n.feel&&"required"!==n.feel){const e={};null===o?o=[e]:o.push(e),s++}var P=K===s;if(s=Q,null!==o&&(Q?o.length=Q:o=null),P){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.value&&"string"!=typeof n.value){const e={instancePath:t+"/"+i+"/value",schemaPath:"#/allOf/1/items/allOf/9/then/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}X=P=e===s}if(!X){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/allOf/9/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.binding){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/required",keyword:"required",params:{missingProperty:"binding"},message:"must have required property 'binding'"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.binding){let e=n.binding;const r=s;let a=!0;const l=s;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.type){let t=e.type;if("property"!==t&&"zeebe:property"!==t&&"zeebe:input"!==t&&"bpmn:Message#property"!==t&&"bpmn:Message#zeebe:subscription#property"!==t){const e={};null===o?o=[e]:o.push(e),s++}}var k=l===s;if(s=r,null!==o&&(r?o.length=r:o=null),k){const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.name){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/0/then/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===o?o=[e]:o.push(e),s++}if(s>0){const n=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/"+i+"/binding"&&(0!==e.instancePath.indexOf(t+"/"+i+"/binding")||"/"!==e.instancePath[t+"/"+i+8])||0!==e.schemaPath.indexOf("#/allOf/1/items/properties/binding/allOf/0/then")||"/"!==e.schemaPath[47]||(n.push(e),e.emUsed=!0);if(n.length){const r={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/0/then/errorMessage",keyword:"errorMessage",params:{errors:n},message:"property.binding "+JSON.stringify(e&&e.type)+" requires name"};null===o?o=[r]:o.push(r),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}a=k=n===s}if(!a){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/0/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const c=s;let p=!0;const u=s;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.type&&"zeebe:output"!==e.type){const e={};null===o?o=[e]:o.push(e),s++}var S=u===s;if(s=c,null!==o&&(c?o.length=c:o=null),S){const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.source){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/1/then/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};null===o?o=[e]:o.push(e),s++}if(s>0){const n=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/"+i+"/binding"&&(0!==e.instancePath.indexOf(t+"/"+i+"/binding")||"/"!==e.instancePath[t+"/"+i+8])||0!==e.schemaPath.indexOf("#/allOf/1/items/properties/binding/allOf/1/then")||"/"!==e.schemaPath[47]||(n.push(e),e.emUsed=!0);if(n.length){const r={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/1/then/errorMessage",keyword:"errorMessage",params:{errors:n},message:"property.binding "+JSON.stringify(e&&e.type)+" requires source"};null===o?o=[r]:o.push(r),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}p=S=n===s}if(!p){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/1/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const d=s;let h=!0;const f=s;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.type&&"zeebe:taskHeader"!==e.type){const e={};null===o?o=[e]:o.push(e),s++}var C=f===s;if(s=d,null!==o&&(d?o.length=d:o=null),C){const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.key){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/2/then/required",keyword:"required",params:{missingProperty:"key"},message:"must have required property 'key'"};null===o?o=[e]:o.push(e),s++}if(s>0){const n=[];for(const e of o)"errorMessage"===e.keyword||e.emUsed||e.instancePath!==t+"/"+i+"/binding"&&(0!==e.instancePath.indexOf(t+"/"+i+"/binding")||"/"!==e.instancePath[t+"/"+i+8])||0!==e.schemaPath.indexOf("#/allOf/1/items/properties/binding/allOf/2/then")||"/"!==e.schemaPath[47]||(n.push(e),e.emUsed=!0);if(n.length){const r={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/2/then/errorMessage",keyword:"errorMessage",params:{errors:n},message:"property.binding "+JSON.stringify(e&&e.type)+" requires key"};null===o?o=[r]:o.push(r),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}h=C=n===s}if(!h){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/2/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const m=s;let g=!0;const y=s;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.type&&"zeebe:taskDefinition"!==e.type){const e={};null===o?o=[e]:o.push(e),s++}var T=y===s;if(s=m,null!==o&&(m?o.length=m:o=null),T){const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.property){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/then/required",keyword:"required",params:{missingProperty:"property"},message:"must have required property 'property'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.property){let n=e.property;if("type"!==n&&"retries"!==n){const e={instancePath:t+"/"+i+"/binding/property",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/then/properties/property/enum",keyword:"enum",params:{allowedValues:D3.allOf[1].items.properties.binding.allOf[3].then.properties.property.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}}}g=T=n===s}if(!g){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/3/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const v=s;let b=!0;const x=s;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.type){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.type&&"zeebe:calledElement"!==e.type){const e={};null===o?o=[e]:o.push(e),s++}var A=x===s;if(s=v,null!==o&&(v?o.length=v:o=null),A){const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.property){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/5/then/required",keyword:"required",params:{missingProperty:"property"},message:"must have required property 'property'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.property&&"processId"!==e.property){const e={instancePath:t+"/"+i+"/binding/property",schemaPath:"#/allOf/1/items/properties/binding/allOf/5/then/properties/property/const",keyword:"const",params:{allowedValue:"processId"},message:"must be equal to constant"};null===o?o=[e]:o.push(e),s++}}b=A=n===s}if(!b){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/allOf/5/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type){const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.type){let n=e.type;if("string"!=typeof n){const e={instancePath:t+"/"+i+"/binding/type",schemaPath:"#/allOf/1/items/properties/binding/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if("property"!==n&&"zeebe:taskDefinition:type"!==n&&"zeebe:input"!==n&&"zeebe:output"!==n&&"zeebe:property"!==n&&"zeebe:taskHeader"!==n&&"bpmn:Message#property"!==n&&"bpmn:Message#zeebe:subscription#property"!==n&&"zeebe:taskDefinition"!==n&&"zeebe:calledElement"!==n){const e={instancePath:t+"/"+i+"/binding/type",schemaPath:"#/allOf/1/items/properties/binding/properties/type/enum",keyword:"enum",params:{allowedValues:D3.allOf[1].items.properties.binding.properties.type.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}if(s>0){const e=[];for(const n of o)"errorMessage"===n.keyword||n.emUsed||n.instancePath!==t+"/"+i+"/binding/type"&&(0!==n.instancePath.indexOf(t+"/"+i+"/binding/type")||"/"!==n.instancePath[t+"/"+i+13])||0!==n.schemaPath.indexOf("#/allOf/1/items/properties/binding/properties/type")||"/"!==n.schemaPath[50]||(e.push(n),n.emUsed=!0);if(e.length){const r={instancePath:t+"/"+i+"/binding/type",schemaPath:"#/allOf/1/items/properties/binding/properties/type/errorMessage",keyword:"errorMessage",params:{errors:e},message:"invalid property.binding type "+JSON.stringify(n)+"; must be any of { property, zeebe:taskDefinition:type, zeebe:input, zeebe:output, zeebe:property, zeebe:taskHeader, bpmn:Message#property, bpmn:Message#zeebe:subscription#property }"};null===o?o=[r]:o.push(r),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/"+i+"/binding/name",schemaPath:"#/allOf/1/items/properties/binding/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.source&&"string"!=typeof e.source){const e={instancePath:t+"/"+i+"/binding/source",schemaPath:"#/allOf/1/items/properties/binding/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.key&&"string"!=typeof e.key){const e={instancePath:t+"/"+i+"/binding/key",schemaPath:"#/allOf/1/items/properties/binding/properties/key/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.property&&"string"!=typeof e.property){const e={instancePath:t+"/"+i+"/binding/property",schemaPath:"#/allOf/1/items/properties/binding/properties/property/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/"+i+"/binding",schemaPath:"#/allOf/1/items/properties/binding/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}}if(void 0!==n.optional&&"boolean"!=typeof n.optional){const e={instancePath:t+"/"+i+"/optional",schemaPath:"#/allOf/1/items/properties/optional/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.feel){let e=n.feel;if("string"!=typeof e){const e={instancePath:t+"/"+i+"/feel",schemaPath:"#/allOf/1/items/properties/feel/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if("optional"!==e&&"required"!==e&&"static"!==e){const e={instancePath:t+"/"+i+"/feel",schemaPath:"#/allOf/1/items/properties/feel/enum",keyword:"enum",params:{allowedValues:D3.allOf[1].items.properties.feel.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}}if(void 0!==n.language&&"string"!=typeof n.language){const e={instancePath:t+"/"+i+"/language",schemaPath:"#/allOf/1/items/properties/language/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.generatedValue){let e=n.generatedValue;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type){const e={instancePath:t+"/"+i+"/generatedValue",schemaPath:"#/allOf/1/items/properties/generatedValue/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.type&&"uuid"!==e.type){const e={instancePath:t+"/"+i+"/generatedValue/type",schemaPath:"#/allOf/1/items/properties/generatedValue/properties/type/const",keyword:"const",params:{allowedValue:"uuid"},message:"must be equal to constant"};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/"+i+"/generatedValue",schemaPath:"#/allOf/1/items/properties/generatedValue/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}}if(void 0!==n.tooltip&&"string"!=typeof n.tooltip){const e={instancePath:t+"/"+i+"/tooltip",schemaPath:"#/allOf/1/items/properties/tooltip/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){const e={required:{binding:[]}},n={required:{binding:function(){return'missing binding for property "'+JSON.stringify(i)+'"'}}};let r,a;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/"+i&&n.keyword in e&&0===n.schemaPath.indexOf("#/allOf/1/items")&&/^\/[^\/]*$/.test(n.schemaPath.slice(15))&&(r=A3[n.keyword],a=e[n.keyword][n.params[r]],a&&(a.push(n),n.emUsed=!0));for(const r in e)for(const l in e[r])if(a=e[r][l],a.length){const e=n[r]&&n[r][l],c={instancePath:t+"/"+i,schemaPath:"#/allOf/1/items/errorMessage",keyword:"errorMessage",params:{errors:a},message:e?e():D3.allOf[1].items.errorMessage[r][l]};null===o?o=[c]:o.push(c),s++}const l=[];for(const e of o)e.emUsed||l.push(e);o=l,s=l.length}}}else{const e={instancePath:t,schemaPath:"#/allOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}return j3.errors=o,0===s}function I3(e,{instancePath:t="",parentData:n,parentDataProperty:i,rootData:r=e}={}){let o=null,s=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.name){const e={instancePath:t,schemaPath:"#/allOf/0/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===o?o=[e]:o.push(e),s++}if(void 0===e.id){const e={instancePath:t,schemaPath:"#/allOf/0/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===o?o=[e]:o.push(e),s++}if(void 0===e.appliesTo){const e={instancePath:t,schemaPath:"#/allOf/0/required",keyword:"required",params:{missingProperty:"appliesTo"},message:"must have required property 'appliesTo'"};null===o?o=[e]:o.push(e),s++}if(void 0===e.properties){const e={instancePath:t,schemaPath:"#/allOf/0/required",keyword:"required",params:{missingProperty:"properties"},message:"must have required property 'properties'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/allOf/0/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.id&&"string"!=typeof e.id){const e={instancePath:t+"/id",schemaPath:"#/allOf/0/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/allOf/0/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.version){let n=e.version;if("number"!=typeof n||n%1||isNaN(n)){const e={instancePath:t+"/version",schemaPath:"#/allOf/0/properties/version/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),s++}}if(void 0!==e.isDefault&&"boolean"!=typeof e.isDefault){const e={instancePath:t+"/isDefault",schemaPath:"#/allOf/0/properties/isDefault/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.deprecated){let n=e.deprecated;if("boolean"!=typeof n&&(!n||"object"!=typeof n||Array.isArray(n))){const e={instancePath:t+"/deprecated",schemaPath:"#/allOf/0/properties/deprecated/type",keyword:"type",params:{type:k3.allOf[0].properties.deprecated.type},message:"must be boolean,object"};null===o?o=[e]:o.push(e),s++}if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0!==n.message&&"string"!=typeof n.message){const e={instancePath:t+"/deprecated/message",schemaPath:"#/allOf/0/properties/deprecated/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.documentationRef){let e=n.documentationRef;if("string"==typeof e){if(!S3.test(e)){const e={instancePath:t+"/deprecated/documentationRef",schemaPath:"#/allOf/0/properties/deprecated/properties/documentationRef/pattern",keyword:"pattern",params:{pattern:"^(https|http)://.*"},message:'must match pattern "^(https|http)://.*"'};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/deprecated/documentationRef",schemaPath:"#/allOf/0/properties/deprecated/properties/documentationRef/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}}}}if(void 0!==e.appliesTo){let n=e.appliesTo;if(Array.isArray(n)){const e=n.length;for(let i=0;i0){const e={pattern:[]},n={};for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/appliesTo/"+i&&n.keyword in e&&0===n.schemaPath.indexOf("#/allOf/0/properties/appliesTo/items")&&/^\/[^\/]*$/.test(n.schemaPath.slice(36))&&(e[n.keyword].push(n),n.emUsed=!0);for(const r in e)if(e[r].length){const a={instancePath:t+"/appliesTo/"+i,schemaPath:"#/allOf/0/properties/appliesTo/items/errorMessage",keyword:"errorMessage",params:{errors:e[r]},message:r in n?n[r]():k3.allOf[0].properties.appliesTo.items.errorMessage[r]};null===o?o=[a]:o.push(a),s++}const r=[];for(const e of o)e.emUsed||r.push(e);o=r,s=r.length}}}else{const e={instancePath:t+"/appliesTo",schemaPath:"#/allOf/0/properties/appliesTo/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}if(void 0!==e.elementType){let n=e.elementType;if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.value){const e={instancePath:t+"/elementType",schemaPath:"#/allOf/0/properties/elementType/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.value){let e=n.value;if("string"==typeof e){if(!C3.test(e)){const e={instancePath:t+"/elementType/value",schemaPath:"#/allOf/0/properties/elementType/properties/value/pattern",keyword:"pattern",params:{pattern:"^[\\w\\d]+:[\\w\\d]+$"},message:'must match pattern "^[\\w\\d]+:[\\w\\d]+$"'};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/elementType/value",schemaPath:"#/allOf/0/properties/elementType/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(s>0){const e={pattern:[]},n={};for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/elementType/value"&&n.keyword in e&&0===n.schemaPath.indexOf("#/allOf/0/properties/elementType/properties/value")&&/^\/[^\/]*$/.test(n.schemaPath.slice(49))&&(e[n.keyword].push(n),n.emUsed=!0);for(const i in e)if(e[i].length){const r={instancePath:t+"/elementType/value",schemaPath:"#/allOf/0/properties/elementType/properties/value/errorMessage",keyword:"errorMessage",params:{errors:e[i]},message:i in n?n[i]():k3.allOf[0].properties.elementType.properties.value.errorMessage[i]};null===o?o=[r]:o.push(r),s++}const i=[];for(const e of o)e.emUsed||i.push(e);o=i,s=i.length}}}else{const e={instancePath:t+"/elementType",schemaPath:"#/allOf/0/properties/elementType/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){const e={required:{value:[]}},n={required:{}};let i,r;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/elementType"&&n.keyword in e&&0===n.schemaPath.indexOf("#/allOf/0/properties/elementType")&&/^\/[^\/]*$/.test(n.schemaPath.slice(32))&&(i=A3[n.keyword],r=e[n.keyword][n.params[i]],r&&(r.push(n),n.emUsed=!0));for(const i in e)for(const a in e[i])if(r=e[i][a],r.length){const e=n[i]&&n[i][a],l={instancePath:t+"/elementType",schemaPath:"#/allOf/0/properties/elementType/errorMessage",keyword:"errorMessage",params:{errors:r},message:e?e():k3.allOf[0].properties.elementType.errorMessage[i][a]};null===o?o=[l]:o.push(l),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}}if(void 0!==e.metadata){let n=e.metadata;if(!n||"object"!=typeof n||Array.isArray(n)){const e={instancePath:t+"/metadata",schemaPath:"#/allOf/0/properties/metadata/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}}if(void 0!==e.entriesVisible&&"boolean"!=typeof e.entriesVisible){const e={instancePath:t+"/entriesVisible",schemaPath:"#/allOf/0/properties/entriesVisible/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.groups){let n=e.groups;if(Array.isArray(n)){const e=n.length;for(let i=0;i0){const e={required:{id:[],label:[]}},n={required:{id:function(){return'missing id for group "'+JSON.stringify(i)+'"'},label:function(){return'missing label for group "'+JSON.stringify(i)+'"'}}};let r,a;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/groups/"+i&&n.keyword in e&&0===n.schemaPath.indexOf("#/allOf/0/properties/groups/items")&&/^\/[^\/]*$/.test(n.schemaPath.slice(33))&&(r=A3[n.keyword],a=e[n.keyword][n.params[r]],a&&(a.push(n),n.emUsed=!0));for(const r in e)for(const l in e[r])if(a=e[r][l],a.length){const e=n[r]&&n[r][l],c={instancePath:t+"/groups/"+i,schemaPath:"#/allOf/0/properties/groups/items/errorMessage",keyword:"errorMessage",params:{errors:a},message:e?e():k3.allOf[0].properties.groups.items.errorMessage[r][l]};null===o?o=[c]:o.push(c),s++}const l=[];for(const e of o)e.emUsed||l.push(e);o=l,s=l.length}}}else{const e={instancePath:t+"/groups",schemaPath:"#/allOf/0/properties/groups/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}if(void 0!==e.documentationRef){let n=e.documentationRef;if("string"==typeof n){if(!S3.test(n)){const e={instancePath:t+"/documentationRef",schemaPath:"#/allOf/0/properties/documentationRef/pattern",keyword:"pattern",params:{pattern:"^(https|http)://.*"},message:'must match pattern "^(https|http)://.*"'};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/documentationRef",schemaPath:"#/allOf/0/properties/documentationRef/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(s>0){const e={pattern:[]},n={};for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/documentationRef"&&n.keyword in e&&0===n.schemaPath.indexOf("#/allOf/0/properties/documentationRef")&&/^\/[^\/]*$/.test(n.schemaPath.slice(37))&&(e[n.keyword].push(n),n.emUsed=!0);for(const i in e)if(e[i].length){const r={instancePath:t+"/documentationRef",schemaPath:"#/allOf/0/properties/documentationRef/errorMessage",keyword:"errorMessage",params:{errors:e[i]},message:i in n?n[i]():k3.allOf[0].properties.documentationRef.errorMessage[i]};null===o?o=[r]:o.push(r),s++}const i=[];for(const e of o)e.emUsed||i.push(e);o=i,s=i.length}}}if(s>0){const e={required:{name:[],id:[],appliesTo:[],properties:[]}},n={required:{}};let i,r;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t&&n.keyword in e&&0===n.schemaPath.indexOf("#/allOf/0")&&/^\/[^\/]*$/.test(n.schemaPath.slice(9))&&(i=A3[n.keyword],r=e[n.keyword][n.params[i]],r&&(r.push(n),n.emUsed=!0));for(const i in e)for(const a in e[i])if(r=e[i][a],r.length){const e=n[i]&&n[i][a],l={instancePath:t,schemaPath:"#/allOf/0/errorMessage",keyword:"errorMessage",params:{errors:r},message:e?e():k3.allOf[0].errorMessage[i][a]};null===o?o=[l]:o.push(l),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}const a=s;let l=!0;const c=s;if(e&&"object"==typeof e&&!Array.isArray(e))if(void 0===e.properties){const e={};null===o?o=[e]:o.push(e),s++}else if(void 0!==e.properties){let t=e.properties;if(Array.isArray(t)){const e=s,n=t.length;for(let e=0;e0){const e={pattern:[]},n={};for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/icon/contents"&&n.keyword in e&&0===n.schemaPath.indexOf("#/properties/icon/properties/contents")&&/^\/[^\/]*$/.test(n.schemaPath.slice(37))&&(e[n.keyword].push(n),n.emUsed=!0);for(const i in e)if(e[i].length){const r={instancePath:t+"/icon/contents",schemaPath:"#/properties/icon/properties/contents/errorMessage",keyword:"errorMessage",params:{errors:e[i]},message:i in n?n[i]():k3.properties.icon.properties.contents.errorMessage[i]};null===o?o=[r]:o.push(r),s++}const i=[];for(const e of o)e.emUsed||i.push(e);o=i,s=i.length}}}else{const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){const e={required:{contents:[]}},n={required:{}};let i,r;for(const n of o)"errorMessage"!==n.keyword&&!n.emUsed&&n.instancePath===t+"/icon"&&n.keyword in e&&0===n.schemaPath.indexOf("#/properties/icon")&&/^\/[^\/]*$/.test(n.schemaPath.slice(17))&&(i=A3[n.keyword],r=e[n.keyword][n.params[i]],r&&(r.push(n),n.emUsed=!0));for(const i in e)for(const a in e[i])if(r=e[i][a],r.length){const e=n[i]&&n[i][a],l={instancePath:t+"/icon",schemaPath:"#/properties/icon/errorMessage",keyword:"errorMessage",params:{errors:r},message:e?e():k3.properties.icon.errorMessage[i][a]};null===o?o=[l]:o.push(l),s++}const a=[];for(const e of o)e.emUsed||a.push(e);o=a,s=a.length}}if(void 0!==e.elementType){let n=e.elementType;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0!==n.eventDefinition&&"bpmn:MessageEventDefinition"!==n.eventDefinition){const e={instancePath:t+"/elementType/eventDefinition",schemaPath:"#/properties/elementType/allOf/0/allOf/0/properties/eventDefinition/enum",keyword:"enum",params:{allowedValues:k3.properties.elementType.allOf[0].allOf[0].properties.eventDefinition.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}const i=s;let r=!0;const a=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.eventDefinition){const e={};null===o?o=[e]:o.push(e),s++}var P=a===s;if(s=i,null!==o&&(i?o.length=i:o=null),P){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.value){const e={instancePath:t+"/elementType",schemaPath:"#/properties/elementType/allOf/0/allOf/1/then/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.value){let e=n.value;if("bpmn:StartEvent"!==e&&"bpmn:IntermediateCatchEvent"!==e&&"bpmn:IntermediateThrowEvent"!==e&&"bpmn:BoundaryEvent"!==e&&"bpmn:EndEvent"!==e){const e={instancePath:t+"/elementType/value",schemaPath:"#/properties/elementType/allOf/0/allOf/1/then/properties/value/enum",keyword:"enum",params:{allowedValues:k3.properties.elementType.allOf[0].allOf[1].then.properties.value.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}}}r=P=e===s}if(!r){const e={instancePath:t+"/elementType",schemaPath:"#/properties/elementType/allOf/0/allOf/1/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}}if(void 0!==e.groups){let n=e.groups;if(Array.isArray(n)){const e=n.length;for(let i=0;iHx(e,t)))}function X3(e,t){return e.get("properties").find((e=>e.name===t.name))}function K3(e,t){return e.get("inputParameters").find((e=>e.target===t.name))}function Y3(e,t){return e.get("outputParameters").find((e=>e.source===t.source))}function Z3(e,t){return e.get("values").find((e=>e.key===t.key))}function J3(e){if(Hx(e,"bpmn:Event")){const t=e.get("eventDefinitions");if(!t||!t.length)return;e=t[0]}if(e)return e.get("messageRef")}function e5(e){if(void 0!==e.value)return e.value;if(e.generatedValue){const{type:t}=e.generatedValue;if("uuid"===t)return L2()}}function t5(e){const t=Wx(e);if(t)return t.get("camunda:modelerTemplate")}function n5(e){const t=Wx(e);if(t)return t.get("camunda:modelerTemplateVersion")}function i5(e,t){const n=Wx(e);let i;return i=Hx(n,"bpmn:ExtensionElements")?n:n.get("extensionElements"),i?i.get("values").find((e=>Hx(e,t))):null}function r5(e,t){const n=p5(e);return n?n.get("values").filter((e=>Ux(e,t))):[]}function o5(e,t){const n=p5(e);if(!n)return;const{type:i}=t;let r;return"camunda:in"===i?r=e=>Hx(e,"camunda:In")&&u5(e,t):"camunda:out"===i?r=e=>Hx(e,"camunda:Out")&&u5(e,t):"camunda:in:businessKey"===i&&(r=e=>Hx(e,"camunda:In")&&"businessKey"in e),n.get("values").find(r)}function s5(e,t){return e.get("values").find((e=>e.name===t.name))}function a5(e,t){return e.get("inputParameters").find((e=>e.name===t.name))}function l5(e,t){return e.get("outputParameters").find((function(e){const{value:n}=e;if(!t.scriptFormat)return n===t.source;const i=e.get("camunda:definition");return!(!i||t.scriptFormat!==i.get("camunda:scriptFormat"))&&i.get("camunda:value")===t.source}))}function c5(e,t){let n;return r5(e,["camunda:ErrorEventDefinition"]).find((e=>{if(n=e.get("bpmn:errorRef"),n)return n.get("bpmn:id").startsWith(`Error_${t}`)}))}function p5(e){const t=Wx(e);return Hx(t,"bpmn:ExtensionElements")?t:t.get("extensionElements")}function u5(e,t){if("camunda:in"===t.type&&t.target)return e.target===t.target;if("camunda:out"===t.type){if(t.source)return e.source===t.source;if(t.sourceExpression)return e.sourceExpression===t.sourceExpression}return t.variables?"all"===e.variables&&("local"!==t.variables||e.local):void 0}let d5=class{constructor(e,t,n,i){this._commandStack=e,this._eventBus=t,this._injector=i,this._modeling=n,this._templates={}}get(e,t){const n=this._templates;let i;return p(e)?null:y(e)?(p(t)&&(t="_"),n[e]&&n[e][t]?n[e][t]:null):(i=e,this.get(this._getTemplateId(i),this._getTemplateVersion(i)))}getDefault(e){return b(this.getAll(e),(function(e){return e.isDefault}))||null}getAll(e){return this._getTemplateVerions(e,{includeDeprecated:!0})}getLatest(e,t={}){return this._getTemplateVerions(e,{...t,latest:!0})}set(e){this._templates={},e.forEach((e=>{const t=e.id,n=p(e.version)?"_":e.version;this._templates[t]||(this._templates[t]={latest:e}),this._templates[t][n]=e;const i=this._templates[t].latest.version;(p(i)||e.version>i)&&(this._templates[t].latest=e)}))}_getTemplateVerions(e,t={}){const{latest:n,deprecated:i}=t,r=this._templates,o=e=>{const{latest:t,...r}=e;return n?!i&&t.deprecated?[]:[t]:T(r)};if(d(e))return a(T(r).map(o));if(f(e)){const n=e;return w(this._getTemplateVerions(null,t),(function(e){return Ux(n,e.appliesTo)}))||[]}if(y(e))return r[e]&&o(r[e]);throw new Error("argument must be of type {string|djs.model.Base|undefined}")}_getTemplateId(e){return t5(e)}_getTemplateVersion(e){return n5(e)}applyTemplate(e,t){let n="apply",i={element:e,newTemplate:t};const r=this.get(e);r&&!t&&(n="unlink",i={element:e}),t&&r&&t.id===r.id&&(n="update");const o={element:e,newTemplate:t,oldTemplate:r};return this._commandStack.execute("propertiesPanel.camunda.changeTemplate",o),this._eventBus.fire(`elementTemplates.${n}`,i),o.element}removeTemplate(e){this._injector.get("eventBus").fire("elementTemplates.remove",{element:e});const t={element:e};return this._commandStack.execute("propertiesPanel.removeTemplate",t),t.newElement}unlinkTemplate(e){return this.applyTemplate(e,null)}};d5.$inject=["commandStack","eventBus","modeling","injector"];class h5 extends d5{constructor(e,t,n,i,r){super(t,n,i,r),this._templateElementFactory=e}_getTemplateId(e){return W3(e)}_getTemplateVersion(e){return G3(e)}createElement(e){if(!e)throw new Error("template is missing");return this._templateElementFactory.create(e)}applyTemplate(e,t){let n="apply",i={element:e,newTemplate:t};const r=this.get(e);r&&!t&&(n="unlink",i={element:e}),t&&r&&t.id===r.id&&(n="update");const o={element:e,newTemplate:t,oldTemplate:r};return this._commandStack.execute("propertiesPanel.zeebe.changeTemplate",o),this._eventBus.fire(`elementTemplates.${n}`,i),o.element}}h5.$inject=["templateElementFactory","commandStack","eventBus","modeling","injector"];const f5="0.18.0",m5=["bpmn:Activity","bpmn:Event","bpmn:Gateway"];let g5=class{constructor(e){this._templatesById={},this._validTemplates=[],this._errors=[],this._moddle=e}addAll(e){return h(e)?e.forEach(this.add,this):this._logError("templates must be []"),this}add(e){let t,n;return this._validateTemplate(e)||(t=e.id,n=e.version||"_",this._templatesById[t]||(this._templatesById[t]={}),this._templatesById[t][n]=e,this._validTemplates.push(e)),this}_validateTemplate(e){let t;const n=e.id,i=e.version||"_",r=e.$schema&&y5(e.$schema);if(r&&q2()(f5,r)<0)return this._logError(`unsupported element template schema version <${r}>. Your installation only supports up to version <${f5}>. Please update your installation`,e);if(this._templatesById[n]&&this._templatesById[n][i])return"_"===i?this._logError(`template id <${n}> already used`,e):this._logError(`template id <${n}> and version <${i}> already used`,e);const o=this._validateElementType(e);if(o)return o;const s=O3(e),{errors:a,valid:l}=s;return l||(t=new Error("invalid template"),v5(a).forEach((t=>{this._logError(t.message,e)}))),t}_validateElementType(e){if(e.elementType&&e.appliesTo){const t=e.elementType.value,n=e.appliesTo;if(!n.find((e=>this._isType(t,e))))return this._logError(`template does not apply to requested element type <${t}>`,e);for(const i of n)if(!this._canMorph(i,t))return this._logError(`can not morph <${i}> into <${t}>`,e)}}_isType(e,t){const n=this._moddle.getType(e);return n&&t in this._moddle.getElementDescriptor(n).allTypesByName}_canMorph(e,t){if(e===t)return!0;const n=m5.find((t=>this._isType(e,t)));return!!n&&this._isType(t,n)}_logError(e,t){if(y(e)){if(t){const{id:n,name:i}=t;e=`template(id: <${n}>, name: <${i}>): ${e}`}e=new Error(e)}return this._errors.push(e),e}getErrors(){return this._errors}getValidTemplates(){return this._validTemplates}};function y5(e){const t=e.match(/\d+\.\d+\.\d+/g);return null===t?void 0:t[0]}function v5(e){return w(e,(e=>{const{instancePath:t,keyword:n}=e;return"errorMessage"===n||!("type"!==n||!t||t.startsWith("/scopes/"))}))}const b5="0.20.0";class x5 extends g5{constructor(e){super(e)}_validateTemplate(e){let t;const n=e.id,i=e.version||"_",r=e.$schema,o=r&&y5(r);if(!r)return this._logError("missing $schema attribute.",e);if(!this.isSchemaValid(r))return this._logError(`unsupported $schema attribute <${r}>.`,e);if(o&&q2()(b5,o)<0)return this._logError(`unsupported element template schema version <${o}>. Your installation only supports up to version <${b5}>. Please update your installation`,e);if(this._templatesById[n]&&this._templatesById[n][i])return"_"===i?this._logError(`template id <${n}> already used`,e):this._logError(`template id <${n}> and version <${i}> already used`,e);const s=this._validateElementType(e);if(s)return s;const a=q3(e),{errors:l,valid:c}=a;return c||(t=new Error("invalid template"),v5(l).forEach((t=>{this._logError(t.message,e)}))),t}isSchemaValid(e){return e&&e.includes("@camunda/zeebe-element-templates-json-schema")}}let w5=class{constructor(e,t,n,i){this._loadTemplates=e,this._eventBus=t,this._elementTemplates=n,this._moddle=i,t.on("diagram.init",(()=>{this.reload()}))}reload(){const e=this._loadTemplates;if(!p(e))return g(e)?e(((e,t)=>{if(e)return this.templateErrors([e]);this.setTemplates(t)})):e.length?this.setTemplates(e):void 0}setTemplates(e){const t=this._elementTemplates,n=this._moddle,i=new g5(n).addAll(e),r=i.getErrors(),o=i.getValidTemplates();t.set(o),r.length&&this.templateErrors(r),this.templatesChanged()}templatesChanged(){this._eventBus.fire("elementTemplates.changed")}templateErrors(e){this._eventBus.fire("elementTemplates.errors",{errors:e})}};w5.$inject=["config.elementTemplates","eventBus","elementTemplates","moddle"];class _5 extends w5{constructor(e,t,n,i){super(e,t,n,i),this._elementTemplates=n}setTemplates(e){const t=this._elementTemplates,n=this._moddle,i=new x5(n).addAll(e),r=i.getErrors(),o=i.getValidTemplates();t.set(o),r.length&&this.templateErrors(r),this.templatesChanged()}}function E5(e,t,n,i){const r=i.create(e,t);return n&&(r.$parent=n),r}function O5(e){return new s([32,32,1]).nextPrefixed(e)}function P5(e){let t=e;for(;t.$parent;)t=t.$parent;return t}function k5(e,t){const n=P5(e);return i=n.get("rootElements"),r=t,(i||[]).filter((e=>Hx(e,r)));var i,r}function S5(e,t,n){const{name:i}=e;return n.create("zeebe:Input",{source:t,target:i})}function C5(e,t,n){const{source:i}=e;return n.create("zeebe:Output",{source:i,target:t})}function T5(e,t,n){const{key:i}=e;return n.create("zeebe:Header",{key:i,value:t})}function A5(e={},t){return t.create("zeebe:TaskDefinition",e)}function M5(e,t="",n){const{name:i}=e;return n.create("zeebe:Property",{name:i,value:t})}function D5(e,t){const{optional:n}=t;return e||!n}function R5(e,t,n){const i=Wx(e);let r=i.get("extensionElements");r||(r=E5("bpmn:ExtensionElements",{},i,n),i.set("extensionElements",r));let o=Q3(r,t);return o||(o=n.create(t),o.$parent=r,r.get("values").push(o)),o}_5.$inject=["config.elementTemplates","eventBus","elementTemplates","moddle"];const N5="property",$5="zeebe:property",j5="zeebe:input",I5="zeebe:output",L5="zeebe:property",B5="zeebe:taskDefinition:type",q5="zeebe:taskDefinition",z5="zeebe:taskHeader",F5="bpmn:Message#property",V5="bpmn:Message#zeebe:subscription#property",H5="zeebe:calledElement",U5=[V5,j5,I5,L5,B5,q5,z5,H5],W5=[B5,q5],G5=[j5,I5],Q5=[F5,V5],X5=[N5,F5];function K5(e){return e.type===B5?"type":e.property}function Y5(e,t){const n=t.get("modeling"),i=t.get("canvas"),r=t.get("bpmnjs"),o=i.getRootElement(),s=r.getDefinitions(),a=s.get("rootElements"),l=a.filter((t=>t!==e));l.length!==a.length&&n.updateModdleProperties(o,s,{rootElements:l})}function Z5(e){const t=Wx(e);return Hx(t,"bpmn:Event")?t.get("eventDefinitions")[0]:t}let J5=class{constructor(e,t,n,i,r){this._bpmnFactory=e,this._bpmnReplace=t,this._modeling=i,this._commandStack=n,this._injector=r}preExecute(e){let t=e.newTemplate,n=e.oldTemplate,i=e.element;this._updateZeebeModelerTemplate(i,t),this._updateZeebeModelerTemplateIcon(i,t),t&&(i=e.element=this._updateElementType(i,n,t),this._updateProperties(i,n,t),this._updateZeebeTaskDefinition(i,n,t),this._updateZeebeInputOutputParameterProperties(i,n,t),this._updateZeebeTaskHeaderProperties(i,n,t),this._updateZeebePropertyProperties(i,n,t),this._updateMessage(i,n,t),this._updateCalledElement(i,n,t))}_getOrCreateExtensionElements(e,t=Wx(e)){const n=this._bpmnFactory,i=this._modeling;let r=t.get("extensionElements");return r||(r=n.create("bpmn:ExtensionElements",{values:[]}),r.$parent=t,i.updateModdleProperties(e,t,{extensionElements:r})),r}_updateZeebeModelerTemplate(e,t){const n=this._modeling,i=t&&t.id,r=t&&t.version;W3(e)===i&&G3(e)===r||n.updateProperties(e,{"zeebe:modelerTemplate":i,"zeebe:modelerTemplateVersion":r})}_updateZeebeModelerTemplateIcon(e,t){const n=this._modeling,i=t&&t.icon,r=i&&i.contents;(function(e){const t=Wx(e);if(t)return t.get("zeebe:modelerTemplateIcon")})(e)!==r&&n.updateProperties(e,{"zeebe:modelerTemplateIcon":r})}_updateProperties(e,t,n){const i=this._commandStack,r=Wx(e),o=n.properties.filter((e=>"property"===e.binding.type)),s=t&&t.properties.filter((e=>"property"===e.binding.type&&!o.find((t=>t.binding.name===e.binding.name))))||[];if(s.length){const t=s.reduce(((e,t)=>(e[t.binding.name]=void 0,e)),{});i.execute("element.updateModdleProperties",{element:e,moddleElement:r,properties:t})}o.length&&o.forEach((n=>{const o=t4(t,n),s=n.binding.name,a=e5(n);let l={};n4(r,o,n)||(l[s]=a,i.execute("element.updateModdleProperties",{element:e,moddleElement:r,properties:l}))}))}_updateZeebeTaskDefinition(e,t,n){const i=this._bpmnFactory,r=this._commandStack,o=n.properties.filter((e=>{const t=e.binding.type;return W5.includes(t)})),s=this._getOrCreateExtensionElements(e);let a=Q3(s,"zeebe:TaskDefinition");if(!o.length)return void r.execute("element.updateModdleProperties",{element:e,moddleElement:s,properties:{values:E(s.get("values"),a)}});o.forEach((n=>{const o=t4(t,n),l=e5(n),c=K5(n.binding);if(a){if(!n4(a,o,n)){const t={[c]:l};r.execute("element.updateModdleProperties",{element:e,moddleElement:a,properties:t})}}else{a=A5({[c]:l},i),a.$parent=s,r.execute("element.updateModdleProperties",{element:e,moddleElement:s,properties:{values:[...s.get("values"),a]}})}}));(t&&t.properties.filter((e=>{const t=e.binding.type;return W5.includes(t)&&!o.find((t=>t.binding.property===e.binding.property))}))||[]).forEach((t=>{const n={[t.binding.property]:void 0};r.execute("element.updateModdleProperties",{element:e,moddleElement:a,properties:n})}))}_updateZeebeInputOutputParameterProperties(e,t,n){const i=this._bpmnFactory,r=this._commandStack,o=n.properties.filter((e=>{const t=e.binding.type;return"zeebe:input"===t||"zeebe:output"===t})),s=this._getOrCreateExtensionElements(e);let a=Q3(s,"zeebe:IoMapping");if(!o.length){if(!a)return;r.execute("element.updateModdleProperties",{element:e,moddleElement:s,properties:{values:E(s.get("values"),a)}})}a||(a=i.create("zeebe:IoMapping"),a.$parent=s,r.execute("element.updateModdleProperties",{element:e,moddleElement:s,properties:{values:[...s.get("values"),a]}}));const l=a.get("zeebe:inputParameters")?a.get("zeebe:inputParameters").slice():[],c=a.get("zeebe:outputParameters")?a.get("zeebe:outputParameters").slice():[];let p;o.forEach((n=>{const o=t4(t,n),u=e4(s,n),d=e5(n),h=n.binding,f=h.type;let m,g;u?((D5(d,n)||n4(u,o,n))&&(Hx(u,"zeebe:Input")?r4(l,u):r4(c,u)),n4(u,o,n)||(g=Hx(u,"zeebe:Input")?{source:d}:{target:d},r.execute("element.updateModdleProperties",{element:e,moddleElement:u,properties:g}))):D5(d,n)&&("zeebe:input"===f?(p="inputParameters",m=S5(h,d,i)):(p="outputParameters",m=C5(h,d,i)),m.$parent=a,r.execute("element.updateModdleProperties",{element:e,moddleElement:a,properties:{[p]:[...a.get(p),m]}}))})),l.length&&r.execute("element.updateModdleProperties",{element:e,moddleElement:a,properties:{inputParameters:E(a.get("inputParameters"),(e=>l.includes(e)))}}),c.length&&r.execute("element.updateModdleProperties",{element:e,moddleElement:a,properties:{outputParameters:E(a.get("outputParameters"),(e=>c.includes(e)))}})}_updateZeebeTaskHeaderProperties(e,t,n){const i=this._bpmnFactory,r=this._commandStack,o=n.properties.filter((e=>"zeebe:taskHeader"===e.binding.type)),s=this._getOrCreateExtensionElements(e);let a=Q3(s,"zeebe:TaskHeaders");if(!o.length){if(!a)return;r.execute("element.updateModdleProperties",{element:e,moddleElement:s,properties:{values:E(s.get("values"),a)}})}a||(a=i.create("zeebe:TaskHeaders"),a.$parent=s,r.execute("element.updateModdleProperties",{element:e,moddleElement:s,properties:{values:[...s.get("values"),a]}}));const l=a.get("zeebe:values")?a.get("zeebe:values").slice():[];o.forEach((n=>{const o=t4(t,n),c=e4(s,n),p=e5(n),u=n.binding;if(c){if(!n4(c,o,n)){const t={value:p};r.execute("element.updateModdleProperties",{element:e,moddleElement:c,properties:t})}r4(l,c)}else if(p){const t=T5(u,p,i);t.$parent=a,r.execute("element.updateModdleProperties",{element:e,moddleElement:a,properties:{values:[...a.get("values"),t]}})}})),l.length&&r.execute("element.updateModdleProperties",{element:e,moddleElement:a,properties:{values:E(a.get("values"),(e=>l.includes(e)))}})}_updateZeebePropertyProperties(e,t,n){const i=this._bpmnFactory,r=this._commandStack,o=n.properties.filter((e=>"zeebe:property"===e.binding.type)),s=this._getOrCreateExtensionElements(e);let a=Q3(s,"zeebe:Properties");if(!o.length){if(!a)return;r.execute("element.updateModdleProperties",{element:e,moddleElement:s,properties:{values:E(s.get("values"),a)}})}a||(a=i.create("zeebe:Properties"),a.$parent=s,r.execute("element.updateModdleProperties",{element:e,moddleElement:s,properties:{values:[...s.get("values"),a]}}));const l=a.get("properties")?a.get("properties").slice():[];o.forEach((n=>{const o=t4(t,n),c=e4(s,n),p=e5(n),u=n.binding;if(c)(D5(p,n)||n4(c,o,n))&&r4(l,c),n4(c,o,n)||r.execute("element.updateModdleProperties",{element:e,moddleElement:c,properties:{value:p}});else if(D5(p,n)){const t=M5(u,p,i);t.$parent=a,r.execute("element.updateModdleProperties",{element:e,moddleElement:a,properties:{properties:[...a.get("properties"),t]}})}})),l.length&&r.execute("element.updateModdleProperties",{element:e,moddleElement:a,properties:{properties:E(a.get("properties"),(e=>l.includes(e)))}})}_updateMessage(e,t,n){this._updateMessageProperties(e,t,n),this._updateMessageZeebeSubscriptionProperties(e,t,n),this._updateZeebeModelerTemplateOnReferencedElement(e,t,n),n.properties.some((e=>Q5.includes(e.binding.type)))||function(e,t){const n=t.get("modeling"),i=Z5(e);if(!i)return;const r=J3(i);r&&(n.updateModdleProperties(e,i,{messageRef:void 0}),Y5(r,t))}(e,this._injector)}_updateMessageProperties(e,t,n){const i=n.properties.filter((e=>e.binding.type===F5)),r=t&&t.properties.filter((e=>e.binding.type===F5&&!i.find((t=>t.binding.name===e.binding.name))))||[];let o=this._getMessage(e);o&&r.forEach((t=>{this._modeling.updateModdleProperties(e,o,{[t.binding.name]:void 0})})),i.length&&(o=this._getOrCreateMessage(e,n),i.forEach((n=>{const i=t4(t,n),r=n.binding.name,s=e5(n),a=o;let l={};n4(a,i,n)||(l[r]=s,this._modeling.updateModdleProperties(e,a,l))})))}_updateMessageZeebeSubscriptionProperties(e,t,n){const i=n.properties.filter((e=>e.binding.type===V5)),r=t&&t.properties.filter((e=>e.binding.type===V5&&!i.find((t=>t.binding.name===e.binding.name))))||[];if(!i.length&&!r.length)return;const o=this._getOrCreateMessage(e,n),s=this._getOrCreateExtensionElements(e,o),a=this._getSubscription(e,o),l=i.reduce(((e,n)=>{const i=t4(t,n),r=n.binding.name,o=e5(n);return n4(a,i,n)||(e[r]=o),e}),{});if(a)this._modeling.updateModdleProperties(e,a,l);else{const t=E5("zeebe:Subscription",l,o,this._bpmnFactory);this._modeling.updateModdleProperties(e,s,{values:[...s.get("values"),t]})}if(!t||!a)return;const c=r.reduce(((e,t)=>(e[t.binding.name]=void 0,e)),{});this._modeling.updateModdleProperties(e,a,c)}_updateZeebeModelerTemplateOnReferencedElement(e,t,n){const i=J3(Wx(e));i&&W3(i)!==n.id&&this._modeling.updateModdleProperties(e,i,{"zeebe:modelerTemplate":n.id})}_getSubscription(e,t){const n=Q3(this._getOrCreateExtensionElements(e,t),"zeebe:Subscription");if(n)return n}_getOrCreateMessage(e,t){return this._getMessage(e)||this._createMessage(e,t)}_createMessage(e,t){let n=Wx(e);Hx(n,"bpmn:Event")&&(n=n.get("eventDefinitions")[0]);const i=this._bpmnFactory.create("bpmn:Message",{"zeebe:modelerTemplate":t.id});return i.$parent=P5(n),this._modeling.updateModdleProperties(e,n,{messageRef:i}),i}_getMessage(e){let t=Wx(e);return Hx(t,"bpmn:Event")&&(t=t.get("eventDefinitions")[0]),t&&t.get("messageRef")}_updateCalledElement(e,t,n){const i=this._bpmnFactory,r=this._commandStack,o=n.properties.filter((e=>e.binding.type===H5)),s=this._getOrCreateExtensionElements(e);let a=Q3(s,"zeebe:CalledElement");if(!o.length)return void r.execute("element.updateModdleProperties",{element:e,moddleElement:s,properties:{values:E(s.get("values"),a)}});o.forEach((n=>{const o=t4(t,n),l=e5(n),c=n.binding.property;if(a){if(!n4(a,o,n)){const t={[c]:l};r.execute("element.updateModdleProperties",{element:e,moddleElement:a,properties:t})}}else{a=function(e={},t){return t.create("zeebe:CalledElement",e)}({[c]:l},i),a.$parent=s,r.execute("element.updateModdleProperties",{element:e,moddleElement:s,properties:{values:[...s.get("values"),a]}})}}));(t&&t.properties.filter((e=>e.binding.type===H5&&!o.find((t=>t.binding.property===e.binding.property))))||[]).forEach((t=>{const n={[t.binding.property]:void 0};r.execute("element.updateModdleProperties",{element:e,moddleElement:a,properties:n})}))}_updateElementType(e,t,n){const i=n.elementType;if(!i)return e;const r=t&&t.elementType||{value:e.type};if(r&&r.value===i.value&&r.eventDefinition===i.eventDefinition)return e;const o={type:i.value};i.eventDefinition&&(o.eventDefinitionType=i.eventDefinition);return this._bpmnReplace.replaceElement(e,o)}};function e4(e,t){const n=Wx(e),i=t.binding,r=i.type;if(W5.includes(r))return Q3(n,"zeebe:TaskDefinition");if("zeebe:input"===r||"zeebe:output"===r){const e=Q3(n,"zeebe:IoMapping");if(!e)return;return"zeebe:input"===r?b(e.get("zeebe:inputParameters"),(function(e){return e.get("zeebe:target")===i.name})):b(e.get("zeebe:outputParameters"),(function(e){return e.get("zeebe:source")===i.source}))}if("zeebe:taskHeader"===r){const e=Q3(n,"zeebe:TaskHeaders");if(!e)return;return b(e.get("zeebe:values"),(function(e){return e.get("zeebe:key")===i.key}))}if("zeebe:property"===r){const e=Q3(n,"zeebe:Properties");if(!e)return;return e.get("properties").find((e=>e.get("name")===i.name))}}function t4(e,t){if(!e)return;const n=e.properties,i=t.binding,r=i.name,o=i.type;return"property"===o?b(n,(function(e){const t=e.binding,n=t.name;return"property"===t.type&&n===r})):W5.includes(o)?b(n,(function(e){return K5(e.binding)===K5(i)})):"zeebe:input"===o?b(n,(function(e){const t=e.binding,n=t.name;if("zeebe:input"===t.type)return n===r})):"zeebe:output"===o?b(n,(function(e){const t=e.binding;if("zeebe:output"===t.type)return t.source===i.source})):"zeebe:taskHeader"===o?b(n,(function(e){const t=e.binding;if("zeebe:taskHeader"===t.type)return t.key===i.key})):"zeebe:property"===o?n.find((e=>{const t=e.binding;if("zeebe:property"===t.type)return t.name===i.name})):o===F5?n.find((e=>{const t=e.binding;if(t.type===F5)return t.name===i.name})):o===V5?n.find((e=>{const t=e.binding;if(t.type===V5)return t.name===i.name})):void 0}function n4(e,t,n){if("Hidden"===n.type)return!1;if("Dropdown"===n.type){const t=i4(e,n);return n.choices&&n.choices.some((e=>e.value===t))}return t?function(e,t){const n=t.value;return i4(e,t)!==n}(e,t):!!i4(e,n)}function i4(e,t){const n=Wx(e);if(!n)return;const i=t.binding,r=i.name,o=i.type;return"property"===o?n.get(r):W5.includes(o)?n.get(K5(i)):"zeebe:input"===o?n.get("zeebe:source"):"zeebe:output"===o?n.get("zeebe:target"):"zeebe:taskHeader"===o||"zeebe:property"===o?n.get("zeebe:value"):o===F5||o===V5?n.get(r):void 0}function r4(e,t){const n=e.indexOf(t);return p(n)||e.splice(n,1),e}J5.$inject=["bpmnFactory","bpmnReplace","commandStack","modeling","injector"];class o4{constructor(e,t,n,i,r,o,s){this._modeling=e,this._elementFactory=t,this._elementRegistry=n,this._canvas=i,this._bpmnFactory=r,this._replace=o,this._commandStack=s}preExecute(e){const{element:t}=e;t.parent?e.newElement=this._removeTemplate(t):e.newElement=this._removeRootTemplate(t)}_removeTemplate(e){const t=this._replace,n=Wx(e),i=n.$type,r=this._getEventDefinitionType(n),o=this._createBlankBusinessObject(e);return t.replaceElement(e,{type:i,businessObject:o,eventDefinitionType:r},{createElementsBehavior:!1})}_removeRootTemplate(e){var t=this._modeling,n=this._elementFactory,i=this._elementRegistry,r=this._canvas;if(function(e){return Hx(Gx(e),"bpmndi:BPMNPlane")}(e)){const t=F3(e),n=i.get(t);if(n&&n!==e)return r.setRootElement(r.findRoot(n)),this._removeTemplate(n)}const o=Wx(e).$type,s=this._createBlankBusinessObject(e),a=n.create("root",{type:o,businessObject:s});return this._commandStack.execute("canvas.updateRoot",{newRoot:a,oldRoot:e}),t.moveElements(e.children,{x:0,y:0},a),a}_getEventDefinitionType(e){if(!e.eventDefinitions)return null;const t=e.eventDefinitions[0];return t?t.$type:null}_createBlankBusinessObject(e){const t=this._bpmnFactory,n=Wx(e),i=t.create(n.$type),r=kF(e);return r?(Hx(e,"bpmn:Group")&&(i.categoryValueRef=t.create("bpmn:CategoryValue")),function(e,t){var n=e.businessObject,i=PF(n);i&&("categoryValueRef"===i?n.categoryValueRef.value=t:n[i]=t)}({businessObject:i},r),i):i}}o4.$inject=["modeling","elementFactory","elementRegistry","canvas","bpmnFactory","replace","commandStack"];class s4{constructor(e){this._commandStack=e}preExecute(e){const t=this._commandStack;_(e,(function(e){t.execute(e.cmd,e.context)}))}}s4.$inject=["commandStack"];let a4=class{constructor(e,t,n){e.registerHandler("element-templates.multi-command-executor",s4),e.registerHandler("propertiesPanel.zeebe.changeTemplate",J5),e.registerHandler("propertiesPanel.removeTemplate",o4),n.on(["commandStack.shape.create.postExecuted"],(function(n){const{context:{hints:i={},shape:r}}=n;!1!==i.createElementsBehavior&&l4(r,t,e)})),n.on(["commandStack.connection.create.postExecuted"],(function(n){const{context:{hints:i={},connection:r}}=n;!1!==i.createElementsBehavior&&l4(r,t,e)}))}};function l4(e,t,n){if(!t.get(e)&&t.getDefault(e)){const i="propertiesPanel.zeebe.changeTemplate",r={element:e,newTemplate:t.getDefault(e)};n.execute(i,r)}}a4.$inject=["commandStack","elementTemplates","eventBus"];class c4{static create(e,t){const{property:n}=t,{binding:i}=n,{name:r}=i,o=e5(n);Wx(e)[r]=o}}class p4{static create(e,t){const{property:n,bpmnFactory:i}=t,r=e5(n),o=K5(n.binding);R5(e,"zeebe:TaskDefinition",i).set(o,r)}}class u4{static create(e,t){const{property:n,bpmnFactory:i}=t,{binding:r}=n,o=e5(n),s=R5(e,"zeebe:IoMapping",i);if(!D5(o,n))return;const a=S5(r,o,i);a.$parent=s,s.get("inputParameters").push(a)}}class d4{static create(e,t){const{property:n,bpmnFactory:i}=t,{binding:r}=n,o=e5(n),s=R5(e,"zeebe:IoMapping",i);if(!D5(o,n))return;const a=C5(r,o,i);a.$parent=s,s.get("outputParameters").push(a)}}class h4{static create(e,t){const{property:n,bpmnFactory:i}=t,{binding:r}=n,o=e5(n),s=R5(e,"zeebe:TaskHeaders",i),a=T5(r,o,i);a.$parent=s,s.get("values").push(a)}}class f4{static create(e,t){const{property:n,bpmnFactory:i}=t,{binding:r}=n,o=e5(n),s=R5(e,"zeebe:Properties",i);if(!D5(o,n))return;const a=M5(r,o,i);a.$parent=s,s.get("properties").push(a)}}class m4{static create(e,t){const{bpmnFactory:n,property:i}=t,{binding:r}=i,{name:o}=r,s=e5(i);let a=Wx(e);Hx(a,"bpmn:Event")&&(a=a.get("eventDefinitions")[0]);let l=a.get("messageRef");l||(l=n.create("bpmn:Message",{"zeebe:modelerTemplate":W3(e)}),a.set("messageRef",l)),l.set(o,s)}}class g4{static create(e,t){const{bpmnFactory:n,property:i}=t,{binding:r}=i,{name:o}=r,s=e5(i);let a=Wx(e);Hx(a,"bpmn:Event")&&(a=a.get("eventDefinitions")[0]);let l=a.get("messageRef");l||(l=n.create("bpmn:Message",{"zeebe:modelerTemplate":W3(e)}),a.set("messageRef",l));const c=R5(l,"zeebe:Subscription",n);D5(s,i)&&c.set(o,s)}}class y4{static create(e,t){const{property:n,bpmnFactory:i}=t,{binding:r}=n,{property:o}=r,s=e5(n),a=R5(e,"zeebe:CalledElement",i);!function(e){e.set("propagateAllChildVariables",!1),e.set("propagateAllParentVariables",!1)}(a),a.set(o,s)}}const v4=["Boolean","Integer","String"];function b4(e,t,n){const i=function(e,t){let n=Wx(e);const i="",{binding:r}=t,{name:o,property:s,type:a}=r;if("property"===a){const e=n.get(o);return p(e)?i:e}if(W5.includes(a)){const e=Q3(n,"zeebe:TaskDefinition");if(e){if(a===B5)return e.get("type");if(a===q5)return e.get(s)}return i}if(G5.includes(a)){const e=Q3(n,"zeebe:IoMapping");if(!e)return i;if(a===j5){const t=K3(e,r);return t?t.get("source"):i}if(a===I5){const t=Y3(e,r);return t?t.get("target"):i}}if(a===z5){const e=Q3(n,"zeebe:TaskHeaders");if(!e)return i;const t=Z3(e,r);return t?t.get("value"):i}if(a===L5){const e=Q3(n,"zeebe:Properties");if(e){const t=X3(e,r);if(t)return t.get("value")}return i}if(a===F5){const e=J3(n),t=e?e.get(o):void 0;return p(t)?i:t}if(a===V5){const e=J3(n);if(e){const t=Q3(e,"zeebe:Subscription");if(!p(t?t.get(o):void 0))return t.get(o)}return i}if(a===H5){const e=Q3(n,"zeebe:CalledElement");return e?e.get(s):i}throw E4(e,t)}(e,t),{type:r}=t;return"Boolean"===r?function(e){switch(e){case"true":return!0;case"false":return!1}return e}(i):i}const x4=null;function w4(e,t,n,i,r){let o=Wx(n);const{binding:s}=i,{name:a,type:l}=s;let c,u;const d=[],h={element:n,property:i};if(Q5.includes(l)){Hx(o,"bpmn:Event")&&(o=o.get("eventDefinitions")[0]);let t=J3(o);t||(t=e.create("bpmn:Message",{"zeebe:modelerTemplate":W3(n)}),d.push({cmd:"element.updateModdleProperties",context:{...h,moddleElement:o,properties:{messageRef:t}}})),o=t}if(U5.includes(l)&&(c=o.get("extensionElements"),c?d.push(x4):(c=E5("bpmn:ExtensionElements",null,o,e),d.push({cmd:"element.updateModdleProperties",context:{...h,moddleElement:o,properties:{extensionElements:c}}}))),X5.includes(l)){const e=o.$descriptor.propertiesByName[a];if(e){const{type:t}=e;if(!v4.includes(t))throw new Error(`cannot set property of type <${t}>`);"Boolean"===t?u=!!r:"Integer"===t?(u=parseInt(r,10),isNaN(u)&&(u=void 0)):u=r||""}else u=r||"";p(u)?d.push(x4):d.push({cmd:"element.updateModdleProperties",context:{...h,moddleElement:o,properties:{[a]:u}}})}if(W5.includes(l)){const t=Q3(c,"zeebe:TaskDefinition"),n=K5(s),i={[n]:r||""};if(t)d.push({cmd:"element.updateModdleProperties",context:{...h,properties:i,moddleElement:t}});else{const t=A5(i,e);t.$parent=o;const n=c.get("values");d.push({cmd:"element.updateModdleProperties",context:{...h,moddleElement:c,properties:{values:[...n,t]}}})}}if(G5.includes(l)){let t=Q3(c,"zeebe:IoMapping");if(t||(t=E5("zeebe:IoMapping",null,o,e),d.push({cmd:"element.updateModdleProperties",context:{...h,moddleElement:c,properties:{values:[...c.get("values"),t]}}})),l===j5){const n=K3(t,s),o=t.get("inputParameters").filter((e=>e!==n));if(D5(r,i)){const t=S5(s,r,e);o.push(t)}d.push({cmd:"element.updateModdleProperties",context:{...h,moddleElement:t,properties:{inputParameters:[...o]}}})}if(l===I5){const n=Y3(t,s),o=t.get("outputParameters").filter((e=>e!==n));if(D5(r,i)){const t=C5(s,r,e);o.push(t)}d.push({cmd:"element.updateModdleProperties",context:{...h,moddleElement:t,properties:{outputParameters:[...o]}}})}}if(l===z5){let t=Q3(c,"zeebe:TaskHeaders");t||(t=E5("zeebe:TaskHeaders",null,o,e),d.push({cmd:"element.updateModdleProperties",context:{...h,moddleElement:c,properties:{values:[...c.get("values"),t]}}}));const n=Z3(t,s),i=t.get("values").filter((e=>e!==n));if(r){const n=T5(s,r,e);d.push({cmd:"element.updateModdleProperties",context:{...h,moddleElement:t,properties:{values:[...i,n]}}})}else d.push({cmd:"element.updateModdleProperties",context:{...h,moddleElement:t,properties:{values:i}}})}if(l===L5){let t=Q3(c,"zeebe:Properties");t||(t=E5("zeebe:Properties",null,o,e),d.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:c,properties:{values:[...c.get("values"),t]}}}));const a=X3(t,s),l=t.get("properties").filter((e=>e!==a));if(D5(r,i)){const t=M5(s,r,e);l.push(t)}d.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:t,properties:{properties:l}}})}if(l===V5){let t=Q3(c,"zeebe:Subscription");const i={[a]:r||""};t?d.push({cmd:"element.updateModdleProperties",context:{element:n,properties:i,moddleElement:t}}):(t=E5("zeebe:Subscription",i,c,e),d.push({cmd:"element.updateModdleProperties",context:{...h,moddleElement:c,properties:{values:[...c.get("values"),t]}}}))}if(l===H5){let t=Q3(n,"zeebe:CalledElement");const i=s.property,o={[i]:r||""};t?d.push({cmd:"element.updateModdleProperties",context:{element:n,properties:o,moddleElement:t}}):(t=E5("zeebe:CalledElement",o,c,e),d.push({cmd:"element.updateModdleProperties",context:{...h,moddleElement:c,properties:{values:[...c.get("values"),t]}}}))}if(!d.length)throw E4(n,i);{const e=d.filter((e=>e!==x4));e.length&&t.execute("element-templates.multi-command-executor",e)}}function _4(e,t,n=O4){const{constraints:i={},label:r}=t,{maxLength:o,minLength:s,notEmpty:a}=i;if(a&&function(e){if("string"==typeof e)return!e.trim().length;return void 0===e}(e))return`${r} ${n("must not be empty.")}`;if(o&&(e||"").length>o)return`${r} ${n("must have max length {maxLength}.",{maxLength:o})}`;if(s&&(e||"").length for element <${n}>, this should never happen`)}function O4(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}function P4(e,t){const{properties:n}=t,i=n.filter((t=>function(e,t){const{binding:n}=t,{type:i}=n;if("bpmn:Message#zeebe:subscription#property"===i&&"correlationKey"===n.name&&Hx(e,"bpmn:StartEvent")&&!SF(e.parent))return!1;return!0}(e,t)&&k4(e,n,t)));return{...t,properties:i}}function k4(e,t,n){const{condition:i}=n;if(!i)return!0;if(i.allMatch){return i.allMatch.every((n=>S4(e,t,n)))}return S4(e,t,i)}function S4(e,t,n){const{property:i,equals:r,oneOf:o,isActive:s}=n;if(void 0!==s){const n=t.find((e=>e.id===i));return n?s?k4(e,t,n):!k4(e,t,n):!s}const a=function(e,t,n){const i=t.find((e=>e.id===n));if(!i)return;return b4(e,i)}(e,t,i);return l=n,c="equals",Object.prototype.hasOwnProperty.call(l,c)?a===r:!!o&&o.includes(a);var l,c}class C4{constructor(e,t){this._bpmnFactory=e,this._elementFactory=t,this._providers={[N5]:c4,[B5]:p4,[q5]:p4,[$5]:f4,[j5]:u4,[I5]:d4,[z5]:h4,[F5]:m4,[V5]:g4,[H5]:y4}}create(e){const{properties:t}=e,n=this._createShape(e);return this._setModelerTemplate(n,e),function(e){const{icon:t}=e;return!(!t||!t.contents)}(e)&&this._setModelerTemplateIcon(n,e),this._applyProperties(n,t),n}_createShape(e){const{appliesTo:t,elementType:n={}}=e,i=this._elementFactory,r={type:n.value||t[0]};n.eventDefinition&&(r.eventDefinitionType=n.eventDefinition);return i.createShape(r)}_ensureExtensionElements(e){const t=this._bpmnFactory,n=Wx(e);let i=n.get("extensionElements");return i||(i=t.create("bpmn:ExtensionElements",{values:[]}),i.$parent=n,n.set("extensionElements",i)),i}_setModelerTemplate(e,t){const{id:n,version:i}=t,r=Wx(e);r.set("zeebe:modelerTemplate",n),r.set("zeebe:modelerTemplateVersion",i)}_setModelerTemplateIcon(e,t){const{icon:n}=t,{contents:i}=n;Wx(e).set("zeebe:modelerTemplateIcon",i)}_applyProperties(e,t){const n=[];t.forEach((i=>this._applyProperty(e,i,t,n)))}_applyProperty(e,t,n,i){if(i.includes(t))return;const r=function(e,t){const{condition:n}=e;if(!n)return[];const i=function(e,t){return b(e,(function(e){return e.id===t}))}(t,n.property);if(i)return[i];return[]}(t,n);r.forEach((t=>this._applyProperty(e,t,n,i))),k4(e,n,t)&&this._bindProperty(t,e),i.push(t)}_bindProperty(e,t){const{binding:n}=e,{type:i}=n;this._providers[i].create(t,{property:e,bpmnFactory:this._bpmnFactory})}}C4.$inject=["bpmnFactory","elementFactory"];class T4 extends u2{constructor(e,t,n,i,r){super(e),this._eventBus=e,this._elementTemplates=t,this._commandStack=n,this._bpmnFactory=i,this._injector=r,this.preExecute(["element.updateProperties","element.updateModdleProperties","element.move"],this._saveConditionalState,!0,this),this.postExecute(["element.updateProperties","element.updateModdleProperties","propertiesPanel.zeebe.changeTemplate","element.move"],this._applyConditions,!0,this),this.preExecute(["propertiesPanel.zeebe.changeTemplate"],this._ensureConditional,!0,this)}_saveConditionalState(e){const{element:t}=e,n=this._elementTemplates.get(t);n&&(e.oldTemplateWithConditions=P4(t,n))}_applyConditions(e){const{element:t,newTemplate:n,oldTemplateWithConditions:i}=e,r=this._elementTemplates.get(t),o=i||n;if(!r||!o)return;const s=P4(t,r);if(!function(e,t){let n=t.properties;return n.some((t=>!e.properties.find((e=>A4(e,t)))))}(a=s,l=o)&&!function(e,t){const n=function(e,t){let n=t.properties;return n.filter((t=>!e.properties.find((e=>A4(e,t)))))}(t,e);return n.some((e=>!function(e,t){return e.properties.some((e=>D4(t.binding,e.binding)))}(t,e)))}(a,l))return;var a,l;const c={element:t,newTemplate:r,oldTemplate:o};this._commandStack.execute("propertiesPanel.zeebe.changeTemplate",c)}_ensureConditional(e){const{element:t,newTemplate:n}=e;n&&(e.newTemplate=P4(t,n))}}function A4(e,t){return D4(e.binding,t.binding)&&N4(e.condition,t.condition)}function M4(e,t){if(f(t)){return Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{})}return t}function D4(e,t){return N4(e=R4(e),t=R4(t))}function R4(e){return e.type===B5?{...e,type:q5,property:"type"}:e}function N4(e,t){return JSON.stringify(e,M4)===JSON.stringify(t,M4)}T4.$inject=["eventBus","elementTemplates","commandStack","bpmnFactory","injector"];let $4=class extends u2{constructor(e,t){super(t.get("eventBus")),this.postExecuted("shape.replace",(function(t){var n=t.context,i=Wx(n.oldShape),r=n.newShape,o=Wx(r);if(!i.modelerTemplate)return;const s=o.modelerTemplate,a=o.modelerTemplateVersion,l=e.get(s,a);if(!l)return void e.unlinkTemplate(r);const{appliesTo:c,elementType:p}=l;if(p)return void(Hx(r,p.value)&&!function(e,t){if(!Hx(e,"bpmn:Event"))return!1;const{eventDefinition:n}=t,i=Wx(e),r=i.get("eventDefinitions");if(!n)return 0!==r.length;return!Hx(r[0],n)}(r,p)||e.unlinkTemplate(r));c.reduce(((e,t)=>e||Hx(o,t)),!1)||e.unlinkTemplate(r)}))}};$4.$inject=["elementTemplates","injector"];class j4 extends u2{constructor(e,t,n,i){super(e),this._eventBus=e,this._elementTemplates=t,this._commandStack=n,this._bpmnFactory=i,this.postExecute(["element.updateProperties","element.updateModdleProperties"],this._updatePropertiesOrder,!0,this)}_updatePropertiesOrder(e){const{element:t}=e,n=this._elementTemplates.get(t),i=t.businessObject,r=[];if(!n)return;const o=P4(t,n).properties,s=Q3(i,"zeebe:Properties");s&&this._updateZeebePropertiesOrder(s,o,r,e);const a=Q3(i,"zeebe:IoMapping");a&&(this._updateInputOrder(a,o,r,e),this._updateOutputOrder(a,o,r,e));const l=Q3(i,"zeebe:TaskHeaders");if(l&&this._updateTaskHeadersOrder(l,o,r,e),r.length){const e=r.filter((e=>null!==e));e.length&&this._commandStack.execute("element-templates.multi-command-executor",e)}else;}_updateZeebePropertiesOrder(e,t,n,i){const r=e.get("properties");if(r.length<1)return;let o=[...r];B4(o,((e,t)=>e.findIndex((e=>"zeebe:property"==e.binding.type&&e.binding.name===t.get("name")))),t),L4(o,r)||n.push({cmd:"element.updateModdleProperties",context:{...i,moddleElement:e,properties:{properties:o}}})}_updateInputOrder(e,t,n,i){const r=e.get("inputParameters");if(r.length<1)return;let o=[...r];B4(o,((e,t)=>e.findIndex((e=>"zeebe:input"==e.binding.type&&e.binding.name===t.get("target")))),t),L4(o,r)||n.push({cmd:"element.updateModdleProperties",context:{...i,moddleElement:e,properties:{inputParameters:o}}})}_updateOutputOrder(e,t,n,i){const r=e.get("outputParameters");if(r.length<1)return;let o=[...r];B4(o,((e,t)=>e.findIndex((e=>"zeebe:output"==e.binding.type&&e.binding.source===t.get("source")))),t),L4(o,r)||n.push({cmd:"element.updateModdleProperties",context:{...i,moddleElement:e,properties:{outputParameters:o}}})}_updateTaskHeadersOrder(e,t,n,i){const r=e.get("zeebe:values");if(r.length<1)return;let o=[...r];B4(o,((e,t)=>e.findIndex((e=>"zeebe:taskHeader"==e.binding.type&&e.binding.key===t.get("key")))),t),L4(o,r)||n.push({cmd:"element.updateModdleProperties",context:{...i,moddleElement:e,properties:{values:o}}})}}function I4(e,t){if(f(t)){return Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{})}return t}function L4(e,t){return e.every(((e,n)=>function(e,t){return JSON.stringify(e,I4)===JSON.stringify(t,I4)}(e,t[n])))}function B4(e,t,n){return e.sort(((e,i)=>t(n,e)-t(n,i)))}j4.$inject=["eventBus","elementTemplates","commandStack","bpmnFactory"];class q4 extends u2{constructor(e,t,n,i,r,o){super(e),this._eventBus=e,this._elementTemplates=t,this._modeling=n,this._injector=i,this.postExecuted(["element.updateProperties","element.updateModdleProperties"],this._handlePropertiesUpdate,!0,this),this.postExecuted("shape.replace",this._handleReplacement,!0,this),this.postExecuted("shape.delete",this._handleRemoval,!0,this),e.on("copyPaste.pasteElement",(function(e){const{referencedRootElement:t}=e.descriptor;t&&W3(t)&&(e.descriptor.referencedRootElement=r.copyElement(t,o.create(t.$type)))}))}_handlePropertiesUpdate(e){const{element:t,properties:n}=e;if(!z4(t))return;if(!(U3 in n)||y(n[U3]))return;const i=J3(Wx(t));i&&W3(i)&&this._modeling.updateModdleProperties(t,i,{[U3]:null})}_handleReplacement(e){const{oldShape:t,newShape:n}=e,i=W3(t),r=W3(n);if(!z4(t)||!i)return;const o=J3(Wx(t));o&&W3(o)&&(z4(n)&&r?this._addMessage(n,o):Y5(o,this._injector))}_handleRemoval(e){const{shape:t}=e;if("label"===t.type)return;if(!z4(t))return;if(!W3(t))return;const n=J3(Wx(t));n&&W3(n)&&Y5(n,this._injector)}_addMessage(e,t){const n=Z5(e);this._modeling.updateModdleProperties(e,n,{messageRef:t})}}function z4(e){return Ux(e,["bpmn:ReceiveTask","bpmn:SendTask","bpmn:Event"])}q4.$inject=["eventBus","elementTemplates","modeling","injector","moddleCopy","bpmnFactory"];class F4 extends u2{constructor(e,t,n,i,r){super(e),this._eventBus=e,this._elementTemplates=t,this._modeling=n,this.preExecute("shape.create",(e=>{const n=e.shape,o=t.get(n);if(!o)return;const s=o.properties.filter((e=>e.generatedValue));s.forEach((e=>{if(!b4(n,e))return;const t=e5(e);w4(r,i,n,e,t)}))}),!0)}}F4.$inject=["eventBus","elementTemplates","modeling","commandStack","bpmnFactory"];class V4 extends u2{constructor(e,t,n){super(e),this._modeling=t,this._elementTemplates=n,this.postExecuted(["element.updateProperties","element.updateModdleProperties"],this._ensureNoPropagation,!0,this)}_ensureNoPropagation(e){const{element:t}=e;if(!this._elementTemplates.get(t))return;if(!Hx(t,"bpmn:CallActivity"))return;const n=Q3(t,"zeebe:CalledElement");if(n)for(const e of["propagateAllChildVariables","propagateAllParentVariables"])!1!==n.get(e)&&this._modeling.updateModdleProperties(t,n,{[e]:!1})}}V4.$inject=["eventBus","modeling","elementTemplates"];function H4(e){const t=e.metadata,n=e.version;if(t){if(!p(t.created))return U4(t.created);if(!p(t.updated))return U4(t.updated)}return p(n)?null:n}function U4(e){const t=new Date(e),n=t.getFullYear(),i=W4(String(t.getMonth()+1));return W4(String(t.getDate()))+"."+i+"."+n+" "+W4(String(t.getHours()))+":"+W4(String(t.getMinutes()))}function W4(e){return function(e,t,n){for(;e.length!l&&a(!s),children:[q_("div",{title:i,class:"bio-properties-panel-group-header-title",children:i}),q_("div",{class:"bio-properties-panel-group-header-buttons",children:[q_(X4,{element:r,getTemplateId:t}),!l&&q_(Q4,{open:s})]})]}),q_("div",{class:F_()("bio-properties-panel-group-entries",{open:s&&!l}),children:o.map((e=>{const{component:t,id:n}=e;return pw(t,{...e,key:n,element:r})}))})]})}}function Q4({open:e}){return q_(Qz,{title:"Toggle section",class:"bio-properties-panel-arrow",children:q_(Pq,{class:e?"bio-properties-panel-arrow-down":"bio-properties-panel-arrow-right"})})}function X4({element:e,getTemplateId:t}){const n=function(e,t,n){const i=n(t),r=e.get(t);if(!i)return{type:"NO_TEMPLATE"};if(!r)return{type:"UNKNOWN_TEMPLATE",templateId:i};if(r.deprecated)return{type:"DEPRECATED_TEMPLATE",template:r};const o=e.getLatest(i,{deprecated:!0})[0];if(o!==r)return{type:"OUTDATED_TEMPLATE",template:r,newerTemplate:o};return{type:"KNOWN_TEMPLATE",template:r}}(dV("elementTemplates"),e,t);return"NO_TEMPLATE"===n.type?q_(K4,{element:e}):"KNOWN_TEMPLATE"===n.type?q_(Y4,{element:e}):"UNKNOWN_TEMPLATE"===n.type?q_(J4,{element:e}):"DEPRECATED_TEMPLATE"===n.type?q_(i6,{element:e,templateState:n}):"OUTDATED_TEMPLATE"===n.type?q_(t6,{element:e,templateState:n}):void 0}function K4({element:e}){const t=dV("translate"),n=dV("eventBus");return q_(Qz,{title:"Select a template",class:"bio-properties-panel-select-template-button",onClick:()=>n.fire("elementTemplates.select",{element:e}),children:[q_(Sq,{}),q_("span",{children:t("Select")})]})}function Y4({element:e}){const t=dV("translate"),n=dV("elementTemplates"),i=[{entry:t("Unlink"),action:()=>n.unlinkTemplate(e)},{entry:q_(Z4,{}),action:()=>n.removeTemplate(e)}];return q_(Wz,{menuItems:i,class:"bio-properties-panel-applied-template-button",children:q_(Qz,{children:[q_("span",{children:t("Applied")}),q_(Pq,{class:"bio-properties-panel-arrow-down"})]})})}function Z4(){return q_("span",{class:"bio-properties-panel-remove-template",children:dV("translate")("Remove")})}function J4({element:e}){const t=dV("translate"),n=dV("elementTemplates"),i=[{entry:q_(e6,{})},{separator:!0},{entry:t("Unlink"),action:()=>n.unlinkTemplate(e)},{entry:q_(Z4,{}),action:()=>n.removeTemplate(e)}];return q_(Wz,{menuItems:i,class:"bio-properties-panel-template-not-found",children:q_(Qz,{children:[q_("span",{children:t("Not found")}),q_(Pq,{class:"bio-properties-panel-arrow-down"})]})})}function e6(){return q_("div",{class:"bio-properties-panel-template-not-found-text",children:dV("translate")("The template applied was not found. Therefore, its properties cannot be shown. Unlink to access the data.")})}function t6({element:e,templateState:t}){const{newerTemplate:n}=t,i=dV("translate"),r=dV("elementTemplates"),o=[{entry:q_(n6,{newerTemplate:n})},{separator:!0},{entry:i("Update"),action:()=>r.applyTemplate(e,n)},{entry:i("Unlink"),action:()=>r.unlinkTemplate(e)},{entry:q_(Z4,{}),action:()=>r.removeTemplate(e)}];return q_(Wz,{menuItems:o,class:"bio-properties-panel-template-update-available",children:q_(Qz,{children:[q_("span",{children:i("Update available")}),q_(Pq,{class:"bio-properties-panel-arrow-down"})]})})}function n6({newerTemplate:e}){return q_("div",{class:"bio-properties-panel-template-update-available-text",children:dV("translate")("A new version of the template is available: {templateVersion}",{templateVersion:H4(e)})})}function i6({element:e,templateState:t}){const{template:n}=t,i=dV("translate"),r=dV("elementTemplates"),o=[{entry:q_(r6,{template:n})},{separator:!0},{entry:i("Unlink"),action:()=>r.unlinkTemplate(e)},{entry:q_(Z4,{}),action:()=>r.removeTemplate(e)}];return q_(Wz,{menuItems:o,class:"bio-properties-panel-deprecated-template-button",children:q_(Qz,{children:[q_("span",{children:i("Deprecated")}),q_(Pq,{class:"bio-properties-panel-arrow-down"})]})})}function r6({template:e}){const t=dV("translate"),{message:n=t("This template is deprecated."),documentationRef:i}=e.deprecated;return q_("div",{class:"bio-properties-panel-deprecated-template-text",children:[n,i&&q_(dw,{children:[" ",q_("a",{href:i,children:q_(o6,{})})]})]})}function o6(){return q_("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:q_("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.6368 10.6375V5.91761H11.9995V10.6382C11.9995 10.9973 11.8623 11.3141 11.5878 11.5885C11.3134 11.863 10.9966 12.0002 10.6375 12.0002H1.36266C0.982345 12.0002 0.660159 11.8681 0.396102 11.6041C0.132044 11.34 1.52588e-05 11.0178 1.52588e-05 10.6375V1.36267C1.52588e-05 0.98236 0.132044 0.660173 0.396102 0.396116C0.660159 0.132058 0.982345 2.95639e-05 1.36266 2.95639e-05H5.91624V1.36267H1.36266V10.6375H10.6368ZM12 0H7.2794L7.27873 1.36197H9.68701L3.06507 7.98391L4.01541 8.93425L10.6373 2.31231V4.72059H12V0Z",fill:"#818798"})})}function s6({element:e,elementTemplates:t}){const n=t.get(e);return n?[{id:"template-name",component:a6,template:n},{id:"template-version",component:l6,template:n},{id:"template-description",component:c6,template:n}].filter((e=>!!e.component)):[]}function a6({id:e,template:t}){return q_(p6,{id:e,label:dV("translate")("Name"),content:t.name})}function l6({id:e,template:t}){const n=dV("translate"),i=H4(t);return i?q_(p6,{id:e,label:n("Version"),content:i}):null}function c6({id:e,template:t}){const n=dV("translate"),{description:i}=t;return i?q_(p6,{id:e,label:n("Description"),content:t.description}):null}function p6({id:e,label:t,content:n}){return q_("div",{"data-entry-id":e,class:"bio-properties-panel-entry bio-properties-panel-text-entry",children:[q_("span",{class:"bio-properties-panel-label",children:t}),q_("span",{class:"bio-properties-panel-text-entry__content",children:n})]})}var u6,d6={};function h6(e,t,n){if(3===e.nodeType){var i="textContent"in e?e.textContent:e.nodeValue||"";if(!1!==h6.options.trim){var r=0===t||t===n.length-1;if((!(i=i.match(/^[\s\n]+$/g)&&"all"!==h6.options.trim?" ":i.replace(/(^[\s\n]+|[\s\n]+$)/g,"all"===h6.options.trim||r?"":" "))||" "===i)&&n.length>1&&r)return null}return i}if(1!==e.nodeType)return null;var o=String(e.nodeName).toLowerCase();if("script"===o&&!h6.options.allowScripts)return null;var s,a,l=h6.h(o,function(e){var t=e&&e.length;if(!t)return null;for(var n={},i=0;i\n"+e+""):(o="xml",r='\n'+e+"");try{n=(new DOMParser).parseFromString(r,s)}catch(e){i=e}if(n||"html"!==t||((n=u6||(u6=function(){if(document.implementation&&document.implementation.createHTMLDocument)return document.implementation.createHTMLDocument("");var e=document.createElement("iframe");return e.style.cssText="position:absolute; left:0; top:-999em; width:1px; height:1px; overflow:hidden;",e.setAttribute("sandbox","allow-forms"),document.body.appendChild(e),e.contentWindow.document}())).open(),n.write(r),n.close()),n){var a=n.getElementsByTagName(o)[0],l=a.firstChild;return e&&!l&&(a.error="Document parse failed."),l&&"parsererror"===String(l.nodeName).toLowerCase()&&(l.removeChild(l.firstChild),l.removeChild(l.lastChild),a.error=l.textContent||l.nodeValue||i||"Unknown error",a.removeChild(l)),a}}(e,t);if(o&&o.error)throw new Error(o.error);var s=o&&o.body||o;y6.map=i||g6;var a=s&&function(e,t,n,i){return h6.visitor=t,h6.h=n,h6.options=i||d6,h6(e)}(s,y6,n,r);return y6.map=null,a&&a.props&&a.props.children||null}(r,i,d,this.map,h)}catch(e){a?a({error:e}):"undefined"!=typeof console&&console.error&&console.error("preact-markup: "+e)}if(!1===t)return n||null;var f=u.hasOwnProperty("className")?"className":"class",m=u[f];return m?m.splice?m.splice(0,0,"markup"):"string"==typeof m?u[f]+=" markup":"object"==typeof m&&(m.markup=!0):u[f]="markup",d("div",u,n||null)},t}(hw);const b6=["h1","h2","h3","h4","h5","span","em","a","p","div","ul","ol","li","hr","blockquote","img","pre","code","br","strong"],x6=["align","alt","class","href","id","name","rel","target","src"],w6=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,_6=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g,E6=document.createElement("form");function O6(e){const t=(new DOMParser).parseFromString(`\n
    ${e}`,"text/html");t.normalize();const n=t.body.firstChild;return n?(P6(n),(new XMLSerializer).serializeToString(n)):""}function P6(e){if(3===e.nodeType)return;if(1!==e.nodeType)return e.remove();const t=e.tagName.toLowerCase();if(!b6.includes(t))return e.remove();const n=e.attributes;for(let i=n.length;i--;){const r=n[i],o=r.name,s=o.toLowerCase(),a=r.value.trim();e.removeAttribute(o);k6(t,s,a)&&e.setAttribute(o,a)}"a"===t&&"_blank"===e.getAttribute("target")&&"noopener"!==e.getAttribute("rel")&&e.setAttribute("rel","noopener");for(let t=e.childNodes.length;t--;)P6(e.childNodes[t])}function k6(e,t,n){return!!x6.includes(t)&&(("id"!==t&&"name"!==t||!(n in document)&&!(n in E6))&&(("target"!==t||"_blank"===n)&&!("href"===t&&!w6.test(n.replace(_6,"")))))}function S6(e){const{tooltip:t}=e;return t&&q_(v6,{markup:O6(t),trim:!1})}function C6(e,t,n,i){const r=Zw(N6(e,t,n,i),[e,t,n,i]),o=Zw(R6(n,i),[n,i]),[s,a]=Ww(D6(i,o())),l=Zw((e=>{!s&&"string"==typeof e&&e.startsWith("=")&&a(!0),!s||"string"==typeof e&&e.startsWith("=")||a(!1)}),[s]),c=Zw(((e,t)=>{l(e),r(A6(e,i.type))}),[r,i,l]),p=Zw((()=>s?o():M6(o(),i.type)),[o,i,s]);return T6(i)?[p,c]:[o,r]}const T6=e=>["optional","static"].includes(e.feel)&&["Boolean","Number"].includes(e.type),A6=(e,t)=>"string"==typeof e&&e.startsWith("=")?e:"Boolean"===t?"="+!!(e="false"!==e&&e):void 0===e?e:"="+e.toString(),M6=(e,t)=>void 0===e?e:("string"==typeof e&&e.startsWith("=")&&(e=e.slice(1)),"Number"===t?Number(e):"Boolean"===t?"false"!==e:e),D6=(e,t)=>!T6(e)||("Boolean"===e.type?!("=true"===t||"=false"===t):"Number"!==e.type||isNaN(M6(t,e.type)));function R6(e,t){return function(){return b4(e,t)}}function N6(e,t,n,i){return function(r){return w4(e,t,n,i,r)}}function $6(e,t){return n=>_4(n,t,e)}function j6(e){return["zeebe:property","zeebe:taskHeader"].includes(e.binding.type)}function I6(e){const{description:t}=e,n=dV("translate");return t&&q_(v6,{markup:O6(n(t)),trim:!1})}function L6(e){const{element:t,id:n,property:i}=e,{description:r,editable:o,label:s,feel:a,language:l,placeholder:c,tooltip:p}=i,u=dV("bpmnFactory"),d=dV("commandStack"),h=dV("debounceInput"),f=dV("translate");return fF({debounce:h,element:t,id:n,label:s,feel:a,placeholder:c,monospace:!!l,autoResize:!0,description:I6({description:r}),getValue:R6(t,i),setValue:N6(u,d,t,i),validate:$6(f,i),disabled:!1===o,tooltip:S6({tooltip:p})})}function B6(e){const{element:t,id:n,property:i}=e,{description:r,editable:o,label:s,feel:a,placeholder:l,tooltip:c}=i,p=dV("bpmnFactory"),u=dV("commandStack"),d=dV("debounceInput"),h=dV("translate");return vF({debounce:d,element:t,getValue:R6(t,i),id:n,label:s,feel:a,placeholder:l,description:I6({description:r}),setValue:N6(p,u,t,i),validate:$6(h,i),disabled:!1===o,tooltip:S6({tooltip:c})})}function q6(e){return t=>{const{bpmnElement:n,element:i}=t,r=(n||i).businessObject,[o,s]=Ww([]),a=dV("eventBus"),l=(c="variableResolver",p={getVariablesForElement:H3.Hp},dV(c,!1)||p);var c,p;return Qw((()=>{const e=()=>{(async()=>{const e=await l.getVariablesForElement(r);s(e.map((e=>({...e,info:e.info||e.origin&&"Written in "+e.origin.map((e=>e.name||e.id)).join(", ")}))))})()};return a.on("commandStack.changed",e),e(),()=>{a.off("commandStack.changed",e)}}),[r]),q_(e,{...t,variables:o})}}function z6(e){return t=>{const n=Yw((()=>{const e=dV("config");return e&&e.propertiesPanel&&e.propertiesPanel.feelTooltipContainer}),[]);return q_(e,{...t,tooltipContainer:n})}}const F6=z6(Nz),V6=z6((function(e){return q_(Nz,{class:"bio-properties-panel-feel-textarea",OptionalComponent:Dz,...e})})),H6=q6(F6),U6=q6(V6);function W6(e){const{element:t,id:n,property:i}=e,{description:r,editable:o,label:s,feel:a,placeholder:l,tooltip:c}=i,p=dV("bpmnFactory"),u=dV("commandStack"),d=dV("debounceInput"),h=dV("translate");return(j6(i)?F6:H6)({debounce:d,element:t,getValue:R6(t,i),id:n,label:s,feel:a,placeholder:l,description:I6({description:r}),setValue:N6(p,u,t,i),validate:$6(h,i),disabled:!1===o,tooltip:S6({tooltip:c})})}function G6(e){const{element:t,id:n,property:i}=e,{description:r,editable:o,label:s,feel:a,placeholder:l,tooltip:c}=i,p=dV("bpmnFactory"),u=dV("commandStack"),d=dV("debounceInput"),h=dV("translate");return(j6(i)?V6:U6)({debounce:d,element:t,getValue:R6(t,i),id:n,label:s,feel:a,placeholder:l,description:I6({description:r}),setValue:N6(p,u,t,i),validate:$6(h,i),disabled:!1===o,tooltip:S6({tooltip:c})})}function Q6(e){const{element:t,id:n,property:i}=e,{description:r,editable:o,label:s,tooltip:a}=i,l=dV("bpmnFactory"),c=dV("commandStack"),p=dV("translate");return aF({element:t,id:n,label:s,getOptions:()=>{const{choices:e,optional:t}=i;let n=[];return n=e.map((({name:e,value:t})=>({label:e,value:t}))),t&&(n=[{label:"",value:void 0},...n]),n},description:I6({description:r}),getValue:R6(t,i),setValue:N6(l,c,t,i),validate:$6(p,i),disabled:!1===o,tooltip:S6({tooltip:a})})}function X6(e){const{element:t,id:n,property:i}=e,{description:r,editable:o,label:s,tooltip:a,feel:l}=i,c=dV("bpmnFactory"),p=dV("commandStack"),u=dV("debounceInput"),d=dV("translate"),h="optional"===l?jz:tF,[f,m]=C6(c,p,t,i);return h({element:t,debounce:u,translate:d,getValue:f,id:n,label:s,description:I6({description:r}),setValue:m,disabled:!1===o,tooltip:S6({tooltip:a})})}function K6(e){const{element:t,id:n,property:i}=e,{description:r,editable:o,label:s,feel:a,tooltip:l}=i,c="optional"===a?$z:Oz,p=dV("bpmnFactory"),u=dV("commandStack"),d=dV("debounceInput"),h=dV("translate"),[f,g]=C6(p,u,t,i),y=Zw((e=>{if(T6(i)&&m(e)&&e.toString().includes("e"))return h("Scientific notation is disallowed in FEEL.");return $6(h,i)(e)}),[h,i]);return c({debounce:d,element:t,getValue:f,id:n,label:s,description:I6({description:r}),setValue:g,validate:y,disabled:!1===o,tooltip:S6({tooltip:l})})}function Y6(e){const{element:t,elementTemplate:n,injector:i}=e,r=i.get("translate"),o=[],{id:s,properties:a,groups:l}=n,c=function(e){return A(e,"group")}(a),p=[];return _(c,((e,n)=>{const i=function(e,t){return b(e,(e=>e.id===t))}(l,n);if(!i)return p.push(...e);Z6(o,{element:t,id:`ElementTemplates__CustomProperties-${n}`,label:r(i.label),openByDefault:i.openByDefault,properties:e,templateId:`${s}-${n}`,tooltip:S6({tooltip:i.tooltip})})})),p.length&&Z6(o,{id:"ElementTemplates__CustomProperties",label:r("Custom properties"),element:t,properties:p,templateId:s}),o}function Z6(e,t){const{element:n,id:i,label:r,openByDefault:o=!0,properties:s,templateId:a,tooltip:l}=t,c={id:i,label:r,component:Jq,entries:[],shouldOpen:o,tooltip:l};s.forEach(((e,t)=>{const n=function(e,t,n){let{type:i,feel:r}=n;i||(i=function(e){const{binding:t}=e,{type:n}=t;if([N5,B5,q5,j5,I5,L5,z5].includes(n))return"String"}(n));if("required"===r)return{id:e,component:W6,isEdited:Iz,property:n};if("Number"===i)return{id:e,component:K6,isEdited:Pz,property:n};if("Boolean"===i)return{id:e,component:X6,isEdited:nF,property:n};if("Dropdown"===i)return{id:e,component:Q6,isEdited:lF,property:n};if("String"===i)return r?{id:e,component:W6,isEdited:Iz,property:n}:{id:e,component:B6,isEdited:bF,property:n};if("Text"===i)return r?{id:e,component:G6,isEdited:Iz,property:n}:{id:e,component:L6,isEdited:mF,property:n}}(`custom-entry-${a}-${t}`,0,e);n&&c.entries.push(n)})),c.entries.length&&e.push(c)}function J6(e,t){return b(Wx(e).get("eventDefinitions")||[],(function(e){return Hx(e,t)}))}function e7(e){return Hx(e,"bpmn:ReceiveTask")?Wx(e):J6(e,"bpmn:MessageEventDefinition")}const t7="create-new";function n7(e){const{element:t}=e;return function(e){return Hx(e,"bpmn:ReceiveTask")||Ux(e,["bpmn:StartEvent","bpmn:EndEvent","bpmn:IntermediateThrowEvent","bpmn:BoundaryEvent","bpmn:IntermediateCatchEvent"])&&!!e7(e)}(t)?[{id:"messageRef",component:i7,isEdited:lF}]:[]}function i7(e){const{element:t}=e,n=dV("bpmnFactory"),i=dV("modeling"),r=dV("translate"),o=e7(t);return function(e){const{autoFocusEntry:t,element:n,getOptions:i}=e,r=i(n),o=Xq(r);return Qw((()=>{if(t&&o&&r.length>o.length){const e=we(`[data-entry-id="${t}"]`),n=we(".bio-properties-panel-input",e);n&&n.select()}}),[r]),q_(aF,{...e})}({element:t,id:"messageRef",label:r("Global message reference"),autoFocusEntry:"messageName",getValue:()=>{const e=function(e){const t=e7(e);return t&&t.get("messageRef")}(t);return e?e.get("id"):""},setValue:e=>{const r=P5(o);let s;if(e===t7){const t=O5("Message_");s=E5("bpmn:Message",{id:t,name:t},r,n),e=s.get("id")}return s=function(e,t,n){return k5(e,t).find((e=>e.id===n))}(o,"bpmn:Message",e)||s,i.updateModdleProperties(t,o,{messageRef:s})},getOptions:()=>{let e=[{value:"",label:r("")},{value:t7,label:r("Create new ...")}];const n=function(e){return e.filter((e=>!e.get("zeebe:modelerTemplate")))}(k5(Wx(t),"bpmn:Message"));var i;return(i=n,R(i,(e=>(e.name||"").toLowerCase()))).forEach((t=>{e.push({value:t.get("id"),label:t.get("name")})})),e}})}const r7=["general","documentation","multiInstance"];let o7=class{constructor(e,t,n){t.registerProvider(300,this),this._elementTemplates=e,this._injector=n}getGroups(e){return t=>{const n=this._injector;if(function(e,t){const n=function(e,t){return e.find((e=>e.id===t))}(e,"message");if(!n)return;n.entries=(i=n.entries,r=n7({element:t}),i.map((e=>r.find((t=>t.id===e.id))||e)));var i,r}(t,e),!this._shouldShowTemplateProperties(e))return t;const i=n.get("translate");t=t.slice();const r={element:e,id:"ElementTemplates__Template",label:i("Template"),component:G4({getTemplateId:W3}),entries:s6({element:e,elementTemplates:this._elementTemplates})};s7(r7,t,[r]);let o=this._elementTemplates.get(e);if(o){o=P4(e,o);s7("ElementTemplates__Template",t,[].concat(Y6({element:e,elementTemplate:o,injector:n})))}return W3(e)&&(t=function(e,t){if(!e.entriesVisible)return t.filter((e=>r7.includes(e.id)||e.id.startsWith("ElementTemplates__")));return t}(o||{},t)),t}}_shouldShowTemplateProperties(e){return W3(e)||this._elementTemplates.getAll(e).length}};function s7(e,t,n){let i=e;Array.isArray(e)||(i=[e]);const r=t.reduce(((e,t,n)=>i.includes(t.id)?n:e),-1);-1!==r?t.splice(r+1,0,...n):t.unshift(...n)}o7.$inject=["elementTemplates","propertiesPanel","injector"];function a7(e=[]){const t=[];return f(e)?(_(C(e),(function(n){t.push(z({type:n},e[n]))})),t):e}function l7(e,t,n){const{name:i,scriptFormat:r}=e;let o,s;return r?s=n.create("camunda:Script",{scriptFormat:r,value:t}):o=t,n.create("camunda:InputParameter",{name:i,value:o,definition:s})}function c7(e,t,n){const{scriptFormat:i,source:r}=e;let o,s;return i?s=n.create("camunda:Script",{scriptFormat:i,value:r}):o=r,n.create("camunda:OutputParameter",{name:t,value:o,definition:s})}function p7(e,t="",n){const{name:i}=e;return n.create("camunda:Property",{name:i,value:t})}function u7(e,t,n){const i=y7(e,t);return n.create("camunda:In",i)}function d7(e,t){return t.create("camunda:In",{businessKey:e})}function h7(e,t,n){const i=y7(e,t);return n.create("camunda:Out",i)}function f7(e,t,n){const i=z({},{string:void 0,expression:void 0,name:void 0}),{expression:r,name:o}=e;return r?i.expression=t:i.string=t,i.name=o,n.create("camunda:Field",i)}function m7(e,t,n,i){const r=i.create("camunda:ErrorEventDefinition",{errorRef:t,expression:e});return r.$parent=n,r}function g7(e,t,n){const i=n.create("bpmn:Error",{id:O5("Error_"+e+"_")});return i.$parent=t,i}function y7(e,t){const n={},{expression:i,source:r,sourceExpression:o,target:s,type:a,variables:l}=e;if("camunda:in"===a)if(!s||i||l)if(s&&!0===i&&!l)n.target=s,n.sourceExpression=t;else if(s||i||"local"!==l)if(s&&!i&&"local"===l)n.local=!0,n.source=t,n.target=s;else if(s&&i&&"local"===l)n.local=!0,n.sourceExpression=t,n.target=s;else{if(s||i||"all"!==l)throw new Error("invalid configuration for camunda:in element template binding");n.variables="all"}else n.local=!0,n.variables="all";else n.target=s,n.source=t;if("camunda:out"===a)if(!r||o||l)if(r||!o||l)if(r||o||"all"!==l)if(r&&!o&&"local"===l)n.local=!0,n.source=r,n.target=t;else if(!r&&o&&"local"===l)n.local=!0,n.sourceExpression=o,n.target=t;else{if(r||o||"local"!==l)throw new Error("invalid configuration for camunda:out element template binding");n.local=!0,n.variables="all"}else n.variables="all";else n.target=t,n.sourceExpression=o;else n.target=t,n.source=r;return n}const v7=["camunda:class","camunda:delegateExpression","camunda:expression"];class b7{constructor(e,t,n,i){this._bpmnFactory=e,this._bpmnReplace=t,this._commandStack=n,this._modeling=i}preExecute(e){const t=e.newTemplate,n=e.oldTemplate;let i=e.element;this._updateCamundaModelerTemplate(i,t),t&&(i=e.element=this._updateTaskType(i,t),this._updateProperties(i,n,t),this._updateCamundaExecutionListenerProperties(i,t),this._updateCamundaFieldProperties(i,n,t),this._updateCamundaInOutProperties(i,n,t),this._updateCamundaInputOutputParameterProperties(i,n,t),this._updateCamundaPropertyProperties(i,n,t),this._updateCamundaErrorEventDefinitionProperties(i,n,t),a7(t.scopes).forEach((e=>{this._updateScopeProperties(i,n,e,t)})))}_getOrCreateExtensionElements(e){const t=this._bpmnFactory,n=this._modeling,i=Wx(e);let r=i.get("extensionElements");return r||(r=t.create("bpmn:ExtensionElements",{values:[]}),r.$parent=i,n.updateProperties(e,{extensionElements:r})),r}_updateCamundaErrorEventDefinitionProperties(e,t,n){const i=this._bpmnFactory,r=this._commandStack,o=n.properties.filter((e=>"camunda:errorEventDefinition"===e.binding.type));if(!o.length)return;const s=this._getOrCreateExtensionElements(e),a=r5(e,["camunda:ErrorEventDefinition"]);o.forEach((n=>{const o=w7(t,n),l=o&&x7(s,o),c=n.binding;if(o&&l)E7(l,o)||r.execute("element.updateModdleProperties",{element:e,moddleElement:l,properties:{expression:n.value}}),O7(a,l);else{const t=P5(Wx(e)),o=g7(c.errorRef,t,i),a=m7(n.value,o,s,i);r.execute("element.updateModdleProperties",{element:e,moddleElement:t,properties:{rootElements:[...t.get("rootElements"),o]}}),r.execute("element.updateModdleProperties",{element:e,moddleElement:s,properties:{values:[...s.get("values"),a]}})}})),a.length&&r.execute("element.updateModdleProperties",{element:e,moddleElement:s,properties:{values:E(s.get("values"),(e=>a.includes(e)))}})}_updateCamundaExecutionListenerProperties(e,t){const n=this._bpmnFactory,i=this._commandStack,r=t.properties.filter((e=>"camunda:executionListener"===e.binding.type));if(!r.length)return;const o=this._getOrCreateExtensionElements(e),s=r5(e,["camunda:ExecutionListener"]),a=r.map((e=>function(e,t,n){const{event:i,implementationType:r,scriptFormat:o}=e;return"script"===r||o?n.create("camunda:ExecutionListener",{event:i,script:n.create("camunda:Script",{scriptFormat:o,value:t})}):n.create("camunda:ExecutionListener",{event:i,[r]:t})}(e.binding,e.value,n)));i.execute("element.updateModdleProperties",{element:e,moddleElement:o,properties:{values:[...E(o.get("values"),(e=>s.includes(e))),...a]}})}_updateCamundaFieldProperties(e,t,n,i){const r=this._bpmnFactory,o=this._commandStack,s=n.properties.filter((e=>"camunda:field"===e.binding.type));if(!s.length)return;i||(i=this._getOrCreateExtensionElements(e));const a=Ux(i,["camunda:ExecutionListener","camunda:TaskListener"])?"fields":"values",l=r5(e,["camunda:Field"]);s.forEach((n=>{const s=w7(t,n),c=s&&x7(i,s),p=n.binding;if(s&&c)E7(c,s)||o.execute("element.updateModdleProperties",{element:e,moddleElement:c,properties:{string:n.value}}),O7(l,c);else{const t=f7(p,n.value,r);o.execute("element.updateModdleProperties",{element:e,moddleElement:i,properties:{[a]:[...i.get(a),t]}})}})),l.length&&o.execute("element.updateModdleProperties",{element:e,moddleElement:i,properties:{[a]:E(i.get(a),(e=>l.includes(e)))}})}_updateCamundaInOutProperties(e,t,n){const i=this._bpmnFactory,r=this._commandStack,o=n.properties.filter((e=>{const t=e.binding.type;return"camunda:in"===t||"camunda:in:businessKey"===t||"camunda:out"===t}));if(!o.length)return;const s=this._getOrCreateExtensionElements(function(e){return J6(e,"bpmn:SignalEventDefinition")}(e)||e),a=r5(s,["camunda:In","camunda:Out"]);o.forEach((n=>{const o=w7(t,n),l=o&&o.binding,c=o&&x7(s,o),p=n.value,u=n.binding,d=u.type,h={};let f;o&&c?(E7(c,o)||("camunda:in"===d?u.expression?h["camunda:sourceExpression"]=p:h["camunda:source"]=p:"camunda:in:businessKey"===d?h["camunda:businessKey"]=p:"camunda:out"===d&&(h["camunda:target"]=p)),(l.local&&!u.local||!l.local&&u.local)&&(h.local=u.local),C(h)&&r.execute("element.updateModdleProperties",{element:e,moddleElement:c,properties:h}),O7(a,c)):("camunda:in"===d?f=u7(u,p,i):"camunda:out"===d?f=h7(u,p,i):"camunda:in:businessKey"===d&&(f=d7(p,i)),r.execute("element.updateModdleProperties",{element:e,moddleElement:s,properties:{values:[...s.get("values"),f]}}))})),a.length&&r.execute("element.updateModdleProperties",{element:e,moddleElement:s,properties:{values:E(s.get("values"),(e=>a.includes(e)))}})}_updateCamundaInputOutputParameterProperties(e,t,n,i){const r=this._bpmnFactory,o=this._commandStack,s=n.properties.filter((e=>{const t=e.binding.type;return"camunda:inputParameter"===t||"camunda:outputParameter"===t}));if(!s.length)return;let a;i||(i=this._getOrCreateExtensionElements(e)),Hx(i,"camunda:Connector")?(a=i.get("camunda:inputOutput"),a||(a=r.create("camunda:InputOutput"),o.execute("element.updateModdleProperties",{element:e,moddleElement:i,properties:{inputOutput:a}}))):(a=i5(i,"camunda:InputOutput"),a||(a=r.create("camunda:InputOutput"),o.execute("element.updateModdleProperties",{element:e,moddleElement:i,properties:{values:[...i.get("values"),a]}})));const l=a.get("camunda:inputParameters")?a.get("camunda:inputParameters").slice():[],c=a.get("camunda:outputParameters")?a.get("camunda:outputParameters").slice():[];let p;s.forEach((n=>{const s=w7(t,n),u=s&&x7(i,s),d=n.value,h=n.binding,f=h.type;let m,g;s&&u?(E7(u,s)||(g=Hx(u,"camunda:InputParameter")?{value:d}:{name:d},o.execute("element.updateModdleProperties",{element:e,moddleElement:u,properties:g})),Hx(u,"camunda:InputParameter")?O7(l,u):O7(c,u)):("camunda:inputParameter"===f?(p="inputParameters",m=l7(h,d,r)):(p="outputParameters",m=c7(h,d,r)),o.execute("element.updateModdleProperties",{element:e,moddleElement:a,properties:{[p]:[...a.get(p),m]}}))})),l.length&&o.execute("element.updateModdleProperties",{element:e,moddleElement:a,properties:{inputParameters:E(a.get("inputParameters"),(e=>l.includes(e)))}}),c.length&&o.execute("element.updateModdleProperties",{element:e,moddleElement:a,properties:{outputParameters:E(a.get("outputParameters"),(e=>c.includes(e)))}})}_updateCamundaModelerTemplate(e,t){const n=this._modeling,i=t&&t.id,r=t&&t.version;t5(e)===i&&n5(e)===r||n.updateProperties(e,{"camunda:modelerTemplate":i,"camunda:modelerTemplateVersion":r})}_updateCamundaPropertyProperties(e,t,n,i){const r=this._bpmnFactory,o=this._commandStack,s=n.properties.filter((e=>"camunda:property"===e.binding.type));if(!s.length)return;let a=i5(i=i?this._getOrCreateExtensionElements(i):this._getOrCreateExtensionElements(e),"camunda:Properties");a||(a=r.create("camunda:Properties"),o.execute("element.updateModdleProperties",{element:e,moddleElement:i,properties:{values:[...i.get("values"),a]}}));const l=a.get("camunda:values")?a.get("camunda:values").slice():[];s.forEach((n=>{const s=w7(t,n),c=s&&x7(i,s),p=n.value,u=n.binding;if(s&&c)E7(c,s)||o.execute("element.updateModdleProperties",{element:e,moddleElement:c,properties:{value:p}}),O7(l,c);else{const t=p7(u,p,r);o.execute("element.updateModdleProperties",{element:e,moddleElement:a,properties:{values:[...a.get("values"),t]}})}})),l.length&&o.execute("element.updateModdleProperties",{element:e,moddleElement:a,properties:{values:E(a.get("values"),(e=>l.includes(e)))}})}_updateConditionExpression(e,t,n){const i=this._bpmnFactory,r=this._commandStack,o=this._modeling,s=n.binding,a=n.value;if(!t)return void o.updateProperties(e,{conditionExpression:i.create("bpmn:FormalExpression",{body:a,language:s.scriptFormat})});const l=t.binding,c=t.value,p=Wx(e).get("bpmn:conditionExpression"),u={};p.get("body")===c&&(u.body=a),p.get("language")===l.scriptFormat&&(u.language=s.scriptFormat),C(u).length&&r.execute("element.updateModdleProperties",{element:e,moddleElement:p,properties:u})}_updateProperties(e,t,n,i){const r=this._commandStack,o=n.properties.filter((e=>"property"===e.binding.type)),s=t&&t.properties.filter((e=>"property"===e.binding.type));o.length&&(i||(i=Wx(e)),o.forEach((n=>{const o=w7(t,n),a=n.binding.name,l=n.value;let c,p;if(o&&O7(s,o),"conditionExpression"===a)this._updateConditionExpression(e,o,n);else{if(c=Hx(i,"bpmn:Error")?i:e,o&&E7(c,o))return;p={},p[a]=l,-1!==v7.indexOf(a)&&v7.forEach((e=>{e!==a&&(p[e]=void 0)})),r.execute("element.updateModdleProperties",{element:e,moddleElement:i,properties:p})}})),s&&s.forEach((t=>{r.execute("element.updateModdleProperties",{element:e,moddleElement:i,properties:{[t.binding.name]:null}})})))}_updateScopeProperties(e,t,n,i){const r=this._bpmnFactory,o=this._commandStack,s=n.type;let a;a=function(e,t,n){const i=t.type,r=t.id;if("camunda:Connector"===i)return i5(e,"camunda:Connector");if("bpmn:Error"===i){const t=function(e,t){return b(e.properties,(function(e){return e.binding.errorRef===t}))}(n,r);if(!t)return;const i=x7(e,t);if(!i)return;return i.errorRef}}(e,n,i),a||(a=r.create(s));const l=function(e,t){const n=e.type,i=e.id,r=t&&a7(t.scopes);return r&&b(r,(function(e){return _7(n)?e.id===i:e.type===n}))}(n,t);if(this._updateProperties(e,l,n,a),this._updateCamundaExecutionListenerProperties(e,n),this._updateCamundaInOutProperties(e,l,n),this._updateCamundaInputOutputParameterProperties(e,l,n,a),this._updateCamundaFieldProperties(e,l,n,a),this._updateCamundaPropertyProperties(e,l,n,a),_7(s))return;const c=this._getOrCreateExtensionElements(e);o.execute("element.updateModdleProperties",{element:e,moddleElement:c,properties:{values:[...c.get("values"),a]}})}_updateTaskType(e,t){const n=t.elementType;return n?e.$type===n.value?e:this._bpmnReplace.replaceElement(e,{type:n.value}):e}}function x7(e,t){let n,i=Wx(e);const r=t.binding,o=r.type;if("camunda:field"===o){if(n=Ux(i,["camunda:ExecutionListener","camunda:TaskListener"])?"camunda:fields":"bpmn:values",!i||!i.get(n)||!i.get(n).length)return;return b(i.get(n),(function(e){return e.get("camunda:name")===r.name}))}if("camunda:in"===o)return b(i.get("values"),(function(e){return e.get("target")===r.target}));if("camunda:in:businessKey"===o)return b(i.get("values"),(function(e){return y(e.get("businessKey"))}));if("camunda:out"===o)return b(i.get("values"),(function(e){return e.get("source")===r.source||e.get("sourceExpression")||r.sourceExpression}));if("camunda:inputParameter"===o||"camunda:outputParameter"===o){if(Hx(i,"camunda:Connector")){if(i=i.get("camunda:inputOutput"),!i)return}else if(i=i5(i,"camunda:InputOutput"),!i)return;return"camunda:inputParameter"===o?b(i.get("camunda:inputParameters"),(function(e){return e.get("camunda:name")===r.name})):b(i.get("camunda:outputParameters"),(function(e){if(r.scriptFormat){const t=e.get("camunda:definition");return t&&t.get("camunda:value")===r.source}return e.get("camunda:value")===r.source}))}if("camunda:property"===o){if(!i||!i.get("values")||!i.get("values").length)return;if(i=i5(i,"camunda:Properties"),!i)return;return b(i.get("values"),(function(e){return e.get("camunda:name")===r.name}))}return"camunda:errorEventDefinition"===o?c5(e,r.errorRef):void 0}function w7(e,t){if(!e)return;const n=e.properties,i=t.binding,r=i.name,o=i.type;return"property"===o?b(n,(function(e){const t=e.binding,n=t.name;return"property"===t.type&&n===r})):"camunda:field"===o?b(n,(function(e){const t=e.binding,n=t.name;return"camunda:field"===t.type&&n===r})):"camunda:in"===o?b(n,(function(e){const t=e.binding;if("camunda:in"===t.type&&!(t.expression&&!i.expression||!t.expression&&i.expression))return t.target===i.target})):"camunda:in:businessKey"===o?b(n,(function(e){return"camunda:in:businessKey"===e.binding.type})):"camunda:out"===o?b(n,(function(e){const t=e.binding;return"camunda:out"===t.type&&(t.source===i.source||t.sourceExpression===i.sourceExpression)})):"camunda:inputParameter"===o?b(n,(function(e){const t=e.binding,n=t.name;if("camunda:inputParameter"===t.type)return n===r&&t.scriptFormat===i.scriptFormat})):"camunda:outputParameter"===o?b(n,(function(e){const t=e.binding;if("camunda:outputParameter"===t.type)return t.source===i.source&&t.scriptFormat===i.scriptFormat})):"camunda:property"===o?b(n,(function(e){const t=e.binding,n=t.name;return"camunda:property"===t.type&&n===r})):"camunda:errorEventDefinition"===o?b(n,(function(e){const t=i.errorRef,n=e.binding,r=n.errorRef;return"camunda:errorEventDefinition"===n.type&&r===t})):void 0}function _7(e){return["bpmn:Error"].includes(e)}function E7(e,t){const n=Wx(e),i=t.binding,r=i.name,o=i.type,s=t.value;let a,l;return"property"===o?"conditionExpression"===r?(a=n.get("bpmn:conditionExpression"),a.get("bpmn:body")!==s):n.get(r)!==s:"camunda:field"===o?n.get("camunda:string")!==s:"camunda:in"===o?i.expression?n.get("sourceExpression")!==s:n.get("camunda:source")!==s:"camunda:in:businessKey"===o?n.get("camunda:businessKey")!==s:"camunda:out"===o?n.get("camunda:target")!==s:"camunda:inputParameter"===o?i.scriptFormat?(l=n.get("camunda:definition"),l&&l.get("camunda:value")!==s):n.get("camunda:value")!==s:"camunda:outputParameter"===o?n.get("camunda:name")!==s:"camunda:property"===o?n.get("camunda:value")!==s:"camunda:errorEventDefinition"===o?n.get("expression")!==s:void 0}function O7(e,t){const n=e.indexOf(t);return p(n)||e.splice(n,1),e}b7.$inject=["bpmnFactory","bpmnReplace","commandStack","modeling"];class P7{constructor(e,t,n){e.registerHandler("element-templates.multi-command-executor",s4),e.registerHandler("propertiesPanel.camunda.changeTemplate",b7),e.registerHandler("propertiesPanel.removeTemplate",o4),n.on(["commandStack.shape.create.postExecuted"],(function(n){const{context:{hints:i={},shape:r}}=n;!1!==i.createElementsBehavior&&k7(r,t,e)})),n.on(["commandStack.connection.create.postExecuted"],(function(n){const{context:{hints:i={},connection:r}}=n;!1!==i.createElementsBehavior&&k7(r,t,e)}))}}function k7(e,t,n){if(!t.get(e)&&t.getDefault(e)){const i="propertiesPanel.camunda.changeTemplate",r={element:e,newTemplate:t.getDefault(e)};n.execute(i,r)}}P7.$inject=["commandStack","elementTemplates","eventBus"];var S7={__init__:["elementTemplateCommands"],elementTemplateCommands:["type",P7]};class C7 extends u2{constructor(e,t){super(t.get("eventBus")),this.postExecuted("shape.replace",(function(n){var i=n.context,r=Wx(i.oldShape),o=i.newShape,s=Wx(o);if(!r.modelerTemplate)return;const a=s.modelerTemplate,l=s.modelerTemplateVersion,c=e.get(a,l);if(!c)return void e.unlinkTemplate(o,t);const{appliesTo:p,elementType:u}=c;if(u)return void(Hx(o,u.value)||e.unlinkTemplate(o,t));p.reduce(((e,t)=>e||Hx(s,t)),!1)||e.unlinkTemplate(o,t)}))}}C7.$inject=["elementTemplates","injector"];var T7={__depends__:[S7,{__init__:["elementTemplatesReplaceBehavior"],elementTemplatesReplaceBehavior:["type",C7]}],__init__:["elementTemplatesLoader"],elementTemplates:["type",d5],elementTemplatesLoader:["type",w5]};const A7="camunda:errorEventDefinition",M7="camunda:executionListener",D7="camunda:field",R7="camunda:in:businessKey",N7="camunda:in",$7="camunda:inputParameter",j7="camunda:out",I7="camunda:outputParameter",L7="camunda:property",B7="property",q7=[A7,D7,N7,R7,$7,j7,I7,L7],z7=[$7,I7],F7=[R7,N7,j7],V7=["Boolean","Integer","String"];function H7(e){const{element:t,elementTemplate:n,injector:i}=e,r=i.get("translate"),o=[],{id:s,properties:a,groups:l,scopes:c}=n,p=function(e){return A(e,"group")}(a),u=[];return _(p,((e,n)=>{const i=function(e,t){return b(e,(e=>e.id===t))}(l,n);if(!i)return u.push(...e);U7(o,{element:t,id:`ElementTemplates__CustomProperties-${n}`,label:r(i.label),properties:e,templateId:`${s}-${n}`})})),u.length&&U7(o,{id:"ElementTemplates__CustomProperties",label:r("Custom properties"),element:t,properties:u,templateId:s}),h(c)&&c.forEach((e=>{const{properties:n,type:i}=e,s=i.replace(/:/g,"-");U7(o,{element:t,id:`ElementTemplates__CustomGroup-${s}`,label:r(`Custom properties for scope <${i}>`),properties:n,templateId:s,scope:e})})),o}function U7(e,t){const{element:n,id:i,label:r,properties:o,scope:s,templateId:a}=t,l={id:i,label:r,component:Jq,entries:[],shouldOpen:!0};o.forEach(((e,t)=>{const n=function(e,t,n,i){let{type:r}=n;r||(r=function(e){const{binding:t}=e,{type:n}=t;if([B7,L7,N7,R7,j7,D7].includes(n))return"String";if(n===M7)return"Hidden"}(n));if("Boolean"===r)return{id:e,component:W7,isEdited:nF,property:n,scope:i};if("Dropdown"===r)return{id:e,component:G7,isEdited:lF,property:n,scope:i};if("String"===r)return{id:e,component:Q7,isEdited:bF,property:n,scope:i};if("Text"===r)return{id:e,component:X7,isEdited:mF,property:n,scope:i}}(`custom-entry-${a}-${t}`,0,e,s);n&&l.entries.push(n)})),l.entries.length&&e.push(l)}function W7(e){const{element:t,id:n,property:i,scope:r}=e,{description:o,editable:s,label:a}=i,l=dV("bpmnFactory"),c=dV("commandStack"),p=dV("translate");return tF({element:t,getValue:K7(t,i,r),id:n,label:a?p(a):a,description:I6({description:o}),setValue:Y7(l,c,t,i,r),disabled:!1===s})}function G7(e){const{element:t,id:n,property:i,scope:r}=e,{description:o,editable:s,label:a}=i,l=dV("bpmnFactory"),c=dV("commandStack"),p=dV("translate");return aF({element:t,id:n,label:a?p(a):a,getOptions:()=>{const{choices:e}=i;return e.map((({name:e,value:t})=>({label:p(e),value:t})))},description:I6({description:o}),getValue:K7(t,i,r),setValue:Y7(l,c,t,i,r),disabled:!1===s,validate:Z7(p,i)})}function Q7(e){const{element:t,id:n,property:i,scope:r}=e,{description:o,editable:s,label:a,placeholder:l}=i,c=dV("bpmnFactory"),p=dV("commandStack"),u=dV("debounceInput"),d=dV("translate");return vF({debounce:u,element:t,getValue:K7(t,i,r),id:n,placeholder:l,label:a?d(a):a,description:I6({description:o}),setValue:Y7(c,p,t,i,r),validate:Z7(d,i),disabled:!1===s})}function X7(e){const{element:t,id:n,property:i,scope:r}=e,{description:o,editable:s,label:a,placeholder:l}=i,c=dV("bpmnFactory"),p=dV("commandStack"),u=dV("debounceInput"),d=dV("translate");return fF({debounce:u,element:t,id:n,placeholder:l,label:a?d(a):a,description:I6({description:o}),getValue:K7(t,i,r),setValue:Y7(c,p,t,i,r),disabled:!1===s,validate:Z7(d,i)})}function K7(e,t,n){return function(){let i=Wx(e);const{binding:r,value:o=""}=t,{name:s,type:a}=r;if(n&&(i=J7(i,n),!i))return o;if("property"===a){const e=i.get(s);return"conditionExpression"===s?e?e.get("body"):o:p(e)?o:e}if(a===A7){const{errorRef:e}=r,t=c5(i,e);return t?t.get("camunda:expression"):""}if(a===D7){const e=r5(i,["camunda:Field"]).find((e=>e.get("camunda:name")===s));return e?e.get("camunda:string")||e.get("camunda:expression"):""}if(a===L7){let e;if(e=n?i.get("properties"):i5(i,"camunda:Properties"),e){const t=s5(e,r);if(t)return t.get("camunda:value")}return o}if(z7.includes(a)){let e;if(e=n?i.get("inputOutput"):i5(i,"camunda:InputOutput"),!e)return o;if(a===$7){const t=a5(e,r);if(t){const{scriptFormat:e}=r;if(!e)return t.get("value")||"";{const e=t.get("camunda:definition");if(e)return e.get("camunda:value")}}return o}if(a===I7){const t=l5(e,r);return t?t.get("camunda:name"):o}}if(F7.includes(a)){const e=o5(i,r);if(e){if(a===R7)return e.get("camunda:businessKey");if(a===j7)return e.get("camunda:target");if(a===N7){const{expression:t}=r;return t?e.get("camunda:sourceExpression"):e.get("camunda:source")}}return o}throw e8(e,t)}}function Y7(e,t,n,i,r){return function(o){let s=Wx(n);const{binding:a}=i,{name:l,type:c}=a,u=P5(s);let d,h;const f=[];if(q7.includes(c)&&(d=s.get("extensionElements"),d||(d=E5("bpmn:ExtensionElements",null,s,e),f.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:s,properties:{extensionElements:d}}}))),r&&(s=J7(s,r),s||("bpmn:Error"===r.type?(s=g7(r.id,u,e),f.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:u,properties:{rootElements:[...u.get("rootElements"),s]}}})):(s=E5(r.type,null,n,e),f.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:d,properties:{values:[...d.get("values"),s]}}})))),"property"===c){if("conditionExpression"===l){const{scriptFormat:t}=a;h=E5("bpmn:FormalExpression",{body:o,language:t},s,e)}else{const e=s.$descriptor.propertiesByName[l],{type:t}=e;if(!V7.includes(t))throw new Error(`cannot set property of type <${t}>`);"Boolean"===t?h=!!o:"Integer"===t?(h=parseInt(o,10),isNaN(h)&&(h=void 0)):h=o||""}p(h)||f.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:s,properties:{[l]:h}}})}if(c===A7){const{errorRef:t}=a,i=c5(s,t);if(i)f.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:i,properties:{"camunda:expression":o}}});else{const t=g7(a.errorRef,u,e),i=m7(o,t,d,e);f.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:u,properties:{rootElements:[...u.get("rootElements"),t]}}}),f.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:d,properties:{values:[...d.get("values"),i]}}})}}if(c===D7){const t=r5(s,["camunda:Field"]),i=[];t.length?t.forEach((t=>{t.name===l?i.push(f7(a,o,e)):i.push(t)})):i.push(f7(a,o,e));const r=d.get("values").filter((e=>!t.includes(e)));f.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:d,properties:{values:[...r,...i]}}})}if(c===L7){let t;t=r?s.get("properties"):i5(d,"camunda:Properties"),t||(t=E5("camunda:Properties",null,s,e),r?f.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:s,properties:{properties:t}}}):f.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:d,properties:{values:[...d.get("values"),t]}}}));const i=s5(t,a),l=p7(a,o,e),c=t.get("values").filter((e=>e!==i));f.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:t,properties:{values:[...c,l]}}})}if(z7.includes(c)){let t;if(t=r?s.get("inputOutput"):i5(d,"camunda:InputOutput"),t||(t=E5("camunda:InputOutput",null,s,e),r?f.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:s,properties:{inputOutput:t}}}):f.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:d,properties:{values:[...d.get("values"),t]}}})),c===$7){const i=a5(t,a),r=l7(a,o,e),s=t.get("camunda:inputParameters").filter((e=>e!==i));f.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:t,properties:{"camunda:inputParameters":[...s,r]}}})}if(c===I7){const i=l5(t,a),r=c7(a,o,e),s=t.get("camunda:outputParameters").filter((e=>e!==i));f.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:t,properties:{"camunda:outputParameters":[...s,r]}}})}}if(F7.includes(c)){const t=o5(s,a);let i;i=c===N7?u7(a,o,e):c===j7?h7(a,o,e):d7(o,e);const r=d.get("values").filter((e=>e!==t));f.push({cmd:"element.updateModdleProperties",context:{element:n,moddleElement:d,properties:{values:[...r,i]}}})}if(!f.length)throw e8(n,i);t.execute("element-templates.multi-command-executor",f)}}function Z7(e,t){return function(n){const{constraints:i={}}=t,{maxLength:r,minLength:o,notEmpty:s}=i;if(s&&function(e){return!e||!e.trim().length}(n))return e("Must not be empty.");if(r&&n.length>r)return e("Must have max length {maxLength}.",{maxLength:r});if(o&&n.length for element <${n}>, this should never happen`)}function t8(e){const{errorEventDefinition:t,id:n}=e,i=dV("translate"),r=dV("debounceInput");return vF({element:t,id:n,label:i("Throw expression"),getValue:()=>t.get("camunda:expression"),setValue:()=>{},debounce:r,disabled:!0})}function n8(e,t){const n=e.find((({id:e})=>e.endsWith(t)));return E(e,n)}function i8(e){const t=e.get("errorRef");if(!t)return"";const n=t.get("errorCode"),i=t.get("name")||"";return n?`${i} (code = ${n})`:i}function r8(e){const{element:t,index:n,property:i,groups:r}=e,{binding:o,description:s,label:a}=i,{name:l}=o,c=i5(Wx(t),"camunda:InputOutput"),p=c&&a5(c,o),u=`${t.id}-inputParameter-${n}`;let d=[];if(p){const e=r.find((({id:e})=>"CamundaPlatform__Input"===e)),t=e.items.find((({entries:e})=>e[0].parameter===p));d=t.entries,d=function(e,t){const n=e.find((({id:e})=>e.endsWith(t)));return E(e,n)}(d,"-name")}d.unshift({id:`${u}-local-variable-assignment`,component:s8,inputParameter:p,property:i}),s&&d.unshift({id:`${u}-description`,component:o8,text:s});return{id:u,label:a||l,entries:d}}function o8(e){const{id:t,text:n}=e;return q_("div",{class:"bio-properties-panel-entry","data-entry-id":t,children:q_("div",{class:"bio-properties-panel-description",children:q_(I6,{description:n})})})}function s8(e){const{element:t,id:n,property:i,inputParameter:r}=e,{binding:o}=i,s=dV("bpmnFactory"),a=dV("modeling"),l=dV("translate");return xz({id:n,label:l("Local variable assignment"),switcherLabel:l(r?"On":"Off"),description:r?"":l("Parameter won't be created as local variable."),getValue:()=>r,setValue:e=>{e?function(e,t,n,i){const{binding:r,value:o}=t,s=Wx(e),a=s.get("extensionElements"),l=i5(s,"camunda:InputOutput");let c,p;if(a)if(l){c=l;const e=l7(r,o,n);e.$parent=l,p={inputParameters:l.get("camunda:inputParameters").concat(e)}}else{c=a;const e=a8(r,o,n,a);p={values:a.get("values").concat(e)}}else{c=s;const e=function(e,t){return E5("bpmn:ExtensionElements",{values:[]},e,t)}(s,n),t=a8(r,o,n,e);e.values.push(t),p={extensionElements:e}}i.updateModdleProperties(e,c,p)}(t,i,s,a):function(e,t,n){const i=Wx(e),r=i5(i,"camunda:InputOutput"),o=r.get("camunda:inputParameters"),s=a5(r,t);n.updateModdleProperties(e,r,{inputParameters:E(o,s)})}(t,o,a)}})}function a8(e,t,n,i){const r=l7(e,t,n),o=E5("camunda:InputOutput",{inputParameters:[r],outputParameters:[]},i,n);return r.$parent=o,o}const l8=/\s/;function c8(e){const{id:t,text:n}=e;return q_("div",{class:"bio-properties-panel-entry","data-entry-id":t,children:q_("div",{class:"bio-properties-panel-description",children:q_(I6,{description:n})})})}function p8(e){const{element:t,id:n,property:i,outputParameter:r}=e,{binding:o}=i,s=dV("bpmnFactory"),a=dV("modeling"),l=dV("translate");return xz({id:n,label:l("Process variable assignment"),switcherLabel:l(r?"On":"Off"),description:r?"":l("Parameter won't be available in process scope."),getValue:()=>r,setValue:e=>{e?function(e,t,n,i){const{binding:r,value:o}=t,s=Wx(e),a=s.get("extensionElements"),l=i5(s,"camunda:InputOutput");let c,p;if(a)if(l){c=l;const e=c7(r,o,n);e.$parent=l,p={outputParameters:l.get("camunda:outputParameters").concat(e)}}else{c=a;const e=d8(r,o,n,a);p={values:a.get("values").concat(e)}}else{c=s;const e=function(e,t){return E5("bpmn:ExtensionElements",{values:[]},e,t)}(s,n),t=d8(r,o,n,e);e.values.push(t),p={extensionElements:e}}i.updateModdleProperties(e,c,p)}(t,i,s,a):function(e,t,n){const i=Wx(e),r=i5(i,"camunda:InputOutput"),o=r.get("camunda:outputParameters"),s=l5(r,t);n.updateModdleProperties(e,r,{outputParameters:E(o,s)})}(t,o,a)}})}function u8(e){const{element:t,id:n,property:i}=e,{binding:r}=i,o=l5(i5(t,"camunda:InputOutput"),r),s=dV("commandStack"),a=dV("debounceInput"),l=dV("translate");return vF({debounce:a,element:o,id:n,label:l("Assign to process variable"),getValue:()=>o.get("camunda:name"),setValue:e=>{s.execute("element.updateModdleProperties",{element:t,moddleElement:o,properties:{name:e}})},validate:e=>e?function(e){return l8.test(e)}(e)?l("Process variable name must not contain spaces."):void 0:l("Process variable name must not be empty.")})}function d8(e,t,n,i){const r=c7(e,t,n),o=E5("camunda:InputOutput",{inputParameters:[],outputParameters:[r]},i,n);return r.$parent=o,o}const h8="camunda:errorEventDefinition",f8="camunda:inputParameter",m8="camunda:outputParameter",g8=["general","documentation","multiInstance"];class y8{constructor(e,t,n){t.registerProvider(300,this),this._elementTemplates=e,this._injector=n}getGroups(e){return t=>{const n=this._injector;if(!this._shouldShowTemplateProperties(e))return t;const i=n.get("translate");t=t.slice();const r={element:e,id:"ElementTemplates__Template",label:i("Template"),component:G4(),entries:s6({element:e,elementTemplates:this._elementTemplates})};v8(g8,t,[r]);const o=this._elementTemplates.get(e);if(o){const i=[].concat(function(e,t,n,i){const r=n.get("translate"),o={label:r("Inputs"),id:"ElementTemplates__Input",component:Jz,items:[]},s=t.properties.filter((({binding:e,type:t})=>!t&&e.type===f8));if(s.forEach(((t,n)=>{const r=r8({element:e,index:n,property:t,groups:i});r&&o.items.push(r)})),!o.items.length)return null;return o}(e,o,n,t)||[],function(e,t,n){const i=n.get("translate"),r={label:i("Outputs"),id:"ElementTemplates__Output",component:Jz,items:[]},o=t.properties.filter((({binding:e,type:t})=>!t&&e.type===m8));if(o.forEach(((t,i)=>{const o=function(e){const{element:t,index:n,injector:i,property:r}=e,{binding:o,description:s,label:a}=r,{name:l}=o,c=i5(Wx(t),"camunda:InputOutput"),p=i.get("translate"),u=c&&l5(c,o),d=`${t.id}-outputParameter-${n}`;let h=[];return s&&h.push({id:`${d}-description`,component:c8,text:s}),h.push({id:`${d}-local-variable-assignment`,component:p8,outputParameter:u,property:r}),u&&h.push({id:`${d}-assign-to-process-variable`,component:u8,property:r}),{id:d,label:a||l||p(""),entries:h}}({element:e,index:i,property:t,injector:n});o&&r.items.push(o)})),!r.items.length)return null;return r}(e,o,n)||[],function(e,t,n,i){const r=n.get("translate"),o={label:r("Errors"),id:"ElementTemplates__Error",component:Jz,items:[]},s=t.properties.filter((({binding:e,type:t})=>!t&&e.type===h8));if(s.forEach(((t,n)=>{const r=function(e){const{element:t,index:n,property:i,groups:r}=e,{binding:o,label:s}=i,{errorRef:a}=o;if(!r5(Wx(t),["camunda:ErrorEventDefinition"]).length)return;const l=c5(t,a),c=`${t.id}-error-${n}`;let p=[];const u=r.find((({id:e})=>"CamundaPlatform__Errors"===e)),d=u.items.find((({entries:e})=>e[0].errorEventDefinition===l));return p=d.entries,p=n8(p,"-errorRef"),p=n8(p,"-expression"),p.push({id:`${c}-expression`,component:t8,errorEventDefinition:l,property:i}),{id:c,label:s||i8(l),entries:p}}({element:e,index:n,property:t,groups:i});r&&o.items.push(r)})),!o.items.length)return null;return o}(e,o,n,t)||[],H7({element:e,elementTemplate:o,injector:n}));v8("ElementTemplates__Template",t,i)}return t5(e)&&(t=function(e,t){if(!e.entriesVisible)return t.filter((e=>g8.includes(e.id)||e.id.startsWith("ElementTemplates__")));return t}(o||{},t)),t}}_shouldShowTemplateProperties(e){return t5(e)||this._elementTemplates.getAll(e).length}}function v8(e,t,n){let i=e;Array.isArray(e)||(i=[e]);const r=t.reduce(((e,t,n)=>i.includes(t.id)?n:e),-1);-1!==r?t.splice(r+1,0,...n):t.unshift(...n)}y8.$inject=["elementTemplates","propertiesPanel","injector"];var b8={__depends__:[T7,{__depends__:[V3,a2],__init__:["elementTemplatesPropertiesProvider"],elementTemplatesPropertiesProvider:["type",y8]}]};function x8(){}function w8(e,t){this.model=e,this.properties=t}x8.prototype.get=function(e){return this.$model.properties.get(this,e)},x8.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},w8.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(x8.prototype);_(e.properties,(function(e){e.isMany||void 0===e.default||(i[e.name]=e.default)})),n.defineModel(i,t),n.defineDescriptor(i,e);var r=e.ns.name;function o(e){n.define(this,"$type",{value:r,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),_(e,q((function(e,t){this.set(t,e)}),this))}return o.prototype=i,o.hasType=i.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var _8={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},E8={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 O8(e,t){var n=E8[e];return n?n(t):t}function P8(e){return!!_8[e]}function k8(e){return!!E8[e]}function S8(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected or , got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function C8(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function T8(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,_(e,q(this.registerPackage,this))}function A8(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function M8(e){this.model=e}function D8(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function R8(e){return e.replace(/^:/,"")}function N8(e,t={}){this.properties=new M8(this),this.factory=new w8(this,this.properties),this.registry=new T8(e,this.properties),this.typeCache={},this.config=t}C8.prototype.build=function(){return V(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},C8.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)},C8.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,o=this.propertiesByName,s=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var a=r.indexOf(e);if(-1===a)throw new Error("property <"+i.name+"> not found in property list");r.splice(a,1),this.addProperty(t,n?void 0:a,s),o[i.name]=o[i.localName]=t},C8.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=S8(r[0],i),s=S8(r[1],o.prefix).name,a=this.propertiesByName[s];if(!a)throw new Error("refined property <"+s+"> not found");this.replaceProperty(a,e,n),delete e.redefines},C8.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},C8.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},C8.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},C8.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},C8.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},C8.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")},C8.prototype.hasProperty=function(e){return this.propertiesByName[e]},C8.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(_(e.properties,q((function(n){n=z({},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)},T8.prototype.getPackage=function(e){return this.packageMap[e]},T8.prototype.getPackages=function(){return this.packages},T8.prototype.registerPackage=function(e){e=z({},e);var t=this.packageMap;A8(t,e,"prefix"),A8(t,e,"uri"),_(e.types,q((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},T8.prototype.registerType=function(e,t){var n=S8((e=z({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:z(e.meta||{})})).name,t.prefix),i=n.name,r={};_(e.properties,q((function(e){var t=S8(e.name,n.prefix),i=t.name;P8(e.type)||(e.type=S8(e.type,t.prefix).name),z(e,{ns:t,name:i}),r[i]=e}),this)),z(e,{ns:n,name:i,propertiesByName:r}),_(e.extends,q((function(e){var t=S8(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},T8.prototype.mapTypes=function(e,t,n){var i=P8(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(n,i){var o=S8(n,P8(n)?"":e.prefix);r.mapTypes(o,t,i)}function s(e){return o(e,!0)}if(!i)throw new Error("unknown type <"+e.name+">");_(i.superClass,n?s:function(e){return o(e,!1)}),t(i,!n),_(i.traits,s)},T8.prototype.getEffectiveDescriptor=function(e){var t=S8(e),n=new C8(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},T8.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},M8.prototype.set=function(e,t,n){if(!y(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[R8(t)]:i?r in e?e[r]=n:D8(e,i,n):e.$attrs[R8(t)]=n},M8.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[R8(t)];var i=n.name;return!e[i]&&n.isMany&&D8(e,n,[]),e[i]},M8.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;delete(n=z({},n,{get:function(){return i}})).value}Object.defineProperty(e,t,n)},M8.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},M8.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},M8.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},N8.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},N8.prototype.getType=function(e){var t=this.typeCache,n=y(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},N8.prototype.createAny=function(e,t,n){var i=S8(e),r={$type:e,$instanceOf:function(e){return e===this.$type},get:function(e){return this[e]},set:function(e,t){F(this,[e],t)}},o={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};return this.properties.defineDescriptor(r,o),this.properties.defineModel(r,this),this.properties.define(r,"get",{enumerable:!1,writable:!0}),this.properties.define(r,"set",{enumerable:!1,writable:!0}),this.properties.define(r,"$parent",{enumerable:!1,writable:!0}),this.properties.define(r,"$instanceOf",{enumerable:!1,writable:!0}),_(n,(function(e,t){f(e)&&void 0!==e.value?r[e.name]=e.value:r[t]=e})),r},N8.prototype.getPackage=function(e){return this.registry.getPackage(e)},N8.prototype.getPackages=function(){return this.registry.getPackages()},N8.prototype.getElementDescriptor=function(e){return e.$descriptor},N8.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},N8.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},N8.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var $8=String.fromCharCode,j8=Object.prototype.hasOwnProperty,I8=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,L8={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function B8(e,t,n,i){return i?j8.call(L8,i)?L8[i]:"&"+i+";":$8(t||parseInt(n,16))}function q8(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(I8,B8):e}Object.keys(L8).forEach((function(e){L8[e.toUpperCase()]=L8[e]}));var z8="non-whitespace outside of root node";function F8(e){return new Error(e)}function V8(e){return"missing namespace for prefix <"+e+">"}function H8(e){return{get:e,enumerable:!0}}function U8(e){var t,n={};for(t in e)n[t]=e[t];return n}function W8(e){return e+"$uri"}function G8(){return{line:0,column:0}}function Q8(e){throw e}function X8(e){if(!this)return new X8(e);var t,n,i,r,o,s,a,l,c,p=e&&e.proxy,u=Q8,d=G8,h=!1,f=!1,m=null,g=!1;function y(e){e instanceof Error||(e=F8(e)),m=e,u(e,d)}function v(e){o&&(e instanceof Error||(e=F8(e)),o(e,d))}this.on=function(e,c){if("function"!=typeof c)throw F8("required args ");switch(e){case"openTag":n=c;break;case"text":t=c;break;case"closeTag":i=c;break;case"error":u=c;break;case"warn":o=c;break;case"cdata":r=c;break;case"attention":l=c;break;case"question":a=c;break;case"comment":s=c;break;default:throw F8("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw F8("required args ");var t,n={};for(t in e)n[t]=e[t];return f=!0,c=n,this},this.parse=function(e){if("string"!=typeof e)throw F8("required args ");return m=null,function(e){var o,u,m,b,x,w,_,E,O,P,k,S=f?[]:null,C=f?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[W8(n)]=t;return i}(c):null,T=[],A=0,M=!1,D=!1,R=0,N=0,$="",j=0;function I(){if(null!==k)return k;var e,t,n,i,r,o,s,a,l,p,u,d=f&&C.xmlns,m=f&&h?[]:null,g=j,y=$,b=y.length,x={},w={};e:for(;g8)){for((p<65||p>122||p>90&&p<97)&&95!==p&&58!==p&&(v("illegal first char attribute name"),l=!0),u=g+1;u96&&p<123||p>64&&p<91||p>47&&p<59||46===p||45===p||95===p)){if(32===p||p<14&&p>8){v("missing attribute value"),g=u;continue e}if(61===p)break;v("illegal attribute name char"),l=!0}if("xmlns:xmlns"===(a=y.substring(g,u))&&(v("illegal declaration of xmlns"),l=!0),34===(p=y.charCodeAt(u+1)))-1===(u=y.indexOf('"',g=u+2))&&-1!==(u=y.indexOf("'",g))&&(v("attribute value quote missmatch"),l=!0);else if(39===p)-1===(u=y.indexOf("'",g=u+2))&&-1!==(u=y.indexOf('"',g))&&(v("attribute value quote missmatch"),l=!0);else for(v("missing attribute value quotes"),l=!0,u+=1;u8);u++);for(-1===u&&(v("missing closing quotes"),u=b,l=!0),l||(o=y.substring(g,u)),g=u;u+18);u++)g===u&&(v("illegal character after attribute end"),l=!0);if(g=u+1,!l)if(a in w)v("attribute <"+a+"> already defined");else if(w[a]=!0,f)if(h){if(null!==(r="xmlns"===a?"xmlns":120===a.charCodeAt(0)&&"xmlns:"===a.substr(0,6)?a.substr(6):null)){if(e=q8(o),t=W8(r),!(s=c[e])){if("xmlns"===r||t in C&&C[t]!==e)do{s="ns"+A++}while(void 0!==C[s]);else s=r;c[e]=s}C[r]!==s&&(i||(C=U8(C),i=!0),C[r]=s,"xmlns"===r&&(C[W8(s)]=e,d=s),C[t]=e),x[a]=o;continue}m.push(a,o)}else-1!==(p=a.indexOf(":"))?(n=C[a.substring(0,p)])?x[a=d===n?a.substr(p+1):n+a.substr(p)]=o:v(V8(a.substring(0,p))):x[a]=o;else x[a]=o}if(h)for(g=0,b=m.length;g=s&&(t=i.exec(e))&&!((a=t[0].length+t.index)>R);)r+=1,s=a;return-1==R?(o=a,n=e.substring(N)):0===N?n=e.substring(N,R):(o=R-s,n=-1==N?e.substring(R):e.substring(R,N+1)),{data:n,line:r,column:o}}d=L,p&&(P=Object.create({},{name:H8((function(){return E})),originalName:H8((function(){return O})),attrs:H8(I),ns:H8((function(){return C}))}));for(;-1!==N;){if(-1===(R=60===e.charCodeAt(N)?N:e.indexOf("<",N)))return T.length?y("unexpected end of file"):0===N?y("missing start tag"):void(N",R)))return y("unclosed cdata");if(r&&(r(e.substring(R+9,N),d),g))return;N+=3;continue}if(45===b&&45===e.charCodeAt(R+3)){if(-1===(N=e.indexOf("--\x3e",R)))return y("unclosed comment");if(s&&(s(e.substring(R+4,N),q8,d),g))return;N+=3;continue}}if(63!==x){for(u=R+1;;u++){if(w=e.charCodeAt(u),isNaN(w))return N=-1,y("unclosed tag");if(34===w)u=-1!==(b=e.indexOf('"',u+1))?b:u;else if(39===w)u=-1!==(b=e.indexOf("'",u+1))?b:u;else if(62===w){N=u;break}}if(33!==x){if(k={},47===x){if(M=!1,D=!0,!T.length)return y("missing open tag");if(u=E=T.pop(),b=R+2+u.length,e.substring(R+2,b)!==u)return y("closing tag mismatch");for(;b8&&x<14))return y("close tag")}else{if(47===e.charCodeAt(N-1)?(u=E=e.substring(R+1,N-1),M=!0,D=!0):(u=E=e.substring(R+1,N),M=!0,D=!1),!(x>96&&x<123||x>64&&x<91||95===x||58===x))return y("illegal first char nodeName");for(b=1,m=u.length;b96&&x<123||x>64&&x<91||x>47&&x<59||45===x||95===x||46==x)){if(32===x||x<14&&x>8){E=u.substring(0,b),k=null;break}return y("invalid nodeName")}D||T.push(E)}if(f){if(o=C,M&&(D||S.push(o),null===k&&(h=-1!==u.indexOf("xmlns",b))&&(j=b,$=u,I(),h=!1)),O=E,-1!==(x=E.indexOf(":"))){if(!(_=C[E.substring(0,x)]))return y("missing namespace on <"+O+">");E=E.substr(x+1)}else _=C.xmlns;_&&(E=_+":"+E)}if(M&&(j=b,$=u,n&&(p?n(P,q8,D,d):n(E,I,q8,D,d),g)))return;if(D){if(i&&(i(p?P:E,q8,M,d),g))return;f&&(C=M?o:S.pop())}N+=1}else{if(l&&(l(e.substring(R,N+1),q8,d),g))return;N+=1}}else{if(-1===(N=e.indexOf("?>",R)))return y("unclosed question");if(a&&(a(e.substring(R,N+2),d),g))return;N+=2}}}(e),d=G8,g=!1,m},this.stop=function(){g=!0}}function K8(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var Y8={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},Z8="property";function J8(e){return e.xml&&e.xml.serialize}function e9(e,t){return K8(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function t9(e){return new Error(e)}function n9(e){return e.$descriptor}function i9(e){z(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw t9("expected element");var t,n=this.elementsById,i=n9(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 t9("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function r9(){}function o9(){}function s9(){}function a9(e,t){this.property=e,this.context=t}function l9(e,t){this.element=t,this.propertyDesc=e}function c9(){}function p9(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function u9(e,t,n){p9.call(this,e,t,n)}function d9(e,t,n){this.model=e,this.context=n}function h9(e){e instanceof N8&&(e={model:e}),z(this,{lax:!1},e)}r9.prototype.handleEnd=function(){},r9.prototype.handleText=function(){},r9.prototype.handleNode=function(){},o9.prototype=Object.create(r9.prototype),o9.prototype.handleNode=function(){return this},s9.prototype=Object.create(r9.prototype),s9.prototype.handleText=function(e){this.body=(this.body||"")+e},a9.prototype=Object.create(s9.prototype),a9.prototype.handleNode=function(e){if(this.element)throw t9("expected no sub nodes");return this.element=this.createReference(e),this},a9.prototype.handleEnd=function(){this.element.id=this.body},a9.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},l9.prototype=Object.create(s9.prototype),l9.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=O8(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},c9.prototype=Object.create(s9.prototype),c9.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},p9.prototype=Object.create(c9.prototype),p9.prototype.addReference=function(e){this.context.addReference(e)},p9.prototype.handleText=function(e){if(!n9(this.element).bodyProperty)throw t9("unexpected body text <"+e+">");s9.prototype.handleText.call(this,e)},p9.prototype.handleEnd=function(){var e=this.body,t=this.element,n=n9(t).bodyProperty;n&&void 0!==e&&(e=O8(n.type,e),t.set(n.name,e))},p9.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=n9(i),o=this.context,s=new i({}),a=this.model;return _(n,(function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?_(e.split(" "),(function(e){o.addReference({element:s,property:i.ns.name,id:e})})):o.addReference({element:s,property:i.ns.name,id:e}):(i?e=O8(i.type,e):"xmlns"===n?n=":"+n:(t=S8(n,r.ns.prefix),a.getPackage(t.prefix)&&o.addWarning({message:"unknown attribute <"+n+">",element:s,property:n,value:e})),s.set(n,e))})),s},p9.prototype.getPropertyForNode=function(e){var t=S8(e.name),n=this.type,i=this.model,r=n9(n),o=t.name,s=r.propertiesByName[o];if(s&&!s.isAttr){const t=function(e){const t=J8(e);return t!==Z8&&(t||null)}(s);if(t){const n=e.attributes[t];if(n){const t=function(e,t,n){const i=S8(e,t.xmlns),r=S8(`${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 z({},s,{effectiveType:n9(i.getType(t)).name})}}return s}var a=i.getPackage(t.prefix);if(a){const e=e9(t,a),n=i.getType(e);if(s=b(r.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})),s)return z({},s,{effectiveType:n9(n).name})}else if(s=b(r.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})),s)return s;throw t9("unrecognized element <"+t.name+">")},p9.prototype.toString=function(){return"ElementDescriptor["+n9(this.type).name+"]"},p9.prototype.valueHandler=function(e,t){return new l9(e,t)},p9.prototype.referenceHandler=function(e){return new a9(e,this.context)},p9.prototype.handler=function(e){return"Element"===e?new d9(this.model,e,this.context):new p9(this.model,e,this.context)},p9.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,k8(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?(z(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},u9.prototype=Object.create(p9.prototype),u9.prototype.createElement=function(e){var t=e.name,n=S8(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),s=o&&e9(n,o)||t;if(!r.hasType(s))throw t9("unexpected element <"+e.originalName+">");return p9.prototype.createElement.call(this,e)},d9.prototype=Object.create(c9.prototype),d9.prototype.createElement=function(e){var t=e.name,n=S8(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},d9.prototype.handleChild=function(e){var t=new d9(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},d9.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},h9.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof p9?(i=t,t={}):"string"==typeof t?(i=this.handler(t),t={}):"string"==typeof i&&(i=this.handler(i));var r=this.model,o=this.lax,s=new i9(z({},t,{rootHandler:i})),a=new X8({proxy:!0}),l=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function c(e,t,n){var i=t(),r=i.line,o=i.column,a=i.data;"<"===a.charAt(0)&&-1!==a.indexOf(" ")&&(a=a.slice(0,a.indexOf(" "))+">");var l="unparsable content "+(a?a+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return s.addWarning({message:l,error:e}),!0;throw t9(l)}function p(e,t){return c(e,t,!0)}i.context=s,l.push(i);var u=/^<\?xml /i,d=/ encoding="([^"]+)"/i,h=/^utf-8$/i;function f(e,t){try{l.peek().handleText(e)}catch(e){p(e,t)}}var m=r.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),Object.entries(Y8).reduce((function(e,[t,n]){return e[n]=t,e}),r.config&&r.config.nsMap||{}));return a.ns(m).on("openTag",(function(e,t,n,i){var r=e.attrs||{},s=Object.keys(r).reduce((function(e,n){var i=t(r[n]);return e[n]=i,e}),{});!function(e,t){var n=l.peek();try{l.push(n.handleNode(e))}catch(e){c(e,t,o)&&l.push(new o9)}}({name:e.name,originalName:e.originalName,attributes:s,ns:e.ns},i)})).on("question",(function(e){if(u.test(e)){var t=d.exec(e),n=t&&t[1];n&&!h.test(n)&&s.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}})).on("closeTag",(function(){l.pop().handleEnd()})).on("cdata",f).on("text",(function(e,t,n){!function(e,t){e.trim()&&f(e,t)}(t(e),n)})).on("error",c).on("warn",p),new Promise((function(t,n){var r;try{a.parse(e),function(){var e,t,n=s.elementsById,i=s.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],a=n9(r).propertiesByName[t.property];if(o||s.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),a.isMany){var l=r.get(a.name),c=l.indexOf(t);-1===c&&(c=l.length),o?l[c]=o:l.splice(c,1)}else r.set(a.name,o)}}()}catch(e){r=e}var o=i.element;r||o||(r=t9("failed to parse document as <"+i.type.$descriptor.name+">"));var l=s.warnings,c=s.references,p=s.elementsById;return r?(r.warnings=l,n(r)):t({rootElement:o,elementsById:p,references:c,warnings:l})}))},h9.prototype.handler=function(e){return new u9(this.model,e)};var f9=/<|>|'|"|&|\n\r|\n/g,m9=/<|>|&/g;function g9(e){this.prefixMap={},this.uriMap={},this.used={},this.wellknown=[],this.custom=[],this.parent=e,this.defaultPrefixMap=e&&e.defaultPrefixMap||{}}function y9(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function v9(e){return y(e)?e:(e.prefix?e.prefix+":":"")+e.localName}g9.prototype.mapDefaultPrefixes=function(e){this.defaultPrefixMap=e},g9.prototype.defaultUriByPrefix=function(e){return this.defaultPrefixMap[e]},g9.prototype.byUri=function(e){return this.uriMap[e]||this.parent&&this.parent.byUri(e)},g9.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)},g9.prototype.uriByPrefix=function(e){return this.prefixMap[e||"xmlns"]||this.parent&&this.parent.uriByPrefix(e)},g9.prototype.mapPrefix=function(e,t){this.prefixMap[e||"xmlns"]=t},g9.prototype.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},g9.prototype.logUsed=function(e){var t=e.uri,n=this.getNSKey(e);this.used[n]=this.byUri(t),this.parent&&this.parent.logUsed(e)},g9.prototype.getUsed=function(e){return[].concat(this.wellknown,this.custom).filter((e=>{var t=this.getNSKey(e);return this.used[t]}))};var b9={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},x9={"<":"lt",">":"gt","&":"amp"};function w9(e,t,n){return(e=y(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function _9(e){this.tagName=e}function E9(){}function O9(e){this.tagName=e}function P9(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function k9(e,t,n){P9.call(this,e,t),this.serialization=n}function S9(){this.value="",this.write=function(e){this.value+=e}}function C9(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 T9(e){return e=z({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new S9,r=new C9(i,e.format);e.preamble&&r.append('\n');var o=new P9,s=t.$model;if(o.getNamespaces().mapDefaultPrefixes(function(e){const t=e.config&&e.config.nsMap||{},n={};for(const e in Y8)n[e]=Y8[e];for(const e in t){n[t[e]]=e}for(const t of e.getPackages())n[t.prefix]=t.uri;return n}(s)),o.build(t).serializeTo(r),!n)return i.value}}}function A9(e,t){N8.call(this,e,t)}_9.prototype.build=function(e){return this.element=e,this},_9.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"").appendNewLine()},E9.prototype.serializeValue=E9.prototype.serializeTo=function(e){e.append(this.escape?w9(this.value,m9,x9):this.value)},E9.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(m9)&&(this.escape=!0),this},y9(O9,E9),O9.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("").appendNewLine()},P9.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 w(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!v(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)}))}(e),this.parseAttributes(w(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return w(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},P9.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?z({localName:t.ns.localName},e):z({localName:(n=t.ns.localName,i=t.$pkg,K8(i)?function(e){return e.charAt(0).toLowerCase()+e.slice(1)}(n):n)},e);var n,i}(this.logNamespaceUsed(e.ns),e)},P9.prototype.nsPropertyTagName=function(e){return function(e,t){return z({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},P9.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},P9.prototype.nsAttributeName=function(e){var t;if(t=y(e)?S8(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}:z({localName:t.localName},n)},P9.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})))},P9.prototype.parseGenericContainments=function(e){var t=e.$body;t&&this.body.push((new E9).build({type:"String"},t));var n=e.$children;n&&_(n,(e=>{this.body.push(new P9(this).build(e))}))},P9.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=S8(t);if("xmlns"===o.prefix&&(i={prefix:o.localName,uri:n}),o.prefix||"xmlns"!==o.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var s=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(s)}},P9.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,i=[];return _(n,(function(n,r){var o=t.parseNsAttribute(e,r,n);o&&i.push(o)})),i},P9.prototype.parseGenericAttributes=function(e,t){var n=this;_(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)}}))},P9.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;_(e,(function(e){var r=i.get(e.name),o=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new E9).build(e,r[0]));else if(k8(e.type))_(r,(function(i){n.push(new O9(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(o)_(r,(function(i){n.push(new _9(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var s=J8(e);_(r,(function(i){var r;r=s?s===Z8?new P9(t,e):new k9(t,e,s):new P9(t),n.push(r.build(i))}))}}))},P9.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new g9(t):n=t),n},P9.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},P9.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.getNamespaces(t),s=e.prefix,a=e.uri;if(!s&&!a)return{localName:e.localName};if(r=o.defaultUriByPrefix(s),!(a=a||r||o.uriByPrefix(s)))throw new Error("no namespace uri given for prefix <"+s+">");if((e=o.byUri(a))||s||(e=this.logNamespace({uri:a},r===a,!0)),!e){for(n=s,i=1;o.uriByPrefix(n);)n=s+"_"+i++;e=this.logNamespace({prefix:n,uri:a},r===a)}return s&&o.mapPrefix(s,a),e},P9.prototype.parseAttributes=function(e){var t=this,n=this.element;_(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];_(i,(function(e){r.push(e.id)})),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},P9.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),v9(e)},P9.prototype.addAttribute=function(e,t){var n=this.attrs;y(t)&&(t=w9(t,f9,b9));var i=x(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)},P9.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)),_(t,(function(t){e.append(" ").append(v9(t.name)).append('="').append(t.value).append('"')}))},P9.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==E9;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),_(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("")),e.appendNewLine()},y9(k9,P9),k9.prototype.parseNsAttributes=function(e){var t=P9.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},k9.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},A9.prototype=Object.create(N8.prototype),A9.prototype.fromXML=function(e,t,n){y(t)||(n=t,t="bpmn:Definitions");var i=new h9(z({model:this,lax:!0},n)),r=i.handler(t);return i.fromXML(e,r)},A9.prototype.toXML=function(e,t){var n=new T9(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(e){return i(e)}}))};class M9{constructor(e){this._generate=e,this.value=null,this.valid=!1}invalidate(){this.valid=!1}get(){return this.valid||(this.value=this._generate(),this.valid=!0),this.value}}function D9(e){return!!function(e){return $9(e,"outputParameters")}(e).length}function R9(e,t){return function(e){return $9(e,"inputParameters")}(e).find((function(e){return e.target===t||e.name===t}))}function N9(e){return j9(e,"zeebe:IoMapping")[0]||j9(e,"camunda:InputOutput")[0]}function $9(e,t){var n=N9(e);return n&&n.get(t)||[]}function j9(e,t){var n=[],i=e.get("extensionElements");if(void 0!==i){var r=i.get("values");void 0!==r&&(n=w(r,(function(e){return Hx(e,t)})))}return n}function I9(e,t,n){var i=L9(e);if(D9(e))return e;var r=i.find((function(e){return Hx(e,"bpmn:SubProcess")&&R9(e,n)}));return r||t}function L9(e){for(var t=[],n=e;n.$parent;)t.push(n.$parent),n=n.$parent;return t}class B9{constructor(e,t){this.providers=[],this._eventBus=e,this._bpmnjs=t,this.rawVariables=new M9(this._generateRawVariables.bind(this)),this.parsedVariables=new M9((async()=>{const t={variables:await this.getRawVariables()};return e.fire("variableResolver.parseVariables",t),t.variables})),e.on(["commandStack.changed","diagram.clear","import.done","variables.changed"],(()=>{this.invalidateCache()})),e.on("variableResolver.parseVariables",((e,t)=>{t.variables=this._parseVariables(t.variables)}))}_baseExtractor(){return[]}async getRawVariables(){return await this.rawVariables.get()}async getVariables(){return await this.parsedVariables.get()}invalidateCache(){this.rawVariables.invalidate(),this.parsedVariables.invalidate()}async _generateRawVariables(){const e=this._bpmnjs,t={},n=e.getDefinitions().get("rootElements").map((async e=>{const n=await this._baseExtractor(e,[this._extractor.bind(this)]);t[e.id]=n.map((e=>(e.provider||(e.provider=[this._baseExtractor]),e)))}));return await Promise.all(n),t}_parseVariables(e){const t={};for(const n in e){const i=e[n],r=[];i.forEach((e=>{const t=r.find((t=>t.name===e.name&&t.scope===e.scope));t?(q9("origin",t,e),q9("provider",t,e),z9(t,e)):r.push(e)})),V9(r),t[n]=r}return t}async _extractor(e){const{elements:t,containerElement:n,processVariables:i}=e,r=this,o=t.flatMap((e=>r.providers.map((async t=>{const r=await t.getVariables(e);r&&r.forEach((r=>{i.push({...H9(r),origin:[e],scope:r.scope||I9(e,n,r.name),provider:[t]})}))}))));await Promise.all(o)}registerProvider(e){this.providers.push(e),this.invalidateCache()}async getProcessVariables(e){const t=Wx(e);return(await this.getVariables())[t.id]||[]}async getVariablesForElement(e){const t=Wx(e),n=function(e){const t=Wx(e);if(Hx(t,"bpmn:Participant"))return t.processRef;if(Hx(t,"bpmn:Process"))return t;let n=t;for(;n.$parent&&!Hx(n,"bpmn:Process");)n=n.$parent;return n}(t),i=await this.getProcessVariables(n);var r=i.filter((function(e){return e.scope.id===t.id})),o=L9(t);return[...r,...i.filter((function(e){return o.find((function(t){return t.id===e.scope.id}))}))]}}function q9(e,t,n){n[e]||(n[e]=[]),t[e]||(t[e]=[]);const i=n[e].filter((n=>!t[e].includes(n)));t[e].push(...i)}function z9(e,t,n=[]){n.includes(t)||n.includes(e)||(n.push(t),n.push(e),e.type=F9(e.type,t.type,"|"),e.info=F9(e.info,t.info,"\n"),e.isList=!!e.isList==!!t.isList?e.isList:"optional",t.entries&&(e.entries||(e.entries=[]),t.entries.forEach((t=>{const i=e.entries.find((e=>e.name===t.name));i?z9(i,t,n):e.entries.push(t)}))))}B9.$inject=["eventBus","bpmnjs"];const F9=(e,t,n)=>{if(e&&e!==t){const i=e.split(n);return i.includes(t)||i.push(t),i.join(n)}return t};function V9(e){e&&e.forEach((e=>{e.detail=e.type,V9(e.entries)}))}function H9(e){const t={...e};return t.entries&&(t.entries=t.entries.map(H9)),t}class U9{constructor(e){this._variableResolver=e,this.register()}getVariables(e){}register(){this._variableResolver.registerProvider(this)}}U9.$inject=["variableResolver"];const W9={__init__:["variableResolver"],variableResolver:["type",class extends B9{constructor(e,t){super(e,t),this._baseExtractor=cV}}]},G9={camunda:JSON.parse('{"name":"Camunda","uri":"http://camunda.org/schema/1.0/bpmn","prefix":"camunda","xml":{"tagAlias":"lowerCase"},"associations":[],"types":[{"name":"Definitions","isAbstract":true,"extends":["bpmn:Definitions"],"properties":[{"name":"diagramRelationId","isAttr":true,"type":"String"}]},{"name":"InOutBinding","superClass":["Element"],"isAbstract":true,"properties":[{"name":"source","isAttr":true,"type":"String"},{"name":"sourceExpression","isAttr":true,"type":"String"},{"name":"target","isAttr":true,"type":"String"},{"name":"businessKey","isAttr":true,"type":"String"},{"name":"local","isAttr":true,"type":"Boolean","default":false},{"name":"variables","isAttr":true,"type":"String"}]},{"name":"In","superClass":["InOutBinding"],"meta":{"allowedIn":["bpmn:CallActivity","bpmn:SignalEventDefinition"]}},{"name":"Out","superClass":["InOutBinding"],"meta":{"allowedIn":["bpmn:CallActivity"]}},{"name":"AsyncCapable","isAbstract":true,"extends":["bpmn:Activity","bpmn:Gateway","bpmn:Event"],"properties":[{"name":"async","isAttr":true,"type":"Boolean","default":false},{"name":"asyncBefore","isAttr":true,"type":"Boolean","default":false},{"name":"asyncAfter","isAttr":true,"type":"Boolean","default":false},{"name":"exclusive","isAttr":true,"type":"Boolean","default":true}]},{"name":"JobPriorized","isAbstract":true,"extends":["bpmn:Process","camunda:AsyncCapable"],"properties":[{"name":"jobPriority","isAttr":true,"type":"String"}]},{"name":"SignalEventDefinitionExtension","isAbstract":true,"extends":["bpmn:SignalEventDefinition"],"properties":[{"name":"async","isAttr":true,"type":"Boolean","default":false}]},{"name":"ErrorEventDefinitionExtension","isAbstract":true,"extends":["bpmn:ErrorEventDefinition"],"properties":[{"name":"errorCodeVariable","isAttr":true,"type":"String"},{"name":"errorMessageVariable","isAttr":true,"type":"String"}]},{"name":"ErrorEventDefinition","superClass":["bpmn:ErrorEventDefinition","Element"],"properties":[{"name":"expression","isAttr":true,"type":"String"}],"meta":{"allowedIn":["bpmn:ServiceTask"]}},{"name":"Error","isAbstract":true,"extends":["bpmn:Error"],"properties":[{"name":"camunda:errorMessage","isAttr":true,"type":"String"}]},{"name":"PotentialStarter","superClass":["Element"],"properties":[{"name":"resourceAssignmentExpression","type":"bpmn:ResourceAssignmentExpression"}]},{"name":"FormSupported","isAbstract":true,"extends":["bpmn:StartEvent","bpmn:UserTask"],"properties":[{"name":"formHandlerClass","isAttr":true,"type":"String"},{"name":"formKey","isAttr":true,"type":"String"},{"name":"formRef","isAttr":true,"type":"String"},{"name":"formRefBinding","isAttr":true,"type":"String"},{"name":"formRefVersion","isAttr":true,"type":"String"}]},{"name":"TemplateSupported","isAbstract":true,"extends":["bpmn:Collaboration","bpmn:Process","bpmn:FlowElement"],"properties":[{"name":"modelerTemplate","isAttr":true,"type":"String"},{"name":"modelerTemplateVersion","isAttr":true,"type":"Integer"}]},{"name":"Initiator","isAbstract":true,"extends":["bpmn:StartEvent"],"properties":[{"name":"initiator","isAttr":true,"type":"String"}]},{"name":"ScriptTask","isAbstract":true,"extends":["bpmn:ScriptTask"],"properties":[{"name":"resultVariable","isAttr":true,"type":"String"},{"name":"resource","isAttr":true,"type":"String"}]},{"name":"Process","isAbstract":true,"extends":["bpmn:Process"],"properties":[{"name":"candidateStarterGroups","isAttr":true,"type":"String"},{"name":"candidateStarterUsers","isAttr":true,"type":"String"},{"name":"versionTag","isAttr":true,"type":"String"},{"name":"historyTimeToLive","isAttr":true,"type":"String"},{"name":"isStartableInTasklist","isAttr":true,"type":"Boolean","default":true}]},{"name":"EscalationEventDefinitionExtension","isAbstract":true,"extends":["bpmn:EscalationEventDefinition"],"properties":[{"name":"escalationCodeVariable","isAttr":true,"type":"String"}]},{"name":"FormalExpression","isAbstract":true,"extends":["bpmn:FormalExpression"],"properties":[{"name":"resource","isAttr":true,"type":"String"}]},{"name":"Assignable","extends":["bpmn:UserTask"],"properties":[{"name":"assignee","isAttr":true,"type":"String"},{"name":"candidateUsers","isAttr":true,"type":"String"},{"name":"candidateGroups","isAttr":true,"type":"String"},{"name":"dueDate","isAttr":true,"type":"String"},{"name":"followUpDate","isAttr":true,"type":"String"},{"name":"priority","isAttr":true,"type":"String"}]},{"name":"CallActivity","extends":["bpmn:CallActivity"],"properties":[{"name":"calledElementBinding","isAttr":true,"type":"String","default":"latest"},{"name":"calledElementVersion","isAttr":true,"type":"String"},{"name":"calledElementVersionTag","isAttr":true,"type":"String"},{"name":"calledElementTenantId","isAttr":true,"type":"String"},{"name":"caseRef","isAttr":true,"type":"String"},{"name":"caseBinding","isAttr":true,"type":"String","default":"latest"},{"name":"caseVersion","isAttr":true,"type":"String"},{"name":"caseTenantId","isAttr":true,"type":"String"},{"name":"variableMappingClass","isAttr":true,"type":"String"},{"name":"variableMappingDelegateExpression","isAttr":true,"type":"String"}]},{"name":"ServiceTaskLike","extends":["bpmn:ServiceTask","bpmn:BusinessRuleTask","bpmn:SendTask","bpmn:MessageEventDefinition"],"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"resultVariable","isAttr":true,"type":"String"}]},{"name":"DmnCapable","extends":["bpmn:BusinessRuleTask"],"properties":[{"name":"decisionRef","isAttr":true,"type":"String"},{"name":"decisionRefBinding","isAttr":true,"type":"String","default":"latest"},{"name":"decisionRefVersion","isAttr":true,"type":"String"},{"name":"mapDecisionResult","isAttr":true,"type":"String","default":"resultList"},{"name":"decisionRefTenantId","isAttr":true,"type":"String"}]},{"name":"ExternalCapable","extends":["camunda:ServiceTaskLike"],"properties":[{"name":"type","isAttr":true,"type":"String"},{"name":"topic","isAttr":true,"type":"String"}]},{"name":"TaskPriorized","extends":["bpmn:Process","camunda:ExternalCapable"],"properties":[{"name":"taskPriority","isAttr":true,"type":"String"}]},{"name":"Properties","superClass":["Element"],"meta":{"allowedIn":["*"]},"properties":[{"name":"values","type":"Property","isMany":true}]},{"name":"Property","superClass":["Element"],"properties":[{"name":"id","type":"String","isAttr":true},{"name":"name","type":"String","isAttr":true},{"name":"value","type":"String","isAttr":true}]},{"name":"Connector","superClass":["Element"],"meta":{"allowedIn":["camunda:ServiceTaskLike"]},"properties":[{"name":"inputOutput","type":"InputOutput"},{"name":"connectorId","type":"String"}]},{"name":"InputOutput","superClass":["Element"],"meta":{"allowedIn":["bpmn:FlowNode","camunda:Connector"]},"properties":[{"name":"inputOutput","type":"InputOutput"},{"name":"connectorId","type":"String"},{"name":"inputParameters","isMany":true,"type":"InputParameter"},{"name":"outputParameters","isMany":true,"type":"OutputParameter"}]},{"name":"InputOutputParameter","properties":[{"name":"name","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"},{"name":"definition","type":"InputOutputParameterDefinition"}]},{"name":"InputOutputParameterDefinition","isAbstract":true},{"name":"List","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"items","isMany":true,"type":"InputOutputParameterDefinition"}]},{"name":"Map","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"entries","isMany":true,"type":"Entry"}]},{"name":"Entry","properties":[{"name":"key","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"},{"name":"definition","type":"InputOutputParameterDefinition"}]},{"name":"Value","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"id","isAttr":true,"type":"String"},{"name":"name","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"}]},{"name":"Script","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"scriptFormat","isAttr":true,"type":"String"},{"name":"resource","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"}]},{"name":"Field","superClass":["Element"],"meta":{"allowedIn":["camunda:ServiceTaskLike","camunda:ExecutionListener","camunda:TaskListener"]},"properties":[{"name":"name","isAttr":true,"type":"String"},{"name":"expression","type":"String"},{"name":"stringValue","isAttr":true,"type":"String"},{"name":"string","type":"String"}]},{"name":"InputParameter","superClass":["InputOutputParameter"]},{"name":"OutputParameter","superClass":["InputOutputParameter"]},{"name":"Collectable","isAbstract":true,"extends":["bpmn:MultiInstanceLoopCharacteristics"],"superClass":["camunda:AsyncCapable"],"properties":[{"name":"collection","isAttr":true,"type":"String"},{"name":"elementVariable","isAttr":true,"type":"String"}]},{"name":"FailedJobRetryTimeCycle","superClass":["Element"],"meta":{"allowedIn":["camunda:AsyncCapable","bpmn:MultiInstanceLoopCharacteristics"]},"properties":[{"name":"body","isBody":true,"type":"String"}]},{"name":"ExecutionListener","superClass":["Element"],"meta":{"allowedIn":["bpmn:Task","bpmn:ServiceTask","bpmn:UserTask","bpmn:BusinessRuleTask","bpmn:ScriptTask","bpmn:ReceiveTask","bpmn:ManualTask","bpmn:ExclusiveGateway","bpmn:SequenceFlow","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:EventBasedGateway","bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent","bpmn:BoundaryEvent","bpmn:CallActivity","bpmn:SubProcess","bpmn:Process"]},"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"event","isAttr":true,"type":"String"},{"name":"script","type":"Script"},{"name":"fields","type":"Field","isMany":true}]},{"name":"TaskListener","superClass":["Element"],"meta":{"allowedIn":["bpmn:UserTask"]},"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"event","isAttr":true,"type":"String"},{"name":"script","type":"Script"},{"name":"fields","type":"Field","isMany":true},{"name":"id","type":"String","isAttr":true},{"name":"eventDefinitions","type":"bpmn:TimerEventDefinition","isMany":true}]},{"name":"FormProperty","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent","bpmn:UserTask"]},"properties":[{"name":"id","type":"String","isAttr":true},{"name":"name","type":"String","isAttr":true},{"name":"type","type":"String","isAttr":true},{"name":"required","type":"String","isAttr":true},{"name":"readable","type":"String","isAttr":true},{"name":"writable","type":"String","isAttr":true},{"name":"variable","type":"String","isAttr":true},{"name":"expression","type":"String","isAttr":true},{"name":"datePattern","type":"String","isAttr":true},{"name":"default","type":"String","isAttr":true},{"name":"values","type":"Value","isMany":true}]},{"name":"FormData","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent","bpmn:UserTask"]},"properties":[{"name":"fields","type":"FormField","isMany":true},{"name":"businessKey","type":"String","isAttr":true}]},{"name":"FormField","superClass":["Element"],"properties":[{"name":"id","type":"String","isAttr":true},{"name":"label","type":"String","isAttr":true},{"name":"type","type":"String","isAttr":true},{"name":"datePattern","type":"String","isAttr":true},{"name":"defaultValue","type":"String","isAttr":true},{"name":"properties","type":"Properties"},{"name":"validation","type":"Validation"},{"name":"values","type":"Value","isMany":true}]},{"name":"Validation","superClass":["Element"],"properties":[{"name":"constraints","type":"Constraint","isMany":true}]},{"name":"Constraint","superClass":["Element"],"properties":[{"name":"name","type":"String","isAttr":true},{"name":"config","type":"String","isAttr":true}]},{"name":"ConditionalEventDefinitionExtension","isAbstract":true,"extends":["bpmn:ConditionalEventDefinition"],"properties":[{"name":"variableName","isAttr":true,"type":"String"},{"name":"variableEvents","isAttr":true,"type":"String"}]}],"emumerations":[]}')};function Q9(e,t,n,i){this._contextPad=e,this._popupMenu=t,this._canvas=n,this._translate=i,e.registerProvider(this)}function X9(e,t){var n=e.getPad(t).html.getBoundingClientRect();return{x:n.left,y:n.bottom+5}}Q9.$inject=["contextPad","popupMenu","canvas","translate"],Q9.prototype.getContextPadEntries=function(e){return this._createPopupAction([e])},Q9.prototype.getMultiElementContextPadEntries=function(e){return this._createPopupAction(e)},Q9.prototype._createPopupAction=function(e){const t=this._translate,n=this._contextPad,i=this._popupMenu;return{"set-color":{group:"edit",className:"bpmn-icon-color",title:t("Set color"),html:'
    \n \n
    ',action:{click:(t,r)=>{var o={...X9(n,e),cursor:{x:t.x,y:t.y}};i.open(e,"color-picker",o)}}}}};const K9=[{label:"Default",fill:void 0,stroke:void 0},{label:"Blue",fill:"#BBDEFB",stroke:"#0D4372"},{label:"Orange",fill:"#FFE0B2",stroke:"#6B3C00"},{label:"Green",fill:"#C8E6C9",stroke:"#205022"},{label:"Red",fill:"#FFCDD2",stroke:"#831311"},{label:"Purple",fill:"#E1BEE7",stroke:"#5B176D"}];function Y9(e,t,n,i,r){this._popupMenu=n,this._modeling=i,this._translate=r,this._colors=e&&e.colors||K9,this._defaultFillColor=t&&t.defaultFillColor||"white",this._defaultStrokeColor=t&&t.defaultStrokeColor||"rgb(34, 36, 42)",this._popupMenu.registerProvider("color-picker",this)}function Z9(e,t,n){return function(){e.setColor(t,n)}}Y9.$inject=["config.colorPicker","config.bpmnRenderer","popupMenu","modeling","translate"],Y9.prototype.getEntries=function(e){var t=this,n='\n \n \n \n ';return this._colors.map((function(i){var r=n.replace("var(--fill-color)",i.fill||t._defaultFillColor).replace("var(--stroke-color)",i.stroke||t._defaultStrokeColor);return{title:t._translate(i.label),id:i.label.toLowerCase()+"-color",imageHtml:r,action:Z9(t._modeling,e,i)}}))};const J9={__init__:["colorContextPadProvider","colorPopupProvider"],colorContextPadProvider:["type",Q9],colorPopupProvider:["type",Y9]},eee=Object.prototype.toString,tee=Object.prototype.hasOwnProperty;function nee(e){return void 0===e}function iee(e){return"[object Array]"===eee.call(e)}function ree(e){return"[object Object]"===eee.call(e)}function oee(e){return"[object Number]"===eee.call(e)}function see(e){const t=eee.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function aee(e,t){return tee.call(e,t)}function lee(e,t){const n=function(e){return see(e)?e:t=>t===e}(t);let i;return cee(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function cee(e,t){let n,i;if(nee(e))return;const r=iee(e)?uee:pee;for(let o in e)if(aee(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function pee(e){return e}function uee(e){return Number(e)}function dee(e,...t){return Object.assign(e,...t)}const hee={id:"events",name:"Events"},fee={id:"tasks",name:"Tasks"},mee={id:"data",name:"Data"},gee={id:"participants",name:"Participants"},yee={id:"subprocess",name:"Sub-processes"},vee={id:"gateways",name:"Gateways"},bee=[{label:"Start event",actionName:"none-start-event",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"Boundary event",actionName:"none-boundary-event",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:BoundaryEvent"}},{label:"End event",actionName:"none-end-event",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}}].map((e=>({...e,group:hee}))),xee=[{label:"Message start event",actionName:"message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer start event",actionName:"timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional start event",actionName:"conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal start event",actionName:"signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}].map((e=>({...e,group:hee}))),wee=[{label:"Message intermediate catch event",actionName:"message-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Message intermediate throw event",actionName:"message-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-message",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer intermediate catch event",actionName:"timer-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation intermediate throw event",actionName:"escalation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-escalation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional intermediate catch event",actionName:"conditional-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Link intermediate catch event",actionName:"link-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-link",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Link intermediate throw event",actionName:"link-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-link",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Compensation intermediate throw event",actionName:"compensation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-compensation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal intermediate catch event",actionName:"signal-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Signal intermediate throw event",actionName:"signal-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-signal",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}].map((e=>({...e,group:hee}))),_ee=[{label:"Message boundary event",actionName:"message-boundary",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer boundary event",actionName:"timer-boundary",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation boundary event",actionName:"escalation-boundary",className:"bpmn-icon-intermediate-event-catch-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional boundary event",actionName:"conditional-boundary",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Error boundary event",actionName:"error-boundary",className:"bpmn-icon-intermediate-event-catch-error",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel boundary event",actionName:"cancel-boundary",className:"bpmn-icon-intermediate-event-catch-cancel",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Signal boundary event",actionName:"signal-boundary",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Compensation boundary event",actionName:"compensation-boundary",className:"bpmn-icon-intermediate-event-catch-compensation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Message boundary event (non-interrupting)",actionName:"non-interrupting-message-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!1}},{label:"Timer boundary event (non-interrupting)",actionName:"non-interrupting-timer-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!1}},{label:"Escalation boundary event (non-interrupting)",actionName:"non-interrupting-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!1}},{label:"Conditional boundary event (non-interrupting)",actionName:"non-interrupting-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!1}},{label:"Signal boundary event (non-interrupting)",actionName:"non-interrupting-signal-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!1}}].map((e=>({...e,group:hee}))),Eee=[{label:"Message end event",actionName:"message-end",className:"bpmn-icon-end-event-message",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Escalation end event",actionName:"escalation-end",className:"bpmn-icon-end-event-escalation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Error end event",actionName:"error-end",className:"bpmn-icon-end-event-error",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel end event",actionName:"cancel-end",className:"bpmn-icon-end-event-cancel",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Compensation end event",actionName:"compensation-end",className:"bpmn-icon-end-event-compensation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal end event",actionName:"signal-end",className:"bpmn-icon-end-event-signal",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Terminate end event",actionName:"terminate-end",className:"bpmn-icon-end-event-terminate",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:TerminateEventDefinition"}}].map((e=>({...e,group:hee}))),Oee=[{label:"Exclusive gateway",actionName:"exclusive-gateway",className:"bpmn-icon-gateway-xor",target:{type:"bpmn:ExclusiveGateway"}},{label:"Parallel gateway",actionName:"parallel-gateway",className:"bpmn-icon-gateway-parallel",target:{type:"bpmn:ParallelGateway"}},{label:"Inclusive gateway",search:"or",actionName:"inclusive-gateway",className:"bpmn-icon-gateway-or",target:{type:"bpmn:InclusiveGateway"},rank:-1},{label:"Complex gateway",actionName:"complex-gateway",className:"bpmn-icon-gateway-complex",target:{type:"bpmn:ComplexGateway"},rank:-1},{label:"Event-based gateway",actionName:"event-based-gateway",className:"bpmn-icon-gateway-eventbased",target:{type:"bpmn:EventBasedGateway",instantiate:!1,eventGatewayType:"Exclusive"}}].map((e=>({...e,group:vee}))),Pee=[{label:"Call activity",actionName:"call-activity",className:"bpmn-icon-call-activity",target:{type:"bpmn:CallActivity"}},{label:"Transaction",actionName:"transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Event sub-process",search:"subprocess",actionName:"event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}},{label:"Sub-process (collapsed)",search:"subprocess",actionName:"collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}},{label:"Sub-process (expanded)",search:"subprocess",actionName:"expanded-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}}].map((e=>({...e,group:yee}))),kee=[...Oee,...[{label:"Task",actionName:"task",className:"bpmn-icon-task",target:{type:"bpmn:Task"}},{label:"User task",actionName:"user-task",className:"bpmn-icon-user",target:{type:"bpmn:UserTask"}},{label:"Service task",actionName:"service-task",className:"bpmn-icon-service",target:{type:"bpmn:ServiceTask"}},{label:"Send task",actionName:"send-task",className:"bpmn-icon-send",target:{type:"bpmn:SendTask"},rank:-1},{label:"Receive task",actionName:"receive-task",className:"bpmn-icon-receive",target:{type:"bpmn:ReceiveTask"},rank:-1},{label:"Manual task",actionName:"manual-task",className:"bpmn-icon-manual",target:{type:"bpmn:ManualTask"},rank:-1},{label:"Business rule task",actionName:"rule-task",className:"bpmn-icon-business-rule",target:{type:"bpmn:BusinessRuleTask"}},{label:"Script task",actionName:"script-task",className:"bpmn-icon-script",target:{type:"bpmn:ScriptTask"}}].map((e=>({...e,group:fee}))),...Pee,...bee,...xee,...wee,...Eee,..._ee,...[{label:"Data store reference",actionName:"data-store-reference",className:"bpmn-icon-data-store",target:{type:"bpmn:DataStoreReference"}},{label:"Data object reference",actionName:"data-object-reference",className:"bpmn-icon-data-object",target:{type:"bpmn:DataObjectReference"}}].map((e=>({...e,group:mee}))),...[{label:"Expanded pool/participant",search:"Non-empty pool/participant",actionName:"expanded-pool",className:"bpmn-icon-participant",target:{type:"bpmn:Participant",isExpanded:!0}},{label:"Empty pool/participant",search:"Collapsed pool/participant",actionName:"collapsed-pool",className:"bpmn-icon-lane",target:{type:"bpmn:Participant",isExpanded:!1}}].map((e=>({...e,group:gee})))];function See(e,t,n,i,r,o,s){this._elementFactory=e,this._popupMenu=t,this._create=n,this._autoPlace=i,this._rules=r,this._create=n,this._mouse=o,this._translate=s,this.register()}See.$inject=["elementFactory","popupMenu","create","autoPlace","rules","mouse","translate"],See.prototype.register=function(){this._popupMenu.registerProvider("bpmn-append",this)},See.prototype.getPopupMenuEntries=function(e){const t=this._rules,n=this._translate,i={};if(!t.allowed("shape.append",{element:e}))return[];return this._filterEntries(kee).forEach((t=>{const{actionName:r,className:o,label:s,target:a,description:l,group:c,search:p,rank:u}=t;i[`append-${r}`]={label:s&&n(s),className:o,description:l,group:c&&{...c,name:n(c.name)},search:p,rank:u,action:this._createEntryAction(e,a)}})),i},See.prototype._filterEntries=function(e){return e.filter((e=>{const t=e.target,{type:n,eventDefinitionType:i}=t;return!["bpmn:StartEvent","bpmn:Participant"].includes(n)&&("bpmn:BoundaryEvent"!==n||!nee(i))}))},See.prototype._createEntryAction=function(e,t){const n=this._elementFactory,i=this._autoPlace,r=this._create,o=this._mouse,s=i=>{const s=n.create("shape",t);return i instanceof KeyboardEvent&&(i=o.getLastMoveEvent()),r.start(i,s,{source:e})};return{click:this._canAutoPlaceElement(t)?()=>{const r=n.create("shape",t);i.append(e,r)}:s,dragstart:s}},See.prototype._canAutoPlaceElement=e=>{const{type:t}=e;return"bpmn:BoundaryEvent"!==t&&(("bpmn:SubProcess"!==t||!e.triggeredByEvent)&&("bpmn:IntermediateCatchEvent"!==t||"bpmn:LinkEventDefinition"!==e.eventDefinitionType))};function Cee(e,t,n,i,r){this._contextPad=e,this._popupMenu=t,this._translate=n,this._canvas=i,this._rules=r,this.register()}function Tee(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}function Aee(e,t){var n=Dee(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function Mee(e,t){return function(e,t){return!!lee(e,t)}(t,(function(t){return Aee(e,t)}))}function Dee(e){return e&&e.businessObject||e}Cee.$inject=["contextPad","popupMenu","translate","canvas","rules"],Cee.prototype.register=function(){this._contextPad.registerProvider(this)},Cee.prototype.getContextPadEntries=function(e){const t=this._popupMenu,n=this._translate,i=this._rules,r=this._getAppendMenuPosition.bind(this);if(i.allowed("shape.append",{element:e}))return{append:{group:"model",html:'
    \n \n
    ',title:n("Append element"),action:{click:function(e,i){const o=dee(r(i),{cursor:{x:e.x,y:e.y}});t.open(i,"bpmn-append",o,{title:n("Append element"),width:300,search:!0})}}}}},Cee.prototype._getAppendMenuPosition=function(e){const t=this._contextPad.getPad(e).html.getBoundingClientRect();return{x:t.right+5,y:t.top}};function Ree(e){this._eventBus=e}function Nee(e){return function(t,n,i,r,o){(see(t)||oee(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}}function $ee(e){Ree.call(this,e),this.init()}function jee(e){$ee.call(this,e)}Ree.$inject=["eventBus"],Ree.prototype.on=function(e,t,n,i,r,o){if((see(t)||oee(t))&&(o=r,r=i,i=n,n=t,t=null),see(n)&&(o=r,r=i,i=n,n=1e3),ree(r)&&(o=r,r=!1),!see(i))throw new Error("handlerFn must be a function");iee(e)||(e=[e]);var s=this._eventBus;cee(e,(function(e){var a=["commandStack",e,t].filter((function(e){return e})).join(".");s.on(a,n,r?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(i,o):i,o)}))},Ree.prototype.canExecute=Nee("canExecute"),Ree.prototype.preExecute=Nee("preExecute"),Ree.prototype.preExecuted=Nee("preExecuted"),Ree.prototype.execute=Nee("execute"),Ree.prototype.executed=Nee("executed"),Ree.prototype.postExecute=Nee("postExecute"),Ree.prototype.postExecuted=Nee("postExecuted"),Ree.prototype.revert=Nee("revert"),Ree.prototype.reverted=Nee("reverted"),$ee.$inject=["eventBus"],Tee($ee,Ree),$ee.prototype.addRule=function(e,t,n){var i=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){i.canExecute(e,t,(function(e,t,i){return n(e)}),!0)}))},$ee.prototype.init=function(){},Tee(jee,$ee),jee.$inject=["eventBus"],jee.prototype.init=function(){this.addRule("shape.append",(function(e){const t=e.element,n=Dee(t);return(!ree(i=t)||!aee(i,"labelTarget"))&&(!Mee(t,["bpmn:EndEvent","bpmn:Group","bpmn:TextAnnotation","bpmn:Lane","bpmn:Participant","bpmn:DataStoreReference","bpmn:DataObjectReference"])&&(!t.waypoints&&((!Aee(t,"bpmn:IntermediateThrowEvent")||!function(e,t){const n=Dee(e);return!!lee(n.eventDefinitions||[],(function(e){return Aee(e,t)}))}(t,"bpmn:LinkEventDefinition"))&&((!Aee(t,"bpmn:SubProcess")||!n.triggeredByEvent)&&void 0))));var i}))};var Iee,Lee={__init__:["appendMenuProvider","appendContextPadProvider","appendRules"],appendMenuProvider:["type",See],appendContextPadProvider:["type",Cee],appendRules:["type",jee]};function Bee(e,t,n,i,r,o){this._elementFactory=e,this._popupMenu=t,this._create=n,this._autoPlace=i,this._mouse=r,this._translate=o,this.register()}Bee.$inject=["elementFactory","popupMenu","create","autoPlace","mouse","translate"],Bee.prototype.register=function(){this._popupMenu.registerProvider("bpmn-create",this)},Bee.prototype.getPopupMenuEntries=function(){const e={};return kee.forEach((t=>{const{actionName:n,className:i,label:r,target:o,description:s,group:a,search:l,rank:c}=t,p=this._createEntryAction(o);e[`create-${n}`]={label:r&&this._translate(r),className:i,description:s,group:a&&{...a,name:this._translate(a.name)},search:l,rank:c,action:{click:p,dragstart:p}}})),e},Bee.prototype._createEntryAction=function(e){const t=this._create,n=this._mouse,i=this._popupMenu,r=this._elementFactory;let o;return s=>(i.close(),o="bpmn:Participant"===e.type?r.createParticipantShape(e):r.create("shape",e),s instanceof KeyboardEvent&&(s=n.getLastMoveEvent()),t.start(s,o))},"undefined"!=typeof document&&((Iee=document.createElement("div")).innerHTML='
    a',Iee.getElementsByTagName("link").length,Iee=void 0);function qee(e,t,n,i,r){this._palette=e,this._translate=t,this._popupMenu=n,this._canvas=i,this._mouse=r,this.register()}qee.$inject=["palette","translate","popupMenu","canvas","mouse"],qee.prototype.register=function(){this._palette.registerProvider(900,this)},qee.prototype.getPaletteEntries=function(e){const t=this._translate,n=this._popupMenu,i=this._canvas,r=this._mouse,o=e=>{if(e instanceof KeyboardEvent)return{x:(e=r.getLastMoveEvent()).x,y:e.y};const t=e&&e.target||(n='.djs-palette [data-action="create"]',(i=i||document).querySelector(n));var n,i;const o=t.getBoundingClientRect();return t&&{x:o.left+o.width/2+35,y:o.top+o.height/2+10}};return{create:{group:"create",html:'
    \n \n
    ',title:t("Create element"),action:{click:function(e){const r=o(e),s=i.getRootElement();n.open(s,"bpmn-create",r,{title:t("Create element"),width:300,search:!0})}}}}};var zee={__init__:["createMenuProvider","createPaletteProvider"],createMenuProvider:["type",Bee],createPaletteProvider:["type",qee]};function Fee(e){this._injector=e,this.registerActions()}Fee.$inject=["injector"],Fee.prototype.registerActions=function(){const e=this._injector.get("editorActions",!1),t=this._injector.get("selection",!1),n=this._injector.get("contextPad",!1),i=this._injector.get("palette",!1),r=this._injector.get("popupMenu",!1),o={};t&&n&&i&&r&&i&&dee(o,{appendElement:function(e){const o=t&&t.get();1!=o.length||r.isEmpty(o[0],"bpmn-append")?i.triggerEntry("create","click",e):n.triggerEntry("append","click",e)}}),i&&dee(o,{createElement:function(e){i.triggerEntry("create","click",e)}}),e&&e.register(o)};var Vee={__depends__:[Lee,zee],__init__:["createAppendEditorActions"],createAppendEditorActions:["type",Fee]},Hee=["c","C"],Uee=["v","V"],Wee=["y","Y"],Gee=["z","Z"];function Qee(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function Xee(e,t){return-1!==(e=iee(e)?e:[e]).indexOf(t.key)||-1!==e.indexOf(t.code)}function Kee(e){return e.shiftKey}function Yee(e,t){var n=this;e.on("editorActions.init",500,(function(e){var i=e.editorActions;n.registerBindings(t,i)}))}function Zee(e){this._injector=e,this._keyboard=this._injector.get("keyboard",!1),this._editorActions=this._injector.get("editorActions",!1),this._keyboard&&this._injector.invoke(Yee,this)}Yee.$inject=["eventBus","keyboard"],Yee.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}n("undo",(function(e){if(function(e){return Qee(e)&&!Kee(e)&&Xee(Gee,e)}(e.keyEvent))return t.trigger("undo"),!0})),n("redo",(function(e){if(function(e){return Qee(e)&&(Xee(Wee,e)||Xee(Gee,e)&&Kee(e))}(e.keyEvent))return t.trigger("redo"),!0})),n("copy",(function(e){if(function(e){return Qee(e)&&Xee(Hee,e)}(e.keyEvent))return t.trigger("copy"),!0})),n("paste",(function(e){if(function(e){return Qee(e)&&Xee(Uee,e)}(e.keyEvent))return t.trigger("paste"),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(Xee(["+","Add","="],n)&&Qee(n))return t.trigger("stepZoom",{value:1}),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(Xee(["-","Subtract"],n)&&Qee(n))return t.trigger("stepZoom",{value:-1}),!0})),n("zoom",(function(e){var n=e.keyEvent;if(Xee("0",n)&&Qee(n))return t.trigger("zoom",{value:1}),!0})),n("removeSelection",(function(e){if(Xee(["Backspace","Delete","Del"],e.keyEvent))return t.trigger("removeSelection"),!0}))},Tee(Zee,Yee),Zee.$inject=["injector"],Zee.prototype.registerBindings=function(){const e=this._keyboard,t=this._editorActions;function n(n,i){t&&t.isRegistered(n)&&e&&e.addListener(i)}Yee.prototype.registerBindings.call(this,e,t),n("appendElement",(function(n){const i=n.keyEvent;if(!e||!e.hasModifier(i))return e&&e.isKey(["a","A"],i)?(t&&t.trigger("appendElement",i),!0):void 0})),n("createElement",(function(n){const i=n.keyEvent;if(!e||!e.hasModifier(i))return e&&e.isKey(["n","N"],i)?(t&&t.trigger("createElement",i),!0):void 0}))};var Jee={__depends__:[Lee,zee,Vee,{__depends__:[Lee,zee],__init__:["createAppendKeyboardBindings"],createAppendKeyboardBindings:["type",Zee]}]};function ete(e,t,n,i,r,o,s){this._popupMenu=e,this._translate=t,this._elementTemplates=n,this._autoPlace=i,this._create=r,this._mouse=o,this._rules=s,this.register()}ete.$inject=["popupMenu","translate","elementTemplates","autoPlace","create","move","rules"],ete.prototype.register=function(){this._popupMenu.registerProvider("bpmn-append",this)},ete.prototype.getPopupMenuEntries=function(e){return t=>{if(!this._rules.allowed("shape.append",{element:e}))return[];const n=this._filterTemplates(this._elementTemplates.getLatest());return dee(t,this.getTemplateEntries(e,n)),t}},ete.prototype.getTemplateEntries=function(e,t){const n={};return t.map((t=>{const{icon:i={},category:r}=t,o=`append.template-${t.id}`,s={id:"templates",name:this._translate("Templates")};n[o]={label:t.name,description:t.description,documentationRef:t.documentationRef,imageUrl:i.contents,group:r||s,action:this._getEntryAction(e,t)}})),n},ete.prototype._filterTemplates=function(e){return e.filter((e=>{const{appliesTo:t,elementType:n}=e,i=n&&n.value||t[0];return!["bpmn:StartEvent","bpmn:Participant"].includes(i)&&"bpmn:SequenceFlow"!==i}))},ete.prototype._getEntryAction=function(e,t){return{click:()=>{const n=this._elementTemplates.createElement(t);this._autoPlace.append(e,n)},dragstart:n=>{const i=this._elementTemplates.createElement(t);n instanceof KeyboardEvent&&(n=this._mouse.getLastMoveEvent()),this._create.start(n,i,{source:e})}}};function tte(e,t,n,i,r){this._popupMenu=e,this._translate=t,this._elementTemplates=n,this._mouse=i,this._create=r,this.register()}tte.$inject=["popupMenu","translate","elementTemplates","mouse","create"],tte.prototype.register=function(){this._popupMenu.registerProvider("bpmn-create",this)},tte.prototype.getPopupMenuEntries=function(e){return t=>(dee(t,this.getTemplateEntries(e)),t)},tte.prototype.getTemplateEntries=function(){const e=this._elementTemplates.getLatest(),t={};return e.map((e=>{const{icon:n={},category:i}=e,r=`create.template-${e.id}`,o={id:"templates",name:this._translate("Templates")};t[r]={label:e.name,description:e.description,documentationRef:e.documentationRef,imageUrl:n.contents,group:i||o,action:{click:this._getEntryAction(e),dragstart:this._getEntryAction(e)}}})),t},tte.prototype._getEntryAction=function(e){const t=this._create,n=this._popupMenu,i=this._elementTemplates,r=this._mouse;return o=>{n.close();let s=i.createElement(e);return o instanceof KeyboardEvent&&(o=r.getLastMoveEvent()),t.start(o,s)}};function nte(e,t,n){this._popupMenu=e,this._translate=t,this._elementTemplates=n,this.register()}nte.$inject=["popupMenu","translate","elementTemplates"],nte.prototype.register=function(){this._popupMenu.registerProvider("bpmn-replace",this)},nte.prototype.getPopupMenuEntries=function(e){return t=>{let n=Object.entries(t);return n=[...n,...this.getTemplateEntries(e)],n.reduce(((e,[t,n])=>(e[t]=n,e)),{})}},nte.prototype.getTemplateEntries=function(e){return this._getMatchingTemplates(e).map((t=>{const{icon:n={},category:i}=t,r=`replace.template-${t.id}`,o={id:"templates",name:this._translate("Templates")};return[r,{label:t.name,description:t.description,documentationRef:t.documentationRef,imageUrl:n.contents,group:i||o,action:()=>{this._elementTemplates.applyTemplate(e,t)}}]}))},nte.prototype._getMatchingTemplates=function(e){return this._elementTemplates.getLatest().filter((t=>Mee(e,t.appliesTo)&&!function(e,t){const n=Dee(e);if(n)return n.get("zeebe:modelerTemplate")===t.id;return!1}(e,t)))};function ite(e){return function(t){var n=t.target,i=Dee(e),r=i.eventDefinitions&&i.eventDefinitions[0],o=i.$type===n.type,s=(r&&r.$type)===n.eventDefinitionType,a=!!n.triggeredByEvent==!!i.triggeredByEvent,l=void 0===n.isExpanded||n.isExpanded===function(e,t){return!Aee(e,"bpmn:CallActivity")&&(Aee(e,"bpmn:SubProcess")?(t=t||function(e){return e&&e.di}(e),!(!t||!Aee(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded):!Aee(e,"bpmn:Participant")||!!Dee(e).processRef)}(e);return!(o&&s&&a&&l)}}var rte=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Sub-process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Event sub-process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}}],ote=rte,ste=Object.freeze({__proto__:null,BOUNDARY_EVENT:[{label:"Message boundary event",actionName:"replace-with-message-boundary",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!0}},{label:"Timer boundary event",actionName:"replace-with-timer-boundary",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!0}},{label:"Escalation boundary event",actionName:"replace-with-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!0}},{label:"Conditional boundary event",actionName:"replace-with-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!0}},{label:"Error boundary event",actionName:"replace-with-error-boundary",className:"bpmn-icon-intermediate-event-catch-error",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ErrorEventDefinition",cancelActivity:!0}},{label:"Cancel boundary event",actionName:"replace-with-cancel-boundary",className:"bpmn-icon-intermediate-event-catch-cancel",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CancelEventDefinition",cancelActivity:!0}},{label:"Signal boundary event",actionName:"replace-with-signal-boundary",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!0}},{label:"Compensation boundary event",actionName:"replace-with-compensation-boundary",className:"bpmn-icon-intermediate-event-catch-compensation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CompensateEventDefinition",cancelActivity:!0}},{label:"Message boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-message-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!1}},{label:"Timer boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!1}},{label:"Escalation boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!1}},{label:"Conditional boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!1}},{label:"Signal boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!1}}],DATA_OBJECT_REFERENCE:[{label:"Data store reference",actionName:"replace-with-data-store-reference",className:"bpmn-icon-data-store",target:{type:"bpmn:DataStoreReference"}}],DATA_STORE_REFERENCE:[{label:"Data object reference",actionName:"replace-with-data-object-reference",className:"bpmn-icon-data-object",target:{type:"bpmn:DataObjectReference"}}],END_EVENT:[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message end event",actionName:"replace-with-message-end",className:"bpmn-icon-end-event-message",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Escalation end event",actionName:"replace-with-escalation-end",className:"bpmn-icon-end-event-escalation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Error end event",actionName:"replace-with-error-end",className:"bpmn-icon-end-event-error",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel end event",actionName:"replace-with-cancel-end",className:"bpmn-icon-end-event-cancel",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Compensation end event",actionName:"replace-with-compensation-end",className:"bpmn-icon-end-event-compensation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal end event",actionName:"replace-with-signal-end",className:"bpmn-icon-end-event-signal",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Terminate end event",actionName:"replace-with-terminate-end",className:"bpmn-icon-end-event-terminate",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:TerminateEventDefinition"}}],EVENT_SUB_PROCESS:ote,EVENT_SUB_PROCESS_START_EVENT:[{label:"Message start event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!0}},{label:"Timer start event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!0}},{label:"Conditional start event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!0}},{label:"Signal start event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!0}},{label:"Error start event",actionName:"replace-with-error-start",className:"bpmn-icon-start-event-error",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ErrorEventDefinition",isInterrupting:!0}},{label:"Escalation start event",actionName:"replace-with-escalation-start",className:"bpmn-icon-start-event-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!0}},{label:"Compensation start event",actionName:"replace-with-compensation-start",className:"bpmn-icon-start-event-compensation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:CompensateEventDefinition",isInterrupting:!0}},{label:"Message start event (non-interrupting)",actionName:"replace-with-non-interrupting-message-start",className:"bpmn-icon-start-event-non-interrupting-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!1}},{label:"Timer start event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-start",className:"bpmn-icon-start-event-non-interrupting-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!1}},{label:"Conditional start event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-start",className:"bpmn-icon-start-event-non-interrupting-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!1}},{label:"Signal start event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-start",className:"bpmn-icon-start-event-non-interrupting-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!1}},{label:"Escalation start event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-start",className:"bpmn-icon-start-event-non-interrupting-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!1}}],GATEWAY:[{label:"Exclusive gateway",actionName:"replace-with-exclusive-gateway",className:"bpmn-icon-gateway-xor",target:{type:"bpmn:ExclusiveGateway"}},{label:"Parallel gateway",actionName:"replace-with-parallel-gateway",className:"bpmn-icon-gateway-parallel",target:{type:"bpmn:ParallelGateway"}},{label:"Inclusive gateway",actionName:"replace-with-inclusive-gateway",className:"bpmn-icon-gateway-or",target:{type:"bpmn:InclusiveGateway"}},{label:"Complex gateway",actionName:"replace-with-complex-gateway",className:"bpmn-icon-gateway-complex",target:{type:"bpmn:ComplexGateway"}},{label:"Event-based gateway",actionName:"replace-with-event-based-gateway",className:"bpmn-icon-gateway-eventbased",target:{type:"bpmn:EventBasedGateway",instantiate:!1,eventGatewayType:"Exclusive"}}],INTERMEDIATE_EVENT:[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message intermediate catch event",actionName:"replace-with-message-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Message intermediate throw event",actionName:"replace-with-message-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-message",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer intermediate catch event",actionName:"replace-with-timer-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation intermediate throw event",actionName:"replace-with-escalation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-escalation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional intermediate catch event",actionName:"replace-with-conditional-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Link intermediate catch event",actionName:"replace-with-link-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-link",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Link intermediate throw event",actionName:"replace-with-link-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-link",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Compensation intermediate throw event",actionName:"replace-with-compensation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-compensation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal intermediate catch event",actionName:"replace-with-signal-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Signal intermediate throw event",actionName:"replace-with-signal-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-signal",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],PARTICIPANT:[{label:"Expanded pool/participant",actionName:"replace-with-expanded-pool",className:"bpmn-icon-participant",target:{type:"bpmn:Participant",isExpanded:!0}},{label:function(e){var t="Empty pool/participant";return e.children&&e.children.length&&(t+=" (removes content)"),t},actionName:"replace-with-collapsed-pool",className:"bpmn-icon-lane",target:{type:"bpmn:Participant",isExpanded:!1}}],SEQUENCE_FLOW:[{label:"Sequence flow",actionName:"replace-with-sequence-flow",className:"bpmn-icon-connection"},{label:"Default flow",actionName:"replace-with-default-flow",className:"bpmn-icon-default-flow"},{label:"Conditional flow",actionName:"replace-with-conditional-flow",className:"bpmn-icon-conditional-flow"}],START_EVENT:[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message start event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer start event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional start event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal start event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],START_EVENT_SUB_PROCESS:[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}}],SUBPROCESS_EXPANDED:[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Event sub-process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}},{label:"Sub-process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}}],TASK:[{label:"Task",actionName:"replace-with-task",className:"bpmn-icon-task",target:{type:"bpmn:Task"}},{label:"User task",actionName:"replace-with-user-task",className:"bpmn-icon-user",target:{type:"bpmn:UserTask"}},{label:"Service task",actionName:"replace-with-service-task",className:"bpmn-icon-service",target:{type:"bpmn:ServiceTask"}},{label:"Send task",actionName:"replace-with-send-task",className:"bpmn-icon-send",target:{type:"bpmn:SendTask"}},{label:"Receive task",actionName:"replace-with-receive-task",className:"bpmn-icon-receive",target:{type:"bpmn:ReceiveTask"}},{label:"Manual task",actionName:"replace-with-manual-task",className:"bpmn-icon-manual",target:{type:"bpmn:ManualTask"}},{label:"Business rule task",actionName:"replace-with-rule-task",className:"bpmn-icon-business-rule",target:{type:"bpmn:BusinessRuleTask"}},{label:"Script task",actionName:"replace-with-script-task",className:"bpmn-icon-script",target:{type:"bpmn:ScriptTask"}},{label:"Call activity",actionName:"replace-with-call-activity",className:"bpmn-icon-call-activity",target:{type:"bpmn:CallActivity"}},{label:"Sub-process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}},{label:"Sub-process (expanded)",actionName:"replace-with-expanded-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}}],TRANSACTION:rte});const ate=Object.values(ste);function lte(e,t,n){this._popupMenu=e,this._translate=t,this._elementTemplates=n,this.register()}function cte(e,t,n){const i=e[t];return!!i&&n.findIndex((([e])=>e===i.actionName))}lte.$inject=["popupMenu","translate","elementTemplates"],lte.prototype.register=function(){this._popupMenu.registerProvider("bpmn-replace",this)},lte.prototype.getPopupMenuEntries=function(e){return t=>{let n=Object.entries(t);return this._elementTemplates&&this._elementTemplates.get(e)&&this.addPlainElementEntry(e,n,this._translate,this._elementTemplates),n.reduce(((e,[t,n])=>(e[t]=n,e)),{})}},lte.prototype.addPlainElementEntry=function(e,t,n,i){const r=this.getPlainEntry(e,t,n,i);if(!r)return;const[o,s]=r;t.splice(o,0,[s.id,s])},lte.prototype.getPlainEntry=function(e,t,n,i){const{options:r,option:o,optionIndex:s}=function(e){const t=(e,t)=>t.target&&!ite(e)(t);return ate.reduce(((n,i)=>{if(n)return n;const r=i.findIndex((n=>t(e,n)));return-1!==r?{options:i,option:i[r],optionIndex:r}:void 0}),null)}(e)||{};if(!r)return null;const a={id:"replace-remove-element-template",action:()=>{i.removeTemplate(e)},label:n(o.label),className:o.className},l=cte(r,s-1,t);if(l)return[l+1,a];const c=cte(r,s+1,t);return c?[c,a]:[0,a]};var pte={__init__:["removeTemplateReplaceProvider"],removeTemplateReplaceProvider:["type",lte]};function ute(e={}){e={...e,moddleExtensions:{...G9,...e.moddleExtensions}},l2.call(this,e)}i(ute,l2),ute.prototype._camundaPlatformModules=[M2,a2,b8,J9,Jee,W9,pte],ute.prototype._modules=[].concat(l2.prototype._modules,ute.prototype._camundaPlatformModules)},168:(e,t,n)=>{var i;!function(r,o,s,a){"use strict";var l,c=["","webkit","Moz","MS","ms","o"],p=o.createElement("div"),u=Math.round,d=Math.abs,h=Date.now;function f(e,t,n){return setTimeout(w(e,n),t)}function m(e,t,n){return!!Array.isArray(e)&&(g(e,n[t],n),!0)}function g(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==a)for(i=0;i\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),e.apply(this,arguments)}}l="function"!=typeof Object.assign?function(e){if(e===a||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n-1}function C(e){return e.trim().split(/\s+/g)}function T(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;in[t]})):i.sort()),i}function D(e,t){for(var n,i,r=t[0].toUpperCase()+t.slice(1),o=0;o1&&!n.firstMultiple?n.firstMultiple=U(t):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,l=s?s.center:o.center,c=t.center=W(i);t.timeStamp=h(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=K(l,c),t.distance=X(l,c),function(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y});t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}(n,t),t.offsetDirection=Q(t.deltaX,t.deltaY);var p=G(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=p.x,t.overallVelocityY=p.y,t.overallVelocity=d(p.x)>d(p.y)?p.x:p.y,t.scale=s?(u=s.pointers,f=i,X(f[0],f[1],F)/X(u[0],u[1],F)):1,t.rotation=s?function(e,t){return K(t[1],t[0],F)+K(e[1],e[0],F)}(s.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,i,r,o,s=e.lastInterval||t,l=t.timeStamp-s.timeStamp;if(8!=t.eventType&&(l>25||s.velocity===a)){var c=t.deltaX-s.deltaX,p=t.deltaY-s.deltaY,u=G(l,c,p);i=u.x,r=u.y,n=d(u.x)>d(u.y)?u.x:u.y,o=Q(c,p),e.lastInterval=t}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;t.velocity=n,t.velocityX=i,t.velocityY=r,t.direction=o}(n,t);var u,f;var m=e.element;k(t.srcEvent.target,m)&&(m=t.srcEvent.target);t.target=m}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function U(e){for(var t=[],n=0;n=d(t)?e<0?2:4:t<0?8:16}function X(e,t,n){n||(n=z);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(i*i+r*r)}function K(e,t,n){n||(n=z);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,i)/Math.PI}V.prototype={handler:function(){},init:function(){this.evEl&&O(this.element,this.evEl,this.domHandler),this.evTarget&&O(this.target,this.evTarget,this.domHandler),this.evWin&&O(N(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&P(this.element,this.evEl,this.domHandler),this.evTarget&&P(this.target,this.evTarget,this.domHandler),this.evWin&&P(N(this.element),this.evWin,this.domHandler)}};var Y={mousedown:1,mousemove:2,mouseup:4},Z="mousedown",J="mousemove mouseup";function ee(){this.evEl=Z,this.evWin=J,this.pressed=!1,V.apply(this,arguments)}x(ee,V,{handler:function(e){var t=Y[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:B,srcEvent:e}))}});var te={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},ne={2:L,3:"pen",4:B,5:"kinect"},ie="pointerdown",re="pointermove pointerup pointercancel";function oe(){this.evEl=ie,this.evWin=re,V.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(ie="MSPointerDown",re="MSPointerMove MSPointerUp MSPointerCancel"),x(oe,V,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=te[i],o=ne[e.pointerType]||e.pointerType,s=o==L,a=T(t,e.pointerId,"pointerId");1&r&&(0===e.button||s)?a<0&&(t.push(e),a=t.length-1):12&r&&(n=!0),a<0||(t[a]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(a,1))}});var se={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ae(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,V.apply(this,arguments)}function le(e,t){var n=A(e.touches),i=A(e.changedTouches);return 12&t&&(n=M(n.concat(i),"identifier",!0)),[n,i]}x(ae,V,{handler:function(e){var t=se[e.type];if(1===t&&(this.started=!0),this.started){var n=le.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:L,srcEvent:e})}}});var ce={touchstart:1,touchmove:2,touchend:4,touchcancel:8},pe="touchstart touchmove touchend touchcancel";function ue(){this.evTarget=pe,this.targetIds={},V.apply(this,arguments)}function de(e,t){var n=A(e.touches),i=this.targetIds;if(3&t&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=A(e.changedTouches),a=[],l=this.target;if(o=n.filter((function(e){return k(e.target,l)})),1===t)for(r=0;r-1&&i.splice(e,1)}),2500)}}function ge(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function i(n){t.manager.emit(n,e)}n<8&&i(t.options.event+Te(n)),i(t.options.event),e.additionalEvent&&i(e.additionalEvent),n>=8&&i(t.options.event+Te(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=Se},canEmit:function(){for(var e=0;et.threshold&&r&t.direction},attrTest:function(e){return De.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Ae(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),x(Ne,De,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),x($e,Ce,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[xe]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distancet.time;if(this._input=e,!i||!n||12&e.eventType&&!r)this.reset();else if(1&e.eventType)this.reset(),this._timer=f((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return Se},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=h(),this.manager.emit(this.options.event,this._input)))}}),x(je,De,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),x(Ie,De,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Re.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:n&q&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&d(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=Ae(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),x(Le,Ce,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[we]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance0&&t-1 in e)}function S(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}P.fn=P.prototype={jquery:E,constructor:P,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=P.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return P.each(this,e)},map:function(e){return this.pushStack(P.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(P.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(P.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+M+")"+M+"*"),z=new RegExp(M+"|>"),F=new RegExp(I),V=new RegExp("^"+R+"$"),H={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+I),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+k+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},U=/^(?:input|select|textarea|button)$/i,W=/^h\d$/i,G=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/[+~]/,X=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),K=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},Y=function(){le()},Z=de((function(e){return!0===e.disabled&&S(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(o=a.call($.childNodes),$.childNodes),o[$.childNodes.length].nodeType}catch(e){m={apply:function(e,t){j.apply(e,a.call(t))},call:function(e){j.apply(e,a.call(arguments,1))}}}function J(e,t,n,i){var r,o,s,a,c,p,h,f=t&&t.ownerDocument,v=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==v&&9!==v&&11!==v)return n;if(!i&&(le(t),t=t||l,u)){if(11!==v&&(c=G.exec(e)))if(r=c[1]){if(9===v){if(!(s=t.getElementById(r)))return n;if(s.id===r)return m.call(n,s),n}else if(f&&(s=f.getElementById(r))&&J.contains(t,s)&&s.id===r)return m.call(n,s),n}else{if(c[2])return m.apply(n,t.getElementsByTagName(e)),n;if((r=c[3])&&t.getElementsByClassName)return m.apply(n,t.getElementsByClassName(r)),n}if(!(E[e+" "]||d&&d.test(e))){if(h=e,f=t,1===v&&(z.test(e)||q.test(e))){for((f=Q.test(e)&&ae(t.parentNode)||t)==t&&g.scope||((a=t.getAttribute("id"))?a=P.escapeSelector(a):t.setAttribute("id",a=y)),o=(p=pe(e)).length;o--;)p[o]=(a?"#"+a:":scope")+" "+ue(p[o]);h=p.join(",")}try{return m.apply(n,f.querySelectorAll(h)),n}catch(t){E(e,!0)}finally{a===y&&t.removeAttribute("id")}}}return ve(e.replace(D,"$1"),t,n,i)}function ee(){var e=[];return function n(i,r){return e.push(i+" ")>t.cacheLength&&delete n[e.shift()],n[i+" "]=r}}function te(e){return e[y]=!0,e}function ne(e){var t=l.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ie(e){return function(t){return S(t,"input")&&t.type===e}}function re(e){return function(t){return(S(t,"input")||S(t,"button"))&&t.type===e}}function oe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Z(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function se(e){return te((function(t){return t=+t,te((function(n,i){for(var r,o=e([],n.length,t),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))}))}))}function ae(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var n,i=e?e.ownerDocument||e:$;return i!=l&&9===i.nodeType&&i.documentElement?(c=(l=i).documentElement,u=!P.isXMLDoc(l),f=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,c.msMatchesSelector&&$!=l&&(n=l.defaultView)&&n.top!==n&&n.addEventListener("unload",Y),g.getById=ne((function(e){return c.appendChild(e).id=P.expando,!l.getElementsByName||!l.getElementsByName(P.expando).length})),g.disconnectedMatch=ne((function(e){return f.call(e,"*")})),g.scope=ne((function(){return l.querySelectorAll(":scope")})),g.cssHas=ne((function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),g.getById?(t.filter.ID=function(e){var t=e.replace(X,K);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&u){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(X,K);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&u){var n,i,r,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(r=t.getElementsByName(e),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),t.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&u)return t.getElementsByClassName(e)},d=[],ne((function(e){var t;c.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+M+"*(?:value|"+k+")"),e.querySelectorAll("[id~="+y+"-]").length||d.push("~="),e.querySelectorAll("a#"+y+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=l.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),c.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=l.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")")})),g.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),O=function(e,t){if(e===t)return s=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!g.sortDetached&&t.compareDocumentPosition(e)===n?e===l||e.ownerDocument==$&&J.contains($,e)?-1:t===l||t.ownerDocument==$&&J.contains($,t)?1:r?p.call(r,e)-p.call(r,t):0:4&n?-1:1)},l):l}for(e in J.matches=function(e,t){return J(e,null,null,t)},J.matchesSelector=function(e,t){if(le(e),u&&!E[t+" "]&&(!d||!d.test(t)))try{var n=f.call(e,t);if(n||g.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){E(t,!0)}return J(t,l,null,[e]).length>0},J.contains=function(e,t){return(e.ownerDocument||e)!=l&&le(e),P.contains(e,t)},J.attr=function(e,n){(e.ownerDocument||e)!=l&&le(e);var i=t.attrHandle[n.toLowerCase()],r=i&&h.call(t.attrHandle,n.toLowerCase())?i(e,n,!u):void 0;return void 0!==r?r:e.getAttribute(n)},J.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},P.uniqueSort=function(e){var t,n=[],i=0,o=0;if(s=!g.sortStable,r=!g.sortStable&&a.call(e,0),T.call(e,O),s){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)A.call(e,n[i],1)}return r=null,e},P.fn.uniqueSort=function(){return this.pushStack(P.uniqueSort(a.apply(this)))},t=P.expr={cacheLength:50,createPseudo:te,match:H,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(X,K),e[3]=(e[3]||e[4]||e[5]||"").replace(X,K),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||J.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&J.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return H.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&F.test(n)&&(t=pe(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(X,K).toLowerCase();return"*"===e?function(){return!0}:function(e){return S(e,t)}},CLASS:function(e){var t=x[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&x(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(i){var r=J.attr(i,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r.replace(L," ")+" ").indexOf(n)>-1:"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,p,u,d,h,f=o!==s?"nextSibling":"previousSibling",m=t.parentNode,g=a&&t.nodeName.toLowerCase(),b=!l&&!a,x=!1;if(m){if(o){for(;f;){for(u=t;u=u[f];)if(a?S(u,g):1===u.nodeType)return!1;h=f="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?m.firstChild:m.lastChild],s&&b){for(x=(d=(c=(p=m[y]||(m[y]={}))[e]||[])[0]===v&&c[1])&&c[2],u=d&&m.childNodes[d];u=++d&&u&&u[f]||(x=d=0)||h.pop();)if(1===u.nodeType&&++x&&u===t){p[e]=[v,d,x];break}}else if(b&&(x=d=(c=(p=t[y]||(t[y]={}))[e]||[])[0]===v&&c[1]),!1===x)for(;(u=++d&&u&&u[f]||(x=d=0)||h.pop())&&(!(a?S(u,g):1===u.nodeType)||!++x||(b&&((p=u[y]||(u[y]={}))[e]=[v,x]),u!==t)););return(x-=r)===i||x%i==0&&x/i>=0}}},PSEUDO:function(e,n){var i,r=t.pseudos[e]||t.setFilters[e.toLowerCase()]||J.error("unsupported pseudo: "+e);return r[y]?r(n):r.length>1?(i=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,t){for(var i,o=r(e,n),s=o.length;s--;)e[i=p.call(e,o[s])]=!(t[i]=o[s])})):function(e){return r(e,0,i)}):r}},pseudos:{not:te((function(e){var t=[],n=[],i=ye(e.replace(D,"$1"));return i[y]?te((function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))})):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}})),has:te((function(e){return function(t){return J(e,t).length>0}})),contains:te((function(e){return e=e.replace(X,K),function(t){return(t.textContent||P.text(t)).indexOf(e)>-1}})),lang:te((function(e){return V.test(e||"")||J.error("unsupported lang: "+e),e=e.replace(X,K).toLowerCase(),function(t){var n;do{if(n=u?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=i.location&&i.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===c},focus:function(e){return e===function(){try{return l.activeElement}catch(e){}}()&&l.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:oe(!1),disabled:oe(!0),checked:function(e){return S(e,"input")&&!!e.checked||S(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!t.pseudos.empty(e)},header:function(e){return W.test(e.nodeName)},input:function(e){return U.test(e.nodeName)},button:function(e){return S(e,"input")&&"button"===e.type||S(e,"button")},text:function(e){var t;return S(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:se((function(){return[0]})),last:se((function(e,t){return[t-1]})),eq:se((function(e,t,n){return[n<0?n+t:n]})),even:se((function(e,t){for(var n=0;nt?t:n;--i>=0;)e.push(i);return e})),gt:se((function(e,t,n){for(var i=n<0?n+t:n;++i1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function fe(e,t,n,i,r){for(var o,s=[],a=0,l=e.length,c=null!=t;a-1&&(o[c]=!(s[c]=d))}}else h=fe(h===s?h.splice(y,h.length):h),r?r(null,s,h,l):m.apply(s,h)}))}function ge(e){for(var i,r,o,s=e.length,a=t.relative[e[0].type],l=a||t.relative[" "],c=a?1:0,u=de((function(e){return e===i}),l,!0),d=de((function(e){return p.call(i,e)>-1}),l,!0),h=[function(e,t,r){var o=!a&&(r||t!=n)||((i=t).nodeType?u(e,t,r):d(e,t,r));return i=null,o}];c1&&he(h),c>1&&ue(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(D,"$1"),r,c0,o=e.length>0,s=function(s,a,c,p,d){var h,f,g,y=0,b="0",x=s&&[],w=[],_=n,E=s||o&&t.find.TAG("*",d),O=v+=null==_?1:Math.random()||.1,k=E.length;for(d&&(n=a==l||a||d);b!==k&&null!=(h=E[b]);b++){if(o&&h){for(f=0,a||h.ownerDocument==l||(le(h),c=!u);g=e[f++];)if(g(h,a||l,c)){m.call(p,h);break}d&&(v=O)}r&&((h=!g&&h)&&y--,s&&x.push(h))}if(y+=b,r&&b!==y){for(f=0;g=i[f++];)g(x,w,a,c);if(s){if(y>0)for(;b--;)x[b]||w[b]||(w[b]=C.call(p));w=fe(w)}m.apply(p,w),d&&!s&&w.length>0&&y+i.length>1&&P.uniqueSort(p)}return d&&(v=O,n=_),x};return r?te(s):s}(s,o)),a.selector=e}return a}function ve(e,n,i,r){var o,s,a,l,c,p="function"==typeof e&&e,d=!r&&pe(e=p.selector||e);if(i=i||[],1===d.length){if((s=d[0]=d[0].slice(0)).length>2&&"ID"===(a=s[0]).type&&9===n.nodeType&&u&&t.relative[s[1].type]){if(!(n=(t.find.ID(a.matches[0].replace(X,K),n)||[])[0]))return i;p&&(n=n.parentNode),e=e.slice(s.shift().value.length)}for(o=H.needsContext.test(e)?0:s.length;o--&&(a=s[o],!t.relative[l=a.type]);)if((c=t.find[l])&&(r=c(a.matches[0].replace(X,K),Q.test(s[0].type)&&ae(n.parentNode)||n))){if(s.splice(o,1),!(e=r.length&&ue(s)))return m.apply(i,r),i;break}}return(p||ye(e,d))(r,n,!u,i,!n||Q.test(e)&&ae(n.parentNode)||n),i}ce.prototype=t.filters=t.pseudos,t.setFilters=new ce,g.sortStable=y.split("").sort(O).join("")===y,le(),g.sortDetached=ne((function(e){return 1&e.compareDocumentPosition(l.createElement("fieldset"))})),P.find=J,P.expr[":"]=P.expr.pseudos,P.unique=P.uniqueSort,J.compile=ye,J.select=ve,J.setDocument=le,J.tokenize=pe,J.escape=P.escapeSelector,J.getText=P.text,J.isXML=P.isXMLDoc,J.selectors=P.expr,J.support=P.support,J.uniqueSort=P.uniqueSort}();var I=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&P(e).is(n))break;i.push(e)}return i},L=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},B=P.expr.match.needsContext,q=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function z(e,t,n){return y(t)?P.grep(e,(function(e,i){return!!t.call(e,i,e)!==n})):t.nodeType?P.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?P.grep(e,(function(e){return p.call(t,e)>-1!==n})):P.filter(t,e,n)}P.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?P.find.matchesSelector(i,e)?[i]:[]:P.find.matches(e,P.grep(t,(function(e){return 1===e.nodeType})))},P.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(P(e).filter((function(){for(t=0;t1?P.uniqueSort(n):n},filter:function(e){return this.pushStack(z(this,e||[],!1))},not:function(e){return this.pushStack(z(this,e||[],!0))},is:function(e){return!!z(this,"string"==typeof e&&B.test(e)?P(e):e||[],!1).length}});var F,V=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(P.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||F,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:V.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof P?t[0]:t,P.merge(this,P.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),q.test(i[1])&&P.isPlainObject(t))for(i in t)y(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(r=b.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(P):P.makeArray(e,this)}).prototype=P.fn,F=P(b);var H=/^(?:parents|prev(?:Until|All))/,U={children:!0,contents:!0,next:!0,prev:!0};function W(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}P.fn.extend({has:function(e){var t=P(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&P.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?P.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?p.call(P(e),this[0]):p.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(P.uniqueSort(P.merge(this.get(),P(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),P.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return I(e,"parentNode")},parentsUntil:function(e,t,n){return I(e,"parentNode",n)},next:function(e){return W(e,"nextSibling")},prev:function(e){return W(e,"previousSibling")},nextAll:function(e){return I(e,"nextSibling")},prevAll:function(e){return I(e,"previousSibling")},nextUntil:function(e,t,n){return I(e,"nextSibling",n)},prevUntil:function(e,t,n){return I(e,"previousSibling",n)},siblings:function(e){return L((e.parentNode||{}).firstChild,e)},children:function(e){return L(e.firstChild)},contents:function(e){return null!=e.contentDocument&&s(e.contentDocument)?e.contentDocument:(S(e,"template")&&(e=e.content||e),P.merge([],e.childNodes))}},(function(e,t){P.fn[e]=function(n,i){var r=P.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=P.filter(i,r)),this.length>1&&(U[e]||P.uniqueSort(r),H.test(e)&&r.reverse()),this.pushStack(r)}}));var G=/[^\x20\t\r\n\f]+/g;function Q(e){return e}function X(e){throw e}function K(e,t,n,i){var r;try{e&&y(r=e.promise)?r.call(e).done(t).fail(n):e&&y(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}P.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return P.each(e.match(G)||[],(function(e,n){t[n]=!0})),t}(e):P.extend({},e);var t,n,i,r,o=[],s=[],a=-1,l=function(){for(r=r||e.once,i=t=!0;s.length;a=-1)for(n=s.shift();++a-1;)o.splice(n,1),n<=a&&a--})),this},has:function(e){return e?P.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=s=[],n||t||(o=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},P.extend({Deferred:function(e){var t=[["notify","progress",P.Callbacks("memory"),P.Callbacks("memory"),2],["resolve","done",P.Callbacks("once memory"),P.Callbacks("once memory"),0,"resolved"],["reject","fail",P.Callbacks("once memory"),P.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return P.Deferred((function(n){P.each(t,(function(t,i){var r=y(e[i[4]])&&e[i[4]];o[i[1]]((function(){var e=r&&r.apply(this,arguments);e&&y(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,r){var o=0;function s(e,t,n,r){return function(){var a=this,l=arguments,c=function(){var i,c;if(!(e=o&&(n!==X&&(a=void 0,l=[i]),t.rejectWith(a,l))}};e?p():(P.Deferred.getErrorHook?p.error=P.Deferred.getErrorHook():P.Deferred.getStackHook&&(p.error=P.Deferred.getStackHook()),i.setTimeout(p))}}return P.Deferred((function(i){t[0][3].add(s(0,i,y(r)?r:Q,i.notifyWith)),t[1][3].add(s(0,i,y(e)?e:Q)),t[2][3].add(s(0,i,y(n)?n:X))})).promise()},promise:function(e){return null!=e?P.extend(e,r):r}},o={};return P.each(t,(function(e,i){var s=i[2],a=i[5];r[i[1]]=s.add,a&&s.add((function(){n=a}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),s.add(i[3].fire),o[i[0]]=function(){return o[i[0]+"With"](this===o?void 0:this,arguments),this},o[i[0]+"With"]=s.fireWith})),r.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,i=Array(n),r=a.call(arguments),o=P.Deferred(),s=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?a.call(arguments):n,--t||o.resolveWith(i,r)}};if(t<=1&&(K(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||y(r[n]&&r[n].then)))return o.then();for(;n--;)K(r[n],s(n),o.reject);return o.promise()}});var Y=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;P.Deferred.exceptionHook=function(e,t){i.console&&i.console.warn&&e&&Y.test(e.name)&&i.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},P.readyException=function(e){i.setTimeout((function(){throw e}))};var Z=P.Deferred();function J(){b.removeEventListener("DOMContentLoaded",J),i.removeEventListener("load",J),P.ready()}P.fn.ready=function(e){return Z.then(e).catch((function(e){P.readyException(e)})),this},P.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--P.readyWait:P.isReady)||(P.isReady=!0,!0!==e&&--P.readyWait>0||Z.resolveWith(b,[P]))}}),P.ready.then=Z.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?i.setTimeout(P.ready):(b.addEventListener("DOMContentLoaded",J),i.addEventListener("load",J));var ee=function(e,t,n,i,r,o,s){var a=0,l=e.length,c=null==n;if("object"===_(n))for(a in r=!0,n)ee(e,t,a,n[a],!0,o,s);else if(void 0!==i&&(r=!0,y(i)||(s=!0),c&&(s?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(P(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each((function(){le.remove(this,e)}))}}),P.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=ae.get(e,t),n&&(!i||Array.isArray(n)?i=ae.access(e,t,P.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=P.queue(e,t),i=n.length,r=n.shift(),o=P._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,(function(){P.dequeue(e,t)}),o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ae.get(e,n)||ae.access(e,n,{empty:P.Callbacks("once memory").add((function(){ae.remove(e,[t+"queue",n])}))})}}),P.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,Se=/^$|^module$|\/(?:java|ecma)script/i;Ee=b.createDocumentFragment().appendChild(b.createElement("div")),(Oe=b.createElement("input")).setAttribute("type","radio"),Oe.setAttribute("checked","checked"),Oe.setAttribute("name","t"),Ee.appendChild(Oe),g.checkClone=Ee.cloneNode(!0).cloneNode(!0).lastChild.checked,Ee.innerHTML="",g.noCloneChecked=!!Ee.cloneNode(!0).lastChild.defaultValue,Ee.innerHTML="",g.option=!!Ee.lastChild;var Ce={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function Te(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&S(e,t)?P.merge([e],n):n}function Ae(e,t){for(var n=0,i=e.length;n",""]);var Me=/<|&#?\w+;/;function De(e,t,n,i,r){for(var o,s,a,l,c,p,u=t.createDocumentFragment(),d=[],h=0,f=e.length;h-1)r&&r.push(o);else if(c=ge(o),s=Te(u.appendChild(o),"script"),c&&Ae(s),n)for(p=0;o=s[p++];)Se.test(o.type||"")&&n.push(o);return u}var Re=/^([^.]*)(?:\.(.+)|)/;function Ne(){return!0}function $e(){return!1}function je(e,t,n,i,r,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)je(e,a,n,i,t[a],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=$e;else if(!r)return e;return 1===o&&(s=r,r=function(e){return P().off(e),s.apply(this,arguments)},r.guid=s.guid||(s.guid=P.guid++)),e.each((function(){P.event.add(this,t,r,i,n)}))}function Ie(e,t,n){n?(ae.set(e,t,!1),P.event.add(e,t,{namespace:!1,handler:function(e){var n,i=ae.get(this,t);if(1&e.isTrigger&&this[t]){if(i)(P.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=a.call(arguments),ae.set(this,t,i),this[t](),n=ae.get(this,t),ae.set(this,t,!1),i!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else i&&(ae.set(this,t,P.event.trigger(i[0],i.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ne)}})):void 0===ae.get(e,t)&&P.event.add(e,t,Ne)}P.event={global:{},add:function(e,t,n,i,r){var o,s,a,l,c,p,u,d,h,f,m,g=ae.get(e);if(oe(e))for(n.handler&&(n=(o=n).handler,r=o.selector),r&&P.find.matchesSelector(me,r),n.guid||(n.guid=P.guid++),(l=g.events)||(l=g.events=Object.create(null)),(s=g.handle)||(s=g.handle=function(t){return void 0!==P&&P.event.triggered!==t.type?P.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(G)||[""]).length;c--;)h=m=(a=Re.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),h&&(u=P.event.special[h]||{},h=(r?u.delegateType:u.bindType)||h,u=P.event.special[h]||{},p=P.extend({type:h,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&P.expr.match.needsContext.test(r),namespace:f.join(".")},o),(d=l[h])||((d=l[h]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(e,i,f,s)||e.addEventListener&&e.addEventListener(h,s)),u.add&&(u.add.call(e,p),p.handler.guid||(p.handler.guid=n.guid)),r?d.splice(d.delegateCount++,0,p):d.push(p),P.event.global[h]=!0)},remove:function(e,t,n,i,r){var o,s,a,l,c,p,u,d,h,f,m,g=ae.hasData(e)&&ae.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(G)||[""]).length;c--;)if(h=m=(a=Re.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),h){for(u=P.event.special[h]||{},d=l[h=(i?u.delegateType:u.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)p=d[o],!r&&m!==p.origType||n&&n.guid!==p.guid||a&&!a.test(p.namespace)||i&&i!==p.selector&&("**"!==i||!p.selector)||(d.splice(o,1),p.selector&&d.delegateCount--,u.remove&&u.remove.call(e,p));s&&!d.length&&(u.teardown&&!1!==u.teardown.call(e,f,g.handle)||P.removeEvent(e,h,g.handle),delete l[h])}else for(h in l)P.event.remove(e,h+t[c],n,i,!0);P.isEmptyObject(l)&&ae.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,o,s,a=new Array(arguments.length),l=P.event.fix(e),c=(ae.get(this,"events")||Object.create(null))[l.type]||[],p=P.event.special[l.type]||{};for(a[0]=l,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],s={},n=0;n-1:P.find(r,this,null,[c]).length),s[r]&&o.push(i);o.length&&a.push({elem:c,handlers:o})}return c=this,l\s*$/g;function ze(e,t){return S(e,"table")&&S(11!==t.nodeType?t:t.firstChild,"tr")&&P(e).children("tbody")[0]||e}function Fe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ve(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function He(e,t){var n,i,r,o,s,a;if(1===t.nodeType){if(ae.hasData(e)&&(a=ae.get(e).events))for(r in ae.remove(t,"handle events"),a)for(n=0,i=a[r].length;n1&&"string"==typeof f&&!g.checkClone&&Be.test(f))return e.each((function(r){var o=e.eq(r);m&&(t[0]=f.call(this,r,o.html())),We(o,t,n,i)}));if(d&&(o=(r=De(t,e[0].ownerDocument,!1,e,i)).firstChild,1===r.childNodes.length&&(r=o),o||i)){for(a=(s=P.map(Te(r,"script"),Fe)).length;u0&&Ae(s,!l&&Te(e,"script")),a},cleanData:function(e){for(var t,n,i,r=P.event.special,o=0;void 0!==(n=e[o]);o++)if(oe(n)){if(t=n[ae.expando]){if(t.events)for(i in t.events)r[i]?P.event.remove(n,i):P.removeEvent(n,i,t.handle);n[ae.expando]=void 0}n[le.expando]&&(n[le.expando]=void 0)}}}),P.fn.extend({detach:function(e){return Ge(this,e,!0)},remove:function(e){return Ge(this,e)},text:function(e){return ee(this,(function(e){return void 0===e?P.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return We(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||ze(this,e).appendChild(e)}))},prepend:function(){return We(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ze(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return We(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return We(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(P.cleanData(Te(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return P.clone(this,e,t)}))},html:function(e){return ee(this,(function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Le.test(e)&&!Ce[(ke.exec(e)||["",""])[1].toLowerCase()]){e=P.htmlPrefilter(e);try{for(;n=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-a-.5))||0),l+c}function pt(e,t,n){var i=Ke(e),r=(!g.boxSizingReliable()||n)&&"border-box"===P.css(e,"boxSizing",!1,i),o=r,s=Je(e,t,i),a="offset"+t[0].toUpperCase()+t.slice(1);if(Qe.test(s)){if(!n)return s;s="auto"}return(!g.boxSizingReliable()&&r||!g.reliableTrDimensions()&&S(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===P.css(e,"display",!1,i))&&e.getClientRects().length&&(r="border-box"===P.css(e,"boxSizing",!1,i),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+ct(e,t,n||(r?"border":"content"),o,i,s)+"px"}function ut(e,t,n,i,r){return new ut.prototype.init(e,t,n,i,r)}P.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Je(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,s,a=re(t),l=Xe.test(t),c=e.style;if(l||(t=rt(a)),s=P.cssHooks[t]||P.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(e,!1,i))?r:c[t];"string"===(o=typeof n)&&(r=he.exec(n))&&r[1]&&(n=be(e,t,r),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=r&&r[3]||(P.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,i))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,i){var r,o,s,a=re(t);return Xe.test(t)||(t=rt(a)),(s=P.cssHooks[t]||P.cssHooks[a])&&"get"in s&&(r=s.get(e,!0,n)),void 0===r&&(r=Je(e,t,i)),"normal"===r&&t in at&&(r=at[t]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),P.each(["height","width"],(function(e,t){P.cssHooks[t]={get:function(e,n,i){if(n)return!ot.test(P.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?pt(e,t,i):Ye(e,st,(function(){return pt(e,t,i)}))},set:function(e,n,i){var r,o=Ke(e),s=!g.scrollboxSize()&&"absolute"===o.position,a=(s||i)&&"border-box"===P.css(e,"boxSizing",!1,o),l=i?ct(e,t,i,a,o):0;return a&&s&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-ct(e,t,"border",!1,o)-.5)),l&&(r=he.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=P.css(e,t)),lt(0,n,l)}}})),P.cssHooks.marginLeft=et(g.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Je(e,"marginLeft"))||e.getBoundingClientRect().left-Ye(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),P.each({margin:"",padding:"",border:"Width"},(function(e,t){P.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+fe[i]+t]=o[i]||o[i-2]||o[0];return r}},"margin"!==e&&(P.cssHooks[e+t].set=lt)})),P.fn.extend({css:function(e,t){return ee(this,(function(e,t,n){var i,r,o={},s=0;if(Array.isArray(t)){for(i=Ke(e),r=t.length;s1)}}),P.Tween=ut,ut.prototype={constructor:ut,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||P.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(P.cssNumber[n]?"":"px")},cur:function(){var e=ut.propHooks[this.prop];return e&&e.get?e.get(this):ut.propHooks._default.get(this)},run:function(e){var t,n=ut.propHooks[this.prop];return this.options.duration?this.pos=t=P.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ut.propHooks._default.set(this),this}},ut.prototype.init.prototype=ut.prototype,ut.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=P.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){P.fx.step[e.prop]?P.fx.step[e.prop](e):1!==e.elem.nodeType||!P.cssHooks[e.prop]&&null==e.elem.style[rt(e.prop)]?e.elem[e.prop]=e.now:P.style(e.elem,e.prop,e.now+e.unit)}}},ut.propHooks.scrollTop=ut.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},P.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},P.fx=ut.prototype.init,P.fx.step={};var dt,ht,ft=/^(?:toggle|show|hide)$/,mt=/queueHooks$/;function gt(){ht&&(!1===b.hidden&&i.requestAnimationFrame?i.requestAnimationFrame(gt):i.setTimeout(gt,P.fx.interval),P.fx.tick())}function yt(){return i.setTimeout((function(){dt=void 0})),dt=Date.now()}function vt(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)r["margin"+(n=fe[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function bt(e,t,n){for(var i,r=(xt.tweeners[t]||[]).concat(xt.tweeners["*"]),o=0,s=r.length;o1)},removeAttr:function(e){return this.each((function(){P.removeAttr(this,e)}))}}),P.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?P.prop(e,t,n):(1===o&&P.isXMLDoc(e)||(r=P.attrHooks[t.toLowerCase()]||(P.expr.match.bool.test(t)?wt:void 0)),void 0!==n?null===n?void P.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:null==(i=P.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&S(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(G);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),wt={set:function(e,t,n){return!1===t?P.removeAttr(e,n):e.setAttribute(n,n),n}},P.each(P.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=_t[t]||P.find.attr;_t[t]=function(e,t,i){var r,o,s=t.toLowerCase();return i||(o=_t[s],_t[s]=r,r=null!=n(e,t,i)?s:null,_t[s]=o),r}}));var Et=/^(?:input|select|textarea|button)$/i,Ot=/^(?:a|area)$/i;function Pt(e){return(e.match(G)||[]).join(" ")}function kt(e){return e.getAttribute&&e.getAttribute("class")||""}function St(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(G)||[]}P.fn.extend({prop:function(e,t){return ee(this,P.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[P.propFix[e]||e]}))}}),P.extend({prop:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&P.isXMLDoc(e)||(t=P.propFix[t]||t,r=P.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=P.find.attr(e,"tabindex");return t?parseInt(t,10):Et.test(e.nodeName)||Ot.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(P.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),P.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){P.propFix[this.toLowerCase()]=this})),P.fn.extend({addClass:function(e){var t,n,i,r,o,s;return y(e)?this.each((function(t){P(this).addClass(e.call(this,t,kt(this)))})):(t=St(e)).length?this.each((function(){if(i=kt(this),n=1===this.nodeType&&" "+Pt(i)+" "){for(o=0;o-1;)n=n.replace(" "+r+" "," ");s=Pt(n),i!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,i,r,o,s=typeof e,a="string"===s||Array.isArray(e);return y(e)?this.each((function(n){P(this).toggleClass(e.call(this,n,kt(this),t),t)})):"boolean"==typeof t&&a?t?this.addClass(e):this.removeClass(e):(n=St(e),this.each((function(){if(a)for(o=P(this),r=0;r-1)return!0;return!1}});var Ct=/\r/g;P.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=y(e),this.each((function(n){var r;1===this.nodeType&&(null==(r=i?e.call(this,n,P(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=P.map(r,(function(e){return null==e?"":e+""}))),(t=P.valHooks[this.type]||P.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))}))):r?(t=P.valHooks[r.type]||P.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(Ct,""):null==n?"":n:void 0}}),P.extend({valHooks:{option:{get:function(e){var t=P.find.attr(e,"value");return null!=t?t:Pt(P.text(e))}},select:{get:function(e){var t,n,i,r=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?o+1:r.length;for(i=o<0?l:s?o:0;i-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),P.each(["radio","checkbox"],(function(){P.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=P.inArray(P(e).val(),t)>-1}},g.checkOn||(P.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var Tt=i.location,At={guid:Date.now()},Mt=/\?/;P.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new i.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||P.error("Invalid XML: "+(n?P.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Dt=/^(?:focusinfocus|focusoutblur)$/,Rt=function(e){e.stopPropagation()};P.extend(P.event,{trigger:function(e,t,n,r){var o,s,a,l,c,p,u,d,f=[n||b],m=h.call(e,"type")?e.type:e,g=h.call(e,"namespace")?e.namespace.split("."):[];if(s=d=a=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!Dt.test(m+P.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),c=m.indexOf(":")<0&&"on"+m,(e=e[P.expando]?e:new P.Event(m,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:P.makeArray(t,[e]),u=P.event.special[m]||{},r||!u.trigger||!1!==u.trigger.apply(n,t))){if(!r&&!u.noBubble&&!v(n)){for(l=u.delegateType||m,Dt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)f.push(s),a=s;a===(n.ownerDocument||b)&&f.push(a.defaultView||a.parentWindow||i)}for(o=0;(s=f[o++])&&!e.isPropagationStopped();)d=s,e.type=o>1?l:u.bindType||m,(p=(ae.get(s,"events")||Object.create(null))[e.type]&&ae.get(s,"handle"))&&p.apply(s,t),(p=c&&s[c])&&p.apply&&oe(s)&&(e.result=p.apply(s,t),!1===e.result&&e.preventDefault());return e.type=m,r||e.isDefaultPrevented()||u._default&&!1!==u._default.apply(f.pop(),t)||!oe(n)||c&&y(n[m])&&!v(n)&&((a=n[c])&&(n[c]=null),P.event.triggered=m,e.isPropagationStopped()&&d.addEventListener(m,Rt),n[m](),e.isPropagationStopped()&&d.removeEventListener(m,Rt),P.event.triggered=void 0,a&&(n[c]=a)),e.result}},simulate:function(e,t,n){var i=P.extend(new P.Event,n,{type:e,isSimulated:!0});P.event.trigger(i,null,t)}}),P.fn.extend({trigger:function(e,t){return this.each((function(){P.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return P.event.trigger(e,t,n,!0)}});var Nt=/\[\]$/,$t=/\r?\n/g,jt=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;function Lt(e,t,n,i){var r;if(Array.isArray(t))P.each(t,(function(t,r){n||Nt.test(e)?i(e,r):Lt(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)}));else if(n||"object"!==_(t))i(e,t);else for(r in t)Lt(e+"["+r+"]",t[r],n,i)}P.param=function(e,t){var n,i=[],r=function(e,t){var n=y(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!P.isPlainObject(e))P.each(e,(function(){r(this.name,this.value)}));else for(n in e)Lt(n,e[n],t,r);return i.join("&")},P.fn.extend({serialize:function(){return P.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=P.prop(this,"elements");return e?P.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!P(this).is(":disabled")&&It.test(this.nodeName)&&!jt.test(e)&&(this.checked||!Pe.test(e))})).map((function(e,t){var n=P(this).val();return null==n?null:Array.isArray(n)?P.map(n,(function(e){return{name:t.name,value:e.replace($t,"\r\n")}})):{name:t.name,value:n.replace($t,"\r\n")}})).get()}});var Bt=/%20/g,qt=/#.*$/,zt=/([?&])_=[^&]*/,Ft=/^(.*?):[ \t]*([^\r\n]*)$/gm,Vt=/^(?:GET|HEAD)$/,Ht=/^\/\//,Ut={},Wt={},Gt="*/".concat("*"),Qt=b.createElement("a");function Xt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(G)||[];if(y(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Kt(e,t,n,i){var r={},o=e===Wt;function s(a){var l;return r[a]=!0,P.each(e[a]||[],(function(e,a){var c=a(t,n,i);return"string"!=typeof c||o||r[c]?o?!(l=c):void 0:(t.dataTypes.unshift(c),s(c),!1)})),l}return s(t.dataTypes[0])||!r["*"]&&s("*")}function Yt(e,t){var n,i,r=P.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&P.extend(!0,e,i),e}Qt.href=Tt.href,P.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Gt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":P.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Yt(Yt(e,P.ajaxSettings),t):Yt(P.ajaxSettings,e)},ajaxPrefilter:Xt(Ut),ajaxTransport:Xt(Wt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,r,o,s,a,l,c,p,u,d,h=P.ajaxSetup({},t),f=h.context||h,m=h.context&&(f.nodeType||f.jquery)?P(f):P.event,g=P.Deferred(),y=P.Callbacks("once memory"),v=h.statusCode||{},x={},w={},_="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Ft.exec(o);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)v[t]=[v[t],e[t]];return this},abort:function(e){var t=e||_;return n&&n.abort(t),O(0,t),this}};if(g.promise(E),h.url=((e||h.url||Tt.href)+"").replace(Ht,Tt.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(G)||[""],null==h.crossDomain){l=b.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Qt.protocol+"//"+Qt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=P.param(h.data,h.traditional)),Kt(Ut,h,t,E),c)return E;for(u in(p=P.event&&h.global)&&0==P.active++&&P.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Vt.test(h.type),r=h.url.replace(qt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Bt,"+")):(d=h.url.slice(r.length),h.data&&(h.processData||"string"==typeof h.data)&&(r+=(Mt.test(r)?"&":"?")+h.data,delete h.data),!1===h.cache&&(r=r.replace(zt,"$1"),d=(Mt.test(r)?"&":"?")+"_="+At.guid+++d),h.url=r+d),h.ifModified&&(P.lastModified[r]&&E.setRequestHeader("If-Modified-Since",P.lastModified[r]),P.etag[r]&&E.setRequestHeader("If-None-Match",P.etag[r])),(h.data&&h.hasContent&&!1!==h.contentType||t.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Gt+"; q=0.01":""):h.accepts["*"]),h.headers)E.setRequestHeader(u,h.headers[u]);if(h.beforeSend&&(!1===h.beforeSend.call(f,E,h)||c))return E.abort();if(_="abort",y.add(h.complete),E.done(h.success),E.fail(h.error),n=Kt(Wt,h,t,E)){if(E.readyState=1,p&&m.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(a=i.setTimeout((function(){E.abort("timeout")}),h.timeout));try{c=!1,n.send(x,O)}catch(e){if(c)throw e;O(-1,e)}}else O(-1,"No Transport");function O(e,t,s,l){var u,d,b,x,w,_=t;c||(c=!0,a&&i.clearTimeout(a),n=void 0,o=l||"",E.readyState=e>0?4:0,u=e>=200&&e<300||304===e,s&&(x=function(e,t,n){for(var i,r,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),n[o]}(h,E,s)),!u&&P.inArray("script",h.dataTypes)>-1&&P.inArray("json",h.dataTypes)<0&&(h.converters["text script"]=function(){}),x=function(e,t,n,i){var r,o,s,a,l,c={},p=e.dataTypes.slice();if(p[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(o=p.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=p.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=c[l+" "+o]||c["* "+o]))for(r in c)if((a=r.split(" "))[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[r]:!0!==c[r]&&(o=a[0],p.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(h,x,E,u),u?(h.ifModified&&((w=E.getResponseHeader("Last-Modified"))&&(P.lastModified[r]=w),(w=E.getResponseHeader("etag"))&&(P.etag[r]=w)),204===e||"HEAD"===h.type?_="nocontent":304===e?_="notmodified":(_=x.state,d=x.data,u=!(b=x.error))):(b=_,!e&&_||(_="error",e<0&&(e=0))),E.status=e,E.statusText=(t||_)+"",u?g.resolveWith(f,[d,_,E]):g.rejectWith(f,[E,_,b]),E.statusCode(v),v=void 0,p&&m.trigger(u?"ajaxSuccess":"ajaxError",[E,h,u?d:b]),y.fireWith(f,[E,_]),p&&(m.trigger("ajaxComplete",[E,h]),--P.active||P.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return P.get(e,t,n,"json")},getScript:function(e,t){return P.get(e,void 0,t,"script")}}),P.each(["get","post"],(function(e,t){P[t]=function(e,n,i,r){return y(n)&&(r=r||i,i=n,n=void 0),P.ajax(P.extend({url:e,type:t,dataType:r,data:n,success:i},P.isPlainObject(e)&&e))}})),P.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),P._evalUrl=function(e,t,n){return P.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){P.globalEval(e,t,n)}})},P.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=P(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return y(e)?this.each((function(t){P(this).wrapInner(e.call(this,t))})):this.each((function(){var t=P(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=y(e);return this.each((function(n){P(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){P(this).replaceWith(this.childNodes)})),this}}),P.expr.pseudos.hidden=function(e){return!P.expr.pseudos.visible(e)},P.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},P.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(e){}};var Zt={0:200,1223:204},Jt=P.ajaxSettings.xhr();g.cors=!!Jt&&"withCredentials"in Jt,g.ajax=Jt=!!Jt,P.ajaxTransport((function(e){var t,n;if(g.cors||Jt&&!e.crossDomain)return{send:function(r,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);t=function(e){return function(){t&&(t=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Zt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),n=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&i.setTimeout((function(){t&&n()}))},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),P.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),P.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return P.globalEval(e),e}}}),P.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),P.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(i,r){t=P("