pipicar/public/js/app.js

160 lines
2.3 MiB
Raw Permalink Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*! 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<n.length;i++)n[i]=arguments[i];return e.apply(t,n)}}},106:(e,t,n)=>{"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]<i[r])return!1}return!1}r.transitional=function(e,t,n){var r=t&&a(t);function s(e,t){return"[Axios v"+i.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,a){if(!1===e)throw new Error(s(i," has been removed in "+t));return r&&!o[i]&&(o[i]=!0,console.warn(s(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,a)}},e.exports={isOlderVersion:a,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var i=Object.keys(e),r=i.length;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<i;n++)t.call(null,e[n],n,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===r.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:l,isUndefined:s,isDate:function(e){return"[object Date]"===r.call(e)},isFile:function(e){return"[object File]"===r.call(e)},isBlob:function(e){return"[object Blob]"===r.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:p,merge:function e(){var t={};function n(n,i){l(t[i])&&l(n)?t[i]=e(t[i],n):l(n)?t[i]=e({},n):o(n)?t[i]=n.slice():t[i]=n}for(var i=0,r=arguments.length;i<r;i++)p(arguments[i],n);return t},extend:function(e,t,n){return p(t,(function(t,r){e[r]=n&&"function"==typeof t?i(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},606:(e,t,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;$<C.length;$++){var j=C[$],I=N(j),L=ee(j)===p,B=[r,o].indexOf(I)>=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;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Me(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,i=void 0===n?[]:n,r=t.defaultOptions,o=void 0===r?Te:r;return function(e,t,n){void 0===n&&(n=o);var r,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Te,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,p={state:a,setOptions:function(n){var r="function"==typeof n?n(a.options):n;u(),a.options=Object.assign({},o,a.options,r),a.scrollParents={reference:A(e)?fe(e):e.contextElement?fe(e.contextElement):[],popper:fe(t)};var s,c,d=function(e){var t=Ce(e);return S.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((s=[].concat(i,a.options.modifiers),c=s.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return a.orderedModifiers=d.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,i=void 0===n?{}:n,r=e.effect;if("function"==typeof r){var o=r({state:a,name:t,instance:p,options:i}),s=function(){};l.push(o||s)}})),p.update()},forceUpdate:function(){if(!c){var e=a.elements,t=e.reference,n=e.popper;if(Ae(t,n)){a.rects={reference:Se(t,Q(n),"fixed"===a.options.strategy),popper:z(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var r=a.orderedModifiers[i],o=r.fn,s=r.options,l=void 0===s?{}:s,u=r.name;"function"==typeof o&&(a=o({state:a,options:l,name:u,instance:p})||a)}else a.reset=!1,i=-1}}},update:(r=function(){return new Promise((function(e){p.forceUpdate(),e(a)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(r())}))}))),s}),destroy:function(){u(),c=!0}};if(!Ae(e,t))return p;function u(){l.forEach((function(e){return e()})),l=[]}return p.setOptions(n).then((function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)})),p}}var De=Me(),Re=Me({defaultModifiers:[oe,Pe,ie,R,Oe,xe,ke,J,Ee]}),Ne=Me({defaultModifiers:[oe,Pe,ie,R]});const $e=new Map,je={set(e,t,n){$e.has(e)||$e.set(e,new Map);const i=$e.get(e);i.has(t)||0===i.size?i.set(t,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(e,t)=>$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:"<div></div>"},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:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',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:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',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<n)&&a&&c(r,a,t))return a})),i}function u(e,t){return p(e,!t,-1)}function d(e,t){var n,r,o=i.findIndex(e,(function(e){return e.name===t.name&&e.scope===t.scope}));o>=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.floor(i);r++){s=Math.floor(Math.random()*n).toString(n)+s}if(o){var a=Math.pow(n,o);s=Math.floor(Math.random()*a).toString(n)+s}var l=parseInt(s,n);return l!==1/0&&l>=Math.pow(2,e)?t(e,n):s};t.rack=function(e,n,i){var r=function(r){var s=0;do{if(s++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var a=t(e,n)}while(Object.hasOwnProperty.call(o,a));return o[a]=r,a},o=r.hats={};return r.get=function(e){return r.hats[e]},r.set=function(e,t){return r.hats[e]=t,r},r.bits=e||128,r.base=n||16,r}}));function 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;s<n.length;s++){let{d:e}=n[s];if(r<e)return void n.splice(s,0,o)}n.push(o)})),S(n,(e=>e.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<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},ne.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},ne.prototype.array=function(){return Array.from(this.list)},ne.prototype.has=ne.prototype.contains=function(e){return this.list.contains(e)};var oe,se,ae,le={};function ce(){oe=window.addEventListener?"addEventListener":"attachEvent",se=window.removeEventListener?"removeEventListener":"detachEvent",ae="addEventListener"!==oe?"on":""}var pe=le.bind=function(e,t,n,i){return oe||ce(),e[oe](ae+t,n,i||!1),n},ue=le.unbind=function(e,t,n,i){return se||ce(),e[se](ae+t,n,i||!1),n},de=U({__proto__:null,bind:pe,unbind:ue,default:le},[le]),he=["focus","blur"];var fe,me={bind:function(e,t,n,i,r){return-1!==he.indexOf(n)&&(r=!0),de.bind(e,n,(function(n){var r=n.target||n.srcElement;n.delegateTarget=re(r,t,!0),n.delegateTarget&&i.call(e,n)}),r)},unbind:function(e,t,n,i){return-1!==he.indexOf(t)&&(i=!0),de.unbind(e,t,n,i)}},ge=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var i=n[1];if("body"==i){return(l=t.createElement("html")).innerHTML=e,l.removeChild(l.lastChild)}var r=Object.prototype.hasOwnProperty.call(ve,i)?ve[i]:ve._default,o=r[0],s=r[1],a=r[2],l=t.createElement("div");l.innerHTML=s+e+a;for(;o--;)l=l.lastChild;if(l.firstChild==l.lastChild)return l.removeChild(l.firstChild);var c=t.createDocumentFragment();for(;l.firstChild;)c.appendChild(l.removeChild(l.firstChild));return c},ye=!1;"undefined"!=typeof document&&((fe=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',ye=!fe.getElementsByTagName("link").length,fe=void 0);var ve={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:ye?[1,"X<div>","</div>"]:[0,"",""]};ve.td=ve.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],ve.option=ve.optgroup=[1,'<select multiple="multiple">',"</select>"],ve.thead=ve.tbody=ve.colgroup=ve.caption=ve.tfoot=[1,"<table>","</table>"],ve.polyline=ve.ellipse=ve.polygon=ve.circle=ve.text=ve.line=ve.path=ve.rect=ve.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];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<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},De.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},De.prototype.array=function(){return Array.from(this.list)},De.prototype.has=De.prototype.contains=function(e){return this.list.contains(e)};var $e="http://www.w3.org/2000/svg",je='<svg xmlns="'+$e+'"';function Ie(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf($e)&&(e=je+e.substring(4)):(e=je+">"+e+"</svg>",t=!0);var n=function(e){var t;return(t=new DOMParser).async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function Le(e,t){var n;return"<"===(e=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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};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<i;++n)o=r.item(n),t.push(" ",o.name,'="',We(o.value,He),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,i=(s=e.childNodes).length;n<i;++n)Ge(s.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",We(e.nodeValue,Ve),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function Qe(e,t){var n=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<r.length;o++)Pe(r[o],e)}}function Xe(e,t){if(void 0!==t){try{Qe(e,t)}catch(e){throw new Error("error parsing SVG: "+e.message)}return e}return function(e){for(var t=e.firstChild,n=[];t;)Ge(t,n),t=t.nextSibling;return n.join("")}(e)}function Ke(e){var t=e.parentNode;return t&&t.removeChild(e),e}function Ye(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function Ze(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(Ye(e,i))}(n,t)),n.consolidate()}const Je=/^class[ {]/;function et(e){return Array.isArray(e)}function tt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function nt(...e){1===e.length&&et(e[0])&&(e=e[0]);const t=(e=[...e]).pop();return t.$inject=e,t}const it=/constructor\s*[^(]*\(\s*([^)]*)\)/m,rt=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,ot=/\/\*([^*]*)\*\//m;function st(e){if("function"!=typeof e)throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(function(e){return Je.test(e.toString())}(e)?it:rt);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map((e=>{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;r<n;r++){const n=e[r-1],l=e[r],c=e[r+1];if(!c||!t){i.push(ut(l));continue}const p=Math.min(t,ft(l.x-n.x,l.y-n.y),ft(c.x-l.x,c.y-l.y));if(!p){i.push(ut(l));continue}const u=ht(l,n,p),d=ht(l,n,.5*p),h=ht(l,c,p),f=ht(l,c,.5*p);i.push(ut(u)),i.push((s=f,a=h,["C",(o=d).x,o.y,s.x,s.y,a.x,a.y]))}return i}function ht(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=n/ft(i,r);return{x:e.x+i*o,y:e.y+r*o}}function ft(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function mt(e,t,n){m(t)&&(n=t,t=null),t||(t={});const i=Le("path",t);return m(n)&&(i.dataset.cornerRadius=String(n)),gt(i,e)}function gt(e,t){return Te(e,{d:pt(dt(t,parseInt(e.dataset.cornerRadius,10)||0))}),e}function yt(e){return w(e,(function(t){return!b(e,(function(e){return e!==t&&vt(t,e)}))}))}function vt(e,t){if(t){if(e===t)return t;if(e.parent)return vt(e.parent,t)}}function bt(e,t,n){var i=!n||-1===e.indexOf(t);return i&&e.push(t),i}function xt(e,t,n){n=n||0,h(e)||(e=[e]),_(e,(function(e,i){var r=t(e,i,n);h(r)&&r.length&&xt(r,t,n+1)}))}function wt(e,t,n){var i=[],r=[];return xt(e,(function(e,o,s){bt(i,e,t);var a=e.children;if((-1===n||s<n)&&a&&bt(r,a,t))return a})),i}function _t(e,t){return wt(e,!t,-1)}function Et(e,t){var n,i,r,o;return t=!!t,h(e)||(e=[e]),_(e,(function(e){var s=e;e.waypoints&&!t&&(s=Et(e.waypoints,!0));var a=s.x,l=s.y,c=s.height||0,p=s.width||0;(a<n||void 0===n)&&(n=a),(l<i||void 0===i)&&(i=l),(a+p>r||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<t.x+t.width+n&&e.y<t.y+t.height+n}function It(e,t){return{x:Math.round(e.x+(t.x-e.x)/2),y:Math.round(e.y+(t.y-e.y)/2)}}var Lt=/,?([a-z]),?/gi,Bt=parseFloat,qt=Math,zt=qt.PI,Ft=qt.min,Vt=qt.max,Ht=qt.pow,Ut=qt.abs,Wt=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/gi,Gt=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/gi,Qt=Array.isArray||function(e){return e instanceof Array};function Xt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Kt(e){if("function"==typeof e||Object(e)!==e)return e;var t=new e.constructor;for(var n in e)Xt(e,n)&&(t[n]=Kt(e[n]));return t}function Yt(e){var t=Yt.ps=Yt.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout((function(){for(var n in t)Xt(t,n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])})),t[e]}function Zt(e,t,n,i){return 1===arguments.length&&(t=e.y,n=e.width,i=e.height,e=e.x),{x:e,y:t,width:n,height:i,x2:e+n,y2:t+i}}function Jt(){return this.join(",").replace(Lt,"$1")}function en(e){var t=Kt(e);return t.toString=Jt,t}function tn(e,t,n,i,r,o,s,a,l){var c=1-l,p=Ht(c,3),u=Ht(c,2),d=l*l*l,h=p*t+3*u*l*i+3*c*l*l*o+d*a;return{x:ln(p*e+3*u*l*n+3*c*l*l*r+d*s),y:ln(h)}}function nn(e){var t=function(e,t,n,i,r,o,s,a){for(var l,c,p,u,d,h,f,m,g=[],y=[[],[]],v=0;v<2;++v)if(0==v?(c=6*e-12*n+6*r,l=-3*e+9*n-9*r+3*s,p=3*n-3*e):(c=6*t-12*i+6*o,l=-3*t+9*i-9*o+3*a,p=3*i-3*t),Ut(l)<1e-12){if(Ut(c)<1e-12)continue;0<(u=-p/c)&&u<1&&g.push(u)}else f=c*c-4*p*l,m=qt.sqrt(f),f<0||(0<(d=(-c+m)/(2*l))&&d<1&&g.push(d),0<(h=(-c-m)/(2*l))&&h<1&&g.push(h));var b,x=g.length,w=x;for(;x--;)b=1-(u=g[x]),y[0][x]=b*b*b*e+3*b*b*u*n+3*b*u*u*r+u*u*u*s,y[1][x]=b*b*b*t+3*b*b*u*i+3*b*u*u*o+u*u*u*a;return y[0][w]=e,y[1][w]=t,y[0][w+1]=s,y[1][w+1]=a,y[0].length=y[1].length=w+2,{x0:Ft(...y[0]),y0:Ft(...y[1]),x1:Vt(...y[0]),y1:Vt(...y[1])}}(...e);return Zt(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function rn(e,t,n){return t>=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)<Ft(r,s)||Ft(e,n)>Vt(r,s)||Vt(t,i)<Ft(o,a)||Ft(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.x<t.x2&&e.x>t.x||t.x<e.x2&&t.x>e.x)&&(e.y<t.y2&&e.y>t.y||t.y<e.y2&&t.y>e.y)}(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<o+1;u++){var d=tn(...e,u/o);a.push({x:d.x,y:d.y,t:u/o})}for(u=0;u<s+1;u++)d=tn(...t,u/s),l.push({x:d.x,y:d.y,t:u/s});for(u=0;u<o;u++)for(var h=0;h<s;h++){var f,m=a[u],g=a[u+1],y=l[h],v=l[h+1],b=Ut(g.x-m.x)<.01?"y":"x",x=Ut(v.x-y.x)<.01?"y":"x",w=an(m.x,m.y,g.x,g.y,y.x,y.y,v.x,v.y);if(w){if(c[f=w.x.toFixed(9)+"#"+w.y.toFixed(9)])continue;c[f]=!0;var _=m.t+Ut((w[b]-m[b])/(g[b]-m[b]))*(g.t-m.t),E=y.t+Ut((w[x]-y[x])/(v[x]-y[x]))*(v.t-y.t);_>=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;f<m;f++){var g=e[f];if("M"==g[0])i=a=g[1],r=l=g[2];else{"C"==g[0]?(i=(u=[i,r,...g.slice(1)])[6],r=u[7]):(u=[i,r,i,r,a,l,a,l],i=a,r=l);for(var y=0,v=t.length;y<v;y++){var b=t[y];if("M"==b[0])o=c=b[1],s=p=b[2];else{"C"==b[0]?(o=(d=[o,s,...b.slice(1)])[6],s=d[7]):(d=[o,s,o,s,c,p,c,p],o=c,s=p);var x=cn(u,d,n);if(n)h+=x;else{for(var w=0,_=x.length;w<_;w++)x[w].segment1=f,x[w].segment2=y,x[w].bez1=u,x[w].bez2=d;h=h.concat(x)}}}}}return h}function un(e){var t=Yt(e);if(t.abs)return en(t.abs);if(Qt(e)&&Qt(e&&e[0])||(e=function(e){if(!e)return null;var t=Yt(e);if(t.arr)return Kt(t.arr);var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=[];return Qt(e)&&Qt(e[0])&&(i=Kt(e)),i.length||String(e).replace(Wt,(function(e,t,r){var o=[],s=t.toLowerCase();for(r.replace(Gt,(function(e,t){t&&o.push(+t)})),"m"==s&&o.length>2&&(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<d;u++){if(i.push(c=[]),(n=(p=e[u])[0])!=n.toUpperCase())switch(c[0]=n.toUpperCase(),c[0]){case"A":c[1]=p[1],c[2]=p[2],c[3]=p[3],c[4]=p[4],c[5]=p[5],c[6]=+p[6]+r,c[7]=+p[7]+o;break;case"V":c[1]=+p[1]+o;break;case"H":c[1]=+p[1]+r;break;case"M":s=+p[1]+r,a=+p[2]+o;default:for(var h=1,f=p.length;h<f;h++)c[h]=+p[h]+(h%2?r:o)}else for(var m=0,g=p.length;m<g;m++)c[m]=p[m];switch(n=n.toUpperCase(),c[0]){case"Z":r=+s,o=+a;break;case"H":r=c[1];break;case"V":o=c[1];break;case"M":s=c[c.length-2],a=c[c.length-1];default:r=c[c.length-2],o=c[c.length-1]}}return i.toString=Jt,t.abs=en(i),i}function dn(e){return e[0]===e[2]&&e[1]===e[3]&&e[4]===e[6]&&e[5]===e[7]}function hn(e,t,n,i){return[e,t,n,i,n,i]}function fn(e,t,n,i,r,o){var s=1/3,a=2/3;return[s*e+a*n,s*t+a*i,s*r+a*n,s*o+a*i,r,o]}function mn(e,t,n,i,r,o,s,a,l,c){var p,u=120*zt/180,d=zt/180*(+r||0),h=[],f=function(e){return function t(){var n=Array.prototype.slice.call(arguments,0).join("␀"),i=t.cache=t.cache||{},r=t.count=t.count||[];return Xt(i,n)?(function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}(r,n),i[n]):(r.length>=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=e<w?zt-E:E)<0&&(E=2*zt+E),(O=a<w?zt-O:O)<0&&(O=2*zt+O),s&&E>O&&(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;z<F;z++)q[z]=z%2?f(h[z-1],h[z],d).y:f(h[z],h[z+1],d).x;return q}function gn(e){var t=Yt(e);if(t.curve)return en(t.curve);for(var n=un(e),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},r=function(e,t,n){var i,r;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];switch(!(e[0]in{T:1,Q:1})&&(t.qx=t.qy=null),e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=["C",...mn(t.x,t.y,...e.slice(1))];break;case"S":"C"==n||"S"==n?(i=2*t.x-t.bx,r=2*t.y-t.by):(i=t.x,r=t.y),e=["C",i,r,...e.slice(1)];break;case"T":"Q"==n||"T"==n?(t.qx=2*t.x-t.qx,t.qy=2*t.y-t.qy):(t.qx=t.x,t.qy=t.y),e=["C",...fn(t.x,t.y,t.qx,t.qy,e[1],e[2])];break;case"Q":t.qx=e[1],t.qy=e[2],e=["C",...fn(t.x,t.y,e[1],e[2],e[3],e[4])];break;case"L":e=["C",...hn(t.x,t.y,e[1],e[2])];break;case"H":e=["C",...hn(t.x,t.y,e[1],t.y)];break;case"V":e=["C",...hn(t.x,t.y,t.x,e[1])];break;case"Z":e=["C",...hn(t.x,t.y,t.X,t.Y)]}return e},o=function(e,t){if(e[t].length>7){e[t].shift();for(var i=e[t];i.length;)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<p;c++){n[c]&&(a=n[c][0]),"C"!=a&&(s[c]=a,c&&(l=s[c-1])),n[c]=r(n[c],i,l),"A"!=s[c]&&"C"==a&&(s[c]="C"),o(n,c);var u=n[c],d=u.length;i.x=u[d-2],i.y=u[d-1],i.bx=Bt(u[d-4])||i.x,i.by=Bt(u[d-3])||i.y}return t.curve=en(n),n}function yn(e){return f(e)&&v(e,"waypoints")}function vn(e){return f(e)&&v(e,"labelTarget")}function bn(e){return{x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height)}}function xn(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function wn(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function _n(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function En(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.endLength<i;)o=n[++r];var s=(i-o.startLength)/o.length;return{x:o.start.x+(o.end.x-o.start.x)*s,y:o.start.y+(o.end.y-o.start.y)*s}}function On(e){return yn(e)?En(e):xn({x:(t=e).x+(t.width||0)/2,y:t.y+(t.height||0)/2});var t}function Pn(e,t,n){f(n=n||0)||(n={x:n,y:n});var i=wn(e),r=wn(t),o=i.bottom+n.y<=r.top,s=i.left-n.x>=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<s.width&&r.height<s.height){const e=Math.max(0,o.right-p.right),t=Math.min(0,o.left-p.left),n=Math.max(0,o.bottom-p.bottom),i=Math.min(0,o.top-p.top);l=e||t,c=n||i}else l=r.x-s.x,c=r.y-s.y;this.scroll({dx:-l*a,dy:-c*a})},Mn.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if("fit-viewport"===e)return this._fitViewport(t);let n,i;return this._changeViewbox((function(){"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)})),Sn(i.a,1e3)},Mn.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,i=t.inner;let r,o;return i.x>=0&&i.y>=0&&i.x+i.width<=n.width&&i.y+i.height<=n.height&&!e?o={x:0,y:0,width:Math.max(i.width+i.x,n.width),height:Math.max(i.height+i.y,n.height)}:(r=Math.min(1,n.width/i.width,n.height/i.height),o={x:i.x+(e?i.width/2-n.width/r/2:0),y:i.y+(e?i.height/2-n.height/r/2:0),width:n.width/r,height:n.height/r}),this.viewbox(o),this.viewbox(!1).scale},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<n.length;i++){var r=t[n[i]],o=r.element;if(e(o,r.gfx))return o}},Nn.prototype.getAll=function(){return this.filter((function(e){return e}))},Nn.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach((function(n){var i=t[n],r=i.element,o=i.gfx;return e(r,o)}))},Nn.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},Nn.prototype._validateId=function(e){if(!e)throw new Error("element must have an id");if(this._elements[e])throw new Error("element with id "+e+" already added")};function In(e,t,n){var i=$n(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:i}),i.length&&i.forEach((function(i){e.set(i,t.inverse,n)}))}function Ln(e,t){if(!(this instanceof Ln))return new Ln(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Ln.prototype.bind=function(e,t){if("string"==typeof t){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?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<t.priority)return t.next=i,void(n?n.next=t:this._setListeners(e,t));n=i,i=i.next}n.next=t}else this._setListeners(e,t)},Jn.prototype._getListeners=function(e){return this._listeners[e]},Jn.prototype._setListeners=function(e,t){this._listeners[e]=t},Jn.prototype._removeListener=function(e,t){var n,i,r,o=this._getListeners(e);if(t)for(;o;)n=o.next,(r=o.callback)!==t&&r[Yn]!==t||(i?i.next=n:this._setListeners(e,n)),i=o,o=n;else this._setListeners(e,null)},ei.prototype.stopPropagation=function(){this.cancelBubble=!0},ei.prototype.preventDefault=function(){this.defaultPrevented=!0},ei.prototype.init=function(e){z(this,e||{})},oi.$inject=["eventBus","elementRegistry"],oi.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=function(e){return e.parentNode.childNodes[1]}(n),t||(Me(t=Le("g")).add("djs-children"),ke(n.parentNode,t))):t=n,t},oi.prototype._clear=function(e){var t=ti(e);return ie(t),t},oi.prototype._createContainer=function(e,t,n,i){var r=Le("g");Me(r).add("djs-group"),void 0!==n?si(r,t,t.childNodes[n]):ke(t,r);var o=Le("g");Me(o).add("djs-element"),Me(o).add("djs-"+e),i&&Me(o).add("djs-frame"),ke(r,o);var s=Le("g");return Me(s).add("djs-visual"),ke(o,s),o},oi.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,Pt(t))},oi.prototype.updateContainments=function(e){var t,n=this,i=this._elementRegistry;t=O(e,(function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e}),{}),_(t,(function(e){var t=e.children;if(t){var r=n._getChildrenContainer(e);_(t.slice().reverse(),(function(e){si(i.getGraphics(e).parentNode,r)}))}}))},oi.prototype.drawShape=function(e,t,n={}){return this._eventBus.fire("render.shape",{gfx:e,element:t,attrs:n})},oi.prototype.getShapePath=function(e){return this._eventBus.fire("render.getShapePath",e)},oi.prototype.drawConnection=function(e,t,n={}){return this._eventBus.fire("render.connection",{gfx:e,element:t,attrs:n})},oi.prototype.getConnectionPath=function(e){return this._eventBus.fire("render.getConnectionPath",e)},oi.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if("shape"===e)this.drawShape(i,t),ii(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(i,t)}t.hidden?Te(n,"display","none"):Te(n,"display","block")}},oi.prototype.remove=function(e){Ke(this._elementRegistry.getGraphics(e).parentNode)};const ai={__depends__:[Ct],__init__:["canvas"],canvas:["type",Mn],elementRegistry:["type",Nn],elementFactory:["type",Kn],eventBus:["type",Jn],graphicsFactory:["type",oi]};function li(e){return function(e){var t=new at(e);return t.init(),t}([{config:["value",e=e||{}]},ai].concat(e.modules||[]))}function ci(e,t){this._injector=t=t||li(e),this.get=t.get,this.invoke=t.invoke,this.get("eventBus").fire("diagram.init")}function pi(){}function ui(e,t){this.model=e,this.properties=t}ci.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},ci.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")},pi.prototype.get=function(e){return this.$model.properties.get(this,e)},pi.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},ui.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(pi.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 di={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},hi={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 fi(e,t){var n=hi[e];return n?n(t):t}function mi(e){return!!di[e]}function gi(e){return!!hi[e]}function yi(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function 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 <name, cb>");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 <nsMap={}>");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 <xml=string>");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(;g<b;g++)if(l=!1,!(32===(p=y.charCodeAt(g))||p<14&&p>8)){for((p<65||p>122||p>90&&p<97)&&95!==p&&58!==p&&(v("illegal first char attribute name"),l=!0),u=g+1;u<b;u++)if(!((p=y.charCodeAt(u))>96&&p<123||p>64&&p<91||p>47&&p<59||46===p||45===p||95===p)){if(32===p||p<14&&p>8){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;u<b&&!(32===(p=y.charCodeAt(u+1))||p<14&&p>8);u++);for(-1===u&&(v("missing closing quotes"),u=b,l=!0),l||(o=y.substring(g,u)),g=u;u+1<b&&!(32===(p=y.charCodeAt(u+1))||p<14&&p>8);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<b;g++){if(a=m[g++],o=m[g],-1!==(p=a.indexOf(":"))){if(!(n=C[a.substring(0,p)])){v(Ni(a.substring(0,p)));continue}(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}return k=x}function L(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,o=0,s=0,a=N;R>=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<e.length&&e.substring(N).trim()&&v(Di));if(N!==R)if(T.length){if(t&&(t(e.substring(N,R),Ai,d),g))return}else if(e.substring(N,R).trim()&&(v(Di),g))return;if(33===(x=e.charCodeAt(R+1))){if(91===(b=e.charCodeAt(R+2))&&"CDATA["===e.substr(R+3,6)){if(-1===(N=e.indexOf("]]>",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(;b<N;b++)if(!(32===(x=e.charCodeAt(b))||x>8&&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;b<m;b++)if(!((x=u.charCodeAt(b))>96&&x<123||x>64&&x<91||x>47&&x<59||45===x||95===x||46==x)){if(32===x||x<14&&x>8){E=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('<?xml version="1.0" encoding="UTF-8"?>\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+"</"+this.tagName+">").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("</"+this.tagName+">").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("</"+this.tagName+">")),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:"")+'" />':"<null>"}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='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>',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='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+jr+'</a><span>Web-based tooling for BPMN, DMN and forms powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>';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('<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+jr+"</a>");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?"<defs>"+Xe(i)+"</defs>":"",s=n.getBBox();e='<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- created with bpmn-js / http://bpmn.io --\x3e\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+s.width+'" height="'+s.height+'" viewBox="'+s.x+" "+s.y+" "+s.width+" "+s.height+'" version="1.1">'+o+r+"</svg>"}catch(e){t=e}if(this._emit("saveSVG.done",{error:t,svg:e}),t)throw t;return{svg:e}},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('<div class="bjs-container"></div>');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)<Math.PI/2?a-=15:s+=15,{x:s,y:a}}function io(e){return e.waypoints?no(e.waypoints):Tr(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+Jr.height/2}:{x:e.x+e.width/2,y:e.y+e.height+Jr.height/2}}function ro(e){return Tr(e,"bpmn:FlowElement")||Tr(e,"bpmn:Participant")||Tr(e,"bpmn:Lane")||Tr(e,"bpmn:SequenceFlow")||Tr(e,"bpmn:MessageFlow")||Tr(e,"bpmn:DataInput")||Tr(e,"bpmn:DataOutput")?"name":Tr(e,"bpmn:TextAnnotation")?"text":Tr(e,"bpmn:Group")?"categoryValueRef":void 0}function oo(e){var t=e.businessObject,n=ro(t);if(n)return"categoryValueRef"===n?function(e){var t=e.categoryValueRef;return t&&t.value||""}(t):t[n]||""}var so="hsl(225, 10%, 15%)";function ao(e,t){return k(e.eventDefinitions,(function(e){return e.$type===t}))}function lo(e,t,n){var i=Dr(e);return n||i.get("color:background-color")||i.get("bioc:fill")||t||"white"}function co(e,t,n){var i=Dr(e);return n||i.get("color:border-color")||i.get("bioc:stroke")||t||so}function po(e,t,n,i){var r=Dr(e).get("label");return i||r&&r.get("color:color")||t||co(e,n)}function uo(e,t={}){return{width:ho(e,t),height:fo(e,t)}}function ho(e,t={}){return v(t,"width")?t.width:e.width}function fo(e,t={}){return v(t,"height")?t.height:e.height}var mo=new s,go=.95;function yo(e,t,n,i,r,o,s){ct.call(this,t,s);var a=e&&e.defaultFillColor,l=e&&e.defaultStrokeColor,c=e&&e.defaultLabelColor,p=mo.next(),u={};function d(e){return n.computeStyle(e,{strokeLinecap:"round",strokeLinejoin:"round",stroke:so,strokeWidth:2,fill:"white"})}function h(e){return n.computeStyle(e,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:so,strokeWidth:2})}function m(e,t){var{ref:n={x:0,y:0},scale:i=1,element:o}=t,s=Le("marker",{id:e,viewBox:"0 0 20 20",refX:n.x,refY:n.y,markerWidth:20*i,markerHeight:20*i,orient:"auto"});ke(s,o);var a=we("defs",r._svg);a||(a=Le("defs"),ke(r._svg,a)),ke(a,s),u[e]=s}function g(e){return e.replace(/[^0-9a-zA-Z]+/g,"_")}function y(e,t,n){var i=e+"-"+g(t)+"-"+g(n)+"-"+p;return u[i]||function(e,t,n,i){if("sequenceflow-end"===t){m(e,{element:Le("path",{d:"M 1 5 L 11 10 L 1 15 Z",...d({fill:i,stroke:i,strokeWidth:1})}),ref:{x:11,y:10},scale:.5})}if("messageflow-start"===t){m(e,{element:Le("circle",{cx:6,cy:6,r:3.5,...d({fill:n,stroke:i,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:6,y:6}})}if("messageflow-end"===t){m(e,{element:Le("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...d({fill:n,stroke:i,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:8.5,y:5}})}if("association-start"===t){m(e,{element:Le("path",{d:"M 11 5 L 1 10 L 11 15",...h({fill:"none",stroke:i,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:1,y:10},scale:.5})}if("association-end"===t){m(e,{element:Le("path",{d:"M 1 5 L 11 10 L 1 15",...h({fill:"none",stroke:i,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:11,y:10},scale:.5})}if("conditional-flow-marker"===t){m(e,{element:Le("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...d({fill:n,stroke:i})}),ref:{x:-1,y:10},scale:.5})}if("conditional-default-flow-marker"===t){m(e,{element:Le("path",{d:"M 6 4 L 10 16",...d({stroke:i})}),ref:{x:0,y:10},scale:.5})}}(i,e,t,n),"url(#"+i+")"}function v(e,t,n,i,r={}){f(i)&&(r=i,i=0),i=i||0,r=d(r);var o=Le("circle",{cx:t/2,cy:n/2,r:Math.round((t+n)/4-i),...r});return ke(e,o),o}function b(e,t,n,i,r,o){f(r)&&(o=r,r=0),r=r||0,o=d(o);var s=Le("rect",{x:r,y:r,width:t-2*r,height:n-2*r,rx:i,ry:i,...o});return ke(e,s),s}function x(e,t,n,i){var r=mt(t,n=h(n),i);return ke(e,r),r}function w(e,t,n){return x(e,t,n,5)}function E(e,t,n){n=h(n);var i=Le("path",{...n,d:t});return ke(e,i),i}function O(e,t,n,i){return E(t,n,z({"data-marker":e},i))}function P(e){return te[e]}function k(e){return function(t,n,i){return P(e)(t,n,i)}}var S=function(e,t,n={},r){return E(e,i.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),{fill:r?co(t,l,n.stroke):lo(t,a,n.fill),stroke:r?lo(t,a,n.fill):co(t,l,n.stroke),strokeWidth:1})},C=function(e,t,n={}){var r=v(e,t.width,t.height,.2*t.height,{fill:lo(t,a,n.fill),stroke:co(t,l,n.stroke),strokeWidth:2});E(e,i.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),{stroke:co(t,l,n.stroke),strokeWidth:2});for(var o=0;o<12;o++){var s=i.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),c=t.width/2,p=t.height/2;E(e,s,{strokeWidth:1,stroke:co(t,l,n.stroke),transform:"rotate("+30*o+","+p+","+c+")"})}return r},T=function(e,t,n={},r){return E(e,i.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{fill:r?co(t,l,n.stroke):lo(t,a,n.fill),stroke:co(t,l,n.stroke),strokeWidth:1})},A=function(e,t,n={}){return E(e,i.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}}),{fill:lo(t,a,n.fill),stroke:co(t,l,n.stroke),strokeWidth:1})},M=function(e,t,n={},r){return E(e,i.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{fill:r?co(t,l,n.stroke):lo(t,a,n.fill),stroke:co(t,l,n.stroke),strokeWidth:1})},D=function(e,t,n={},r){return E(e,i.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),{fill:r?co(t,l,n.stroke):lo(t,a,n.fill),stroke:co(t,l,n.stroke),strokeWidth:1})},R=function(e,t,n={},r){var o=E(e,i.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{fill:r?co(t,l,n.stroke):"none",stroke:co(t,l,n.stroke),strokeWidth:1});return ri(o,45),o},N=function(e,t,n={},r){return E(e,i.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.22,my:.5}}),{fill:r?co(t,l,n.stroke):lo(t,a,n.fill),stroke:co(t,l,n.stroke),strokeWidth:1})},$=function(e,t,n={},r){return E(e,i.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:r?co(t,l,n.stroke):lo(t,a,n.fill),stroke:co(t,l,n.stroke)})},j=function(e,t,n={},r){return E(e,i.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),{fill:r?co(t,l,n.stroke):lo(t,a,n.fill),strokeWidth:1})},I=function(e,t,n={}){return E(e,i.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}}),{fill:lo(t,a,n.fill),stroke:co(t,l,n.stroke),strokeWidth:1})},L=function(e,t,n={}){return v(e,t.width,t.height,8,{fill:co(t,l,n.stroke),stroke:co(t,l,n.stroke),strokeWidth:4})};function B(e,t,n={}){var i,r=Mr(e),o="bpmn:IntermediateThrowEvent"===(i=r).$type||"bpmn:EndEvent"===i.$type;return r.get("eventDefinitions")&&r.get("eventDefinitions").length>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.width<Math.round(t)||o.length<2)return _o(e,o,r,i);o=Oo(o,i.width,t)}}function _o(e,t,n,i){if(t.length<n.length){var r=n.slice(t.length).trim();e.unshift(r)}return{width:i.width,height:i.height,text:t}}var Eo="­";function Oo(e,t,n){var i=Math.max(e.length*(n/t),1),r=function(e,t){var n,i=e.split(/(\s|-|\u00AD)/g),r=[],o=0;if(i.length>1)for(;n=i.shift();){if(!(n.length+o<t)){"-"!==n&&n!==Eo||r.pop();break}r.push(n),o+=n.length}var s=r[r.length-1];return s&&s===Eo&&(r[r.length-1]="-"),r.join("")}(e,i);return r||(r=e.slice(0,Math.max(Math.round(i-1),1))),r}function Po(e){this._config=z({},{size:bo,padding:0,style:{},align:"center-top"},e||{})}Po.prototype.createText=function(e,t){return this.layoutText(e,t).element},Po.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},Po.prototype.layoutText=function(e,t){var n=z({},this._config.size,t.box),i=z({},this._config.style,t.style),r=function(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}(t.align||this._config.align),o=function(e){return f(e)?z({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}(void 0!==t.padding?t.padding:this._config.padding),s=t.fitBox||!1,a=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(i),l=e.split(/\u00AD?\r?\n/),c=[],p=n.width-o.left-o.right,u=Le("text");for(Te(u,{x:0,y:0}),Te(u,i),ke(function(){var e=document.getElementById("helper-svg");return e||(Te(e=Le("svg"),{id:"helper-svg"}),Z(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}(),u);l.length;)c.push(wo(l,p,u));"middle"===r.vertical&&(o.top=o.bottom=0);var d=O(c,(function(e,t,n){return e+(a||t.height)}),0)+o.top+o.bottom,h=O(c,(function(e,t,n){return t.width>e?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<r.heightElements.length;p++)a["y"+p]=r.heightElements[p]*l;for(var u=0;u<r.widthElements.length;u++)a["x"+u]=r.widthElements[u]*c}return o=r.d,s={mx:n,my:i,e:a},String(o).replace(So,(function(e,t){return function(e,t,n){var i=n;return t.replace(Co,(function(e,t,n,r,o){t=t||r,i&&(t in i&&(i=i[t]),"function"==typeof i&&o&&(i=i()))})),i=(null==i||i==n?e:i)+""}(e,t,s)}))}}]};const Ao={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]};function Mo(e,t,n){return z({id:e.id,type:e.$type,businessObject:e,di:t},n)}function Do(e,t,n){var i=e.waypoint;return!i||i.length<2?[On(t),On(n)]:i.map((function(e){return{x:e.x,y:e.y}}))}function Ro(e,t,n,i){return new Error(e("element {element} referenced by {referenced}#{property} not yet drawn",{element:Pr(n),referenced:Pr(t),property:i}))}function No(e,t,n,i,r,o){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._translate=r,this._textRenderer=o}No.$inject=["eventBus","canvas","elementFactory","elementRegistry","translate","textRenderer"],No.prototype.add=function(e,t,n){var i,r,o,s=this._translate;if(Tr(t,"bpmndi:BPMNPlane")){var a=Tr(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};i=this._elementFactory.createRoot(Mo(e,t,a)),this._canvas.addRootElement(i)}else if(Tr(t,"bpmndi:BPMNShape")){var l=!Xr(e,t),c=function(e){return Tr(e,"bpmn:Group")}(e);r=n&&(n.hidden||n.collapsed);var p=t.bounds;i=this._elementFactory.createShape(Mo(e,t,{collapsed:l,hidden:r,x:Math.round(p.x),y:Math.round(p.y),width:Math.round(p.width),height:Math.round(p.height),isFrame:c})),Tr(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,i),Tr(e,"bpmn:Lane")&&(o=0),Tr(e,"bpmn:DataStoreReference")&&(function(e,t){var n=t.x,i=t.y;return n>=e.x&&n<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}(n,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('<div class="djs-overlay-container" />'),{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('<div class="djs-overlays" />');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('<div class="djs-overlay" data-overlay-id="'+i+'">'),{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)&&o<t.scale))&&(a=!1),ls(s,a),this._updateOverlayScale(e,t)},ss.prototype._updateOverlayScale=function(e,t){var n,i,r,o=e.scale,s=e.htmlContainer,a="";!0!==o&&(!1===o?(n=1,i=1):(n=o.min,i=o.max),u(n)&&t.scale<n&&(r=(1/t.scale||1)*n),u(i)&&t.scale>i&&(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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};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('<ul class="bjs-breadcrumbs"></ul>'),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('<li><span class="bjs-crumb"><a title="'+i+'">'+i+"</a></span></li>"),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('<button class="bjs-drilldown"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg></button>');i.addEventListener("click",(function(){t.setRootElement(t.findRoot(_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||'<div class="entry" draggable="true"></div>');J(s,"data-action",n),(i=we("[data-group="+ys(o)+"]",r))||(J(i=be('<div class="group"></div>'),"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("<img>"),"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('<div class="djs-context-pad"></div>'),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;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Za(e):null}function Ja(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Ja(e)}}function el(e){(!e.__d&&(e.__d=!0)&&$a.push(e)&&!tl.__r++||ja!==Ra.debounceRendering)&&((ja=Ra.debounceRendering)||Ia)(tl)}function tl(){var e,t,n,i,r,o,s,a;for($a.sort(La);e=$a.shift();)e.__d&&(t=$a.length,i=void 0,o=(r=(n=e).__v).__e,s=[],a=[],n.__P&&((i=Wa({},r)).__v=r.__v+1,Ra.vnode&&Ra.vnode(i),cl(n.__P,i,r,n.__n,n.__P.namespaceURI,32&r.__u?[o]:null,s,null==o?Za(r):o,!!(32&r.__u),a),i.__v=r.__v,i.__.__k[i.__i]=i,pl(s,i,a),i.__e!=o&&Ja(i)),$a.length>t&&$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;u<y;u++)null!=(h=n.__k[u])&&(d=-1===h.__i?Fa:g[h.__i]||Fa,h.__i=u,cl(e,h,d,r,o,s,a,l,c,p),f=h.__e,h.ref&&d.ref!=h.ref&&(d.ref&&dl(d.ref,null,h),p.push(h.ref,h.__c||f,h)),null==m&&null!=f&&(m=f),65536&h.__u||d.__k===h.__k?l=rl(h,l,e):"function"==typeof h.type&&void 0!==h.__d?l=h.__d:f&&(l=f.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=l,n.__e=m}function il(e,t,n){var i,r,o,s,a,l=t.length,c=n.length,p=c,u=0;for(e.__k=[],i=0;i<l;i++)null!=(r=t[i])&&"boolean"!=typeof r&&"function"!=typeof r?(s=i+u,(r=e.__k[i]="string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?Xa(null,r,null,null,null):Ua(r)?Xa(Ka,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?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<c;i++)null!=(o=n[i])&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=Za(o)),hl(o,o))}function rl(e,t,n){var i,r;if("function"==typeof e.type){for(i=e.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=e,t=rl(i[r],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=Za(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function ol(e,t,n,i){var r=e.key,o=e.type,s=n-1,a=n+1,l=t[n];if(null===l||l&&r==l.key&&o===l.type&&!(131072&l.__u))return n;if(("function"!=typeof o||o===Ka||r)&&i>(null==l||131072&l.__u?0:1))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&r==l.key&&o===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&r==l.key&&o===l.type)return a;a++}}return-1}function sl(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Ha.test(t)?n:n+"px"}function al(e,t,n,i,r){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||sl(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||sl(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?i?n.u=i.u:(n.u=Ba,e.addEventListener(t,o?za:qa,o)):e.removeEventListener(t,o?za:qa,o);else{if("http://www.w3.org/2000/svg"==r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function ll(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=Ba++;else if(t.t<n.u)return;return Ra.event&&(t=Ra.event(t)),"handleEvent"in n?n.handleEvent(t):n(t)}}}function cl(e,t,n,i,r,o,s,a,l,c){var p,u,d,h,f,m,g,y,v,b,x,w,_,E,O,P,k=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=t.__e=n.__e]),(p=Ra.__b)&&p(t);e:if("function"==typeof k)try{if(y=t.props,v="prototype"in k&&k.prototype.render,b=(p=k.contextType)&&i[p.__c],x=p?b?b.props.value:p.__:i,n.__c?g=(u=t.__c=n.__c).__=u.__E:(v?t.__c=u=new k(y,x):(t.__c=u=new Ya(y,x),u.constructor=k,u.render=fl),b&&b.sub(u),u.props=y,u.state||(u.state={}),u.context=x,u.__n=i,d=u.__d=!0,u.__h=[],u._sb=[]),v&&null==u.__s&&(u.__s=u.state),v&&null!=k.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=Wa({},u.__s)),Wa(u.__s,k.getDerivedStateFromProps(y,u.__s))),h=u.props,f=u.state,u.__v=t,d)v&&null==k.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),v&&null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(v&&null==k.getDerivedStateFromProps&&y!==h&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(y,x),!u.__e&&(null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(y,u.__s,x)||t.__v===n.__v)){for(t.__v!==n.__v&&(u.props=y,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),w=0;w<u._sb.length;w++)u.__h.push(u._sb[w]);u._sb=[],u.__h.length&&s.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(y,u.__s,x),v&&null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(h,f,m)}))}if(u.context=x,u.props=y,u.__P=e,u.__e=!1,_=Ra.__r,E=0,v){for(u.state=u.__s,u.__d=!1,_&&_(t),p=u.render(u.props,u.state,u.context),O=0;O<u._sb.length;O++)u.__h.push(u._sb[O]);u._sb=[]}else do{u.__d=!1,_&&_(t),p=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++E<25);u.state=u.__s,null!=u.getChildContext&&(i=Wa(Wa({},i),u.getChildContext())),v&&!d&&null!=u.getSnapshotBeforeUpdate&&(m=u.getSnapshotBeforeUpdate(h,f)),nl(e,Ua(P=null!=p&&p.type===Ka&&null==p.key?p.props.children:p)?P:[P],t,n,i,r,o,s,a,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&s.push(u),g&&(u.__E=u.__=null)}catch(e){if(t.__v=null,l||null!=o){for(t.__u|=l?160:128;a&&8===a.nodeType&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,t.__e=a}else t.__e=n.__e,t.__k=n.__k;Ra.__e(e,t,n)}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=ul(n.__e,t,n,i,r,o,s,l,c);(p=Ra.diffed)&&p(t)}function pl(e,t,n){t.__d=void 0;for(var i=0;i<n.length;i++)dl(n[i],n[++i],n[++i]);Ra.__c&&Ra.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Ra.__e(e,t.__v)}}))}function ul(e,t,n,i,r,o,s,a,l){var c,p,u,d,h,f,m,g=n.props,y=t.props,v=t.type;if("svg"===v?r="http://www.w3.org/2000/svg":"math"===v?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),null!=o)for(c=0;c<o.length;c++)if((h=o[c])&&"setAttribute"in h==!!v&&(v?h.localName===v:3===h.nodeType)){e=h,o[c]=null;break}if(null==e){if(null===v)return document.createTextNode(y);e=document.createElementNS(r,v,y.is&&y),a&&(Ra.__m&&Ra.__m(t,o),a=!1),o=null}if(null===v)g===y||a&&e.data===y||(e.data=y);else{if(o=o&&Da.call(e.childNodes),g=n.props||Fa,!a&&null!=o)for(g={},c=0;c<e.attributes.length;c++)g[(h=e.attributes[c]).name]=h.value;for(c in g)if(h=g[c],"children"==c);else if("dangerouslySetInnerHTML"==c)u=h;else if(!(c in y)){if("value"==c&&"defaultValue"in y||"checked"==c&&"defaultChecked"in y)continue;al(e,c,null,h,r)}for(c in y)h=y[c],"children"==c?d=h:"dangerouslySetInnerHTML"==c?p=h:"value"==c?f=h:"checked"==c?m=h:a&&"function"!=typeof h||g[c]===h||al(e,c,h,g[c],r);if(p)a||u&&(p.__html===u.__html||p.__html===e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(u&&(e.innerHTML=""),nl(e,Ua(d)?d:[d],t,n,i,"foreignObject"===v?"http://www.w3.org/1999/xhtml":r,o,s,o?o[0]:n.__k&&Za(n,0),a,l),null!=o)for(c=o.length;c--;)Ga(o[c]);a||(c="value","progress"===v&&null==f?e.removeAttribute("value"):void 0!==f&&(f!==e[c]||"progress"===v&&!f||"option"===v&&f!==g[c])&&al(e,c,f,g[c],r),c="checked",void 0!==m&&m!==e[c]&&al(e,c,m,g[c],r))}return e}function dl(e,t,n){try{if("function"==typeof e){var i="function"==typeof e.__u;i&&e.__u(),i&&null==t||(e.__u=e(t))}else e.current=t}catch(e){Ra.__e(e,n)}}function hl(e,t,n){var i,r;if(Ra.unmount&&Ra.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||dl(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){Ra.__e(e,t)}i.base=i.__P=null}if(i=e.__k)for(r=0;r<i.length;r++)i[r]&&hl(i[r],t,n||"function"!=typeof e.type);n||Ga(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function fl(e,t,n){return this.constructor(e,n)}function ml(e,t,n){var i,r,o,s;Ra.__&&Ra.__(e,t),r=(i="function"==typeof n)?null:n&&n.__k||t.__k,o=[],s=[],cl(t,e=(!i&&n||t).__k=Qa(Ka,null,[e]),r||Fa,Fa,t.namespaceURI,!i&&n?[n]:r?null:t.firstChild?Da.call(t.childNodes):null,o,!i&&n?n:r?r.__e:t.firstChild,i,s),pl(o,e,s)}Da=Va.slice,Ra={__e:function(e,t,n,i){for(var r,o,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,i||{}),s=r.__d),s)return r.__E=r}catch(t){e=t}throw e}},Na=0,Ya.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Wa({},this.state),"function"==typeof e&&(e=e(Wa({},n),this.props)),e&&Wa(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),el(this))},Ya.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),el(this))},Ya.prototype.render=Ka,$a=[],Ia="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,La=function(e,t){return e.__v.__b-t.__v.__b},tl.__r=0,Ba=0,qa=ll(!1),za=ll(!0);var gl=function(e,t,n,i){var r;t[0]=0;for(var o=1;o<t.length;o++){var s=t[o++],a=t[o]?(t[0]|=s?1:2,n[t[o++]]):t[++o];3===s?i[0]=a:4===s?i[1]=Object.assign(i[1]||{},a):5===s?(i[1]=i[1]||{})[t[++o]]=a:6===s?i[1][t[++o]]+=a+"":s?(r=e.apply(a,gl(e,a,n,["",null])),i.push(r),a[0]?t[0]|=2:(t[o-2]=0,t[o]=r)):i.push(a)}return i},yl=new Map;var vl,bl,xl,wl,_l=function(e){var t=yl.get(this);return t||(t=new Map,yl.set(this,t)),(t=gl(this,t.get(e)||(t.set(e,t=function(e){for(var t,n,i=1,r="",o="",s=[0],a=function(e){1===i&&(e||(r=r.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(0,e,r):3===i&&(e||r)?(s.push(3,e,r),i=2):2===i&&"..."===r&&e?s.push(4,e,0):2===i&&r&&!e?s.push(5,0,!0,r):i>=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<e.length;l++){l&&(1===i&&a(),a(l));for(var c=0;c<e[l].length;c++)t=e[l][c],1===i?"<"===t?(a(),s=[s],i=3):r+=t:4===i?"--"===r&&">"===t?(i=1,r=""):r=t+r[0]:o?t===o?o="":r+=t:'"'===t||"'"===t?o=t:">"===t?(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;t<r;t++)e[t]&&(n=Wl(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}const Gl=function(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Wl(e))&&(i&&(i+=" "),i+=t);return i};function Ql(e){const{entry:t,selected:n,onMouseEnter:i,onMouseLeave:r,onAction:o}=e;return _l`
<li
class=${Gl("entry",{selected:n})}
data-id=${t.id}
title=${t.title||t.label}
onClick=${o}
onMouseEnter=${i}
onMouseLeave=${r}
onDragStart=${e=>o(e,t,"dragstart")}
draggable=${!0}
>
<div class="djs-popup-entry-content">
<span
class=${Gl("djs-popup-entry-name",t.className)}
>
${t.imageUrl&&_l`<img class="djs-popup-entry-icon" src=${t.imageUrl} alt="" />`||t.imageHtml&&_l`<div class="djs-popup-entry-icon" dangerouslySetInnerHTML=${{__html:t.imageHtml}} />`}
${t.label?_l`
<span class="djs-popup-label">
${t.label}
</span>
`:null}
</span>
${t.description&&_l`
<span
class="djs-popup-entry-description"
title=${t.description}
>
${t.description}
</span>
`}
</div>
${t.documentationRef&&_l`
<div class="djs-popup-entry-docs">
<a
href="${t.documentationRef}"
onClick=${e=>e.stopPropagation()}
title="Open element documentation"
target="_blank"
rel="noopener"
>
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<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"/>
</svg>
</a>
</div>
`}
</li>
`}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`
<div class="djs-popup-results" ref=${o}>
${s.map((e=>_l`
${e.name&&_l`
<div key=${e.id} class="entry-header" title=${e.name}>
${e.name}
</div>
`}
<ul class="djs-popup-group" data-group=${e.id}>
${e.entries.map((e=>_l`
<${Ql}
key=${e.id}
entry=${e}
selected=${e===t}
onMouseEnter=${()=>n(e)}
onMouseLeave=${()=>n(null)}
...${r}
/>
`))}
</ul>
`))}
</div>
`}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`
<div class="djs-popup-header">
<h3 class="djs-popup-title" title=${s}>${s}</h3>
${r.map((e=>_l`
<span
class=${function(e,t){return Gl("entry",e.className,e.active?"active":"",e.disabled?"disabled":"",t?"selected":"")}(e,e===w)}
onClick=${t=>n(t,e)}
title=${e.title||e.label}
data-id=${e.id}
onMouseEnter=${()=>_(e)}
onMouseLeave=${()=>_(null)}
>
${e.imageUrl&&_l`<img class="djs-popup-entry-icon" src=${e.imageUrl} alt="" />`||e.imageHtml&&_l`<div class="djs-popup-entry-icon" dangerouslySetInnerHTML=${{__html:e.imageHtml}} />`}
${e.label?_l`
<span class="djs-popup-label">${e.label}</span>
`:null}
</span>
`))}
</div>
`}
${p.length>0&&_l`
<div class="djs-popup-body">
${f&&_l`
<div class="djs-popup-search">
<svg class="djs-popup-search-icon" width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.0325 8.5H9.625L13.3675 12.25L12.25 13.3675L8.5 9.625V9.0325L8.2975 8.8225C7.4425 9.5575 6.3325 10 5.125 10C2.4325 10 0.25 7.8175 0.25 5.125C0.25 2.4325 2.4325 0.25 5.125 0.25C7.8175 0.25 10 2.4325 10 5.125C10 6.3325 9.5575 7.4425 8.8225 8.2975L9.0325 8.5ZM1.75 5.125C1.75 6.9925 3.2575 8.5 5.125 8.5C6.9925 8.5 8.5 6.9925 8.5 5.125C8.5 3.2575 6.9925 1.75 5.125 1.75C3.2575 1.75 1.75 3.2575 1.75 5.125Z" fill="#22242A"/>
</svg>
<input
ref=${m}
type="text"
/>
</div>
`}
<${Xl}
entries=${b}
selectedEntry=${w}
setSelectedEntry=${_}
onAction=${n}
/>
</div>
${0===b.length&&_l`
<div class="djs-popup-no-results">No matching entries found.</div>
`}
`}
</${Yl}>
`}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`
<div
class="djs-popup-backdrop"
onClick=${l}
>
<div
class=${Gl("djs-popup",r)}
style=${function(e){return{transform:`scale(${e.scale})`,width:`${e.width}px`}}(e)}
onKeydown=${n}
onKeyup=${i}
ref=${a}
tabIndex="-1"
>
${o}
</div>
</div>
`}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(`<div class="djs-popup-parent djs-scrollable" data-popup=${e.provider}></div>`);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)&&n<e&&(r=e),u(t)&&n>t&&(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<i.height?(o=t.x,s=10):r.y&&(o=t.x,s=t.y-i.height),t.y<n.top&&(s=t.y+i.height),{x:o,y:s}},Jl.prototype.isEmpty=function(e,t){if(!e)throw new Error("target is missing");if(!t)throw new Error("provider ID is missing");const n=this._getProviders(t);return!n||!n.length||this._getContext(e,t).empty},Jl.prototype.registerProvider=function(e,t,n){n||(n=t,t=1e3),this._eventBus.on("popupMenu.getProviders."+e,t,(function(e){e.providers.push(n)}))},Jl.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"popupMenu.getProviders."+e,providers:[]});return this._eventBus.fire(t),t.providers},Jl.prototype._getEntries=function(e,t){var n={};return _(t,(function(t){if(t.getPopupMenuEntries){var i=t.getPopupMenuEntries(e);g(i)?n=i(n):_(i,(function(e,t){n[t]=e}))}else _(t.getEntries(e),(function(e){var t=e.id;if(!t)throw new Error("entry ID is missing");n[t]=H(e,["id"])}))})),n},Jl.prototype._getHeaderEntries=function(e,t){var n={};return _(t,(function(t){if(t.getPopupMenuHeaderEntries){var i=t.getPopupMenuHeaderEntries(e);g(i)?n=i(n):_(i,(function(e,t){n[t]=e}))}else{if(!t.getHeaderEntries)return;_(t.getHeaderEntries(e),(function(e){var t=e.id;if(!t)throw new Error("entry ID is missing");n[t]=H(e,["id"])}))}})),n},Jl.prototype.isOpen=function(){return!!this._current},Jl.prototype.trigger=function(e,t,n="click"){if(e.preventDefault(),!t){let n=J(re(e.delegateTarget||e.target,".entry",!0),"data-id");t={id:n,...this._getEntry(n)}}const i=t.action;if(!1!==this._emit("trigger",{entry:t,event:e}))if(g(i)){if("click"===n)return i(e,t)}else if(i[n])return i[n](e,t)},Jl.prototype._getEntry=function(e){var t=this._current.entries[e]||this._current.headerEntries[e];if(!t)throw new Error("entry not found");return t};const ec={__init__:["popupMenu"],popupMenu:["type",Jl]};const tc={align:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2000 2000">\n <line x1="200" y1="150" x2="200" y2="1850" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>\n <rect x="500" y="150" width="1300" height="700" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>\n <rect x="500" y="1150" width="700" height="700" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>\n </svg>',bottom:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">\n <line x1="150" y1="1650" x2="1650" y2="1650" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>\n <rect x="150" y="350" width="600" height="1300" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>\n <rect x="1050" y="850" width="600" height="800" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>\n </svg>',center:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">\n <line x1="900" y1="150" x2="900" y2="1650" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>\n <rect x="250" y="150" width="1300" height="600" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>\n <rect x="500" y="1050" width="800" height="600" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>\n </svg>',left:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">\n <line x1="100" y1="150" x2="100" y2="1650" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>\n <rect x="100" y="150" width="1300" height="600" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>\n <rect x="100" y="1050" width="800" height="600" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>\n </svg>',right:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">\n <line x1="1650" y1="150" x2="1650" y2="1650" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>\n <rect x="350" y="150" width="1300" height="600" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>\n <rect x="850" y="1050" width="800" height="600" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>\n </svg>',top:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">\n <line x1="150" y1="150" x2="1650" y2="150" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>\n <rect x="150" y="150" width="600" height="1300" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>\n <rect x="1050" y="150" width="600" height="800" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>\n </svg>',middle:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">\n <line x1="150" y1="900" x2="1650" y2="900" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>\n <rect x="150" y="250" width="600" height="1300" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>\n <rect x="1050" y="500" width="600" height="800" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>\n </svg>'};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:`<div class="entry">${tc.align}</div>`,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]<e[String(n)])&&(e.distance=n)),e}),{});return u.distance||n}(e,{filter:function(e){return Tr(e,"bpmn:SequenceFlow")}}),o=30,s=80,a="left";Tr(e,"bpmn:BoundaryEvent")&&-1!==(a=Pn(e,e.host,-25)).indexOf("top")&&(o*=-1);var l={x:n.right+r+t.width/2,y:i.y+yc(a,s)};return lc(e,t,l,cc({y:{margin:o,minDistance:s}}))}(e,t):void 0}function yc(e,t){return e.includes("top")?-1*t:e.includes("bottom")?t:0}function vc(e){e.on("autoPlace",(function(e){var t=e.shape;return gc(e.source,t)}))}vc.$inject=["eventBus"];const bc={__depends__:[mc],__init__:["bpmnAutoPlace"],bpmnAutoPlace:["type",vc]};function xc(e,t,n,i){hs.call(this,e),this._elementRegistry=t,this._modeling=n,this._rules=i;var r=this;this.postExecuted(["shape.create"],(function(e){var t=e.context,n=t.hints||{},i=t.shape,o=t.parent||t.newParent;!1!==n.autoResize&&r._expand([i],o)})),this.postExecuted(["elements.move"],(function(e){var t=e.context,n=a(T(t.closure.topLevel)),i=t.hints,o=!i||i.autoResize;!1!==o&&_(A(n,(function(e){return e.parent.id})),(function(e,t){h(o)&&(e=e.filter((function(e){return b(o,N({id:e.id}))}))),r._expand(e,t)}))})),this.postExecuted(["shape.toggleCollapse"],(function(e){var t=e.context,n=t.hints,i=t.shape;n&&!1===n.autoResize||i.collapsed||r._expand(i.children||[],i)})),this.postExecuted(["shape.resize"],(function(e){var t=e.context,n=t.hints,i=t.shape,o=i.parent;n&&!1===n.autoResize||o&&r._expand([i],o)}))}function wc(e){e.invoke(xc,this)}function _c(e){oc.call(this,e);var t=this;this.addRule("element.autoResize",(function(e){return t.canResize(e.elements,e.target)}))}function Ec(e,t){_c.call(this,e),this._modeling=t}xc.$inject=["eventBus","elementRegistry","modeling","rules"],i(xc,hs),xc.prototype._getOptimalBounds=function(e,t){var n=this.getOffset(t),i=this.getPadding(t),r=wn(Et(e)),o=wn(t),s={};return r.top-o.top<i.top&&(s.top=r.top-n.top),r.left-o.left<i.left&&(s.left=r.left-n.left),o.right-r.right<i.right&&(s.right=r.right+n.right),o.bottom-r.bottom<i.bottom&&(s.bottom=r.bottom+n.bottom),_n(z({},o,s))},xc.prototype._expand=function(e,t){if("string"==typeof t&&(t=this._elementRegistry.get(t)),this._rules.allowed("element.autoResize",{elements:e,target:t})){var n=this._getOptimalBounds(e,t);if(function(e,t){return e.x!==t.x||e.y!==t.y||e.width!==t.width||e.height!==t.height}(n,t)){var i=function(e,t){var n="";e=wn(e),t=wn(t),e.top>t.top&&(n=n.concat("n"));e.right<t.right&&(n=n.concat("w"));e.bottom<t.bottom&&(n=n.concat("s"));e.left>t.left&&(n=n.concat("e"));return n}(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 t<e&&e<n}Dc.$inject=["config.autoScroll","eventBus","canvas"],Dc.prototype.startScroll=function(e){var t=this._canvas,n=this._opts,i=this,r=t.getContainer().getBoundingClientRect(),o=[e.x,e.y,r.width-e.x,r.height-e.y];this.stopScroll();for(var s=0,a=0,l=0;l<4;l++)Rc(o[l],n.scrollThresholdOut[l],n.scrollThresholdIn[l])&&(0===l?s=n.scrollStep:1==l?a=n.scrollStep:2==l?s=-n.scrollStep:3==l&&(a=-n.scrollStep));0===s&&0===a||(t.scroll({dx:s,dy:a}),this._scrolling=setTimeout((function(){i.startScroll(e)}),n.scrollRepeatTimeout))},Dc.prototype.stopScroll=function(){clearTimeout(this._scrolling)},Dc.prototype.setOptions=function(e){this._opts=z({},this._opts,e)},Dc.prototype._toBorderPoint=function(e){var t=this._canvas._container.getBoundingClientRect(),n=Bo(e.originalEvent);return{x:n.x-t.left,y:n.y-t.top}};const Nc={__depends__:[Mc],__init__:["autoScroll"],autoScroll:["type",Dc]};function $c(e){this._commandStack=e.get("commandStack",!1)}$c.$inject=["injector"],$c.prototype.allowed=function(e,t){var n=!0,i=this._commandStack;return i&&(n=i.canExecute(e,t)),void 0===n||n};const jc={__init__:["rules"],rules:["type",$c]};var Ic=Math.round,Lc=Math.max;function Bc(e,t){return function(e,t){var n,i;for(n=0;i=e[n];n++)if(Dt(i,t)<=10)return{point:e[n],bendpoint:!0,index:n};return null}(e,t)||function(e,t){var n,i,r=pn(function(e,t){return[["M",e.x,e.y],["m",0,-t],["a",t,t,0,1,1,0,2*t],["a",t,t,0,1,1,0,-2*t],["z"]]}(t,10),(n=[],e.forEach((function(e,t){n.push([0===t?"M":"L",e.x,e.y])})),n)),o=r[0],s=r[r.length-1];return o?o!==s?o.segment2!==s.segment2?{point:e[i=Lc(o.segment2,s.segment2)-1],bendpoint:!0,index:i}:{point:{x:Ic(o.x+s.x)/2,y:Ic(o.y+s.y)/2},index:o.segment2}:{point:{x:Ic(o.x),y:Ic(o.y)},index:o.segment2}:null}(e,t)}function qc(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}function zc(e){return Math.atan((e[1].y-e[0].y)/(e[1].x-e[0].x))}function Fc(e,t){var n=t[0],i=t[1],r={x:i.x-n.x,y:i.y-n.y},o=function(e,t,n){var i=[{n:e[0]-n[0],lambda:t[0]},{n:e[1]-n[1],lambda:t[1]}];return-(i[0].n*t[0]+i[1].n*t[1])/(i[0].lambda*t[0]+i[1].lambda*t[1])}([n.x,n.y],[r.x,r.y],[e.x,e.y]);return{x:n.x+o*r.x,y:n.y+o*r.y}}function Vc(e,t){var n=Fc(e,t);return qc({x:n.x-e.x,y:n.y-e.y})}function Hc(e,t){return qc({x:e.x-t.x,y:e.y-t.y})}var Uc="djs-bendpoint",Wc="djs-segment-dragger";function Gc(e,t,n){var i=function(e,t){var n,i=Bo(t),r=e._container.getBoundingClientRect();n={x:r.left,y:r.top};var o=e.viewbox();return{x:o.x+(i.x-n.x)/o.scale,y:o.y+(i.y-n.y)/o.scale}}(e,n);return Bc(t,i)}function Qc(e,t){var n=Le("g");Me(n).add(Uc),ke(e,n);var i=Le("circle");Te(i,{cx:0,cy:0,r:4}),Me(i).add("djs-visual"),ke(n,i);var r=Le("circle");return Te(r,{cx:0,cy:0,r:10}),Me(r).add("djs-hit"),ke(n,r),t&&Me(n).add(t),n}function Xc(e,t,n,i){var r=Le("g");ke(e,r);var o=function(e,t,n){var i=t.x-e.x,r=t.y-e.y;return Yc("h"===n?i:r)}(t,n,i),s=Le("rect");Te(s,{x:-9,y:-3,width:18,height:6}),Me(s).add("djs-visual"),ke(r,s);var a=Le("rect");return Te(a,{x:-o/2,y:-8.5,width:o,height:17}),Me(a).add("djs-hit"),ke(r,a),ri(r,"v"===i?90:0),r}function Kc(e,t,n){var i=Le("g"),r=It(t,n),o=Nt(t,n);return ke(e,i),Xc(i,t,n,o),Me(i).add(Wc),Me(i).add("h"===o?"horizontal":"vertical"),ii(i,r.x,r.y),i}function Yc(e){return Math.abs(Math.round(2*e/3))}function Zc(e,t){var n=function(e,t){for(var n,i=t.waypoints,r=1/0,o=0;o<i.length-1;o++){var s=Vc(e,[i[o],i[o+1]]);s<r&&(r=s,n=o)}return[i[n],i[n+1]]}(e,t);return Fc(e,n)}function Jc(e,t,n,i,r){function o(e,n){var o,s=n.waypoints,a=Gc(t,s,e);if(a)return o=function(e,t){var n,i,r=e.waypoints;return t.index<=0||t.bendpoint?null:(i=Nt((n={start:r[t.index-1],end:r[t.index]}).start,n.end))?Yc("h"===i?n.end.x-n.start.x:n.end.y-n.start.y)/2:null}(n,a),!function(e,t,n){var i,r,o,s,a,l,c=e.index,p=e.point;return!(c<=0||e.bendpoint)&&(o=It(i=t[c-1],r=t[c]),s=Nt(i,r),a=Math.abs(p.x-o.x),l=Math.abs(p.y-o.y),s&&a<=n&&l<=n)}(a,s,o)?i.start(e,n,a.index,!a.bendpoint):r.start(e,n,a.index),!0}function s(e,t,i){de.bind(e,t,(function(e){n.triggerMouseEvent(t,e,i),e.stopPropagation()}))}function a(e,n){var i=t.getLayer("overlays"),r=we('.djs-bendpoints[data-element-id="'+ys(e.id)+'"]',i);return!r&&n&&(Te(r=Le("g"),{"data-element-id":e.id}),Me(r).add("djs-bendpoints"),ke(i,r),s(r,"mousedown",e),s(r,"click",e),s(r,"dblclick",e)),r}function l(e,t){return we('.djs-segment-dragger[data-segment-idx="'+e+'"]',t)}function c(e,t){t.waypoints.forEach((function(t,n){var i=Qc(e);ke(e,i),ii(i,t.x,t.y)})),Qc(e,"floating")}function p(e,t){for(var n,i,r,o=t.waypoints,a=1;a<o.length;a++)Nt(n=o[a-1],i=o[a])&&(Te(r=Kc(e,n,i),{"data-segment-idx":a}),s(r,"mousemove",t))}function u(e){var t=a(e);return t||(c(t=a(e,!0),e),p(t,e)),t}function d(e){var t=a(e);t&&(!function(e){_(_e("."+Wc,e),(function(e){Ke(e)}))}(t),function(e){_(_e("."+Uc,e),(function(e){Ke(e)}))}(t),p(t,e),c(t,e))}function h(e,t,n){var i,r,o=l(t.index,e),s=n[t.index-1],a=n[t.index],c=t.point,p=It(s,a),u=Nt(s,a);o&&(i=function(e){return we(".djs-visual",e)}(o),r={x:c.x-p.x,y:c.y-p.y},"v"===u&&(r={x:r.y,y:r.x}),ii(i,r.x,r.y))}e.on("connection.changed",(function(e){d(e.element)})),e.on("connection.remove",(function(e){var t=a(e.element);t&&Ke(t)})),e.on("element.marker.update",(function(e){var t,n=e.element;n.waypoints&&(t=u(n),e.add?Me(t).add(e.marker):Me(t).remove(e.marker))})),e.on("element.mousemove",(function(e){var n,i,r=e.element,o=r.waypoints;if(o){if(n=a(r,!0),!(i=Gc(t,o,e.originalEvent)))return;!function(e,t){var n=we(".floating",e),i=t.point;n&&ii(n,i.x,i.y)}(n,i),i.bendpoint||h(n,i,o)}})),e.on("element.mousedown",(function(e){if(Fo(e)){var t=e.originalEvent,n=e.element;if(n.waypoints)return o(t,n)}})),e.on("selection.changed",(function(e){var t=e.newSelection[0];t&&t.waypoints&&u(t)})),e.on("element.hover",(function(e){var t=e.element;t.waypoints&&(u(t),n.registerEvent(e.gfx,"mousemove","element.mousemove"))})),e.on("element.out",(function(e){n.unregisterEvent(e.gfx,"mousemove","element.mousemove")})),e.on("element.updateId",(function(e){var t=e.element,n=e.newId;if(t.waypoints){var i=a(t);i&&Te(i,{"data-element-id":n})}})),this.addHandles=u,this.updateHandles=d,this.getBendpointsContainer=a,this.getSegmentDragger=l}Jc.$inject=["eventBus","canvas","interactionEvents","bendpointMove","connectionSegmentMove"];var ep=Math.round,tp="reconnectStart",np="reconnectEnd",ip="updateWaypoints";function rp(e,t,n,i,r,o){this._injector=e,this.start=function(e,t,o,s){var a,l=n.getGraphics(t),c=t.source,p=t.target,u=t.waypoints,d=(a=s||0!==o?s||o!==u.length-1?ip:np:tp)===ip?"connection.updateWaypoints":"connection.reconnect",h=r.allowed(d,{connection:t,source:c,target:p});!1===h&&(h=r.allowed(d,{connection:t,source:p,target:c})),!1!==h&&i.init(e,"bendpoint.move",{data:{connection:t,connectionGfx:l,context:{allowed:h,bendpointIndex:o,connection:t,source:c,target:p,insert:s,type:a}}})},t.on("bendpoint.move.hover",(function(e){var t,n=e.context,i=n.connection,o=i.source,s=i.target,a=e.hover,l=n.type;if(n.hover=a,a){var c=l===ip?"connection.updateWaypoints":"connection.reconnect";if(t=n.allowed=r.allowed(c,{connection:i,source:l===tp?a:o,target:l===np?a:s}))return n.source=l===tp?a:o,void(n.target=l===np?a:s);!1===t&&(t=n.allowed=r.allowed(c,{connection:i,source:l===np?a:s,target:l===tp?a:o})),t&&(n.source=l===np?a:s,n.target=l===tp?a:o)}})),t.on(["bendpoint.move.out","bendpoint.move.cleanup"],(function(e){var t=e.context,n=t.type;t.hover=null,t.source=null,t.target=null,n!==ip&&(t.allowed=!1)})),t.on("bendpoint.move.end",(function(e){var t=e.context,n=t.allowed,i=t.bendpointIndex,r=t.connection,s=t.insert,a=r.waypoints.slice(),l=t.source,c=t.target,p=t.type,u=t.hints||{},d={x:ep(e.x),y:ep(e.y)};if(!n)return!1;p===ip?(s?a.splice(i,0,d):a[i]=d,u.bendpointMove={insert:s,bendpointIndex:i},a=this.cropWaypoints(r,a),o.updateWaypoints(r,function(e){e=e.slice();for(var t,n,i,r=0;e[r];)t=e[r],n=e[r-1],0===Dt(t,i=e[r+1])||Rt(n,i,t)?e.splice(r,1):r++;return e}(a),u)):(p===tp?(u.docking="source",op(t)&&(u.docking="target",u.newWaypoints=a.reverse())):p===np&&(u.docking="target",op(t)&&(u.docking="source",u.newWaypoints=a.reverse())),o.reconnect(r,l,c,d,u))}),this)}function op(e){var t=e.hover,n=e.source,i=e.target,r=e.type;return r===tp?t&&i&&t===i&&n!==i:r===np?t&&n&&t===n&&n!==i:void 0}rp.$inject=["injector","eventBus","canvas","dragging","rules","modeling"],rp.prototype.cropWaypoints=function(e,t){var n=this._injector.get("connectionDocking",!1);if(!n)return t;var i=e.waypoints;return e.waypoints=t,e.waypoints=n.getCroppedWaypoints(e),t=e.waypoints,e.waypoints=i,t};var sp="updateWaypoints",ap="connect-ok",lp="connect-not-ok",cp="connect-hover",pp="djs-updating",up="djs-dragging";function dp(e,t,n,i){this._injector=t;var r=t.get("connectionPreview",!1);n.on("bendpoint.move.start",(function(e){var t=e.context,n=t.bendpointIndex,r=t.connection,o=t.insert,s=r.waypoints,a=s.slice();t.waypoints=s,o&&a.splice(n,0,{x:e.x,y:e.y}),r.waypoints=a,Me(t.draggerGfx=Qc(i.getLayer("overlays"))).add("djs-dragging"),i.addMarker(r,up),i.addMarker(r,pp)})),n.on("bendpoint.move.hover",(function(e){var t=e.context,n=t.allowed,r=t.hover,o=t.type;if(r){if(i.addMarker(r,cp),o===sp)return;n?(i.removeMarker(r,lp),i.addMarker(r,ap)):!1===n&&(i.removeMarker(r,ap),i.addMarker(r,lp))}})),n.on(["bendpoint.move.out","bendpoint.move.cleanup"],1100,(function(e){var t=e.context,n=t.hover,r=t.target;n&&(i.removeMarker(n,cp),i.removeMarker(n,r?ap:lp))})),n.on("bendpoint.move.move",(function(t){var n=t.context,i=n.allowed,o=n.bendpointIndex,s=n.draggerGfx,a=n.hover,l=n.type,c=n.connection,p=c.source,u=c.target,d=c.waypoints.slice(),h={x:t.x,y:t.y},f=n.hints||{},m={};r&&(f.connectionStart&&(m.connectionStart=f.connectionStart),f.connectionEnd&&(m.connectionEnd=f.connectionEnd),"reconnectStart"===l?op(n)?(m.connectionEnd=m.connectionEnd||h,m.source=u,m.target=a||p,d=d.reverse()):(m.connectionStart=m.connectionStart||h,m.source=a||p,m.target=u):"reconnectEnd"===l?op(n)?(m.connectionStart=m.connectionStart||h,m.source=a||u,m.target=p,d=d.reverse()):(m.connectionEnd=m.connectionEnd||h,m.source=p,m.target=a||u):(m.noCropping=!0,m.noLayout=!0,d[o]=h),l===sp&&(d=e.cropWaypoints(c,d)),m.waypoints=d,r.drawPreview(n,i,m)),ii(s,t.x,t.y)}),this),n.on(["bendpoint.move.end","bendpoint.move.cancel"],1100,(function(e){var t=e.context,n=t.connection,o=t.draggerGfx,s=t.hover,a=t.target,l=t.waypoints;n.waypoints=l,Ke(o),i.removeMarker(n,pp),i.removeMarker(n,up),s&&(i.removeMarker(s,ap),i.removeMarker(s,a?ap:lp)),r&&r.cleanUp(t)}))}dp.$inject=["bendpointMove","injector","eventBus","canvas"];var hp="connect-hover",fp="djs-updating";function mp(e,t,n){return gp(e,t,e[t]+n)}function gp(e,t,n){return{x:"x"===t?n:e.x,y:"y"===t?n:e.y}}function yp(e){return"x"===e?"y":"x"}function vp(e,t,n){var i,r;return e.original?e.original:(i=On(t),gp(e,r=yp(n),i[r]))}function bp(e,t,n,i,r,o){var s=e.get("connectionDocking",!1);function a(e,t){if(!s)return t;var n,i=e.waypoints;return e.waypoints=t,n=s.getCroppedWaypoints(e),e.waypoints=i,n}function l(e){r.update("connection",e.connection,e.connectionGfx)}function c(e,t,n){var i=e.newWaypoints,r=function(e,t,n,i){var r=Math.max(t[i],n[i]),o=Math.min(t[i],n[i]);return gp(t,i,Math.min(Math.max(o+20,e[i]),r-20))}(n,i[e.segmentStartIndex+t],i[e.segmentEndIndex+t],yp(e.axis));ii(e.draggerGfx,r.x,r.y)}this.start=function(e,t,r){var o,s,a,l,c=n.getGraphics(t),p=r-1,u=r,d=t.waypoints,h=d[p],f=d[u],m=Gc(n,d,e);(s=Nt(h,f))&&(a="v"===s?"x":"y",0===p&&(h=vp(h,t.source,a)),u===d.length-1&&(f=vp(f,t.target,a)),o={connection:t,segmentStartIndex:p,segmentEndIndex:u,segmentStart:h,segmentEnd:f,axis:a,dragPosition:l=m?m.point:{x:(h.x+f.x)/2,y:(h.y+f.y)/2}},i.init(e,l,"connectionSegment.move",{cursor:"x"===a?"resize-ew":"resize-ns",data:{connection:t,connectionGfx:c,context:o}}))},t.on("connectionSegment.move.start",(function(e){var t=e.context,i=e.connection,r=n.getLayer("overlays");t.originalWaypoints=i.waypoints.slice(),t.draggerGfx=Kc(r,t.segmentStart,t.segmentEnd),Me(t.draggerGfx).add("djs-dragging"),n.addMarker(i,fp)})),t.on("connectionSegment.move.move",(function(e){var t,n,i=e.context,r=i.connection,o=i.segmentStartIndex,s=i.segmentEndIndex,p=i.segmentStart,u=i.segmentEnd,d=i.axis,h=i.originalWaypoints.slice(),f=mp(p,d,e["d"+d]),m=mp(u,d,e["d"+d]),g=h.length,y=0;h[o]=f,h[s]=m,o<2&&(t=Pn(r.source,f),1===o?"intersect"===t&&(h.shift(),h[0]=f,y--):"intersect"!==t&&(h.unshift(p),y++)),s>g-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<e.childNodes.length;i++)n._cloneMarkers(e.childNodes[i],t);(function(e){return-1!==zp.indexOf(e.nodeName)})(e)&&qp.forEach((function(i){if(Te(e,i)){var r=function(e,t,n){var i=(r=Te(e,t),r.match(/url\(['"]?#([^'"]*)['"]?\)/)[1]);var r;return we("marker#"+i,n||document)}(e,i,n._canvas.getContainer());n._cloneMarker(e,r,i,t)}}))},Fp.prototype._cloneMarker=function(e,t,n,i="djs-dragger"){var r=t.id+"-"+i,o=this._clonedMarkers[r];if(!o){var s=r+"-clone";(o=Ne(t)).id=s,Me(o).add(i),this._clonedMarkers[r]=o;var a=we("defs",this._canvas._svg);a||(a=Le("defs"),ke(this._canvas._svg,a)),ke(a,o)}var l=function(e){return"url(#"+e+")"}(this._clonedMarkers[r].id);Te(e,n,l)};const Vp={__init__:["previewSupport"],previewSupport:["type",Fp]},Hp="complex-preview";class Up{constructor(e,t,n){this._canvas=e,this._graphicsFactory=t,this._previewSupport=n,this._markers=[]}create(e){this.cleanUp();const{created:t=[],moved:n=[],removed:i=[],resized:r=[]}=e,o=this._canvas.getLayer(Hp);t.filter((e=>!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<t.length-1;f++){if(id(n=t[f],i=t[f+1])?a=[n]:(r=Ju(e,n),o=Ju(e,i),a=ed(n,i,e,Xu(r,o))),a.length<1)throw new Error("expected between [1, 2] circle -> 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<a?a:r+o:r}if(i.bendpointMove){var l,c=i.bendpointMove.insert,p=i.bendpointMove.bendpointIndex;return 0===o?r:(r>=p&&(l=c?r+1:r-1),r<p&&(l=r,c&&"bendpoint"!==n.type&&p-1===r&&od(t,p)<n.relativeLocation&&l++),l)}return 0===o?r:i.connectionStart&&0===r?0:i.connectionEnd&&r===e.length-2?t.length-2:Math.floor((t.length-2)/2)}(n,t,a,i);if(c<0||c>t.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!==_&&_<n.length-1&&(b=od(n,_))}var P,k,S={x:(y[1].x-y[0].x)*b+y[0].x,y:(y[1].y-y[0].y)*b+y[0].y},C=(P={x:e.x-v.x,y:e.y-v.y},(k=x)?{x:Math.cos(k)*P.x-Math.sin(k)*P.y,y:Math.sin(k)*P.x+Math.cos(k)*P.y}:P);return r=S.x+C.x-e.x,o=S.y+C.y-e.y,{point:xn(S),delta:xn({x:r,y:o})}}function od(e,t){var n=Hc(e[t-1],e[t]);return n/(n+Hc(e[t],e[t+1]))}function sd(e,t){return[e[t],e[t+1]]}function ad(e,t,n){var i=na(t),r=na(n),o=ia(e,i),s=o.x*(n.width/t.width),a=o.y*(n.height/t.height);return xn({x:r.x+s,y:r.y+a})}function ld(e,t,n){var i=na(e),r=na(t),o=na(n),s=ia(e,i),a=ia(i,r),l=function(e,t,n){var i=wn(t),r=wn(n);if(function(e,t){return function(e,t){return e.right!==t.right&&e.left!==t.left}(e,t)||function(e,t){return e.top!==t.top&&e.bottom!==t.bottom}(e,t)}(i,r))return null;var o,s,a,l=Pn(t,e);if("top"===l)o={x:0,y:r.bottom-i.bottom};else if("bottom"===l)o={x:0,y:r.top-i.top};else if("right"===l)o={x:r.left-i.left,y:0};else{if("left"!==l)return null;o={x:r.right-i.right,y:0}}if(s={x:e.x+o.x,y:e.y+o.y},a=Pn(n,s),a!==l)return null;return o}(i,t,n);if(l)return l;var c=a.x*(n.width/t.width),p=a.y*(n.height/t.height),u=o.x+c,d=o.y+p;return xn({x:u+s.x-e.x,y:d+s.y-e.y})}var cd="name",pd="text";function ud(e,t,n,i){function r(e){var n=e.context,r=n.element,o=n.properties;if(cd in o&&t.updateLabel(r,o[cd]),pd in o&&Tr(r,"bpmn:TextAnnotation")){var s=i.getTextAnnotationBounds({x:r.x,y:r.y,width:r.width,height:r.height},o[pd]||"");t.updateLabel(r,o.text,s)}}function o(e){var t=e.context,n=t.connection,i=n.label,r=z({},t.hints),o=t.newWaypoints||n.waypoints,s=t.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(On(e),t,n,i).delta}(i,o,s,r)}hs.call(this,e),this.postExecute("element.updateProperties",r),this.postExecute("element.updateModdleProperties",(e=>{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.top<a.top-10&&(r=!1),n&&qd(a.top-i.bottom)<10&&Ud(l,"top",i.top+u.height),qd(a.top-i.top)<5&&Hd(c,"top",i.bottom-u.height)),/e/.test(t)&&(!p&&i.right>a.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<a.left-10&&(r=!1),n&&qd(a.left-i.right)<10&&Ud(l,"left",i.left+u.width),qd(a.left-i.left)<5&&Hd(c,"left",i.right-u.width))}));var d=i.children.filter((function(e){return!e.hidden&&!e.waypoints&&(Tr(e,"bpmn:FlowElement")||Tr(e,"bpmn:Artifact"))})),h=p?Wd:Gd;return d.forEach((function(e){var n=wn(e);r&&/n/.test(t)&&Hd(c,"top",n.top-h.top),o&&/e/.test(t)&&Ud(c,"right",n.right+h.right),o&&/s/.test(t)&&Ud(c,"bottom",n.bottom+h.bottom),r&&/w/.test(t)&&Hd(c,"left",n.left-h.left)})),{min:c,max:l}}(n,i,r)),Tr(n,"bpmn:SubProcess")&&Xr(n)&&(t.minDimensions=Id),Tr(n,"bpmn:TextAnnotation")&&(t.minDimensions=Ld)}))}Bd.$inject=["eventBus"];var qd=Math.abs,zd=Math.min,Fd=Math.max;function Vd(e,t,n,i){var r=e[t];e[t]=void 0===r?n:i(n,r)}function Hd(e,t,n){return Vd(e,t,n,zd)}function Ud(e,t,n){return Vd(e,t,n,Fd)}var Wd={top:20,left:50,right:20,bottom:20},Gd={top:50,left:20,right:20,bottom:20};function Qd(e,t){e.on("resize.start",1501,(function(e){var t=e.context,n=t.shape;(Tr(n,"bpmn:Lane")||Tr(n,"bpmn:Participant"))&&(t.balanced=!Vo(e))})),e.on("resize.end",1001,(function(e){var n=e.context,i=n.shape,r=n.canExecute,o=n.newBounds;if(Tr(i,"bpmn:Lane")||Tr(i,"bpmn:Participant"))return r&&(o=bn(o),t.resizeLane(i,o,n.balanced)),!1}))}Qd.$inject=["eventBus","modeling"];function Xd(e,t,n,i,r){function o(e){return Ar(e,["bpmn:ReceiveTask","bpmn:SendTask"])||function(e,t){h(t)||(t=[t]);return k(t,(function(t){return Zr(e,t)}))}(e,["bpmn:ErrorEventDefinition","bpmn:EscalationEventDefinition","bpmn:MessageEventDefinition","bpmn:SignalEventDefinition"])}function s(t){return!!b(e.getDefinitions().get("rootElements"),N({id:t.id}))}function a(e){return Tr(e,"bpmn:ErrorEventDefinition")?"errorRef":Tr(e,"bpmn:EscalationEventDefinition")?"escalationRef":Tr(e,"bpmn:MessageEventDefinition")?"messageRef":Tr(e,"bpmn:SignalEventDefinition")?"signalRef":void 0}function l(e){if(Ar(e,["bpmn:ReceiveTask","bpmn:SendTask"]))return e.get("messageRef");var t=e.get("eventDefinitions")[0];return t.get(a(t))}n.invoke(hs,this),this.executed(["shape.create","element.updateProperties","element.updateModdleProperties"],(function(t){var n=t.shape||t.element;if(o(n)){var i=l(Mr(n));i&&!s(i)&&(At(e.getDefinitions().get("rootElements"),i),t.addedRootElement=i)}}),!0),this.reverted(["shape.create","element.updateProperties","element.updateModdleProperties"],(function(t){var n=t.addedRootElement;n&&Tt(e.getDefinitions().get("rootElements"),n)}),!0),t.on("copyPaste.copyElement",(function(e){var t=e.descriptor,n=e.element;if(!n.labelTarget&&o(n)){var i=l(Mr(n));i&&(t.referencedRootElement=i)}})),t.on("copyPaste.pasteElement",500,(function(e){var t=e.descriptor,n=t.businessObject,o=t.referencedRootElement;o&&(s(o)||(o=i.copyElement(o,r.create(o.$type))),function(e,t){if(Ar(e,["bpmn:ReceiveTask","bpmn:SendTask"]))return e.set("messageRef",t);var n=e.get("eventDefinitions")[0];n.set(a(n),t)}(n,o),delete t.referencedRootElement)}))}Xd.$inject=["bpmnjs","eventBus","injector","moddleCopy","bpmnFactory"],i(Xd,hs);var Kd=Math.max;function Yd(e){e.on("spaceTool.getMinDimensions",(function(e){var t=e.shapes,n=e.axis,i=e.start,r={};return _(t,(function(e){var t=e.id;Tr(e,"bpmn:Participant")&&(r[t]=function(e,t,n){var i=Kr(e);if(r=e,!Au(r).length)return i?$d:jd;var r;var o=function(e){return"x"===e}(t),s={};s=o?i?$d:{width:Jd(e,n,o),height:jd.height}:i?{width:$d.width,height:Zd(e,n,o)}:jd;return s}(e,n,i)),Tr(e,"bpmn:Lane")&&(r[t]=Kr(e)?Rd:Nd),Tr(e,"bpmn:SubProcess")&&Xr(e)&&(r[t]=Id),Tr(e,"bpmn:TextAnnotation")&&(r[t]=Ld),Tr(e,"bpmn:Group")&&(r[t]=Dd)})),r}))}function Zd(e,t,n){var i;return i=function(e,t,n){var i,r=Au(e);return i=eh(r,t,n),e.height-i.height+Rd.height}(e,t,n),Kd($d.height,i)}function Jd(e,t,n){var i;return i=function(e,t,n){var i,r=Au(e);return i=eh(r,t,n),e.width-i.width+Nd.width}(e,t,n),Kd(jd.width,i)}function eh(e,t,n){var i,r,o;for(i=0;i<e.length;i++)if(r=e[i],!n&&t>=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<r(t).level}));return-1!==s&&-1!==o&&o<s&&(s-=1),{index:s,parent:n}}}Xh.prototype.getOrdering=function(e,t){return null},i(Xh,hs),Kh.$inject=["eventBus","canvas","translate"],i(Kh,Xh);const Yh={__depends__:[Ao],__init__:["bpmnOrderingProvider"],bpmnOrderingProvider:["type",Kh]};function Zh(){}Zh.prototype.get=function(){return this._data},Zh.prototype.set=function(e){this._data=e},Zh.prototype.clear=function(){var e=this._data;return delete this._data,e},Zh.prototype.isEmpty=function(){return!this._data};const Jh={clipboard:["type",Zh]};var ef="drop-ok",tf="drop-not-ok",nf="attach-ok",rf="new-parent",of="create";function sf(e,t,n,i,r){function o(t,n){[nf,ef,tf,rf].forEach((function(i){i===n?e.addMarker(t,i):e.removeMarker(t,i)}))}function s(){var e=t.context();e&&e.prefix===of&&t.cancel()}n.on(["create.move","create.hover"],(function(e){var t=e.context,n=t.elements,i=e.hover,s=t.source,a=t.hints||{};if(!i)return t.canExecute=!1,void(t.target=null);af(e);var l={x:e.x,y:e.y},c=t.canExecute=i&&function(e,t,n,i,o){if(!t)return!1;var s=b(e=w(e,(function(t){var n=t.labelTarget;return!(t.parent||vn(t)&&-1!==e.indexOf(n))})),(function(e){return!yn(e)})),a=!1,l=!1,c=!1;lf(e)&&(a=r.allowed("shape.attach",{position:n,shape:s,target:t})),a||(c=lf(e)?r.allowed("shape.create",{position:n,shape:s,source:i,target:t}):r.allowed("elements.create",{elements:e,position:n,target:t}));var p=o.connectionTarget;return c||a?(s&&i&&(l=r.allowed("connection.create",{source:p===i?s:i,target:p===i?i:s,hints:{targetParent:t,targetAttach:a}})),{attach:a,connect:l}):(null===c||null===a)&&null}(n,i,l,s,a);i&&null!==c&&(t.target=i,c&&c.attach?o(i,nf):o(i,c?rf:tf))})),n.on(["create.end","create.out","create.cleanup"],(function(e){var t=e.hover;t&&o(t,null)})),n.on("create.end",(function(e){var t=e.context,n=t.source,r=t.shape,o=t.elements,s=t.target,a=t.canExecute,l=a&&a.attach,c=a&&a.connect,p=t.hints||{};if(!1===a||!s)return!1;af(e);var u={x:e.x,y:e.y};r=c?i.appendShape(n,r,u,s,{attach:l,connection:!0===c?{}:c,connectionTarget:p.connectionTarget}):b(o=i.createElements(o,u,s,z({},p,{attach:l})),(function(e){return!yn(e)})),z(t,{elements:o,shape:r}),z(e,{elements:o,shape:r})})),n.on("create.init",(function(){n.on("elements.changed",s),n.once(["create.cancel","create.end"],2e3,(function(){n.off("elements.changed",s)}))})),this.start=function(e,n,i){h(n)||(n=[n]);var r=b(n,(function(e){return!yn(e)}));if(r){i=z({elements:n,hints:{},shape:r},i||{}),_(n,(function(e){m(e.x)||(e.x=0),m(e.y)||(e.y=0)}));var o=Et(w(n,(function(e){return!e.hidden})));_(n,(function(e){yn(e)&&(e.waypoints=S(e.waypoints,(function(e){return{x:e.x-o.x-o.width/2,y:e.y-o.y-o.height/2}}))),z(e,{x:e.x-o.x-o.width/2,y:e.y-o.y-o.height/2})})),t.init(e,of,{cursor:"grabbing",autoActivate:!0,data:{shape:r,elements:n,context:i}})}}}function af(e){var t=e.context.createConstraints;t&&(t.left&&(e.x=Math.max(e.x,t.left)),t.right&&(e.x=Math.min(e.x,t.right)),t.top&&(e.y=Math.max(e.y,t.top)),t.bottom&&(e.y=Math.min(e.y,t.bottom)))}function lf(e){return e&&1===e.length&&!yn(e[0])}sf.$inject=["canvas","dragging","eventBus","modeling","rules"];function cf(e,t,n,i,r){t.on("create.move",750,(function(t){var o=t.hover,s=t.context,a=s.elements,l=s.dragGroup;l||(l=s.dragGroup=function(e){var t=Le("g");Te(t,r.cls("djs-drag-group",["no-events"]));var o=Le("g");return e.forEach((function(e){var r;e.hidden||(e.waypoints?(r=n._createContainer("connection",o),n.drawConnection(ti(r),e)):(r=n._createContainer("shape",o),n.drawShape(ti(r),e),ii(r,e.x,e.y)),i.addDragger(e,t,r))})),t}(a)),o?(l.parentNode||ke(e.getActiveLayer(),l),ii(l,t.x,t.y)):Ke(l)})),t.on("create.cleanup",(function(e){var t=e.context.dragGroup;t&&Ke(t)}))}cf.$inject=["canvas","eventBus","graphicsFactory","previewSupport","styles"];const pf={__depends__:[Mc,Vp,jc,is],__init__:["create","createPreview"],create:["type",sf],createPreview:["type",cf]};function uf(e){var t=this;function n(e){t._lastMoveEvent=e}this._lastMoveEvent=null,e.on("canvas.init",(function(e){(t._svg=e.svg).addEventListener("mousemove",n)})),e.on("canvas.destroy",(function(){t._lastMouseEvent=null,t._svg.removeEventListener("mousemove",n)}))}uf.$inject=["eventBus"],uf.prototype.getLastMoveEvent=function(){return this._lastMoveEvent||function(e,t){var n=document.createEvent("MouseEvent"),i=e,r=t,o=e,s=t;n.initMouseEvent&&n.initMouseEvent("mousemove",!0,!0,window,0,i,r,o,s,!1,!1,!1,!1,0,null);return n}(0,0)};const df={__init__:["mouse"],mouse:["type",uf]};function hf(e,t,n,i,r,o,s,a){this._canvas=e,this._create=t,this._clipboard=n,this._elementFactory=i,this._eventBus=r,this._modeling=o,this._mouse=s,this._rules=a,r.on("copyPaste.copyElement",(function(e){var t=e.descriptor,n=e.element,i=e.elements;t.priority=1,t.id=n.id,b(i,(function(e){return e===n.parent}))&&(t.parent=n.parent.id),function(e){return!!e.host}(n)&&(t.priority=2,t.host=n.host.id),yn(n)&&(t.priority=3,t.source=n.source.id,t.target=n.target.id,t.waypoints=function(e){return S(e.waypoints,(function(e){return(e=ff(e)).original&&(e.original=ff(e.original)),e}))}(n)),vn(n)&&(t.priority=4,t.labelTarget=n.labelTarget.id),_(["x","y","width","height"],(function(e){m(n[e])&&(t[e]=n[e])})),t.hidden=n.hidden,t.collapsed=n.collapsed})),r.on("copyPaste.pasteElements",(function(e){z(e.hints,{createElementsBehavior:!1})}))}function ff(e){return z({},e)}function mf(e,t){var n=t.indexOf(e);return-1===n?t:t.splice(n,1)}hf.$inject=["canvas","create","clipboard","elementFactory","eventBus","modeling","mouse","rules"],hf.prototype.copy=function(e){var t,n;return h(e)||(e=e?[e]:[]),n=!1===(t=this._eventBus.fire("copyPaste.canCopyElements",{elements:e}))?{}:this.createTree(h(t)?t:e),this._clipboard.set(n),this._eventBus.fire("copyPaste.elementsCopied",{elements:e,tree:n}),n},hf.prototype.paste=function(e){var t=this._clipboard.get();if(!this._clipboard.isEmpty()){var n=e&&e.hints||{};this._eventBus.fire("copyPaste.pasteElements",{hints:n});var i=this._createElements(t);if(e&&e.element&&e.point)return this._paste(i,e.element,e.point,n);this._create.start(this._mouse.getLastMoveEvent(),i,{hints:n||{}})}},hf.prototype._paste=function(e,t,n,i){_(e,(function(e){m(e.x)||(e.x=0),m(e.y)||(e.y=0)}));var r=Et(e);return _(e,(function(e){yn(e)&&(e.waypoints=S(e.waypoints,(function(e){return{x:e.x-r.x-r.width/2,y:e.y-r.y-r.height/2}}))),z(e,{x:e.x-r.x-r.width/2,y:e.y-r.y-r.height/2})})),this._modeling.createElements(e,n,t,z({},i))},hf.prototype._createElements=function(e){var t=this,n=this._eventBus,i={},r=[];return _(e,(function(e,o){o=parseInt(o,10),_(e=R(e,"priority"),(function(e){var o,s=z({},H(e,["priority"]));return i[e.parent]?s.parent=i[e.parent]:delete s.parent,n.fire("copyPaste.pasteElement",{cache:i,descriptor:s}),yn(s)?(s.source=i[e.source],s.target=i[e.target],o=i[e.id]=t.createConnection(s),void r.push(o)):vn(s)?(s.labelTarget=i[s.labelTarget],o=i[e.id]=t.createLabel(s),void r.push(o)):(s.host&&(s.host=i[s.host]),o=i[e.id]=t.createShape(s),void r.push(o))}))})),r},hf.prototype.createConnection=function(e){return this._elementFactory.createConnection(H(e,["id"]))},hf.prototype.createLabel=function(e){return this._elementFactory.createLabel(H(e,["id"]))},hf.prototype.createShape=function(e){return this._elementFactory.createShape(H(e,["id"]))},hf.prototype.hasRelations=function(e,t){var n,i;return!(yn(e)&&(n=b(t,N({id:e.source.id})),i=b(t,N({id:e.target.id})),!n||!i))&&!(vn(e)&&!b(t,N({id:e.labelTarget.id})))},hf.prototype.createTree=function(e){var t=this._rules,n=this,i={},r=[];function o(e,t){var n=b(r,(function(t){return e===t.element}));n?n.depth<t&&(r=function(e,t){var n=t.indexOf(e);-1!==n&&t.splice(n,1);return t}(n,r),r.push({element:n.element,depth:t})):r.push({element:e,depth:t})}return xt(yt(e),(function(e,t,i){if(!vn(e)){_(e.labels,(function(e){o(e,i)})),_([e.attachers,e.incoming,e.outgoing],(function(e){e&&e.length&&_(e,(function(e){_(e.labels,(function(e){o(e,i)})),o(e,i)}))})),o(e,i);var r=[];return e.children&&(r=e.children.slice()),n._eventBus.fire("copyPaste.createTree",{element:e,children:r}),r}})),e=S(r,(function(e){return e.element})),r=S(r,(function(t){return t.descriptor={},n._eventBus.fire("copyPaste.copyElement",{descriptor:t.descriptor,element:t.element,elements:e}),t})),r=R(r,(function(e){return e.descriptor.priority})),e=S(r,(function(e){return e.element})),_(r,(function(r){var o=r.depth;n.hasRelations(r.element,e)?!function(e,n){return t.allowed("element.copy",{element:e,elements:n})}(r.element,e)?mf(r.element,e):(i[o]||(i[o]=[]),i[o].push(r.descriptor)):mf(r.element,e)})),i};const gf={__depends__:[Jh,pf,df,jc],__init__:["copyPaste"],copyPaste:["type",hf]};function yf(e,t,n){h(n)||(n=[n]),_(n,(function(n){p(e[n])||(t[n]=e[n])}))}function vf(e,t,n){function i(t,i){var r=e.create(t.$type);return n.copyElement(t,r,null,i)}t.on("copyPaste.copyElement",750,(function(e){var t=e.descriptor,n=e.element,r=Mr(n);if(vn(n))return t;var o=t.businessObject=i(r,!0),s=t.di=i(Dr(n),!0);s.bpmnElement=o,yf(o,t,"name"),yf(s,t,"isExpanded"),r.default&&(t.default=r.default.id)}));var r="-bpmn-js-refs";t.on("copyPaste.pasteElement",(function(e){var t=e.cache,n=e.descriptor,r=n.businessObject,o=n.di;if(vn(n))return n.businessObject=Mr(t[n.labelTarget]),void(n.di=Dr(t[n.labelTarget]));r=n.businessObject=i(r),(o=n.di=i(o)).bpmnElement=r,yf(n,r,["isExpanded","name"]),n.type=r.$type})),t.on("copyPaste.copyElement",750,(function(e){var t=e.descriptor,n=e.element;if(Tr(n,"bpmn:Participant")){var r=Mr(n);r.processRef&&(t.processRef=i(r.processRef,!0))}})),t.on("copyPaste.pasteElement",(function(e){var t=e.descriptor,n=t.processRef;n&&(t.processRef=i(n))})),t.on("copyPaste.pasteElement",750,(function(e){var t=e.cache;!function(e,t){e[r]=t}(t,function(e,t,n){var i=Mr(e);return e.default&&(n[e.default]={element:i,property:"default"}),e.host&&(Mr(e).attachedToRef=Mr(t[e.host])),H(n,O(n,(function(t,n,r){var o=n.element,s=n.property;return r===e.id&&(o.set(s,i),t.push(e.id)),t}),[]))}(e.descriptor,t,function(e){return e[r]=e[r]||{}}(t)))}))}vf.$inject=["bpmnFactory","eventBus","moddleCopy"];var bf=["artifacts","dataInputAssociations","dataOutputAssociations","default","flowElements","lanes","incoming","outgoing","categoryValue"];function xf(e,t,n){this._bpmnFactory=t,this._eventBus=e,this._moddle=n,e.on("moddleCopy.canCopyProperties",(function(e){var t=e.propertyNames;if(t&&t.length)return R(t,(function(e){return"extensionElements"===e}))})),e.on("moddleCopy.canCopyProperty",(function(e){var t=e.parent,n=f(t)&&t.$descriptor,i=e.propertyName;return(!i||-1===bf.indexOf(i))&&(!(i&&n&&!b(n.properties,N({name:i})))&&void 0)})),e.on("moddleCopy.canSetCopiedProperty",(function(e){var t,n,i=e.property;if(n="bpmn:ExtensionElements",(t=i)&&g(t.$instanceOf)&&t.$instanceOf(n)&&(!i.values||!i.values.length))return!1}))}function wf(e,t){return O(e.properties,(function(e,n){return t&&n.default?e:e.concat(n.name)}),[])}xf.$inject=["eventBus","bpmnFactory","moddle"],xf.prototype.copyElement=function(e,t,n,i=!1){var r=this;n&&!h(n)&&(n=[n]),n=n||wf(e.$descriptor);var o=this._eventBus.fire("moddleCopy.canCopyProperties",{propertyNames:n,sourceElement:e,targetElement:t,clone:i});return!1===o||(h(o)&&(n=o),_(n,(function(n){var o;v(e,n)&&(o=e.get(n));var s=r.copyProperty(o,t,n,i);u(s)&&(!1!==r._eventBus.fire("moddleCopy.canSetCopiedProperty",{parent:t,property:s,propertyName:n})&&t.set(n,s))}))),t},xf.prototype.copyProperty=function(e,t,n,i=!1){var r=this,o=this._eventBus.fire("moddleCopy.canCopyProperty",{parent:t,property:e,propertyName:n,clone:i});if(!1!==o){if(o)return f(o)&&o.$type&&!o.$parent&&(o.$parent=t),o;var s=this._moddle.getPropertyDescriptor(t,n);if(!s.isReference){if(s.isId)return e&&this._copyId(e,t,i);if(h(e))return O(e,(function(e,s){return(o=r.copyProperty(s,t,n,i))?e.concat(o):e}),[]);if(f(e)&&e.$type){if(this._moddle.getElementDescriptor(e).isGeneric)return;return(o=r._bpmnFactory.create(e.$type)).$parent=t,o=r.copyElement(e,o,null,i)}return e}}},xf.prototype._copyId=function(e,t,n=!1){return n?e:this._moddle.ids.assigned(e)?void 0:(this._moddle.ids.claim(e,t),e)};const _f={__depends__:[gf],__init__:["bpmnCopyPaste","moddleCopy"],bpmnCopyPaste:["type",vf],moddleCopy:["type",xf]};var Ef=Math.round;function Of(e,t){this._modeling=e,this._eventBus=t}function Pf(e,t){t.on("replace.end",500,(function(t){const{newElement:n,hints:i={}}=t;!1!==i.select&&e.select(n)}))}Of.$inject=["modeling","eventBus"],Of.prototype.replaceElement=function(e,t,n){if(e.waypoints)return null;var i=this._modeling,r=this._eventBus;r.fire("replace.start",{element:e,attrs:t,hints:n});var o=t.width||e.width,s=t.height||e.height,a=t.x||e.x,l=t.y||e.y,c=Ef(a+o/2),p=Ef(l+s/2),u=i.replaceShape(e,z({},t,{x:c,y:p,width:o,height:s}),n);return r.fire("replace.end",{element:e,newElement:u,hints:n}),u},Pf.$inject=["selection","eventBus"];const kf={__init__:["replace","replaceSelectionBehavior"],replaceSelectionBehavior:["type",Pf],replace:["type",Of]};var Sf=["cancelActivity","instantiate","eventGatewayType","triggeredByEvent","isInterrupting"];function Cf(e,t,n,i,r,o){this.replaceElement=function(s,a,l){l=l||{};var c=a.type,u=s.businessObject;if(Tf(u)&&"bpmn:SubProcess"===c&&function(e,t){var n=e&&v(e,"collapsed")?e.collapsed:!Xr(e);return n!==(t&&(v(t,"collapsed")||v(t,"isExpanded"))?v(t,"collapsed")?t.collapsed:!t.isExpanded:n)}(s,a))return i.toggleCollapse(s),s;var d=e.create(c),f={type:c,businessObject:d,di:{}};"bpmn:ExclusiveGateway"===c&&(f.di.isMarkerVisible=!0),function(e,t,n){h(n)||(n=[n]),_(n,(function(n){p(e[n])||(t[n]=e[n])}))}(s.di,f.di,["fill","stroke","background-color","border-color","color"]);var m=function(e,t){return e.filter((function(e){return t.includes(e)}))}(wf(u.$descriptor),wf(d.$descriptor,!0));z(d,V(a,Sf));var g=w(m,(function(e){return"eventDefinitions"===e?Af(s,a.eventDefinitionType):"loopCharacteristics"===e?!Yr(d):!v(d,e)&&(("processRef"!==e||!1!==a.isExpanded)&&("triggeredByEvent"!==e&&("isForCompensation"!==e||!Yr(d))))}));if(d=n.copyElement(u,d,g),a.eventDefinitionType&&(Af(d,a.eventDefinitionType)||(f.eventDefinitionType=a.eventDefinitionType,f.eventDefinitionAttrs=a.eventDefinitionAttrs)),Tr(u,"bpmn:Activity")){if(Tf(u))f.isExpanded=Xr(s);else if(a&&v(a,"isExpanded")){f.isExpanded=a.isExpanded;var y=t.getDefaultSize(d,{isExpanded:f.isExpanded});f.width=y.width,f.height=y.height,f.x=s.x-(f.width-s.width)/2,f.y=s.y-(f.height-s.height)/2}Xr(s)&&!Tr(u,"bpmn:Task")&&f.isExpanded&&(f.width=s.width,f.height=s.height)}return Tf(u)&&!Tf(d)&&(l.moveChildren=!1),Tr(u,"bpmn:Participant")&&(!0===a.isExpanded?d.processRef=e.create("bpmn:Process"):l.moveChildren=!1,f.width=s.width,f.height=t.getDefaultSize(f).height),o.allowed("shape.resize",{shape:d})||(f.height=t.getDefaultSize(f).height,f.width=t.getDefaultSize(f).width),d.name=u.name,Ar(u,["bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:Activity"])&&Ar(d,["bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:Activity"])&&(d.default=u.default),a.host&&!Tr(u,"bpmn:BoundaryEvent")&&Tr(d,"bpmn:BoundaryEvent")&&(f.host=a.host),"bpmn:DataStoreReference"!==f.type&&"bpmn:DataObjectReference"!==f.type||(f.x=s.x+(s.width-f.width)/2),r.replaceElement(s,f,{...l,targetElement:a})}}function Tf(e){return Tr(e,"bpmn:SubProcess")}function Af(e,t){var n=Mr(e);return t&&n.get("eventDefinitions").some((function(e){return Tr(e,t)}))}Cf.$inject=["bpmnFactory","elementFactory","moddleCopy","modeling","replace","rules"];const Mf={__depends__:[_f,kf,is],bpmnReplace:["type",Cf]};function Df(e,t){this._eventBus=e,this._dragging=t,this._tools=[],this._active=null}Df.$inject=["eventBus","dragging"],Df.prototype.registerTool=function(e,t){var n=this._tools;if(!t)throw new Error('A tool has to be registered with it\'s "events"');n.push(e),this.bindEvents(e,t)},Df.prototype.isActive=function(e){return e&&this._active===e},Df.prototype.length=function(e){return this._tools.length},Df.prototype.setActive=function(e){var t=this._eventBus;this._active!==e&&(this._active=e,t.fire("tool-manager.update",{tool:e}))},Df.prototype.bindEvents=function(e,t){var n=this._eventBus,i=this._dragging,r=[];n.on(t.tool+".init",(function(t){if(!t.context.reactivate&&this.isActive(e))return this.setActive(null),void i.cancel();this.setActive(e)}),this),_(t,(function(e){r.push(e+".ended"),r.push(e+".canceled")})),n.on(r,250,(function(e){this._active&&(function(e){var t=e.originalEvent&&e.originalEvent.target;return t&&re(t,'.group[data-group="tools"]')}(e)||this.setActive(null))}),this)};const Rf={__depends__:[Mc],__init__:["toolManager"],toolManager:["type",Df]};function Nf(e,t){return-1!==e.indexOf(t)}var $f=Math.abs,jf=Math.round,If={x:"width",y:"height"},Lf="crosshair",Bf={n:"top",w:"left",s:"bottom",e:"right"},qf={n:"s",w:"e",s:"n",e:"w"};function zf(e,t,n,i,r,o,s){this._canvas=e,this._dragging=t,this._eventBus=n,this._modeling=i,this._rules=r,this._toolManager=o,this._mouse=s;var a=this;o.registerTool("space",{tool:"spaceTool.selection",dragging:"spaceTool"}),n.on("spaceTool.selection.end",(function(e){n.once("spaceTool.selection.ended",(function(){a.activateMakeSpace(e.originalEvent)}))})),n.on("spaceTool.move",1500,(function(e){var t=e.context,n=t.initialized;n||(n=t.initialized=a.init(e,t)),n&&Vf(e)})),n.on("spaceTool.end",(function(e){var t=e.context,i=t.axis,r=t.direction,o=t.movingShapes,s=t.resizingShapes,l=t.start;if(t.initialized){Vf(e);var c={x:0,y:0};c[i]=jf(e["d"+i]),a.makeSpace(o,s,c,r,l),n.once("spaceTool.ended",(function(e){a.activateSelection(e.originalEvent,!0,!0)}))}}))}function Ff(e){return{top:e.top-20,right:e.right+20,bottom:e.bottom+20,left:e.left-20}}function Vf(e){var t,n,i=e.context.spaceToolConstraints;i&&(m(i.left)&&(t=Math.max(e.x,i.left),e.dx=e.dx+t-e.x,e.x=t),m(i.right)&&(t=Math.min(e.x,i.right),e.dx=e.dx+t-e.x,e.x=t),m(i.top)&&(n=Math.max(e.y,i.top),e.dy=e.dy+n-e.y,e.y=n),m(i.bottom)&&(n=Math.min(e.y,i.bottom),e.dy=e.dy+n-e.y,e.y=n))}function Hf(e,t){return-1!==e.indexOf(t)}zf.$inject=["canvas","dragging","eventBus","modeling","rules","toolManager","mouse"],zf.prototype.activateSelection=function(e,t,n){this._dragging.init(e,"spaceTool.selection",{autoActivate:t,cursor:Lf,data:{context:{reactivate:n}},trapClick:!1})},zf.prototype.activateMakeSpace=function(e){this._dragging.init(e,"spaceTool",{autoActivate:!0,cursor:Lf,data:{context:{}}})},zf.prototype.makeSpace=function(e,t,n,i,r){return this._modeling.createSpace(e,t,n,i,r)},zf.prototype.init=function(e,t){var n=$f(e.dx)>$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]<i))a.push(e);else{var u;if(!(n>0&&o>i||n<0&&p<i))return o<i&&p>i&&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 <execute> or <revert> 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]<t:void 0}function Fm(e,t){return-1!==e.indexOf(t)}function Vm(e){this._modeling=e}function Hm(e){var t={};return _(e,(function(e){t[e.id]=e.hidden,e.children&&(t=z({},t,Hm(e.children)))})),t}function Um(e,t){var n=[];return _(e,(function(e){e.hidden=t,n=n.concat(e),e.children&&(n=n.concat(Um(e.children,e.collapsed||t)))})),n}function Wm(e,t){var n=[];return _(e,(function(e){e.hidden=t[e.id],n=n.concat(e),e.children&&(n=n.concat(Wm(e.children,t)))})),n}function Gm(e){this._modeling=e}function Qm(e,t){return Tt(e&&e.attachers,t)}function Xm(e,t,n){if(e){var i=e.attachers;i||(e.attachers=i=[]),At(i,t,n)}}function Km(){}function Ym(e,t,n){this._eventBus=e,this._elementFactory=t,this._commandStack=n;var i=this;e.on("diagram.init",(function(){i.registerHandlers(n)}))}function Zm(e){this._elementRegistry=e}function Jm(e,t){_(t,(function(t,n){e.set(n,t)}))}km.prototype.preExecute=function(e){var t=this._modeling,n=e.groups,i=e.axis,r=e.dimension;function o(e,t){e.range.min=Math.min(t[i],e.range.min),e.range.max=Math.max(t[i]+t[r],e.range.max)}function s(e){return e[i]+e[r]/2}function a(e){return e.length-1}function l(e){return e.max-e.min}var c,p,u=n[0],d=a(n),h=n[d],f=0;_(n,(function(e,c){var p,u,h;e.elements.length<2?c&&c!==n.length-1&&(o(e,e.elements[0]),f+=l(e.range)):(u=(p=R(e.elements,i))[0],c===d&&(u=p[a(p)]),h=s(u),e.range=null,_(p,(function(n){!function(e,n){var r={y:0};r[i]=e-s(n),r[i]&&(r[Sm[i]]=0,t.moveElements([n],r,n.parent))}(h,n),null!==e.range?o(e,n):e.range={min:n[i],max:n[i]+n[r]}})),c&&c!==n.length-1&&(f+=l(e.range)))})),p=Math.abs(h.range.min-u.range.max),(c=Math.round((p-f)/(n.length-1)))<n.length-1||_(n,(function(e,o){var s,a={};e!==u&&e!==h&&(s=n[o-1],e.range.max=0,_(e.elements,(function(n,o){a[Sm[i]]=0,a[i]=s.range.max-n[i]+c,e.range.min!==n[i]&&(a[i]+=n[i]-e.range.min),a[i]&&t.moveElements([n],a,n.parent),e.range.max=Math.max(n[i]+n[r],o?e.range.max:0)})))}))},km.prototype.postExecute=function(e){},Cm.$inject=["layouter","canvas"],Cm.prototype.execute=function(e){var t=e.connection;return z(e,{oldWaypoints:t.waypoints}),t.waypoints=this._layouter.layoutConnection(t,e.hints),t},Cm.prototype.revert=function(e){var t=e.connection;return t.waypoints=e.oldWaypoints,t},Tm.prototype.execute=function(e){var t=e.connection,n=e.delta,i=e.newParent||t.parent,r=e.newParentIndex,o=t.parent;return e.oldParent=o,e.oldParentIndex=Tt(o.children,t),At(i.children,t,r),t.parent=i,_(t.waypoints,(function(e){e.x+=n.x,e.y+=n.y,e.original&&(e.original.x+=n.x,e.original.y+=n.y)})),t},Tm.prototype.revert=function(e){var t=e.connection,n=t.parent,i=e.oldParent,r=e.oldParentIndex,o=e.delta;return Tt(n.children,t),At(i.children,t,r),t.parent=i,_(t.waypoints,(function(e){e.x-=o.x,e.y-=o.y,e.original&&(e.original.x-=o.x,e.original.y-=o.y)})),t},Am.prototype.add=function(e,t){return this.addAll([e],t)},Am.prototype.addAll=function(e,t){var n=function(e,t,n){p(t)&&(t=!0),f(t)&&(n=t,t=!0);var i=kt((n=n||{}).allShapes),r=kt(n.allConnections),o=kt(n.enclosedElements),s=kt(n.enclosedConnections),a=kt(n.topLevel,t&&A(e,(function(e){return e.id})));function l(e){a[e.source.id]&&a[e.target.id]&&(a[e.id]=[e]),i[e.source.id]&&i[e.target.id]&&(s[e.id]=o[e.id]=e),r[e.id]=e}return xt(e,(function(e){if(o[e.id]=e,!e.waypoints)return i[e.id]=e,_(e.incoming,l),_(e.outgoing,l),e.children;s[e.id]=r[e.id]=e})),{allShapes:i,allConnections:r,topLevel:a,enclosedConnections:s,enclosedElements:o}}(e,!!t,this);return z(this,n),this},Mm.prototype.moveRecursive=function(e,t,n){return e?this.moveClosure(this.getClosure(e),t,n):[]},Mm.prototype.moveClosure=function(e,t,n,i,r){var o=this._modeling,s=e.allShapes,a=e.allConnections,l=e.enclosedConnections,c=e.topLevel,p=!1;r&&r.parent===n&&(p=!0),_(s,(function(e){o.moveShape(e,t,c[e.id]&&!p&&n,{recurse:!1,layout:!1})})),_(a,(function(e){var i=!!s[e.source.id],r=!!s[e.target.id];l[e.id]&&i&&r?o.moveConnection(e,t,c[e.id]&&!p&&n):o.layoutConnection(e,{connectionStart:i&&md(e,e.source,t),connectionEnd:r&&gd(e,e.target,t)})}))},Mm.prototype.getClosure=function(e){return(new Am).addAll(e,!0)},Dm.$inject=["modeling"],Dm.prototype.preExecute=function(e){e.closure=this._helper.getClosure(e.shapes)},Dm.prototype.postExecute=function(e){var t,n=e.hints;n&&n.primaryShape&&(t=n.primaryShape,n.oldParent=t.parent),this._helper.moveClosure(e.closure,e.delta,e.newParent,e.newHost,t)},Rm.$inject=["modeling"],Rm.prototype.execute=function(e){var t=e.shape,n=e.delta,i=e.newParent||t.parent,r=e.newParentIndex,o=t.parent;return e.oldBounds=V(t,["x","y","width","height"]),e.oldParent=o,e.oldParentIndex=Tt(o.children,t),At(i.children,t,r),z(t,{parent:i,x:t.x+n.x,y:t.y+n.y}),t},Rm.prototype.postExecute=function(e){var t=e.shape,n=e.delta,i=e.hints,r=this._modeling;!1!==i.layout&&(_(t.incoming,(function(e){r.layoutConnection(e,{connectionEnd:gd(e,t,n)})})),_(t.outgoing,(function(e){r.layoutConnection(e,{connectionStart:md(e,t,n)})}))),!1!==i.recurse&&this.moveChildren(e)},Rm.prototype.revert=function(e){var t=e.shape,n=e.oldParent,i=e.oldParentIndex,r=e.delta;return At(n.children,t,i),z(t,{parent:n,x:t.x-r.x,y:t.y-r.y}),t},Rm.prototype.moveChildren=function(e){var t=e.delta,n=e.shape;this._helper.moveRecursive(n.children,t,null)},Rm.prototype.getNewParent=function(e){return e.newParent||e.shape.parent},Nm.$inject=["modeling"],Nm.prototype.execute=function(e){var t=e.newSource,n=e.newTarget,i=e.connection,r=e.dockingOrPoints;if(!t&&!n)throw new Error("newSource or newTarget required");return h(r)&&(e.oldWaypoints=i.waypoints,i.waypoints=r),t&&(e.oldSource=i.source,i.source=t),n&&(e.oldTarget=i.target,i.target=n),i},Nm.prototype.postExecute=function(e){var t=e.connection,n=e.newSource,i=e.newTarget,r=e.dockingOrPoints,o=e.hints||{},s={};o.connectionStart&&(s.connectionStart=o.connectionStart),o.connectionEnd&&(s.connectionEnd=o.connectionEnd),!1!==o.layoutConnection&&(!n||i&&"source"!==o.docking||(s.connectionStart=s.connectionStart||$m(h(r)?r[0]:r)),!i||n&&"target"!==o.docking||(s.connectionEnd=s.connectionEnd||$m(h(r)?r[r.length-1]:r)),o.newWaypoints&&(s.waypoints=o.newWaypoints),this._modeling.layoutConnection(t,s))},Nm.prototype.revert=function(e){var t=e.oldSource,n=e.oldTarget,i=e.oldWaypoints,r=e.connection;return t&&(r.source=t),n&&(r.target=n),i&&(r.waypoints=i),r},jm.$inject=["modeling","rules"],jm.prototype.preExecute=function(e){var t,n=this,i=this._modeling,r=this._rules,o=e.oldShape,s=e.newData,a=e.hints||{};function l(e,t,n){return r.allowed("connection.reconnect",{connection:n,source:e,target:t})}var c,p={x:s.x,y:s.y},u={x:o.x,y:o.y,width:o.width,height:o.height};t=e.newShape=e.newShape||n.createShape(s,p,o.parent,a),o.host&&i.updateAttachment(t,o.host),!1!==a.moveChildren&&(c=o.children.slice(),i.moveElements(c,{x:0,y:0},t,a));var d=o.incoming.slice(),h=o.outgoing.slice();_(d,(function(e){l(e.source,t,e)&&n.reconnectEnd(e,t,fd(e,t,u),a)})),_(h,(function(e){var i=e.target;l(t,i,e)&&n.reconnectStart(e,t,hd(e,t,u),a)}))},jm.prototype.postExecute=function(e){var t=e.oldShape;this._modeling.removeShape(t)},jm.prototype.execute=function(e){},jm.prototype.revert=function(e){},jm.prototype.createShape=function(e,t,n,i){return this._modeling.createShape(e,t,n,i)},jm.prototype.reconnectStart=function(e,t,n,i){this._modeling.reconnectStart(e,t,n,i)},jm.prototype.reconnectEnd=function(e,t,n,i){this._modeling.reconnectEnd(e,t,n,i)},Im.$inject=["modeling"],Im.prototype.execute=function(e){var t=e.shape,n=e.newBounds,i=e.minBounds;if(void 0===n.x||void 0===n.y||void 0===n.width||void 0===n.height)throw new Error("newBounds must have {x, y, width, height} properties");if(i&&(n.width<i.width||n.height<i.height))throw new Error("width and height cannot be less than minimum height and width");if(!i&&n.width<10||n.height<10)throw new Error("width and height cannot be less than 10px");return e.oldBounds={width:t.width,height:t.height,x:t.x,y:t.y},z(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t},Im.prototype.postExecute=function(e){var t=this._modeling,n=e.shape,i=e.oldBounds;!1!==(e.hints||{}).layout&&(_(n.incoming,(function(e){t.layoutConnection(e,{connectionEnd:fd(e,n,i)})})),_(n.outgoing,(function(e){t.layoutConnection(e,{connectionStart:hd(e,n,i)})})))},Im.prototype.revert=function(e){var t=e.shape,n=e.oldBounds;return z(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t},Lm.$inject=["modeling"],Lm.prototype.preExecute=function(e){var t=e.delta,n=e.direction,i=e.movingShapes,r=e.resizingShapes,o=e.start,s={};this.moveShapes(i,t),_(r,(function(e){s[e.id]=function(e){return{x:e.x,y:e.y,height:e.height,width:e.width}}(e)})),this.resizeShapes(r,t,n),this.updateConnectionWaypoints(function(e,t){var n=[];return _(e.concat(t),(function(i){var r=i.incoming,o=i.outgoing;_(r.concat(o),(function(i){var r=i.source,o=i.target;(Nf(e,r)||Nf(e,o)||Nf(t,r)||Nf(t,o))&&(Nf(n,i)||n.push(i))}))})),n}(i,r),t,n,o,i,r,s)},Lm.prototype.execute=function(){},Lm.prototype.revert=function(){},Lm.prototype.moveShapes=function(e,t){var n=this;_(e,(function(e){n._modeling.moveShape(e,t,null,{autoResize:!1,layout:!1,recurse:!1})}))},Lm.prototype.resizeShapes=function(e,t,n){var i=this;_(e,(function(e){var r=function(e,t,n){var i=e.x,r=e.y,o=e.width,s=e.height,a=n.x,l=n.y;switch(t){case"n":return{x:i,y:r+l,width:o,height:s-l};case"s":return{x:i,y:r,width:o,height:s+l};case"w":return{x:i+a,y:r,width:o-a,height:s};case"e":return{x:i,y:r,width:o+a,height:s};default:throw new Error("unknown direction: "+t)}}(e,n,t);i._modeling.resizeShape(e,r,null,{attachSupport:!1,autoResize:!1,layout:!1})}))},Lm.prototype.updateConnectionWaypoints=function(e,t,n,i,r,o,s){var a=this,l=r.concat(o);_(e,(function(e){var c=e.source,p=e.target,u=function(e){return S(e.waypoints,(function(e){return(e=Bm(e)).original&&(e.original=Bm(e.original)),e}))}(e),d=qm(n),h={};Fm(l,c)&&Fm(l,p)?(u=S(u,(function(e){return zm(e,i,n)&&(e[d]=e[d]+t[d]),e.original&&zm(e.original,i,n)&&(e.original[d]=e.original[d]+t[d]),e})),a._modeling.updateWaypoints(e,u,{labelBehavior:!1})):(Fm(l,c)||Fm(l,p))&&(Fm(r,c)?h.connectionStart=md(e,c,t):Fm(r,p)?h.connectionEnd=gd(e,p,t):Fm(o,c)?h.connectionStart=hd(e,c,s[c.id]):Fm(o,p)&&(h.connectionEnd=fd(e,p,s[p.id])),a._modeling.layoutConnection(e,h))}))},Vm.$inject=["modeling"],Vm.prototype.execute=function(e){var t=e.shape,n=t.children;e.oldChildrenVisibility=Hm(n),t.collapsed=!t.collapsed;var i=Um(n,t.collapsed);return[t].concat(i)},Vm.prototype.revert=function(e){var t=e.shape,n=e.oldChildrenVisibility,i=Wm(t.children,n);return t.collapsed=!t.collapsed,[t].concat(i)},Gm.$inject=["modeling"],Gm.prototype.execute=function(e){var t=e.shape,n=e.newHost,i=t.host;return e.oldHost=i,e.attacherIdx=Qm(i,t),Xm(n,t),t.host=n,t},Gm.prototype.revert=function(e){var t=e.shape,n=e.newHost,i=e.oldHost,r=e.attacherIdx;return t.host=i,Qm(n,t),Xm(i,t,r),t},Km.prototype.execute=function(e){var t=e.connection,n=e.newWaypoints;return e.oldWaypoints=t.waypoints,t.waypoints=n,t},Km.prototype.revert=function(e){var t=e.connection,n=e.oldWaypoints;return t.waypoints=n,t},Ym.$inject=["eventBus","elementFactory","commandStack"],Ym.prototype.getHandlers=function(){return{"shape.append":fm,"shape.create":bm,"shape.delete":Pm,"shape.move":Rm,"shape.resize":Im,"shape.replace":jm,"shape.toggleCollapse":Vm,spaceTool:Lm,"label.create":xm,"connection.create":mm,"connection.delete":Em,"connection.move":Tm,"connection.layout":Cm,"connection.updateWaypoints":Km,"connection.reconnect":Nm,"elements.create":ym,"elements.move":Dm,"elements.delete":Om,"elements.distribute":km,"elements.align":hm,"element.updateAttachment":Gm}},Ym.prototype.registerHandlers=function(e){_(this.getHandlers(),(function(t,n){e.registerHandler(n,t)}))},Ym.prototype.moveShape=function(e,t,n,i,r){"object"==typeof i&&(r=i,i=null);var o={shape:e,delta:t,newParent:n,newParentIndex:i,hints:r||{}};this._commandStack.execute("shape.move",o)},Ym.prototype.updateAttachment=function(e,t){var n={shape:e,newHost:t};this._commandStack.execute("element.updateAttachment",n)},Ym.prototype.moveElements=function(e,t,n,i){var r,o=(i=i||{}).attach,s=n;!0===o?(r=n,s=n.parent):!1===o&&(r=null);var a={shapes:e,delta:t,newParent:s,newHost:r,hints:i};this._commandStack.execute("elements.move",a)},Ym.prototype.moveConnection=function(e,t,n,i,r){"object"==typeof i&&(r=i,i=void 0);var o={connection:e,delta:t,newParent:n,newParentIndex:i,hints:r||{}};this._commandStack.execute("connection.move",o)},Ym.prototype.layoutConnection=function(e,t){var n={connection:e,hints:t||{}};this._commandStack.execute("connection.layout",n)},Ym.prototype.createConnection=function(e,t,n,i,r,o){"object"==typeof n&&(o=r,r=i,i=n,n=void 0);var s={source:e,target:t,parent:r,parentIndex:n,connection:i=this._create("connection",i),hints:o};return this._commandStack.execute("connection.create",s),s.connection},Ym.prototype.createShape=function(e,t,n,i,r){"number"!=typeof i&&(r=i,i=void 0);var o,s,a=(r=r||{}).attach;e=this._create("shape",e),a?(o=n.parent,s=n):o=n;var l={position:t,shape:e,parent:o,parentIndex:i,host:s,hints:r};return this._commandStack.execute("shape.create",l),l.shape},Ym.prototype.createElements=function(e,t,n,i,r){h(e)||(e=[e]),"number"!=typeof i&&(r=i,i=void 0);var o={position:t,elements:e,parent:n,parentIndex:i,hints:r=r||{}};return this._commandStack.execute("elements.create",o),o.elements},Ym.prototype.createLabel=function(e,t,n,i){n=this._create("label",n);var r={labelTarget:e,position:t,parent:i||e.parent,shape:n};return this._commandStack.execute("label.create",r),r.shape},Ym.prototype.appendShape=function(e,t,n,i,r){r=r||{};var o={source:e,position:n,target:i,shape:t=this._create("shape",t),connection:r.connection,connectionParent:r.connectionParent,hints:r};return this._commandStack.execute("shape.append",o),o.shape},Ym.prototype.removeElements=function(e){var t={elements:e};this._commandStack.execute("elements.delete",t)},Ym.prototype.distributeElements=function(e,t,n){var i={groups:e,axis:t,dimension:n};this._commandStack.execute("elements.distribute",i)},Ym.prototype.removeShape=function(e,t){var n={shape:e,hints:t||{}};this._commandStack.execute("shape.delete",n)},Ym.prototype.removeConnection=function(e,t){var n={connection:e,hints:t||{}};this._commandStack.execute("connection.delete",n)},Ym.prototype.replaceShape=function(e,t,n){var i={oldShape:e,newData:t,hints:n||{}};return this._commandStack.execute("shape.replace",i),i.newShape},Ym.prototype.alignElements=function(e,t){var n={elements:e,alignment:t};this._commandStack.execute("elements.align",n)},Ym.prototype.resizeShape=function(e,t,n,i){var r={shape:e,newBounds:t,minBounds:n,hints:i};this._commandStack.execute("shape.resize",r)},Ym.prototype.createSpace=function(e,t,n,i,r){var o={delta:n,direction:i,movingShapes:e,resizingShapes:t,start:r};this._commandStack.execute("spaceTool",o)},Ym.prototype.updateWaypoints=function(e,t,n){var i={connection:e,newWaypoints:t,hints:n||{}};this._commandStack.execute("connection.updateWaypoints",i)},Ym.prototype.reconnect=function(e,t,n,i,r){var o={connection:e,newSource:t,newTarget:n,dockingOrPoints:i,hints:r||{}};this._commandStack.execute("connection.reconnect",o)},Ym.prototype.reconnectStart=function(e,t,n,i){i||(i={}),this.reconnect(e,t,e.target,n,z(i,{docking:"source"}))},Ym.prototype.reconnectEnd=function(e,t,n,i){i||(i={}),this.reconnect(e,e.source,t,n,z(i,{docking:"target"}))},Ym.prototype.connect=function(e,t,n,i){return this.createConnection(e,t,n||{},e.parent,i)},Ym.prototype._create=function(e,t){return t instanceof Hn?t:this._elementFactory.create(e,t)},Ym.prototype.toggleCollapse=function(e,t){var n={shape:e,hints:t||{}};this._commandStack.execute("shape.toggleCollapse",n)},Zm.$inject=["elementRegistry"],Zm.prototype.execute=function(e){var t=e.element,n=e.moddleElement,i=e.properties;if(!n)throw new Error("<moddleElement> required");var r=e.changed||this._getVisualReferences(n).concat(t),o=e.oldProperties||function(e,t){return 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;u<r;u++)a=i.y+u*d,l=u===r-1?i.height-d*u:d,c={x:i.x+Cu,y:a,width:i.width-Cu,height:l},u<s?t.resizeShape(o[u],c):(p={type:"bpmn:Lane"},t.createShape(p,c,i))},ug.$inject=["modeling","spaceTool"],ug.prototype.preExecute=function(e){var t=e.shape,n=e.newBounds;!1!==e.balanced?this.resizeBalanced(t,n):this.resizeSpace(t,n)},ug.prototype.resizeBalanced=function(e,t){var n=this._modeling,i=Du(e,t);n.resizeShape(e,t),i.forEach((function(e){n.resizeShape(e.shape,e.newBounds)}))},ug.prototype.resizeSpace=function(e,t){var n,i,r,o,s,a=this._spaceTool,l=wn(e),c=xu(wn(t),l),p=Mu(e),u=[],d=[];xt(p,(function(e){return u.push(e),(Tr(e,"bpmn:Lane")||Tr(e,"bpmn:Participant"))&&d.push(e),e.children})),(c.bottom||c.top)&&(n=c.bottom||c.top,i=e.y+(c.bottom?e.height:0)+(c.bottom?-10:10),r=c.bottom?"s":"n",o=c.top>0||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&&r<i.right&&o>i.top&&o<i.bottom;var n,i,r,o})).map((function(e){return e.businessObject}))}return t.forEach((function(e){var t=Mu(e);if(t&&-1===n.indexOf(t)){var i=t.children.filter((function(e){return Tr(e,"bpmn:FlowNode")}));i.forEach(s),n.push(t)}})),e.forEach(s),o.forEach((function(e){var t=e.businessObject,n=t.get(hg).slice(),r=a(e);i.push({flowNode:t,remove:n,add:r})})),t.forEach((function(e){var t=e.businessObject;e.parent||t.get(dg).forEach((function(e){i.push({flowNode:e,remove:[t],add:[]})}))})),i},fg.prototype.execute=function(e){var t=e.updates;return t||(t=e.updates=this._computeUpdates(e.flowNodeShapes,e.laneShapes)),t.forEach((function(e){var t=e.flowNode,n=t.get(hg);e.remove.forEach((function(e){Tt(n,e),Tt(e.get(dg),t)})),e.add.forEach((function(e){At(n,e),At(e.get(dg),t)}))})),[]},fg.prototype.revert=function(e){return e.updates.forEach((function(e){var t=e.flowNode,n=t.get(hg);e.add.forEach((function(e){Tt(n,e),Tt(e.get(dg),t)})),e.remove.forEach((function(e){At(n,e),At(e.get(dg),t)}))})),[]},mg.$inject=["moddle"],mg.prototype.execute=function(e){var t=this._moddle.ids,n=e.id,i=e.element;return e.claiming?t.claim(n,i):t.unclaim(n),[]},mg.prototype.revert=function(e){var t=this._moddle.ids,n=e.id,i=e.element;return e.claiming?t.unclaim(n):t.claim(n,i),[]};var gg={fill:void 0,stroke:void 0};function yg(e){this._commandStack=e,this._normalizeColor=function(e){if(e){if(y(e)){var t=function(e){var t=document.createElement("canvas").getContext("2d");return t.fillStyle="transparent",t.fillStyle=e,/^#[0-9a-fA-F]{6}$/.test(t.fillStyle)?t.fillStyle:null}(e);if(t)return t}throw new Error("invalid color value: "+e)}}}yg.$inject=["commandStack"],yg.prototype.postExecute=function(e){var t=e.elements,n=e.colors||gg,i=this,r={};"fill"in n&&z(r,{"background-color":this._normalizeColor(n.fill)}),"stroke"in n&&z(r,{"border-color":this._normalizeColor(n.stroke)}),_(t,(function(e){var t=yn(e)?V(r,["border-color"]):r,n=Dr(e);if(function(e){"border-color"in e&&(e.stroke=e["border-color"]);"background-color"in e&&(e.fill=e["background-color"])}(t),vn(e))i._commandStack.execute("element.updateModdleProperties",{element:e,moddleElement:n.label,properties:{color:r["border-color"]}});else{if(!Ar(n,["bpmndi:BPMNEdge","bpmndi:BPMNShape"]))return;i._commandStack.execute("element.updateProperties",{element:e,properties:{di:t}})}}))};var vg={width:0,height:0};function bg(e,t,n){function i(e,t){var n=e.label||e,i=e.labelTarget||e;return function(e,t){var n=e.businessObject,i=ro(n);i&&("categoryValueRef"===i?n.categoryValueRef.value=t:n[i]=t)}(n,t),[n,i]}this.preExecute=function(t){var n=t.element,i=n.businessObject,r=t.newLabel;if(!vn(n)&&eo(n)&&!to(n)&&!xg(r)){var o=io(n);o={x:o.x,y:o.y+7},e.createLabel(n,o,{id:i.id+"_label",businessObject:i,di:n.di})}},this.execute=function(e){return e.oldLabel=oo(e.element),i(e.element,e.newLabel)},this.revert=function(e){return i(e.element,e.oldLabel)},this.postExecute=function(n){var i=n.element,r=i.label||i,o=n.newLabel,s=n.newBounds,a=n.hints||{};if(vn(r)||Tr(r,"bpmn:TextAnnotation"))if(vn(r)&&xg(o))!1!==a.removeShape&&e.removeShape(r,{unsetLabel:!1});else{var l=oo(i);void 0===s&&(s=t.getExternalLabelBounds(r,l)),s&&e.resizeShape(r,s,vg)}}}function xg(e){return!e||!e.trim()}function wg(e,t,n,i){Ym.call(this,e,t,n),this._bpmnRules=i}function _g(){}bg.$inject=["modeling","textRenderer","bpmnFactory"],i(wg,Ym),wg.$inject=["eventBus","elementFactory","commandStack","bpmnRules"],wg.prototype.getHandlers=function(){var e=Ym.prototype.getHandlers.call(this);return e["element.updateModdleProperties"]=Zm,e["element.updateProperties"]=rg,e["canvas.updateRoot"]=lg,e["lane.add"]=cg,e["lane.resize"]=ug,e["lane.split"]=pg,e["lane.updateRefs"]=fg,e["id.updateClaim"]=mg,e["element.setColor"]=yg,e["element.updateLabel"]=bg,e},wg.prototype.updateLabel=function(e,t,n,i){this._commandStack.execute("element.updateLabel",{element:e,newLabel:t,newBounds:n,hints:i||{}})},wg.prototype.connect=function(e,t,n,i){var r=this._bpmnRules;if(n||(n=r.canConnect(e,t)),n)return this.createConnection(e,t,n,e.parent,i)},wg.prototype.updateModdleProperties=function(e,t,n){this._commandStack.execute("element.updateModdleProperties",{element:e,moddleElement:t,properties:n})},wg.prototype.updateProperties=function(e,t){this._commandStack.execute("element.updateProperties",{element:e,properties:t})},wg.prototype.resizeLane=function(e,t,n){this._commandStack.execute("lane.resize",{shape:e,newBounds:t,balanced:n})},wg.prototype.addLane=function(e,t){var n={shape:e,location:t};return this._commandStack.execute("lane.add",n),n.newLane},wg.prototype.splitLane=function(e,t){this._commandStack.execute("lane.split",{shape:e,count:t})},wg.prototype.makeCollaboration=function(){var e=this._create("root",{type:"bpmn:Collaboration"}),t={newRoot:e};return this._commandStack.execute("canvas.updateRoot",t),e},wg.prototype.makeProcess=function(){var e={newRoot:this._create("root",{type:"bpmn:Process"})};this._commandStack.execute("canvas.updateRoot",e)},wg.prototype.updateLaneRefs=function(e,t){this._commandStack.execute("lane.updateRefs",{flowNodeShapes:e,laneShapes:t})},wg.prototype.claimId=function(e,t){this._commandStack.execute("id.updateClaim",{id:e,element:t,claiming:!0})},wg.prototype.unclaimId=function(e,t){this._commandStack.execute("id.updateClaim",{id:e,element:t})},wg.prototype.setColor=function(e,t){e.length||(e=[e]),this._commandStack.execute("element.setColor",{elements:e,colors:t})},_g.prototype.layoutConnection=function(e,t){return[(t=t||{}).connectionStart||On(t.source||e.source),t.connectionEnd||On(t.target||e.target)]};var Eg=Math.round,Og={"h:h":20,"v:v":20,"h:v":-10,"v:h":-10};function Pg(e,t,n){var i,r,o,s=Pn(t,e,5),a=n.split(":")[0],l=Eg((t.x-e.x)/2+e.x),c=Eg((t.y-e.y)/2+e.y),p=(o=s,{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/left|right/,v:/top|bottom/}[a].test(o)),u=/h|r|l/.test(a),d=!1,h=!1;return p?(i=u?{x:l,y:e.y}:{x:e.x,y:c},r=u?"h:h":"v:v"):(d=function(e,t){return!{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/./,v:/./}[t].test(e)}(s,a),r=u?"h:v":"v:h",d?u?(h=c===e.y,i={x:e.x+20*(/l/.test(a)?-1:1),y:h?c+20:c}):i={x:(h=l===e.x)?l+20:l,y:e.y+20*(/t/.test(a)?-1:1)}:i={x:l,y:c}),{waypoints:Sg(e,i,r).concat(i),directions:r,turnNextDirections:h}}function kg(e){return e.split(":").reverse().join(":")}function Sg(e,t,n){if(!function(e){return e&&/^h|v|t|r|b|l:h|v|t|r|b|l$/.test(e)}(n=n||"h:h"))throw new Error("unknown directions: <"+n+">: must be specified as <start>:<end> with start/end in { h,v,t,r,b,l }");if(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])<i}function Yg(e){return z({original:e.point.original||e.point},e.actual)}function Zg(e,t){this._elementRegistry=e,this._graphicsFactory=t}i(Ig,_g),Ig.prototype.layoutConnection=function(e,t){t||(t={});var n,i,r=t.source||e.source,o=t.target||e.target,s=t.waypoints||e.waypoints,a=t.connectionStart,l=t.connectionEnd;return a||(a=qg(s&&s[0],r)),l||(l=qg(s&&s[s.length-1],o)),(Tr(e,"bpmn:Association")||Tr(e,"bpmn:DataAssociation"))&&s&&!zg(r,o)?[].concat([a],s.slice(1,-1),[l]):(Tr(e,"bpmn:MessageFlow")?n=function(e,t){return{preferredLayouts:["straight","v:v"],preserveDocking:Lg(e,t)}}(r,o):(Tr(e,"bpmn:SequenceFlow")||zg(r,o))&&(n=r===o?{preferredLayouts:Gg(r,e)}:Tr(r,"bpmn:BoundaryEvent")?{preferredLayouts:Qg(r,o,l)}:Fg(r)||Fg(o)?function(e){return{preferredLayouts:["straight","h:h"],preserveDocking:Bg(e)}}(r):Tr(r,"bpmn:Gateway")?{preferredLayouts:["v:h"]}:Tr(o,"bpmn:Gateway")?{preferredLayouts:["h:v"]}:{preferredLayouts:["h:h"]}),n&&(i=Ng(Tg(r,o,a,l,s,n=z(n,t)))),i||[a,l])},Zg.$inject=["elementRegistry","graphicsFactory"],Zg.prototype.getCroppedWaypoints=function(e,t,n){t=t||e.source,n=n||e.target;var i=this.getDockingPoint(e,t,!0),r=this.getDockingPoint(e,n),o=e.waypoints.slice(i.idx+1,r.idx);return o.unshift(Yg(i)),o.push(Yg(r)),o},Zg.prototype.getDockingPoint=function(e,t,n){var i,r,o=e.waypoints;return{point:r=o[i=n?0:o.length-1],actual:this._getIntersection(t,e,n)||r,idx:i}},Zg.prototype._getIntersection=function(e,t,n){return kn(this._getShapePath(e),this._getConnectionPath(t),n)},Zg.prototype._getConnectionPath=function(e){return this._graphicsFactory.getConnectionPath(e)},Zg.prototype._getShapePath=function(e){return this._graphicsFactory.getShapePath(e)},Zg.prototype._getGfx=function(e){return this._elementRegistry.getGraphics(e)};const Jg={__init__:["modeling","bpmnUpdater"],__depends__:[dh,Wh,Qh,Yh,Mf,Jf,im,am,is,ds,Yf],bpmnFactory:["type",lm],bpmnUpdater:["type",cm],elementFactory:["type",um],modeling:["type",wg],layouter:["type",Ig],connectionDocking:["type",Zg]},ey=Math.round;function ty(e,t,n,i,r,o){this._complexPreview=e,this._connectionDocking=t,this._elementFactory=n,this._eventBus=i,this._layouter=r,this._rules=o}ty.prototype.create=function(e,t,n){const i=this._complexPreview,r=this._connectionDocking,o=this._elementFactory,s=this._eventBus,a=this._layouter,l=this._rules,c=o.createShape(z({type:t},n)),p=s.fire("autoPlace",{source:e,shape:c});if(!p)return;z(c,{x:p.x-ey(c.width/2),y:p.y-ey(c.height/2)});const u=l.allowed("connection.create",{source:e,target:c,hints:{targetParent:e.parent}});let h=null;u&&(h=o.createConnection(u),h.waypoints=a.layoutConnection(h,{source:e,target:c}),h.waypoints=r.getCroppedWaypoints(h,e,c)),i.create({created:[c,h].filter((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<n;r++){const n=e[r-1],l=e[r],c=e[r+1];if(!c||!t){i.push(sy(l));continue}const p=Math.min(t,cy(l.x-n.x,l.y-n.y),cy(c.x-l.x,c.y-l.y));if(!p){i.push(sy(l));continue}const u=ly(l,n,p),d=ly(l,n,.5*p),h=ly(l,c,p),f=ly(l,c,.5*p);i.push(sy(u)),i.push((s=f,a=h,["C",(o=d).x,o.y,s.x,s.y,a.x,a.y]))}return i}function ly(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=n/cy(i,r);return{x:e.x+i*o,y:e.y+r*o}}function cy(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function py(e,t){const n=parseInt(e.dataset.cornerRadius,10)||0;var i;return Te(e,{d:(i=ay(t,n),i.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1"))}),e}function uy(e){return!0}function dy(e){return oy(e)||function(e){return ry(e,1)}(e)}function hy(e,t,n){var i=this;function r(n,i,r){var o,s;(function(e,t){var n=l[e]||oy;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":uy,"element.mousedown":dy,"element.mouseup":dy,"element.click":dy,"element.dblclick":dy};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 g(e,t){var n=h[t];if(!n)throw new Error("invalid hit type <"+t+">");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('<div class="djs-direct-editing-parent"><div class="djs-direct-editing-content" contenteditable="true"></div></div>'),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<e.offsetHeight-n){var i=e.getBoundingClientRect(),r=t.scrollHeight;e.style.height=r+"px",this.resizeHandler({width:i.width,height:i.height,dx:0,dy:r-i.height})}},by.prototype.resizable=function(){var e=this,t=this.parent,n=this.resizeHandle,i=parseInt(this.style.minWidth)||0,r=parseInt(this.style.minHeight)||0,o=parseInt(this.style.maxWidth)||1/0,s=parseInt(this.style.maxHeight)||1/0;if(!n){var a,l,c,p;n=this.resizeHandle=be('<div class="djs-direct-editing-resize-handle"></div>');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 <svg viewBox="0 0 2048 2048" xmlns="http://www.w3.org/2000/svg">\n <g transform="translate(0 995.64)">\n <path d="m1899 28.357c21.545 567.43-598.38 1023.5-1133.6 835.92-548.09-147.21-801.57-873.95-463.59-1330 302.62-480.3 1071.7-507.54 1407.6-49.847 122.14 153.12 190.07 348.07 189.59 543.91z" fill="none" stroke="currentColor" stroke-dasharray="418.310422, 361.2328165" stroke-linecap="round" stroke-width="100"/>\n </g>\n </svg>',"intermediate-event-non-interrupting":'\n <svg viewBox="0 0 2048 2048" xmlns="http://www.w3.org/2000/svg">\n <g transform="translate(0 995.64)" fill="none" stroke="currentColor" stroke-linecap="round">\n <circle cx="1024" cy="28.357" r="875" stroke-dasharray="418.310422, 361.2328165" stroke-width="100"/>\n <circle cx="1024" cy="28.357" r="685" stroke-dasharray="348.31044857,261.23283643" stroke-dashoffset="500" stroke-width="100"/>\n </g>\n </svg>'};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:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">\n <polyline points="450 400 450 150 1350 150 1350 400" style="fill:none;stroke:currentColor;stroke-width:100;stroke-linejoin:round;"/>\n <rect x="150" y="450" width="600" height="1200" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>\n <rect x="1050" y="450" width="600" height="800" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>\n </svg>',vertical:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">\n <polyline points="400 1350 150 1350 150 450 400 450" style="fill:none;stroke:currentColor;stroke-width:100;stroke-linejoin:round;"/>\n <rect x="450" y="150" width="1200" height="600" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>\n <rect x="450" y="1050" width="800" height="600" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>\n </svg>'};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;i<e.length-2;i++)t=mv(n,e[i],e[i+1]),e[i]=t[0],e[i+1]=t[1];return e};const gv={__depends__:[uv,{__init__:["gridSnappingAutoPlaceBehavior","gridSnappingParticipantBehavior","gridSnappingLayoutConnectionBehavior"],gridSnappingAutoPlaceBehavior:["type",dv],gridSnappingParticipantBehavior:["type",hv],gridSnappingLayoutConnectionBehavior:["type",fv]}],__init__:["bpmnGridSnapping"],bpmnGridSnapping:["type",iv]};function yv(e,t){this._interactionEvents=t;var n=this;e.on(["interactionEvents.createHit","interactionEvents.updateHit"],(function(e){var t=e.element,i=e.gfx;return Tr(t,"bpmn:Lane")?n._createParticipantHit(t,i):Tr(t,"bpmn:Participant")?Xr(t)?n._createParticipantHit(t,i):n._createDefaultHit(t,i):Tr(t,"bpmn:SubProcess")?Xr(t)?n._createSubProcessHit(t,i):n._createDefaultHit(t,i):void 0}))}yv.$inject=["eventBus","interactionEvents"],yv.prototype._createDefaultHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createDefaultHit(e,t),!0},yv.prototype._createParticipantHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createBoxHit(t,"no-move",{width:e.width,height:e.height}),this._interactionEvents.createBoxHit(t,"click-stroke",{width:e.width,height:e.height}),this._interactionEvents.createBoxHit(t,"all",{width:30,height:e.height}),!0},yv.prototype._createSubProcessHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createBoxHit(t,"no-move",{width:e.width,height:e.height}),this._interactionEvents.createBoxHit(t,"click-stroke",{width:e.width,height:e.height}),this._interactionEvents.createBoxHit(t,"all",{width:e.width,height:30}),!0};const vv={__init__:["bpmnInteractionEvents"],bpmnInteractionEvents:["type",yv]};function bv(e){e.invoke(Gs,this)}i(bv,Gs),bv.$inject=["injector"],bv.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}Gs.prototype.registerBindings.call(this,e,t),n("selectElements",(function(n){var i=n.keyEvent;if(e.isKey(["a","A"],i)&&e.isCmd(i))return t.trigger("selectElements"),!0})),n("find",(function(n){var i=n.keyEvent;if(e.isKey(["f","F"],i)&&e.isCmd(i))return t.trigger("find"),!0})),n("spaceTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["s","S"],i)?(t.trigger("spaceTool"),!0):void 0})),n("lassoTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["l","L"],i)?(t.trigger("lassoTool"),!0):void 0})),n("handTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["h","H"],i)?(t.trigger("handTool"),!0):void 0})),n("globalConnectTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["c","C"],i)?(t.trigger("globalConnectTool"),!0):void 0})),n("directEditing",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["e","E"],i)?(t.trigger("directEditing"),!0):void 0})),n("replaceElement",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["r","R"],i)?(t.trigger("replaceElement",i),!0):void 0}))};const xv={__depends__:[Qs],__init__:["keyboardBindings"],keyboardBindings:["type",bv]};var wv={moveSpeed:1,moveSpeedAccelerated:10},_v="left",Ev="right",Ov="down",Pv={ArrowLeft:_v,Left:_v,ArrowUp:"up",Up:"up",ArrowRight:Ev,Right:Ev,ArrowDown:Ov,Down:Ov},kv={left:function(e){return{x:-e,y:0}},up:function(e){return{x:0,y:-e}},right:function(e){return{x:e,y:0}},down:function(e){return{x:0,y:e}}};function Sv(e,t,n,i,r){var o=this;this._config=z({},wv,e||{}),t.addListener(1500,(function(e){var n=e.keyEvent,i=Pv[n.key];if(i&&!t.isCmd(n)){var r=t.isShift(n);return o.moveSelection(i,r),!0}})),this.moveSelection=function(e,t){var o=r.get();if(o.length){var s=this._config[t?"moveSpeedAccelerated":"moveSpeed"],a=kv[e](s);i.allowed("elements.move",{shapes:o})&&n.moveElements(o,a)}}}Sv.$inject=["config.keyboardMoveSelection","keyboard","modeling","rules","selection"];const Cv={__depends__:[Qs,is],__init__:["keyboardMoveSelection"],keyboardMoveSelection:["type",Sv]};function Tv(e,t,n,i){this._dragging=i,this._rules=t;var r=this;function o(e,t){var n,i=e.shape,o=e.direction,s=e.resizeConstraints;e.delta=t,n=function(e,t,n){var i=n.x,r=n.y,o={x:e.x,y:e.y,width:e.width,height:e.height};return-1!==t.indexOf("n")?(o.y=e.y+r,o.height=e.height-r):-1!==t.indexOf("s")&&(o.height=e.height+r),-1!==t.indexOf("e")?o.width=e.width+i:-1!==t.indexOf("w")&&(o.x=e.x+i,o.width=e.width-i),o}(i,o,t),e.newBounds=function(e,t){if(!t)return e;var n=wn(e);return _n({top:_u("top",n,t),right:_u("right",n,t),bottom:_u("bottom",n,t),left:_u("left",n,t)})}(n,s),e.canExecute=r.canResize(e)}e.on("resize.start",(function(e){var t,n,i;t=e.context,n=t.resizeConstraints,i=t.minBounds,void 0===n&&(void 0===i&&(i=r.computeMinResizeBox(t)),t.resizeConstraints={min:wn(i)})})),e.on("resize.move",(function(e){var t={x:e.dx,y:e.dy};o(e.context,t)})),e.on("resize.end",(function(e){!function(e){var t=e.shape,i=e.canExecute,r=e.newBounds;if(i){if(!function(e,t){return e.x!==t.x||e.y!==t.y||e.width!==t.width||e.height!==t.height}(t,r=bn(r)))return;n.resizeShape(t,r)}}(e.context)}))}function Av(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}function Mv(e){var t="resize-";return"n"===e||"s"===e?t+"ns":"e"===e||"w"===e?t+"ew":"nw"===e||"se"===e?t+"nwse":t+"nesw"}Tv.prototype.canResize=function(e){var t=this._rules,n=V(e,["newBounds","shape","delta","direction"]);return t.allowed("shape.resize",n)},Tv.prototype.activate=function(e,t,n){var i,r,o=this._dragging;if("string"==typeof n&&(n={direction:n}),!(r=(i=z({shape:t},n)).direction))throw new Error("must provide a direction (n|w|s|e|nw|se|ne|sw)");o.init(e,Av(t,r),"resize",{autoActivate:!0,cursor:Mv(r),data:{shape:t,context:i}})},Tv.prototype.computeMinResizeBox=function(e){var t=e.shape;return function(e,t,n,i){var r=wn(t),o={top:/n/.test(e)?r.bottom-n.height:r.top,left:/w/.test(e)?r.right-n.width:r.left,bottom:/s/.test(e)?r.top+n.height:r.bottom,right:/e/.test(e)?r.left+n.width:r.right},s=i?wn(i):o;return _n({top:bu(o.top,s.top),left:bu(o.left,s.left),bottom:vu(o.bottom,s.bottom),right:vu(o.right,s.right)})}(e.direction,t,e.minDimensions||{width:10,height:10},Pu(t,e.childrenBoxPadding))},Tv.$inject=["eventBus","rules","modeling","dragging"];var Dv="djs-resizing",Rv="resize-not-ok";function Nv(e,t,n){e.on("resize.move",500,(function(e){var i,r,o,s;i=e.context,r=i.shape,o=i.newBounds,(s=i.frame)||(s=i.frame=n.addFrame(r,t.getActiveLayer()),t.addMarker(r,Dv)),o.width>5&&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('<div class="djs-tooltip-container" />'),{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('<div data-tooltip-id="'+n+'" class="'+Xv+'">'),{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<e.scale)&&(r=!1),Qv(i,r))}))},Yv.prototype._init=function(){var e=this;this._eventBus.on("canvas.viewbox.changing",(function(t){e.hide()})),this._eventBus.on("canvas.viewbox.changed",(function(t){var n;n=t.viewbox,e._updateRoot(n),e._updateTooltipVisibilty(n),e.show()}))};const Zv={__init__:["tooltips"],tooltips:["type",Yv]};function Jv(e,t,n){e.on(["shape.move.rejected","create.rejected"],(function(e){var i,r,o,s=e.context,a=s.shape;Tr(s.target,"bpmn:Collaboration")&&Tr(a,"bpmn:FlowNode")&&(i=e,r=n("flow elements must be children of pools/participants"),t.add({position:{x:i.x+5,y:i.y+5},type:"error",timeout:o||2e3,html:"<div>"+r+"</div>"}))}))}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('<div class="group"></div>'),"data-group",i),e.appendChild(r));var o=t.html||(t.separator?'<hr class="separator" />':'<div class="entry" draggable="true"></div>'),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("<img>");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='<div class="djs-palette"><div class="djs-palette-entries"></div><div class="djs-palette-toggle"></div></div>';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.y||t.x<n.x&&t.y<=n.y?{x:t.x,y:t.y,width:n.x-t.x,height:n.y-t.y}:t.x>=n.x&&t.y<n.y||t.x>n.x&&t.y<=n.y?{x:n.x,y:t.y,width:t.x-n.x,height:n.y-t.y}:t.x<=n.x&&t.y>n.y||t.x<n.x&&t.y>=n.y?{x:t.x,y:n.y,width:n.x-t.x,height:t.y-n.y}:t.x>=n.x&&t.y>n.y||t.x>n.x&&t.y>=n.y?{x:n.x,y:n.y,width:t.x-n.x,height:t.y-n.y}:{x:n.x,y:n.y,width:0,height:0}}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.x<t.width+t.x&&i.height+i.y<t.height+t.y?n[e.id]=e:m(t.width)&&m(t.height)||(n[e.id]=e))})),n}(e,t);this._selection.select(T(n))},kb.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateSelection(e,!!e)},kb.prototype.isActive=function(){var e=this._dragging.context();return e&&/^lasso/.test(e.prefix)};const Cb={__depends__:[Rf,df],__init__:["lassoTool"],lassoTool:["type",kb]};var Tb=1500,Ab="grab";function Mb(e,t,n,i,r,o){this._dragging=n,this._mouse=o;var s=this,a=i.get("keyboard",!1);r.registerTool("hand",{tool:"hand",dragging:"hand.move"}),e.on("element.mousedown",Tb,(function(e){if(Vo(e))return s.activateMove(e.originalEvent,!0),!1})),a&&a.addListener(Tb,(function(e){if(Db(e.keyEvent)&&!s.isActive()){var t=s._mouse.getLastMoveEvent();s.activateMove(t,!!t)}}),"keyboard.keydown"),a&&a.addListener(Tb,(function(e){Db(e.keyEvent)&&s.isActive()&&s.toggle()}),"keyboard.keyup"),e.on("hand.end",(function(t){var n=t.originalEvent.target;if(!(t.hover||n instanceof SVGElement))return!1;e.once("hand.ended",(function(){s.activateMove(t.originalEvent,{reactivate:!0})}))})),e.on("hand.move.move",(function(e){var n=t.viewbox().scale;t.scroll({dx:e.dx*n,dy:e.dy*n})})),e.on("hand.move.end",(function(t){var n=t.context.reactivate;return!Vo(t)&&n&&e.once("hand.move.ended",(function(e){s.activateHand(e.originalEvent,!0,!0)})),!1}))}function Db(e){return Fs("Space",e)}Mb.$inject=["eventBus","canvas","dragging","injector","toolManager","mouse"],Mb.prototype.activateMove=function(e,t,n){"object"==typeof t&&(n=t,t=!1),this._dragging.init(e,"hand.move",{autoActivate:t,cursor:Ab,data:{context:n||{}}})},Mb.prototype.activateHand=function(e,t,n){this._dragging.init(e,"hand",{trapClick:!1,autoActivate:t,cursor:Ab,data:{context:{reactivate:n}}})},Mb.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateHand(e,!!e)},Mb.prototype.isActive=function(){var e=this._dragging.context();return!!e&&/^(hand|hand\.move)$/.test(e.prefix)};const Rb={__depends__:[Rf,df],__init__:["handTool"],handTool:["type",Mb]};var Nb="connect-ok",$b="connect-not-ok";function jb(e,t,n,i,r,o,s){var a=this;this._dragging=t,this._rules=o,this._mouse=s,r.registerTool("global-connect",{tool:"global-connect",dragging:"global-connect.drag"}),e.on("global-connect.hover",(function(e){var t=e.context,n=e.hover,r=t.canStartConnect=a.canStartConnect(n);null!==r&&(t.startTarget=n,i.addMarker(n,r?Nb:$b))})),e.on(["global-connect.out","global-connect.cleanup"],(function(e){var t=e.context.startTarget,n=e.context.canStartConnect;t&&i.removeMarker(t,n?Nb:$b)})),e.on(["global-connect.ended"],(function(t){var i=t.context.startTarget,r={x:t.x,y:t.y};if(a.canStartConnect(i))return e.once("element.out",(function(){e.once(["connect.ended","connect.canceled"],(function(){e.fire("global-connect.drag.ended")})),n.start(null,i,r)})),!1}))}jb.$inject=["eventBus","dragging","connect","canvas","toolManager","rules","mouse"],jb.prototype.start=function(e,t){this._dragging.init(e,"global-connect",{autoActivate:t,trapClick:!1,data:{context:{}}})},jb.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();return this.start(e,!!e)},jb.prototype.isActive=function(){var e=this._dragging.context();return e&&/^global-connect/.test(e.prefix)},jb.prototype.canStartConnect=function(e){return this._rules.allowed("connection.start",{source:e})};const Ib={__depends__:[Ip,jc,Mc,Rf,df],globalConnect:["type",jb]};function Lb(e,t,n,i,r,o,s,a){this._palette=e,this._create=t,this._elementFactory=n,this._spaceTool=i,this._lassoTool=r,this._handTool=o,this._globalConnect=s,this._translate=a,e.registerProvider(this)}Lb.$inject=["palette","create","elementFactory","spaceTool","lassoTool","handTool","globalConnect","translate"],Lb.prototype.getPaletteEntries=function(){var e={},t=this._create,n=this._elementFactory,i=this._spaceTool,r=this._lassoTool,o=this._handTool,s=this._globalConnect,a=this._translate;function l(e,i,r,o,s){function a(i){var r=n.createShape(z({type:e},s));t.start(i,r)}return{group:i,className:r,title:o,action:{dragstart:a,click:a}}}function c(e){var i=n.createShape({type:"bpmn:SubProcess",x:0,y:0,isExpanded:!0}),r=n.createShape({type:"bpmn:StartEvent",x:40,y:82,parent:i});t.start(e,[i,r],{hints:{autoSelect:[i]}})}function p(e){t.start(e,n.createParticipantShape())}return z(e,{"hand-tool":{group:"tools",className:"bpmn-icon-hand-tool",title:a("Activate hand tool"),action:{click:function(e){o.activateHand(e)}}},"lasso-tool":{group:"tools",className:"bpmn-icon-lasso-tool",title:a("Activate lasso tool"),action:{click:function(e){r.activateSelection(e)}}},"space-tool":{group:"tools",className:"bpmn-icon-space-tool",title:a("Activate create/remove space tool"),action:{click:function(e){i.activateSelection(e)}}},"global-connect-tool":{group:"tools",className:"bpmn-icon-connection-multi",title:a("Activate global connect tool"),action:{click:function(e){s.start(e)}}},"tool-separator":{group:"tools",separator:!0},"create.start-event":l("bpmn:StartEvent","event","bpmn-icon-start-event-none",a("Create start event")),"create.intermediate-event":l("bpmn:IntermediateThrowEvent","event","bpmn-icon-intermediate-event-none",a("Create intermediate/boundary event")),"create.end-event":l("bpmn:EndEvent","event","bpmn-icon-end-event-none",a("Create end event")),"create.exclusive-gateway":l("bpmn:ExclusiveGateway","gateway","bpmn-icon-gateway-none",a("Create gateway"),{isMarkerVisible:!0}),"create.task":l("bpmn:Task","activity","bpmn-icon-task",a("Create task")),"create.data-object":l("bpmn:DataObjectReference","data-object","bpmn-icon-data-object",a("Create data object reference")),"create.data-store":l("bpmn:DataStoreReference","data-store","bpmn-icon-data-store",a("Create data store reference")),"create.subprocess-expanded":{group:"activity",className:"bpmn-icon-subprocess-expanded",title:a("Create expanded sub-process"),action:{dragstart:c,click:c}},"create.participant-expanded":{group:"collaboration",className:"bpmn-icon-participant",title:a("Create pool/participant"),action:{dragstart:p,click:p}},"create.group":l("bpmn:Group","artifact","bpmn-icon-group",a("Create group"))}),e};const Bb={__depends__:[Ob,pf,Yf,Cb,Rb,Ib,Ao],__init__:["paletteProvider"],paletteProvider:["type",Lb]};function qb(e,t,n,i,r){hs.call(this,e),e.on("shape.move.move",250,(function(e){var o=e.context,s=o.canExecute;o.visualReplacements||(o.visualReplacements={}),s&&s.replacements?function(e){_(e.canExecute.replacements,(function(o){var s=o.oldElementId,a={type:o.newElementType};if(!e.visualReplacements[s]){var l=t.get(s);z(a,{x:l.x,y:l.y});var c=n.createShape(a);i.addShape(c,l.parent);var p=we('[data-element-id="'+ys(l.id)+'"]',e.dragGroup);p&&Te(p,{display:"none"});var u=r.addDragger(c,e.dragGroup);e.visualReplacements[s]=u,i.removeShape(c)}}))}(o):function(e){var t=e.visualReplacements;_(t,(function(n,i){var r=we('[data-element-id="'+ys(i)+'"]',e.dragGroup);r&&Te(r,{display:"inline"}),n.remove(),t[i]&&delete t[i]}))}(o)}))}qb.$inject=["eventBus","elementRegistry","elementFactory","canvas","previewSupport"],i(qb,hs);const zb={__depends__:[Vp],__init__:["bpmnReplacePreview"],bpmnReplacePreview:["type",qb]};var Fb=40,Vb=["x","y"],Hb=Math.abs;function Ub(e){e.on(["connect.hover","connect.move","connect.end"],1250,(function(e){var t=e.context,n=t.canExecute,i=t.start,r=t.hover,o=t.source,s=t.target;e.originalEvent&&zs(e.originalEvent)||(t.initialConnectionStart||(t.initialConnectionStart=t.connectionStart),n&&r&&function(e,t,n){Vb.forEach((function(i){var r=Qb(i,t);e[i]<t[i]+n?kp(e,i,t[i]+n):e[i]>t[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]<t[n]+Qb(n,t)-20})(e,t,i)&&kp(e,i,n[i])}))}(e,r),Tr(o,"bpmn:BoundaryEvent")&&s===o.host&&function(e){var t=e.context,n=t.source,i=t.target;if(function(e){var t=e.hover,n=e.source;return t&&n&&t===n}(t))return;var r=Op(n),o=Pn(r,i,-10),s=[];/top|bottom/.test(o)&&s.push("x");/left|right/.test(o)&&s.push("y");s.forEach((function(t){var n,i=e[t];Hb(i-r[t])<Fb&&(n=i>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<t.length;i++)if(r=t[i],xp(r-e)<=n)return r}(e[n],r[n],i)},Kb.prototype.initDefaults=function(e){var t=this;_(e||{},(function(e,n){_(e,(function(e){t.add(n,e)}))}))};function Yb(e,t,n){var i=this;this._elementRegistry=e,t.on(["create.start","shape.move.start"],(function(e){i.initSnap(e)})),t.on(["create.move","create.end","shape.move.move","shape.move.end"],1250,(function(e){var t=e.context,r=t.shape,o=t.snapContext,s=t.target;if((!e.originalEvent||!zs(e.originalEvent))&&!Pp(e)&&s){var a=o.pointsForTarget(s);a.initialized||((a=i.addSnapTargetPoints(a,r,s)).initialized=!0),n.snap(e,a)}})),t.on(["create.cleanup","shape.move.cleanup"],(function(){n.hide()}))}Yb.$inject=["elementRegistry","eventBus","snapping"],Yb.prototype.initSnap=function(e){var t,n=this._elementRegistry,i=e.context,r=i.shape,o=i.snapContext;o||(o=i.snapContext=new Xb);var s=(t=n.get(r.id)?Op(r,e):{x:e.x+Op(r).x,y:e.y+Op(r).y}).x-r.width/2,a=t.y-r.height/2,l=t.x+r.width/2,c=t.y+r.height/2;return o.setSnapOrigin("mid",{x:t.x-e.x,y:t.y-e.y}),vn(r)||(o.setSnapOrigin("top-left",{x:s-e.x,y:a-e.y}),o.setSnapOrigin("bottom-right",{x:l-e.x,y:c-e.y})),o},Yb.prototype.addSnapTargetPoints=function(e,t,n){return _(this.getSnapTargets(t,n),(function(n){if(vn(n))vn(t)&&e.add("mid",Op(n));else if(yn(n)){if(n.waypoints.length<3)return;_(n.waypoints.slice(1,-1),(function(t){e.add("mid",t)}))}else e.add("mid",Op(n))})),m(t.x)&&m(t.y)?(this._elementRegistry.get(t.id)&&e.add("mid",Op(t)),e):e},Yb.prototype.getSnapTargets=function(e,t){return Sp(t).filter((function(e){return!e.hidden}))};function Zb(e,t){t.invoke(Yb,this),e.on(["create.move","create.end"],1500,Jb),e.on(["create.move","create.end","shape.move.move","shape.move.end"],1500,(function(e){var t=e.context,n=t.canExecute,i=t.target;n&&("attach"===n||n.attach)&&!Pp(e)&&function(e,t){var n,i=wn(t),r=hh(e,t),o=e.context,s=o.shape;n=s.parent?{x:0,y:0}:On(s);/top/.test(r)?kp(e,"y",i.top-n.y):/bottom/.test(r)&&kp(e,"y",i.bottom-n.y);/left/.test(r)?kp(e,"x",i.left-n.x):/right/.test(r)&&kp(e,"x",i.right-n.x)}(e,i)}))}function Jb(e){var t=e.context.createConstraints;if(t){var n=t.top,i=t.right,r=t.bottom,o=t.left;(o&&o>=e.x||i&&i<=e.x)&&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+='<strong class="'+sx.RESULT_HIGHLIGHT_CLASS+'">'+bs(e.matched)+"</strong>":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;t<n?this._resultsContainer.scrollTop=t:n<i&&(this._resultsContainer.scrollTop=i)}},sx.prototype._clearResults=function(){ie(this._resultsContainer),this._results=[],this._resetOverlay(),this._eventBus.fire("searchPad.cleared")},sx.prototype._getCurrentResult=function(){return we(sx.RESULT_SELECTED_SELECTOR,this._resultsContainer)},sx.prototype._createResultNode=function(e,t){var n=be(sx.RESULT_HTML);return e.primaryTokens.length>0&&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('<div class="'+sx.OVERLAY_CLASS+'"></div>');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='<div class="djs-search-container djs-draggable djs-scrollable"><div class="djs-search-input"><input type="text"/></div><div class="djs-search-results"></div></div>',sx.RESULT_HTML='<div class="djs-search-result"></div>',sx.RESULT_PRIMARY_HTML='<div class="djs-search-result-primary"></div>',sx.RESULT_SECONDARY_HTML='<p class="djs-search-result-secondary"></p>';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<e.length&&n.push({normal:i.substr(t.length+r,e.length)})):n.push({normal:i}),n}cx.$inject=["elementRegistry","searchPad","canvas"],cx.prototype.find=function(e){var t=this._canvas.getRootElement(),n=this._elementRegistry.filter((function(e){return!e.labelTarget}));return n=w(n,(function(e){return e!==t})),n=R(n=w(n=S(n,(function(t){return{primaryTokens:ux(oo(t),e),secondaryTokens:ux(t.id,e),element:t}})),(function(e){return px(e.primaryTokens)||px(e.secondaryTokens)})),(function(e){return oo(e.element)+e.element.id}))};const dx={__depends__:[lx],__init__:["bpmnSearch"],bpmnSearch:["type",cx]};function hx(e){Qr.call(this,e)}function fx(e){return CSS.escape(e)}i(hx,Qr),hx.Viewer=js,hx.NavigatedViewer=da,hx.prototype.createDiagram=function(){return this.importXML('<?xml version="1.0" encoding="UTF-8"?><bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" targetNamespace="http://bpmn.io/schema/bpmn" id="Definitions_1"><bpmn:process id="Process_1" isExecutable="false"><bpmn:startEvent id="StartEvent_1"/></bpmn:process><bpmndi:BPMNDiagram id="BPMNDiagram_1"><bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"><bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"><dc:Bounds height="36.0" width="36.0" x="173.0" y="102.0"/></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn:definitions>')},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.x<n.left+n.width&&t.y>n.top&&t.y<n.top+n.height)){var t,n,r,s,a,l,c=0===e.deltaMode?.02:.32,p=Math.sqrt(Math.pow(e.deltaY,2)+Math.pow(e.deltaX,2))*_x(e.deltaY)*-c;if(o._state.zoomDelta+=p,Math.abs(o._state.zoomDelta)>.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(n<t){var o=i.height*t;z(i,{x:i.x-(o-i.width)/2,width:o})}return i}(n,i.width/i.height);return{x:bx(e.x,0,i.width,r.x,r.x+r.width),y:bx(e.y,0,i.height,r.y,r.y+r.height)}}function vx(e,t){var n=t.viewbox(),i=n.width,r=n.height;t.viewbox({x:e.x-i/2,y:e.y-r/2,width:i,height:r})}function bx(e,t,n,i,r){return(e-t)*(r-i)/(n-t)+i}function xx(e,t,n){var i=function(e){var t=we(".children",e);t||ke(e,t=Le("g",{class:"children"}));return t}(t),r=[].slice.call(i.childNodes)[n];r?t.insertBefore(e,r.nextSibling):t.appendChild(e)}function wx(e){return 0===e.width&&0===e.height}gx.$inject=["config.minimap","injector","eventBus","canvas","elementRegistry"],gx.prototype._init=function(){var e=this._canvas.getContainer(),t=this._parent=document.createElement("div");te(t).add("djs-minimap"),e.appendChild(t);var n=this._toggle=document.createElement("div");te(n).add("toggle"),t.appendChild(n);var i=this._map=document.createElement("div");te(i).add("map"),t.appendChild(i);var r=this._svg=Le("svg");Te(r,{width:"100%",height:"100%"}),ke(i,r),ke(r,this._elementsGroup=Le("g"));var o=this._viewportGroup=Le("g");ke(r,o);var s=this._viewport=Le("rect");Me(s).add("viewport"),ke(o,s),de.bind(t,"mousedown",(function(e){e.stopPropagation()}));var a=this._viewportDom=document.createElement("div");te(a).add("viewport-dom"),this._parent.appendChild(a);var l=this._overlay=document.createElement("div");te(l).add("overlay"),this._parent.appendChild(l)},gx.prototype._update=function(){var e=this._canvas.viewbox(),t=e.inner,n=e.outer;if(Px(e)){var i,r,o,s,a=n.width-t.width,l=n.height-t.height;t.width<n.width?(i=t.x-a/2,o=n.width,t.x+t.width<n.width&&(i=Math.min(0,t.x))):(i=t.x,o=t.width),t.height<n.height?(r=t.y-l/2,s=n.height,t.y+t.height<n.height&&(r=Math.min(0,t.y))):(r=t.y,s=t.height),i-=50,r-=50,o+=100,s+=100,this._lastViewbox={x:i,y:r,width:o,height:s},Te(this._svg,{viewBox:i+", "+r+", "+o+", "+s}),Te(this._viewport,{x:e.x,y:e.y,width:e.width,height:e.height});var c=this._state._parentClientRect=this._parent.getBoundingClientRect(),p=this._viewport.getBoundingClientRect(),u={top:p.top-c.top,left:p.left-c.left,width:p.width,height:p.height};z(this._viewportDom.style,{top:u.top+"px",left:u.left+"px",width:u.width+"px",height:u.height+"px"});var d=Ex(c,u);z(this._overlay.style,{clipPath:d})}},gx.prototype.open=function(){z(this._state,{isOpen:!0}),te(this._parent).add("open");var e=this._injector.get("translate",!1)||function(e){return e};J(this._toggle,"title",e("Close minimap")),this._update(),this._eventBus.fire("minimap.toggle",{open:!0})},gx.prototype.close=function(){z(this._state,{isOpen:!1}),te(this._parent).remove("open");var e=this._injector.get("translate",!1)||function(e){return e};J(this._toggle,"title",e("Open minimap")),this._eventBus.fire("minimap.toggle",{open:!1})},gx.prototype.toggle=function(e){var t=this.isOpen();void 0===e&&(e=!t),e!=t&&(e?this.open():this.close())},gx.prototype.isOpen=function(){return this._state.isOpen},gx.prototype._updateElement=function(e){try{void 0!==e.parent&&null!==e.parent&&(this._removeElement(e),this._addElement(e))}catch(e){console.warn("Minimap#_updateElement errored",e)}},gx.prototype._updateElementId=function(e,t){try{var n=we("#"+fx(e.id),this._elementsGroup);n&&(n.id=t)}catch(e){console.warn("Minimap#_updateElementId errored",e)}},gx.prototype.isOnActivePlane=function(e){var t=this._canvas;return t.findRoot?t.findRoot(e)===t.getRootElement():!t.findPlane||t.findPlane(e)===t.getActivePlane()},gx.prototype._addElement=function(e){var t=this;if(this._removeElement(e),this.isOnActivePlane(e)){var n,i,r,o=this._createElement(e),s=we("#"+fx(e.parent.id),this._elementsGroup);if(o){var a=function(e,t){var n=we(".djs-children",t.parentNode);if(!n)return;var i=[].slice.call(n.childNodes),r=-1;return i.forEach((function(t,n){we(".djs-element",t)===e&&(r=n)})),r}(this._elementRegistry.getGraphics(e),this._elementRegistry.getGraphics(e.parent));return"undefined"!==a&&s?s.childNodes.length>a?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.endLength<i;)o=n[++r];var s=(i-o.startLength)/o.length;return{x:o.start.x+(o.end.x-o.start.x)*s,y:o.start.y+(o.end.y-o.start.y)*s}}function Mx(e){return f(t=e)&&v(t,"waypoints")?Ax(e):Tx({x:(n=e).x+(n.width||0)/2,y:n.y+(n.height||0)/2});var t,n}var Dx=1e5,Rx=1e5;function Nx(e,t){this._canvas=e;var n=this;t.on("diagram.init",(function(){n._init(),n.toggle(!0)})),t.on("gridSnapping.toggle",(function(e){var t=e.active;n.toggle(t),n._centerGridAroundViewbox()})),t.on("canvas.viewbox.changed",(function(e){var t=e.viewbox;n._centerGridAroundViewbox(t)}))}Nx.prototype._init=function(){var e=we("defs",this._canvas._svg);e||(e=Le("defs"),ke(this._canvas._svg,e));var t=this._pattern=Le("pattern"),n="djs-grid-pattern-"+Math.trunc(1e6*Math.random());Te(t,{id:n,width:10,height:10,patternUnits:"userSpaceOnUse"});var i=this._circle=Le("circle");Te(i,{cx:.5,cy:.5,r:.5,fill:"#ccc"}),ke(t,i),ke(e,t),Te(this._gfx=Le("rect"),{x:-Dx/2,y:-Rx/2,width:Dx,height:Rx,fill:`url(#${n})`})},Nx.prototype._centerGridAroundViewbox=function(e){e||(e=this._canvas.viewbox());var t=Mx(e);Te(this._gfx,{x:-Dx/2+Cx(t.x,10),y:-Rx/2+Cx(t.y,10)})},Nx.prototype.isVisible=function(){return this._visible},Nx.prototype.toggle=function(e){if(void 0===e&&(e=!this._visible),e!==this._visible){var t=this._getParent();e?ke(t,this._gfx):Re(t),this._visible=e}},Nx.prototype._getParent=function(){return this._canvas.getLayer("djs-grid",-2)},Nx.$inject=["canvas","eventBus"];var $x={__init__:["grid"],grid:["type",Nx]};function jx(e,t){var n,i,r=(e=e||{}).borderColor||"rgba(0,0,0,0.1)",o=e.crossColor||"#CCC",s=-1;ke(t.getLayer("djs-origin",-1),n=Bx("g",{"pointer-events":"none"})),!1!==e.showBorder&&ke(n,Bx("path",{class:Lx("border"),d:Ix(["M",-22,s,"H",-1e3,"M",22,s,"H",6e3,"M",s,-22,"V",-1e3,"M",s,22,"V",3e3]),fill:"none",stroke:r,"stroke-width":"2px","stroke-dasharray":"6, 6","shape-rendering":"crispedges"})),ke(n,Bx("path",{d:Ix(["M",-15,s,"H",15,"M",s,-15,"V",15]),class:Lx("cross"),fill:"none",stroke:o,"stroke-width":"2px","stroke-linecap":"round"})),(i=Bx("text",{x:-40,y:-10,fill:o,class:Lx("label")})).textContent="(0, 0)",ke(n,i)}function Ix(e){return e.join(" ")}function Lx(e){return"djs-origin-"+e}function Bx(e,t){var n=Le(e);return Te(n,t),n}jx.$inject=["config.origin","canvas"];const qx={__init__:[jx]};var zx={offset:{x:150,y:75},tolerance:50,alignOnSave:!0};function Fx(e,t,n,i,r,o){function s(e,n){var i=n.offset,r=n.tolerance,o={};return["x","y"].forEach((function(n){var s=-e[n]+i[n],a=t.get("gridSnapping",!1);a&&(s=function(e,t,n){n||(n="round");return Math[n](e/t)*t}(s,a.getGridSpacing())),o[n]=Math.abs(s)<r?0:s})),o}function a(){var t=r.viewbox().inner,n=r.getRootElement().children;if(n.length){var o=s(t,e);0===o.x&&0===o.y||i.execute("elements.alignToOrigin",{elements:n,delta:o})}}function l(e){return function(t){n.once("commandStack.changed",(function(){var n=t.delta,i=r.viewbox().scale;r.scroll({dx:e*n.x*i,dy:e*n.y*i})}))}}var c,p,u;e=function(e){var t=z({},zx,e||{});return m(t.offset)&&(t.offset={x:t.offset,y:t.offset}),t}(e),i.register("elements.alignToOrigin",{preExecute:function(e){var t=e.delta,n=e.elements;o.moveElements(n,t)},execute:l(-1),revert:l(1)}),e.alignOnSave&&(c=t.get("_parent",!1),p=n,((u=c&&c._eventBus)||p).on("saveXML.start",1250,a),u&&p.on("diagram.destroy",(function(){u.off("saveXML.start",a)}))),this.align=a,this.computeAdjustment=s,this._config=e}Fx.$inject=["config.alignToOrigin","injector","eventBus","commandStack","canvas","modeling"];const Vx={__init__:["alignToOrigin"],alignToOrigin:["type",Fx]};function Hx(e,t){var n=Wx(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function Ux(e,t){return k(t,(function(t){return Hx(e,t)}))}function Wx(e){return e&&e.businessObject||e}function Gx(e){return e&&e.di}function Qx(e){function t(e){if(!e.labelTarget){var t=Wx(e);Hx(t,"bpmn:Participant")&&(t=t.processRef),Hx(t,"bpmn:Process")&&(t.isExecutable=!!t.isExecutable)}}e.on(["shape.added","root.added"],(function(e){t(e.element)})),e.on("elements.changed",(function(e){e.elements.forEach((function(e){t(e)}))}))}Qx.$inject=["eventBus"];const Xx={__init__:[Qx]};var Kx,Yx,Zx,Jx,ew,tw,nw,iw,rw={},ow=[],sw=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,aw=Array.isArray;function lw(e,t){for(var n in t)e[n]=t[n];return e}function cw(e){var t=e.parentNode;t&&t.removeChild(e)}function pw(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?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;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?fw(e):null}function mw(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return mw(e)}}function gw(e){(!e.__d&&(e.__d=!0)&&Jx.push(e)&&!yw.__r++||ew!==Yx.debounceRendering)&&((ew=Yx.debounceRendering)||tw)(yw)}function yw(){var e,t,n,i,r,o,s,a,l;for(Jx.sort(nw);e=Jx.shift();)e.__d&&(t=Jx.length,i=void 0,o=(r=(n=e).__v).__e,a=[],l=[],(s=n.__P)&&((i=lw({},r)).__v=r.__v+1,Yx.vnode&&Yx.vnode(i),kw(s,i,r,n.__n,void 0!==s.ownerSVGElement,32&r.__u?[o]:null,a,null==o?fw(r):o,!!(32&r.__u),l),i.__.__k[i.__i]=i,Sw(a,i,l),i.__e!=o&&mw(i)),Jx.length>t&&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;i<l;i++)null!=(r=e.__k[i]=null==(r=t[i])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?uw(null,r,null,null,r):aw(r)?uw(dw,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?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<s&&a==s-1?a-s:0,a!==i+u&&(r.__u|=65536))):(o=n[i])&&null==o.key&&o.__e&&(o.__e==e.__d&&(e.__d=fw(o)),Tw(o,o,!1),n[i]=null,p--);if(p)for(i=0;i<c;i++)null!=(o=n[i])&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=fw(o)),Tw(o,o))}(n,t,g),l=n.__d,u=0;u<y;u++)null!=(h=n.__k[u])&&"boolean"!=typeof h&&"function"!=typeof h&&(d=-1===h.__i?rw:g[h.__i]||rw,h.__i=u,kw(e,h,d,r,o,s,a,l,c,p),f=h.__e,h.ref&&d.ref!=h.ref&&(d.ref&&Cw(d.ref,null,h),p.push(h.ref,h.__c||f,h)),null==m&&null!=f&&(m=f),65536&h.__u||d.__k===h.__k?l=bw(h,l,e):"function"==typeof h.type&&void 0!==h.__d?l=h.__d:f&&(l=f.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=l,n.__e=m}function bw(e,t,n){var i,r;if("function"==typeof e.type){for(i=e.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=e,t=bw(i[r],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function xw(e,t){return t=t||[],null==e||"boolean"==typeof e||(aw(e)?e.some((function(e){xw(e,t)})):t.push(e)),t}function ww(e,t,n,i){var r=e.key,o=e.type,s=n-1,a=n+1,l=t[n];if(null===l||l&&r==l.key&&o===l.type)return n;if(i>(null==l||131072&l.__u?0:1))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&r==l.key&&o===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&r==l.key&&o===l.type)return a;a++}}return-1}function _w(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||sw.test(t)?n:n+"px"}function Ew(e,t,n,i,r){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||_w(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||_w(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?i?n.u=i.u:(n.u=Date.now(),e.addEventListener(t,o?Pw:Ow,o)):e.removeEventListener(t,o?Pw:Ow,o);else{if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function Ow(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(Yx.event?Yx.event(e):e)}function Pw(e){return this.l[e.type+!0](Yx.event?Yx.event(e):e)}function kw(e,t,n,i,r,o,s,a,l,c){var p,u,d,h,f,m,g,y,v,b,x,w,_,E,O,P=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=t.__e=n.__e]),(p=Yx.__b)&&p(t);e:if("function"==typeof P)try{if(y=t.props,v=(p=P.contextType)&&i[p.__c],b=p?v?v.props.value:p.__:i,n.__c?g=(u=t.__c=n.__c).__=u.__E:("prototype"in P&&P.prototype.render?t.__c=u=new P(y,b):(t.__c=u=new hw(y,b),u.constructor=P,u.render=Aw),v&&v.sub(u),u.props=y,u.state||(u.state={}),u.context=b,u.__n=i,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=P.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=lw({},u.__s)),lw(u.__s,P.getDerivedStateFromProps(y,u.__s))),h=u.props,f=u.state,u.__v=t,d)null==P.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==P.getDerivedStateFromProps&&y!==h&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(y,b),!u.__e&&(null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(y,u.__s,b)||t.__v===n.__v)){for(t.__v!==n.__v&&(u.props=y,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),x=0;x<u._sb.length;x++)u.__h.push(u._sb[x]);u._sb=[],u.__h.length&&s.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(y,u.__s,b),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(h,f,m)}))}if(u.context=b,u.props=y,u.__P=e,u.__e=!1,w=Yx.__r,_=0,"prototype"in P&&P.prototype.render){for(u.state=u.__s,u.__d=!1,w&&w(t),p=u.render(u.props,u.state,u.context),E=0;E<u._sb.length;E++)u.__h.push(u._sb[E]);u._sb=[]}else do{u.__d=!1,w&&w(t),p=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++_<25);u.state=u.__s,null!=u.getChildContext&&(i=lw(lw({},i),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(m=u.getSnapshotBeforeUpdate(h,f)),vw(e,aw(O=null!=p&&p.type===dw&&null==p.key?p.props.children:p)?O:[O],t,n,i,r,o,s,a,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&s.push(u),g&&(u.__E=u.__=null)}catch(e){t.__v=null,l||null!=o?(t.__e=a,t.__u|=l?160:32,o[o.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),Yx.__e(e,t,n)}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,i,r,o,s,a,l){var c,p,u,d,h,f,m,g=n.props,y=t.props,v=t.type;if("svg"===v&&(r=!0),null!=o)for(c=0;c<o.length;c++)if((h=o[c])&&"setAttribute"in h==!!v&&(v?h.localName===v:3===h.nodeType)){e=h,o[c]=null;break}if(null==e){if(null===v)return document.createTextNode(y);e=r?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,y.is&&y),o=null,a=!1}if(null===v)g===y||a&&e.data===y||(e.data=y);else{if(o=o&&Kx.call(e.childNodes),g=n.props||rw,!a&&null!=o)for(g={},c=0;c<e.attributes.length;c++)g[(h=e.attributes[c]).name]=h.value;for(c in g)h=g[c],"children"==c||("dangerouslySetInnerHTML"==c?u=h:"key"===c||c in y||Ew(e,c,null,h,r));for(c in y)h=y[c],"children"==c?d=h:"dangerouslySetInnerHTML"==c?p=h:"value"==c?f=h:"checked"==c?m=h:"key"===c||a&&"function"!=typeof h||g[c]===h||Ew(e,c,h,g[c],r);if(p)a||u&&(p.__html===u.__html||p.__html===e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(u&&(e.innerHTML=""),vw(e,aw(d)?d:[d],t,n,i,r&&"foreignObject"!==v,o,s,o?o[0]:n.__k&&fw(n,0),a,l),null!=o)for(c=o.length;c--;)null!=o[c]&&cw(o[c]);a||(c="value",void 0!==f&&(f!==e[c]||"progress"===v&&!f||"option"===v&&f!==g[c])&&Ew(e,c,f,g[c],!1),c="checked",void 0!==m&&m!==e[c]&&Ew(e,c,m,g[c],!1))}return e}(n.__e,t,n,i,r,o,s,l,c);(p=Yx.diffed)&&p(t)}function Sw(e,t,n){t.__d=void 0;for(var i=0;i<n.length;i++)Cw(n[i],n[++i],n[++i]);Yx.__c&&Yx.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Yx.__e(e,t.__v)}}))}function Cw(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){Yx.__e(e,n)}}function Tw(e,t,n){var i,r;if(Yx.unmount&&Yx.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||Cw(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){Yx.__e(e,t)}i.base=i.__P=null,e.__c=void 0}if(i=e.__k)for(r=0;r<i.length;r++)i[r]&&Tw(i[r],t,n||"function"!=typeof e.type);n||null==e.__e||cw(e.__e),e.__=e.__e=e.__d=void 0}function Aw(e,t,n){return this.constructor(e,n)}function Mw(e,t,n){var i,r,o,s;Yx.__&&Yx.__(e,t),r=(i="function"==typeof n)?null:n&&n.__k||t.__k,o=[],s=[],kw(t,e=(!i&&n||t).__k=pw(dw,null,[e]),r||rw,rw,void 0!==t.ownerSVGElement,!i&&n?[n]:r?null:t.firstChild?Kx.call(t.childNodes):null,o,!i&&n?n:r?r.__e:t.firstChild,i,s),Sw(o,e,s)}function Dw(e,t){var n={__c:t="__cC"+iw++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,i;return this.getChildContext||(n=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,gw(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}Kx=ow.slice,Yx={__e:function(e,t,n,i){for(var r,o,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,i||{}),s=r.__d),s)return r.__E=r}catch(t){e=t}throw e}},Zx=0,hw.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=lw({},this.state),"function"==typeof e&&(e=e(lw({},n),this.props)),e&&lw(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),gw(this))},hw.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),gw(this))},hw.prototype.render=dw,Jx=[],tw="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,nw=function(e,t){return e.__v.__b-t.__v.__b},yw.__r=0,iw=0;var Rw,Nw,$w,jw,Iw=0,Lw=[],Bw=[],qw=Yx.__b,zw=Yx.__r,Fw=Yx.diffed,Vw=Yx.__c,Hw=Yx.unmount;function Uw(e,t){Yx.__h&&Yx.__h(Nw,e,Iw||t),Iw=0;var n=Nw.__H||(Nw.__H={__:[],__h:[]});return e>=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]<n[0])break;e.u=n=n[2]}};function w_(e){return this.getChildContext=function(){return e.context},e.children}function __(e){var t=this,n=e.i;t.componentWillUnmount=function(){Mw(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>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<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let i=null;for(let t of e){let e=t(n);e&&(i||(i=Object.assign({},n.props)),i[e[0].id]=e[1])}t.push(i?new X_(n.name,i,n.id,n.flags):n)}return new K_(t)}}const Y_=new WeakMap,Z_=new WeakMap;var J_;!function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"}(J_||(J_={}));class eE{constructor(e,t,n,i,r){if(this.type=e,this.children=t,this.positions=n,this.length=i,this.props=null,r&&r.length){this.props=Object.create(null);for(let[e,t]of r)this.props["number"==typeof e?e:e.id]=t}}toString(){let e=G_.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let n=e.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new hE(this.topNode,e)}cursorAt(e,t=0,n=0){let i=Y_.get(this)||this.topNode,r=new hE(i);return r.moveTo(e,t),Y_.set(this,r._tree),r}get topNode(){return new sE(this,0,0,null)}resolve(e,t=0){let n=rE(Y_.get(this)||this.topNode,e,t,!1);return Y_.set(this,n),n}resolveInner(e,t=0){let n=rE(Z_.get(this)||this.topNode,e,t,!0);return Z_.set(this,n),n}resolveStack(e,t=0){return function(e,t,n){let i=e.resolveInner(t,n),r=null;for(let e=i instanceof sE?i:i.context.parent;e;e=e.parent)if(e.index<0){let o=e.parent;(r||(r=[i])).push(o.resolve(t,n)),e=o}else{let o=G_.get(e.tree);if(o&&o.overlay&&o.overlay[0].from<=t&&o.overlay[o.overlay.length-1].to>=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<t.length&&f(t,n,_,o,_,l,i,P,k),t.reverse(),n.reverse(),i>-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<c)break;c<0&&(c=n-r),s.push(e,t,n),l++,a.next()}}if(l){let t=new Uint16Array(4*l),r=s[s.length-2];for(let e=s.length-3,n=0;e>=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<r||n.start<c)break;let u=n.id>=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&&i<s){let s=n;if(l>4){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;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],i=this.set.types[t],r=i.name;if(/\W/.test(r)&&!i.isError&&(r=JSON.stringify(r)),n==(e+=4))return r;let o=[];for(;e<n;)o.push(this.childString(e)),e=this.buffer[e+3];return r+"("+o.join(",")+")"}findChild(e,t,n,i,r){let{buffer:o}=this,s=-1;for(let a=e;a!=t&&!(iE(r,i,o[a+1],o[a+2])&&(s=a,n>0));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;){r[a++]=i[s++],r[a++]=i[s++]-n;let t=r[a++]=i[s++]-n;r[a++]=i[s++]-e,o=Math.max(o,t)}return new nE(r,o,this.set)}}function iE(e,t,n,i){switch(e){case-2:return n<t;case-1:return i>=t&&n<t;case 0:return n<t&&i>t;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.to<t);){let t=!i&&e instanceof sE&&e.index<0?null:e.parent;if(!t)return e;e=t}let o=i?0:J_.IgnoreOverlays;if(i)for(let i=e,s=i.parent;s;i=s,s=i.parent)i instanceof sE&&i.index<0&&(null===(r=s.enter(t,n,o))||void 0===r?void 0:r.from)!=i.from&&(e=s);for(;;){let i=e.enter(t,n,o);if(!i)return e;e=i}}class oE{cursor(e=0){return new hE(this,e)}getChild(e,t=null,n=null){let i=aE(this,e,t,n);return i.length?i[0]:null}getChildren(e,t=null,n=null){return aE(this,e,t,n)}resolve(e,t=0){return rE(this,e,t,!1)}resolveInner(e,t=0){return rE(this,e,t,!0)}matchContext(e){return lE(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}}class sE extends oE{constructor(e,t,n,i){super(),this._tree=e,this.from=t,this.index=n,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,i,r=0){for(let o=this;;){for(let{children:s,positions:a}=o._tree,l=t>0?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)&&(t<0?r>=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;i<e.length;i++){let r=e[i];(r.from>n.from||r.to<n.to)&&(n=r,t=i)}let i=n instanceof sE&&n.index<0?null:n.parent,r=e.slice();return i?r[t]=i:r.splice(t,1),new dE(r,n)}class dE{constructor(e,t){this.heads=e,this.node=t}get next(){return uE(this.heads)}}class hE{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof sE)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:n,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=n+i.buffer[e+1],this.to=n+i.buffer[e+2],!0}yield(e){return!!e&&(e instanceof sE?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:i}=this.buffer,r=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,n);return!(r<0)&&(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&J_.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&J_.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&J_.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(i.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=i)}else({index:t,_parent:n}=this._tree);for(;n;({index:t,_parent:n}=n))if(t>-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<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let i=this.index,r=this.stack.length;r>=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<this.stack.length;e++)t=new pE(this.buffer,t,this.stack[e]);return this.bufferNode=new pE(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let i=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&t&&t(this),i=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,i=!0}}}matchContext(e){if(!this.buffer)return lE(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let i=e.length-1,r=this.stack.length-1;i>=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<r;n++)c+=gE(e,t[n]);let p=Math.ceil(1.5*c/8),u=[],d=[];return function t(n,i,r,s,a){for(let c=r;c<s;){let r=c,h=i[c],f=gE(e,n[c]);for(c++;c<s;c++){let t=gE(e,n[c]);if(f+t>=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<t.length?t[s]:null,p=c?c.fromA:1e9;if(p-a>=n)for(;o&&o.from<p;){let t=o;if(a>=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=r<e.length?e[r++]:null}if(!c)break;a=c.toA,l=c.toA-c.toB}return i}}class bE{startParse(e,t,n){return"string"==typeof e&&(e=new xE(e)),n=n?n.length?n.map((e=>new 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.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new AE(this.fragments),t=null,n=null,i=new hE(new sE(this.baseTree,this.ranges[0].from,0,null),J_.IncludeAnonymous|J_.IgnoreMounts);e:for(let r,o;;){let s,a=!0;if(null!=this.stoppedAt&&i.from>=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.from<o&&e.to>r))&&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.from<i.to||!r.overlay)){i.tree||CE(i);let o=e.findMounts(i.from,r.parser);if("function"==typeof r.overlay)t=new EE(r.parser,r.overlay,o,this.inner.length,i.from,i.tree,t);else{let e=ME(this.ranges,r.overlay||(i.from<i.to?[new U_(i.from,i.to)]:[]));e.length&&_E(e),!e.length&&r.overlay||this.inner.push(new wE(r.parser,e.length?r.parser.startParse(this.input,RE(o,e),e):r.parser.startParse(""),r.overlay?r.overlay.map((e=>new 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<s.to)){let e=t.ranges.length-1;e>=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<n){let s=e.buffer[t+1];i.push(e.slice(t,n,s)),r.push(s-o)}}function CE(e){let{node:t}=e,n=[],i=t.context.buffer;do{n.push(e.index),e.parent()}while(!e.tree);let r=e.tree,o=r.children.indexOf(i),s=r.children[o],a=s.buffer,l=[o];r.children[o]=function e(i,r,o,c,p,u){let d=n[u],h=[],f=[];SE(s,i,d,h,f,c);let m=a[d+1],g=a[d+2];l.push(h.length);let y=u?e(d+4,a[d+3],s.set.types[a[d]],m,g-m,u-1):t.toTree();return h.push(y),f.push(m-c),SE(s,a[d+3],r,h,f,c),new eE(o,h,f,p)}(0,a.length,X_.none,0,s.length,n.length-1);for(let t of l){let n=e.tree.children[t],i=e.tree.positions[t];e.yield(new sE(n,i+e.from,t,e._tree))}}class TE{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(J_.IncludeAnonymous|J_.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)t.to>=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<this.fragments.length;t++){let n=this.fragments[t];if(n.from>=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<e.length;r++){let s=e[r-1].to,a=e[r].from;for(;o<i.length;o++){let e=i[o];if(e.from>=a)break;e.to<=s||(n||(i=n=t.slice()),e.from<s?(n[o]=new U_(e.from,s),e.to>a&&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);e<t&&c.push(new U_(e,t))}if(l=Math.min(p,u),1e9==l)break;p==l&&(s?(s=!1,r++):s=!0),u==l&&(a?(a=!1,o++):a=!0)}return c}function RE(e,t){let n=[];for(let{pos:i,mount:r,frag:o}of e){let e=i+(r.overlay?r.overlay[0].from:0),s=e+r.tree.length,a=Math.max(o.from,e),l=Math.min(o.to,s);if(r.overlay){let s=DE(t,r.overlay.map((e=>new 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<this.pos-25;o&&this.setLookAhead(this.pos);let s=r.dynamicPrecedence(i);if(s&&(this.score+=s),0==n)return this.pushState(r.getGoto(this.state,i,!0),this.reducePos),i<r.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),void this.reduceContext(i,this.reducePos);let a=this.stack.length-3*(n-1)-(262144&e?6:0),l=a?this.stack[a-2]:this.p.ranges[0].from,c=this.reducePos-l;c>=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.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=c));let p=a?this.stack[a-1]:0,u=this.bufferBase+this.buffer.length-p;if(i<r.minRepeatTerm||131072&e){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,l,e,u+4,!0)}if(262144&e)this.state=this.stack[a];else{let e=this.stack[a-3];this.state=r.getGoto(e,i,!0)}for(;this.stack.length>a;)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]<this.buffer.length+this.bufferBase)){let e=this,i=this.buffer.length;if(0==i&&e.parent&&(i=e.bufferBase-e.parent.bufferBase,e=e.parent),i>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;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let i=t[e+1];n.some(((e,t)=>1&t&&e==i))||n.push(t[e],i)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let i=t[e+1];if(i==this.state)continue;let r=this.split();r.pushState(i,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(t[e],this.pos),r.reducePos=this.pos,r.score-=200,n.push(r)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(65536&t))return!1;if(!e.validAction(this.state,t)){let n=t>>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;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new jE(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.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<e.length;){let o=0;for(;;){let t=e.charCodeAt(i++),n=!1;if(126==t){o=65535;break}t>=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(;r<n.from;){if(!i)return null;let e=this.ranges[--i];r-=n.from-e.to,n=e}for(;t<0?r>n.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&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t,n,i=this.chunkOff+e;if(i>=0&&i<this.chunk.length)t=this.pos+e,n=this.chunk.charCodeAt(i);else{let i=this.resolveOffset(e,1);if(null==i)return-1;if(t=i,t>=this.chunk2Pos&&t<this.chunk2Pos+this.chunk2.length)n=this.chunk2.charCodeAt(t-this.chunk2Pos);else{let e=this.rangeIndex,i=this.range;for(;i.to<=t;)i=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=t),t+this.chunk2.length>i.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.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.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.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(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<<i,{dialect:l}=n.p.parser;e:for(;a&e[s];){let n=e[s+1];for(let i=s+3;i<n;i+=2)if((e[i+1]&a)>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<p;){let r=c+p>>1,o=n+r+(r<<1),a=e[o],l=e[o+1]||65536;if(i<a)p=r;else{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)<r}const QE=void 0!==NE&&NE.env&&/\bparse\b/.test(NE.env.LOG);let XE=null;function KE(e,t,n){let i=e.cursor(J_.IncludeAnonymous);for(i.moveTo(t);;)if(!(n<0?i.childBefore(t):i.childAfter(t)))for(;;){if((n<0?i.to<t:i.from>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(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],i=this.index[t];if(i==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let r=n.children[i],o=this.start[t]+n.positions[i];if(o>e)return this.nextStart=o,null;if(r instanceof eE){if(o==e){if(o<this.safeFrom)return null;let e=o+r.length;if(e<=this.safeTo){let t=r.prop(W_.lookAhead);if(!t||e+t<this.fragment.to)return r}}this.index[t]++,o+r.length>=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;i<r.length;i++){if(!(1<<i&o))continue;let l=r[i],c=this.tokens[i];if((!n||l.fallback)&&((l.contextual||c.start!=e.pos||c.mask!=o||c.context!=s)&&(this.updateCachedToken(c,l,e),c.mask=o,c.context=s),c.lookAhead>c.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<t.specialized.length;i++)if(t.specialized[i]==e.value){let r=t.specializers[i](this.stream.read(e.start,e.end),n);if(r>=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;t<i;t+=3)if(this.actions[t]==e)return i;return this.actions[i++]=e,this.actions[i++]=t,this.actions[i++]=n,i}addActions(e,t,n,i){let{state:r}=e,{parser:o}=e.p,{data:s}=o;for(let e=0;e<2;e++)for(let a=o.stateSlot(r,e?2:1);;a+=3){if(65535==s[a]){if(1!=s[a+1]){0==i&&2==s[a+1]&&(i=this.putAction(oO(s,a+2),t,n,i));break}a=oO(s,a+2)}s[a]==t&&(i=this.putAction(oO(s,a+1),t,n,i))}return i}}class JE{constructor(e,t,n,i){this.parser=e,this.input=t,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new FE(t,i),this.tokens=new ZE(e,this.stream),this.topTerm=e.top[1];let{from:r}=i[0];this.stacks=[$E.start(this,e.top[0],r)],this.fragments=n.length&&this.stream.end-r>4*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;o<n.length;o++){let s=n[o];for(;;){if(this.tokens.mainToken=null,s.pos>i)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.score<n.score)&&(t=n)}return t}(e);if(t)return QE&&console.log("Finish with "+this.stackID(t)),this.stackToTree(t);if(this.parser.strict)throw QE&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+i);this.recovering||(this.recovering=5)}if(this.recovering&&e){let n=null!=this.stoppedAt&&e[0].pos>this.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;e<r.length-1;e++){let t=r[e];for(let n=e+1;n<r.length;n++){let i=r[n];if(t.sameState(i)||t.buffer.length>500&&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<r.length;e++)r[e].pos<this.minStackPos&&(this.minStackPos=r[e].pos);return null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,n){let i=e.pos,{parser:r}=this,o=QE?this.stackID(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;s<a.length;){let l=a[s++],c=a[s++],p=a[s++],u=s==a.length||!n,d=u?e:e.split(),h=this.tokens.mainToken;if(d.apply(l,c,h?h.start:d.pos,p),QE&&console.log(o+this.stackID(d)+` (via ${65536&l?`reduce of ${r.getName(65535&l)}`:"shift"} for ${r.getName(c)} @ ${i}${d==e?"":", split"})`),u)return!0;d.pos>i?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<e.length;o++){let s=e[o],a=t[o<<1],l=t[1+(o<<1)],c=QE?this.stackID(s)+" -> ":"";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.score<s.score)&&(i=s)}return i}stackToTree(e){return e.close(),eE.build({buffer:LE.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(XE||(XE=new WeakMap)).get(e);return t||XE.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function eO(e,t){for(let n=0;n<t.length;n++){let i=t[n];if(i.pos==e.pos&&i.sameState(e))return void(t[n].score<e.score&&(t[n]=e))}t.push(e)}class tO{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||0==this.disabled[e]}}const nO=e=>e;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;n<e.repeatNodeCount;n++)t.push("");let n=Object.keys(e.topRules).map((t=>e.topRules[t][1])),i=[];for(let e=0;e<t.length;e++)i.push([]);function r(e,t,n){i[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];"string"==typeof e&&(e=W_[e]);for(let n=1;n<t.length;){let i=t[n++];if(i>=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<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(sO),this.states=BE(e.states,Uint32Array),this.data=BE(e.stateData),this.goto=BE(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map((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);r<n;r++)if(i[r]==e)return s;if(o)return-1}}hasAction(e,t){let n=this.data;for(let i=0;i<2;i++)for(let r,o=this.stateSlot(e,i?2:1);;o+=3){if(65535==(r=n[o])){if(1!=n[o+1]){if(2==n[o+1])return oO(n,o+2);break}r=n[o=oO(n,o+2)]}if(r==t||0==r)return oO(n,o+1)}return 0}stateSlot(e,t){return this.states[6*e+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}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;e<t.length;e++)if(!n[e])for(let n,r=this.dialects[t[e]];65535!=(n=this.data[r++]);)(i||(i=new Uint8Array(this.maxTerm+1)))[n]=1;return new tO(e,n,i)}static deserialize(e){return new rO(e)}}function oO(e,t){return e[t]|e[t+1]<<16}function sO(e){if(e.external){let t=e.extend?1:0;return(n,i)=>e.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;n<e.length;n++)for(let i=0,r=t.length;i<r;i++)t.push(t[i].concat(e[n]));return t.sort(((e,t)=>t.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<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function fO(e,t){let n=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)n[e.id]=t.class;else n[t.tag.id]=t.class;let{scope:i,all:r=null}=t||{};return{style:e=>{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<u.overlay.length?u.overlay[d]:null,m=f?f.from+s:a,g=Math.max(t,h),y=Math.min(n,m);if(g<y&&p)for(;e.from<y&&(this.highlightRange(e,g,y,i,r),this.startSpan(Math.min(y,e.to),l),!(e.to>=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&&o<this.text.length;o++){let s=this.text[o],a=r+s.length;r>e&&o&&(i+=n),e<a&&t>r&&(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<this.children.length;r++){let s=this.children[r],a=o+s.length;if(e<=a&&t>=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<this.lines)for(let i=0,r=0;i<this.children.length;i++){let o=this.children[i],s=r+o.length;if(e>=r&&t<=s){let a=o.replace(e-r,t-r,n),l=this.lines-o.lines+a.lines;if(a.lines<l>>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;r<this.children.length&&o<=t;r++){let s=this.children[r],a=o+s.length;o>e&&r&&(i+=n),e<a&&t>o&&(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<e.length&&r<=i;o++){let a=e[o],l=r+a.length;l>=n&&(l>i&&(a=a.slice(0,i-r)),r<n&&(a=a.slice(n-r)),s?(t[t.length-1]+=a,s=!1):t.push(a)),r=l+1}return t}function IO(e,t,n){return jO(e,[""],t,n)}RO.empty=new NO([""],0);class LO{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?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;e<VO.length;e++)VO[e]+=VO[e-1];function HO(e){for(let t=1;t<VO.length;t+=2)if(VO[t]>e)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<e.length;){let r=YO(e,t);if(8205==i||8205==r||n&&HO(r))t+=JO(r),i=r;else{if(!UO(r))break;{let n=0,i=t-2;for(;i>=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<t)return i;t--}return 0}function XO(e){return e>=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;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,i=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(n,i,r),i+=r):i+=o,n+=r}}iterChangedRanges(e,t=!1){sP(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],i=this.sections[t++];i<0?e.push(n,i):e.push(i,n)}return new nP(e)}composeDesc(e){return this.empty?e:e.empty?this:lP(this,e)}mapDesc(e,t=!1){return e.empty?this:aP(this,e,t)}mapPos(e,t=-1,n=tP.Simple){let i=0,r=0;for(let o=0;o<this.sections.length;){let s=this.sections[o++],a=this.sections[o++],l=i+s;if(a<0){if(l>e)return r+(e-i);r+=s}else{if(n!=tP.Simple&&l>=e&&(n==tP.TrackDel&&i<e&&l>e||n==tP.TrackBefore&&i<e||n==tP.TrackAfter&&l>e))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<this.sections.length&&i<=t;){let r=i+this.sections[n++];if(this.sections[n++]>=0&&i<=t&&r>=e)return!(i<e&&r>t)||"cover";i=r}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],i=this.sections[t++];e+=(e?" ":"")+n+(i>=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<t.length;i+=2){let o=t[i],s=t[i+1];if(s>=0){t[i]=s,t[i+1]=o;let a=i>>1;for(;n.length<a;)n.push(RO.empty);n.push(o?e.slice(r,r+o):RO.empty)}r+=o}return new iP(t,n)}compose(e){return this.empty?e:e.empty?this:lP(this,e,!0)}map(e,t=!1){return e.empty?this:aP(this,e,t,!0)}iterChanges(e,t=!1){sP(this,e,t)}get desc(){return nP.create(this.sections)}filter(e){let t=[],n=[],i=[],r=new cP(this);e:for(let o=0,s=0;;){let a=o==e.length?1e9:e[o++];for(;s<a||s==a&&0==r.len;){if(r.done)break e;let e=Math.min(r.len,a-s);rP(i,e,-1);let o=-1==r.ins?-1:0==r.off?r.ins:0;rP(t,e,o),o>0&&oP(n,t,r.text),r.forward(e),s+=e}let l=e[o++];for(;s<l;){if(r.done)break e;let e=Math.min(r.len,l-s);rP(t,e,-1),rP(i,e,-1==r.ins?-1:0==r.off?r.ins:0),r.forward(e),s+=e}}return{changes:new iP(t,n),filtered:nP.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],i=this.sections[t+1];i<0?e.push(n):0==i?e.push([n]):e.push([n].concat(this.inserted[t>>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;o<t&&rP(i,t-o,-1);let n=new iP(i,r);s=s?s.compose(n.map(s)):n,i=[],r=[],o=0}return function e(l){if(Array.isArray(l))for(let t of l)e(t);else if(l instanceof iP){if(l.length!=t)throw new RangeError(`Mismatched change set length (got ${l.length}, expected ${t})`);a(),s=s?s.compose(l.map(s)):l}else{let{from:e,to:s=e,insert:c}=l;if(e>s||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;e<o&&a(),e>o&&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;i<e.length;i++){let r=e[i];if("number"==typeof r)t.push(r,-1);else{if(!Array.isArray(r)||"number"!=typeof r[0]||r.some(((e,t)=>t&&"string"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==r.length)t.push(r[0],0);else{for(;n.length<i;)n.push(RO.empty);n[i]=RO.of(r.slice(1)),t.push(r[0],n[i].length)}}}return new iP(t,n)}static createSet(e,t){return new iP(e,t)}}function rP(e,t,n,i=!1){if(0==t&&n<=0)return;let r=e.length-2;r>=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<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<i;)e.push(RO.empty);e.push(n)}}function sP(e,t,n){let i=e.inserted;for(let r=0,o=0,s=0;s<e.sections.length;){let a=e.sections[s++],l=e.sections[s++];if(l<0)r+=a,o+=a;else{let c=r,p=o,u=RO.empty;for(;c+=a,p+=l,l&&i&&(u=u.append(i[s-2>>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<s.len||a.len==s.len&&!n))){let t=a.len;for(rP(r,a.ins,-1);t;){let n=Math.min(s.len,t);s.ins>=0&&e<s.i&&s.len<=n&&(rP(r,0,s.ins),o&&oP(o,r,s.text),e=s.i),s.forward(n),t-=n}a.next()}else{if(!(s.ins>=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.len<n))break;n-=a.len,a.next()}rP(r,t,e<s.i?s.ins:0),o&&e<s.i&&oP(o,r,s.text),e=s.i,s.forward(s.len-n)}}}function lP(e,t,n=!1){let i=[],r=n?[]:null,o=new cP(e),s=new cP(t);for(let e=!1;;){if(o.done&&s.done)return r?iP.createSet(i,r):nP.create(i);if(0==o.ins)rP(i,o.len,0,e),o.next();else if(0!=s.len||s.done){if(o.done||s.done)throw new Error("Mismatched change set lengths");{let t=Math.min(o.len2,s.len),n=i.length;if(-1==o.ins){let n=-1==s.ins?-1:s.off?0:s.ins;rP(i,t,n,e),r&&n&&oP(r,i,s.text)}else-1==s.ins?(rP(i,o.off?0:o.len,t,e),r&&oP(r,i,o.textBit(t))):(rP(i,o.off?0:o.len,s.off?0:s.ins,e),r&&!s.off&&oP(r,i,s.text));e=(o.ins>t||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<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>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;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new uP([this.main],0)}addRange(e,t=!0){return uP.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,uP.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((e=>e.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;i<e.length;i++){let r=e[i];if(r.empty?r.from<=n:r.from<n)return uP.normalized(e.slice(),t);n=r.to}return new uP(e,t)}static cursor(e,t=0,n,i){return pP.create(e,e,(0==t?0:t<0?8:16)|(null==n?7:Math.min(6,n))|(null!=i?i:16777215)<<6)}static range(e,t,n,i){let r=(null!=n?n:16777215)<<6|(null==i?7:Math.min(6,i));return t<e?pP.create(t,e,48|r):pP.create(e,t,(t>e?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;n<e.length;n++){let i=e[n],r=e[n-1];if(i.empty?i.from<=r.to:i.from<r.to){let o=r.from,s=Math.max(i.to,r.to);n<=t&&t--,e.splice(--n,2,i.anchor>i.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;i<e.length;i++)if(!n(e[i],t[i]))return!1;return!0}function vP(e,t){let n=!1;for(let i of t)1&DP(e,i)&&(n=!0);return n}function bP(e,t,n){let i=n.map((t=>e[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;t<i.length;t++){let o=RP(e,i[t]);if(2==r[t])for(let e of o)n.push(e);else n.push(o)}return t.combine(n)}return{create(e){for(let t of i)DP(e,t);return e.values[s]=a(e),1},update(e,n){if(!vP(e,o))return 0;let i=a(e);return t.compare(i,e.values[s])?0:(e.values[s]=i,1)},reconfigure(e,r){let o=vP(e,i),l=r.config.facets[t.id],c=r.facet(t);if(l&&!o&&mP(n,l))return e.values[s]=c,0;let p=a(e);return t.compare(p,c)?(e.values[s]=c,0):(e.values[s]=p,1)}}}const xP=fP.define({static:!0});class wP{constructor(e,t,n,i,r){this.id=e,this.createF=t,this.updateF=n,this.compareF=i,this.spec=r,this.provides=void 0}static define(e){let t=new wP(hP++,e.create,e.update,e.compare||((e,t)=>e===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<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>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.length&&(r==t.length||t[r]>=e[i]))o=e[i++],s=e[i++];else{if(!(r<t.length))return n;o=t[r++],s=t[r++]}!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function GP(e,t,n){var i;let r,o,s;return n?(r=t.changes,o=iP.empty(t.changes.length),s=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),o=e.changes.mapDesc(t.changes,!0),s=e.changes.compose(r)),{changes:s,selection:t.selection?t.selection.map(o):null===(i=e.selection)||void 0===i?void 0:i.map(r),effects:HP.mapEffects(e.effects,r).concat(HP.mapEffects(t.effects,o)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function QP(e,t,n){let i=t.selection,r=YP(t.annotations);return t.userEvent&&(r=r.concat(UP.userEvent.of(t.userEvent))),{changes:t.changes instanceof iP?t.changes:iP.of(t.changes||[],n,e.facet(jP)),selection:i&&(i instanceof uP?i:uP.single(i.anchor,i.head)),effects:YP(t.effects),annotations:r,scrollIntoView:!!t.scrollIntoView}}function XP(e,t,n){let i=QP(e,t.length?t[0]:{},e.doc.length);t.length&&!1===t[0].filter&&(n=!1);for(let r=1;r<t.length;r++){!1===t[r].filter&&(n=!1);let o=!!t[r].sequential;i=GP(i,QP(e,t[r],o?i.changes.newLength:e.doc.length),o)}let r=UP.create(e,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return function(e){let t=e.startState,n=t.facet(BP),i=e;for(let r=n.length-1;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<e.length;t++){let n=e[t];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||JP.test(n)))return!0}return!1}(t))return ZP.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[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;e<this.config.dynamicSlots.length;e++)DP(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(null!=n)return DP(this,n),RP(this,n);if(t)throw new RangeError("Field is not present in this state")}update(...e){return XP(this,e,!0)}applyTransaction(e){let t,n=this.config,{base:i,compartments:r}=n;for(let t of e.effects)t.is(TP.reconfigure)?(n&&(r=new Map,n.compartments.forEach(((e,t)=>r.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;n<t.ranges.length;n++){let s=e(t.ranges[n]),a=this.changes(s.changes),l=a.map(i);for(let e=0;e<n;e++)r[e]=r[e].map(l);let c=i.mapDesc(a,!0);r.push(s.range.map(c)),i=i.compose(l),o=HP.mapEffects(o,l).concat(HP.mapEffects(YP(s.effects),c))}return{changes:i,selection:uP.create(r,t.mainIndex),effects:o}}changes(e=[]){return e instanceof iP?e:iP.of(e,this.doc.length,this.facet(nk.lineSeparator))}toText(e){return RO.of(e.split(this.facet(nk.lineSeparator)||eP))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(DP(this,t),RP(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let i=e[n];i instanceof wP&&null!=this.config.address[i.id]&&(t[n]=i.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||"string"!=typeof e.doc)throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(n)for(let t in n)if(Object.prototype.hasOwnProperty.call(e,t)){let r=n[t],o=e[t];i.push(r.init((e=>r.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(;s<i;){let e=WO(t,s);if(r(t.slice(s,e))!=ZP.Word)break;s=e}return o==s?null:uP.range(o+n,s+n)}}function ik(e,t,n={}){let i={};for(let t of e)for(let e of Object.keys(t)){let r=t[e],o=i[e];if(void 0===o)i[e]=r;else if(o===r||void 0===r);else{if(!Object.hasOwnProperty.call(n,e))throw new Error("Config merge conflict for field "+e);i[e]=n[e](o,r)}}for(let e in t)void 0===i[e]&&(i[e]=t[e]);return i}nk.allowMultipleSelections=$P,nk.tabSize=fP.define({combine:e=>e.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);r<o;r++)if(!1===i(this.from[r]+e,this.to[r]+e,this.value[r]))return!1}map(e,t){let n=[],i=[],r=[],o=-1,s=-1;for(let a=0;a<this.value.length;a++){let l,c,p=this.value[a],u=this.from[a]+e,d=this.to[a]+e;if(u==d){let e=t.mapPos(u,p.startSide,p.mapMode);if(null==e)continue;if(l=c=e,p.startSide!=p.endSide&&(c=t.mapPos(u,p.endSide),c<l))continue}else if(l=t.mapPos(u,p.startSide),c=t.mapPos(d,p.endSide),l>c||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<t.length;)if(a<t.length&&(s.from-t[a].from||s.startSide-t[a].value.startSide)>=0){let e=t[a++];c.addInner(e.from,e.to,e.value)||l.push(e)}else 1==s.rangeIndex&&s.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(s.chunkIndex)<t[a].from)&&(!o||i>this.chunkEnd(s.chunkIndex)||r<this.chunkPos[s.chunkIndex])&&c.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||i>s.to||r<s.from||o(s.from,s.to,s.value))&&(c.addInner(s.from,s.to,s.value)||l.push(ok.create(s.from,s.to,s.value))),s.next());return c.finishInner(this.nextLayer.isEmpty&&!l.length?lk.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:r}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],i=-1;for(let r=0;r<this.chunk.length;r++){let o=this.chunkPos[r],s=this.chunk[r],a=e.touchesRange(o,o+s.length);if(!1===a)i=Math.max(i,s.maxPoint),t.push(s),n.push(e.mapPos(o));else if(!0===a){let{mapped:r,pos:a}=s.map(o,e);r&&(i=Math.max(i,r.maxPoint),t.push(r),n.push(a))}}let r=this.nextLayer.map(e);return 0==t.length?r:new lk(n,t,r||lk.empty,i)}between(e,t,n){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let r=this.chunkPos[i],o=this.chunk[i];if(t>=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.pointFrom<t?n.length+1:o.point.startSide<0?n.length:Math.min(n.length,a);i.point(s,e,o.point,n,r,o.pointRank),a=Math.min(o.openEnd(e),n.length)}else e>s&&(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;n<e.length;n++){let i=e[n];if(sk(t,i)>0)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<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&i.set(t.chunk[e],t.chunkPos[e]);let r=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let o=i.get(e.chunk[t]);null==o||(n?n.mapPos(o):o)!=e.chunkPos[t]||(null==n?void 0:n.touchesRange(o,o+e.chunk[t].length))||r.add(e.chunk[t])}return r}class uk{constructor(e,t,n,i=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class dk{constructor(e){this.heap=e}static from(e,t=null,n=-1){let i=[];for(let r=0;r<e.length;r++)for(let o=e[r];!o.isEmpty;o=o.nextLayer)o.maxPoint>=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<e.length&&r.compare(e[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(;t<this.activeRank.length&&(r-this.activeRank[t]||i-this.activeTo[t])>0;)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<this.cursor.to)){this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[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<e.length;n++)if(e[n]!=t[n]&&!e[n].eq(t[n]))return!1;return!0}function yk(e,t){for(let n=t,i=e.length-1;n<i;n++)e[n]=e[n+1];e.pop()}function vk(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function bk(e,t){let n=-1,i=1e9;for(let r=0;r<t.length;r++)(t[r]-i||e[r].endSide-e[n].endSide)<0&&(n=r,i=t[r]);return n}function xk(e,t,n=e.length){let i=0;for(let r=0;r<n;)9==e.charCodeAt(r)?(i+=t-i%t,r++):(i++,r=WO(e,r));return i}const wk="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),_k="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Ek="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class Ok{constructor(e,t){this.rules=[];let{finish:n}=t||{};function i(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function r(e,t,o,s){let a=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return o.push(e[0]+";");for(let n in t){let s=t[n];if(/&/.test(n))r(n.split(/,\s*/).map((t=>e.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<e.length;t++){let o=e[t],s=this.modules.indexOf(o);if(s<r&&s>-1&&(this.modules.splice(s,1),r--,s=-1),-1==s){if(this.modules.splice(r++,0,o),n)for(let e=0;e<o.rules.length;e++)n.insertRule(o.rules[e],i++)}else{for(;r<s;)i+=this.modules[r++].rules.length;i+=o.rules.length,r++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e;let n=t.head||t;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var Sk={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Ck={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",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;e<t.length;){let n=t[e++],i=t[e++],r=t[e++];n.scrollTop!=i&&(n.scrollTop=i),n.scrollLeft!=r&&(n.scrollLeft=r)}}}function Xk(e,t,n=t){let i=Wk||(Wk=document.createRange());return i.setEnd(e,n),i.setStart(e,t),i}function Kk(e,t,n,i){let r={key:t,code:t,keyCode:n,which:n,cancelable:!0};i&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=i);let o=new KeyboardEvent("keydown",r);o.synthetic=!0,e.dispatchEvent(o);let s=new KeyboardEvent("keyup",r);return s.synthetic=!0,e.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function Yk(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}function Zk(e){return e.scrollTop>Math.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&&i<n.nodeValue.length)return{node:n,offset:i};if(1==n.nodeType&&i<n.childNodes.length){if("false"==n.contentEditable)return null;n=n.childNodes[i],i=0}else{if(!n.parentNode||Bk(n))return null;i=Lk(n)+1,n=n.parentNode}}}class tS{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new tS(e.parentNode,Lk(e),t)}static after(e,t){return new tS(e.parentNode,Lk(e)+1,t)}}const nS=[];class iS{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(2&this.flags){let n,i=this.dom,r=null;for(let o of this.children){if(7&o.flags){if(!o.dom&&(n=r?r.nextSibling:i.firstChild)){let e=iS.get(n);(!e||!e.parent&&e.canReuseDOM(o))&&o.reuseDOM(n)}o.sync(e,t),o.flags&=-8}if(n=r?r.nextSibling:i.firstChild,t&&!t.written&&t.node==i&&n!=o.dom&&(t.written=!0),o.dom.parentNode==i)for(;n&&n!=o.dom;)n=rS(n);else i.insertBefore(o.dom,n);r=o.dom}for(n=r?r.nextSibling:i.firstChild,n&&t&&t.node==i&&(t.written=!0);n;)n=rS(n)}else if(1&this.flags)for(let n of this.children)7&n.flags&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let i=0==zk(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==this.dom)break;0==i&&t.firstChild!=t.lastChild&&(i=e==t.firstChild?-1:1),e=t}n=i<0?e:e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!iS.get(n);)n=n.nextSibling;if(!n)return this.length;for(let e=0,t=0;;e++){let i=this.children[e];if(i.dom==n)return t;t+=i.length+i.breakAfter}}domBoundsAround(e,t,n=0){let i=-1,r=-1,o=-1,s=-1;for(let a=0,l=n,c=n;a<this.children.length;a++){let n=this.children[a],p=l+n.length;if(l<e&&p>t)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<this.children.length&&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;i<t;i++){let e=this.children[i];e.parent==this&&n.indexOf(e)<0&&e.destroy()}n.length<250?this.children.splice(e,t-e,...n):this.children=[].concat(this.children.slice(0,e),n,this.children.slice(t));for(let e=0;e<n.length;e++)n[e].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new oS(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==e?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,n,i,r,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!(8&(this.flags|e.flags))}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}function rS(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}iS.prototype.breakAfter=0;class oS{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}findPos(e,t=1){for(;;){if(e>this.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(i<c.length){let e=c[i];e&&(r<e.length||e.breakAfter&&(null==u?void 0:u.breakAfter))?(t==i&&(e=e.split(r),r=0),!d&&u&&e.merge(0,r,u,!0,0,l)?o[o.length-1]=e:((r||e.children.length&&!e.children[0].length)&&e.merge(0,r,null,!1,0,l),o.push(e))):(null==e?void 0:e.breakAfter)&&(u?u.breakAfter=1:s=1),i++}for(p&&(p.breakAfter=s,n>0&&(!s&&o.length&&p.merge(n,p.length,o[0],!1,a,0)?p.breakAfter=o.shift().breakAfter:(n<p.length||p.children.length&&0==p.children[p.children.length-1].length)&&p.merge(n,p.length,null,!1,a,0),t++));t<i&&o.length;)if(c[i-1].become(o[o.length-1]))i--,o.pop(),l=o.length?0:a;else{if(!c[t].become(o[0]))break;t++,o.shift(),a=o.length?0:l}!o.length&&t&&i<c.length&&!c[t-1].breakAfter&&c[i].merge(0,0,c[t-1],!1,a,l)&&t--,(t<i||o.length)&&e.replaceChildren(t,i,o)}}function aS(e,t,n,i,r,o){let s=e.childCursor(),{i:a,off:l}=s.findPos(n,1),{i:c,off:p}=s.findPos(t,-1),u=t-n;for(let e of i)u+=e.length;e.length+=u,sS(e,c,p,a,l,i,0,r,o)}let lS="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},cS="undefined"!=typeof document?document:{documentElement:{style:{}}};const pS=/Edge\/(\d+)/.exec(lS.userAgent),uS=/MSIE \d/.test(lS.userAgent),dS=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(lS.userAgent),hS=!!(uS||dS||pS),fS=!hS&&/gecko\/(\d+)/i.test(lS.userAgent),mS=!hS&&/Chrome\/(\d+)/.exec(lS.userAgent),gS="webkitFontSmoothing"in cS.documentElement.style,yS=!hS&&/Apple Computer/.test(lS.vendor),vS=yS&&(/Mobile\/\w+/.test(lS.userAgent)||lS.maxTouchPoints>2);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<i&&(o++,s=-1)):n<0?r--:o<i&&o++;let a=Xk(e,r,o).getClientRects();if(!a.length)return null;let l=a[(s?s<0:n>=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||t<this.length&&o<=0))&&(aS(this,e,t,n?n.children.slice():[],r-1,o-1),this.markDirty(),!0)}split(e){let t=[],n=0,i=-1,r=0;for(let o of this.children){let s=n+o.length;s>e&&t.push(n<e?o.split(e-n):o),i<0&&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||t<this.length&&o<=0))&&(this.length=e+(n?n.length:0)+(this.length-t),!0)}become(e){return e instanceof _S&&e.side==this.side&&this.widget.constructor==e.widget.constructor&&(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(0==this.length)return RO.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,i=this.posAtStart;return n?n.slice(i,i+this.length):RO.empty}domAtPos(e){return(this.length?0==e:this.side>0)?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.top<r.bottom);t+=o?-1:1);return Fk(r,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class ES extends iS{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof ES&&e.side==this.side}split(){return new ES(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?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;r<i.length;r++){let o=i[r],s=e+o.length;if(!(s==e&&o.getSide()<=0)){if(t>e&&t<s&&o.dom.parentNode==n)return o.domAtPos(t-e);if(t<=e)break;e=s}}for(let e=r;e>0;e--){let t=i[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=r;e<i.length;e++){let t=i[e];if(t.dom.parentNode==n)return t.domAtPos(0)}return new tS(n,0)}function PS(e,t,n){let i,{children:r}=e;n>0&&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<t.children.length&&c<=a;l++){let p=t.children[l],u=c+p.length;u>=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<a||c==u&&p.getSide()<0&&!p.isHidden)&&(i=p,r=a-c)),c=u}}(e,t);let a=(n<0?i:o)||i||o;return a?a.coordsAt(Math.max(0,a==i?r:s),n):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=jk(t);return n[n.length-1]||null}(e)}function SS(e,t){for(let n in e)"class"==n&&t.class?t.class+=" "+e.class:"style"==n&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}xS.prototype.children=_S.prototype.children=ES.prototype.children=nS;const CS=Object.create(null);function TS(e,t,n){if(e==t)return!0;e||(e=CS),t||(t=CS);let i=Object.keys(e),r=Object.keys(t);if(i.length-(n&&i.indexOf(n)>-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;n<e.attributes.length;n++){let i=e.attributes[n];t[i.name]=i.value}return t}class DS{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var RS=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(RS||(RS={}));class NS extends rk{constructor(e,t,n,i){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=i}get heightRelevant(){return!1}static mark(e){return new $S(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?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;e<this.children.length;e++)t.append(this.children[e],0);for(;n>0&&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){let i=(t-e.textHeight)/2;return{top:n.top+i,bottom:n.bottom-i,left:n.left,right:n.left}}}return n}become(e){return e instanceof qS&&0==this.children.length&&0==e.children.length&&TS(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,t){for(let n=0,i=0;n<e.children.length;n++){let r=e.children[n],o=i+r.length;if(o>=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||t<this.length&&o<=0))&&(this.length=e+(n?n.length:0)+(this.length-t),!0)}domAtPos(e){return 0==e?tS.before(this.dom):tS.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new zS(this.widget,t,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return nS}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"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):RO.empty}domBoundsAround(){return null}become(e){return e instanceof zS&&e.widget.constructor==this.widget.constructor&&(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);return n||(this.widget instanceof FS?null:Fk(this.dom.getBoundingClientRect(),this.length?0==e:t<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:n}=this.deco;return t!=n&&(e<0?t<0:n>0)}}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&&(e<t||n.startSide>0),l=!o.isEditable&&(e<t||r>i.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?e<t||r>i.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<e.length;n++)t.push(1<<+e[n]);return t}const KS=XS("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),YS=XS("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),ZS=Object.create(null),JS=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);ZS[t]=n,ZS[n]=-t}function eC(e){return e<=247?KS[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?YS[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}const tC=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class nC{get dir(){return this.level%2?QS:GS}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,i){let r=-1;for(let o=0;o<e.length;o++){let s=e[o];if(s.from<=t&&s.to>=t){if(s.level==n)return o;(r<0||(0!=i?i<0?s.from<t:s.to>t: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;n<e.length;n++){let i=e[n],r=t[n];if(i.from!=r.from||i.to!=r.to||i.direction!=r.direction||!iC(i.inner,r.inner))return!1}return!0}const rC=[];function oC(e,t,n,i,r,o,s){let a=i%2?2:1;if(i%2==r%2)for(let l=t,c=0;l<n;){let t=!0,p=!1;if(c==o.length||l<o[c].from){let e=rC[l];e!=a&&(t=!1,p=16==e)}let u=t||1!=a?null:[],d=t?i:i+1,h=l;e:for(;;)if(c<o.length&&h==o[c].from){if(p)break e;let f=o[c];if(!t)for(let e=f.to,t=c+1;;){if(e==n)break e;if(!(t<o.length&&o[t].from==e)){if(rC[e]==a)break e;break}e=o[t++].to}if(c++,u)u.push(f);else{f.from>l&&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):l<h&&s.push(new nC(l,h,d)),l=h}else for(let l=n,c=o.length;l>t;){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<l&&s.push(new nC(f.to,l,d)),sC(e,f.direction==GS!=!(d%2)?i+1:i,r,f.inner,f.from,f.to,s),l=f.from}h=f.from}else{if(h==t||(n?rC[h-1]!=a:rC[h-1]==a))break;h--}u?oC(e,h,l,i+1,r,u,s):h<l&&s.push(new nC(h,l,d)),l=h}}function sC(e,t,n,i,r,o,s){let a=t%2?2:1;!function(e,t,n,i,r){for(let o=0;o<=i.length;o++){let s=o?i[o-1].to:t,a=o<i.length?i[o].from:n,l=o?256:r;for(let t=s,n=l,i=l;t<a;t++){let r=eC(e.charCodeAt(t));512==r?r=n:8==r&&4==i&&(r=16),rC[t]=4==r?2:r,7&r&&(i=r),n=r}for(let e=s,t=l,i=l;e<a;e++){let r=rC[e];if(128==r)e<a-1&&t==rC[e+1]&&24&t?r=rC[e]=t:rC[e]=256;else if(64==r){let r=e+1;for(;r<a&&64==rC[r];)r++;let o=e&&8==t||r<n&&8==rC[r]?1==i?1:8:256;for(let t=e;t<r;t++)rC[t]=o;e=r-1}else 8==r&&1==i&&(rC[e]=1);t=r,7&r&&(i=r)}}}(e,r,o,i,a),function(e,t,n,i,r){let o=1==r?2:1;for(let s=0,a=0,l=0;s<=i.length;s++){let c=s?i[s-1].to:t,p=s<i.length?i[s].from:n;for(let t,n,i,s=c;s<p;s++)if(n=ZS[t=e.charCodeAt(s)])if(n<0){for(let e=a-3;e>=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=r<n.length?n[r].from:t;for(let l=s;l<a;){let s=rC[l];if(256==s){let s=l+1;for(;;)if(s==a){if(r==n.length)break;s=n[r++].to,a=r<n.length?n[r].from:t}else{if(256!=rC[s])break;s++}let c=1==o,p=c==(1==(s<t?rC[s]:i))?c?1:2:i;for(let t=s,i=r,o=i?n[i-1].to:e;t>l;)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));(p<l.from||p>l.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)<l.level?uP.cursor(u.side(!r,n)+e.from,u.forward(r,n)?1:-1,u.level):uP.cursor(p+e.from,l.forward(r,n)?-1:1,l.level)}function uC(e,t,n){for(let i=t;i<n;i++){let t=eC(e.charCodeAt(i));if(1==t)return GS;if(2==t||4==t)return QS}return GS}const dC=fP.define(),hC=fP.define(),fC=fP.define(),mC=fP.define(),gC=fP.define(),yC=fP.define(),vC=fP.define(),bC=fP.define(),xC=fP.define(),wC=fP.define({combine:e=>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.toA<n.fromA)break;n=n.join(i),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(0==t.length)return e;let n=[];for(let i=0,r=0,o=0,s=0;;i++){let a=i==e.length?null:e[i],l=o-s,c=a?a.fromB:1e9;for(;r<t.length&&t[r]<c;){let e=t[r],i=t[r+1],o=Math.max(s,e),a=Math.min(c,i);if(o<=a&&new VC(o+l,a+l,o,a).addToSet(n),i>c)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})=>t<this.minWidthFrom||e>this.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)=>{e<t.to&&i>t.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<this.view.state.doc.length)for(let e of this.children)e instanceof zS&&e.widget instanceof FS&&r.push(e.dom);i.updateGaps(r)}updateChildren(e,t,n){let i=n?n.range.addToSet(e.slice()):e,r=this.childCursor(t);for(let e=i.length-1;;e--){let t=e>=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.fromB<d&&n.range.toB>u){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)|(t<e.childNodes.length&&"false"==e.childNodes[t].contentEditable?2:0)}(a.node,a.offset);if(e&&3!=e){let t=(1==e?Jk:eS)(a.node,a.offset);t&&(a=new tS(t.node,t.offset))}}e.collapse(a.node,a.offset),null!=s.bidiLevel&&void 0!==e.caretBidiLevel&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(a.node,a.offset);try{e.extend(l.node,l.offset)}catch(e){}}else{let t=document.createRange();s.anchor>s.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<n.childNodes.length;i++){let e=iS.get(n.childNodes[i]);e instanceof qS&&(t=e.domAtPos(0))}for(let i=e.offset-1;!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<this.children.length-1;){let e=this.children[t];if(n<e.length||e instanceof qS)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,i=0;for(let r=this.length,o=this.children.length-1;o>=0;o--){let s=this.children[o],a=r-s.breakAfter,l=a-s.length;if(a<e)break;if(l<=e&&(l<e||s.covers(-1))&&(a>e||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;e<o.length;e++){let t=o[e];if(e==o.length-1||t.top<t.bottom&&t.left<t.right)return t}return null}measureVisibleLineHeights(e){let t=[],{from:n,to:i}=e,r=this.view.contentDOM.clientWidth,o=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==WS.LTR;for(let e=0,l=0;l<this.children.length;l++){let c=this.children[l],p=e+c.length;if(p>i)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];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);return this.view.scrollDOM.scrollTop=t.top-e.yMargin,void(this.view.scrollDOM.scrollLeft=e.xMargin)}for(let t of this.view.state.facet(EC))try{if(t(this.view,e.range,e))return!0}catch(e){SC(this.view.state,e,"scroll handler")}let t,{range:n}=e,i=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.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.top<e.top?(g=-(e.top-t.top+s),n>0&&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-g<e.top&&(g=-(e.top+g-t.top+s)));else{let i=t.bottom-t.top,o=e.bottom-e.top;g=("center"==r&&i<=o?t.top+i/2-o/2:"start"==r||"center"==r&&n<0?t.top-s:t.bottom-o+s)-e.top}if("nearest"==i?t.left<e.left?(m=-(e.left-t.left+o),n>0&&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.left<e.left+m&&(m=-(e.left+m-t.left+o))):m=("center"==i?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==i==a?t.left-o:t.right-(e.right-e.left)+o)-e.left,m||g)if(d)c.scrollBy(m,g);else{let e=0,n=0;if(g){let e=p.scrollTop;p.scrollTop+=g/f,n=(p.scrollTop-e)*f}if(m){let t=p.scrollLeft;p.scrollLeft+=m/h,e=(p.scrollLeft-t)*h}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-m)<1&&(i="nearest"),n&&Math.abs(n-g)<1&&(r="nearest")}if(d)break;p=p.assignedSlot||p.parentNode}else{if(11!=p.nodeType)break;p=p.host}}(this.view.scrollDOM,o,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,s),-s),Math.max(Math.min(e.yMargin,a),-a),this.view.textDirection==WS.LTR)}}function WC(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let i=Jk(n.focusNode,n.focusOffset),r=eS(n.focusNode,n.focusOffset),o=i||r;if(r&&i&&r.node!=i.node){let t=iS.get(r.node);if(!t||t instanceof xS&&t.text!=r.node.nodeValue)o=r;else if(e.docView.lastCompositionAfterCursor){let e=iS.get(i.node);!e||e instanceof xS&&e.text!=i.node.nodeValue||(o=r)}}if(e.docView.lastCompositionAfterCursor=o!=i,!o)return null;let s=t-o.offset;return{from:s,to:s+o.node.nodeValue.length,node:o.node}}let GC=class{constructor(){this.changes=[]}compareRange(e,t){BS(e,t,this.changes)}comparePoint(e,t){BS(e,t,this.changes)}};function QC(e,t){return t.left>e?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.top<t.bottom-1&&e.bottom>t.top+1}function YC(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function ZC(e,t){return t>e.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;h<e.length;h++){let f=e[h];r&&KC(r,f)&&(f=YC(ZC(f,r.bottom),r.top));let m=QC(t,f),g=XC(n,f);if(0==m&&0==g)return 3==d.nodeType?eT(d,t,n):JC(d,t,n);if(!i||s>g||s==g&&o>m){i=d,r=f,o=m,s=g;let a=g?n<f.top?-1:1:m?t<f.left?-1:1:0;u=!a||(a>0?h<e.length-1:h>0)}0==m?n>f.bottom&&(!c||c.bottom<f.bottom)?(a=d,c=f):n<f.top&&(!p||p.top>f.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;a<i;a++){let i=Xk(e,a,a+1).getClientRects();for(let l=0;l<i.length;l++){let c=i[l];if(c.top==c.bottom)continue;s||(s=t-c.left);let p=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=t&&c.right+1>=t&&p<o){let n=t>=(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(h<e.viewport.from)return 0==e.viewport.from?0:n?null:nT(e,a,s,p,u);if(h>e.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.y<e.top||t.y<=e.bottom&&t.x<=(e.left+e.right)/2?b.posAtStart:b.posAtEnd}return b.localPosFromDOM(y,v)+b.posAtStart}function nT(e,t,n,i,r){let o=Math.round((i-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>1.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&&t<r){let o=i||n||(t-e<r-t?-1:1);t=o<0?e:r,i=o}}));if(!i)return t}}function sT(e,t,n){let i=oT(e.state.facet(IC).map((t=>t(e))),n.from,t.head>n.from?-1:1);return i==n.from?n:uP.cursor(i,i<n.from?1:-1)}const aT="￿";class lT{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(nk.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=aT}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let i=e;;){this.findPointBefore(n,i);let e=this.text.length;this.readNode(i);let r=i.nextSibling;if(r==t)break;let o=iS.get(i),s=iS.get(r);(o&&s?o.breakAfter:(o?o.breakAfter:Bk(i))||Bk(r)&&("BR"!=i.nodeName||i.cmIgnore)&&this.text.length>e)&&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<zk(t))return!1;if(t==e)return!0;n=Lk(t)+1,t=t.parentNode}}class pT{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class uT{constructor(e,t,n,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-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.to<e.state.doc.length)){let t=Math.min(n,i),r=Math.max(n,i),o=s.from-t,a=s.to-r;0!=o&&1!=o&&0!=t||0!=a&&-1!=a&&r!=e.state.doc.length||(n=0,i=e.state.doc.length)}this.newSel=uP.single(i,n)}}}function dT(e,t){let n,{newSel:i}=t,r=e.state.selection.main,o=e.inputState.lastKeyTime>Date.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.length<s-i)&&(a=r.to,l="end");let c=function(e,t,n,i){let r=Math.min(e.length,t.length),o=0;for(;o<r&&e.charCodeAt(o)==t.charCodeAt(o);)o++;if(o==r&&e.length==t.length)return null;let s=e.length,a=t.length;for(;s>0&&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<o&&e.length<t.length){o-=n<=o&&n>=s?o-n:0,a=o+(a-s),s=o}else if(a<o){o-=n<=o&&n>=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.length<t.to-t.from&&t.to>r.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.from<t.from?r.sliceDoc(o.from,t.from):"",s=o.to>t.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.from<e.to&&/^\S+$/.test(e.insert.toString()))&&(this.pendingIOSKey=void 0,Kk(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0)))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(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<r.length;e++){let n=r[e];if(n.left<=t.clientX&&n.right>=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;n<e.ranges.length;n++){let i=e.ranges[n],r=null;if(i.empty){let e=oT(this.atoms,i.from,0);e!=i.from&&(r=uP.cursor(e,-1))}else{let e=oT(this.atoms,i.from,-1),t=oT(this.atoms,i.to,1);e==i.from&&t==i.to||(r=uP.range(i.from==i.anchor?e:t,i.from==i.head?e:t))}r&&(t||(t=e.ranges.slice()),t[n]=r)}return t?uP.create(t,e.mainIndex):e}select(e){let{view:t}=this,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));!this.mustSelect&&n.eq(t.state.selection,!1===this.dragging)||this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some((e=>e.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<r.length;){let e=WO(r.text,a);if(i(r.text.slice(a,e))!=l)break;a=e}return uP.range(s+r.from,a+r.from)}(e.state,t,n);{let n=qS.find(e.docView,t),i=e.state.doc.lineAt(n?n.posAtEnd:t),r=n?n.posAtStart:i.from,o=n?n.posAtEnd:i.to;return o<e.state.doc.length&&o==i.to&&o++,uP.range(r,o)}}ET.scroll=e=>{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=r<c.from?uP.range(r,o):uP.range(o,r)}return o?r.replaceRange(r.main.extend(c.from,c.to)):s&&1==i&&r.ranges.length>1&&(a=function(e,t){for(let n=0;n<e.ranges.length;n++){let{from:i,to:r}=e.ranges[n];if(i<=t&&r>=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<n.length;e++){let t=new FileReader;t.onerror=o,t.onload=()=>{/[\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<e.length;n++){let i=e[n];i<0?n++:this.heightSamples[Math.floor(10*i)]||(t=!0,this.heightSamples[Math.floor(10*i)]=!0)}return t}refresh(e,t,n,i,r,o){let s=FT.indexOf(e)>-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;e<o.length;e++){let t=o[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return a}}class WT{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class GT{constructor(e,t,n,i,r){this.from=e,this.length=t,this.top=n,this.height=i,this._content=r}get type(){return"number"==typeof this._content?RS.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof IS?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new GT(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var QT=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(QT||(QT={}));const XT=.001;class KT{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(2&this.flags)>0}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--,a<u.from&&(u=r.lineAt(a,QT.ByPosNoHeight,n,0,0));c+=u.from-a,a=u.from;let h=iA.build(n.setDoc(o),e,c,p);r=YT(r,r.replace(a,l,h))}return r.updateHeight(n,0)}static empty(){return new JT(0,0)}static of(e){if(1==e.length)return e[0];let t=0,n=e.length,i=0,r=0;for(;;)if(t==n)if(i>2*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){let n=e[t++];n&&(i+=n.size)}else{let t=e[--n];t&&(r+=t.size)}let o=0;return null==e[t-1]?(o=1,t--):null==e[t]&&(o=1,n++),new tA(KT.of(e.slice(0,t)),o,KT.of(e.slice(n)))}}function YT(e,t){return e==t?e:(e.constructor!=t.constructor&&(VT=!0),t)}KT.prototype.size=1;class ZT extends KT{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,i){return new GT(i,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,i,r){return this.blockAt(0,n,i,r)}forEachLine(e,t,n,i,r,o){e<=r+this.length&&t>=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+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),o=t.doc.lineAt(r),l=s+o.length*a,c=Math.max(n,e-l/2);return new GT(o.from,o.length,c,l,0)}{let i=Math.max(0,Math.min(o-r,Math.floor((e-n)/s))),{from:a,length:l}=t.doc.line(r+i);return new GT(a,l,n+s*i,s,0)}}lineAt(e,t,n,i,r){if(t==QT.ByHeight)return this.blockAt(e,n,i,r);if(t==QT.ByPosNoHeight){let{from:t,to:i}=n.doc.lineAt(e);return new GT(t,i-t,0,0,0)}let{firstLine:o,perLine:s,perChar:a}=this.heightMetrics(n,r),l=n.doc.lineAt(e),c=s+l.length*a,p=l.number-o,u=i+s*p+a*(l.from-r-p);return new GT(l.from,l.length,Math.max(i,Math.min(u,i+this.height-c)),c,0)}forEachLine(e,t,n,i,r,o){e=Math.max(e,r),t=Math.min(t,r+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(n,r);for(let c=e,p=i;c<=t;){let t=n.doc.lineAt(c);if(c==e){let n=t.number-s;p+=a*n+l*(e-r-n)}let i=a+l*t.length;o(new GT(t.from,t.length,p,i,0)),p+=i,c=t.to+1}}replace(e,t,n){let i=this.length-t;if(i>0){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 e<r?this.left.blockAt(e,t,n,i):this.right.blockAt(e,t,r,i+this.left.length+this.break)}lineAt(e,t,n,i,r){let o=i+this.left.height,s=r+this.left.length+this.break,a=t==QT.ByHeight?e<o:e<s,l=a?this.left.lineAt(e,t,n,i,r):this.right.lineAt(e,t,n,o,s);if(this.break||(a?l.to<s:l.from>s))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.left.forEachLine(e,t,n,i,r,o),t>=a&&this.right.forEachLine(e,t,n,s,a,o);else{let l=this.lineAt(a,QT.ByPos,n,i,r);e<l.from&&this.left.forEachLine(e,l.from-1,n,i,r,o),l.to>=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(t<i)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.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<this.length){let e=r.length;this.decomposeRight(t,r),nA(r,e)}return KT.of(r)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=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);e<n&&this.left.decomposeRight(e,t),this.break&&e<i&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*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<t||n.heightRelevant){let i=n.widget?n.widget.estimatedHeight:0,r=n.widget?n.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=t-e;n.block?this.addBlock(new ZT(o,i,n)):(o||r||i>=5)&&this.addLineDeco(i,r,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&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.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new JT(0,-1));let n=e;for(let e of this.nodes)e instanceof JT&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(e,t,n,i){let r=new iA(n,e);return lk.spans(t,n,i,r,0),r.finish(n)}}class rA{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,i){(e<t||n&&n.heightRelevant||i&&i.heightRelevant)&&BS(e,t,this.changes,5)}}function oA(e,t){let n=e.getBoundingClientRect(),i=e.ownerDocument,r=i.defaultView||window,o=Math.max(0,n.left),s=Math.min(r.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(r.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=i.body;)if(1==t.nodeType){let n=t,i=window.getComputedStyle(n);if((n.scrollHeight>n.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<e.length;n++){let i=e[n],r=t[n];if(i.from!=r.from||i.to!=r.to||i.size!=r.size)return!1}return!0}draw(e,t){return NS.replace({widget:new lA(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class lA extends DS{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class cA{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=hA,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=WS.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(NC).some((e=>"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.head<a.from||t.range.head>a.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.head<this.viewport.from||this.scrollTarget.range.head>this.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(e<a.from||e>a.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<a.from?s.top:s.bottom-o,a=new pA(i.lineAt(n-500,QT.ByHeight,r,0,0).from,i.lineAt(n+o+500,QT.ByHeight,r,0,0).to)}}return a}mapViewport(e,t){let n=t.mapPos(e.from,-1),i=t.mapPos(e.to,1);return new pA(this.heightMap.lineAt(n,QT.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,QT.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,QT.ByPos,this.heightOracle,0,0),{bottom:r}=this.heightMap.lineAt(t,QT.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:s}=this;return(0==e||i<=o-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||r>=s+Math.max(10,Math.min(n,250)))&&i>o-2e3&&r<s+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let i of e)t.touchesRange(i.from,i.to)||n.push(new aA(t.mapPos(i.from),t.mapPos(i.to),i.size,i.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,i=n?1e4:2e3,r=i>>1,o=i<<1;if(this.defaultTextDirection!=WS.LTR&&!n)return[];let s=[],a=(i,o,l,c)=>{if(o-i<r)return;let p=this.state.selection.main,u=[p.from];p.empty||u.push(p.to);for(let e of u)if(e>i&&e<o)return a(i,e-10,l,c),void a(e+10,o,l,c);let d=function(e,t){for(let n of e)if(t(n))return n;return}(e,(e=>e.from>=l.from&&e.to<=l.to&&Math.abs(e.from-i)<r&&Math.abs(e.to-o)<r&&!u.some((t=>e.from<t&&e.to>t))));if(!d){if(o<l.to&&t&&n&&t.visibleRanges.some((e=>e.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.length<o||t.type!=RS.Text)return;let r=function(e,t,n){let i=[],r=e,o=0;lk.spans(n,e,t,{span(){},point(e,t){e>r&&(i.push({from:r,to:e}),o+=e-r),r=t}},20),r<t&&(i.push({from:r,to:t}),o+=t-r);return{total:o,ranges:i}}(t.from,t.to,this.stateDeco);if(r.total<o)return;let s,l,c=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let e,n,o=i/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=c){let i=dA(r,c),s=((this.visibleBottom-this.visibleTop)/2+o)/t.height;e=i-s,n=i+s}else e=(this.visibleTop-t.top-o)/t.height,n=(this.visibleBottom-t.top+o)/t.height;s=uA(r,e),l=uA(r,n)}else{let n=r.total*this.heightOracle.charWidth,o=i*this.heightOracle.charWidth,a=0;if(n>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+a<this.pixelViewport.left&&(a=n.size-n.displaySize);let p,u,d=this.pixelViewport.left+a,h=this.pixelViewport.right+a;if(null!=c){let e=dA(r,c),t=((h-d)/2+o)/n;p=e-t,u=e+t}else p=(d-o)/n,u=(h+o)/n;s=uA(r,p),l=uA(r,u)}s>t.from&&a(t.from,s,t,r),l<t.to&&a(l,t.to,t,r)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(l):l(e);return s}gapSize(e,t,n,i){let r=dA(i,n)-dA(i,t);return this.heightOracle.lineWrapping?e.height*r:i.total*this.heightOracle.charWidth*r}updateLineGaps(e){aA.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=NS.set(e.map((e=>e.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=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.top)return i+(e-n)*this.scale;if(e<=r.bottom)return r.domTop+(e-r.top);n=r.bottom,i=r.domBottom}}fromDOM(e){for(let t=0,n=0,i=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.domTop)return n+(e-i)/this.scale;if(e<=r.domBottom)return r.top+(e-r.domTop);n=r.bottom,i=r.domBottom}}eq(e){return e instanceof fA&&(this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every(((t,n)=>t.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,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',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)<Date.now()-75&&this.onResize()})),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((e=>{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<Date.now()-300&&function(e,t){let n=t.focusNode,i=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=i)return!1;for(i=Math.min(i,zk(n));;)if(i){if(1!=n.nodeType)return!1;let e=n.childNodes[i-1];"false"==e.contentEditable?i--:(n=e,i=zk(n))}else{if(n==e)return!0;i=Lk(n),n=n.parentNode}}(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(1==n.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else{if(11!=n.nodeType)break;n=n.host}if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,OA),PA&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),PA&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let e=()=>{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<Date.now()-50||!!(null===(n=this.delayedAndroidKey)||void 0===n?void 0:n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame((()=>{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&&n<this.from?o.from=n:o.to==this.to&&n>this.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<o;t++){let n=e.coordsForChar(t);r=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||r||new DOMRect,i.push(r)}t.updateCharacterBounds(n.rangeStart,i)},this.handlers.textformatupdate=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(r<this.to){if(r<this.from||o>this.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.to<e.doc.length&&this.to-t<500||this.to-this.from>3e4)}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<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){SC(this.state,e,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-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;e<a.length;e++)if(l[e]!=DA)try{let t=a[e];t.write&&t.write(l[e],this)}catch(e){SC(this.state,e)}if(p&&this.docView.updateSelection(!0),!c.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}{let e=(r<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(r).top)-o;if(e>1||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;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key)return void(this.measureRequests[t]=e);this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find((t=>t.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(n<l.top||n>l.bottom||(o<0?i<r:i>r)){let t=e.docView.coordsForChar(i),r=!t||n<t.top?-1:1;return uP.cursor(i,r,void 0,a)}}}(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),tT(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let i=this.state.doc.lineAt(e),r=this.bidiSpans(i);return Fk(n,r[nC.find(r,e-i.from,-1,t)].dir==WS.LTR==t>0)}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)||e<this.viewport.from||e>this.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<e.length;r++){let o=e[r];o.dir!=i||t.touchesRange(o.from,o.to)||n.push(new RA(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return n}}function NA(e,t,n){for(let i=e.state.facet(t),r=i.length-1;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<n.length-1;++e){const a=n[e];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))i=!0;else if(/^(c|ctrl|control)$/i.test(a))r=!0;else if(/^s(hift)?$/i.test(a))o=!0;else{if(!/^mod$/i.test(a))throw new Error("Unrecognized modifier name: "+a);"mac"==t?s=!0:r=!0}}return i&&(a="Alt-"+a),r&&(a="Ctrl-"+a),s&&(a="Meta-"+a),o&&(a="Shift-"+a),a}(e,t)));for(let t=1;t<u.length;t++){let n=u.slice(0,t).join(" ");r(n,!0),p[n]||(p[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{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;n<r.length;n++){let i=r[n],a=-1;if(i){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==i.create&&(a=e)}if(a<0)o[n]=this.createTooltipView(i,n?o[n-1]:null),s&&(s[n]=!!i.above);else{let i=o[n]=this.tooltipViews[a];s&&(s[n]=t[a]),i.update&&i.update(e)}}}for(let e of this.tooltipViews)o.indexOf(e)<0&&(this.removeTooltipView(e),null===(n=e.destroy)||void 0===n||n.call(e));return t&&(s.forEach(((e,n)=>t[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<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],c=this.manager.tooltipViews[a],{dom:p}=c,u=e.pos[a],d=e.size[a];if(!u||!1!==l.clip&&(u.bottom<=Math.max(n.top,i.top)||u.top>=Math.min(n.bottom,i.bottom)||u.right<Math.max(n.left,i.left)-.1||u.left>Math.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.y<i.top:u.bottom+g+f+y.y>i.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(w<g&&!1!==c.resize){if(w<this.view.defaultLineHeight){p.style.top=XA;continue}eM.set(c,g),p.style.height=(g=w)/o+"px"}else p.style.height&&(p.style.height="");let _=x?u.top-g-f-y.y:u.bottom+f+y.y,E=b+m;if(!0!==c.overlap)for(let e of s)e.left<E&&e.right>b&&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;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,n=e.docView.nearest(t.target);if(!n)return;let i,r=1;if(n instanceof _S)i=n.posAtStart;else{if(i=e.posAtCoords(t),null==i)return;let n=e.coordsAtPos(i);if(!n||t.y<n.top||t.y>n.bottom||t.x<n.left-e.defaultCharacterWidth||t.x>n.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<n.left?-s:s}let o=this.source(e,i,r);if(null==o?void 0:o.then){let t=this.pending={pos:i};o.then((n=>{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.right<i||o.top>r||Math.min(o.bottom,s)<r)return!1;let a=e.posAtCoords({x:i,y:r},!1);return a>=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;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let n="cm-gutterElement",i=this.dom.firstChild;for(let r=0,o=0;;){let s=o,a=r<t.length?t[r++]:null,l=!1;if(a){let e=a.elementClass;e&&(n+=" "+e);for(let e=o;e<this.markers.length;e++)if(this.markers[e].compare(a)){s=e,l=!0;break}}else s=this.markers.length;for(;o<s;){let e=this.markers[o++];if(e.toDOM){e.destroy(i);let t=i.nextSibling;i.remove(),i=t}}if(!a)break;a.toDOM&&(l?i=i.nextSibling:this.dom.insertBefore(a.toDOM(e),i)),l&&o++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}const AM=fP.define(),MM=fP.define(),DM=fP.define({combine:e=>ik(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(;t<e;)t=10*t+9;return t}var LM;const BM=new W_;function qM(e){return fP.define({combine:e?t=>t.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;n<e.children.length;n++){let r=e.children[n];r instanceof eE&&i(r,e.positions[n]+t)}};return i(UM(e),0),n}get allowsNesting(){return!0}}function VM(e,t,n){let i=e.facet(eD),r=UM(e).topNode;if(!i||i.allowsNesting)for(let e=r;e;e=e.enter(t,n,J_.ExcludeBuffers))e.type.isTop&&(r=e);return r}FM.setState=HP.define();class HM extends FM{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=qM(e.languageData);return new HM(t,e.parser.configure({props:[BM.add((e=>e.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<n||t>=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.state.doc.length&&this.parse.stopAt(t);;){let i=this.parse.advance();if(i){if(this.fragments=this.withoutTempSkipped(vE.addTree(i,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=i,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}}))}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=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);n<i&&s.push({from:n,to:i})}}}return new QM(this.parser,t,n,i,r,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:i}=this.skipped[t];n<e.to&&i>e.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.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:i}}=this.view,r=n.field(FM.state);if(r.tree==r.context.tree&&r.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!ZM?Math.max(25,e.timeRemaining()-5):1e9),s=r.context.treeLen<i&&n.doc.length>i+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;e++)n+=r;return n}function sD(e,t){e instanceof nk&&(e=new aD(e));for(let n of e.state.facet(nD)){let i=n(e,t);if(void 0!==i)return i}let n=UM(e.state);return n.length>=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<e:i<=e)?{text:n.text.slice(i-n.from),from:i}:{text:n.text.slice(0,i-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:i}=this.lineAt(e,t);return n.slice(e-i,Math.min(n.length,e+100-i))}column(e,t=1){let{text:n,from:i}=this.lineAt(e,t),r=this.countColumn(n,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-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.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}class xD{constructor(e,t){let n;function i(e){let t=Ok.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;const r="string"==typeof t.all?t.all:t.all?i(t.all):void 0,o=t.scope;this.scope=o instanceof FM?e=>e.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&&!i&&t.type==this.tree.type&&o>=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.head<t.state.doc.length&&BD(t.state,e.head+1,-1,i));r&&(n=n.concat(i.renderMatch(r,t.state)))}return NS.set(n,!0)},provide:e=>AA.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.from<i.to){let s=LD(i);if(s&&(n>0?t>=s.from&&t<s.to:t>s.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<p.to){let e=LD(p);return{start:l,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(ID(p.type,n,s))c++;else if(ID(p.type,-n,s)){if(0==c){let e=LD(p);return{start:l,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}c--}}}while(n<0?p.prevSibling():p.nextSibling());return{start:l,matched:!1}}const zD=Object.create(null),FD=[X_.none],VD=[],HD=Object.create(null),UD=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])UD[e]=GD(zD,t);function WD(e,t){VD.indexOf(e)>-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<i.length;e++)n[i[e]]=!0}let i=XD(t)+XD(n)+"*$";return[new RegExp("^"+i),new RegExp(i)]}(t);return 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<e.length;){let n=YO(e,t),i=JO(n);this.chars.push(n);let r=e.slice(t,t+i),o=r.toUpperCase();this.folded.push(YO(o==r?r.toLowerCase():o,0)),t+=i}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:i,precise:r,byWord:o}=this;if(1==t.length){let i=YO(e,0),r=JO(i),o=r==e.length?0:-100;if(i==t[0]);else{if(i!=n[0])return null;o+=-200}return this.ret(o,[0,r])}let s=e.indexOf(this.pattern);if(0==s)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=t.length,l=0;if(s<0){for(let r=0,o=Math.min(e.length,200);r<o&&l<a;){let o=YO(e,r);o!=t[l]&&o!=n[l]||(i[l++]=r),r+=JO(o)}if(l<a)return null}let c=0,p=0,u=!1,d=0,h=-1,f=-1,m=/[a-z]/.test(e),g=!0;for(let i=0,l=Math.min(e.length,200),y=0;i<l&&p<a;){let l=YO(e,i);s<0&&(c<a&&l==t[c]&&(r[c++]=i),d<a&&(l==t[d]||l==n[d]?(0==d&&(h=i),f=i+1,d++):d=0));let v,b=l<255?l>=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.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return null==n?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}const aR=fP.define({combine:e=>ik(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<Math.min(f,h)?c=!1:!c&&h<Math.min(f,d)&&(c=!0),f<=(c?d:h))s=Math.max(r.top,Math.min(n.top,r.bottom-m))-t.top,a=Math.min(400,c?d:h);else{p=!0,a=Math.min(400,(l?t.right:r.right-t.left)-30);let e=r.bottom-t.bottom;e>=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;e<i.length;){let t=i[e++],n=i[e++];t>s&&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 s<o.length&&r.appendChild(document.createTextNode(o.slice(s))),r},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),t.sort(((e,t)=>e.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]<i.length)return this.applyCompletion(e,i[+t[1]]),void n.preventDefault()})),this.dom.addEventListener("focusout",(t=>{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.from||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.top<n.top?e.scrollTop-=(n.top-i.top)/r:i.bottom>n.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.bottom<Math.max(r.top,t.top)+10?null:this.view.state.facet(aR).positionInfo(this.view,t,i,n,r,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){const i=document.createElement("ul");i.id=t,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));let r=null;for(let o=n.from;o<n.to;o++){let{completion:s,match:a}=e[o],{section:l}=s;if(l){let e="string"==typeof l?l:l.name;if(e!=r&&(o>n.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.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function dR(e,t){return n=>new 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.name<t.name?-1:1)};for(let n of i.sort(r))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e["string"==typeof n?n:n.name])}}let s=[],a=null,l=o.compareCompletions;for(let e of n.sort(((e,t)=>t.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;t<s.length;t++)if(s[t].completion==e){a=t;break}}return new fR(s,vR(n,a),{pos:e.reduce(((e,t)=>t.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(;n<e.length&&!e[n].hasResult();)n++;for(;i<t.length&&!t[i].hasResult();)i++;let r=n==e.length,o=i==t.length;if(r||o)return r==o;if(e[n++].result!=t[i++].result)return!1}}(i,this.active)||o?r=fR.build(i,t,this.id,r,n,o):r&&r.disabled&&!i.some((e=>e.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||s<this.limit))return new wR(this.source,4&t?1:0);let a=e.changes.mapPos(this.limit);return function(e,t,n,i){if(!e)return!1;let r=t.sliceDoc(n,i);return"function"==typeof e?e(r,n,i,t):JD(e,!0).test(r)}(i.validFor,e.state,r,o)?new _R(this.source,this.explicit,a,i,r,o):i.update&&(i=i.update(i,r,o,new QD(e.state,s,!1)))?new _R(this.source,this.explicit,a,i,i.from,null!==(n=i.to)&&void 0!==n?n:ZD(e.state)):new wR(this.source,1,this.explicit)}map(e){if(e.empty)return this;return(this.result.map?this.result.map(this.result,e):this.result)?new _R(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new wR(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}const ER=HP.define({map:(e,t)=>e.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<n.state.facet(aR).interactionDelay)return!1;let r,o=1;"page"==t&&(r=uM(n,i.open.tooltip))&&(o=Math.max(2,Math.floor(r.dom.offsetHeight/r.dom.querySelector("li").offsetHeight)-1));let{length:s}=i.open.options,a=i.open.selected>-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;t<this.running.length;t++){let n=this.running[t];if(i||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>50&&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;r<this.running.length;r++){let o=this.running[r];if(void 0===o.done)continue;if(this.running.splice(r--,1),o.done){let i=ZD(o.updates.length?o.updates[0].startState:this.view.state),r=Math.min(i,o.done.from+(o.active.explicit?0:1)),s=new _R(o.active.source,o.active.explicit,r,o.done,o.done.from,null!==(e=o.done.to)&&void 0!==e?e:i);for(let e of o.updates)s=s.update(e,n);if(s.hasResult()){t.push(s);continue}}let s=i.active.find((e=>e.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;t<s;t++)n+=e.facet(iD);i.push(t+n.length-s),r=n+r.slice(s)}n.push(r),t+=r.length+1}let s=this.fieldPositions.map((e=>new 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<n.length;t++)(null!=e?n[t].seq==e:l&&n[t].name==l)&&(a=t);if(a<0){let t=0;for(;t<n.length&&(null==e||null!=n[t].seq&&n[t].seq<e);)t++;n.splice(t,0,{seq:e,name:l}),a=t;for(let e of r)e.field>=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.timestamp<e.state.facet(aR).interactionDelay)&&kR(e,t.open.options[t.open.selected])}}],yN=SP.highest(LA.computeN([aR],(e=>e.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;n<r.length;n++)if(t=r[n]){let r=i[n],{open:o,close:s}=t;e.push({from:o.pos-r.open.length,to:o.pos+o.margin},{from:s.pos-s.margin,to:s.pos+r.close.length})}return{changes:e}}return null}function PN(e,t,n=t.selection.ranges){let i=[],r=-1;for(let{from:e,to:o}of n){let n=i.length,s=1e9,a=_N(t,e).line;if(a){for(let n=e;n<=o;){let l=t.doc.lineAt(n);if(l.from>r&&(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;e<l.text.length&&e<s&&(s=e),i.push({line:l,comment:n,token:a,indent:e,empty:t,single:!1})}n=l.to+1}if(s<1e9)for(let e=n;e<i.length;e++)i[e].indent<i[e].line.text.length&&(i[e].indent=s);i.length==n+1&&(i[n].single=!0)}}if(2!=e&&i.some((e=>e.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.prevTime<i.newGroupDelay&&i.joinToEvent(r,function(e,t){let n=[],i=!1;return e.iterChangedRanges(((e,t)=>n.push(e,t))),t.iterChangedRanges(((e,t,r,o)=>{for(let e=0;e<n.length;){let t=n[e++],s=n[e++];o>=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.prevTime<i&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&function(e,t){return e.ranges.length==t.ranges.length&&0===e.ranges.filter(((e,n)=>e.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.clientHeight<e.scrollDOM.scrollHeight-2,i=0,r=0;if(n){for(let t of e.state.facet(AA.scrollMargins)){let n=t(e);(null==n?void 0:n.top)&&(i=Math.max(null==n?void 0:n.top,i)),(null==n?void 0:n.bottom)&&(r=Math.max(null==n?void 0:n.bottom,r))}t=e.scrollDOM.clientHeight-i-r}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:i,marginBottom:r,selfScroll:n,height:Math.max(e.defaultLineHeight,t-5)}}function e$(e,t){let n,i=JN(e),{state:r}=e,o=BN(r.selection,(n=>n.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.bottom<l&&(n=AA.scrollIntoView(o.main.head,{y:"start",yMargin:t.top-a}))}return e.dispatch(qN(r,o),{effects:n}),!0}const t$=e=>e$(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<e.doc.length&&BD(e,t.head+1,-1);if(!r||!r.end)return t;i=!0;let o=r.start.from==t.head?r.end.to:r.end.from;return n?uP.range(t.anchor,o):uP.cursor(o)}));return!!i&&(t(qN(e,r)),!0)}function o$(e,t){let n=BN(e.state.selection,(e=>{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);s<r?(n="delete.backward",s=w$(e,s,!1)):s>r&&(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,r<i.head?-1:1)}}));return!r.changes.empty&&(e.dispatch(i.update(r,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?AA.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function w$(e,t,n){if(e instanceof AA)for(let i of e.state.facet(AA.atomicRanges).map((t=>t(e))))i.between(t,t,((e,i)=>{e<t&&i>t&&(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<l.from+200&&!/[^ \t]/.test(r=l.text.slice(0,s-l.from))){if("\t"==r[r.length-1])return s-1;let e=xk(r,a.tabSize)%rD(a)||rD(a);for(let t=0;t<e&&" "==r[r.length-1-t];t++)s--;o=s}else o=WO(l.text,s-l.from,t,t)+l.from,o==s&&l.number!=(t?a.doc.lines:1)?o+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(l.text.slice(o-l.from,s-l.from))&&(o=WO(l.text,o-l.from,!1,!1)+l.from);return o})),E$=e=>_$(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));r<o.to&&/\s/.test(o.text[r-o.from]);)r++;s?({from:i,to:r}=s):i>o.from&&i<o.from+100&&!/\S/.test(o.text.slice(0,i))&&(i=o.from);let c=["",oD(t,l)];return s&&c.push(oD(t,a.lineIndent(o.from,-1))),{changes:{from:i,to:r,insert:RO.of(c)},range:uP.cursor(i+1+c[1].length)}}));return n(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function R$(e,t){let n=-1;return e.changeByRange((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(;o<i.length&&o<s.length&&i.charCodeAt(o)==s.charCodeAt(o);)o++;n.push({from:t.from+o,to:t.from+i.length,insert:s.slice(o)})})),{userEvent:"delete.dedent"})),!0),j$=[{key:"Ctrl-b",run:UN,shift:a$,preventDefault:!0},{key:"Ctrl-f",run:WN,shift:l$},{key:"Ctrl-p",run:YN,shift:u$},{key:"Ctrl-n",run:ZN,shift:d$},{key:"Ctrl-a",run:e=>zN(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<n?n:Math.min(e.state.doc.length,t.head+1)}))},{key:"Ctrl-Alt-h",run:k$},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{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<n?n:Math.min(e.state.doc.length,t.head+1)}))}].concat(j$.map((e=>({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.from&&n.to>=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<t.from+a.length)&&(n[t.from]=s,r.push({from:t.from,to:t.from+a.length,insert:l}))}));return r.changes.empty||t(e.update(r,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(S$(t).map((({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n})))),i=BN(t.selection,(t=>{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(;t<arguments.length;t++)q$(e,arguments[t]);return e}function q$(e,t){if("string"==typeof t)e.appendChild(document.createTextNode(t));else if(null==t);else if(null!=t.nodeType)e.appendChild(t);else{if(!Array.isArray(t))throw new RangeError("Unsupported child node: "+t);for(var n=0;n<t.length;n++)q$(e,t[n])}}class z${constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class F${constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let i=e,r=n.facet(tj).markerFilter;r&&(i=r(i,n));let o=NS.set(i.map((e=>e.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<i||n<0))&&(r.push(a.diagnostic),o=Math.min(e,o),s=Math.max(i,s))}));let a=e.state.facet(tj).tooltipFilter;return a&&(r=a(r,e.state)),r.length?{pos:o,end:s,above:e.state.doc.lineAt(o).to<s,create:()=>({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<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-e);else{this.set=!1;let{state:e}=this.view,{sources:t}=e.facet(tj);t.length&&function(e,t,n){let i=[],r=-1;for(let o of e)o.then((n=>{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;e<n.length;e++){let i=n[e];if(/[a-zA-Z]/.test(i)&&!t.some((e=>e.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<i.length;r++)if(i[r].toUpperCase().charCodeAt(0)==t.keyCode){let t=V$(this.view.state.field(X$).diagnostics,n);t&&n.actions[r].apply(e,t.from,t.to)}}}t.preventDefault()},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=B$("div",{class:"cm-panel-lint"},this.list,B$("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>J$(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(X$).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(X$),n=0,i=!1,r=null;for(e.between(0,this.view.state.doc.length,((e,o,{spec:s})=>{let a,l=-1;for(let e=n;e<this.items.length;e++)if(this.items[e].diagnostic==s.diagnostic){l=e;break}l<0?(a=new sj(this.view,s.diagnostic),this.items.splice(n,0,a),i=!0):(a=this.items[l],l>n&&(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<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();0==this.items.length&&(this.items.push(new sj(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),r?(this.list.setAttribute("aria-activedescendant",r.id),this.view.requestMeasure({key:this,read:()=>({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.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,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function cj(e){return lj(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'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<e;i++)n+=9==this.text.charCodeAt(i)?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=9==this.text.charCodeAt(t)?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}}function gj(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=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<n.baseIndent+e.value&&n.next>-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(;t<e.length&&vj(e.charCodeAt(t));)t++;return t}function xj(e,t,n){for(;t>n&&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<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(96==e.next)for(let n=t;n<e.text.length;n++)if(96==e.text.charCodeAt(n))return-1;return t}function _j(e){return 62!=e.next?-1:32==e.text.charCodeAt(e.pos+1)?2:1}function Ej(e,t,n){if(42!=e.next&&45!=e.next&&95!=e.next)return-1;let i=1;for(let t=e.pos+1;t<e.text.length;t++){let n=e.text.charCodeAt(t);if(n==e.next)i++;else if(!vj(n))return-1}return n&&45==e.next&&Cj(e)>-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)<e.text.length)?-1:1}function kj(e,t,n){let i=e.pos,r=e.next;for(;r>=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||i<e.text.length-1&&!vj(e.text.charCodeAt(i+1))||n&&!Oj(t,hj.OrderedList)&&(e.skipSpace(i+1)==e.text.length||i>e.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(;t<e.text.length&&35==e.text.charCodeAt(t);)t++;if(t<e.text.length&&32!=e.text.charCodeAt(t))return-1;let n=t-e.pos;return n>6?-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<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let n=t;for(;t<e.text.length&&vj(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}const Tj=/^[ \t]*$/,Aj=/-->/,Mj=/\?>/,Dj=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,Aj],[/^\s*<\?/,Mj],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,Tj],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,Tj]];function Rj(e,t,n){if(60!=e.next)return-1;let i=e.text.slice(e.pos);for(let e=0,t=Dj.length-(n?1:0);e<t;e++)if(Dj[e][0].test(i))return e;return-1}function Nj(e,t){let n=e.countIndent(t,e.pos,e.indent),i=e.countIndent(e.skipSpace(t),t,n);return i>=n+5?n+1:i}function $j(e,t,n){let i=e.length-1;i>=0&&e[i].to==t&&e[i].type==hj.CodeText?e[i].to=n:e.push(eI(hj.CodeText,t,n))}const jj={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let i=t.findColumn(n),r=e.lineStart+i,o=e.lineStart+t.text.length,s=[],a=[];for($j(s,r,o);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){$j(a,e.lineStart-1,e.lineStart);for(let e of t.markers)a.push(e)}else{if(t.indent<n)break;{if(a.length){for(let e of a)e.type==hj.CodeText?$j(s,e.from,e.to):s.push(e);a=[]}$j(s,e.lineStart-1,e.lineStart);for(let e of t.markers)s.push(e);o=e.lineStart+t.text.length;let n=e.lineStart+t.findColumn(t.baseIndent+4);n<o&&$j(s,n,o)}}return a.length&&(a=a.filter((e=>e.type!=hj.CodeText)),a.length&&(t.markers=a.concat(t.markers))),e.addNode(e.buffer.writeElements(s,-r).finish(hj.CodeBlock,o-r),r),!0},FencedCode(e,t){let n=wj(t);if(n<0)return!1;let i=e.lineStart+t.pos,r=t.next,o=n-t.pos,s=t.skipSpace(n),a=xj(t.text,t.text.length,s),l=[eI(hj.CodeMark,i,i+o)];s<a&&l.push(eI(hj.CodeInfo,e.lineStart+s,e.lineStart+a));for(let n=!0;e.nextLine()&&t.depth>=e.stack.length;n=!1){let i=t.pos;if(t.indent-t.baseIndent<4)for(;i<t.text.length&&t.text.charCodeAt(i)==r;)i++;if(i-t.pos>=o&&t.skipSpace(i)==t.text.length){for(let e of t.markers)l.push(e);l.push(eI(hj.CodeMark,e.lineStart+t.pos,e.lineStart+i)),e.nextLine();break}{n||$j(l,e.lineStart-1,e.lineStart);for(let e of t.markers)l.push(e);let i=e.lineStart+t.basePos,r=e.lineStart+t.text.length;i<r&&$j(l,i,r)}}return e.addNode(e.buffer.writeElements(l,-i).finish(hj.FencedCode,e.prevLineEnd()-i),i),!0},Blockquote(e,t){let n=_j(t);return!(n<0)&&(e.startContext(hj.Blockquote,t.pos),e.addNode(hj.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(Ej(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(hj.HorizontalRule,n),!0},BulletList(e,t){let n=Pj(t,e,!1);if(n<0)return!1;e.block.type!=hj.BulletList&&e.startContext(hj.BulletList,t.basePos,t.next);let i=Nj(t,t.pos+1);return e.startContext(hj.ListItem,t.basePos,i-t.baseIndent),e.addNode(hj.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(i),null},OrderedList(e,t){let n=kj(t,e,!1);if(n<0)return!1;e.block.type!=hj.OrderedList&&e.startContext(hj.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let i=Nj(t,t.pos+n);return e.startContext(hj.ListItem,t.basePos,i-t.baseIndent),e.addNode(hj.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(i),null},ATXHeading(e,t){let n=Sj(t);if(n<0)return!1;let i=t.pos,r=e.lineStart+i,o=xj(t.text,t.text.length,i),s=o;for(;s>i&&t.text.charCodeAt(s-1)==t.next;)s--;s!=o&&s!=i&&vj(t.text.charCodeAt(s-1))||(s=t.text.length);let a=e.buffer.write(hj.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(i+n+1,s),r+n+1),-r);s<t.text.length&&a.write(hj.HeaderMark,s-i,o-i);let l=a.finish(hj.ATXHeading1-1+n,t.text.length-i);return e.nextLine(),e.addNode(l,r),!0},HTMLBlock(e,t){let n=Rj(t,0,!1);if(n<0)return!1;let i=e.lineStart+t.pos,r=Dj[n][1],o=[],s=r!=Tj;for(;!r.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){s=!1;break}for(let e of t.markers)o.push(e)}s&&e.nextLine();let a=r==Aj?hj.CommentBlock:r==Mj?hj.ProcessingInstructionBlock:hj.HTMLBlock,l=e.prevLineEnd();return e.addNode(e.buffer.writeElements(o,-i).finish(a,l-i),i),!0},SetextHeading:void 0};class Ij{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(-1==this.stage)return!1;let i=n.content+"\n"+t.scrub(),r=this.advance(i);return r>-1&&r<i.length&&this.complete(e,n,r)}finish(e,t){return(2==this.stage||3==this.stage)&&bj(t.content,this.pos)==t.content.length&&this.complete(e,t,t.content.length)}complete(e,t,n){return e.addLeafElement(t,eI(hj.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(!1===e&&(this.stage=-1),!1)}advance(e){for(;;){if(-1==this.stage)return-1;if(0==this.stage){if(!this.nextStage(dI(e,this.pos,this.start,!0)))return-1;if(58!=e.charCodeAt(this.pos))return this.stage=-1;this.elts.push(eI(hj.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else{if(1!=this.stage){if(2==this.stage){let t=bj(e,this.pos),n=0;if(t>this.pos){let i=uI(e,t,this.start);if(i){let t=Lj(e,i.to-this.start);t>0&&(this.nextStage(i),n=t)}}return n||(n=Lj(e,this.pos)),n>0&&n<e.length?n:-1}return Lj(e,this.pos)}if(!this.nextStage(pI(e,bj(e,this.pos),this.start)))return-1}}}}function Lj(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(10==n)break;if(!vj(n))return-1}return t}class Bj{nextLine(e,t,n){let i=t.depth<e.stack.length?-1:Cj(t),r=t.next;if(i<0)return!1;let o=eI(hj.HeaderMark,e.lineStart+t.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(n,eI(61==r?hj.SetextHeading1:hj.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),o])),!0}finish(){return!1}}const qj={LinkReference:(e,t)=>91==t.content.charCodeAt(0)?new Ij(t):null,SetextHeading:()=>new Bj},zj=[(e,t)=>Sj(t)>=0,(e,t)=>wj(t)>=0,(e,t)=>_j(t)>=0,(e,t)=>Pj(t,e,!0)>=0,(e,t)=>kj(t,e,!0)>=0,(e,t)=>Ej(t,e,!0)>=0,(e,t)=>Rj(t,0,!0)>=0],Fj={text:"",end:0};class Vj{constructor(e,t,n,i){this.parser=e,this.input=t,this.ranges=i,this.line=new mj,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=dj.create(hj.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new gI(n,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(null!=this.stoppedAt&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let t=0;;){let n=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;t<e.markers.length&&(!n||e.markers[t].from<n.end);){let n=e.markers[t++];this.addNode(n.type,n.from,n.to)}if(!n)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let t of this.parser.blockParsers)if(t){let n=t(this,e);if(0!=n){if(1==n)return null;e.forward();continue e}}break}let t=new fj(this.lineStart+e.pos,e.text.slice(e.pos));for(let e of this.parser.leafBlockParsers)if(e){let n=e(this,t);n&&t.parsers.push(n)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4)for(let n of this.parser.endLeafBlock)if(n(this,e,t))break e;for(let n of t.parsers)if(n.nextLine(this,e,t))return null;t.content+="\n"+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return!!t&&(this.absoluteLineStart+=t,this.lineStart=yI(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0)}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=Fj;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let e=this.absoluteLineStart,n=this.rangeI;for(;this.ranges[n].to<t.end;){n++;let i=this.ranges[n].from,r=this.lineChunkAt(i);t.end=i+r.length,t.text=t.text.slice(0,this.ranges[n-1].to-e)+r,e=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let t=this.stack[e.depth],n=this.parser.skipContextMarkup[t.type];if(!n)throw new Error("Unhandled block context "+hj[t.type]);if(!n(t,this,e))break;e.forward()}}lineChunkAt(e){let t,n=this.input.chunk(e);if(this.input.lineChunks)t="\n"==n?"":n;else{let e=n.indexOf("\n");t=e<0?n:n.slice(0,e)}return e+t.length>this.to?t.slice(0,this.to-e):t}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,n=0){this.block=dj.create(e,n,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,n=0){this.startContext(this.parser.getNodeType(e),t,n)}addNode(e,t,n){"number"==typeof e&&(e=new eE(this.parser.nodeSet.types[e],Kj,Kj,(null!=n?n:this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(fI(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?Hj(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let t of e.parsers)if(t.finish(this,e))return;let t=fI(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(hj.Paragraph,e.content.length),e.start)}elt(e,t,n,i){return"string"==typeof e?eI(this.parser.getNodeType(e),t,n,i):new Jj(e,t)}get buffer(){return new Yj(this.parser.nodeSet)}}function Hj(e,t,n,i,r){let o=e[t].to,s=[],a=[],l=n.from+i;function c(n,r){for(;r?n>=o:n>o;){let r=e[t+1].from-o;i+=r,n+=r,t++,o=e[t].to}}for(let p=n.firstChild;p;p=p.nextSibling){c(p.from+i,!0);let n,u=p.from+i,d=r.get(p.tree);d?n=d:p.to+i>o?(n=Hj(e,t,p,i,r),c(p.to+i,!1)):n=p.toTree(),s.push(n),a.push(u-l)}return c(n.to+i,!1),new eE(n.type,s,a,n.to+i-l,n.tree?n.tree.propValues:void 0)}class Uj extends bE{constructor(e,t,n,i,r,o,s,a,l){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=n,this.blockNames=i,this.endLeafBlock=r,this.skipContextMarkup=o,this.inlineParsers=s,this.inlineNames=a,this.wrappers=l,this.nodeTypes=Object.create(null);for(let t of e.types)this.nodeTypes[t.name]=t.id}createParse(e,t,n){let i=new Vj(this,e,t,n);for(let r of this.wrappers)i=r(i,e,t,n);return i}configure(e){let t=Gj(e);if(!t)return this;let{nodeSet:n,skipContextMarkup:i}=this,r=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),s=this.blockNames.slice(),a=this.inlineParsers.slice(),l=this.inlineNames.slice(),c=this.endLeafBlock.slice(),p=this.wrappers;if(Wj(t.defineNodes)){i=Object.assign({},i);let e,r=n.types.slice();for(let n of t.defineNodes){let{name:t,block:o,composite:s,style:a}="string"==typeof n?{name:n}:n;if(r.some((e=>e.name==t)))continue;s&&(i[r.length]=(e,t,n)=>s(t,n,e.value));let l=r.length,c=s?["Block","BlockContext"]:o?l>=hj.ATXHeading1&&l<=hj.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;r.push(X_.define({id:l,name:t,props:c&&[[W_.group,c]]})),a&&(e||(e={}),Array.isArray(a)||a instanceof lO?e[t]=a:Object.assign(e,a))}n=new K_(r),e&&(n=n.extend(uO(e)))}if(Wj(t.props)&&(n=n.extend(...t.props)),Wj(t.remove))for(let e of t.remove){let t=this.blockNames.indexOf(e),n=this.inlineNames.indexOf(e);t>-1&&(r[t]=o[t]=void 0),n>-1&&(a[n]=void 0)}if(Wj(t.parseBlock))for(let e of t.parseBlock){let t=s.indexOf(e.name);if(t>-1)r[t]=e.parse,o[t]=e.leaf;else{let t=e.before?Qj(s,e.before):e.after?Qj(s,e.after)+1:s.length-1;r.splice(t,0,e.parse),o.splice(t,0,e.leaf),s.splice(t,0,e.name)}e.endLeaf&&c.push(e.endLeaf)}if(Wj(t.parseInline))for(let e of t.parseInline){let t=l.indexOf(e.name);if(t>-1)a[t]=e.parse;else{let t=e.before?Qj(l,e.before):e.after?Qj(l,e.after)+1:l.length-1;a.splice(t,0,e.parse),l.splice(t,0,e.name)}}return t.wrap&&(p=p.concat(t.wrap)),new Uj(n,r,o,s,c,i,a,l,p)}getNodeType(e){let t=this.nodeTypes[e];if(null==t)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let n=new hI(this,e,t);e:for(let e=t;e<n.end;){let t=n.char(e);for(let i of this.inlineParsers)if(i){let r=i(n,t,e);if(r>=0){e=r;continue e}}e++}return n.resolveMarkers(0)}}function Wj(e){return null!=e&&e.length>0}function Gj(e){if(!Array.isArray(e))return e;if(0==e.length)return null;let t=Gj(e[0]);if(1==e.length)return t;let n=Gj(e.slice(1));if(!n||!t)return t||n;let i=(e,t)=>(e||Kj).concat(t||Kj),r=t.wrap,o=n.wrap;return{props:i(t.props,n.props),defineNodes:i(t.defineNodes,n.defineNodes),parseBlock:i(t.parseBlock,n.parseBlock),parseInline:i(t.parseInline,n.parseInline),remove:i(t.remove,n.remove),wrap:r?o?(e,t,n,i)=>r(o(e,t,n,i),t,n,i):r:o}}function Qj(e,t){let n=e.indexOf(t);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${t}`);return n}let Xj=[X_.none];for(let e,t=1;e=hj[t];t++)Xj[t]=X_.define({id:t,name:e,props:t>=hj.Escape?[]:[[W_.group,t in yj?["Block","BlockContext"]:["Block","LeafBlock"]]],top:"Document"==e});const Kj=[];class Yj{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,n,i=0){return this.content.push(e,t,n,4+4*i),this}writeElements(e,t=0){for(let n of e)n.writeTo(this,t);return this}finish(e,t){return eE.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}}class Zj{constructor(e,t,n,i=Kj){this.type=e,this.from=t,this.to=n,this.children=i}writeTo(e,t){let n=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-n)}toTree(e){return new Yj(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}}class Jj{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Kj}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}}function eI(e,t,n,i){return new Zj(e,t,n,i)}const tI={resolve:"Emphasis",mark:"EmphasisMark"},nI={resolve:"Emphasis",mark:"EmphasisMark"},iI={},rI={};class oI{constructor(e,t,n,i){this.type=e,this.from=t,this.to=n,this.side=i}}const sI="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let aI=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{aI=new RegExp("[\\p{S}|\\p{P}]","u")}catch(Qa){}const lI={Escape(e,t,n){if(92!=t||n==e.end-1)return-1;let i=e.char(n+1);for(let t=0;t<32;t++)if(sI.charCodeAt(t)==i)return e.append(eI(hj.Escape,n,n+2));return-1},Entity(e,t,n){if(38!=t)return-1;let i=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(n+1,n+31));return i?e.append(eI(hj.Entity,n,n+1+i[0].length)):-1},InlineCode(e,t,n){if(96!=t||n&&96==e.char(n-1))return-1;let i=n+1;for(;i<e.end&&96==e.char(i);)i++;let r=i-n,o=0;for(;i<e.end;i++)if(96==e.char(i)){if(o++,o==r&&96!=e.char(i+1))return e.append(eI(hj.InlineCode,n,i+1,[eI(hj.CodeMark,n,n+r),eI(hj.CodeMark,i+1-r,i+1)]))}else o=0;return-1},HTMLTag(e,t,n){if(60!=t||n==e.end-1)return-1;let i=e.slice(n+1,e.end),r=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(i);if(r)return e.append(eI(hj.Autolink,n,n+1+r[0].length,[eI(hj.LinkMark,n,n+1),eI(hj.URL,n+1,n+r[0].length),eI(hj.LinkMark,n+r[0].length,n+1+r[0].length)]));let o=/^!--[^>](?:-[^-]|[^-])*?-->/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;n<t;n++){let t=e.parts[n];t instanceof oI&&t.type==iI&&(t.side=0)}return o.to}}return-1}};function cI(e,t,n,i,r){let{text:o}=e,s=e.char(r),a=r;if(t.unshift(eI(hj.LinkMark,i,i+(n==hj.Image?2:1))),t.push(eI(hj.LinkMark,r-1,r)),40==s){let n,i=e.skipSpace(r+1),s=pI(o,i-e.offset,e.offset);s&&(i=e.skipSpace(s.to),i!=s.to&&(n=uI(o,i-e.offset,e.offset),n&&(i=e.skipSpace(n.to)))),41==e.char(i)&&(t.push(eI(hj.LinkMark,r,r+1)),a=i+1,s&&t.push(s),n&&t.push(n),t.push(eI(hj.LinkMark,i,a)))}else if(91==s){let n=dI(o,r-e.offset,e.offset,!1);n&&(t.push(n),a=n.to)}return eI(n,i,a,t)}function pI(e,t,n){if(60==e.charCodeAt(t)){for(let i=t+1;i<e.length;i++){let r=e.charCodeAt(i);if(62==r)return eI(hj.URL,t+n,i+1+n);if(60==r||10==r)return!1}return null}{let i=0,r=t;for(let t=!1;r<e.length;r++){let n=e.charCodeAt(r);if(vj(n))break;if(t)t=!1;else if(40==n)i++;else if(41==n){if(!i)break;i--}else 92==n&&(t=!0)}return r>t?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<e.length;i++){let s=e.charCodeAt(i);if(o)o=!1;else{if(s==r)return eI(hj.LinkTitle,t+n,i+1+n);92==s&&(o=!0)}}return null}function dI(e,t,n,i){for(let r=!1,o=t+1,s=Math.min(e.length,o+999);o<s;o++){let s=e.charCodeAt(o);if(r)r=!1;else{if(93==s)return!i&&eI(hj.LinkLabel,t+n,o+1+n);if(i&&!vj(s)&&(i=!1),91==s)return!1;92==s&&(r=!0)}}return null}class hI{constructor(e,t,n){this.parser=e,this.text=t,this.offset=n,this.parts=[]}char(e){return e>=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<this.parts.length;t++){let n=this.parts[t];if(!(n instanceof oI&&n.type.resolve&&2&n.side))continue;let i,r=n.type==tI||n.type==nI,o=n.to-n.from,s=t-1;for(;s>=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<t;e++)this.parts[e]instanceof Zj&&l.push(this.parts[e]),this.parts[e]=null;n.type.mark&&l.push(this.elt(n.type.mark,n.from,p));let u=this.elt(a,c,p,l);this.parts[s]=r&&i.from!=c?new oI(i.type,i.from,c,i.side):null,(this.parts[t]=r&&n.to!=p?new oI(n.type,p,n.to,n.side):null)?this.parts.splice(t,0,u):this.parts[t]=u}let t=[];for(let n=e;n<this.parts.length;n++){let e=this.parts[n];e instanceof Zj&&t.push(e)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=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<n.length&&n[i].to<e.to;)i++;if(i<n.length&&n[i].from<e.from){let t=n[i];t instanceof Zj&&(n[i]=new Zj(t.type,t.from,t.to,fI(t.children,[e])))}else n.splice(i++,0,e)}return n}const mI=[hj.CodeBlock,hj.ListItem,hj.OrderedList,hj.BulletList];class gI{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(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;i<t.length;i++){let r=t[i-1].to,o=t[i].from;r<e&&(n-=o-r)}return n}const vI=uO({"Blockquote/...":DO.quote,HorizontalRule:DO.contentSeparator,"ATXHeading1/... SetextHeading1/...":DO.heading1,"ATXHeading2/... SetextHeading2/...":DO.heading2,"ATXHeading3/...":DO.heading3,"ATXHeading4/...":DO.heading4,"ATXHeading5/...":DO.heading5,"ATXHeading6/...":DO.heading6,"Comment CommentBlock":DO.comment,Escape:DO.escape,Entity:DO.character,"Emphasis/...":DO.emphasis,"StrongEmphasis/...":DO.strong,"Link/... Image/...":DO.link,"OrderedList/... BulletList/...":DO.list,"BlockQuote/...":DO.quote,"InlineCode CodeText":DO.monospace,"URL Autolink":DO.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":DO.processingInstruction,"CodeInfo LinkLabel":DO.labelName,LinkTitle:DO.string,Paragraph:DO.content}),bI=new Uj(new K_(Xj).extend(vI),Object.keys(jj).map((e=>jj[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<t.length;u++){let n=t.charCodeAt(u);124!=n||c?(c||32!=n&&9!=n)&&(a<0&&(a=u),l=u+1):((!s||a>-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<e.length;n++){let t=e.charCodeAt(n);if(124==t)return!0;92==t&&n++}return!1}const EI=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class OI{constructor(){this.rows=null}nextLine(e,t,n){if(null==this.rows){let i;if(this.rows=!1,(45==t.next||58==t.next||124==t.next)&&EI.test(i=t.text.slice(t.pos))){let r=[];wI(e,n.content,0,r,n.start)==wI(e,i,t.pos)&&(this.rows=[e.elt("TableHeader",n.start,n.start+n.content.length,r),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let n=[];wI(e,t.text,t.pos,n,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,n))}return!1}finish(e,t){return!!this.rows&&(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0)}}DO.heading,DO.content,DO.processingInstruction;class PI{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}DO.list,DO.atom;function kI(e,t,n){return(i,r,o)=>{if(r!=e||i.char(o+1)==e)return-1;let s=[i.elt(n,o,o+1)];for(let r=o+1;r<i.end;r++){let a=i.char(r);if(a==e)return i.addElement(i.elt(t,o,r+1,s.concat(i.elt(n,r,r+1))));if(92==a&&s.push(i.elt("Escape",r,2+r++)),vj(a))break}return-1}}DO.special(DO.content),DO.processingInstruction,kI(94,"Superscript","SuperscriptMark"),DO.special(DO.content),DO.processingInstruction,kI(126,"Subscript","SubscriptMark"),DO.character;var SI=n(225);const CI=122,TI=123,AI=4,MI=131,DI=19,RI=140,NI=23,$I=141,jI=41,II=68,LI=154,BI=70,qI=155,zI=72,FI=156,VI=167,HI=89,UI=90,WI=169,GI=97,QI=171,XI=void 0!==SI&&SI.env&&/\bfparse(:dbg)?\b/.test(SI.env.LOG),KI=void 0!==SI&&SI.env&&/\bfparse:dbg\b/.test(SI.env.LOG),YI=void 0!==SI&&SI.env&&/\bcontext\b/.test(SI.env.LOG),ZI=[9,11,12,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],JI=nL("\n\r"),eL="*".charCodeAt(0),tL=nL("'./-+*^");function nL(e){return Array.from(e).map((e=>e.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 <identifier | nameIdentifier>",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 <propertyIdentifier>",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 <propertyIdentifier> <%s>",e.pos,n.token))})),uL=new HE(((e,t)=>{let n;KI&&console.log("%s: T <insertSemi>",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 <insertSemi>",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 <context>");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;t<e.length;t+=2){const[i,r]=e.slice(t,t+2);n[i.value]=r}return t.map((e=>n[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/]O<UQYO1G/]OOQQ1G/x1G/xO=xQYO1G/zO>PQYO1G/PO?YQYO1G/RO@cQYO1G/TO`QYO1G/TOOQQ1G/T1G/TO@yQYO1G/^OAhQ^O'#CdOBzQYO'#FqOOQO'#Dz'#DzOCUQWO'#DyOCZQWO'#FpOOQO'#Dx'#DxOOQO'#D{'#D{OCcQWO,5<ZOOQQ1G0^1G0^O`QYO1G0]O`QYO'#EsOChQWO,5<]OOQQ1G0_1G0_OCsQWO'#E[ODOQWO'#F|OOQO'#EZ'#EZODWQWO1G0`OOQP'#Eu'#EuOD]QXO,5;OO`QYO,5:|ODdQXO'#EvODlQWO,5<jOOQQ1G0g1G0gO`QYO1G.uO`QYO,5;{O$wQYO'#ElODtQYO,5;zO`QYO1G.yOD|QYO1G/}OOQO1G0X1G0XOOQO,5;c,5;cOOQO-E8u-E8uOOQO,5;X,5;XOOQO-E8k-E8kOERQWOOOOQQ-E8h-E8hOEWQYO'#CmOOQQ1G1]1G1]OOQQ,5;V,5;VOOQQ-E8i-E8iOEeQYO7+$QOOQQ7+%f7+%fO`QYO7+$oOF[QYO,5:rOFiQWO7+$oOFnQYO'#D[OOQQ'#DZ'#DZOHbQYO'#D_OHgQYO'#D_OHlQYO'#D_OHqQ`O'#DgOHvQ`O'#DjOH{Q`O'#DnOOQQ7+$x7+$xO`QYO,5:eO$wQYO'#ErOIQQWO,5<[OOQQ1G1u1G1uOJWQYO7+%wOJeQYO,5;_OOQO-E8q-E8qO@yQYO,5:vO$wQYO'#EtOJrQWO,5<hOJzQYO7+%zOOQP-E8s-E8sOKRQYO1G0hOOQO,5;b,5;bOOQO-E8t-E8tOK]QYO7+$aOKdQYO1G1gOOQQ,5;W,5;WOOQQ-E8j-E8jOKnQYO7+$eOOQO7+%i7+%iO`QYO,59XOLeQYO<<HZOOQQ<<HZ<<HZO/eQYO'#EoOMnQYO,59vO! bQYO,59yO! gQYO,59yO! lQYO,59yO! qQYO,5:RO$wQYO,5:UO!!`QbO,5:YO!!gQYO1G0POOQO,5;^,5;^OOQO-E8p-E8pO!!qQYO<<IcOOQQ<<Ic<<IcOOQO1G0b1G0bOOQO,5;`,5;`OOQO-E8r-E8rO!%pQYO'#E^OOQQ<<If<<IfO`QYO<<IfO`QYO<<G{O!&gQYO1G.sOOQQ,5;Z,5;ZOOQQ-E8m-E8mO!&qQYO1G/eOOQQ1G/e1G/eO!&vQbO'#D]O!'XQ`O'#D[O!'dQ`O1G/mO!'iQWO'#DmO!'nQ`O'#FhOOQO'#Dl'#DlO!'vQ`O1G/pOOQO'#Dq'#DqO!'{Q`O'#FjOOQO'#Dp'#DpO!(TQ`O1G/tOOQQAN?QAN?QO!(YQYOAN=gOOQQ7+%P7+%PO!)PQ`O,59vOOQQ7+%X7+%XO! qQYO,5:XO$wQYO'#EpO!)[Q`O,5<SOOQQ7+%[7+%[O! qQYO'#EqO!)dQ`O,5<UO!)lQ`O7+%`OOQO1G/s1G/sOOQO,5;[,5;[OOQO-E8n-E8nOOQO,5;],5;]OOQO-E8o-E8oO@yQYO<<HzOOQQAN>fAN>fO/eQYO'#EoO! qQYO<<HzO!)qQ`O7+%`O!)vQ`O1G/tO!!`QbO,5:YO!){Q`O'#Dn",stateData:"!*[~O#rOS#sOSPOSQOS~OTsOZVO[UOdtOhvOivOs}OviO!T{O!U{O!VxO!XzO!c!OO!g|O!igO!pyO!wjO#SnO#nRO#oRO$ZZO$i_O$j`O$kaO$lbO~OTsO[UOdtOhvOivOs}OviO!T{O!U{O!VxO!XzO!c!OO!g|O!igO!pyO!wjO#SnO#nRO#oRO$ZZO$i_O$j`O$kaO$lbO~OZ!TO#]!UO~P#PO#nRO#oRO~OZ!^O[!^O]!_O^!_O_!`O`!kOn!hOp!iOr!]Os!]Ot!jO{!lO!i!fO#z!dOv$bX~O#l#tX$s#tX~P%PO$i!mOT$YXZ$YX[$YXd$YXh$YXi$YXs$YXv$YX!T$YX!U$YX!V$YX!X$YX!c$YX!g$YX!i$YX!p$YX!w$YX#S$YX#n$YX#o$YX$Z$YX$j$YX$k$YX$l$YX~O#nRO#oROZ!PX[!PX]!PX^!PX_!PX`!PXn!PXp!PXr!PXs!PXt!PXv!PX{!PX!i!PX#l!PX#p!PX#z!PX$s!PX$O!PXx!PX#}!PX!g!PXe!PXb!PX#R!PXf!PXl!PX~Ov!pO~O$j`O~O#p!uOZ#vX[#vX]#vX^#vX_#vX`#vXn#vXp#vXr#vXs#vXt#vXv#vX{#vX!i#vX#l#vX#z#vX$s#vX$O#vXx#vX#}#vX!g#vXe#vXb#vX#R#vXf#vXl#vX~O!g$eP~P`Ov!xO~O#m!yO$j`O#R$rP~Op#VO~Op#WOv!uX~O$s#ZO~O#luX$OuX$suXxuX#}uX!guXeuXbuX#RuXfuXluX~P%PO$O#]O#l$UXx$UX~O#l#[X~P&[Ov#_O~OZ#`O[#`O]#`O^#`O_#`O#nRO#oRO#z#`O#{#`O$]WX~O`WXxWX$OWX~P.SO`#dO~O$O#eOb#xX~Ob#hO~O#nRO#oRO$ZZO~OTsOZVO[UOdtOhvOivOs}O!T{O!U{O!VxO!XzO!c!OO!g|O!igO!pyO!wjO#SnO#nRO#oRO$ZZO$i_O$j`O$kaO$lbO~Ov#rO~P/pO|#tO~O{!lO!i!fO#z!dOZya[ya]ya^ya_ya`yanyapyaryasyatyav$bX#lya$sya$Oyaxya#}ya!gyaeyabya#Ryafyalya~Ox$eP~P`Ox#}O#}$OO~P%PO#}$OO$O$PO!g$eX~P%PO!g$RO~O#nRO#oROx$pP~OZ#`O[#`O]#`O^#`O_#`O#m!yO#z#`O#{#`O~O$]#WX~P4^O$]$YO~O$O$ZO#R$rX~O#R$]O~Oe$^O~P%PO$O$`Ol$SX~Ol$bO~O!W$cO~O!T$dO~O#l!xa$s!xa$O!xax!xa#}!xa!g!xae!xab!xa#R!xaf!xal!xa~P%PO$O#]O#l$Uax$Ua~OZ#`O[#`O]#`O^#`O_#`O#nRO#oRO#z#`O#{#`O~O`Wa$]WaxWa$OWa~P7TO$O#eOb#xa~OZ!^O[!^O]!_O^!_O_!`O{!lO!i!fO#z!dOv$bX~O`qinqipqirqisqitqi#lqi$sqi$Oqixqi#}qi!gqieqibqi#Rqifqilqi~P8[O_!`O{!lO!i!fO#z!dOZyi[yi`yinyipyiryisyityiv$bX#lyi$syi$Oyixyi#}yi!gyieyibyi#Ryifyilyi~O]!_O^!_O~P:SO]yi^yi~P:SO{!lO!i!fO#z!dOZyi[yi]yi^yi_yi`yinyipyiryisyityiv$bX#lyi$syi$Oyixyi#}yi!gyieyibyi#Ryifyilyi~O!g$pO~P%PO`!kOp!iOr!]Os!]Ot!jOnmi#lmi$smi$Omixmi#}mi!gmiemibmi#Rmifmilmi~P8[O`!kOr!]Os!]Ot!jOnoipoi#loi$soi$Ooixoi#}oi!goieoiboi#Roifoiloi~P8[O`!kOn!hOp$qOr!]Os!]Ot!jO~P8[O!S$vO!V$wO!X$xO![$yO!_$zO!c${O#nRO#oRO$ZZO~OZ#bX[#bX]#bX^#bX_#bX`#bXn#bXp#bXr#bXs#bXt#bXv#bXx#bX{#bX!i#bX#n#bX#o#bX#p#bX#z#bX$O#bX~P.SO$O$POx$eX~P%PO$]$}O~O$O%OOx$dX~Ox%QO~O$O$PO!g$eax$ea~O$]%UOx#OX$O#OX~O$O%VOx$pX~Ox%XO~O$]#Wa~P4^O#m!yO$j`O~O$O$ZO#R$ra~O$O$`Ol$Sa~O!U%cO~OxrO~O#}%dObaX$OaX~P%PO#lSq$sSq$OSqxSq#}Sq!gSqeSqbSq#RSqfSqlSq~P%POx#}O#}$OO$OuX~P%POx%fO~O#z%gOZ!OX[!OX]!OX^!OX_!OX`!OXn!OXp!OXr!OXs!OXt!OXv!OX{!OX!i!OX#l!OX$s!OX$O!OXx!OX#}!OX!g!OXe!OXb!OX#R!OXf!OXl!OX~Op%iO~Op%jO~Op%kO~O!]%lO~O!]%mO~O!]%nO~O$O%OOx$da~OZ!^O[!^O]!_O^!_O_!`O`!kOn!hOp!iOr!]Os!]Ot!jO{!lO#z!dOv$bX~Ox%sO!g%sO!i%rO~PIYO!g#ga$O#gax#ga~P%PO$O%VOx$pa~O#P%yO~P`O#R#Ui$O#Ui~P%POf%zO~P%POl$Ti$O$Ti~P%PO#lgq$sgq$Ogqxgq#}gq!ggqegqbgq#Rgqfgqlgq~P%PO`qynqypqyrqysqytqy#lqy$sqy$Oqyxqy#}qy!gqyeqybqy#Rqyfqylqy~P8[O#z%gOZ!Oa[!Oa]!Oa^!Oa_!Oa`!Oan!Oap!Oar!Oas!Oat!Oav!Oa{!Oa!i!Oa#l!Oa$s!Oa$O!Oax!Oa#}!Oa!g!Oae!Oab!Oa#R!Oaf!Oal!Oa~O!T&OO~O!W&OO~O!T&PO~O!S$vO!V$wO!X$xO![$yO!_$zO!c&uO#nRO#oRO$ZZO~O!Y$^P~P! qOx!mi$O!mi~P%POT$aXZ$aX[$aX]!yy^!yy_!yy`!yyd$aXh$aXi$aXn!yyp!yyr!yys$aXt!yyv$aX{!yy!T$aX!U$aX!V$aX!X$aX!c$aX!g$aX!i$aX!p$aX!w$aX#S$aX#l!yy#n$aX#o$aX#z!yy$Z$aX$i$aX$j$aX$k$aX$l$aX$s!yy$O!yyx!yy#}!yye!yyb!yy#R!yyf!yyl!yy~O#l#QX$s#QX$O#QXx#QX#}#QX!g#QXe#QXb#QX#R#QXf#QXl#QX~P%PObai$Oai~P%PO!U&_O~O#nRO#oRO!Y!PX#z!PX$O!PX~O#z&pO!Y!OX$O!OX~O!Y&aO~O$]&bO~O$O&cO!Y$[X~O!Y&eO~O$O&fO!Y$^X~O!Y&hO~O#lc!R$sc!R$Oc!Rxc!R#}c!R!gc!Rec!Rbc!R#Rc!Rfc!Rlc!R~P%PO#z&pO!Y!Oa$O!Oa~O$O&cO!Y$[a~O$O&fO!Y$^a~O$_&nO~O$_&qO~O!Y&rO~O!]&tO~O$Z~QP_^$i]#z~",goto:"E|$sPPPP$tP%m%p%v&Y'sPPPPPP'|P$tPPP$tPP(P(SP$tP$tP$tPPP(YP(eP$t$tPP(n)T)`*m)TPPPPPPP)TPP)TP+r+u)TP+{,R$tP$tP$t,Y-R-U-[-RP-d.]-d-d/]0UP$t0}$t1v1v2o2rP2xPP1v3O3U/X3YPP3bP3e3l3r3x4O5Z5e5k5q5w6O6U6[6bPPPPPPPP6h6q8x9q:j:mPP:qPP:w:z;s<l<o<s<x=g>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,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='3'><path d='m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0' stroke='${jL(LL.warning)}' fill='none' stroke-width='1.2'/></svg>")`},"& .cm-lintRange.cm-lintRange-error::after":{backgroundImage:`url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='3'><path d='m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0' stroke='${jL(LL.error)}' fill='none' stroke-width='1.2'/></svg>")`},"& .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,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='3'><path d='m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0' stroke='${"%23"+WL}' fill='none' stroke-width='1.2'/></svg>")`},"& .cm-lintRange.cm-lintRange-error::after":{backgroundImage:"url(\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='3'><path d='m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0' stroke='red' fill='none' stroke-width='1.2'/></svg>\")"},"& .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`<<Go<<GoOOO`<<Gr<<Gr",stateData:"$g~ORUO_WObPOeROgSO^`P~OQYO_ZOc[O~OQ]O~OQ^O~ORUObPOeROgSO^`XW`XX`XZ`X[`X~OPXO~Oc`O~OQaOcbO~OfcO~OfdO~OceO~ORUObPOeROgSOW`PX`P~ORUObPOeROgSOZ`P[`P~OWhOXhO~OZiO[iO~O",goto:"!ZePPPPPfflPPlPPrPPz!TPP!TXQOVcdXTOVcdUVOcdR_VQXOQfcRgdXUOVcd",nodeNames:"⚠ Feel FeelBlock SimpleTextBlock Feelers Insert EmptyInsert ConditionalSpanner ConditionalSpannerClose ConditionalSpannerCloseNl LoopSpanner LoopSpannerClose LoopSpannerCloseNl",maxTerm:23,propSources:[iB],skippedNodes:[0],repeatNodeCount:1,tokenData:"%X~RR!_!`[#o#pa#q#r$r~aO_~~dP#o#pg~lQb~str!P!Q!{~uQ#]#^{#`#a!^~!OP#Y#Z!R~!UPpq!X~!^Oe~~!aP#c#d!d~!gP#c#d!j~!mP#d#e!p~!sPpq!v~!{Og~~#OQ#]#^#U#`#a#u~#XP#Y#Z#[~#_P#q#r#b~#eP#q#r#h~#mPW~YZ#p~#uOX~~#xP#c#d#{~$OP#c#d$R~$UP#d#e$X~$[P#q#r$_~$bP#q#r$e~$jPZ~YZ$m~$rO[~R$uP#q#r$xR%PPcPfQYZ%SQ%XOfQ",tokenizers:[0,1,nB,JL,tB],topRules:{Feelers:[0,4]},tokenPrec:0});const oB={ConditionalSpanner:bD,LoopSpanner:bD};const sB=e=>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<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},uB.apply(this,arguments)}function dB(e){const{context:t,after:n,before:i,keyword:r}=e;return function(e,t){const{nodes:n,before:i,after:r,keyword:o}=e;return e=>{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;a<o.length-1;a++){var l=s.find((e=>e.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(`<div class="description">${n}<div>`),boost:0}}const LB=[{name:"not(negand)",description:'<p>Returns the logical negation of the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">not(negand: boolean): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">not(true)\n// false\n\nnot(null)\n// null\n</code></pre>\n'},{name:"is defined(value)",description:'<p><em>Camunda Extension</em></p>\n<p>Checks if a given value is not <code>null</code>. If the value is <code>null</code> then the function returns <code>false</code>.\nOtherwise, the function returns <code>true</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">is defined(value: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">is defined(1)\n// true\n\nis defined(null)\n// false\n\nis defined(x)\n// false - if no variable &quot;x&quot; exists\n\nis defined(x.y)\n// false - if no variable &quot;x&quot; exists or it doesn&#39;t have a property &quot;y&quot;\n</code></pre>\n<p>:::caution Breaking change</p>\n<p>This function worked differently in previous versions. It returned <code>true</code> if the value was <code>null</code>.\nSince this version, the function returns <code>false</code> if the value is <code>null</code>.</p>\n<p>:::</p>\n'},{name:"get or else(value, default)",description:'<p><em>Camunda Extension</em></p>\n<p>Return the provided value parameter if not <code>null</code>, otherwise return the default parameter</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">get or else(value: Any, default: Any): Any\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">get or else(&quot;this&quot;, &quot;default&quot;)\n// &quot;this&quot;\n\nget or else(null, &quot;default&quot;)\n// &quot;default&quot;\n\nget or else(null, null)\n// null\n</code></pre>\n'},{name:"assert(value, condition)",description:'<p><em>Camunda Extension</em></p>\n<p>Verify that the given condition is met. If the condition is <code>true</code>, the function returns the value.\nOtherwise, the evaluation fails with an error.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">assert(value: Any, condition: Any)\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">assert(x, x != null)\n// &quot;value&quot; - if x is &quot;value&quot;\n// error - if x is null or doesn&#39;t exist\n\nassert(x, x &gt;= 0)\n// 4 - if x is 4\n// error - if x is less than zero\n</code></pre>\n'},{name:"assert(value, condition, cause)",description:'<p><em>Camunda Extension</em></p>\n<p>Verify that the given condition is met. If the condition is <code>true</code>, the function returns the value.\nOtherwise, the evaluation fails with an error containing the given message.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">assert(value: Any, condition: Any, cause: String)\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">assert(x, x != null, &quot;&#39;x&#39; should not be null&quot;)\n// &quot;value&quot; - if x is &quot;value&quot;\n// error(&#39;x&#39; should not be null) - if x is null or doesn&#39;t exist\n\nassert(x, x &gt;= 0, &quot;&#39;x&#39; should be positive&quot;)\n// 4 - if x is 4\n// error(&#39;x&#39; should be positive) - if x is less than zero\n</code></pre>\n'},{name:"get value(context, key)",description:'<p>Returns the value of the context entry with the given key.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">get value(context: context, key: string): Any\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">get value({foo: 123}, &quot;foo&quot;)\n// 123\n\nget value({a: 1}, &quot;b&quot;)\n// null\n</code></pre>\n'},{name:"get value(context, keys)",description:'<p><em>Camunda Extension</em></p>\n<p>Returns the value of the context entry for a context path defined by the given keys.</p>\n<p>If <code>keys</code> contains the keys <code>[k1, k2]</code> then it returns the value at the nested entry <code>k1.k2</code> of the context.</p>\n<p>If <code>keys</code> are empty or the nested entry defined by the keys doesn&#39;t exist in the context, it returns <code>null</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">get value(context: context, keys: list&lt;string&gt;): Any\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">get value({x:1, y: {z:0}}, [&quot;y&quot;, &quot;z&quot;])\n// 0\n\nget value({x: {y: {z:0}}}, [&quot;x&quot;, &quot;y&quot;])\n// {z:0}\n\nget value({a: {b: 3}}, [&quot;b&quot;])\n// null\n</code></pre>\n'},{name:"get entries(context)",description:'<p>Returns the entries of the context as a list of key-value-pairs.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">get entries(context: context): list&lt;context&gt;\n</code></pre>\n<p>The return value is a list of contexts. Each context contains two entries for &quot;key&quot; and &quot;value&quot;.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">get entries({foo: 123})\n// [{key: &quot;foo&quot;, value: 123}]\n</code></pre>\n'},{name:"context put(context, key, value)",description:'<p>Adds a new entry with the given key and value to the context. Returns a new context that includes the entry.</p>\n<p>If an entry for the same key already exists in the context, it overrides the value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">context put(context: context, key: string, value: Any): context\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">context put({x:1}, &quot;y&quot;, 2)\n// {x:1, y:2}\n</code></pre>\n<p>:::info\nThe function <code>context put()</code> replaced the previous function <code>put()</code> (Camunda Extension). The\nprevious function is deprecated and should not be used anymore.\n:::</p>\n'},{name:"context put(context, keys, value)",description:'<p>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.</p>\n<p>If <code>keys</code> contains the keys <code>[k1, k2]</code> then it adds the nested entry <code>k1.k2 = value</code> to the context.</p>\n<p>If an entry for the same keys already exists in the context, it overrides the value.</p>\n<p>If <code>keys</code> are empty, it returns <code>null</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">context put(context: context, keys: list&lt;string&gt;, value: Any): context\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">context put({x:1}, [&quot;y&quot;], 2)\n// {x:1, y:2}\n\ncontext put({x:1, y: {z:0}}, [&quot;y&quot;, &quot;z&quot;], 2)\n// {x:1, y: {z:2}}\n\ncontext put({x:1}, [&quot;y&quot;, &quot;z&quot;], 2)\n// {x:1, y: {z:2}}\n</code></pre>\n'},{name:"context merge(contexts)",description:'<p>Union the given contexts. Returns a new context that includes all entries of the given contexts.</p>\n<p>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.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">context merge(contexts: list&lt;context&gt;): context\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">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</code></pre>\n<p>:::info\nThe function <code>context merge()</code> replaced the previous function <code>put all()</code> (Camunda Extension). The\nprevious function is deprecated and should not be used anymore.\n:::</p>\n'},{name:"string(from)",description:'<p>Returns the given value as a string representation.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">string(from: Any): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">string(1.1)\n// &quot;1.1&quot;\n\nstring(date(&quot;2012-12-25&quot;))\n// &quot;2012-12-25&quot;\n</code></pre>\n'},{name:"number(from)",description:'<p>Parses the given string to a number.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">number(from: string): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">number(&quot;1500.5&quot;)\n// 1500.5\n</code></pre>\n'},{name:"context(entries)",description:'<p>Constructs a context of the given list of key-value pairs. It is the reverse function to <a href="feel-built-in-functions-context.md#get-entriescontext">get entries()</a>.</p>\n<p>Each key-value pair must be a context with two entries: <code>key</code> and <code>value</code>. The entry with name <code>key</code> must have a value of the type <code>string</code>.</p>\n<p>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.</p>\n<p>Returns <code>null</code> if one of the entries is not a context or if a context doesn&#39;t contain the required entries.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">context(entries: list&lt;context&gt;): context\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">context([{&quot;key&quot;:&quot;a&quot;, &quot;value&quot;:1}, {&quot;key&quot;:&quot;b&quot;, &quot;value&quot;:2}])\n// {a:1, b:2}\n</code></pre>\n'},{name:"date(from)",description:'<p>Returns a date from the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">date(from: string): date\n</code></pre>\n<p>Parses the given string into a date.</p>\n<pre><code class="language-feel">date(from: date and time): date\n</code></pre>\n<p>Extracts the date component from the given date and time.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">date(&quot;2018-04-29&quot;)\n// date(&quot;2018-04-29&quot;)\n\ndate(date and time(&quot;2012-12-25T11:00:00&quot;))\n// date(&quot;2012-12-25&quot;)\n</code></pre>\n'},{name:"date(year, month, day)",description:'<p>Returns a date from the given components.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">date(year: number, month: number, day: number): date\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">date(2012, 12, 25)\n// date(&quot;2012-12-25&quot;)\n</code></pre>\n'},{name:"time(from)",description:'<p>Returns a time from the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">time(from: string): time\n</code></pre>\n<p>Parses the given string into a time.</p>\n<pre><code class="language-feel">time(from: date and time): time\n</code></pre>\n<p>Extracts the time component from the given date and time.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">time(&quot;12:00:00&quot;)\n// time(&quot;12:00:00&quot;)\n\ntime(date and time(&quot;2012-12-25T11:00:00&quot;))\n// time(&quot;11:00:00&quot;)\n</code></pre>\n'},{name:"time(hour, minute, second)",description:'<p>Returns a time from the given components.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">time(hour: number, minute: number, second: number): time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">time(23, 59, 0)\n// time(&quot;23:59:00&quot;)\n</code></pre>\n'},{name:"time(hour, minute, second, offset)",description:'<p>Returns a time from the given components, including a timezone offset.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">time(hour: number, minute: number, second: number, offset: days and time duration): time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">time(14, 30, 0, duration(&quot;PT1H&quot;))\n// time(&quot;14:30:00+01:00&quot;)\n</code></pre>\n'},{name:"date and time(from)",description:'<p>Parses the given string into a date and time.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">date and time(from: string): date and time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">date and time(&quot;2018-04-29T09:30:00&quot;)\n// date and time(&quot;2018-04-29T09:30:00&quot;)\n</code></pre>\n'},{name:"date and time(date, time)",description:'<p>Returns a date and time from the given components.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">date and time(date: date, time: time): date and time\n</code></pre>\n<pre><code class="language-feel">date and time(date: date and time, time: time): date and time\n</code></pre>\n<p>Returns a date and time value that consists of the date component of <code>date</code> combined with <code>time</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">date and time(date(&quot;2012-12-24&quot;),time(&quot;T23:59:00&quot;))\n// date and time(&quot;2012-12-24T23:59:00&quot;)\n\ndate and time(date and time(&quot;2012-12-25T11:00:00&quot;),time(&quot;T23:59:00&quot;))\n// date and time(&quot;2012-12-25T23:59:00&quot;)\n</code></pre>\n'},{name:"date and time(date, timezone)",description:'<p><em>Camunda Extension</em></p>\n<p>Returns the given date and time value at the given timezone.</p>\n<p>If <code>date</code> has a different timezone than <code>timezone</code> then it adjusts the time to match the local time of <code>timezone</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">date and time(date: date and time, timezone: string): date and time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">date and time(@&quot;2020-07-31T14:27:30@Europe/Berlin&quot;, &quot;America/Los_Angeles&quot;)\n// date and time(&quot;2020-07-31T05:27:30@America/Los_Angeles&quot;)\n\ndate and time(@&quot;2020-07-31T14:27:30&quot;, &quot;Z&quot;)\n// date and time(&quot;2020-07-31T12:27:30Z&quot;)\n</code></pre>\n'},{name:"duration(from)",description:'<p>Parses the given string into a duration. The duration is either a days and time duration or a years and months duration.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">duration(from: string): days and time duration\n</code></pre>\n<pre><code class="language-feel">duration(from: string): years and months duration\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">duration(&quot;P5D&quot;)\n// duration(&quot;P5D&quot;)\n\nduration(&quot;P32Y&quot;)\n// duration(&quot;P32Y&quot;)\n</code></pre>\n'},{name:"years and months duration(from, to)",description:'<p>Returns the years and months duration between <code>from</code> and <code>to</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">years and months duration(from: date, to: date): years and months duration\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">years and months duration(date(&quot;2011-12-22&quot;), date(&quot;2013-08-24&quot;))\n// duration(&quot;P1Y8M&quot;)\n</code></pre>\n'},{name:"list contains(list, element)",description:'<p>Returns <code>true</code> if the given list contains the element. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">list contains(list: list, element: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">list contains([1,2,3], 2)\n// true\n</code></pre>\n'},{name:"count(list)",description:'<p>Returns the number of elements of the given list.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">count(list: list): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">count([1,2,3])\n// 3\n</code></pre>\n'},{name:"min(list)",description:'<p>Returns the minimum of the given list.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">min(list: list): Any\n</code></pre>\n<p>All elements in <code>list</code> should have the same type and be comparable.</p>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">min([1,2,3])\n// 1\n\nmin(1,2,3)\n// 1\n</code></pre>\n'},{name:"max(list)",description:'<p>Returns the maximum of the given list.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">max(list: list): Any\n</code></pre>\n<p>All elements in <code>list</code> should have the same type and be comparable.</p>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">max([1,2,3])\n// 3\n\nmax(1,2,3)\n// 3\n</code></pre>\n'},{name:"sum(list)",description:'<p>Returns the sum of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">sum(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">sum([1,2,3])\n// 6\n\nsum(1,2,3)\n// 6\n</code></pre>\n'},{name:"product(list)",description:'<p>Returns the product of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">product(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">product([2, 3, 4])\n// 24\n\nproduct(2, 3, 4)\n// 24\n</code></pre>\n'},{name:"mean(list)",description:'<p>Returns the arithmetic mean (i.e. average) of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">mean(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">mean([1,2,3])\n// 2\n\nmean(1,2,3)\n// 2\n</code></pre>\n'},{name:"median(list)",description:'<p>Returns the median element of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">median(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">median(8, 2, 5, 3, 4)\n// 4\n\nmedian([6, 1, 2, 3])\n// 2.5\n</code></pre>\n'},{name:"stddev(list)",description:'<p>Returns the standard deviation of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">stddev(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">stddev(2, 4, 7, 5)\n// 2.0816659994661326\n\nstddev([2, 4, 7, 5])\n// 2.0816659994661326\n</code></pre>\n'},{name:"mode(list)",description:'<p>Returns the mode of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">mode(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">mode(6, 3, 9, 6, 6)\n// [6]\n\nmode([6, 1, 9, 6, 1])\n// [1, 6]\n</code></pre>\n'},{name:"all(list)",description:'<p>Returns <code>false</code> if any element of the given list is <code>false</code>. Otherwise, returns <code>true</code>.</p>\n<p>If the given list is empty, it returns <code>true</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">all(list: list&lt;boolean&gt;): boolean\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">all([true,false])\n// false\n\nall(false,null,true)\n// false\n</code></pre>\n<p>:::info\nThe function <code>all()</code> replaced the previous function <code>and()</code>. The previous function is deprecated and\nshould not be used anymore.\n:::</p>\n'},{name:"any(list)",description:'<p>Returns <code>true</code> if any element of the given list is <code>true</code>. Otherwise, returns <code>false</code>.</p>\n<p>If the given list is empty, it returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">any(list: list&lt;boolean&gt;): boolean\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">any([false,true])\n// true\n\nany(false,null,true)\n// true\n</code></pre>\n<p>:::info\nThe function <code>any()</code> replaced the previous function <code>or()</code>. The previous function is deprecated and\nshould not be used anymore.\n:::</p>\n'},{name:"sublist(list, start position)",description:'<p>Returns a partial list of the given value starting at <code>start position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">sublist(list: list, start position: number): list\n</code></pre>\n<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">sublist([1,2,3], 2)\n// [2,3]\n</code></pre>\n'},{name:"sublist(list, start position, length)",description:'<p>Returns a partial list of the given value starting at <code>start position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">sublist(list: list, start position: number, length: number): list\n</code></pre>\n<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">sublist([1,2,3], 1, 2)\n// [1,2]\n</code></pre>\n'},{name:"append(list, items)",description:'<p>Returns the given list with all <code>items</code> appended.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">append(list: list, items: Any): list\n</code></pre>\n<p>The parameter <code>items</code> can be a single element or a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">append([1], 2, 3)\n// [1,2,3]\n</code></pre>\n'},{name:"concatenate(lists)",description:'<p>Returns a list that includes all elements of the given lists.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">concatenate(lists: list): list\n</code></pre>\n<p>The parameter <code>lists</code> is a sequence of lists.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">concatenate([1,2],[3])\n// [1,2,3]\n\nconcatenate([1],[2],[3])\n// [1,2,3]\n</code></pre>\n'},{name:"insert before(list, position, newItem)",description:'<p>Returns the given list with <code>newItem</code> inserted at <code>position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">insert before(list: list, position: number, newItem: Any): list\n</code></pre>\n<p>The <code>position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">insert before([1,3],1,2)\n// [2,1,3]\n</code></pre>\n'},{name:"remove(list, position)",description:'<p>Returns the given list without the element at <code>position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">remove(list: list, position: number): list\n</code></pre>\n<p>The <code>position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">remove([1,2,3], 2)\n// [1,3]\n</code></pre>\n'},{name:"reverse(list)",description:'<p>Returns the given list in revered order.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">reverse(list: list): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">reverse([1,2,3])\n// [3,2,1]\n</code></pre>\n'},{name:"index of(list, match)",description:'<p>Returns an ascending list of positions containing <code>match</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">index of(list: list, match: Any): list&lt;number&gt;\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">index of([1,2,3,2],2)\n// [2,4]\n</code></pre>\n'},{name:"union(list)",description:'<p>Returns a list that includes all elements of the given lists without duplicates.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">union(list: list): list\n</code></pre>\n<p>The parameter <code>list</code> is a sequence of lists.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">union([1,2],[2,3])\n// [1,2,3]\n</code></pre>\n'},{name:"distinct values(list)",description:'<p>Returns the given list without duplicates.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">distinct values(list: list): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">distinct values([1,2,3,2,1])\n// [1,2,3]\n</code></pre>\n'},{name:"duplicate values(list)",description:'<p><em>Camunda Extension</em></p>\n<p>Returns all duplicate values of the given list.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">duplicate values(list: list): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">duplicate values([1,2,3,2,1])\n// [1,2]\n</code></pre>\n'},{name:"flatten(list)",description:'<p>Returns a list that includes all elements of the given list without nested lists.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">flatten(list: list): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">flatten([[1,2],[[3]], 4])\n// [1,2,3,4]\n</code></pre>\n'},{name:"sort(list, precedes)",description:'<p>Returns the given list sorted by the <code>precedes</code> function.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">sort(list: list, precedes: function&lt;(Any, Any) -&gt; boolean&gt;): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">sort(list: [3,1,4,5,2], precedes: function(x,y) x &lt; y)\n// [1,2,3,4,5]\n</code></pre>\n'},{name:"string join(list)",description:'<p>Joins a list of strings into a single string. This is similar to\nJava&#39;s <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Collectors.html#joining(java.lang.CharSequence,java.lang.CharSequence,java.lang.CharSequence)">joining</a>\nfunction.</p>\n<p>If an item of the list is <code>null</code>, the item is ignored for the result string. If an item is\nneither a string nor <code>null</code>, the function returns <code>null</code> instead of a string.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">string join(list: list&lt;string&gt;): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">string join([&quot;a&quot;,&quot;b&quot;,&quot;c&quot;])\n// &quot;abc&quot;\n\nstring join([&quot;a&quot;,null,&quot;c&quot;])\n// &quot;ac&quot;\n\nstring join([])\n// &quot;&quot;\n</code></pre>\n'},{name:"string join(list, delimiter)",description:'<p>Joins a list of strings into a single string. This is similar to\nJava&#39;s <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Collectors.html#joining(java.lang.CharSequence,java.lang.CharSequence,java.lang.CharSequence)">joining</a>\nfunction.</p>\n<p>If an item of the list is <code>null</code>, the item is ignored for the result string. If an item is\nneither a string nor <code>null</code>, the function returns <code>null</code> instead of a string.</p>\n<p>The resulting string contains a <code>delimiter</code> between each element.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">string join(list: list&lt;string&gt;, delimiter: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">string join([&quot;a&quot;], &quot;X&quot;)\n// &quot;a&quot;\n\nstring join([&quot;a&quot;,&quot;b&quot;,&quot;c&quot;], &quot;, &quot;)\n// &quot;a, b, c&quot;\n</code></pre>\n'},{name:"string join(list, delimiter, prefix, suffix)",description:'<p><em>Camunda Extension</em></p>\n<p>Joins a list of strings into a single string. This is similar to\nJava&#39;s <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Collectors.html#joining(java.lang.CharSequence,java.lang.CharSequence,java.lang.CharSequence)">joining</a>\nfunction.</p>\n<p>If an item of the list is <code>null</code>, the item is ignored for the result string. If an item is\nneither a string nor <code>null</code>, the function returns <code>null</code> instead of a string.</p>\n<p>The resulting string starts with <code>prefix</code>, contains a <code>delimiter</code> between each element, and ends\nwith <code>suffix</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">string join(list: list&lt;string&gt;, delimiter: string, prefix: string, suffix: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">string join([&quot;a&quot;,&quot;b&quot;,&quot;c&quot;], &quot;, &quot;, &quot;[&quot;, &quot;]&quot;)\n// &quot;[a, b, c]&quot;\n</code></pre>\n'},{name:"decimal(n, scale)",description:'<p>Rounds the given value at the given scale.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">decimal(n: number, scale: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">decimal(1/3, 2)\n// .33\n\ndecimal(1.5, 0)\n// 2\n</code></pre>\n'},{name:"floor(n)",description:'<p>Rounds the given value with rounding mode flooring.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">floor(n: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">floor(1.5)\n// 1\n\nfloor(-1.5)\n// -2\n</code></pre>\n'},{name:"floor(n, scale)",description:'<p>Rounds the given value with rounding mode flooring at the given scale.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">floor(n: number, scale: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">floor(-1.56, 1)\n// -1.6\n</code></pre>\n'},{name:"ceiling(n)",description:'<p>Rounds the given value with rounding mode ceiling.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">ceiling(n: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">ceiling(1.5)\n// 2\n\nceiling(-1.5)\n// -1\n</code></pre>\n'},{name:"ceiling(n, scale)",description:'<p>Rounds the given value with rounding mode ceiling at the given scale.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">ceiling(n: number, scale: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">ceiling(-1.56, 1)\n// -1.5\n</code></pre>\n'},{name:"round up(n, scale)",description:'<p>Rounds the given value with the rounding mode round-up at the given scale.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">round up(n: number, scale: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">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</code></pre>\n'},{name:"round down(n, scale)",description:'<p>Rounds the given value with the rounding mode round-down at the given scale.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">round down(n: number, scale: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">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</code></pre>\n'},{name:"round half up(n, scale)",description:'<p>Rounds the given value with the rounding mode round-half-up at the given scale.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">round half up(n: number, scale: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">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</code></pre>\n'},{name:"round half down(n, scale)",description:'<p>Rounds the given value with the rounding mode round-half-down at the given scale.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">round half down(n: number, scale: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">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</code></pre>\n'},{name:"abs(number)",description:'<p>Returns the absolute value of the given numeric value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">abs(number: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">abs(10)\n// 10\n\nabs(-10)\n// 10\n</code></pre>\n'},{name:"modulo(dividend, divisor)",description:'<p>Returns the remainder of the division of dividend by divisor.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">modulo(dividend: number, divisor: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">modulo(12, 5)\n// 2\n</code></pre>\n'},{name:"sqrt(number)",description:'<p>Returns the square root of the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">sqrt(number: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">sqrt(16)\n// 4\n</code></pre>\n'},{name:"log(number)",description:'<p>Returns the natural logarithm (base e) of the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">log(number: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">log(10)\n// 2.302585092994046\n</code></pre>\n'},{name:"exp(number)",description:'<p>Returns the Eulers number e raised to the power of the given number .</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">exp(number: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">exp(5)\n// 148.4131591025766\n</code></pre>\n'},{name:"odd(number)",description:'<p>Returns <code>true</code> if the given value is odd. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">odd(number: number): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">odd(5)\n// true\n\nodd(2)\n// false\n</code></pre>\n'},{name:"even(number)",description:'<p>Returns <code>true</code> if the given is even. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">even(number: number): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">even(5)\n// false\n\neven(2)\n// true\n</code></pre>\n'},{name:"random number()",description:'<p><em>Camunda Extension</em></p>\n<p>Returns a random number between <code>0</code> and <code>1</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">random number(): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">random number()\n// 0.9701618132579795\n</code></pre>\n'},{name:"before(point1, point2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">before(point1: Any, point2: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">before(1, 10)\n// true\n\nbefore(10, 1)\n// false\n</code></pre>\n'},{name:"before(range, point)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">before(range: range, point: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">before([1..5], 10)\n// true\n</code></pre>\n'},{name:"before(point, range)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">before(point: Any, range: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">before(1, [2..5])\n// true\n</code></pre>\n'},{name:"before(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">before(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">before([1..5], [6..10])\n// true\n\nbefore([1..5),[5..10])\n// true\n</code></pre>\n'},{name:"after(point1, point2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">after(point1: Any, point2: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">after(10, 1)\n// true\n\nafter(1, 10)\n// false\n</code></pre>\n'},{name:"after(range, point)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">after(range: range, point: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">after([1..5], 10)\n// false\n</code></pre>\n'},{name:"after(point, range)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">after(point: Any, range: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">after(12, [2..5])\n// true\n</code></pre>\n'},{name:"after(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">after(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">after([6..10], [1..5])\n// true\n\nafter([5..10], [1..5))\n// true\n</code></pre>\n'},{name:"meets(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">meets(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">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</code></pre>\n'},{name:"met by(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">met by(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">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</code></pre>\n'},{name:"overlaps(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">overlaps(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">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</code></pre>\n'},{name:"overlaps before(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">overlaps before(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">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</code></pre>\n'},{name:"overlaps after(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">overlaps after(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">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</code></pre>\n'},{name:"finishes(point, range)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">finishes(point: Any, range: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">finishes(5, [1..5])\n// true\n\nfinishes(10, [1..7])\n// false\n</code></pre>\n'},{name:"finishes(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">finishes(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">finishes([3..5], [1..5])\n// true\n\nfinishes((1..5], [1..5))\n// false\n\nfinishes([5..10], [1..10))\n// false\n</code></pre>\n'},{name:"finished by(range, point)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">finished by(range: range, point: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">finished by([5..10], 10)\n// true\n\nfinished by([3..4], 2)\n// false\n</code></pre>\n'},{name:"finished by(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">finished by(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">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</code></pre>\n'},{name:"includes(range, point)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">includes(range: range, point: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">includes([5..10], 6)\n// true\n\nincludes([3..4], 5)\n// false\n</code></pre>\n'},{name:"includes(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">includes(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">includes([1..10], [4..6])\n// true\n\nincludes((5..8], [1..5))\n// false\n\nincludes([1..10], [1..5))\n// true\n</code></pre>\n'},{name:"during(point, range)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">during(point: Any, range: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">during(5, [1..10])\n// true\n\nduring(12, [1..10])\n// false\n\nduring(1, (1..10])\n// false\n</code></pre>\n'},{name:"during(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">during(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">during([4..6], [1..10))\n// true\n\nduring((1..5], (1..10])\n// true\n</code></pre>\n'},{name:"starts(point, range)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">starts(point: Any, range: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">starts(1, [1..5])\n// true\n\nstarts(1, (1..8])\n// false\n</code></pre>\n'},{name:"starts(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">starts(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">starts((1..5], [1..5])\n// false\n\nstarts([1..10], [1..5])\n// false\n\nstarts((1..5), (1..10))\n// true\n</code></pre>\n'},{name:"started by(range, point)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">started by(range: range, point: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">started by([1..10], 1)\n// true\n\nstarted by((1..10], 1)\n// false\n</code></pre>\n'},{name:"started by(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">started by(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">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</code></pre>\n'},{name:"coincides(point1, point2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">coincides(point1: Any, point2: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">coincides(5, 5)\n// true\n\ncoincides(3, 4)\n// false\n</code></pre>\n'},{name:"coincides(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">coincides(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">coincides([1..5], [1..5])\n// true\n\ncoincides((1..5], [1..5))\n// false\n\ncoincides([1..5], [2..6])\n// false\n</code></pre>\n'},{name:"substring(string, start position)",description:'<p>Returns a substring of the given value starting at <code>start position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">substring(string: string, start position: number): string\n</code></pre>\n<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">substring(&quot;foobar&quot;, 3)\n// &quot;obar&quot;\n</code></pre>\n'},{name:"substring(string, start position, length)",description:'<p>Returns a substring of the given value starting at <code>start position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">substring(string: string, start position: number, length: number): string\n</code></pre>\n<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">substring(&quot;foobar&quot;, 3, 3)\n// &quot;oba&quot;\n</code></pre>\n'},{name:"string length(string)",description:'<p>Returns the number of characters in the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">string length(string: string): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">string length(&quot;foo&quot;)\n// 3\n</code></pre>\n'},{name:"upper case(string)",description:'<p>Returns the given value with all characters are uppercase.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">upper case(string: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">upper case(&quot;aBc4&quot;)\n// &quot;ABC4&quot;\n</code></pre>\n'},{name:"lower case(string)",description:'<p>Returns the given value with all characters are lowercase.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">lower case(string: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">lower case(&quot;aBc4&quot;)\n// &quot;abc4&quot;\n</code></pre>\n'},{name:"substring before(string, match)",description:'<p>Returns a substring of the given value that contains all characters before <code>match</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">substring before(string: string, match: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">substring before(&quot;foobar&quot;, &quot;bar&quot;)\n// &quot;foo&quot;\n</code></pre>\n'},{name:"substring after(string, match)",description:'<p>Returns a substring of the given value that contains all characters after <code>match</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">substring after(string: string, match: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">substring after(&quot;foobar&quot;, &quot;ob&quot;)\n// &quot;ar&quot;\n</code></pre>\n'},{name:"contains(string, match)",description:'<p>Returns <code>true</code> if the given value contains the substring <code>match</code>. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">contains(string: string, match: string): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">contains(&quot;foobar&quot;, &quot;of&quot;)\n// false\n</code></pre>\n'},{name:"starts with(string, match)",description:'<p>Returns <code>true</code> if the given value starts with the substring <code>match</code>. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">starts with(string: string, match: string): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">starts with(&quot;foobar&quot;, &quot;fo&quot;)\n// true\n</code></pre>\n'},{name:"ends with(string, match)",description:'<p>Returns <code>true</code> if the given value ends with the substring <code>match</code>. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">ends with(string: string, match: string): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">ends with(&quot;foobar&quot;, &quot;r&quot;)\n// true\n</code></pre>\n'},{name:"matches(input, pattern)",description:'<p>Returns <code>true</code> if the given value matches the <code>pattern</code>. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">matches(input: string, pattern: string): boolean\n</code></pre>\n<p>The <code>pattern</code> is a string that contains a regular expression.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">matches(&quot;foobar&quot;, &quot;^fo*bar&quot;)\n// true\n</code></pre>\n'},{name:"matches(input, pattern, flags)",description:'<p>Returns <code>true</code> if the given value matches the <code>pattern</code>. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">matches(input: string, pattern: string, flags: string): boolean\n</code></pre>\n<p>The <code>pattern</code> is a string that contains a regular expression.</p>\n<p>The <code>flags</code> can contain one or more of the following characters:</p>\n<ul>\n<li><code>s</code> (dot-all)</li>\n<li><code>m</code> (multi-line)</li>\n<li><code>i</code> (case insensitive)</li>\n<li><code>x</code> (comments)</li>\n</ul>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">matches(&quot;FooBar&quot;, &quot;foo&quot;, &quot;i&quot;)\n// true\n</code></pre>\n'},{name:"replace(input, pattern, replacement)",description:'<p>Returns the resulting string after replacing all occurrences of <code>pattern</code> with <code>replacement</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">replace(input: string, pattern: string, replacement: string): string\n</code></pre>\n<p>The <code>pattern</code> is a string that contains a regular expression.</p>\n<p>The <code>replacement</code> can access the match groups by using <code>$</code> and the number of the group, for example,\n<code>$1</code> to access the first group.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">replace(&quot;abcd&quot;, &quot;(ab)|(a)&quot;, &quot;[1=$1][2=$2]&quot;)\n// &quot;[1=ab][2=]cd&quot;\n\nreplace(&quot;0123456789&quot;, &quot;(\\d{3})(\\d{3})(\\d{4})&quot;, &quot;($1) $2-$3&quot;)\n// &quot;(012) 345-6789&quot;\n</code></pre>\n'},{name:"replace(input, pattern, replacement, flags)",description:'<p>Returns the resulting string after replacing all occurrences of <code>pattern</code> with <code>replacement</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">replace(input: string, pattern: string, replacement: string, flags: string): string\n</code></pre>\n<p>The <code>pattern</code> is a string that contains a regular expression.</p>\n<p>The <code>replacement</code> can access the match groups by using <code>$</code> and the number of the group, for example,\n<code>$1</code> to access the first group.</p>\n<p>The <code>flags</code> can contain one or more of the following characters:</p>\n<ul>\n<li><code>s</code> (dot-all)</li>\n<li><code>m</code> (multi-line)</li>\n<li><code>i</code> (case insensitive)</li>\n<li><code>x</code> (comments)</li>\n</ul>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">replace(&quot;How do you feel?&quot;, &quot;Feel&quot;, &quot;FEEL&quot;, &quot;i&quot;)\n// &quot;How do you FEEL?&quot;\n</code></pre>\n'},{name:"split(string, delimiter)",description:'<p>Splits the given value into a list of substrings, breaking at each occurrence of the <code>delimiter</code> pattern.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">split(string: string, delimiter: string): list&lt;string&gt;\n</code></pre>\n<p>The <code>delimiter</code> is a string that contains a regular expression.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">split(&quot;John Doe&quot;, &quot;\\s&quot; )\n// [&quot;John&quot;, &quot;Doe&quot;]\n\nsplit(&quot;a;b;c;;&quot;, &quot;;&quot;)\n// [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;&quot;, &quot;&quot;]\n</code></pre>\n'},{name:"extract(string, pattern)",description:'<p><em>Camunda Extension</em></p>\n<p>Returns all matches of the pattern in the given string. Returns an empty list if the pattern doesn&#39;t\nmatch.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">extract(string: string, pattern: string): list&lt;string&gt;\n</code></pre>\n<p>The <code>pattern</code> is a string that contains a regular expression.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">extract(&quot;references are 1234, 1256, 1378&quot;, &quot;12[0-9]*&quot;)\n// [&quot;1234&quot;,&quot;1256&quot;]\n</code></pre>\n'},{name:"now()",description:'<p>Returns the current date and time including the timezone.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">now(): date and time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">now()\n// date and time(&quot;2020-07-31T14:27:30@Europe/Berlin&quot;)\n</code></pre>\n'},{name:"today()",description:'<p>Returns the current date.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">today(): date\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">today()\n// date(&quot;2020-07-31&quot;)\n</code></pre>\n'},{name:"day of week(date)",description:'<p>Returns the day of the week according to the Gregorian calendar. Note that it always returns the English name of the day.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">day of week(date: date): string\n</code></pre>\n<pre><code class="language-feel">day of week(date: date and time): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">day of week(date(&quot;2019-09-17&quot;))\n// &quot;Tuesday&quot;\n\nday of week(date and time(&quot;2019-09-17T12:00:00&quot;))\n// &quot;Tuesday&quot;\n</code></pre>\n'},{name:"day of year(date)",description:'<p>Returns the Gregorian number of the day within the year.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">day of year(date: date): number\n</code></pre>\n<pre><code class="language-feel">day of year(date: date and time): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">day of year(date(&quot;2019-09-17&quot;))\n// 260\n\nday of year(date and time(&quot;2019-09-17T12:00:00&quot;))\n// 260\n</code></pre>\n'},{name:"week of year(date)",description:'<p>Returns the Gregorian number of the week within the year, according to ISO 8601.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">week of year(date: date): number\n</code></pre>\n<pre><code class="language-feel">week of year(date: date and time): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">week of year(date(&quot;2019-09-17&quot;))\n// 38\n\nweek of year(date and time(&quot;2019-09-17T12:00:00&quot;))\n// 38\n</code></pre>\n'},{name:"month of year(date)",description:'<p>Returns the month of the year according to the Gregorian calendar. Note that it always returns the English name of the month.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">month of year(date: date): string\n</code></pre>\n<pre><code class="language-feel">month of year(date: date and time): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">month of year(date(&quot;2019-09-17&quot;))\n// &quot;September&quot;\n\nmonth of year(date and time(&quot;2019-09-17T12:00:00&quot;))\n// &quot;September&quot;\n</code></pre>\n'},{name:"abs(n)",description:'<p>Returns the absolute value of a given duration.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">abs(n: days and time duration): days and time duration\n</code></pre>\n<pre><code class="language-feel">abs(n: years and months duration): years and months duration\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">abs(duration(&quot;-PT5H&quot;))\n// &quot;duration(&quot;PT5H&quot;)&quot;\n\nabs(duration(&quot;PT5H&quot;))\n// &quot;duration(&quot;PT5H&quot;)&quot;\n\nabs(duration(&quot;-P2M&quot;))\n// duration(&quot;P2M&quot;)\n</code></pre>\n'},{name:"last day of month(date)",description:'<p><em>Camunda Extension</em></p>\n<p>Takes the month of the given date or date-time value and returns the last day of this month.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">last day of month(date: date): date\n</code></pre>\n<pre><code class="language-feel">last day of month(date: date and time): date\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">last day of month(date(&quot;2022-10-01&quot;))\n// date(&quot;2022-10-31&quot;))\n\nlast day of month(date and time(&quot;2022-10-16T12:00:00&quot;))\n// date(&quot;2022-10-31&quot;))\n</code></pre>\n'},{name:"is empty(list)",description:'<p><em>Camunda Extension</em></p>\n<p>Returns true if the given list is empty. Otherwise, returns false.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">is empty(list: list): boolean</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">is empty([])\n// true\n\nis empty([1,2,3])\n// false\n</code></pre>'},{name:"trim(string)",description:'<p><em>Camunda Extension</em></p>\n<p>Returns the given string without leading and trailing spaces.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">trim(string: string): string</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">trim(" hello world ")\n// "hello world"\n\ntrim("hello world ")\n// "hello world"\n</code></pre>'},{name:"uuid()",description:'<p><em>Camunda Extension</em></p>\n<p>Returns a UUID (Universally Unique Identifier) with 36 characters.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">uuid(): string</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">uuid()\n// "7793aab1-d761-4d38-916b-b7270e309894"\n</code></pre>'},{name:"to base64(string)",description:'<p><em>Camunda Extension</em></p>\n<p>Returns the given string encoded in Base64 format.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">to base64(value: string): string</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">to base64("FEEL")\n// "RkVFTA=="\n</code></pre>'}].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;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!r||r===e}(e)},tq=function(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height;return 0===n&&0===i},nq=function(e,t){var n=t.displayCheck,i=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var r=UB.call(e,"details>summary: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<t.children.length;n++){var i=t.children.item(n);if("LEGEND"===i.tagName)return!!UB.call(t,"fieldset[disabled] *")||!i.contains(e)}return!0}t=t.parentElement}return!1}(t))},rq=function(e,t){return!(eq(t)||YB(t)<0||!iq(e,t))},oq=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=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);n<t;n++)i[n]=e[n];return i}function uq(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function hq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dq(Object(n),!0).forEach((function(t){uq(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dq(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fq(e){return function(e){if(Array.isArray(e))return pq(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return pq(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pq(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var mq=function(e,t){if(e.length>0){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;i<t;i++)n[i-1]=arguments[i];return"function"==typeof e?e.apply(void 0,n):e},_q=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},Eq=[],Oq=function(e,t){var n,i=(null==t?void 0:t.document)||document,r=(null==t?void 0:t.trapStack)||Eq,o=hq({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:vq,isKeyBackward:bq},t),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},l=function(e,t){var n="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return s.containerGroups.findIndex((function(t){var i=t.container,r=t.tabbableNodes;return i.contains(e)||(null==n?void 0:n.includes(i))||r.find((function(t){return t===e}))}))},c=function(e){var t=arguments.length>1&&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<c.length&&(i=c[u+1],r=!1):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('<canvas width="0" height="0" />'),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("<empty>");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="<empty>",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||"<empty>",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<n)&&a&&BF(r,a,t))return a})),i}function zF(e,t){return qF(e,!t,-1)}function FF(e,t){var n=x(e,(function(e){return e.name===t.name&&e.scope===t.scope}));n>=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<e.length){const i=n<0?e.length+n:n,[r]=e.splice(t,1);e.splice(i,0,r)}}function YF(e){var t=function(e){return ZF(e,"camunda:FormData")[0]}(e);return t&&t.get("fields")||[]}function ZF(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 JF(e,t){var n=function(e){return(ZF(e,"camunda:InputOutput")||[])[0]}(e);return n&&n.get(t)||[]}function eV(e){for(var t=[],n=e;n.$parent;)t.push(n.$parent),n=n.$parent;return t}function tV(e,t,n){n=n||0,h(e)||(e=[e]),_(e,(function(e,i){var r=t(e,i,n);h(r)&&r.length&&tV(r,t,n+1)}))}function nV(e,t,n){var i=!n||-1===e.indexOf(t);return i&&e.push(t),i}function iV(e,t,n){var i=[],r=[];return tV(e,(function(e,o,s){nV(i,e,t);var a=e.flowElements;if((-1===n||s<n)&&a&&nV(r,a,t))return a})),i}function rV(e,t){return iV(e,!t,-1)}function oV(e,t){var n=x(e,(function(e){return e.name===t.name&&e.scope===t.scope}));n>=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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},hV.apply(null,arguments)}function fV(){return fV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},fV.apply(null,arguments)}function mV(){return mV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},mV.apply(null,arguments)}function gV(){return gV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},gV.apply(null,arguments)}function yV(){return yV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},yV.apply(null,arguments)}function vV(){return vV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},vV.apply(null,arguments)}function bV(){return bV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},bV.apply(null,arguments)}var xV=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},wV.apply(null,arguments)}function _V(){return _V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_V.apply(null,arguments)}function EV(){return EV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},EV.apply(null,arguments)}function OV(){return OV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},OV.apply(null,arguments)}function PV(){return PV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},PV.apply(null,arguments)}function kV(){return kV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},kV.apply(null,arguments)}function SV(){return SV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},SV.apply(null,arguments)}function CV(){return CV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},CV.apply(null,arguments)}function TV(){return TV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},TV.apply(null,arguments)}function AV(){return AV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},AV.apply(null,arguments)}function MV(){return MV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},MV.apply(null,arguments)}function DV(){return DV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},DV.apply(null,arguments)}function RV(){return RV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},RV.apply(null,arguments)}function NV(){return NV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},NV.apply(null,arguments)}function $V(){return $V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},$V.apply(null,arguments)}function jV(){return jV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},jV.apply(null,arguments)}function IV(){return IV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},IV.apply(null,arguments)}function LV(){return LV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},LV.apply(null,arguments)}function BV(){return BV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},BV.apply(null,arguments)}function qV(){return qV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},qV.apply(null,arguments)}function zV(){return zV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},zV.apply(null,arguments)}function FV(){return FV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},FV.apply(null,arguments)}function VV(){return VV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},VV.apply(null,arguments)}function HV(){return HV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},HV.apply(null,arguments)}var UV=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},WV.apply(null,arguments)}var GV=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},QV.apply(null,arguments)}var XV=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},KV.apply(null,arguments)}var YV=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ZV.apply(null,arguments)}var JV=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},eH.apply(null,arguments)}var tH=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},nH.apply(null,arguments)}var iH=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},rH.apply(null,arguments)}var oH=({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.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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},sH.apply(null,arguments)}var aH=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},lH.apply(null,arguments)}var cH=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},pH.apply(null,arguments)}var uH=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},dH.apply(null,arguments)}var hH=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},fH.apply(null,arguments)}var mH=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},gH.apply(null,arguments)}var yH=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},vH.apply(null,arguments)}var bH=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},xH.apply(null,arguments)}var wH=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_H.apply(null,arguments)}var EH=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},OH.apply(null,arguments)}var PH=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},kH.apply(null,arguments)}var SH=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},CH.apply(null,arguments)}function TH(){return TH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},TH.apply(null,arguments)}function AH(){return AH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},AH.apply(null,arguments)}function MH(){return MH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},MH.apply(null,arguments)}function DH(){return DH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},DH.apply(null,arguments)}function RH(){return RH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},RH.apply(null,arguments)}function NH(){return NH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},NH.apply(null,arguments)}function $H(){return $H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},$H.apply(null,arguments)}function jH(){return jH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},jH.apply(null,arguments)}function IH(){return IH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},IH.apply(null,arguments)}function LH(){return LH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},LH.apply(null,arguments)}function BH(){return BH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},BH.apply(null,arguments)}function qH(){return qH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},qH.apply(null,arguments)}function zH(){return zH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},zH.apply(null,arguments)}function FH(){return FH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},FH.apply(null,arguments)}function VH(){return VH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},VH.apply(null,arguments)}function HH(){return HH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},HH.apply(null,arguments)}function UH(){return UH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},UH.apply(null,arguments)}function WH(){return WH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},WH.apply(null,arguments)}function GH(){return GH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},GH.apply(null,arguments)}function QH(){return QH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},QH.apply(null,arguments)}function XH(){return XH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},XH.apply(null,arguments)}function KH(){return KH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},KH.apply(null,arguments)}function YH(){return YH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},YH.apply(null,arguments)}function ZH(){return ZH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ZH.apply(null,arguments)}function JH(){return JH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},JH.apply(null,arguments)}function eU(){return eU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},eU.apply(null,arguments)}function tU(){return tU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},tU.apply(null,arguments)}function nU(){return nU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},nU.apply(null,arguments)}function iU(){return iU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},iU.apply(null,arguments)}function rU(){return rU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},rU.apply(null,arguments)}function oU(){return oU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},oU.apply(null,arguments)}function sU(){return sU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},sU.apply(null,arguments)}var aU=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},lU.apply(null,arguments)}var cU=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},pU.apply(null,arguments)}function uU(){return uU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},uU.apply(null,arguments)}function dU(){return dU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},dU.apply(null,arguments)}function hU(){return hU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},hU.apply(null,arguments)}var fU={Association:({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},xU.apply(null,arguments)}var wU=({styles:e={},...t})=>L_("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;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_U.apply(null,arguments)}var EU=({styles:e={},...t})=>L_("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('<div style="height: 100%" tabindex="-1" class="bio-properties-panel-container"></div>');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("<none>")}];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("<none>")},{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("<none>")},{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("<none>")},{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("<none>")},{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("<none>")},{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("<none>")},{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")||"<no 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("<none>")},{value:uQ,label:e("Camunda Form")},{value:hQ,label:e("External form reference")}];return[{value:_Q,label:e("<none>")},{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("<none>")},{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")||"<no 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("<none>")},...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("<none>")}];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("<none>")},{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("<none>")},{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("<none>")},{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("<none>")},{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("<empty>"),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("<none>")},{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"<no reference>";const n=t.get("errorCode"),i=t.get("name")||"<unnamed>";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||"<empty>"}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("<custom type>"),value:""}];return void 0===i.get("type")&&e.unshift({label:o("<none>"),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("<empty>"),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("<empty>"),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("<empty>"),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("<none>")},{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<Object>)")},{value:"resultList",label:i("resultList (List<Map<String, Object>>)")},{value:"singleEntry",label:i("singleEntry (TypedValue)")},{value:"singleResult",label:i("singleResult (Map<String, Object>)")}]})}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="<none>",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("<none>")},{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")||"<empty>",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;i<e;i++){let e=n[i];if("string"!=typeof e&&"number"!=typeof e){const e={instancePath:t+"/oneOf/"+i,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/items/type",keyword:"type",params:{type:Z2.oneOf[1].properties.oneOf.items.type},message:"must be string,number"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t+"/oneOf",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}if((g=m===s)&&d)d=!1,h=[h,1];else{g&&(d=!0,h=1);const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.isActive){const e={instancePath:t,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/required",keyword:"required",params:{missingProperty:"isActive"},message:"must have required property 'isActive'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.isActive&&"boolean"!=typeof e.isActive){const e={instancePath:t+"/isActive",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/properties/isActive/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}}var g;(g=n===s)&&d?(d=!1,h=[h,2]):g&&(d=!0,h=2)}if(d)s=u,null!==o&&(u?o.length=u:o=null);else{const e={instancePath:t,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf",keyword:"oneOf",params:{passingSchemas:h},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.property){const e={instancePath:t,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/required",keyword:"required",params:{missingProperty:"property"},message:"must have required property 'property'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.type&&"simple"!==e.type){const e={instancePath:t+"/type",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/properties/type/const",keyword:"const",params:{allowedValue:"simple"},message:"must be equal to constant"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.property&&"string"!=typeof e.property){const e={instancePath:t+"/property",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/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,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){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;i<e;i++){let e=n[i];const r=s;let a=!1,l=null;const c=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.equals){const e={instancePath:t+"/allMatch/"+i,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+"/allMatch/"+i+"/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++}}}(v=c===s)&&(a=!0,l=0);const p=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.oneOf){const e={instancePath:t+"/allMatch/"+i,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;r<e;r++){let e=n[r];if("string"!=typeof e&&"number"!=typeof e){const e={instancePath:t+"/allMatch/"+i+"/oneOf/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/items/type",keyword:"type",params:{type:Z2.oneOf[1].properties.oneOf.items.type},message:"must be string,number"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t+"/allMatch/"+i+"/oneOf",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}if((v=p===s)&&a)a=!1,l=[l,1];else{v&&(a=!0,l=1);const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.isActive){const e={instancePath:t+"/allMatch/"+i,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/required",keyword:"required",params:{missingProperty:"isActive"},message:"must have required property 'isActive'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.isActive&&"boolean"!=typeof e.isActive){const e={instancePath:t+"/allMatch/"+i+"/isActive",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/properties/isActive/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}}var v;(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+"/allMatch/"+i,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/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)){if(void 0===e.property){const e={instancePath:t+"/allMatch/"+i,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/required",keyword:"required",params:{missingProperty:"property"},message:"must have required property 'property'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.type&&"simple"!==e.type){const e={instancePath:t+"/allMatch/"+i+"/type",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/properties/type/const",keyword:"const",params:{allowedValue:"simple"},message:"must be equal to constant"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.property&&"string"!=typeof e.property){const e={instancePath:t+"/allMatch/"+i+"/property",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/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+"/allMatch/"+i,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){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;i<n;i++){let n=e[i];const g=s;let y=!0;const v=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&&"Dropdown"!==n.type){const e={};null===o?o=[e]:o.push(e),s++}var a=v===s;if(s=g,null!==o&&(g?o.length=g:o=null),a){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.choices){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/0/then/required",keyword:"required",params:{missingProperty:"choices"},message:"must have required property 'choices'"};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&&(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;r<e;r++){let e=n[r];if("string"!=typeof e&&"number"!=typeof e){const e={instancePath:t+"/"+i+"/condition/oneOf/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/items/type",keyword:"type",params:{type:Z2.oneOf[1].properties.oneOf.items.type},message:"must be string,number"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t+"/"+i+"/condition/oneOf",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}if((c=y===s)&&f)f=!1,m=[m,1];else{c&&(f=!0,m=1);const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.isActive){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/required",keyword:"required",params:{missingProperty:"isActive"},message:"must have required property 'isActive'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.isActive&&"boolean"!=typeof e.isActive){const e={instancePath:t+"/"+i+"/condition/isActive",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/properties/isActive/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}}var c;(c=n===s)&&f?(f=!1,m=[m,2]):c&&(f=!0,m=2)}if(f)s=h,null!==o&&(h?o.length=h:o=null);else{const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.property){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/required",keyword:"required",params:{missingProperty:"property"},message:"must have required property 'property'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.type&&"simple"!==e.type){const e={instancePath:t+"/"+i+"/condition/type",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/properties/type/const",keyword:"const",params:{allowedValue:"simple"},message:"must be equal to constant"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.property&&"string"!=typeof e.property){const e={instancePath:t+"/"+i+"/condition/property",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/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+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){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;r<e;r++){let e=n[r];const a=s;let l=!1,c=null;const u=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.equals){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r,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/allMatch/"+r+"/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++}}}(p=u===s)&&(l=!0,c=0);const d=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.oneOf){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r,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 a=0;a<e;a++){let e=n[a];if("string"!=typeof e&&"number"!=typeof e){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r+"/oneOf/"+a,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/items/type",keyword:"type",params:{type:Z2.oneOf[1].properties.oneOf.items.type},message:"must be string,number"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t+"/"+i+"/condition/allMatch/"+r+"/oneOf",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}if((p=d===s)&&l)l=!1,c=[c,1];else{p&&(l=!0,c=1);const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.isActive){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/required",keyword:"required",params:{missingProperty:"isActive"},message:"must have required property 'isActive'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.isActive&&"boolean"!=typeof e.isActive){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r+"/isActive",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/properties/isActive/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}}var p;(p=n===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+"/"+i+"/condition/allMatch/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf",keyword:"oneOf",params:{passingSchemas:c},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.property){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/required",keyword:"required",params:{missingProperty:"property"},message:"must have required property 'property'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.type&&"simple"!==e.type){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r+"/type",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/properties/type/const",keyword:"const",params:{allowedValue:"simple"},message:"must be equal to constant"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.property&&"string"!=typeof e.property){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r+"/property",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/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+"/condition/allMatch/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){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;a<n;a++){let n=e[a];if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.value){const e={instancePath:t+"/"+i+"/choices/"+a,schemaPath:"#/allOf/0/items/properties/choices/items/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===o?o=[e]:o.push(e),s++}if(void 0===n.name){const e={instancePath:t+"/"+i+"/choices/"+a,schemaPath:"#/allOf/0/items/properties/choices/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.name&&"string"!=typeof n.name){const e={instancePath:t+"/"+i+"/choices/"+a+"/name",schemaPath:"#/allOf/0/items/properties/choices/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.value&&"string"!=typeof n.value){const e={instancePath:t+"/"+i+"/choices/"+a+"/value",schemaPath:"#/allOf/0/items/properties/choices/items/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}void 0!==n.condition&&(e3(n.condition,{instancePath:t+"/"+i+"/choices/"+a+"/condition",parentData:n,parentDataProperty:"condition",rootData:r})||(o=null===o?e3.errors:o.concat(e3.errors),s=o.length))}else{const e={instancePath:t+"/"+i+"/choices/"+a,schemaPath:"#/allOf/0/items/properties/choices/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={};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;i<n;i++){let n=e[i];const r=s;let a=!0;const l=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&&"property"!==e.type){const e={};null===o?o=[e]:o.push(e),s++}}var g=l===s;if(s=r,null!==o&&(r?o.length=r:o=null),g){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){const e={instancePath:t+"/"+i+"/type",schemaPath:"#/allOf/1/items/allOf/0/then/properties/type/enum",keyword:"enum",params:{allowedValues:K2.allOf[1].items.allOf[0].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+"/"+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;i<n;i++){let n=e[i];const g=s;let y=!0;const v=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&&"Dropdown"!==n.type){const e={};null===o?o=[e]:o.push(e),s++}var a=v===s;if(s=g,null!==o&&(g?o.length=g:o=null),a){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.choices){const e={instancePath:t+"/"+i,schemaPath:"#/items/allOf/0/then/required",keyword:"required",params:{missingProperty:"choices"},message:"must have required property 'choices'"};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&&(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;r<e;r++){let e=n[r];if("string"!=typeof e&&"number"!=typeof e){const e={instancePath:t+"/"+i+"/condition/oneOf/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/items/type",keyword:"type",params:{type:Z2.oneOf[1].properties.oneOf.items.type},message:"must be string,number"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t+"/"+i+"/condition/oneOf",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}if((c=y===s)&&f)f=!1,m=[m,1];else{c&&(f=!0,m=1);const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.isActive){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/required",keyword:"required",params:{missingProperty:"isActive"},message:"must have required property 'isActive'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.isActive&&"boolean"!=typeof e.isActive){const e={instancePath:t+"/"+i+"/condition/isActive",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/properties/isActive/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}}var c;(c=n===s)&&f?(f=!1,m=[m,2]):c&&(f=!0,m=2)}if(f)s=h,null!==o&&(h?o.length=h:o=null);else{const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.property){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/required",keyword:"required",params:{missingProperty:"property"},message:"must have required property 'property'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.type&&"simple"!==e.type){const e={instancePath:t+"/"+i+"/condition/type",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/properties/type/const",keyword:"const",params:{allowedValue:"simple"},message:"must be equal to constant"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.property&&"string"!=typeof e.property){const e={instancePath:t+"/"+i+"/condition/property",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/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+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){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;r<e;r++){let e=n[r];const a=s;let l=!1,c=null;const u=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.equals){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r,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/allMatch/"+r+"/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++}}}(p=u===s)&&(l=!0,c=0);const d=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.oneOf){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r,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 a=0;a<e;a++){let e=n[a];if("string"!=typeof e&&"number"!=typeof e){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r+"/oneOf/"+a,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/items/type",keyword:"type",params:{type:Z2.oneOf[1].properties.oneOf.items.type},message:"must be string,number"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t+"/"+i+"/condition/allMatch/"+r+"/oneOf",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}if((p=d===s)&&l)l=!1,c=[c,1];else{p&&(l=!0,c=1);const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.isActive){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/required",keyword:"required",params:{missingProperty:"isActive"},message:"must have required property 'isActive'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.isActive&&"boolean"!=typeof e.isActive){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r+"/isActive",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/properties/isActive/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}}var p;(p=n===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+"/"+i+"/condition/allMatch/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf",keyword:"oneOf",params:{passingSchemas:c},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.property){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/required",keyword:"required",params:{missingProperty:"property"},message:"must have required property 'property'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.type&&"simple"!==e.type){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r+"/type",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/properties/type/const",keyword:"const",params:{allowedValue:"simple"},message:"must be equal to constant"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.property&&"string"!=typeof e.property){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r+"/property",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/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+"/condition/allMatch/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){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;a<n;a++){let n=e[a];if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.value){const e={instancePath:t+"/"+i+"/choices/"+a,schemaPath:"#/items/properties/choices/items/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===o?o=[e]:o.push(e),s++}if(void 0===n.name){const e={instancePath:t+"/"+i+"/choices/"+a,schemaPath:"#/items/properties/choices/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.name&&"string"!=typeof n.name){const e={instancePath:t+"/"+i+"/choices/"+a+"/name",schemaPath:"#/items/properties/choices/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.value&&"string"!=typeof n.value){const e={instancePath:t+"/"+i+"/choices/"+a+"/value",schemaPath:"#/items/properties/choices/items/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}void 0!==n.condition&&(e3(n.condition,{instancePath:t+"/"+i+"/choices/"+a+"/condition",parentData:n,parentDataProperty:"condition",rootData:r})||(o=null===o?e3.errors:o.concat(e3.errors),s=o.length))}else{const e={instancePath:t+"/"+i+"/choices/"+a,schemaPath:"#/items/properties/choices/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={};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;i<e;i++){let e=n[i];if("string"==typeof e){if(!Q2.test(e)){const e={instancePath:t+"/appliesTo/"+i,schemaPath:"#/allOf/0/properties/appliesTo/items/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+"/appliesTo/"+i,schemaPath:"#/allOf/0/properties/appliesTo/items/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+"/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;i<e;i++){let e=n[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t+"/groups/"+i,schemaPath:"#/allOf/0/properties/groups/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===o?o=[e]:o.push(e),s++}if(void 0===e.label){const e={instancePath:t+"/groups/"+i,schemaPath:"#/allOf/0/properties/groups/items/required",keyword:"required",params:{missingProperty:"label"},message:"must have required property 'label'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.id&&"string"!=typeof e.id){const e={instancePath:t+"/groups/"+i+"/id",schemaPath:"#/allOf/0/properties/groups/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.label&&"string"!=typeof e.label){const e={instancePath:t+"/groups/"+i+"/label",schemaPath:"#/allOf/0/properties/groups/items/properties/label/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/groups/"+i,schemaPath:"#/allOf/0/properties/groups/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:{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;i<e;i++){let e=n[i];const E=s;let O=!0;const P=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&&"bpmn:Error"!==e.type){const e={};null===o?o=[e]:o.push(e),s++}var a=P===s;if(s=E,null!==o&&(E?o.length=E:o=null),a){const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.id){const e={instancePath:t+"/scopes/"+i,schemaPath:"#/properties/scopes/items/allOf/0/then/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};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&&(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;r<e;r++){let e=n[r];const a=s;let E=!0;const O=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&&"property"!==t.type){const e={};null===o?o=[e]:o.push(e),s++}}var l=O===s;if(s=a,null!==o&&(a?o.length=a:o=null),l){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&&"Boolean"!==n){const e={instancePath:t+"/scopes/"+i+"/properties/"+r+"/type",schemaPath:"#/definitions/properties/allOf/1/items/allOf/0/then/properties/type/enum",keyword:"enum",params:{allowedValues:W2.items.allOf[0].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+"/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<n;i++)r3(e[i],{instancePath:t+"/"+i,parentData:e,parentDataProperty:i,rootData:r})||(o=null===o?r3.errors:o.concat(r3.errors),s=o.length)}else{const e={instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}var d;if((d=u===s)&&l?(l=!1,c=[c,1]):d&&(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 o3.errors=o,0===s}var s3=z2(F2.exports),a3={},l3={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",'"':'"',"/":"/","\\":"\\"},c3="a".charCodeAt();a3.parse=function(e,t,n){var i={},r=0,o=0,s=0,a=n&&n.bigint&&"undefined"!=typeof BigInt;return{data:l("",!0),pointers:i};function l(t,n){var i;c(),g(t,"value");var r=d();switch(r){case"t":u("rue"),i=!0;break;case"f":u("alse"),i=!1;break;case"n":u("ull"),i=null;break;case'"':i=p();break;case"[":i=function(e){c();var t=[],n=0;if("]"==d())return t;h();for(;;){var i=e+"/"+n;t.push(l(i)),c();var r=d();if("]"==r)break;","!=r&&x(),c(),n++}return t}(t);break;case"{":i=function(e){c();var t={};if("}"==d())return t;h();for(;;){var n=v();'"'!=d()&&x();var i=p(),r=e+"/"+w3(i);y(r,"key",n),g(r,"keyEnd"),c(),":"!=d()&&x(),c(),t[i]=l(r),c();var o=d();if("}"==o)break;","!=o&&x(),c()}return t}(t);break;default:h(),"-0123456789".indexOf(r)>=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<Number.MIN_SAFE_INTEGER)?BigInt(t):i}():b()}return g(t,"valueEnd"),c(),n&&s<e.length&&b(),i}function c(){e:for(;s<e.length;){switch(e[s]){case" ":o++;break;case"\t":o+=4;break;case"\r":o=0;break;case"\n":o=0,r++;break;default:break e}s++}}function p(){for(var e,t="";'"'!=(e=d());)"\\"==e?(e=d())in l3?t+=l3[e]:"u"==e?t+=f():x():t+=e;return t}function u(e){for(var t=0;t<e.length;t++)d()!==e[t]&&x()}function d(){w();var t=e[s];return s++,o++,t}function h(){s--,o--}function f(){for(var e=4,t=0;e--;){t<<=4;var n=d().toLowerCase();n>="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<s.length;l++){switch(s[l]){case" ":r++;break;case"\t":r+=4;break;case"\r":r=0;break;case"\n":r=0,o++;break;default:throw new Error("whitespace characters not allowed in JSON")}i++}break;default:s=void 0}var c="",p={},u=0,d=0,h=0,f=n&&n.es6&&"function"==typeof Map;return function e(t,n,i){switch(y(i,"value"),typeof t){case"number":case"bigint":case"boolean":m(""+t);break;case"string":m(v3(t));break;case"object":null===t?m("null"):"function"==typeof t.toJSON?m(v3(t.toJSON())):Array.isArray(t)?r():f?t.constructor.BYTES_PER_ELEMENT?r():t instanceof Map?a():t instanceof Set?a(!0):o():o()}function r(){if(t.length){m("[");for(var r=n+1,o=0;o<t.length;o++){o&&m(","),g(r);var s=u3(t[o])?t[o]:null;e(s,r,i+"/"+o)}g(n),m("]")}else m("[]")}function o(){var r=Object.keys(t);if(r.length){m("{");for(var o=n+1,a=0;a<r.length;a++){var l=r[a],c=t[l];if(u3(c)){a&&m(",");var p=i+"/"+w3(l);g(o),y(p,"key"),m(v3(l)),y(p,"keyEnd"),m(":"),s&&m(" "),e(c,o,p)}}g(n),m("}")}else m("{}")}function a(r){if(t.size){m("{");for(var o=n+1,a=!0,l=t.entries(),c=l.next();!c.done;){var p=c.value,u=p[0],d=!!r||p[1];if(u3(d)){a||m(","),a=!1;var h=i+"/"+w3(u);g(o),y(h,"key"),m(v3(u)),y(h,"keyEnd"),m(":"),s&&m(" "),e(d,o,h)}c=l.next()}g(n),m("}")}else m("{}")}y(i,"valueEnd")}(e,0,""),{json:c,pointers:p}}function m(e){d+=e.length,h+=e.length,c+=e}function g(e){if(s){for(c+="\n"+v(e,s),u++,d=0;e--;)o?(u+=o,d=r):d+=r,h+=i;h+=1}}function y(e,t){p[e]=p[e]||{},p[e][t]={line:u,column:d,pos:h}}function v(e,t){return Array(e+1).join(t)}};var p3=["number","bigint","boolean","string","object"];function u3(e){return p3.indexOf(typeof e)>=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;i<e;i++){let e=n[i];if("string"!=typeof e&&"number"!=typeof e){const e={instancePath:t+"/oneOf/"+i,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/items/type",keyword:"type",params:{type:N3.oneOf[1].properties.oneOf.items.type},message:"must be string,number"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t+"/oneOf",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}if((g=m===s)&&d)d=!1,h=[h,1];else{g&&(d=!0,h=1);const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.isActive){const e={instancePath:t,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/required",keyword:"required",params:{missingProperty:"isActive"},message:"must have required property 'isActive'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.isActive&&"boolean"!=typeof e.isActive){const e={instancePath:t+"/isActive",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/properties/isActive/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}}var g;(g=n===s)&&d?(d=!1,h=[h,2]):g&&(d=!0,h=2)}if(d)s=u,null!==o&&(u?o.length=u:o=null);else{const e={instancePath:t,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf",keyword:"oneOf",params:{passingSchemas:h},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.property){const e={instancePath:t,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/required",keyword:"required",params:{missingProperty:"property"},message:"must have required property 'property'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.type&&"simple"!==e.type){const e={instancePath:t+"/type",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/properties/type/const",keyword:"const",params:{allowedValue:"simple"},message:"must be equal to constant"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.property&&"string"!=typeof e.property){const e={instancePath:t+"/property",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/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,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){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;i<e;i++){let e=n[i];const r=s;let a=!1,l=null;const c=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.equals){const e={instancePath:t+"/allMatch/"+i,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+"/allMatch/"+i+"/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++}}}(v=c===s)&&(a=!0,l=0);const p=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.oneOf){const e={instancePath:t+"/allMatch/"+i,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;r<e;r++){let e=n[r];if("string"!=typeof e&&"number"!=typeof e){const e={instancePath:t+"/allMatch/"+i+"/oneOf/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/items/type",keyword:"type",params:{type:N3.oneOf[1].properties.oneOf.items.type},message:"must be string,number"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t+"/allMatch/"+i+"/oneOf",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}if((v=p===s)&&a)a=!1,l=[l,1];else{v&&(a=!0,l=1);const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.isActive){const e={instancePath:t+"/allMatch/"+i,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/required",keyword:"required",params:{missingProperty:"isActive"},message:"must have required property 'isActive'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.isActive&&"boolean"!=typeof e.isActive){const e={instancePath:t+"/allMatch/"+i+"/isActive",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/properties/isActive/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}}var v;(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+"/allMatch/"+i,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/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)){if(void 0===e.property){const e={instancePath:t+"/allMatch/"+i,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/required",keyword:"required",params:{missingProperty:"property"},message:"must have required property 'property'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.type&&"simple"!==e.type){const e={instancePath:t+"/allMatch/"+i+"/type",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/properties/type/const",keyword:"const",params:{allowedValue:"simple"},message:"must be equal to constant"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.property&&"string"!=typeof e.property){const e={instancePath:t+"/allMatch/"+i+"/property",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/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+"/allMatch/"+i,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){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;i<n;i++){let n=e[i];const g=s;let y=!0;const v=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&&"Dropdown"!==n.type){const e={};null===o?o=[e]:o.push(e),s++}var a=v===s;if(s=g,null!==o&&(g?o.length=g:o=null),a){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.choices){const e={instancePath:t+"/"+i,schemaPath:"#/allOf/0/items/allOf/0/then/required",keyword:"required",params:{missingProperty:"choices"},message:"must have required property 'choices'"};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&&(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;r<e;r++){let e=n[r];if("string"!=typeof e&&"number"!=typeof e){const e={instancePath:t+"/"+i+"/condition/oneOf/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/items/type",keyword:"type",params:{type:N3.oneOf[1].properties.oneOf.items.type},message:"must be string,number"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t+"/"+i+"/condition/oneOf",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}if((c=y===s)&&f)f=!1,m=[m,1];else{c&&(f=!0,m=1);const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.isActive){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/required",keyword:"required",params:{missingProperty:"isActive"},message:"must have required property 'isActive'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.isActive&&"boolean"!=typeof e.isActive){const e={instancePath:t+"/"+i+"/condition/isActive",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/properties/isActive/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}}var c;(c=n===s)&&f?(f=!1,m=[m,2]):c&&(f=!0,m=2)}if(f)s=h,null!==o&&(h?o.length=h:o=null);else{const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.property){const e={instancePath:t+"/"+i+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/required",keyword:"required",params:{missingProperty:"property"},message:"must have required property 'property'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.type&&"simple"!==e.type){const e={instancePath:t+"/"+i+"/condition/type",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/properties/type/const",keyword:"const",params:{allowedValue:"simple"},message:"must be equal to constant"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.property&&"string"!=typeof e.property){const e={instancePath:t+"/"+i+"/condition/property",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/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+"/condition",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){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;r<e;r++){let e=n[r];const a=s;let l=!1,c=null;const u=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.equals){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r,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/allMatch/"+r+"/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++}}}(p=u===s)&&(l=!0,c=0);const d=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.oneOf){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r,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 a=0;a<e;a++){let e=n[a];if("string"!=typeof e&&"number"!=typeof e){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r+"/oneOf/"+a,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/items/type",keyword:"type",params:{type:N3.oneOf[1].properties.oneOf.items.type},message:"must be string,number"};null===o?o=[e]:o.push(e),s++}}}else{const e={instancePath:t+"/"+i+"/condition/allMatch/"+r+"/oneOf",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/1/properties/oneOf/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}}}if((p=d===s)&&l)l=!1,c=[c,1];else{p&&(l=!0,c=1);const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.isActive){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/required",keyword:"required",params:{missingProperty:"isActive"},message:"must have required property 'isActive'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.isActive&&"boolean"!=typeof e.isActive){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r+"/isActive",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf/2/properties/isActive/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),s++}}var p;(p=n===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+"/"+i+"/condition/allMatch/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/oneOf",keyword:"oneOf",params:{passingSchemas:c},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),s++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.property){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/required",keyword:"required",params:{missingProperty:"property"},message:"must have required property 'property'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.type&&"simple"!==e.type){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r+"/type",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/properties/type/const",keyword:"const",params:{allowedValue:"simple"},message:"must be equal to constant"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.property&&"string"!=typeof e.property){const e={instancePath:t+"/"+i+"/condition/allMatch/"+r+"/property",schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/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+"/condition/allMatch/"+r,schemaPath:"#/definitions/properties/allOf/0/items/allOf/1/definitions/condition/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),s++}if(s>0){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;a<n;a++){let n=e[a];if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.value){const e={instancePath:t+"/"+i+"/choices/"+a,schemaPath:"#/allOf/0/items/properties/choices/items/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===o?o=[e]:o.push(e),s++}if(void 0===n.name){const e={instancePath:t+"/"+i+"/choices/"+a,schemaPath:"#/allOf/0/items/properties/choices/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.name&&"string"!=typeof n.name){const e={instancePath:t+"/"+i+"/choices/"+a+"/name",schemaPath:"#/allOf/0/items/properties/choices/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.value&&"string"!=typeof n.value){const e={instancePath:t+"/"+i+"/choices/"+a+"/value",schemaPath:"#/allOf/0/items/properties/choices/items/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}void 0!==n.condition&&($3(n.condition,{instancePath:t+"/"+i+"/choices/"+a+"/condition",parentData:n,parentDataProperty:"condition",rootData:r})||(o=null===o?$3.errors:o.concat($3.errors),s=o.length))}else{const e={instancePath:t+"/"+i+"/choices/"+a,schemaPath:"#/allOf/0/items/properties/choices/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={};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;i<n;i++){let n=e[i];const r=s;let a=!0;const l=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&&"property"!==e.type){const e={};null===o?o=[e]:o.push(e),s++}}var g=l===s;if(s=r,null!==o&&(r?o.length=r:o=null),g){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/0/then/properties/type/enum",keyword:"enum",params:{allowedValues:D3.allOf[1].items.allOf[0].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+"/"+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;i<e;i++){let e=n[i];if("string"==typeof e){if(!C3.test(e)){const e={instancePath:t+"/appliesTo/"+i,schemaPath:"#/allOf/0/properties/appliesTo/items/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+"/appliesTo/"+i,schemaPath:"#/allOf/0/properties/appliesTo/items/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+"/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;i<e;i++){let e=n[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t+"/groups/"+i,schemaPath:"#/allOf/0/properties/groups/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===o?o=[e]:o.push(e),s++}if(void 0===e.label){const e={instancePath:t+"/groups/"+i,schemaPath:"#/allOf/0/properties/groups/items/required",keyword:"required",params:{missingProperty:"label"},message:"must have required property 'label'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.id&&"string"!=typeof e.id){const e={instancePath:t+"/groups/"+i+"/id",schemaPath:"#/allOf/0/properties/groups/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.label&&"string"!=typeof e.label){const e={instancePath:t+"/groups/"+i+"/label",schemaPath:"#/allOf/0/properties/groups/items/properties/label/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/groups/"+i,schemaPath:"#/allOf/0/properties/groups/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:{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;e<n;e++){let n=t[e];const i=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&&"bpmn:Message#property"!==e.type){const e={};null===o?o=[e]:o.push(e),s++}}var p=i===s;if(p)break}if(p)s=e,null!==o&&(e?o.length=e:o=null);else{const e={};null===o?o=[e]:o.push(e),s++}}}var u=c===s;if(s=a,null!==o&&(a?o.length=a:o=null),u){const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.elementType){const e={instancePath:t,schemaPath:"#/allOf/1/allOf/0/then/required",keyword:"required",params:{missingProperty:"elementType"},message:"must have required property 'elementType'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.elementType){let n=e.elementType;const i=s;let r=!0;const a=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&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={};null===o?o=[e]:o.push(e),s++}}var d=a===s;if(s=i,null!==o&&(i?o.length=i:o=null),d){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.eventDefinition){const e={instancePath:t+"/elementType",schemaPath:"#/allOf/1/allOf/0/then/properties/elementType/allOf/0/then/required",keyword:"required",params:{missingProperty:"eventDefinition"},message:"must have required property 'eventDefinition'"};null===o?o=[e]:o.push(e),s++}r=d=e===s}if(!r){const e={instancePath:t+"/elementType",schemaPath:"#/allOf/1/allOf/0/then/properties/elementType/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.value){const e={instancePath:t+"/elementType",schemaPath:"#/allOf/1/allOf/0/then/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("bpmn:ReceiveTask"!==e&&"bpmn:SendTask"!==e&&"bpmn:StartEvent"!==e&&"bpmn:IntermediateCatchEvent"!==e&&"bpmn:IntermediateThrowEvent"!==e&&"bpmn:BoundaryEvent"!==e&&"bpmn:EndEvent"!==e){const e={instancePath:t+"/elementType/value",schemaPath:"#/allOf/1/allOf/0/then/properties/elementType/properties/value/enum",keyword:"enum",params:{allowedValues:k3.allOf[1].allOf[0].then.properties.elementType.properties.value.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}}}}}l=u=n===s}if(!l){const e={instancePath:t,schemaPath:"#/allOf/1/allOf/0/if",keyword:"if",params:{failingKeyword:"then"},message:'must match "then" schema'};null===o?o=[e]:o.push(e),s++}const h=s;let f=!0;const m=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;e<n;e++){let n=t[e];const i=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&&"bpmn:Message#zeebe:subscription#property"!==e.type){const e={};null===o?o=[e]:o.push(e),s++}}var g=i===s;if(g)break}if(g)s=e,null!==o&&(e?o.length=e:o=null);else{const e={};null===o?o=[e]:o.push(e),s++}}}var y=m===s;if(s=h,null!==o&&(h?o.length=h:o=null),y){const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.elementType){const e={instancePath:t,schemaPath:"#/allOf/1/allOf/1/then/required",keyword:"required",params:{missingProperty:"elementType"},message:"must have required property 'elementType'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.elementType){let n=e.elementType;const i=s;let r=!0;const a=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&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={};null===o?o=[e]:o.push(e),s++}}var v=a===s;if(s=i,null!==o&&(i?o.length=i:o=null),v){const e=s;if(n&&"object"==typeof n&&!Array.isArray(n)&&void 0===n.eventDefinition){const e={instancePath:t+"/elementType",schemaPath:"#/allOf/1/allOf/1/then/properties/elementType/allOf/0/then/required",keyword:"required",params:{missingProperty:"eventDefinition"},message:"must have required property 'eventDefinition'"};null===o?o=[e]:o.push(e),s++}r=v=e===s}if(!r){const e={instancePath:t+"/elementType",schemaPath:"#/allOf/1/allOf/1/then/properties/elementType/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.value){const e={instancePath:t+"/elementType",schemaPath:"#/allOf/1/allOf/1/then/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("bpmn:ReceiveTask"!==e&&"bpmn:StartEvent"!==e&&"bpmn:IntermediateCatchEvent"!==e&&"bpmn:IntermediateThrowEvent"!==e&&"bpmn:BoundaryEvent"!==e&&"bpmn:EndEvent"!==e){const e={instancePath:t+"/elementType/value",schemaPath:"#/allOf/1/allOf/1/then/properties/elementType/properties/value/enum",keyword:"enum",params:{allowedValues:k3.allOf[1].allOf[1].then.properties.elementType.properties.value.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),s++}}}}}f=y=n===s}if(!f){const e={instancePath:t,schemaPath:"#/allOf/1/allOf/1/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(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;e<n;e++){let n=t[e];const i=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&&"zeebe:calledElement"!==e.type){const e={};null===o?o=[e]:o.push(e),s++}}var _=i===s;if(_)break}if(_)s=e,null!==o&&(e?o.length=e:o=null);else{const e={};null===o?o=[e]:o.push(e),s++}}}var E=w===s;if(s=b,null!==o&&(b?o.length=b:o=null),E){const n=s,i=s;let r=!1;const a=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.elementType){const e={instancePath:t,schemaPath:"#/allOf/1/allOf/2/then/anyOf/0/required",keyword:"required",params:{missingProperty:"elementType"},message:"must have required property 'elementType'"};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/1/allOf/2/then/anyOf/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&&"bpmn:CallActivity"!==n.value){const e={instancePath:t+"/elementType/value",schemaPath:"#/allOf/1/allOf/2/then/anyOf/0/properties/elementType/properties/value/const",keyword:"const",params:{allowedValue:"bpmn:CallActivity"},message:"must be equal to constant"};null===o?o=[e]:o.push(e),s++}}}}var O=a===s;if(r=r||O,!r){const n=s;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.appliesTo){const e={instancePath:t,schemaPath:"#/allOf/1/allOf/2/then/anyOf/1/required",keyword:"required",params:{missingProperty:"appliesTo"},message:"must have required property 'appliesTo'"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.appliesTo&&!M3(e.appliesTo,k3.allOf[1].allOf[2].then.anyOf[1].properties.appliesTo.const)){const e={instancePath:t+"/appliesTo",schemaPath:"#/allOf/1/allOf/2/then/anyOf/1/properties/appliesTo/const",keyword:"const",params:{allowedValue:k3.allOf[1].allOf[2].then.anyOf[1].properties.appliesTo.const},message:"must be equal to constant"};null===o?o=[e]:o.push(e),s++}}O=n===s;r=r||O}if(r)s=i,null!==o&&(i?o.length=i:o=null);else{const e={instancePath:t,schemaPath:"#/allOf/1/allOf/2/then/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===o?o=[e]:o.push(e),s++}x=E=n===s}if(!x){const e={instancePath:t,schemaPath:"#/allOf/1/allOf/2/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.properties&&(j3(e.properties,{instancePath:t+"/properties",parentData:e,parentDataProperty:"properties",rootData:r})||(o=null===o?j3.errors:o.concat(j3.errors),s=o.length)),void 0!==e.icon){let n=e.icon;if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.contents){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/required",keyword:"required",params:{missingProperty:"contents"},message:"must have required property 'contents'"};null===o?o=[e]:o.push(e),s++}if(void 0!==n.contents){let e=n.contents;if("string"==typeof e){if(!T3.test(e)){const e={instancePath:t+"/icon/contents",schemaPath:"#/properties/icon/properties/contents/pattern",keyword:"pattern",params:{pattern:"^(https?|data):.*"},message:'must match pattern "^(https?|data):.*"'};null===o?o=[e]:o.push(e),s++}}else{const e={instancePath:t+"/icon/contents",schemaPath:"#/properties/icon/properties/contents/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+"/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;i<e;i++){let e=n[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.tooltip&&"string"!=typeof e.tooltip){const e={instancePath:t+"/groups/"+i+"/tooltip",schemaPath:"#/properties/groups/items/properties/tooltip/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),s++}if(void 0!==e.openByDefault&&"boolean"!=typeof e.openByDefault){const e={instancePath:t+"/groups/"+i+"/openByDefault",schemaPath:"#/properties/groups/items/properties/openByDefault/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};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 I3.errors=o,0===s}function L3(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;I3(e,{instancePath:t,parentData:n,parentDataProperty:i,rootData:r})||(o=null===o?I3.errors:o.concat(I3.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<n;i++)I3(e[i],{instancePath:t+"/"+i,parentData:e,parentDataProperty:i,rootData:r})||(o=null===o?I3.errors:o.concat(I3.errors),s=o.length)}else{const e={instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),s++}var d;if((d=u===s)&&l?(l=!1,c=[c,1]):d&&(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 L3.errors=o,0===s}var B3=z2(P3.exports);function q3(e){return _3(e,B3)}var z3="_plane";function F3(e){return function(e){return e.replace(new RegExp(z3+"$"),"")}(e.id)}const V3={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]};var H3=n(515);n(35);const U3="zeebe:modelerTemplate";function W3(e){const t=Wx(e);if(t)return t.get(U3)}function G3(e){const t=Wx(e);if(t)return t.get("zeebe:modelerTemplateVersion")}function Q3(e,t){const n=Wx(e);let i;if(i=Hx(n,"bpmn:ExtensionElements")?n:n.get("extensionElements"),i)return i.get("values").find((e=>Hx(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<s)return`${r} ${n("must have min length {minLength}.",{minLength:s})}`;let{pattern:l}=i;if(l){let t;if(y(l)||(t=l.message,l=l.value),!function(e,t){return new RegExp(t).test(e)}(e,l))return t?`${r} ${n(t)}`:`${r} ${n("must match pattern {pattern}.",{pattern:l})}`}}function E4(e,t){const n=Wx(e).get("id"),{binding:i}=t,{type:r}=i;return new Error(`unknown binding <${r}> 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<t;)e=n+e;return e}(e,2,"0")}function G4(e={}){const{getTemplateId:t=t5}=e;return function(e){const{id:n,label:i,element:r,entries:o=[]}=e,[s,a]=Qq(["groups",n,"open"],!1),l=!o.length;return q_("div",{class:"bio-properties-panel-group bio-properties-panel-templates-group","data-group-id":"group-"+n,children:[q_("div",{class:F_()("bio-properties-panel-group-header",{empty:l,open:s&&!l}),onClick:()=>!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<t;i++){var r=e[i],o=r.name,s=r.value;"on"===o.substring(0,2)&&h6.options.allowEvents&&(s=new Function(s)),n[o]=s}return n}(e.attributes),(a=(s=e.childNodes)&&Array.prototype.map.call(s,h6).filter(m6))&&a.length?a:null);return h6.visitor&&h6.visitor(l),l}var f6,m6=function(e){return e},g6={};function y6(e){var t=(e.type||"").toLowerCase(),n=y6.map;n&&n.hasOwnProperty(t)?(e.type=n[t],e.props=Object.keys(e.props||{}).reduce((function(t,n){var i;return t[(i=n,i.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=e.props[n],t}),{})):e.type=t.replace(/[^a-z0-9-]/i,"")}var v6=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.setReviver=function(e){f6=e},t.prototype.shouldComponentUpdate=function(e){var t=this.props;return e.wrap!==t.wrap||e.type!==t.type||e.markup!==t.markup},t.prototype.setComponents=function(e){if(this.map={},e)for(var t in e)if(e.hasOwnProperty(t)){var n=t.replace(/([A-Z]+)([A-Z][a-z0-9])|([a-z0-9]+)([A-Z])/g,"$1$3-$2$4").toLowerCase();this.map[n]=e[t]}},t.prototype.render=function(e){var t=e.wrap;void 0===t&&(t=!0);var n,i=e.type,r=e.markup,o=e.components,s=e.reviver,a=e.onError,l=e["allow-scripts"],c=e["allow-events"],p=e.trim,u=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===t.indexOf(i)&&(n[i]=e[i]);return n}(e,["wrap","type","markup","components","reviver","onError","allow-scripts","allow-events","trim"]),d=s||this.reviver||this.constructor.prototype.reviver||f6||pw;this.setComponents(o);var h={allowScripts:l,allowEvents:c,trim:p};try{n=function(e,t,n,i,r){var o=function(e,t){var n,i,r,o,s="html"===t?"text/html":"application/xml";"html"===t?(o="body",r="<!DOCTYPE html>\n<html><body>"+e+"</body></html>"):(o="xml",r='<?xml version="1.0" encoding="UTF-8"?>\n<xml>'+e+"</xml>");try{n=(new DOMParser).parseFromString(r,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(`<!DOCTYPE html>\n<html><body><div>${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("<none>")},{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<o)return e("Must have min length {minLength}.",{minLength:o});let{pattern:a}=i;if(a){let t;if(y(a)||(t=a.message,a=a.value),!function(e,t){return new RegExp(t).test(e)}(n,a))return t||e("Must match pattern {pattern}.",{pattern:a})}}}function J7(e,t){const{id:n,type:i}=t;if("bpmn:Error"===i){const t=c5(e,n);if(t)return t.get("errorRef")}return i5(e,i)}function e8(e,t){const n=Wx(e).get("id"),{binding:i}=t,{type:r}=i;return new Error(`unknown binding <${r}> 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"<no reference>";const n=t.get("errorCode"),i=t.get("name")||"<unnamed>";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("<unnamed>"),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 <prefix:localName> or <localName>, 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 <name, cb>");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 <nsMap={}>");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 <xml=string>");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(;g<b;g++)if(l=!1,!(32===(p=y.charCodeAt(g))||p<14&&p>8)){for((p<65||p>122||p>90&&p<97)&&95!==p&&58!==p&&(v("illegal first char attribute name"),l=!0),u=g+1;u<b;u++)if(!((p=y.charCodeAt(u))>96&&p<123||p>64&&p<91||p>47&&p<59||46===p||45===p||95===p)){if(32===p||p<14&&p>8){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;u<b&&!(32===(p=y.charCodeAt(u+1))||p<14&&p>8);u++);for(-1===u&&(v("missing closing quotes"),u=b,l=!0),l||(o=y.substring(g,u)),g=u;u+1<b&&!(32===(p=y.charCodeAt(u+1))||p<14&&p>8);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<b;g++){if(a=m[g++],o=m[g],-1!==(p=a.indexOf(":"))){if(!(n=C[a.substring(0,p)])){v(V8(a.substring(0,p)));continue}a=d===n?a.substr(p+1):n+a.substr(p)}x[a]=o}return k=x}function L(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,o=0,s=0,a=N;R>=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<e.length&&e.substring(N).trim()&&v(z8));if(N!==R)if(T.length){if(t&&(t(e.substring(N,R),q8,d),g))return}else if(e.substring(N,R).trim()&&(v(z8),g))return;if(33===(x=e.charCodeAt(R+1))){if(91===(b=e.charCodeAt(R+2))&&"CDATA["===e.substr(R+3,6)){if(-1===(N=e.indexOf("]]>",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(;b<N;b++)if(!(32===(x=e.charCodeAt(b))||x>8&&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;b<m;b++)if(!((x=u.charCodeAt(b))>96&&x<123||x>64&&x<91||x>47&&x<59||45===x||95===x||46==x)){if(32===x||x<14&&x>8){E=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('<?xml version="1.0" encoding="UTF-8"?>\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+"</"+this.tagName+">").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("</"+this.tagName+">").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("</"+this.tagName+">")),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:'<div class="entry"><svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="currentColor">\n <path d="m12.5 5.5.3-.4 3.6-3.6c.5-.5 1.3-.5 1.7 0l1 1c.5.4.5 1.2 0 1.7l-3.6 3.6-.4.2v.2c0 1.4.6 2 1 2.7v.6l-1.7 1.6c-.2.2-.4.2-.6 0L7.3 6.6a.4.4 0 0 1 0-.6l.3-.3.5-.5.8-.8c.2-.2.4-.1.6 0 .9.5 1.5 1.1 3 1.1zm-9.9 6 4.2-4.2 6.3 6.3-4.2 4.2c-.3.3-.9.3-1.2 0l-.8-.8-.9-.8-2.3-2.9" />\n</svg></div>',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 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" height="100%" width="100%">\n <rect rx="2" x="1" y="1" width="22" height="22" fill="var(--fill-color)" stroke="var(--stroke-color)" style="stroke-width:2"></rect>\n </svg>\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:'<div class="entry"><svg width="22" height="22" viewBox="0 0 5.82 5.82" xmlns="http://www.w3.org/2000/svg" fill="currentColor">\n <path d="M1.3 3.4c.3 0 .5-.2.5-.5s-.2-.4-.5-.4c-.2 0-.4.1-.4.4 0 .3.2.5.4.5zM3 3.4c.2 0 .4-.2.4-.5s-.2-.4-.4-.4c-.3 0-.5.1-.5.4 0 .3.2.5.5.5zM4.6 3.4c.2 0 .4-.2.4-.5s-.2-.4-.4-.4c-.3 0-.5.1-.5.4 0 .3.2.5.5.5z"/>\n</svg></div>',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=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',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:'<div class="entry"> <svg width="46" height="46" viewBox="-2 -2 9.82 9.82" xmlns="http://www.w3.org/2000/svg" fill="currentColor">\n <path d="M1.3 3.4c.3 0 .5-.2.5-.5s-.2-.4-.5-.4c-.2 0-.4.1-.4.4 0 .3.2.5.4.5zM3 3.4c.2 0 .4-.2.4-.5s-.2-.4-.4-.4c-.3 0-.5.1-.5.4 0 .3.2.5.5.5zM4.6 3.4c.2 0 .4-.2.4-.5s-.2-.4-.4-.4c-.3 0-.5.1-.5.4 0 .3.2.5.5.5z"/>\n</svg></div>',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<e.length;)t.call(n,e[i],i,e),i++;else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function y(e,t,n){var i="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\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<arguments.length;n++){var i=arguments[n];if(i!==a&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t}:Object.assign;var v=y((function(e,t,n){for(var i=Object.keys(t),r=0;r<i.length;)(!n||n&&e[i[r]]===a)&&(e[i[r]]=t[i[r]]),r++;return e}),"extend","Use `assign`."),b=y((function(e,t){return v(e,t,!0)}),"merge","Use `assign`.");function x(e,t,n){var i,r=t.prototype;(i=e.prototype=Object.create(r)).constructor=e,i._super=r,n&&l(i,n)}function w(e,t){return function(){return e.apply(t,arguments)}}function _(e,t){return"function"==typeof e?e.apply(t&&t[0]||a,t):e}function E(e,t){return e===a?t:e}function O(e,t,n){g(C(t),(function(t){e.addEventListener(t,n,!1)}))}function P(e,t,n){g(C(t),(function(t){e.removeEventListener(t,n,!1)}))}function k(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function S(e,t){return e.indexOf(t)>-1}function C(e){return e.trim().split(/\s+/g)}function T(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}function A(e){return Array.prototype.slice.call(e,0)}function M(e,t,n){for(var i=[],r=[],o=0;o<e.length;){var s=t?e[o][t]:e[o];T(r,s)<0&&i.push(e[o]),r[o]=s,o++}return n&&(i=t?i.sort((function(e,n){return e[t]>n[t]})):i.sort()),i}function D(e,t){for(var n,i,r=t[0].toUpperCase()+t.slice(1),o=0;o<c.length;){if((i=(n=c[o])?n+r:t)in e)return i;o++}return a}var R=1;function N(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||r}var $="ontouchstart"in r,j=D(r,"PointerEvent")!==a,I=$&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),L="touch",B="mouse",q=24,z=["x","y"],F=["clientX","clientY"];function V(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){_(e.options.enable,[e])&&n.handler(t)},this.init()}function H(e,t,n){var i=n.pointers.length,r=n.changedPointers.length,o=1&t&&i-r==0,s=12&t&&i-r==0;n.isFirst=!!o,n.isFinal=!!s,o&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,i=t.pointers,r=i.length;n.firstInput||(n.firstInput=U(t));r>1&&!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<e.pointers.length;)t[n]={clientX:u(e.pointers[n].clientX),clientY:u(e.pointers[n].clientY)},n++;return{timeStamp:h(),pointers:t,center:W(t),deltaX:e.deltaX,deltaY:e.deltaY}}function W(e){var t=e.length;if(1===t)return{x:u(e[0].clientX),y:u(e[0].clientY)};for(var n=0,i=0,r=0;r<t;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:u(n/t),y:u(i/t)}}function G(e,t,n){return{x:t/e||0,y:n/e||0}}function Q(e,t){return e===t?1:d(e)>=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<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<s.length;)i[s[r].identifier]&&a.push(s[r]),12&t&&delete i[s[r].identifier],r++;return a.length?[M(o.concat(a),"identifier",!0),a]:void 0}x(ue,V,{handler:function(e){var t=ce[e.type],n=de.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:L,srcEvent:e})}});function he(){V.apply(this,arguments);var e=w(this.handler,this);this.touch=new ue(this.manager,e),this.mouse=new ee(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function fe(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,me.call(this,t)):12&e&&me.call(this,t)}function me(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout((function(){var e=i.indexOf(n);e>-1&&i.splice(e,1)}),2500)}}function ge(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(t-r.x),s=Math.abs(n-r.y);if(o<=25&&s<=25)return!0}return!1}x(he,V,{handler:function(e,t,n){var i=n.pointerType==L,r=n.pointerType==B;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)fe.call(this,t,n);else if(r&&ge.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ye=D(p.style,"touchAction"),ve=ye!==a,be="compute",xe="auto",we="manipulation",_e="none",Ee="pan-x",Oe="pan-y",Pe=function(){if(!ve)return!1;var e={},t=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){e[n]=!t||r.CSS.supports("touch-action",n)})),e}();function ke(e,t){this.manager=e,this.set(t)}ke.prototype={set:function(e){e==be&&(e=this.compute()),ve&&this.manager.element.style&&Pe[e]&&(this.manager.element.style[ye]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return g(this.manager.recognizers,(function(t){_(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(S(e,_e))return _e;var t=S(e,Ee),n=S(e,Oe);if(t&&n)return _e;if(t||n)return t?Ee:Oe;if(S(e,we))return we;return xe}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var i=this.actions,r=S(i,_e)&&!Pe[_e],o=S(i,Oe)&&!Pe[Oe],s=S(i,Ee)&&!Pe[Ee];if(r){var a=1===e.pointers.length,l=e.distance<2,c=e.deltaTime<250;if(a&&l&&c)return}if(!s||!o)return r||o&&6&n||s&&n&q?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var Se=32;function Ce(e){this.options=l({},this.defaults,e||{}),this.id=R++,this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Te(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function Ae(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function Me(e,t){var n=t.manager;return n?n.get(e):e}function De(){Ce.apply(this,arguments)}function Re(){De.apply(this,arguments),this.pX=null,this.pY=null}function Ne(){De.apply(this,arguments)}function $e(){Ce.apply(this,arguments),this._timer=null,this._input=null}function je(){De.apply(this,arguments)}function Ie(){De.apply(this,arguments)}function Le(){Ce.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Be(e,t){return(t=t||{}).recognizers=E(t.recognizers,Be.defaults.preset),new qe(e,t)}Ce.prototype={defaults:{},set:function(e){return l(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(m(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Me(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return m(e,"dropRecognizeWith",this)||(e=Me(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(m(e,"requireFailure",this))return this;var t=this.requireFail;return-1===T(t,e=Me(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(m(e,"dropRequireFailure",this))return this;e=Me(e,this);var t=T(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function i(n){t.manager.emit(n,e)}n<8&&i(t.options.event+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;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=l({},e);if(!_(this.options.enable,[this,t]))return this.reset(),void(this.state=Se);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},x(De,Ce,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,i=6&t,r=this.attrTest(e);return i&&(8&n||!r)?16|t:i||r?4&n?8|t:2&t?4|t:2:Se}}),x(Re,De,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(Oe),e&q&&t.push(Ee),t},directionTest:function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,s=e.deltaY;return r&t.direction||(6&t.direction?(r=0===o?1:o<0?2:4,n=o!=this.pX,i=Math.abs(e.deltaX)):(r=0===s?1:s<0?8:16,n=s!=this.pY,i=Math.abs(e.deltaY))),e.direction=r,n&&i>t.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.distance<t.threshold,r=e.deltaTime>t.time;if(this._input=e,!i||!n||12&e.eventType&&!r)this.reset();else if(1&e.eventType)this.reset(),this._timer=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.distance<t.threshold,r=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(i&&r&&n){if(4!=e.eventType)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,s=!this.pCenter||X(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,s&&o?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=f((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return Se},failTimeout:function(){return this._timer=f((function(){this.state=Se}),this.options.interval,this),Se},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Be.VERSION="2.0.7",Be.defaults={domEvents:!1,touchAction:be,enable:!0,inputTarget:null,inputClass:null,preset:[[je,{enable:!1}],[Ne,{enable:!1},["rotate"]],[Ie,{direction:6}],[Re,{direction:6},["swipe"]],[Le],[Le,{event:"doubletap",taps:2},["tap"]],[$e]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function qe(e,t){var n;this.options=l({},Be.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(j?oe:I?ue:$?he:ee))(n,H),this.touchAction=new ke(this,this.options.touchAction),ze(this,!0),g(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function ze(e,t){var n,i=e.element;i.style&&(g(e.options.cssProps,(function(r,o){n=D(i.style,o),t?(e.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}qe.prototype={set:function(e){return l(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var i=this.recognizers,r=t.curRecognizer;(!r||r&&8&r.state)&&(r=t.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===t.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&14&n.state&&(r=t.curRecognizer=n),o++}},get:function(e){if(e instanceof Ce)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(m(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(m(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=T(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==a&&t!==a){var n=this.handlers;return g(C(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==a){var n=this.handlers;return g(C(e),(function(e){t?n[e]&&n[e].splice(T(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var n=o.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](t),i++}},destroy:function(){this.element&&ze(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},l(Be,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:Se,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:q,DIRECTION_ALL:30,Manager:qe,Input:V,TouchAction:ke,TouchInput:ue,MouseInput:ee,PointerEventInput:oe,TouchMouseInput:he,SingleTouchInput:ae,Recognizer:Ce,AttrRecognizer:De,Tap:Le,Pan:Re,Swipe:Ie,Pinch:Ne,Rotate:je,Press:$e,on:O,off:P,each:g,merge:b,extend:v,assign:l,inherit:x,bindFn:w,prefixed:D}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=Be,(i=function(){return Be}.call(t,n,t,e))===a||(e.exports=i)}(window,document)},692:function(e,t){var n;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(i,r){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,l=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},c=o.push,p=o.indexOf,u={},d=u.toString,h=u.hasOwnProperty,f=h.toString,m=f.call(Object),g={},y=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},v=function(e){return null!=e&&e===e.window},b=i.document,x={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var i,r,o=(n=n||b).createElement("script");if(o.text=e,t)for(i in x)(r=t[i]||t.getAttribute&&t.getAttribute(i))&&o.setAttribute(i,r);n.head.appendChild(o).parentNode.removeChild(o)}function _(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?u[d.call(e)]||"object":typeof e}var E="3.7.1",O=/HTML$/i,P=function(e,t){return new P.fn.init(e,t)};function k(e){var t=!!e&&"length"in e&&e.length,n=_(e);return!y(e)&&!v(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&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<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:o.sort,splice:o.splice},P.extend=P.fn.extend=function(){var e,t,n,i,r,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||y(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)i=e[t],"__proto__"!==t&&s!==i&&(c&&i&&(P.isPlainObject(i)||(r=Array.isArray(i)))?(n=s[t],o=r&&!Array.isArray(n)?[]:r||P.isPlainObject(n)?n:{},r=!1,s[t]=P.extend(c,o,i)):void 0!==i&&(s[t]=i));return s},P.extend({expando:"jQuery"+(E+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==d.call(e))&&(!(t=s(e))||"function"==typeof(n=h.call(t,"constructor")&&t.constructor)&&f.call(n)===m)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){w(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,i=0;if(k(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},text:function(e){var t,n="",i=0,r=e.nodeType;if(!r)for(;t=e[i++];)n+=P.text(t);return 1===r||11===r?e.textContent:9===r?e.documentElement.textContent:3===r||4===r?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(k(Object(e))?P.merge(n,"string"==typeof e?[e]:e):c.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:p.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!O.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i=[],r=0,o=e.length,s=!n;r<o;r++)!t(e[r],r)!==s&&i.push(e[r]);return i},map:function(e,t,n){var i,r,o=0,s=[];if(k(e))for(i=e.length;o<i;o++)null!=(r=t(e[o],o,n))&&s.push(r);else for(o in e)null!=(r=t(e[o],o,n))&&s.push(r);return l(s)},guid:1,support:g}),"function"==typeof Symbol&&(P.fn[Symbol.iterator]=o[Symbol.iterator]),P.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){u["[object "+t+"]"]=t.toLowerCase()}));var C=o.pop,T=o.sort,A=o.splice,M="[\\x20\\t\\r\\n\\f]",D=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g");P.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var R=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function N(e,t){return t?"\0"===e?"<22>":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}P.escapeSelector=function(e){return(e+"").replace(R,N)};var $=b,j=c;!function(){var e,t,n,r,s,l,c,u,d,f,m=j,y=P.expando,v=0,b=0,x=ee(),w=ee(),_=ee(),E=ee(),O=function(e,t){return e===t&&(s=!0),0},k="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",R="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",N="\\["+M+"*("+R+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+M+"*\\]",I=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",L=new RegExp(M+"+","g"),B=new RegExp("^"+M+"*,"+M+"*"),q=new RegExp("^"+M+"*([>+~]|"+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="<a id='"+y+"' href='' disabled='disabled'></a><select id='"+y+"-\r\\' disabled='disabled'><option selected=''></option></select>",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;n<t;n+=2)e.push(n);return e})),odd:se((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:se((function(e,t,n){var i;for(i=n<0?n+t:n>t?t:n;--i>=0;)e.push(i);return e})),gt:se((function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e}))}},t.pseudos.nth=t.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[e]=ie(e);for(e in{submit:!0,reset:!0})t.pseudos[e]=re(e);function ce(){}function pe(e,n){var i,r,o,s,a,l,c,p=w[e+" "];if(p)return n?0:p.slice(0);for(a=e,l=[],c=t.preFilter;a;){for(s in i&&!(r=B.exec(a))||(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),i=!1,(r=q.exec(a))&&(i=r.shift(),o.push({value:i,type:r[0].replace(D," ")}),a=a.slice(i.length)),t.filter)!(r=H[s].exec(a))||c[s]&&!(r=c[s](r))||(i=r.shift(),o.push({value:i,type:s,matches:r}),a=a.slice(i.length));if(!i)break}return n?a.length:a?J.error(e):w(e,l).slice(0)}function ue(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function de(e,t,n){var i=t.dir,r=t.next,o=r||i,s=n&&"parentNode"===o,a=b++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||s)return e(t,n,r);return!1}:function(t,n,l){var c,p,u=[v,a];if(l){for(;t=t[i];)if((1===t.nodeType||s)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||s)if(p=t[y]||(t[y]={}),r&&S(t,r))t=t[i]||t;else{if((c=p[o])&&c[0]===v&&c[1]===a)return u[2]=c[2];if(p[o]=u,u[2]=e(t,n,l))return!0}return!1}}function he(e){return e.length>1?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<l;a++)(o=e[a])&&(n&&!n(o,i,r)||(s.push(o),c&&t.push(a)));return s}function me(e,t,n,i,r,o){return i&&!i[y]&&(i=me(i)),r&&!r[y]&&(r=me(r,o)),te((function(o,s,a,l){var c,u,d,h,f=[],g=[],y=s.length,v=o||function(e,t,n){for(var i=0,r=t.length;i<r;i++)J(e,t[i],n);return n}(t||"*",a.nodeType?[a]:a,[]),b=!e||!o&&t?v:fe(v,f,e,a,l);if(n?n(b,h=r||(o?e:y||i)?[]:s,a,l):h=b,i)for(c=fe(h,g),i(c,[],a,l),u=c.length;u--;)(d=c[u])&&(h[g[u]]=!(b[g[u]]=d));if(o){if(r||e){if(r){for(c=[],u=h.length;u--;)(d=h[u])&&c.push(b[u]=d);r(null,h=[],c,l)}for(u=h.length;u--;)(d=h[u])&&(c=r?p.call(o,d):f[u])>-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}];c<s;c++)if(r=t.relative[e[c].type])h=[de(he(h),r)];else{if((r=t.filter[e[c].type].apply(null,e[c].matches))[y]){for(o=++c;o<s&&!t.relative[e[o].type];o++);return me(c>1&&he(h),c>1&&ue(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(D,"$1"),r,c<o&&ge(e.slice(c,o)),o<s&&ge(e=e.slice(o)),o<s&&ue(e))}h.push(r)}return he(h)}function ye(e,i){var r,o=[],s=[],a=_[e+" "];if(!a){for(i||(i=pe(e)),r=i.length;r--;)(a=ge(i[r]))[y]?o.push(a):s.push(a);a=_(e,function(e,i){var r=i.length>0,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;t<i;t++)if(P.contains(r[t],this))return!0})));for(n=this.pushStack([]),t=0;t<i;t++)P.find(e,r[t],n);return i>1?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<n;e++)if(P.contains(this,t[e]))return!0}))},closest:function(e,t){var n,i=0,r=this.length,o=[],s="string"!=typeof e&&P(e);if(!B.test(e))for(;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-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<o.length;)!1===o[a].apply(n[0],n[1])&&e.stopOnFalse&&(a=o.length,n=!1);e.memory||(n=!1),t=!1,r&&(o=n?[]:"")},c={add:function(){return o&&(n&&!t&&(a=o.length-1,s.push(n)),function t(n){P.each(n,(function(n,i){y(i)?e.unique&&c.has(i)||o.push(i):i&&i.length&&"string"!==_(i)&&t(i)}))}(arguments),n&&!t&&l()),this},remove:function(){return P.each(arguments,(function(e,t){for(var n;(n=P.inArray(t,o,n))>-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)){if((i=n.apply(a,l))===t.promise())throw new TypeError("Thenable self-resolution");c=i&&("object"==typeof i||"function"==typeof i)&&i.then,y(c)?r?c.call(i,s(o,t,Q,r),s(o,t,X,r)):(o++,c.call(i,s(o,t,Q,r),s(o,t,X,r),s(o,t,Q,t.notifyWith))):(n!==Q&&(a=void 0,l=[i]),(r||t.resolveWith)(a,l))}},p=r?c:function(){try{c()}catch(i){P.Deferred.exceptionHook&&P.Deferred.exceptionHook(i,p.error),e+1>=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(;a<l;a++)t(e[a],n,s?i:i.call(e[a],a,t(e[a],n)));return r?e:c?t.call(e):l?t(e[0],n):o},te=/^-ms-/,ne=/-([a-z])/g;function ie(e,t){return t.toUpperCase()}function re(e){return e.replace(te,"ms-").replace(ne,ie)}var oe=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function se(){this.expando=P.expando+se.uid++}se.uid=1,se.prototype={cache:function(e){var t=e[this.expando];return t||(t={},oe(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,r=this.cache(e);if("string"==typeof t)r[re(t)]=n;else for(i in t)r[re(i)]=t[i];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][re(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){n=(t=Array.isArray(t)?t.map(re):(t=re(t))in i?[t]:t.match(G)||[]).length;for(;n--;)delete i[t[n]]}(void 0===t||P.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!P.isEmptyObject(t)}};var ae=new se,le=new se,ce=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,pe=/[A-Z]/g;function ue(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(pe,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ce.test(e)?JSON.parse(e):e)}(n)}catch(e){}le.set(e,t,n)}else n=void 0;return n}P.extend({hasData:function(e){return le.hasData(e)||ae.hasData(e)},data:function(e,t,n){return le.access(e,t,n)},removeData:function(e,t){le.remove(e,t)},_data:function(e,t,n){return ae.access(e,t,n)},_removeData:function(e,t){ae.remove(e,t)}}),P.fn.extend({data:function(e,t){var n,i,r,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(r=le.get(o),1===o.nodeType&&!ae.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=re(i.slice(5)),ue(o,i,r[i]));ae.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each((function(){le.set(this,e)})):ee(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=le.get(o,e))||void 0!==(n=ue(o,e))?n:void 0;this.each((function(){le.set(this,e,t)}))}),null,t,arguments.length>1,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<n?P.queue(this[0],e):void 0===t?this:this.each((function(){var n=P.queue(this,e,t);P._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&P.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){P.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=P.Deferred(),o=this,s=this.length,a=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(n=ae.get(o[s],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),r.promise(t)}});var de=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,he=new RegExp("^(?:([+-])=|)("+de+")([a-z%]*)$","i"),fe=["Top","Right","Bottom","Left"],me=b.documentElement,ge=function(e){return P.contains(e.ownerDocument,e)},ye={composed:!0};me.getRootNode&&(ge=function(e){return P.contains(e.ownerDocument,e)||e.getRootNode(ye)===e.ownerDocument});var ve=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ge(e)&&"none"===P.css(e,"display")};function be(e,t,n,i){var r,o,s=20,a=i?function(){return i.cur()}:function(){return P.css(e,t,"")},l=a(),c=n&&n[3]||(P.cssNumber[t]?"":"px"),p=e.nodeType&&(P.cssNumber[t]||"px"!==c&&+l)&&he.exec(P.css(e,t));if(p&&p[3]!==c){for(l/=2,c=c||p[3],p=+l||1;s--;)P.style(e,t,p+c),(1-o)*(1-(o=a()/l||.5))<=0&&(s=0),p/=o;p*=2,P.style(e,t,p+c),n=n||[]}return n&&(p=+p||+l||0,r=n[1]?p+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=p,i.end=r)),r}var xe={};function we(e){var t,n=e.ownerDocument,i=e.nodeName,r=xe[i];return r||(t=n.body.appendChild(n.createElement(i)),r=P.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),xe[i]=r,r)}function _e(e,t){for(var n,i,r=[],o=0,s=e.length;o<s;o++)(i=e[o]).style&&(n=i.style.display,t?("none"===n&&(r[o]=ae.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&ve(i)&&(r[o]=we(i))):"none"!==n&&(r[o]="none",ae.set(i,"display",n)));for(o=0;o<s;o++)null!=r[o]&&(e[o].style.display=r[o]);return e}P.fn.extend({show:function(){return _e(this,!0)},hide:function(){return _e(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){ve(this)?P(this).show():P(this).hide()}))}});var Ee,Oe,Pe=/^(?:checkbox|radio)$/i,ke=/<([a-z][^\/\0>\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="<textarea>x</textarea>",g.noCloneChecked=!!Ee.cloneNode(!0).lastChild.defaultValue,Ee.innerHTML="<option></option>",g.option=!!Ee.lastChild;var Ce={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_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<i;n++)ae.set(e[n],"globalEval",!t||ae.get(t[n],"globalEval"))}Ce.tbody=Ce.tfoot=Ce.colgroup=Ce.caption=Ce.thead,Ce.th=Ce.td,g.option||(Ce.optgroup=Ce.option=[1,"<select multiple='multiple'>","</select>"]);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<f;h++)if((o=e[h])||0===o)if("object"===_(o))P.merge(d,o.nodeType?[o]:o);else if(Me.test(o)){for(s=s||u.appendChild(t.createElement("div")),a=(ke.exec(o)||["",""])[1].toLowerCase(),l=Ce[a]||Ce._default,s.innerHTML=l[1]+P.htmlPrefilter(o)+l[2],p=l[0];p--;)s=s.lastChild;P.merge(d,s.childNodes),(s=u.firstChild).textContent=""}else d.push(t.createTextNode(o));for(u.textContent="",h=0;o=d[h++];)if(i&&P.inArray(o,i)>-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<arguments.length;t++)a[t]=arguments[t];if(l.delegateTarget=this,!p.preDispatch||!1!==p.preDispatch.call(this,l)){for(s=P.event.handlers.call(this,l,c),t=0;(r=s[t++])&&!l.isPropagationStopped();)for(l.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,void 0!==(i=((P.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,a))&&!1===(l.result=i)&&(l.preventDefault(),l.stopPropagation()));return p.postDispatch&&p.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,i,r,o,s,a=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],s={},n=0;n<l;n++)void 0===s[r=(i=t[n]).selector+" "]&&(s[r]=i.needsContext?P(r,this).index(c)>-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<t.length&&a.push({elem:c,handlers:t.slice(l)}),a},addProp:function(e,t){Object.defineProperty(P.Event.prototype,e,{enumerable:!0,configurable:!0,get:y(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[P.expando]?e:new P.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return Pe.test(t.type)&&t.click&&S(t,"input")&&Ie(t,"click",!0),!1},trigger:function(e){var t=this||e;return Pe.test(t.type)&&t.click&&S(t,"input")&&Ie(t,"click"),!0},_default:function(e){var t=e.target;return Pe.test(t.type)&&t.click&&S(t,"input")&&ae.get(t,"click")||S(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},P.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},P.Event=function(e,t){if(!(this instanceof P.Event))return new P.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ne:$e,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&P.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[P.expando]=!0},P.Event.prototype={constructor:P.Event,isDefaultPrevented:$e,isPropagationStopped:$e,isImmediatePropagationStopped:$e,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ne,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ne,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ne,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},P.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},P.event.addProp),P.each({focus:"focusin",blur:"focusout"},(function(e,t){function n(e){if(b.documentMode){var n=ae.get(this,"handle"),i=P.event.fix(e);i.type="focusin"===e.type?"focus":"blur",i.isSimulated=!0,n(e),i.target===i.currentTarget&&n(i)}else P.event.simulate(t,e.target,P.event.fix(e))}P.event.special[e]={setup:function(){var i;if(Ie(this,e,!0),!b.documentMode)return!1;(i=ae.get(this,t))||this.addEventListener(t,n),ae.set(this,t,(i||0)+1)},trigger:function(){return Ie(this,e),!0},teardown:function(){var e;if(!b.documentMode)return!1;(e=ae.get(this,t)-1)?ae.set(this,t,e):(this.removeEventListener(t,n),ae.remove(this,t))},_default:function(t){return ae.get(t.target,e)},delegateType:t},P.event.special[t]={setup:function(){var i=this.ownerDocument||this.document||this,r=b.documentMode?this:i,o=ae.get(r,t);o||(b.documentMode?this.addEventListener(t,n):i.addEventListener(e,n,!0)),ae.set(r,t,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,r=b.documentMode?this:i,o=ae.get(r,t)-1;o?ae.set(r,t,o):(b.documentMode?this.removeEventListener(t,n):i.removeEventListener(e,n,!0),ae.remove(r,t))}}})),P.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){P.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=e.relatedTarget,r=e.handleObj;return i&&(i===this||P.contains(this,i))||(e.type=r.origType,n=r.handler.apply(this,arguments),e.type=t),n}}})),P.fn.extend({on:function(e,t,n,i){return je(this,e,t,n,i)},one:function(e,t,n,i){return je(this,e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,P(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=$e),this.each((function(){P.event.remove(this,e,n,t)}))}});var Le=/<script|<style|<link/i,Be=/checked\s*(?:[^=]|=\s*.checked.)/i,qe=/^\s*<!\[CDATA\[|\]\]>\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;n<i;n++)P.event.add(t,r,a[r][n]);le.hasData(e)&&(o=le.access(e),s=P.extend({},o),le.set(t,s))}}function Ue(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Pe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function We(e,t,n,i){t=l(t);var r,o,s,a,c,p,u=0,d=e.length,h=d-1,f=t[0],m=y(f);if(m||d>1&&"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;u<d;u++)c=r,u!==h&&(c=P.clone(c,!0,!0),a&&P.merge(s,Te(c,"script"))),n.call(e[u],c,u);if(a)for(p=s[s.length-1].ownerDocument,P.map(s,Ve),u=0;u<a;u++)c=s[u],Se.test(c.type||"")&&!ae.access(c,"globalEval")&&P.contains(p,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?P._evalUrl&&!c.noModule&&P._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},p):w(c.textContent.replace(qe,""),c,p))}return e}function Ge(e,t,n){for(var i,r=t?P.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||P.cleanData(Te(i)),i.parentNode&&(n&&ge(i)&&Ae(Te(i,"script")),i.parentNode.removeChild(i));return e}P.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var i,r,o,s,a=e.cloneNode(!0),l=ge(e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||P.isXMLDoc(e)))for(s=Te(a),i=0,r=(o=Te(e)).length;i<r;i++)Ue(o[i],s[i]);if(t)if(n)for(o=o||Te(e),s=s||Te(a),i=0,r=o.length;i<r;i++)He(o[i],s[i]);else He(e,a);return(s=Te(a,"script")).length>0&&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<i;n++)1===(t=this[n]||{}).nodeType&&(P.cleanData(Te(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return We(this,arguments,(function(t){var n=this.parentNode;P.inArray(this,e)<0&&(P.cleanData(Te(this)),n&&n.replaceChild(t,this))}),e)}}),P.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){P.fn[e]=function(e){for(var n,i=[],r=P(e),o=r.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),P(r[s])[t](n),c.apply(i,n.get());return this.pushStack(i)}}));var Qe=new RegExp("^("+de+")(?!px)[a-z%]+$","i"),Xe=/^--/,Ke=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=i),t.getComputedStyle(e)},Ye=function(e,t,n){var i,r,o={};for(r in t)o[r]=e.style[r],e.style[r]=t[r];for(r in i=n.call(e),t)e.style[r]=o[r];return i},Ze=new RegExp(fe.join("|"),"i");function Je(e,t,n){var i,r,o,s,a=Xe.test(t),l=e.style;return(n=n||Ke(e))&&(s=n.getPropertyValue(t)||n[t],a&&s&&(s=s.replace(D,"$1")||void 0),""!==s||ge(e)||(s=P.style(e,t)),!g.pixelBoxStyles()&&Qe.test(s)&&Ze.test(t)&&(i=l.width,r=l.minWidth,o=l.maxWidth,l.minWidth=l.maxWidth=l.width=s,s=n.width,l.width=i,l.minWidth=r,l.maxWidth=o)),void 0!==s?s+"":s}function et(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(p){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",p.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",me.appendChild(c).appendChild(p);var e=i.getComputedStyle(p);n="1%"!==e.top,l=12===t(e.marginLeft),p.style.right="60%",s=36===t(e.right),r=36===t(e.width),p.style.position="absolute",o=12===t(p.offsetWidth/3),me.removeChild(c),p=null}}function t(e){return Math.round(parseFloat(e))}var n,r,o,s,a,l,c=b.createElement("div"),p=b.createElement("div");p.style&&(p.style.backgroundClip="content-box",p.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===p.style.backgroundClip,P.extend(g,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),s},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),o},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=b.createElement("table"),t=b.createElement("tr"),n=b.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",me.appendChild(e).appendChild(t).appendChild(n),r=i.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,me.removeChild(e)),a}}))}();var tt=["Webkit","Moz","ms"],nt=b.createElement("div").style,it={};function rt(e){var t=P.cssProps[e]||it[e];return t||(e in nt?e:it[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=tt.length;n--;)if((e=tt[n]+t)in nt)return e}(e)||e)}var ot=/^(none|table(?!-c[ea]).+)/,st={position:"absolute",visibility:"hidden",display:"block"},at={letterSpacing:"0",fontWeight:"400"};function lt(e,t,n){var i=he.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function ct(e,t,n,i,r,o){var s="width"===t?1:0,a=0,l=0,c=0;if(n===(i?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(c+=P.css(e,n+fe[s],!0,r)),i?("content"===n&&(l-=P.css(e,"padding"+fe[s],!0,r)),"margin"!==n&&(l-=P.css(e,"border"+fe[s]+"Width",!0,r))):(l+=P.css(e,"padding"+fe[s],!0,r),"padding"!==n?l+=P.css(e,"border"+fe[s]+"Width",!0,r):a+=P.css(e,"border"+fe[s]+"Width",!0,r));return!i&&o>=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;s<r;s++)o[t[s]]=P.css(e,t[s],!1,i);return o}return void 0!==n?P.style(e,t,n):P.css(e,t)}),e,t,arguments.length>1)}}),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;o<s;o++)if(i=r[o].call(n,t,e))return i}function xt(e,t,n){var i,r,o=0,s=xt.prefilters.length,a=P.Deferred().always((function(){delete l.elem})),l=function(){if(r)return!1;for(var t=dt||yt(),n=Math.max(0,c.startTime+c.duration-t),i=1-(n/c.duration||0),o=0,s=c.tweens.length;o<s;o++)c.tweens[o].run(i);return a.notifyWith(e,[c,i,n]),i<1&&s?n:(s||a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:P.extend({},t),opts:P.extend(!0,{specialEasing:{},easing:P.easing._default},n),originalProperties:t,originalOptions:n,startTime:dt||yt(),duration:n.duration,tweens:[],createTween:function(t,n){var i=P.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)c.tweens[n].run(1);return t?(a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c,t])):a.rejectWith(e,[c,t]),this}}),p=c.props;for(!function(e,t){var n,i,r,o,s;for(n in e)if(r=t[i=re(n)],o=e[n],Array.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),(s=P.cssHooks[i])&&"expand"in s)for(n in o=s.expand(o),delete e[i],o)n in e||(e[n]=o[n],t[n]=r);else t[i]=r}(p,c.opts.specialEasing);o<s;o++)if(i=xt.prefilters[o].call(c,e,p,c.opts))return y(i.stop)&&(P._queueHooks(c.elem,c.opts.queue).stop=i.stop.bind(i)),i;return P.map(p,bt,c),y(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),P.fx.timer(P.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}P.Animation=P.extend(xt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return be(n.elem,e,he.exec(t),n),n}]},tweener:function(e,t){y(e)?(t=e,e=["*"]):e=e.match(G);for(var n,i=0,r=e.length;i<r;i++)n=e[i],xt.tweeners[n]=xt.tweeners[n]||[],xt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var i,r,o,s,a,l,c,p,u="width"in t||"height"in t,d=this,h={},f=e.style,m=e.nodeType&&ve(e),g=ae.get(e,"fxshow");for(i in n.queue||(null==(s=P._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always((function(){d.always((function(){s.unqueued--,P.queue(e,"fx").length||s.empty.fire()}))}))),t)if(r=t[i],ft.test(r)){if(delete t[i],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;m=!0}h[i]=g&&g[i]||P.style(e,i)}if((l=!P.isEmptyObject(t))||!P.isEmptyObject(h))for(i in u&&1===e.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=g&&g.display)&&(c=ae.get(e,"display")),"none"===(p=P.css(e,"display"))&&(c?p=c:(_e([e],!0),c=e.style.display||c,p=P.css(e,"display"),_e([e]))),("inline"===p||"inline-block"===p&&null!=c)&&"none"===P.css(e,"float")&&(l||(d.done((function(){f.display=c})),null==c&&(p=f.display,c="none"===p?"":p)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",d.always((function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}))),l=!1,h)l||(g?"hidden"in g&&(m=g.hidden):g=ae.access(e,"fxshow",{display:c}),o&&(g.hidden=!m),m&&_e([e],!0),d.done((function(){for(i in m||_e([e]),ae.remove(e,"fxshow"),h)P.style(e,i,h[i])}))),l=bt(m?g[i]:0,i,d),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?xt.prefilters.unshift(e):xt.prefilters.push(e)}}),P.speed=function(e,t,n){var i=e&&"object"==typeof e?P.extend({},e):{complete:n||!n&&t||y(e)&&e,duration:e,easing:n&&t||t&&!y(t)&&t};return P.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in P.fx.speeds?i.duration=P.fx.speeds[i.duration]:i.duration=P.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){y(i.old)&&i.old.call(this),i.queue&&P.dequeue(this,i.queue)},i},P.fn.extend({fadeTo:function(e,t,n,i){return this.filter(ve).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=P.isEmptyObject(e),o=P.speed(t,n,i),s=function(){var t=xt(this,P.extend({},e),o);(r||ae.get(this,"finish"))&&t.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,r=null!=e&&e+"queueHooks",o=P.timers,s=ae.get(this);if(r)s[r]&&s[r].stop&&i(s[r]);else for(r in s)s[r]&&s[r].stop&&mt.test(r)&&i(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));!t&&n||P.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=ae.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=P.timers,s=i?i.length:0;for(n.finish=!0,P.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish}))}}),P.each(["toggle","show","hide"],(function(e,t){var n=P.fn[t];P.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(vt(t,!0),e,i,r)}})),P.each({slideDown:vt("show"),slideUp:vt("hide"),slideToggle:vt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){P.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}})),P.timers=[],P.fx.tick=function(){var e,t=0,n=P.timers;for(dt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||P.fx.stop(),dt=void 0},P.fx.timer=function(e){P.timers.push(e),P.fx.start()},P.fx.interval=13,P.fx.start=function(){ht||(ht=!0,gt())},P.fx.stop=function(){ht=null},P.fx.speeds={slow:600,fast:200,_default:400},P.fn.delay=function(e,t){return e=P.fx&&P.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,n){var r=i.setTimeout(t,e);n.stop=function(){i.clearTimeout(r)}}))},function(){var e=b.createElement("input"),t=b.createElement("select").appendChild(b.createElement("option"));e.type="checkbox",g.checkOn=""!==e.value,g.optSelected=t.selected,(e=b.createElement("input")).value="t",e.type="radio",g.radioValue="t"===e.value}();var wt,_t=P.expr.attrHandle;P.fn.extend({attr:function(e,t){return ee(this,P.attr,e,t,arguments.length>1)},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<t.length;o++)r=t[o],n.indexOf(" "+r+" ")<0&&(n+=r+" ");s=Pt(n),i!==s&&this.setAttribute("class",s)}})):this},removeClass:function(e){var t,n,i,r,o,s;return y(e)?this.each((function(t){P(this).removeClass(e.call(this,t,kt(this)))})):arguments.length?(t=St(e)).length?this.each((function(){if(i=kt(this),n=1===this.nodeType&&" "+Pt(i)+" "){for(o=0;o<t.length;o++)for(r=t[o];n.indexOf(" "+r+" ")>-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<n.length;r++)i=n[r],o.hasClass(i)?o.removeClass(i):o.addClass(i);else void 0!==e&&"boolean"!==s||((i=kt(this))&&ae.set(this,"__className__",i),this.setAttribute&&this.setAttribute("class",i||!1===e?"":ae.get(this,"__className__")||""))})))},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+Pt(kt(n))+" ").indexOf(t)>-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<l;i++)if(((n=r[i]).selected||i===o)&&!n.disabled&&(!n.parentNode.disabled||!S(n.parentNode,"optgroup"))){if(t=P(n).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=P.makeArray(t),s=r.length;s--;)((i=r[s]).selected=P.inArray(P.valHooks.option.get(i),o)>-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("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),b.head.appendChild(t[0])},abort:function(){n&&n()}}}));var en,tn=[],nn=/(=)\?(?=&|$)|\?\?/;P.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=tn.pop()||P.expando+"_"+At.guid++;return this[e]=!0,e}}),P.ajaxPrefilter("json jsonp",(function(e,t,n){var r,o,s,a=!1!==e.jsonp&&(nn.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&nn.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=y(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(nn,"$1"+r):!1!==e.jsonp&&(e.url+=(Mt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||P.error(r+" was not called"),s[0]},e.dataTypes[0]="json",o=i[r],i[r]=function(){s=arguments},n.always((function(){void 0===o?P(i).removeProp(r):i[r]=o,e[r]&&(e.jsonpCallback=t.jsonpCallback,tn.push(r)),s&&y(o)&&o(s[0]),s=o=void 0})),"script"})),g.createHTMLDocument=((en=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===en.childNodes.length),P.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(g.createHTMLDocument?((i=(t=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,t.head.appendChild(i)):t=b),o=!n&&[],(r=q.exec(e))?[t.createElement(r[1])]:(r=De([e],t,o),o&&o.length&&P(o).remove(),P.merge([],r.childNodes)));var i,r,o},P.fn.load=function(e,t,n){var i,r,o,s=this,a=e.indexOf(" ");return a>-1&&(i=Pt(e.slice(a)),e=e.slice(0,a)),y(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),s.length>0&&P.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done((function(e){o=arguments,s.html(i?P("<div>").append(P.parseHTML(e)).find(i):e)})).always(n&&function(e,t){s.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},P.expr.pseudos.animated=function(e){return P.grep(P.timers,(function(t){return e===t.elem})).length},P.offset={setOffset:function(e,t,n){var i,r,o,s,a,l,c=P.css(e,"position"),p=P(e),u={};"static"===c&&(e.style.position="relative"),a=p.offset(),o=P.css(e,"top"),l=P.css(e,"left"),("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1?(s=(i=p.position()).top,r=i.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),y(t)&&(t=t.call(e,n,P.extend({},a))),null!=t.top&&(u.top=t.top-a.top+s),null!=t.left&&(u.left=t.left-a.left+r),"using"in t?t.using.call(e,u):p.css(u)}},P.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){P.offset.setOffset(this,e,t)}));var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],r={top:0,left:0};if("fixed"===P.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===P.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((r=P(e).offset()).top+=P.css(e,"borderTopWidth",!0),r.left+=P.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-P.css(i,"marginTop",!0),left:t.left-r.left-P.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===P.css(e,"position");)e=e.offsetParent;return e||me}))}}),P.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;P.fn[e]=function(i){return ee(this,(function(e,i,r){var o;if(v(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===r)return o?o[t]:e[i];o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):e[i]=r}),e,i,arguments.length)}})),P.each(["top","left"],(function(e,t){P.cssHooks[t]=et(g.pixelPosition,(function(e,n){if(n)return n=Je(e,t),Qe.test(n)?P(e).position()[t]+"px":n}))})),P.each({Height:"height",Width:"width"},(function(e,t){P.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,i){P.fn[i]=function(r,o){var s=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===o?"margin":"border");return ee(this,(function(t,n,r){var o;return v(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?P.css(t,n,a):P.style(t,n,r,a)}),t,s?r:void 0,s)}}))})),P.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){P.fn[t]=function(e){return this.on(t,e)}})),P.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),P.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){P.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var rn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;P.proxy=function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),y(e))return i=a.call(arguments,2),r=function(){return e.apply(t||this,i.concat(a.call(arguments)))},r.guid=e.guid=e.guid||P.guid++,r},P.holdReady=function(e){e?P.readyWait++:P.ready(!0)},P.isArray=Array.isArray,P.parseJSON=JSON.parse,P.nodeName=S,P.isFunction=y,P.isWindow=v,P.camelCase=re,P.type=_,P.now=Date.now,P.isNumeric=function(e){var t=P.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},P.trim=function(e){return null==e?"":(e+"").replace(rn,"$1")},void 0===(n=function(){return P}.apply(t,[]))||(e.exports=n);var on=i.jQuery,sn=i.$;return P.noConflict=function(e){return i.$===P&&(i.$=sn),e&&i.jQuery===P&&(i.jQuery=on),P},void 0===r&&(i.jQuery=i.$=P),P}))},543:function(e,t,n){var i;e=n.nmd(e),function(){var r,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",l=16,c=32,p=64,u=128,d=256,h=1/0,f=9007199254740991,m=NaN,g=4294967295,y=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",c],["partialRight",p],["rearg",d]],v="[object Arguments]",b="[object Array]",x="[object Boolean]",w="[object Date]",_="[object Error]",E="[object Function]",O="[object GeneratorFunction]",P="[object Map]",k="[object Number]",S="[object Object]",C="[object Promise]",T="[object RegExp]",A="[object Set]",M="[object String]",D="[object Symbol]",R="[object WeakMap]",N="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",I="[object Float64Array]",L="[object Int8Array]",B="[object Int16Array]",q="[object Int32Array]",z="[object Uint8Array]",F="[object Uint8ClampedArray]",V="[object Uint16Array]",H="[object Uint32Array]",U=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Q=/&(?:amp|lt|gt|quot|#39);/g,X=/[&<>"']/g,K=RegExp(Q.source),Y=RegExp(X.source),Z=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,ie=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(re.source),se=/^\s+/,ae=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,pe=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ye=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,xe=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,Ee=/['\n\r\u2028\u2029\\]/g,Oe="\\ud800-\\udfff",Pe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ke="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Me="[']",De="["+Oe+"]",Re="["+Ae+"]",Ne="["+Pe+"]",$e="\\d+",je="["+ke+"]",Ie="["+Se+"]",Le="[^"+Oe+Ae+$e+ke+Se+Ce+"]",Be="\\ud83c[\\udffb-\\udfff]",qe="[^"+Oe+"]",ze="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",Ve="["+Ce+"]",He="\\u200d",Ue="(?:"+Ie+"|"+Le+")",We="(?:"+Ve+"|"+Le+")",Ge="(?:['](?:d|ll|m|re|s|t|ve))?",Qe="(?:['](?:D|LL|M|RE|S|T|VE))?",Xe="(?:"+Ne+"|"+Be+")"+"?",Ke="["+Te+"]?",Ye=Ke+Xe+("(?:"+He+"(?:"+[qe,ze,Fe].join("|")+")"+Ke+Xe+")*"),Ze="(?:"+[je,ze,Fe].join("|")+")"+Ye,Je="(?:"+[qe+Ne+"?",Ne,ze,Fe,De].join("|")+")",et=RegExp(Me,"g"),tt=RegExp(Ne,"g"),nt=RegExp(Be+"(?="+Be+")|"+Je+Ye,"g"),it=RegExp([Ve+"?"+Ie+"+"+Ge+"(?="+[Re,Ve,"$"].join("|")+")",We+"+"+Qe+"(?="+[Re,Ve+Ue,"$"].join("|")+")",Ve+"?"+Ue+"+"+Ge,Ve+"+"+Qe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$e,Ze].join("|"),"g"),rt=RegExp("["+He+Oe+Pe+Te+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,st=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,lt={};lt[j]=lt[I]=lt[L]=lt[B]=lt[q]=lt[z]=lt[F]=lt[V]=lt[H]=!0,lt[v]=lt[b]=lt[N]=lt[x]=lt[$]=lt[w]=lt[_]=lt[E]=lt[P]=lt[k]=lt[S]=lt[T]=lt[A]=lt[M]=lt[R]=!1;var ct={};ct[v]=ct[b]=ct[N]=ct[$]=ct[x]=ct[w]=ct[j]=ct[I]=ct[L]=ct[B]=ct[q]=ct[P]=ct[k]=ct[S]=ct[T]=ct[A]=ct[M]=ct[D]=ct[z]=ct[F]=ct[V]=ct[H]=!0,ct[_]=ct[E]=ct[R]=!1;var pt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,dt=parseInt,ht="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ft="object"==typeof self&&self&&self.Object===Object&&self,mt=ht||ft||Function("return this")(),gt=t&&!t.nodeType&&t,yt=gt&&e&&!e.nodeType&&e,vt=yt&&yt.exports===gt,bt=vt&&ht.process,xt=function(){try{var e=yt&&yt.require&&yt.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(e){}}(),wt=xt&&xt.isArrayBuffer,_t=xt&&xt.isDate,Et=xt&&xt.isMap,Ot=xt&&xt.isRegExp,Pt=xt&&xt.isSet,kt=xt&&xt.isTypedArray;function St(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ct(e,t,n,i){for(var r=-1,o=null==e?0:e.length;++r<o;){var s=e[r];t(i,s,n(s),e)}return i}function Tt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Mt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function Dt(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n<i;){var s=e[n];t(s,n,e)&&(o[r++]=s)}return o}function Rt(e,t){return!!(null==e?0:e.length)&&Vt(e,t,0)>-1}function Nt(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}function $t(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}function jt(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}function It(e,t,n,i){var r=-1,o=null==e?0:e.length;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function Lt(e,t,n,i){var r=null==e?0:e.length;for(i&&r&&(n=e[--r]);r--;)n=t(n,e[r],r,e);return n}function Bt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var qt=Gt("length");function zt(e,t,n){var i;return n(e,(function(e,n,r){if(t(e,n,r))return i=n,!1})),i}function Ft(e,t,n,i){for(var r=e.length,o=n+(i?1:-1);i?o--:++o<r;)if(t(e[o],o,e))return o;return-1}function Vt(e,t,n){return t==t?function(e,t,n){var i=n-1,r=e.length;for(;++i<r;)if(e[i]===t)return i;return-1}(e,t,n):Ft(e,Ut,n)}function Ht(e,t,n,i){for(var r=n-1,o=e.length;++r<o;)if(i(e[r],t))return r;return-1}function Ut(e){return e!=e}function Wt(e,t){var n=null==e?0:e.length;return n?Kt(e,t)/n:m}function Gt(e){return function(t){return null==t?r:t[e]}}function Qt(e){return function(t){return null==e?r:e[t]}}function Xt(e,t,n,i,r){return r(e,(function(e,r,o){n=i?(i=!1,e):t(n,e,r,o)})),n}function Kt(e,t){for(var n,i=-1,o=e.length;++i<o;){var s=t(e[i]);s!==r&&(n=n===r?s:n+s)}return n}function Yt(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function Zt(e){return e?e.slice(0,gn(e)+1).replace(se,""):e}function Jt(e){return function(t){return e(t)}}function en(e,t){return $t(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,i=e.length;++n<i&&Vt(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&Vt(t,e[n],0)>-1;);return n}var on=Qt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),sn=Qt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function an(e){return"\\"+pt[e]}function ln(e){return rt.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function pn(e,t){return function(n){return e(t(n))}}function un(e,t){for(var n=-1,i=e.length,r=0,o=[];++n<i;){var s=e[n];s!==t&&s!==a||(e[n]=a,o[r++]=n)}return o}function dn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function fn(e){return ln(e)?function(e){var t=nt.lastIndex=0;for(;nt.test(e);)++t;return t}(e):qt(e)}function mn(e){return ln(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function gn(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var yn=Qt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var vn=function e(t){var n,i=(t=null==t?mt:vn.defaults(mt.Object(),t,vn.pick(mt,st))).Array,ae=t.Date,Oe=t.Error,Pe=t.Function,ke=t.Math,Se=t.Object,Ce=t.RegExp,Te=t.String,Ae=t.TypeError,Me=i.prototype,De=Pe.prototype,Re=Se.prototype,Ne=t["__core-js_shared__"],$e=De.toString,je=Re.hasOwnProperty,Ie=0,Le=(n=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Be=Re.toString,qe=$e.call(Se),ze=mt._,Fe=Ce("^"+$e.call(je).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=vt?t.Buffer:r,He=t.Symbol,Ue=t.Uint8Array,We=Ve?Ve.allocUnsafe:r,Ge=pn(Se.getPrototypeOf,Se),Qe=Se.create,Xe=Re.propertyIsEnumerable,Ke=Me.splice,Ye=He?He.isConcatSpreadable:r,Ze=He?He.iterator:r,Je=He?He.toStringTag:r,nt=function(){try{var e=ho(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),rt=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,pt=ae&&ae.now!==mt.Date.now&&ae.now,ht=t.setTimeout!==mt.setTimeout&&t.setTimeout,ft=ke.ceil,gt=ke.floor,yt=Se.getOwnPropertySymbols,bt=Ve?Ve.isBuffer:r,xt=t.isFinite,qt=Me.join,Qt=pn(Se.keys,Se),bn=ke.max,xn=ke.min,wn=ae.now,_n=t.parseInt,En=ke.random,On=Me.reverse,Pn=ho(t,"DataView"),kn=ho(t,"Map"),Sn=ho(t,"Promise"),Cn=ho(t,"Set"),Tn=ho(t,"WeakMap"),An=ho(Se,"create"),Mn=Tn&&new Tn,Dn={},Rn=Bo(Pn),Nn=Bo(kn),$n=Bo(Sn),jn=Bo(Cn),In=Bo(Tn),Ln=He?He.prototype:r,Bn=Ln?Ln.valueOf:r,qn=Ln?Ln.toString:r;function zn(e){if(na(e)&&!Us(e)&&!(e instanceof Un)){if(e instanceof Hn)return e;if(je.call(e,"__wrapped__"))return qo(e)}return new Hn(e)}var Fn=function(){function e(){}return function(t){if(!ta(t))return{};if(Qe)return Qe(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function Vn(){}function Hn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Xn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Qn;++t<n;)this.add(e[t])}function Kn(e){var t=this.__data__=new Gn(e);this.size=t.size}function Yn(e,t){var n=Us(e),i=!n&&Hs(e),r=!n&&!i&&Xs(e),o=!n&&!i&&!r&&pa(e),s=n||i||r||o,a=s?Yt(e.length,Te):[],l=a.length;for(var c in e)!t&&!je.call(e,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||xo(c,l))||a.push(c);return a}function Zn(e){var t=e.length;return t?e[Xi(0,t-1)]:r}function Jn(e,t){return jo(Ar(e),li(t,0,e.length))}function ei(e){return jo(Ar(e))}function ti(e,t,n){(n!==r&&!zs(e[t],n)||n===r&&!(t in e))&&si(e,t,n)}function ni(e,t,n){var i=e[t];je.call(e,t)&&zs(i,n)&&(n!==r||t in e)||si(e,t,n)}function ii(e,t){for(var n=e.length;n--;)if(zs(e[n][0],t))return n;return-1}function ri(e,t,n,i){return hi(e,(function(e,r,o){t(i,e,n(e),o)})),i}function oi(e,t){return e&&Mr(t,Da(t),e)}function si(e,t,n){"__proto__"==t&&nt?nt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ai(e,t){for(var n=-1,o=t.length,s=i(o),a=null==e;++n<o;)s[n]=a?r:Sa(e,t[n]);return s}function li(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function ci(e,t,n,i,o,s){var a,l=1&t,c=2&t,p=4&t;if(n&&(a=o?n(e,i,o,s):n(e)),a!==r)return a;if(!ta(e))return e;var u=Us(e);if(u){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&je.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return Ar(e,a)}else{var d=go(e),h=d==E||d==O;if(Xs(e))return Or(e,l);if(d==S||d==v||h&&!o){if(a=c||h?{}:vo(e),!l)return c?function(e,t){return Mr(e,mo(e),t)}(e,function(e,t){return e&&Mr(t,Ra(t),e)}(a,e)):function(e,t){return Mr(e,fo(e),t)}(e,oi(a,e))}else{if(!ct[d])return o?e:{};a=function(e,t,n){var i=e.constructor;switch(t){case N:return Pr(e);case x:case w:return new i(+e);case $:return function(e,t){var n=t?Pr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case j:case I:case L:case B:case q:case z:case F:case V:case H:return kr(e,n);case P:return new i;case k:case M:return new i(e);case T:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new i;case D:return r=e,Bn?Se(Bn.call(r)):{}}var r}(e,d,l)}}s||(s=new Kn);var f=s.get(e);if(f)return f;s.set(e,a),aa(e)?e.forEach((function(i){a.add(ci(i,t,n,i,e,s))})):ia(e)&&e.forEach((function(i,r){a.set(r,ci(i,t,n,r,e,s))}));var m=u?r:(p?c?oo:ro:c?Ra:Da)(e);return Tt(m||e,(function(i,r){m&&(i=e[r=i]),ni(a,r,ci(i,t,n,r,e,s))})),a}function pi(e,t,n){var i=n.length;if(null==e)return!i;for(e=Se(e);i--;){var o=n[i],s=t[o],a=e[o];if(a===r&&!(o in e)||!s(a))return!1}return!0}function ui(e,t,n){if("function"!=typeof e)throw new Ae(o);return Do((function(){e.apply(r,n)}),t)}function di(e,t,n,i){var r=-1,o=Rt,s=!0,a=e.length,l=[],c=t.length;if(!a)return l;n&&(t=$t(t,Jt(n))),i?(o=Nt,s=!1):t.length>=200&&(o=tn,s=!1,t=new Xn(t));e:for(;++r<a;){var p=e[r],u=null==n?p:n(p);if(p=i||0!==p?p:0,s&&u==u){for(var d=c;d--;)if(t[d]===u)continue e;l.push(p)}else o(t,u,i)||l.push(p)}return l}zn.templateSettings={escape:Z,evaluate:J,interpolate:ee,variable:"",imports:{_:zn}},zn.prototype=Vn.prototype,zn.prototype.constructor=zn,Hn.prototype=Fn(Vn.prototype),Hn.prototype.constructor=Hn,Un.prototype=Fn(Vn.prototype),Un.prototype.constructor=Un,Wn.prototype.clear=function(){this.__data__=An?An(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(An){var n=t[e];return n===s?r:n}return je.call(t,e)?t[e]:r},Wn.prototype.has=function(e){var t=this.__data__;return An?t[e]!==r:je.call(t,e)},Wn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=An&&t===r?s:t,this},Gn.prototype.clear=function(){this.__data__=[],this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=ii(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ke.call(t,n,1),--this.size,!0)},Gn.prototype.get=function(e){var t=this.__data__,n=ii(t,e);return n<0?r:t[n][1]},Gn.prototype.has=function(e){return ii(this.__data__,e)>-1},Gn.prototype.set=function(e,t){var n=this.__data__,i=ii(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},Qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(kn||Gn),string:new Wn}},Qn.prototype.delete=function(e){var t=po(this,e).delete(e);return this.size-=t?1:0,t},Qn.prototype.get=function(e){return po(this,e).get(e)},Qn.prototype.has=function(e){return po(this,e).has(e)},Qn.prototype.set=function(e,t){var n=po(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},Xn.prototype.add=Xn.prototype.push=function(e){return this.__data__.set(e,s),this},Xn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.clear=function(){this.__data__=new Gn,this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Kn.prototype.get=function(e){return this.__data__.get(e)},Kn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Gn){var i=n.__data__;if(!kn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Qn(i)}return n.set(e,t),this.size=n.size,this};var hi=Nr(wi),fi=Nr(_i,!0);function mi(e,t){var n=!0;return hi(e,(function(e,i,r){return n=!!t(e,i,r)})),n}function gi(e,t,n){for(var i=-1,o=e.length;++i<o;){var s=e[i],a=t(s);if(null!=a&&(l===r?a==a&&!ca(a):n(a,l)))var l=a,c=s}return c}function yi(e,t){var n=[];return hi(e,(function(e,i,r){t(e,i,r)&&n.push(e)})),n}function vi(e,t,n,i,r){var o=-1,s=e.length;for(n||(n=bo),r||(r=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?vi(a,t-1,n,i,r):jt(r,a):i||(r[r.length]=a)}return r}var bi=$r(),xi=$r(!0);function wi(e,t){return e&&bi(e,t,Da)}function _i(e,t){return e&&xi(e,t,Da)}function Ei(e,t){return Dt(t,(function(t){return Zs(e[t])}))}function Oi(e,t){for(var n=0,i=(t=xr(t,e)).length;null!=e&&n<i;)e=e[Lo(t[n++])];return n&&n==i?e:r}function Pi(e,t,n){var i=t(e);return Us(e)?i:jt(i,n(e))}function ki(e){return null==e?e===r?"[object Undefined]":"[object Null]":Je&&Je in Se(e)?function(e){var t=je.call(e,Je),n=e[Je];try{e[Je]=r;var i=!0}catch(e){}var o=Be.call(e);i&&(t?e[Je]=n:delete e[Je]);return o}(e):function(e){return Be.call(e)}(e)}function Si(e,t){return e>t}function Ci(e,t){return null!=e&&je.call(e,t)}function Ti(e,t){return null!=e&&t in Se(e)}function Ai(e,t,n){for(var o=n?Nt:Rt,s=e[0].length,a=e.length,l=a,c=i(a),p=1/0,u=[];l--;){var d=e[l];l&&t&&(d=$t(d,Jt(t))),p=xn(d.length,p),c[l]=!n&&(t||s>=120&&d.length>=120)?new Xn(l&&d):r}d=e[0];var h=-1,f=c[0];e:for(;++h<s&&u.length<p;){var m=d[h],g=t?t(m):m;if(m=n||0!==m?m:0,!(f?tn(f,g):o(u,g,n))){for(l=a;--l;){var y=c[l];if(!(y?tn(y,g):o(e[l],g,n)))continue e}f&&f.push(g),u.push(m)}}return u}function Mi(e,t,n){var i=null==(e=To(e,t=xr(t,e)))?e:e[Lo(Yo(t))];return null==i?r:St(i,e,n)}function Di(e){return na(e)&&ki(e)==v}function Ri(e,t,n,i,o){return e===t||(null==e||null==t||!na(e)&&!na(t)?e!=e&&t!=t:function(e,t,n,i,o,s){var a=Us(e),l=Us(t),c=a?b:go(e),p=l?b:go(t),u=(c=c==v?S:c)==S,d=(p=p==v?S:p)==S,h=c==p;if(h&&Xs(e)){if(!Xs(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new Kn),a||pa(e)?no(e,t,n,i,o,s):function(e,t,n,i,r,o,s){switch(n){case $:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case x:case w:case k:return zs(+e,+t);case _:return e.name==t.name&&e.message==t.message;case T:case M:return e==t+"";case P:var a=cn;case A:var l=1&i;if(a||(a=dn),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;i|=2,s.set(e,t);var p=no(a(e),a(t),i,r,o,s);return s.delete(e),p;case D:if(Bn)return Bn.call(e)==Bn.call(t)}return!1}(e,t,c,n,i,o,s);if(!(1&n)){var f=u&&je.call(e,"__wrapped__"),m=d&&je.call(t,"__wrapped__");if(f||m){var g=f?e.value():e,y=m?t.value():t;return s||(s=new Kn),o(g,y,n,i,s)}}if(!h)return!1;return s||(s=new Kn),function(e,t,n,i,o,s){var a=1&n,l=ro(e),c=l.length,p=ro(t),u=p.length;if(c!=u&&!a)return!1;var d=c;for(;d--;){var h=l[d];if(!(a?h in t:je.call(t,h)))return!1}var f=s.get(e),m=s.get(t);if(f&&m)return f==t&&m==e;var g=!0;s.set(e,t),s.set(t,e);var y=a;for(;++d<c;){var v=e[h=l[d]],b=t[h];if(i)var x=a?i(b,v,h,t,e,s):i(v,b,h,e,t,s);if(!(x===r?v===b||o(v,b,n,i,s):x)){g=!1;break}y||(y="constructor"==h)}if(g&&!y){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(g=!1)}return s.delete(e),s.delete(t),g}(e,t,n,i,o,s)}(e,t,n,i,Ri,o))}function Ni(e,t,n,i){var o=n.length,s=o,a=!i;if(null==e)return!s;for(e=Se(e);o--;){var l=n[o];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<s;){var c=(l=n[o])[0],p=e[c],u=l[1];if(a&&l[2]){if(p===r&&!(c in e))return!1}else{var d=new Kn;if(i)var h=i(p,u,c,e,t,d);if(!(h===r?Ri(u,p,3,i,d):h))return!1}}return!0}function $i(e){return!(!ta(e)||(t=e,Le&&Le in t))&&(Zs(e)?Fe:ve).test(Bo(e));var t}function ji(e){return"function"==typeof e?e:null==e?rl:"object"==typeof e?Us(e)?Fi(e[0],e[1]):zi(e):hl(e)}function Ii(e){if(!Po(e))return Qt(e);var t=[];for(var n in Se(e))je.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Li(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Se(e))t.push(n);return t}(e);var t=Po(e),n=[];for(var i in e)("constructor"!=i||!t&&je.call(e,i))&&n.push(i);return n}function Bi(e,t){return e<t}function qi(e,t){var n=-1,r=Gs(e)?i(e.length):[];return hi(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function zi(e){var t=uo(e);return 1==t.length&&t[0][2]?So(t[0][0],t[0][1]):function(n){return n===e||Ni(n,e,t)}}function Fi(e,t){return _o(e)&&ko(t)?So(Lo(e),t):function(n){var i=Sa(n,e);return i===r&&i===t?Ca(n,e):Ri(t,i,3)}}function Vi(e,t,n,i,o){e!==t&&bi(t,(function(s,a){if(o||(o=new Kn),ta(s))!function(e,t,n,i,o,s,a){var l=Ao(e,n),c=Ao(t,n),p=a.get(c);if(p)return void ti(e,n,p);var u=s?s(l,c,n+"",e,t,a):r,d=u===r;if(d){var h=Us(c),f=!h&&Xs(c),m=!h&&!f&&pa(c);u=c,h||f||m?Us(l)?u=l:Qs(l)?u=Ar(l):f?(d=!1,u=Or(c,!0)):m?(d=!1,u=kr(c,!0)):u=[]:oa(c)||Hs(c)?(u=l,Hs(l)?u=va(l):ta(l)&&!Zs(l)||(u=vo(c))):d=!1}d&&(a.set(c,u),o(u,c,i,s,a),a.delete(c));ti(e,n,u)}(e,t,a,n,Vi,i,o);else{var l=i?i(Ao(e,a),s,a+"",e,t,o):r;l===r&&(l=s),ti(e,a,l)}}),Ra)}function Hi(e,t){var n=e.length;if(n)return xo(t+=t<0?n:0,n)?e[t]:r}function Ui(e,t,n){t=t.length?$t(t,(function(e){return Us(e)?function(t){return Oi(t,1===e.length?e[0]:e)}:e})):[rl];var i=-1;t=$t(t,Jt(co()));var r=qi(e,(function(e,n,r){var o=$t(t,(function(t){return t(e)}));return{criteria:o,index:++i,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(r,(function(e,t){return function(e,t,n){var i=-1,r=e.criteria,o=t.criteria,s=r.length,a=n.length;for(;++i<s;){var l=Sr(r[i],o[i]);if(l)return i>=a?l:l*("desc"==n[i]?-1:1)}return e.index-t.index}(e,t,n)}))}function Wi(e,t,n){for(var i=-1,r=t.length,o={};++i<r;){var s=t[i],a=Oi(e,s);n(a,s)&&er(o,xr(s,e),a)}return o}function Gi(e,t,n,i){var r=i?Ht:Vt,o=-1,s=t.length,a=e;for(e===t&&(t=Ar(t)),n&&(a=$t(e,Jt(n)));++o<s;)for(var l=0,c=t[o],p=n?n(c):c;(l=r(a,p,l,i))>-1;)a!==e&&Ke.call(a,l,1),Ke.call(e,l,1);return e}function Qi(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(n==i||r!==o){var o=r;xo(r)?Ke.call(e,r,1):dr(e,r)}}return e}function Xi(e,t){return e+gt(En()*(t-e+1))}function Ki(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Yi(e,t){return Ro(Co(e,t,rl),e+"")}function Zi(e){return Zn(za(e))}function Ji(e,t){var n=za(e);return jo(n,li(t,0,n.length))}function er(e,t,n,i){if(!ta(e))return e;for(var o=-1,s=(t=xr(t,e)).length,a=s-1,l=e;null!=l&&++o<s;){var c=Lo(t[o]),p=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var u=l[c];(p=i?i(u,c,l):r)===r&&(p=ta(u)?u:xo(t[o+1])?[]:{})}ni(l,c,p),l=l[c]}return e}var tr=Mn?function(e,t){return Mn.set(e,t),e}:rl,nr=nt?function(e,t){return nt(e,"toString",{configurable:!0,enumerable:!1,value:tl(t),writable:!0})}:rl;function ir(e){return jo(za(e))}function rr(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=i(o);++r<o;)s[r]=e[r+t];return s}function or(e,t){var n;return hi(e,(function(e,i,r){return!(n=t(e,i,r))})),!!n}function sr(e,t,n){var i=0,r=null==e?i:e.length;if("number"==typeof t&&t==t&&r<=2147483647){for(;i<r;){var o=i+r>>>1,s=e[o];null!==s&&!ca(s)&&(n?s<=t:s<t)?i=o+1:r=o}return r}return ar(e,t,rl,n)}function ar(e,t,n,i){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=n(t))!=t,l=null===t,c=ca(t),p=t===r;o<s;){var u=gt((o+s)/2),d=n(e[u]),h=d!==r,f=null===d,m=d==d,g=ca(d);if(a)var y=i||m;else y=p?m&&(i||h):l?m&&h&&(i||!f):c?m&&h&&!f&&(i||!g):!f&&!g&&(i?d<=t:d<t);y?o=u+1:s=u}return xn(s,4294967294)}function lr(e,t){for(var n=-1,i=e.length,r=0,o=[];++n<i;){var s=e[n],a=t?t(s):s;if(!n||!zs(a,l)){var l=a;o[r++]=0===s?0:s}}return o}function cr(e){return"number"==typeof e?e:ca(e)?m:+e}function pr(e){if("string"==typeof e)return e;if(Us(e))return $t(e,pr)+"";if(ca(e))return qn?qn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ur(e,t,n){var i=-1,r=Rt,o=e.length,s=!0,a=[],l=a;if(n)s=!1,r=Nt;else if(o>=200){var c=t?null:Kr(e);if(c)return dn(c);s=!1,r=tn,l=new Xn}else l=t?[]:a;e:for(;++i<o;){var p=e[i],u=t?t(p):p;if(p=n||0!==p?p:0,s&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue e;t&&l.push(u),a.push(p)}else r(l,u,n)||(l!==a&&l.push(u),a.push(p))}return a}function dr(e,t){return null==(e=To(e,t=xr(t,e)))||delete e[Lo(Yo(t))]}function hr(e,t,n,i){return er(e,t,n(Oi(e,t)),i)}function fr(e,t,n,i){for(var r=e.length,o=i?r:-1;(i?o--:++o<r)&&t(e[o],o,e););return n?rr(e,i?0:o,i?o+1:r):rr(e,i?o+1:0,i?r:o)}function mr(e,t){var n=e;return n instanceof Un&&(n=n.value()),It(t,(function(e,t){return t.func.apply(t.thisArg,jt([e],t.args))}),n)}function gr(e,t,n){var r=e.length;if(r<2)return r?ur(e[0]):[];for(var o=-1,s=i(r);++o<r;)for(var a=e[o],l=-1;++l<r;)l!=o&&(s[o]=di(s[o]||a,e[l],t,n));return ur(vi(s,1),t,n)}function yr(e,t,n){for(var i=-1,o=e.length,s=t.length,a={};++i<o;){var l=i<s?t[i]:r;n(a,e[i],l)}return a}function vr(e){return Qs(e)?e:[]}function br(e){return"function"==typeof e?e:rl}function xr(e,t){return Us(e)?e:_o(e,t)?[e]:Io(ba(e))}var wr=Yi;function _r(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:rr(e,t,n)}var Er=rt||function(e){return mt.clearTimeout(e)};function Or(e,t){if(t)return e.slice();var n=e.length,i=We?We(n):new e.constructor(n);return e.copy(i),i}function Pr(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function kr(e,t){var n=t?Pr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Sr(e,t){if(e!==t){var n=e!==r,i=null===e,o=e==e,s=ca(e),a=t!==r,l=null===t,c=t==t,p=ca(t);if(!l&&!p&&!s&&e>t||s&&a&&c&&!l&&!p||i&&a&&c||!n&&c||!o)return 1;if(!i&&!s&&!p&&e<t||p&&n&&o&&!i&&!s||l&&n&&o||!a&&o||!c)return-1}return 0}function Cr(e,t,n,r){for(var o=-1,s=e.length,a=n.length,l=-1,c=t.length,p=bn(s-a,0),u=i(c+p),d=!r;++l<c;)u[l]=t[l];for(;++o<a;)(d||o<s)&&(u[n[o]]=e[o]);for(;p--;)u[l++]=e[o++];return u}function Tr(e,t,n,r){for(var o=-1,s=e.length,a=-1,l=n.length,c=-1,p=t.length,u=bn(s-l,0),d=i(u+p),h=!r;++o<u;)d[o]=e[o];for(var f=o;++c<p;)d[f+c]=t[c];for(;++a<l;)(h||o<s)&&(d[f+n[a]]=e[o++]);return d}function Ar(e,t){var n=-1,r=e.length;for(t||(t=i(r));++n<r;)t[n]=e[n];return t}function Mr(e,t,n,i){var o=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var l=t[s],c=i?i(n[l],e[l],l,n,e):r;c===r&&(c=e[l]),o?si(n,l,c):ni(n,l,c)}return n}function Dr(e,t){return function(n,i){var r=Us(n)?Ct:ri,o=t?t():{};return r(n,e,co(i,2),o)}}function Rr(e){return Yi((function(t,n){var i=-1,o=n.length,s=o>1?n[o-1]:r,a=o>2?n[2]:r;for(s=e.length>3&&"function"==typeof s?(o--,s):r,a&&wo(n[0],n[1],a)&&(s=o<3?r:s,o=1),t=Se(t);++i<o;){var l=n[i];l&&e(t,l,i,s)}return t}))}function Nr(e,t){return function(n,i){if(null==n)return n;if(!Gs(n))return e(n,i);for(var r=n.length,o=t?r:-1,s=Se(n);(t?o--:++o<r)&&!1!==i(s[o],o,s););return n}}function $r(e){return function(t,n,i){for(var r=-1,o=Se(t),s=i(t),a=s.length;a--;){var l=s[e?a:++r];if(!1===n(o[l],l,o))break}return t}}function jr(e){return function(t){var n=ln(t=ba(t))?mn(t):r,i=n?n[0]:t.charAt(0),o=n?_r(n,1).join(""):t.slice(1);return i[e]()+o}}function Ir(e){return function(t){return It(Za(Ha(t).replace(et,"")),e,"")}}function Lr(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),i=e.apply(n,t);return ta(i)?i:n}}function Br(e){return function(t,n,i){var o=Se(t);if(!Gs(t)){var s=co(n,3);t=Da(t),n=function(e){return s(o[e],e,o)}}var a=e(t,n,i);return a>-1?o[s?t[a]:a]:r}}function qr(e){return io((function(t){var n=t.length,i=n,s=Hn.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new Ae(o);if(s&&!l&&"wrapper"==ao(a))var l=new Hn([],!0)}for(i=l?i:n;++i<n;){var c=ao(a=t[i]),p="wrapper"==c?so(a):r;l=p&&Eo(p[0])&&424==p[1]&&!p[4].length&&1==p[9]?l[ao(p[0])].apply(l,p[3]):1==a.length&&Eo(a)?l[c]():l.thru(a)}return function(){var e=arguments,i=e[0];if(l&&1==e.length&&Us(i))return l.plant(i).value();for(var r=0,o=n?t[r].apply(this,e):i;++r<n;)o=t[r].call(this,o);return o}}))}function zr(e,t,n,o,s,a,l,c,p,d){var h=t&u,f=1&t,m=2&t,g=24&t,y=512&t,v=m?r:Lr(e);return function u(){for(var b=arguments.length,x=i(b),w=b;w--;)x[w]=arguments[w];if(g)var _=lo(u),E=function(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}(x,_);if(o&&(x=Cr(x,o,s,g)),a&&(x=Tr(x,a,l,g)),b-=E,g&&b<d){var O=un(x,_);return Qr(e,t,zr,u.placeholder,n,x,O,c,p,d-b)}var P=f?n:this,k=m?P[e]:e;return b=x.length,c?x=function(e,t){var n=e.length,i=xn(t.length,n),o=Ar(e);for(;i--;){var s=t[i];e[i]=xo(s,n)?o[s]:r}return e}(x,c):y&&b>1&&x.reverse(),h&&p<b&&(x.length=p),this&&this!==mt&&this instanceof u&&(k=v||Lr(k)),k.apply(P,x)}}function Fr(e,t){return function(n,i){return function(e,t,n,i){return wi(e,(function(e,r,o){t(i,n(e),r,o)})),i}(n,e,t(i),{})}}function Vr(e,t){return function(n,i){var o;if(n===r&&i===r)return t;if(n!==r&&(o=n),i!==r){if(o===r)return i;"string"==typeof n||"string"==typeof i?(n=pr(n),i=pr(i)):(n=cr(n),i=cr(i)),o=e(n,i)}return o}}function Hr(e){return io((function(t){return t=$t(t,Jt(co())),Yi((function(n){var i=this;return e(t,(function(e){return St(e,i,n)}))}))}))}function Ur(e,t){var n=(t=t===r?" ":pr(t)).length;if(n<2)return n?Ki(t,e):t;var i=Ki(t,ft(e/fn(t)));return ln(t)?_r(mn(i),0,e).join(""):i.slice(0,e)}function Wr(e){return function(t,n,o){return o&&"number"!=typeof o&&wo(t,n,o)&&(n=o=r),t=fa(t),n===r?(n=t,t=0):n=fa(n),function(e,t,n,r){for(var o=-1,s=bn(ft((t-e)/(n||1)),0),a=i(s);s--;)a[r?s:++o]=e,e+=n;return a}(t,n,o=o===r?t<n?1:-1:fa(o),e)}}function Gr(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ya(t),n=ya(n)),e(t,n)}}function Qr(e,t,n,i,o,s,a,l,u,d){var h=8&t;t|=h?c:p,4&(t&=~(h?p:c))||(t&=-4);var f=[e,t,o,h?s:r,h?a:r,h?r:s,h?r:a,l,u,d],m=n.apply(r,f);return Eo(e)&&Mo(m,f),m.placeholder=i,No(m,e,t)}function Xr(e){var t=ke[e];return function(e,n){if(e=ya(e),(n=null==n?0:xn(ma(n),292))&&xt(e)){var i=(ba(e)+"e").split("e");return+((i=(ba(t(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return t(e)}}var Kr=Cn&&1/dn(new Cn([,-0]))[1]==h?function(e){return new Cn(e)}:cl;function Yr(e){return function(t){var n=go(t);return n==P?cn(t):n==A?hn(t):function(e,t){return $t(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Zr(e,t,n,s,h,f,m,g){var y=2&t;if(!y&&"function"!=typeof e)throw new Ae(o);var v=s?s.length:0;if(v||(t&=-97,s=h=r),m=m===r?m:bn(ma(m),0),g=g===r?g:ma(g),v-=h?h.length:0,t&p){var b=s,x=h;s=h=r}var w=y?r:so(e),_=[e,t,n,s,h,b,x,f,m,g];if(w&&function(e,t){var n=e[1],i=t[1],r=n|i,o=r<131,s=i==u&&8==n||i==u&&n==d&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!o&&!s)return e;1&i&&(e[2]=t[2],r|=1&n?0:4);var l=t[3];if(l){var c=e[3];e[3]=c?Cr(c,l,t[4]):l,e[4]=c?un(e[3],a):t[4]}(l=t[5])&&(c=e[5],e[5]=c?Tr(c,l,t[6]):l,e[6]=c?un(e[5],a):t[6]);(l=t[7])&&(e[7]=l);i&u&&(e[8]=null==e[8]?t[8]:xn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=r}(_,w),e=_[0],t=_[1],n=_[2],s=_[3],h=_[4],!(g=_[9]=_[9]===r?y?0:e.length:bn(_[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||t==l?function(e,t,n){var o=Lr(e);return function s(){for(var a=arguments.length,l=i(a),c=a,p=lo(s);c--;)l[c]=arguments[c];var u=a<3&&l[0]!==p&&l[a-1]!==p?[]:un(l,p);return(a-=u.length)<n?Qr(e,t,zr,s.placeholder,r,l,u,r,r,n-a):St(this&&this!==mt&&this instanceof s?o:e,this,l)}}(e,t,g):t!=c&&33!=t||h.length?zr.apply(r,_):function(e,t,n,r){var o=1&t,s=Lr(e);return function t(){for(var a=-1,l=arguments.length,c=-1,p=r.length,u=i(p+l),d=this&&this!==mt&&this instanceof t?s:e;++c<p;)u[c]=r[c];for(;l--;)u[c++]=arguments[++a];return St(d,o?n:this,u)}}(e,t,n,s);else var E=function(e,t,n){var i=1&t,r=Lr(e);return function t(){return(this&&this!==mt&&this instanceof t?r:e).apply(i?n:this,arguments)}}(e,t,n);return No((w?tr:Mo)(E,_),e,t)}function Jr(e,t,n,i){return e===r||zs(e,Re[n])&&!je.call(i,n)?t:e}function eo(e,t,n,i,o,s){return ta(e)&&ta(t)&&(s.set(t,e),Vi(e,t,r,eo,s),s.delete(t)),e}function to(e){return oa(e)?r:e}function no(e,t,n,i,o,s){var a=1&n,l=e.length,c=t.length;if(l!=c&&!(a&&c>l))return!1;var p=s.get(e),u=s.get(t);if(p&&u)return p==t&&u==e;var d=-1,h=!0,f=2&n?new Xn:r;for(s.set(e,t),s.set(t,e);++d<l;){var m=e[d],g=t[d];if(i)var y=a?i(g,m,d,t,e,s):i(m,g,d,e,t,s);if(y!==r){if(y)continue;h=!1;break}if(f){if(!Bt(t,(function(e,t){if(!tn(f,t)&&(m===e||o(m,e,n,i,s)))return f.push(t)}))){h=!1;break}}else if(m!==g&&!o(m,g,n,i,s)){h=!1;break}}return s.delete(e),s.delete(t),h}function io(e){return Ro(Co(e,r,Wo),e+"")}function ro(e){return Pi(e,Da,fo)}function oo(e){return Pi(e,Ra,mo)}var so=Mn?function(e){return Mn.get(e)}:cl;function ao(e){for(var t=e.name+"",n=Dn[t],i=je.call(Dn,t)?n.length:0;i--;){var r=n[i],o=r.func;if(null==o||o==e)return r.name}return t}function lo(e){return(je.call(zn,"placeholder")?zn:e).placeholder}function co(){var e=zn.iteratee||ol;return e=e===ol?ji:e,arguments.length?e(arguments[0],arguments[1]):e}function po(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function uo(e){for(var t=Da(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,ko(r)]}return t}function ho(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return $i(n)?n:r}var fo=yt?function(e){return null==e?[]:(e=Se(e),Dt(yt(e),(function(t){return Xe.call(e,t)})))}:gl,mo=yt?function(e){for(var t=[];e;)jt(t,fo(e)),e=Ge(e);return t}:gl,go=ki;function yo(e,t,n){for(var i=-1,r=(t=xr(t,e)).length,o=!1;++i<r;){var s=Lo(t[i]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++i!=r?o:!!(r=null==e?0:e.length)&&ea(r)&&xo(s,r)&&(Us(e)||Hs(e))}function vo(e){return"function"!=typeof e.constructor||Po(e)?{}:Fn(Ge(e))}function bo(e){return Us(e)||Hs(e)||!!(Ye&&e&&e[Ye])}function xo(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&xe.test(e))&&e>-1&&e%1==0&&e<t}function wo(e,t,n){if(!ta(n))return!1;var i=typeof t;return!!("number"==i?Gs(n)&&xo(t,n.length):"string"==i&&t in n)&&zs(n[t],e)}function _o(e,t){if(Us(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ca(e))||(ne.test(e)||!te.test(e)||null!=t&&e in Se(t))}function Eo(e){var t=ao(e),n=zn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var i=so(n);return!!i&&e===i[0]}(Pn&&go(new Pn(new ArrayBuffer(1)))!=$||kn&&go(new kn)!=P||Sn&&go(Sn.resolve())!=C||Cn&&go(new Cn)!=A||Tn&&go(new Tn)!=R)&&(go=function(e){var t=ki(e),n=t==S?e.constructor:r,i=n?Bo(n):"";if(i)switch(i){case Rn:return $;case Nn:return P;case $n:return C;case jn:return A;case In:return R}return t});var Oo=Ne?Zs:yl;function Po(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function ko(e){return e==e&&!ta(e)}function So(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==r||e in Se(n)))}}function Co(e,t,n){return t=bn(t===r?e.length-1:t,0),function(){for(var r=arguments,o=-1,s=bn(r.length-t,0),a=i(s);++o<s;)a[o]=r[t+o];o=-1;for(var l=i(t+1);++o<t;)l[o]=r[o];return l[t]=n(a),St(e,this,l)}}function To(e,t){return t.length<2?e:Oi(e,rr(t,0,-1))}function Ao(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Mo=$o(tr),Do=ht||function(e,t){return mt.setTimeout(e,t)},Ro=$o(nr);function No(e,t,n){var i=t+"";return Ro(e,function(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return Tt(y,(function(n){var i="_."+n[0];t&n[1]&&!Rt(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(pe):[]}(i),n)))}function $o(e){var t=0,n=0;return function(){var i=wn(),o=16-(i-n);if(n=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function jo(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n<t;){var s=Xi(n,o),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var Io=function(e){var t=$s(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ie,(function(e,n,i,r){t.push(i?r.replace(he,"$1"):n||e)})),t}));function Lo(e){if("string"==typeof e||ca(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Bo(e){if(null!=e){try{return $e.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function qo(e){if(e instanceof Un)return e.clone();var t=new Hn(e.__wrapped__,e.__chain__);return t.__actions__=Ar(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var zo=Yi((function(e,t){return Qs(e)?di(e,vi(t,1,Qs,!0)):[]})),Fo=Yi((function(e,t){var n=Yo(t);return Qs(n)&&(n=r),Qs(e)?di(e,vi(t,1,Qs,!0),co(n,2)):[]})),Vo=Yi((function(e,t){var n=Yo(t);return Qs(n)&&(n=r),Qs(e)?di(e,vi(t,1,Qs,!0),r,n):[]}));function Ho(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ma(n);return r<0&&(r=bn(i+r,0)),Ft(e,co(t,3),r)}function Uo(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return n!==r&&(o=ma(n),o=n<0?bn(i+o,0):xn(o,i-1)),Ft(e,co(t,3),o,!0)}function Wo(e){return(null==e?0:e.length)?vi(e,1):[]}function Go(e){return e&&e.length?e[0]:r}var Qo=Yi((function(e){var t=$t(e,vr);return t.length&&t[0]===e[0]?Ai(t):[]})),Xo=Yi((function(e){var t=Yo(e),n=$t(e,vr);return t===Yo(n)?t=r:n.pop(),n.length&&n[0]===e[0]?Ai(n,co(t,2)):[]})),Ko=Yi((function(e){var t=Yo(e),n=$t(e,vr);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?Ai(n,r,t):[]}));function Yo(e){var t=null==e?0:e.length;return t?e[t-1]:r}var Zo=Yi(Jo);function Jo(e,t){return e&&e.length&&t&&t.length?Gi(e,t):e}var es=io((function(e,t){var n=null==e?0:e.length,i=ai(e,t);return Qi(e,$t(t,(function(e){return xo(e,n)?+e:e})).sort(Sr)),i}));function ts(e){return null==e?e:On.call(e)}var ns=Yi((function(e){return ur(vi(e,1,Qs,!0))})),is=Yi((function(e){var t=Yo(e);return Qs(t)&&(t=r),ur(vi(e,1,Qs,!0),co(t,2))})),rs=Yi((function(e){var t=Yo(e);return t="function"==typeof t?t:r,ur(vi(e,1,Qs,!0),r,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=Dt(e,(function(e){if(Qs(e))return t=bn(e.length,t),!0})),Yt(t,(function(t){return $t(e,Gt(t))}))}function ss(e,t){if(!e||!e.length)return[];var n=os(e);return null==t?n:$t(n,(function(e){return St(t,r,e)}))}var as=Yi((function(e,t){return Qs(e)?di(e,t):[]})),ls=Yi((function(e){return gr(Dt(e,Qs))})),cs=Yi((function(e){var t=Yo(e);return Qs(t)&&(t=r),gr(Dt(e,Qs),co(t,2))})),ps=Yi((function(e){var t=Yo(e);return t="function"==typeof t?t:r,gr(Dt(e,Qs),r,t)})),us=Yi(os);var ds=Yi((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,ss(e,n)}));function hs(e){var t=zn(e);return t.__chain__=!0,t}function fs(e,t){return t(e)}var ms=io((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(t){return ai(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Un&&xo(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:fs,args:[o],thisArg:r}),new Hn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(o)}));var gs=Dr((function(e,t,n){je.call(e,n)?++e[n]:si(e,n,1)}));var ys=Br(Ho),vs=Br(Uo);function bs(e,t){return(Us(e)?Tt:hi)(e,co(t,3))}function xs(e,t){return(Us(e)?At:fi)(e,co(t,3))}var ws=Dr((function(e,t,n){je.call(e,n)?e[n].push(t):si(e,n,[t])}));var _s=Yi((function(e,t,n){var r=-1,o="function"==typeof t,s=Gs(e)?i(e.length):[];return hi(e,(function(e){s[++r]=o?St(t,e,n):Mi(e,t,n)})),s})),Es=Dr((function(e,t,n){si(e,n,t)}));function Os(e,t){return(Us(e)?$t:qi)(e,co(t,3))}var Ps=Dr((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ks=Yi((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wo(e,t[0],t[1])?t=[]:n>2&&wo(t[0],t[1],t[2])&&(t=[t[0]]),Ui(e,vi(t,1),[])})),Ss=pt||function(){return mt.Date.now()};function Cs(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Zr(e,u,r,r,r,r,t)}function Ts(e,t){var n;if("function"!=typeof t)throw new Ae(o);return e=ma(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var As=Yi((function(e,t,n){var i=1;if(n.length){var r=un(n,lo(As));i|=c}return Zr(e,i,t,n,r)})),Ms=Yi((function(e,t,n){var i=3;if(n.length){var r=un(n,lo(Ms));i|=c}return Zr(t,i,e,n,r)}));function Ds(e,t,n){var i,s,a,l,c,p,u=0,d=!1,h=!1,f=!0;if("function"!=typeof e)throw new Ae(o);function m(t){var n=i,o=s;return i=s=r,u=t,l=e.apply(o,n)}function g(e){var n=e-p;return p===r||n>=t||n<0||h&&e-u>=a}function y(){var e=Ss();if(g(e))return v(e);c=Do(y,function(e){var n=t-(e-p);return h?xn(n,a-(e-u)):n}(e))}function v(e){return c=r,f&&i?m(e):(i=s=r,l)}function b(){var e=Ss(),n=g(e);if(i=arguments,s=this,p=e,n){if(c===r)return function(e){return u=e,c=Do(y,t),d?m(e):l}(p);if(h)return Er(c),c=Do(y,t),m(p)}return c===r&&(c=Do(y,t)),l}return t=ya(t)||0,ta(n)&&(d=!!n.leading,a=(h="maxWait"in n)?bn(ya(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){c!==r&&Er(c),u=0,i=p=s=c=r},b.flush=function(){return c===r?l:v(Ss())},b}var Rs=Yi((function(e,t){return ui(e,1,t)})),Ns=Yi((function(e,t,n){return ui(e,ya(t)||0,n)}));function $s(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(o);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=e.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new($s.Cache||Qn),n}function js(e){if("function"!=typeof e)throw new Ae(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}$s.Cache=Qn;var Is=wr((function(e,t){var n=(t=1==t.length&&Us(t[0])?$t(t[0],Jt(co())):$t(vi(t,1),Jt(co()))).length;return Yi((function(i){for(var r=-1,o=xn(i.length,n);++r<o;)i[r]=t[r].call(this,i[r]);return St(e,this,i)}))})),Ls=Yi((function(e,t){var n=un(t,lo(Ls));return Zr(e,c,r,t,n)})),Bs=Yi((function(e,t){var n=un(t,lo(Bs));return Zr(e,p,r,t,n)})),qs=io((function(e,t){return Zr(e,d,r,r,r,t)}));function zs(e,t){return e===t||e!=e&&t!=t}var Fs=Gr(Si),Vs=Gr((function(e,t){return e>=t})),Hs=Di(function(){return arguments}())?Di:function(e){return na(e)&&je.call(e,"callee")&&!Xe.call(e,"callee")},Us=i.isArray,Ws=wt?Jt(wt):function(e){return na(e)&&ki(e)==N};function Gs(e){return null!=e&&ea(e.length)&&!Zs(e)}function Qs(e){return na(e)&&Gs(e)}var Xs=bt||yl,Ks=_t?Jt(_t):function(e){return na(e)&&ki(e)==w};function Ys(e){if(!na(e))return!1;var t=ki(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Zs(e){if(!ta(e))return!1;var t=ki(e);return t==E||t==O||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Js(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ia=Et?Jt(Et):function(e){return na(e)&&go(e)==P};function ra(e){return"number"==typeof e||na(e)&&ki(e)==k}function oa(e){if(!na(e)||ki(e)!=S)return!1;var t=Ge(e);if(null===t)return!0;var n=je.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&$e.call(n)==qe}var sa=Ot?Jt(Ot):function(e){return na(e)&&ki(e)==T};var aa=Pt?Jt(Pt):function(e){return na(e)&&go(e)==A};function la(e){return"string"==typeof e||!Us(e)&&na(e)&&ki(e)==M}function ca(e){return"symbol"==typeof e||na(e)&&ki(e)==D}var pa=kt?Jt(kt):function(e){return na(e)&&ea(e.length)&&!!lt[ki(e)]};var ua=Gr(Bi),da=Gr((function(e,t){return e<=t}));function ha(e){if(!e)return[];if(Gs(e))return la(e)?mn(e):Ar(e);if(Ze&&e[Ze])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ze]());var t=go(e);return(t==P?cn:t==A?dn:za)(e)}function fa(e){return e?(e=ya(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=fa(e),n=t%1;return t==t?n?t-n:t:0}function ga(e){return e?li(ma(e),0,g):0}function ya(e){if("number"==typeof e)return e;if(ca(e))return m;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var n=ye.test(e);return n||be.test(e)?dt(e.slice(2),n?2:8):ge.test(e)?m:+e}function va(e){return Mr(e,Ra(e))}function ba(e){return null==e?"":pr(e)}var xa=Rr((function(e,t){if(Po(t)||Gs(t))Mr(t,Da(t),e);else for(var n in t)je.call(t,n)&&ni(e,n,t[n])})),wa=Rr((function(e,t){Mr(t,Ra(t),e)})),_a=Rr((function(e,t,n,i){Mr(t,Ra(t),e,i)})),Ea=Rr((function(e,t,n,i){Mr(t,Da(t),e,i)})),Oa=io(ai);var Pa=Yi((function(e,t){e=Se(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&wo(t[0],t[1],o)&&(i=1);++n<i;)for(var s=t[n],a=Ra(s),l=-1,c=a.length;++l<c;){var p=a[l],u=e[p];(u===r||zs(u,Re[p])&&!je.call(e,p))&&(e[p]=s[p])}return e})),ka=Yi((function(e){return e.push(r,eo),St($a,r,e)}));function Sa(e,t,n){var i=null==e?r:Oi(e,t);return i===r?n:i}function Ca(e,t){return null!=e&&yo(e,t,Ti)}var Ta=Fr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Be.call(t)),e[t]=n}),tl(rl)),Aa=Fr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Be.call(t)),je.call(e,t)?e[t].push(n):e[t]=[n]}),co),Ma=Yi(Mi);function Da(e){return Gs(e)?Yn(e):Ii(e)}function Ra(e){return Gs(e)?Yn(e,!0):Li(e)}var Na=Rr((function(e,t,n){Vi(e,t,n)})),$a=Rr((function(e,t,n,i){Vi(e,t,n,i)})),ja=io((function(e,t){var n={};if(null==e)return n;var i=!1;t=$t(t,(function(t){return t=xr(t,e),i||(i=t.length>1),t})),Mr(e,oo(e),n),i&&(n=ci(n,7,to));for(var r=t.length;r--;)dr(n,t[r]);return n}));var Ia=io((function(e,t){return null==e?{}:function(e,t){return Wi(e,t,(function(t,n){return Ca(e,n)}))}(e,t)}));function La(e,t){if(null==e)return{};var n=$t(oo(e),(function(e){return[e]}));return t=co(t),Wi(e,n,(function(e,n){return t(e,n[0])}))}var Ba=Yr(Da),qa=Yr(Ra);function za(e){return null==e?[]:en(e,Da(e))}var Fa=Ir((function(e,t,n){return t=t.toLowerCase(),e+(n?Va(t):t)}));function Va(e){return Ya(ba(e).toLowerCase())}function Ha(e){return(e=ba(e))&&e.replace(we,on).replace(tt,"")}var Ua=Ir((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Wa=Ir((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ga=jr("toLowerCase");var Qa=Ir((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Xa=Ir((function(e,t,n){return e+(n?" ":"")+Ya(t)}));var Ka=Ir((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ya=jr("toUpperCase");function Za(e,t,n){return e=ba(e),(t=n?r:t)===r?function(e){return ot.test(e)}(e)?function(e){return e.match(it)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Ja=Yi((function(e,t){try{return St(e,r,t)}catch(e){return Ys(e)?e:new Oe(e)}})),el=io((function(e,t){return Tt(t,(function(t){t=Lo(t),si(e,t,As(e[t],e))})),e}));function tl(e){return function(){return e}}var nl=qr(),il=qr(!0);function rl(e){return e}function ol(e){return ji("function"==typeof e?e:ci(e,1))}var sl=Yi((function(e,t){return function(n){return Mi(n,e,t)}})),al=Yi((function(e,t){return function(n){return Mi(e,n,t)}}));function ll(e,t,n){var i=Da(t),r=Ei(t,i);null!=n||ta(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=Ei(t,Da(t)));var o=!(ta(n)&&"chain"in n&&!n.chain),s=Zs(e);return Tt(r,(function(n){var i=t[n];e[n]=i,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ar(this.__actions__)).push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,jt([this.value()],arguments))})})),e}function cl(){}var pl=Hr($t),ul=Hr(Mt),dl=Hr(Bt);function hl(e){return _o(e)?Gt(Lo(e)):function(e){return function(t){return Oi(t,e)}}(e)}var fl=Wr(),ml=Wr(!0);function gl(){return[]}function yl(){return!1}var vl=Vr((function(e,t){return e+t}),0),bl=Xr("ceil"),xl=Vr((function(e,t){return e/t}),1),wl=Xr("floor");var _l,El=Vr((function(e,t){return e*t}),1),Ol=Xr("round"),Pl=Vr((function(e,t){return e-t}),0);return zn.after=function(e,t){if("function"!=typeof t)throw new Ae(o);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},zn.ary=Cs,zn.assign=xa,zn.assignIn=wa,zn.assignInWith=_a,zn.assignWith=Ea,zn.at=Oa,zn.before=Ts,zn.bind=As,zn.bindAll=el,zn.bindKey=Ms,zn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Us(e)?e:[e]},zn.chain=hs,zn.chunk=function(e,t,n){t=(n?wo(e,t,n):t===r)?1:bn(ma(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,l=i(ft(o/t));s<o;)l[a++]=rr(e,s,s+=t);return l},zn.compact=function(e){for(var t=-1,n=null==e?0:e.length,i=0,r=[];++t<n;){var o=e[t];o&&(r[i++]=o)}return r},zn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=i(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return jt(Us(n)?Ar(n):[n],vi(t,1))},zn.cond=function(e){var t=null==e?0:e.length,n=co();return e=t?$t(e,(function(e){if("function"!=typeof e[1])throw new Ae(o);return[n(e[0]),e[1]]})):[],Yi((function(n){for(var i=-1;++i<t;){var r=e[i];if(St(r[0],this,n))return St(r[1],this,n)}}))},zn.conforms=function(e){return function(e){var t=Da(e);return function(n){return pi(n,e,t)}}(ci(e,1))},zn.constant=tl,zn.countBy=gs,zn.create=function(e,t){var n=Fn(e);return null==t?n:oi(n,t)},zn.curry=function e(t,n,i){var o=Zr(t,8,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},zn.curryRight=function e(t,n,i){var o=Zr(t,l,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},zn.debounce=Ds,zn.defaults=Pa,zn.defaultsDeep=ka,zn.defer=Rs,zn.delay=Ns,zn.difference=zo,zn.differenceBy=Fo,zn.differenceWith=Vo,zn.drop=function(e,t,n){var i=null==e?0:e.length;return i?rr(e,(t=n||t===r?1:ma(t))<0?0:t,i):[]},zn.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?rr(e,0,(t=i-(t=n||t===r?1:ma(t)))<0?0:t):[]},zn.dropRightWhile=function(e,t){return e&&e.length?fr(e,co(t,3),!0,!0):[]},zn.dropWhile=function(e,t){return e&&e.length?fr(e,co(t,3),!0):[]},zn.fill=function(e,t,n,i){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&wo(e,t,n)&&(n=0,i=o),function(e,t,n,i){var o=e.length;for((n=ma(n))<0&&(n=-n>o?0:o+n),(i=i===r||i>o?o:ma(i))<0&&(i+=o),i=n>i?0:ga(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},zn.filter=function(e,t){return(Us(e)?Dt:yi)(e,co(t,3))},zn.flatMap=function(e,t){return vi(Os(e,t),1)},zn.flatMapDeep=function(e,t){return vi(Os(e,t),h)},zn.flatMapDepth=function(e,t,n){return n=n===r?1:ma(n),vi(Os(e,t),n)},zn.flatten=Wo,zn.flattenDeep=function(e){return(null==e?0:e.length)?vi(e,h):[]},zn.flattenDepth=function(e,t){return(null==e?0:e.length)?vi(e,t=t===r?1:ma(t)):[]},zn.flip=function(e){return Zr(e,512)},zn.flow=nl,zn.flowRight=il,zn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i},zn.functions=function(e){return null==e?[]:Ei(e,Da(e))},zn.functionsIn=function(e){return null==e?[]:Ei(e,Ra(e))},zn.groupBy=ws,zn.initial=function(e){return(null==e?0:e.length)?rr(e,0,-1):[]},zn.intersection=Qo,zn.intersectionBy=Xo,zn.intersectionWith=Ko,zn.invert=Ta,zn.invertBy=Aa,zn.invokeMap=_s,zn.iteratee=ol,zn.keyBy=Es,zn.keys=Da,zn.keysIn=Ra,zn.map=Os,zn.mapKeys=function(e,t){var n={};return t=co(t,3),wi(e,(function(e,i,r){si(n,t(e,i,r),e)})),n},zn.mapValues=function(e,t){var n={};return t=co(t,3),wi(e,(function(e,i,r){si(n,i,t(e,i,r))})),n},zn.matches=function(e){return zi(ci(e,1))},zn.matchesProperty=function(e,t){return Fi(e,ci(t,1))},zn.memoize=$s,zn.merge=Na,zn.mergeWith=$a,zn.method=sl,zn.methodOf=al,zn.mixin=ll,zn.negate=js,zn.nthArg=function(e){return e=ma(e),Yi((function(t){return Hi(t,e)}))},zn.omit=ja,zn.omitBy=function(e,t){return La(e,js(co(t)))},zn.once=function(e){return Ts(2,e)},zn.orderBy=function(e,t,n,i){return null==e?[]:(Us(t)||(t=null==t?[]:[t]),Us(n=i?r:n)||(n=null==n?[]:[n]),Ui(e,t,n))},zn.over=pl,zn.overArgs=Is,zn.overEvery=ul,zn.overSome=dl,zn.partial=Ls,zn.partialRight=Bs,zn.partition=Ps,zn.pick=Ia,zn.pickBy=La,zn.property=hl,zn.propertyOf=function(e){return function(t){return null==e?r:Oi(e,t)}},zn.pull=Zo,zn.pullAll=Jo,zn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Gi(e,t,co(n,2)):e},zn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Gi(e,t,r,n):e},zn.pullAt=es,zn.range=fl,zn.rangeRight=ml,zn.rearg=qs,zn.reject=function(e,t){return(Us(e)?Dt:yi)(e,js(co(t,3)))},zn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var i=-1,r=[],o=e.length;for(t=co(t,3);++i<o;){var s=e[i];t(s,i,e)&&(n.push(s),r.push(i))}return Qi(e,r),n},zn.rest=function(e,t){if("function"!=typeof e)throw new Ae(o);return Yi(e,t=t===r?t:ma(t))},zn.reverse=ts,zn.sampleSize=function(e,t,n){return t=(n?wo(e,t,n):t===r)?1:ma(t),(Us(e)?Jn:Ji)(e,t)},zn.set=function(e,t,n){return null==e?e:er(e,t,n)},zn.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:er(e,t,n,i)},zn.shuffle=function(e){return(Us(e)?ei:ir)(e)},zn.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&wo(e,t,n)?(t=0,n=i):(t=null==t?0:ma(t),n=n===r?i:ma(n)),rr(e,t,n)):[]},zn.sortBy=ks,zn.sortedUniq=function(e){return e&&e.length?lr(e):[]},zn.sortedUniqBy=function(e,t){return e&&e.length?lr(e,co(t,2)):[]},zn.split=function(e,t,n){return n&&"number"!=typeof n&&wo(e,t,n)&&(t=n=r),(n=n===r?g:n>>>0)?(e=ba(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=pr(t))&&ln(e)?_r(mn(e),0,n):e.split(t,n):[]},zn.spread=function(e,t){if("function"!=typeof e)throw new Ae(o);return t=null==t?0:bn(ma(t),0),Yi((function(n){var i=n[t],r=_r(n,0,t);return i&&jt(r,i),St(e,this,r)}))},zn.tail=function(e){var t=null==e?0:e.length;return t?rr(e,1,t):[]},zn.take=function(e,t,n){return e&&e.length?rr(e,0,(t=n||t===r?1:ma(t))<0?0:t):[]},zn.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?rr(e,(t=i-(t=n||t===r?1:ma(t)))<0?0:t,i):[]},zn.takeRightWhile=function(e,t){return e&&e.length?fr(e,co(t,3),!1,!0):[]},zn.takeWhile=function(e,t){return e&&e.length?fr(e,co(t,3)):[]},zn.tap=function(e,t){return t(e),e},zn.throttle=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new Ae(o);return ta(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Ds(e,t,{leading:i,maxWait:t,trailing:r})},zn.thru=fs,zn.toArray=ha,zn.toPairs=Ba,zn.toPairsIn=qa,zn.toPath=function(e){return Us(e)?$t(e,Lo):ca(e)?[e]:Ar(Io(ba(e)))},zn.toPlainObject=va,zn.transform=function(e,t,n){var i=Us(e),r=i||Xs(e)||pa(e);if(t=co(t,4),null==n){var o=e&&e.constructor;n=r?i?new o:[]:ta(e)&&Zs(o)?Fn(Ge(e)):{}}return(r?Tt:wi)(e,(function(e,i,r){return t(n,e,i,r)})),n},zn.unary=function(e){return Cs(e,1)},zn.union=ns,zn.unionBy=is,zn.unionWith=rs,zn.uniq=function(e){return e&&e.length?ur(e):[]},zn.uniqBy=function(e,t){return e&&e.length?ur(e,co(t,2)):[]},zn.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?ur(e,r,t):[]},zn.unset=function(e,t){return null==e||dr(e,t)},zn.unzip=os,zn.unzipWith=ss,zn.update=function(e,t,n){return null==e?e:hr(e,t,br(n))},zn.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:hr(e,t,br(n),i)},zn.values=za,zn.valuesIn=function(e){return null==e?[]:en(e,Ra(e))},zn.without=as,zn.words=Za,zn.wrap=function(e,t){return Ls(br(t),e)},zn.xor=ls,zn.xorBy=cs,zn.xorWith=ps,zn.zip=us,zn.zipObject=function(e,t){return yr(e||[],t||[],ni)},zn.zipObjectDeep=function(e,t){return yr(e||[],t||[],er)},zn.zipWith=ds,zn.entries=Ba,zn.entriesIn=qa,zn.extend=wa,zn.extendWith=_a,ll(zn,zn),zn.add=vl,zn.attempt=Ja,zn.camelCase=Fa,zn.capitalize=Va,zn.ceil=bl,zn.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=ya(n))==n?n:0),t!==r&&(t=(t=ya(t))==t?t:0),li(ya(e),t,n)},zn.clone=function(e){return ci(e,4)},zn.cloneDeep=function(e){return ci(e,5)},zn.cloneDeepWith=function(e,t){return ci(e,5,t="function"==typeof t?t:r)},zn.cloneWith=function(e,t){return ci(e,4,t="function"==typeof t?t:r)},zn.conformsTo=function(e,t){return null==t||pi(e,t,Da(t))},zn.deburr=Ha,zn.defaultTo=function(e,t){return null==e||e!=e?t:e},zn.divide=xl,zn.endsWith=function(e,t,n){e=ba(e),t=pr(t);var i=e.length,o=n=n===r?i:li(ma(n),0,i);return(n-=t.length)>=0&&e.slice(n,o)==t},zn.eq=zs,zn.escape=function(e){return(e=ba(e))&&Y.test(e)?e.replace(X,sn):e},zn.escapeRegExp=function(e){return(e=ba(e))&&oe.test(e)?e.replace(re,"\\$&"):e},zn.every=function(e,t,n){var i=Us(e)?Mt:mi;return n&&wo(e,t,n)&&(t=r),i(e,co(t,3))},zn.find=ys,zn.findIndex=Ho,zn.findKey=function(e,t){return zt(e,co(t,3),wi)},zn.findLast=vs,zn.findLastIndex=Uo,zn.findLastKey=function(e,t){return zt(e,co(t,3),_i)},zn.floor=wl,zn.forEach=bs,zn.forEachRight=xs,zn.forIn=function(e,t){return null==e?e:bi(e,co(t,3),Ra)},zn.forInRight=function(e,t){return null==e?e:xi(e,co(t,3),Ra)},zn.forOwn=function(e,t){return e&&wi(e,co(t,3))},zn.forOwnRight=function(e,t){return e&&_i(e,co(t,3))},zn.get=Sa,zn.gt=Fs,zn.gte=Vs,zn.has=function(e,t){return null!=e&&yo(e,t,Ci)},zn.hasIn=Ca,zn.head=Go,zn.identity=rl,zn.includes=function(e,t,n,i){e=Gs(e)?e:za(e),n=n&&!i?ma(n):0;var r=e.length;return n<0&&(n=bn(r+n,0)),la(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&Vt(e,t,n)>-1},zn.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ma(n);return r<0&&(r=bn(i+r,0)),Vt(e,t,r)},zn.inRange=function(e,t,n){return t=fa(t),n===r?(n=t,t=0):n=fa(n),function(e,t,n){return e>=xn(t,n)&&e<bn(t,n)}(e=ya(e),t,n)},zn.invoke=Ma,zn.isArguments=Hs,zn.isArray=Us,zn.isArrayBuffer=Ws,zn.isArrayLike=Gs,zn.isArrayLikeObject=Qs,zn.isBoolean=function(e){return!0===e||!1===e||na(e)&&ki(e)==x},zn.isBuffer=Xs,zn.isDate=Ks,zn.isElement=function(e){return na(e)&&1===e.nodeType&&!oa(e)},zn.isEmpty=function(e){if(null==e)return!0;if(Gs(e)&&(Us(e)||"string"==typeof e||"function"==typeof e.splice||Xs(e)||pa(e)||Hs(e)))return!e.length;var t=go(e);if(t==P||t==A)return!e.size;if(Po(e))return!Ii(e).length;for(var n in e)if(je.call(e,n))return!1;return!0},zn.isEqual=function(e,t){return Ri(e,t)},zn.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?Ri(e,t,r,n):!!i},zn.isError=Ys,zn.isFinite=function(e){return"number"==typeof e&&xt(e)},zn.isFunction=Zs,zn.isInteger=Js,zn.isLength=ea,zn.isMap=ia,zn.isMatch=function(e,t){return e===t||Ni(e,t,uo(t))},zn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,Ni(e,t,uo(t),n)},zn.isNaN=function(e){return ra(e)&&e!=+e},zn.isNative=function(e){if(Oo(e))throw new Oe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return $i(e)},zn.isNil=function(e){return null==e},zn.isNull=function(e){return null===e},zn.isNumber=ra,zn.isObject=ta,zn.isObjectLike=na,zn.isPlainObject=oa,zn.isRegExp=sa,zn.isSafeInteger=function(e){return Js(e)&&e>=-9007199254740991&&e<=f},zn.isSet=aa,zn.isString=la,zn.isSymbol=ca,zn.isTypedArray=pa,zn.isUndefined=function(e){return e===r},zn.isWeakMap=function(e){return na(e)&&go(e)==R},zn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==ki(e)},zn.join=function(e,t){return null==e?"":qt.call(e,t)},zn.kebabCase=Ua,zn.last=Yo,zn.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=(o=ma(n))<0?bn(i+o,0):xn(o,i-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,o):Ft(e,Ut,o,!0)},zn.lowerCase=Wa,zn.lowerFirst=Ga,zn.lt=ua,zn.lte=da,zn.max=function(e){return e&&e.length?gi(e,rl,Si):r},zn.maxBy=function(e,t){return e&&e.length?gi(e,co(t,2),Si):r},zn.mean=function(e){return Wt(e,rl)},zn.meanBy=function(e,t){return Wt(e,co(t,2))},zn.min=function(e){return e&&e.length?gi(e,rl,Bi):r},zn.minBy=function(e,t){return e&&e.length?gi(e,co(t,2),Bi):r},zn.stubArray=gl,zn.stubFalse=yl,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=El,zn.nth=function(e,t){return e&&e.length?Hi(e,ma(t)):r},zn.noConflict=function(){return mt._===this&&(mt._=ze),this},zn.noop=cl,zn.now=Ss,zn.pad=function(e,t,n){e=ba(e);var i=(t=ma(t))?fn(e):0;if(!t||i>=t)return e;var r=(t-i)/2;return Ur(gt(r),n)+e+Ur(ft(r),n)},zn.padEnd=function(e,t,n){e=ba(e);var i=(t=ma(t))?fn(e):0;return t&&i<t?e+Ur(t-i,n):e},zn.padStart=function(e,t,n){e=ba(e);var i=(t=ma(t))?fn(e):0;return t&&i<t?Ur(t-i,n)+e:e},zn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),_n(ba(e).replace(se,""),t||0)},zn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&wo(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=fa(e),t===r?(t=e,e=0):t=fa(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=En();return xn(e+o*(t-e+ut("1e-"+((o+"").length-1))),t)}return Xi(e,t)},zn.reduce=function(e,t,n){var i=Us(e)?It:Xt,r=arguments.length<3;return i(e,co(t,4),n,r,hi)},zn.reduceRight=function(e,t,n){var i=Us(e)?Lt:Xt,r=arguments.length<3;return i(e,co(t,4),n,r,fi)},zn.repeat=function(e,t,n){return t=(n?wo(e,t,n):t===r)?1:ma(t),Ki(ba(e),t)},zn.replace=function(){var e=arguments,t=ba(e[0]);return e.length<3?t:t.replace(e[1],e[2])},zn.result=function(e,t,n){var i=-1,o=(t=xr(t,e)).length;for(o||(o=1,e=r);++i<o;){var s=null==e?r:e[Lo(t[i])];s===r&&(i=o,s=n),e=Zs(s)?s.call(e):s}return e},zn.round=Ol,zn.runInContext=e,zn.sample=function(e){return(Us(e)?Zn:Zi)(e)},zn.size=function(e){if(null==e)return 0;if(Gs(e))return la(e)?fn(e):e.length;var t=go(e);return t==P||t==A?e.size:Ii(e).length},zn.snakeCase=Qa,zn.some=function(e,t,n){var i=Us(e)?Bt:or;return n&&wo(e,t,n)&&(t=r),i(e,co(t,3))},zn.sortedIndex=function(e,t){return sr(e,t)},zn.sortedIndexBy=function(e,t,n){return ar(e,t,co(n,2))},zn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var i=sr(e,t);if(i<n&&zs(e[i],t))return i}return-1},zn.sortedLastIndex=function(e,t){return sr(e,t,!0)},zn.sortedLastIndexBy=function(e,t,n){return ar(e,t,co(n,2),!0)},zn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=sr(e,t,!0)-1;if(zs(e[n],t))return n}return-1},zn.startCase=Xa,zn.startsWith=function(e,t,n){return e=ba(e),n=null==n?0:li(ma(n),0,e.length),t=pr(t),e.slice(n,n+t.length)==t},zn.subtract=Pl,zn.sum=function(e){return e&&e.length?Kt(e,rl):0},zn.sumBy=function(e,t){return e&&e.length?Kt(e,co(t,2)):0},zn.template=function(e,t,n){var i=zn.templateSettings;n&&wo(e,t,n)&&(t=r),e=ba(e),t=_a({},t,i,Jr);var o,s,a=_a({},t.imports,i.imports,Jr),l=Da(a),c=en(a,l),p=0,u=t.interpolate||_e,d="__p += '",h=Ce((t.escape||_e).source+"|"+u.source+"|"+(u===ee?fe:_e).source+"|"+(t.evaluate||_e).source+"|$","g"),f="//# sourceURL="+(je.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++at+"]")+"\n";e.replace(h,(function(t,n,i,r,a,l){return i||(i=r),d+=e.slice(p,l).replace(Ee,an),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),i&&(d+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),p=l+t.length,t})),d+="';\n";var m=je.call(t,"variable")&&t.variable;if(m){if(de.test(m))throw new Oe("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace(U,""):d).replace(W,"$1").replace(G,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=Ja((function(){return Pe(l,f+"return "+d).apply(r,c)}));if(g.source=d,Ys(g))throw g;return g},zn.times=function(e,t){if((e=ma(e))<1||e>f)return[];var n=g,i=xn(e,g);t=co(t),e-=g;for(var r=Yt(i,t);++n<e;)t(n);return r},zn.toFinite=fa,zn.toInteger=ma,zn.toLength=ga,zn.toLower=function(e){return ba(e).toLowerCase()},zn.toNumber=ya,zn.toSafeInteger=function(e){return e?li(ma(e),-9007199254740991,f):0===e?e:0},zn.toString=ba,zn.toUpper=function(e){return ba(e).toUpperCase()},zn.trim=function(e,t,n){if((e=ba(e))&&(n||t===r))return Zt(e);if(!e||!(t=pr(t)))return e;var i=mn(e),o=mn(t);return _r(i,nn(i,o),rn(i,o)+1).join("")},zn.trimEnd=function(e,t,n){if((e=ba(e))&&(n||t===r))return e.slice(0,gn(e)+1);if(!e||!(t=pr(t)))return e;var i=mn(e);return _r(i,0,rn(i,mn(t))+1).join("")},zn.trimStart=function(e,t,n){if((e=ba(e))&&(n||t===r))return e.replace(se,"");if(!e||!(t=pr(t)))return e;var i=mn(e);return _r(i,nn(i,mn(t))).join("")},zn.truncate=function(e,t){var n=30,i="...";if(ta(t)){var o="separator"in t?t.separator:o;n="length"in t?ma(t.length):n,i="omission"in t?pr(t.omission):i}var s=(e=ba(e)).length;if(ln(e)){var a=mn(e);s=a.length}if(n>=s)return e;var l=n-fn(i);if(l<1)return i;var c=a?_r(a,0,l).join(""):e.slice(0,l);if(o===r)return c+i;if(a&&(l+=c.length-l),sa(o)){if(e.slice(l).search(o)){var p,u=c;for(o.global||(o=Ce(o.source,ba(me.exec(o))+"g")),o.lastIndex=0;p=o.exec(u);)var d=p.index;c=c.slice(0,d===r?l:d)}}else if(e.indexOf(pr(o),l)!=l){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+i},zn.unescape=function(e){return(e=ba(e))&&K.test(e)?e.replace(Q,yn):e},zn.uniqueId=function(e){var t=++Ie;return ba(e)+t},zn.upperCase=Ka,zn.upperFirst=Ya,zn.each=bs,zn.eachRight=xs,zn.first=Go,ll(zn,(_l={},wi(zn,(function(e,t){je.call(zn.prototype,t)||(_l[t]=e)})),_l),{chain:!1}),zn.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){zn[e].placeholder=zn})),Tt(["drop","take"],(function(e,t){Un.prototype[e]=function(n){n=n===r?1:bn(ma(n),0);var i=this.__filtered__&&!t?new Un(this):this.clone();return i.__filtered__?i.__takeCount__=xn(n,i.__takeCount__):i.__views__.push({size:xn(n,g),type:e+(i.__dir__<0?"Right":"")}),i},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Tt(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:co(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),Tt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),Tt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(rl)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=Yi((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Mi(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(js(co(e)))},Un.prototype.slice=function(e,t){e=ma(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Un(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=ma(t))<0?n.dropRight(-t):n.take(t-e)),n)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(g)},wi(Un.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=zn[i?"take"+("last"==t?"Right":""):t],s=i||/^find/.test(t);o&&(zn.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,l=t instanceof Un,c=a[0],p=l||Us(t),u=function(e){var t=o.apply(zn,jt([e],a));return i&&d?t[0]:t};p&&n&&"function"==typeof c&&1!=c.length&&(l=p=!1);var d=this.__chain__,h=!!this.__actions__.length,f=s&&!d,m=l&&!h;if(!s&&p){t=m?t:new Un(this);var g=e.apply(t,a);return g.__actions__.push({func:fs,args:[u],thisArg:r}),new Hn(g,d)}return f&&m?e.apply(this,a):(g=this.thru(u),f?i?g.value()[0]:g.value():g)})})),Tt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Me[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);zn.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(Us(r)?r:[],e)}return this[n]((function(n){return t.apply(Us(n)?n:[],e)}))}})),wi(Un.prototype,(function(e,t){var n=zn[t];if(n){var i=n.name+"";je.call(Dn,i)||(Dn[i]=[]),Dn[i].push({name:t,func:n})}})),Dn[zr(r,2).name]=[{name:"wrapper",func:r}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=Ar(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ar(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ar(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Us(e),i=t<0,r=n?e.length:0,o=function(e,t,n){var i=-1,r=n.length;for(;++i<r;){var o=n[i],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=xn(t,e+s);break;case"takeRight":e=bn(e,t-s)}}return{start:e,end:t}}(0,r,this.__views__),s=o.start,a=o.end,l=a-s,c=i?a:s-1,p=this.__iteratees__,u=p.length,d=0,h=xn(l,this.__takeCount__);if(!n||!i&&r==l&&h==l)return mr(e,this.__actions__);var f=[];e:for(;l--&&d<h;){for(var m=-1,g=e[c+=t];++m<u;){var y=p[m],v=y.iteratee,b=y.type,x=v(g);if(2==b)g=x;else if(!x){if(1==b)continue e;break e}}f[d++]=g}return f},zn.prototype.at=ms,zn.prototype.chain=function(){return hs(this)},zn.prototype.commit=function(){return new Hn(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===r&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},zn.prototype.plant=function(e){for(var t,n=this;n instanceof Vn;){var i=qo(n);i.__index__=0,i.__values__=r,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},zn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:fs,args:[ts],thisArg:r}),new Hn(t,this.__chain__)}return this.thru(ts)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return mr(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,Ze&&(zn.prototype[Ze]=function(){return this}),zn}();mt._=vn,(i=function(){return vn}.call(t,n,t,e))===r||(e.exports=i)}.call(this)},181:()=>{},376:()=>{},889:()=>{},225:e=>{var t,n,i=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(e){t=r}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var a,l=[],c=!1,p=-1;function u(){c&&a&&(c=!1,a.length?l=a.concat(l):p=-1,l.length&&d())}function d(){if(!c){var e=s(u);c=!0;for(var t=l.length;t;){for(a=l,l=[];++p<t;)a&&a[p].run();p=-1,t=l.length}a=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function f(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||c||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=f,i.addListener=f,i.once=f,i.off=f,i.removeListener=f,i.removeAllListeners=f,i.emit=f,i.prependListener=f,i.prependOnceListener=f,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},458:(e,t,n)=>{var i,r,o;r=[n(692)],void 0===(o="function"==typeof(i=function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var n,i,r;return t&&t.requirejs||(t?i=t:t={},function(e){var t,o,s,a,l={},c={},p={},u={},d=Object.prototype.hasOwnProperty,h=[].slice,f=/\.js$/;function m(e,t){return d.call(e,t)}function g(e,t){var n,i,r,o,s,a,l,c,u,d,h,m=t&&t.split("/"),g=p.map,y=g&&g["*"]||{};if(e){for(s=(e=e.split("/")).length-1,p.nodeIdCompat&&f.test(e[s])&&(e[s]=e[s].replace(f,"")),"."===e[0].charAt(0)&&m&&(e=m.slice(0,m.length-1).concat(e)),u=0;u<e.length;u++)if("."===(h=e[u]))e.splice(u,1),u-=1;else if(".."===h){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;u>0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((m||y)&&g){for(u=(n=e.split("/")).length;u>0;u-=1){if(i=n.slice(0,u).join("/"),m)for(d=m.length;d>0;d-=1)if((r=g[m.slice(0,d).join("/")])&&(r=r[i])){o=r,a=u;break}if(o)break;!l&&y&&y[i]&&(l=y[i],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function y(t,n){return function(){var i=h.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),o.apply(e,i.concat([t,n]))}}function v(e){return function(t){return g(t,e)}}function b(e){return function(t){l[e]=t}}function x(n){if(m(c,n)){var i=c[n];delete c[n],u[n]=!0,t.apply(e,i)}if(!m(l,n)&&!m(u,n))throw new Error("No "+n);return l[n]}function w(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function _(e){return e?w(e):[]}function E(e){return function(){return p&&p.config&&p.config[e]||{}}}s=function(e,t){var n,i=w(e),r=i[0],o=t[1];return e=i[1],r&&(n=x(r=g(r,o))),r?e=n&&n.normalize?n.normalize(e,v(o)):g(e,o):(r=(i=w(e=g(e,o)))[0],e=i[1],r&&(n=x(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},a={require:function(e){return y(e)},exports:function(e){var t=l[e];return void 0!==t?t:l[e]={}},module:function(e){return{id:e,uri:"",exports:l[e],config:E(e)}}},t=function(t,n,i,r){var o,p,d,h,f,g,v,w=[],E=typeof i;if(g=_(r=r||t),"undefined"===E||"function"===E){for(n=!n.length&&i.length?["require","exports","module"]:n,f=0;f<n.length;f+=1)if("require"===(p=(h=s(n[f],g)).f))w[f]=a.require(t);else if("exports"===p)w[f]=a.exports(t),v=!0;else if("module"===p)o=w[f]=a.module(t);else if(m(l,p)||m(c,p)||m(u,p))w[f]=x(p);else{if(!h.p)throw new Error(t+" missing "+p);h.p.load(h.n,y(r,!0),b(p),{}),w[f]=l[p]}d=i?i.apply(l[t],w):void 0,t&&(o&&o.exports!==e&&o.exports!==l[t]?l[t]=o.exports:d===e&&v||(l[t]=d))}else t&&(l[t]=i)},n=i=o=function(n,i,r,l,c){if("string"==typeof n)return a[n]?a[n](i):x(s(n,_(i)).f);if(!n.splice){if((p=n).deps&&o(p.deps,p.callback),!i)return;i.splice?(n=i,i=r,r=null):n=e}return i=i||function(){},"function"==typeof r&&(r=l,l=c),l?t(e,n,i,r):setTimeout((function(){t(e,n,i,r)}),4),o},o.config=function(e){return o(e)},n._defined=l,(r=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),m(l,e)||m(c,e)||(c[e]=[e,t,n])}).amd={jQuery:!0}}(),t.requirejs=n,t.require=i,t.define=r),t.define("almond",(function(){})),t.define("jquery",[],(function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t})),t.define("select2/utils",["jquery"],(function(e){var t={};function n(e){var t=e.prototype,n=[];for(var i in t)"function"==typeof t[i]&&"constructor"!==i&&n.push(i);return n}t.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var r in t)n.call(t,r)&&(e[r]=t[r]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},t.Decorate=function(e,t){var i=n(t),r=n(e);function o(){var n=Array.prototype.unshift,i=t.prototype.constructor.length,r=e.prototype.constructor;i>0&&(n.call(arguments,e.prototype.constructor),r=t.prototype.constructor),r.apply(this,arguments)}function s(){this.constructor=o}t.displayName=e.displayName,o.prototype=new s;for(var a=0;a<r.length;a++){var l=r[a];o.prototype[l]=e.prototype[l]}for(var c=function(e){var n=function(){};e in o.prototype&&(n=o.prototype[e]);var i=t.prototype[e];return function(){return Array.prototype.unshift.call(arguments,n),i.apply(this,arguments)}},p=0;p<i.length;p++){var u=i[p];o.prototype[u]=c(u)}return o};var i=function(){this.listeners={}};i.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},i.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=e,e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},t.Observable=i,t.generateChars=function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t},t.bind=function(e,t){return function(){e.apply(t,arguments)}},t._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var o=n[r];(o=o.substring(0,1).toLowerCase()+o.substring(1))in i||(i[o]={}),r==n.length-1&&(i[o]=e[t]),i=i[o]}delete e[t]}}return e},t.hasScroll=function(t,n){var i=e(n),r=n.style.overflowX,o=n.style.overflowY;return(r!==o||"hidden"!==o&&"visible"!==o)&&("scroll"===r||"scroll"===o||i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth)},t.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,(function(e){return t[e]}))},t.__cache={};var r=0;return t.GetUniqueElementId=function(e){var n=e.getAttribute("data-select2-id");return null!=n||(n=e.id?"select2-data-"+e.id:"select2-data-"+(++r).toString()+"-"+t.generateChars(4),e.setAttribute("data-select2-id",n)),n},t.StoreData=function(e,n,i){var r=t.GetUniqueElementId(e);t.__cache[r]||(t.__cache[r]={}),t.__cache[r][n]=i},t.GetData=function(n,i){var r=t.GetUniqueElementId(n);return i?t.__cache[r]&&null!=t.__cache[r][i]?t.__cache[r][i]:e(n).data(i):t.__cache[r]},t.RemoveData=function(e){var n=t.GetUniqueElementId(e);null!=t.__cache[n]&&delete t.__cache[n],e.removeAttribute("data-select2-id")},t.copyNonInternalCssClasses=function(e,t){var n=e.getAttribute("class").trim().split(/\s+/);n=n.filter((function(e){return 0===e.indexOf("select2-")}));var i=t.getAttribute("class").trim().split(/\s+/);i=i.filter((function(e){return 0!==e.indexOf("select2-")}));var r=n.concat(i);e.setAttribute("class",r.join(" "))},t})),t.define("select2/results",["jquery","./utils"],(function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),r=this.options.get("translations").get(t.message);i.append(n(r(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],r=this.option(i);t.push(r)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(e,t){t.find(".select2-results").append(e)},n.prototype.sort=function(e){return this.options.get("sorter")(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option--selectable"),t=e.filter(".select2-results__option--selected");t.length>0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var n=this;this.data.current((function(i){var r=i.map((function(e){return e.id.toString()}));n.$results.find(".select2-results__option--selectable").each((function(){var n=e(this),i=t.GetData(this,"data"),o=""+i.id;null!=i.element&&i.element.selected||null==i.element&&r.indexOf(o)>-1?(this.classList.add("select2-results__option--selected"),n.attr("aria-selected","true")):(this.classList.remove("select2-results__option--selected"),n.attr("aria-selected","false"))}))}))},n.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(n){var i=document.createElement("li");i.classList.add("select2-results__option"),i.classList.add("select2-results__option--selectable");var r={role:"option"},o=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var s in(null!=n.element&&o.call(n.element,":disabled")||null==n.element&&n.disabled)&&(r["aria-disabled"]="true",i.classList.remove("select2-results__option--selectable"),i.classList.add("select2-results__option--disabled")),null==n.id&&i.classList.remove("select2-results__option--selectable"),null!=n._resultId&&(i.id=n._resultId),n.title&&(i.title=n.title),n.children&&(r.role="group",r["aria-label"]=n.text,i.classList.remove("select2-results__option--selectable"),i.classList.add("select2-results__option--group")),r){var a=r[s];i.setAttribute(s,a)}if(n.children){var l=e(i),c=document.createElement("strong");c.className="select2-results__group",this.template(n,c);for(var p=[],u=0;u<n.children.length;u++){var d=n.children[u],h=this.option(d);p.push(h)}var f=e("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"none"});f.append(p),l.append(c),l.append(f)}else this.template(n,i);return t.StoreData(i,"data",n),i},n.prototype.bind=function(n,i){var r=this,o=n.id+"-results";this.$results.attr("id",o),n.on("results:all",(function(e){r.clear(),r.append(e.data),n.isOpen()&&(r.setClasses(),r.highlightFirstItem())})),n.on("results:append",(function(e){r.append(e.data),n.isOpen()&&r.setClasses()})),n.on("query",(function(e){r.hideMessages(),r.showLoading(e)})),n.on("select",(function(){n.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())})),n.on("unselect",(function(){n.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())})),n.on("open",(function(){r.$results.attr("aria-expanded","true"),r.$results.attr("aria-hidden","false"),r.setClasses(),r.ensureHighlightVisible()})),n.on("close",(function(){r.$results.attr("aria-expanded","false"),r.$results.attr("aria-hidden","true"),r.$results.removeAttr("aria-activedescendant")})),n.on("results:toggle",(function(){var e=r.getHighlightedResults();0!==e.length&&e.trigger("mouseup")})),n.on("results:select",(function(){var e=r.getHighlightedResults();if(0!==e.length){var n=t.GetData(e[0],"data");e.hasClass("select2-results__option--selected")?r.trigger("close",{}):r.trigger("select",{data:n})}})),n.on("results:previous",(function(){var e=r.getHighlightedResults(),t=r.$results.find(".select2-results__option--selectable"),n=t.index(e);if(!(n<=0)){var i=n-1;0===e.length&&(i=0);var o=t.eq(i);o.trigger("mouseenter");var s=r.$results.offset().top,a=o.offset().top,l=r.$results.scrollTop()+(a-s);0===i?r.$results.scrollTop(0):a-s<0&&r.$results.scrollTop(l)}})),n.on("results:next",(function(){var e=r.getHighlightedResults(),t=r.$results.find(".select2-results__option--selectable"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var o=r.$results.offset().top+r.$results.outerHeight(!1),s=i.offset().top+i.outerHeight(!1),a=r.$results.scrollTop()+s-o;0===n?r.$results.scrollTop(0):s>o&&r.$results.scrollTop(a)}})),n.on("results:focus",(function(e){e.element[0].classList.add("select2-results__option--highlighted"),e.element[0].setAttribute("aria-selected","true")})),n.on("results:message",(function(e){r.displayMessage(e)})),e.fn.mousewheel&&this.$results.on("mousewheel",(function(e){var t=r.$results.scrollTop(),n=r.$results.get(0).scrollHeight-t+e.deltaY,i=e.deltaY>0&&t-e.deltaY<=0,o=e.deltaY<0&&n<=r.$results.height();i?(r.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):o&&(r.$results.scrollTop(r.$results.get(0).scrollHeight-r.$results.height()),e.preventDefault(),e.stopPropagation())})),this.$results.on("mouseup",".select2-results__option--selectable",(function(n){var i=e(this),o=t.GetData(this,"data");i.hasClass("select2-results__option--selected")?r.options.get("multiple")?r.trigger("unselect",{originalEvent:n,data:o}):r.trigger("close",{}):r.trigger("select",{originalEvent:n,data:o})})),this.$results.on("mouseenter",".select2-results__option--selectable",(function(n){var i=t.GetData(this,"data");r.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),r.trigger("results:focus",{data:i,element:e(this)})}))},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find(".select2-results__option--selectable").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),o=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),o=i(t,n);null==o?n.style.display="none":"string"==typeof o?n.innerHTML=r(o):e(n).append(o)},n})),t.define("select2/keys",[],(function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}})),t.define("select2/selection/base",["jquery","../utils","../keys"],(function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var n=e('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=t.GetData(this.$element[0],"old-tabindex")?this._tabindex=t.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),n.attr("title",this.$element.attr("title")),n.attr("tabindex",this._tabindex),n.attr("aria-disabled","false"),this.$selection=n,n},i.prototype.bind=function(e,t){var i=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",(function(e){i.trigger("focus",e)})),this.$selection.on("blur",(function(e){i._handleBlur(e)})),this.$selection.on("keydown",(function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()})),e.on("results:focus",(function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)})),e.on("selection:update",(function(e){i.update(e.data)})),e.on("open",(function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",r),i._attachCloseHandler(e)})),e.on("close",(function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.trigger("focus"),i._detachCloseHandler(e)})),e.on("enable",(function(){i.$selection.attr("tabindex",i._tabindex),i.$selection.attr("aria-disabled","false")})),e.on("disable",(function(){i.$selection.attr("tabindex","-1"),i.$selection.attr("aria-disabled","true")}))},i.prototype._handleBlur=function(t){var n=this;window.setTimeout((function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)}),1)},i.prototype._attachCloseHandler=function(n){e(document.body).on("mousedown.select2."+n.id,(function(n){var i=e(n.target).closest(".select2");e(".select2.select2-container--open").each((function(){this!=i[0]&&t.GetData(this,"element").select2("close")}))}))},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i.prototype.isEnabled=function(){return!this.isDisabled()},i.prototype.isDisabled=function(){return this.options.get("disabled")},i})),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],(function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e[0].classList.add("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",i),this.$selection.attr("aria-controls",i),this.$selection.on("mousedown",(function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})})),this.$selection.on("focus",(function(e){})),this.$selection.on("blur",(function(e){})),e.on("focus",(function(t){e.isOpen()||n.$selection.trigger("focus")}))},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i);var r=t.title||t.text;r?n.attr("title",r):n.removeAttr("title")}else this.clear()},r})),t.define("select2/selection/multiple",["jquery","./base","../utils"],(function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e[0].classList.add("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},i.prototype.bind=function(t,r){var o=this;i.__super__.bind.apply(this,arguments);var s=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s),this.$selection.on("click",(function(e){o.trigger("toggle",{originalEvent:e})})),this.$selection.on("click",".select2-selection__choice__remove",(function(t){if(!o.isDisabled()){var i=e(this).parent(),r=n.GetData(i[0],"data");o.trigger("unselect",{originalEvent:t,data:r})}})),this.$selection.on("keydown",".select2-selection__choice__remove",(function(e){o.isDisabled()||e.stopPropagation()}))},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e('<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">&times;</span></button><span class="select2-selection__choice__display"></span></li>')},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-",r=0;r<e.length;r++){var o=e[r],s=this.selectionContainer(),a=this.display(o,s),l=i+n.generateChars(4)+"-";o.id?l+=o.id:l+=n.generateChars(4),s.find(".select2-selection__choice__display").append(a).attr("id",l);var c=o.title||o.text;c&&s.attr("title",c);var p=this.options.get("translations").get("removeItem"),u=s.find(".select2-selection__choice__remove");u.attr("title",p()),u.attr("aria-label",p()),u.attr("aria-describedby",l),n.StoreData(s[0],"data",o),t.push(s)}this.$selection.find(".select2-selection__rendered").append(t)}},i})),t.define("select2/selection/placeholder",[],(function(){function e(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();n.html(this.display(t)),n[0].classList.add("select2-selection__placeholder"),n[0].classList.remove("select2-selection__choice");var i=t.title||t.text||n.text();return this.$selection.find(".select2-selection__rendered").attr("title",i),n},e.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(t.length>1||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},e})),t.define("select2/selection/allowClear",["jquery","../keys","../utils"],(function(e,t,n){function i(){}return i.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",(function(e){i._handleClear(e)})),t.on("keypress",(function(e){i._handleKeyboardClear(e,t)}))},i.prototype._handleClear=function(e,t){if(!this.isDisabled()){var i=this.$selection.find(".select2-selection__clear");if(0!==i.length){t.stopPropagation();var r=n.GetData(i[0],"data"),o=this.$element.val();this.$element.val(this.placeholder.id);var s={data:r};if(this.trigger("clear",s),s.prevented)this.$element.val(o);else{for(var a=0;a<r.length;a++)if(s={data:r[a]},this.trigger("unselect",s),s.prevented)return void this.$element.val(o);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},i.prototype._handleKeyboardClear=function(e,n,i){i.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},i.prototype.update=function(t,i){if(t.call(this,i),this.$selection.find(".select2-selection__clear").remove(),this.$selection[0].classList.remove("select2-selection--clearable"),!(this.$selection.find(".select2-selection__placeholder").length>0||0===i.length)){var r=this.$selection.find(".select2-selection__rendered").attr("id"),o=this.options.get("translations").get("removeAllItems"),s=e('<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">&times;</span></button>');s.attr("title",o()),s.attr("aria-label",o()),s.attr("aria-describedby",r),n.StoreData(s[0],"data",i),this.$selection.prepend(s),this.$selection[0].classList.add("select2-selection--clearable")}},i})),t.define("select2/selection/search",["jquery","../utils","../keys"],(function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=this.options.get("translations").get("search"),i=e('<span class="select2-search select2-search--inline"><textarea class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" ></textarea></span>');this.$searchContainer=i,this.$search=i.find("textarea"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",n());var r=t.call(this);return this._transferTabIndex(),r.append(this.$searchContainer),r},i.prototype.bind=function(e,i,r){var o=this,s=i.id+"-results",a=i.id+"-container";e.call(this,i,r),o.$search.attr("aria-describedby",a),i.on("open",(function(){o.$search.attr("aria-controls",s),o.$search.trigger("focus")})),i.on("close",(function(){o.$search.val(""),o.resizeSearch(),o.$search.removeAttr("aria-controls"),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")})),i.on("enable",(function(){o.$search.prop("disabled",!1),o._transferTabIndex()})),i.on("disable",(function(){o.$search.prop("disabled",!0)})),i.on("focus",(function(e){o.$search.trigger("focus")})),i.on("results:focus",(function(e){e.data._resultId?o.$search.attr("aria-activedescendant",e.data._resultId):o.$search.removeAttr("aria-activedescendant")})),this.$selection.on("focusin",".select2-search--inline",(function(e){o.trigger("focus",e)})),this.$selection.on("focusout",".select2-search--inline",(function(e){o._handleBlur(e)})),this.$selection.on("keydown",".select2-search--inline",(function(e){if(e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===o.$search.val()){var i=o.$selection.find(".select2-selection__choice").last();if(i.length>0){var r=t.GetData(i[0],"data");o.searchRemoveChoice(r),e.preventDefault()}}})),this.$selection.on("click",".select2-search--inline",(function(e){o.$search.val()&&e.stopPropagation()}));var l=document.documentMode,c=l&&l<=11;this.$selection.on("input.searchcheck",".select2-search--inline",(function(e){c?o.$selection.off("input.search input.searchcheck"):o.$selection.off("keyup.search")})),this.$selection.on("keyup.search input.search",".select2-search--inline",(function(e){if(c&&"input"===e.type)o.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&o.handleSearch(e)}}))},i.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},i.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.resizeSearch(),n&&this.$search.trigger("focus")},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="100%";""===this.$search.attr("placeholder")&&(e=.75*(this.$search.val().length+1)+"em"),this.$search.css("width",e)},i})),t.define("select2/selection/selectionCss",["../utils"],(function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this),i=this.options.get("selectionCssClass")||"";return-1!==i.indexOf(":all:")&&(i=i.replace(":all:",""),e.copyNonInternalCssClasses(n[0],this.$element[0])),n.addClass(i),n},t})),t.define("select2/selection/eventRelay",["jquery"],(function(e){function t(){}return t.prototype.bind=function(t,n,i){var r=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],s=["opening","closing","selecting","unselecting","clearing"];t.call(this,n,i),n.on("*",(function(t,n){if(-1!==o.indexOf(t)){n=n||{};var i=e.Event("select2:"+t,{params:n});r.$element.trigger(i),-1!==s.indexOf(t)&&(n.prevented=i.isDefaultPrevented())}}))},t})),t.define("select2/translation",["jquery","require"],(function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])},n})),t.define("select2/diacritics",[],(function(){return{"Ⓐ":"A",:"A",À:"A",Á:"A",Â:"A",Ầ:"A",Ấ:"A",Ẫ:"A",Ẩ:"A",Ã:"A",Ā:"A",Ă:"A",Ằ:"A",Ắ:"A",Ẵ:"A",Ẳ:"A",Ȧ:"A",Ǡ:"A",Ä:"A",Ǟ:"A",Ả:"A",Å:"A",Ǻ:"A",Ǎ:"A",Ȁ:"A",Ȃ:"A",Ạ:"A",Ậ:"A",Ặ:"A",Ḁ:"A",Ą:"A",Ⱥ:"A",Ɐ:"A",Ꜳ:"AA",Æ:"AE",Ǽ:"AE",Ǣ:"AE",Ꜵ:"AO",Ꜷ:"AU",Ꜹ:"AV",Ꜻ:"AV",Ꜽ:"AY","Ⓑ":"B",:"B",Ḃ:"B",Ḅ:"B",Ḇ:"B",Ƀ:"B",Ƃ:"B",Ɓ:"B","Ⓒ":"C",:"C",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",Ç:"C",Ḉ:"C",Ƈ:"C",Ȼ:"C",Ꜿ:"C","Ⓓ":"D",:"D",Ḋ:"D",Ď:"D",Ḍ:"D",Ḑ:"D",Ḓ:"D",Ḏ:"D",Đ:"D",Ƌ:"D",Ɗ:"D",Ɖ:"D",Ꝺ:"D",DZ:"DZ",DŽ:"DZ",Dz:"Dz",Dž:"Dz","Ⓔ":"E",:"E",È:"E",É:"E",Ê:"E",Ề:"E",Ế:"E",Ễ:"E",Ể:"E",Ẽ:"E",Ē:"E",Ḕ:"E",Ḗ:"E",Ĕ:"E",Ė:"E",Ë:"E",Ẻ:"E",Ě:"E",Ȅ:"E",Ȇ:"E",Ẹ:"E",Ệ:"E",Ȩ:"E",Ḝ:"E",Ę:"E",Ḙ:"E",Ḛ:"E",Ɛ:"E",Ǝ:"E","Ⓕ":"F",:"F",Ḟ:"F",Ƒ:"F",Ꝼ:"F","Ⓖ":"G",:"G",Ǵ:"G",Ĝ:"G",Ḡ:"G",Ğ:"G",Ġ:"G",Ǧ:"G",Ģ:"G",Ǥ:"G",Ɠ:"G",Ꞡ:"G",Ᵹ:"G",Ꝿ:"G","Ⓗ":"H",:"H",Ĥ:"H",Ḣ:"H",Ḧ:"H",Ȟ:"H",Ḥ:"H",Ḩ:"H",Ḫ:"H",Ħ:"H",Ⱨ:"H",Ⱶ:"H",Ɥ:"H","Ⓘ":"I",:"I",Ì:"I",Í:"I",Î:"I",Ĩ:"I",Ī:"I",Ĭ:"I",İ:"I",Ï:"I",Ḯ:"I",Ỉ:"I",Ǐ:"I",Ȉ:"I",Ȋ:"I",Ị:"I",Į:"I",Ḭ:"I",Ɨ:"I","Ⓙ":"J",:"J",Ĵ:"J",Ɉ:"J","Ⓚ":"K",:"K",Ḱ:"K",Ǩ:"K",Ḳ:"K",Ķ:"K",Ḵ:"K",Ƙ:"K",Ⱪ:"K",Ꝁ:"K",Ꝃ:"K",Ꝅ:"K",Ꞣ:"K","Ⓛ":"L",:"L",Ŀ:"L",Ĺ:"L",Ľ:"L",Ḷ:"L",Ḹ:"L",Ļ:"L",Ḽ:"L",Ḻ:"L",Ł:"L",Ƚ:"L",Ɫ:"L",Ⱡ:"L",Ꝉ:"L",Ꝇ:"L",Ꞁ:"L",LJ:"LJ",Lj:"Lj","Ⓜ":"M",:"M",Ḿ:"M",Ṁ:"M",Ṃ:"M",Ɱ:"M",Ɯ:"M","Ⓝ":"N",:"N",Ǹ:"N",Ń:"N",Ñ:"N",Ṅ:"N",Ň:"N",Ṇ:"N",Ņ:"N",Ṋ:"N",Ṉ:"N",Ƞ:"N",Ɲ:"N",Ꞑ:"N",Ꞥ:"N",NJ:"NJ",Nj:"Nj","Ⓞ":"O",:"O",Ò:"O",Ó:"O",Ô:"O",Ồ:"O",Ố:"O",Ỗ:"O",Ổ:"O",Õ:"O",Ṍ:"O",Ȭ:"O",Ṏ:"O",Ō:"O",Ṑ:"O",Ṓ:"O",Ŏ:"O",Ȯ:"O",Ȱ:"O",Ö:"O",Ȫ:"O",Ỏ:"O",Ő:"O",Ǒ:"O",Ȍ:"O",Ȏ:"O",Ơ:"O",Ờ:"O",Ớ:"O",Ỡ:"O",Ở:"O",Ợ:"O",Ọ:"O",Ộ:"O",Ǫ:"O",Ǭ:"O",Ø:"O",Ǿ:"O",Ɔ:"O",Ɵ:"O",Ꝋ:"O",Ꝍ:"O",Œ:"OE",Ƣ:"OI",Ꝏ:"OO",Ȣ:"OU","Ⓟ":"P",:"P",Ṕ:"P",Ṗ:"P",Ƥ:"P",Ᵽ:"P",Ꝑ:"P",Ꝓ:"P",Ꝕ:"P","Ⓠ":"Q",:"Q",Ꝗ:"Q",Ꝙ:"Q",Ɋ:"Q","Ⓡ":"R",:"R",Ŕ:"R",Ṙ:"R",Ř:"R",Ȑ:"R",Ȓ:"R",Ṛ:"R",Ṝ:"R",Ŗ:"R",Ṟ:"R",Ɍ:"R",Ɽ:"R",:"R",Ꞧ:"R",Ꞃ:"R","Ⓢ":"S",:"S",ẞ:"S",Ś:"S",Ṥ:"S",Ŝ:"S",Ṡ:"S",Š:"S",Ṧ:"S",Ṣ:"S",Ṩ:"S",Ș:"S",Ş:"S",Ȿ:"S",Ꞩ:"S",Ꞅ:"S","Ⓣ":"T",:"T",Ṫ:"T",Ť:"T",Ṭ:"T",Ț:"T",Ţ:"T",Ṱ:"T",Ṯ:"T",Ŧ:"T",Ƭ:"T",Ʈ:"T",Ⱦ:"T",Ꞇ:"T",Ꜩ:"TZ","Ⓤ":"U",:"U",Ù:"U",Ú:"U",Û:"U",Ũ:"U",Ṹ:"U",Ū:"U",Ṻ:"U",Ŭ:"U",Ü:"U",Ǜ:"U",Ǘ:"U",Ǖ:"U",Ǚ:"U",Ủ:"U",Ů:"U",Ű:"U",Ǔ:"U",Ȕ:"U",Ȗ:"U",Ư:"U",Ừ:"U",Ứ:"U",Ữ:"U",Ử:"U",Ự:"U",Ụ:"U",Ṳ:"U",Ų:"U",Ṷ:"U",Ṵ:"U",Ʉ:"U","Ⓥ":"V",:"V",Ṽ:"V",Ṿ:"V",Ʋ:"V",Ꝟ:"V",Ʌ:"V",Ꝡ:"VY","Ⓦ":"W",:"W",Ẁ:"W",Ẃ:"W",Ŵ:"W",Ẇ:"W",Ẅ:"W",Ẉ:"W",Ⱳ:"W","Ⓧ":"X",:"X",Ẋ:"X",Ẍ:"X","Ⓨ":"Y",:"Y",Ỳ:"Y",Ý:"Y",Ŷ:"Y",Ỹ:"Y",Ȳ:"Y",Ẏ:"Y",Ÿ:"Y",Ỷ:"Y",Ỵ:"Y",Ƴ:"Y",Ɏ:"Y",Ỿ:"Y","Ⓩ":"Z",:"Z",Ź:"Z",Ẑ:"Z",Ż:"Z",Ž:"Z",Ẓ:"Z",Ẕ:"Z",Ƶ:"Z",Ȥ:"Z",Ɀ:"Z",Ⱬ:"Z",Ꝣ:"Z","ⓐ":"a",:"a",ẚ:"a",à:"a",á:"a",â:"a",ầ:"a",ấ:"a",ẫ:"a",ẩ:"a",ã:"a",ā:"a",ă:"a",ằ:"a",ắ:"a",ẵ:"a",ẳ:"a",ȧ:"a",ǡ:"a",ä:"a",ǟ:"a",ả:"a",å:"a",ǻ:"a",ǎ:"a",ȁ:"a",ȃ:"a",ạ:"a",ậ:"a",ặ:"a",ḁ:"a",ą:"a",ⱥ:"a",ɐ:"a",ꜳ:"aa",æ:"ae",ǽ:"ae",ǣ:"ae",ꜵ:"ao",ꜷ:"au",ꜹ:"av",ꜻ:"av",ꜽ:"ay","ⓑ":"b",:"b",ḃ:"b",ḅ:"b",ḇ:"b",ƀ:"b",ƃ:"b",ɓ:"b","ⓒ":"c",:"c",ć:"c",ĉ:"c",ċ:"c",č:"c",ç:"c",ḉ:"c",ƈ:"c",ȼ:"c",ꜿ:"c",ↄ:"c","ⓓ":"d",:"d",ḋ:"d",ď:"d",ḍ:"d",ḑ:"d",ḓ:"d",ḏ:"d",đ:"d",ƌ:"d",ɖ:"d",ɗ:"d",ꝺ:"d",dz:"dz",dž:"dz","ⓔ":"e",:"e",è:"e",é:"e",ê:"e",ề:"e",ế:"e",ễ:"e",ể:"e",ẽ:"e",ē:"e",ḕ:"e",ḗ:"e",ĕ:"e",ė:"e",ë:"e",ẻ:"e",ě:"e",ȅ:"e",ȇ:"e",ẹ:"e",ệ:"e",ȩ:"e",ḝ:"e",ę:"e",ḙ:"e",ḛ:"e",ɇ:"e",ɛ:"e",ǝ:"e","ⓕ":"f",:"f",ḟ:"f",ƒ:"f",ꝼ:"f","ⓖ":"g",:"g",ǵ:"g",ĝ:"g",ḡ:"g",ğ:"g",ġ:"g",ǧ:"g",ģ:"g",ǥ:"g",ɠ:"g",ꞡ:"g",ᵹ:"g",ꝿ:"g","ⓗ":"h",:"h",ĥ:"h",ḣ:"h",ḧ:"h",ȟ:"h",ḥ:"h",ḩ:"h",ḫ:"h",ẖ:"h",ħ:"h",ⱨ:"h",ⱶ:"h",ɥ:"h",ƕ:"hv","ⓘ":"i",:"i",ì:"i",í:"i",î:"i",ĩ:"i",ī:"i",ĭ:"i",ï:"i",ḯ:"i",ỉ:"i",ǐ:"i",ȉ:"i",ȋ:"i",ị:"i",į:"i",ḭ:"i",ɨ:"i",ı:"i","ⓙ":"j",:"j",ĵ:"j",ǰ:"j",ɉ:"j","ⓚ":"k",:"k",ḱ:"k",ǩ:"k",ḳ:"k",ķ:"k",ḵ:"k",ƙ:"k",ⱪ:"k",ꝁ:"k",ꝃ:"k",ꝅ:"k",ꞣ:"k","ⓛ":"l",:"l",ŀ:"l",ĺ:"l",ľ:"l",ḷ:"l",ḹ:"l",ļ:"l",ḽ:"l",ḻ:"l",ſ:"l",ł:"l",ƚ:"l",ɫ:"l",ⱡ:"l",ꝉ:"l",ꞁ:"l",ꝇ:"l",lj:"lj","ⓜ":"m",:"m",ḿ:"m",ṁ:"m",ṃ:"m",ɱ:"m",ɯ:"m","ⓝ":"n",:"n",ǹ:"n",ń:"n",ñ:"n",ṅ:"n",ň:"n",ṇ:"n",ņ:"n",ṋ:"n",ṉ:"n",ƞ:"n",ɲ:"n",ʼn:"n",ꞑ:"n",ꞥ:"n",nj:"nj","ⓞ":"o",:"o",ò:"o",ó:"o",ô:"o",ồ:"o",ố:"o",ỗ:"o",ổ:"o",õ:"o",ṍ:"o",ȭ:"o",ṏ:"o",ō:"o",ṑ:"o",ṓ:"o",ŏ:"o",ȯ:"o",ȱ:"o",ö:"o",ȫ:"o",ỏ:"o",ő:"o",ǒ:"o",ȍ:"o",ȏ:"o",ơ:"o",ờ:"o",ớ:"o",ỡ:"o",ở:"o",ợ:"o",ọ:"o",ộ:"o",ǫ:"o",ǭ:"o",ø:"o",ǿ:"o",ɔ:"o",ꝋ:"o",ꝍ:"o",ɵ:"o",œ:"oe",ƣ:"oi",ȣ:"ou",ꝏ:"oo","ⓟ":"p",:"p",ṕ:"p",ṗ:"p",ƥ:"p",ᵽ:"p",ꝑ:"p",ꝓ:"p",ꝕ:"p","ⓠ":"q",:"q",ɋ:"q",ꝗ:"q",ꝙ:"q","ⓡ":"r",:"r",ŕ:"r",ṙ:"r",ř:"r",ȑ:"r",ȓ:"r",ṛ:"r",ṝ:"r",ŗ:"r",ṟ:"r",ɍ:"r",ɽ:"r",ꝛ:"r",ꞧ:"r",ꞃ:"r","ⓢ":"s",:"s",ß:"s",ś:"s",ṥ:"s",ŝ:"s",ṡ:"s",š:"s",ṧ:"s",ṣ:"s",ṩ:"s",ș:"s",ş:"s",ȿ:"s",ꞩ:"s",ꞅ:"s",ẛ:"s","ⓣ":"t",:"t",ṫ:"t",ẗ:"t",ť:"t",ṭ:"t",ț:"t",ţ:"t",ṱ:"t",ṯ:"t",ŧ:"t",ƭ:"t",ʈ:"t",ⱦ:"t",ꞇ:"t",ꜩ:"tz","ⓤ":"u",:"u",ù:"u",ú:"u",û:"u",ũ:"u",ṹ:"u",ū:"u",ṻ:"u",ŭ:"u",ü:"u",ǜ:"u",ǘ:"u",ǖ:"u",ǚ:"u",ủ:"u",ů:"u",ű:"u",ǔ:"u",ȕ:"u",ȗ:"u",ư:"u",ừ:"u",ứ:"u",ữ:"u",ử:"u",ự:"u",ụ:"u",ṳ:"u",ų:"u",ṷ:"u",ṵ:"u",ʉ:"u","ⓥ":"v",:"v",ṽ:"v",ṿ:"v",ʋ:"v",ꝟ:"v",ʌ:"v",ꝡ:"vy","ⓦ":"w",:"w",ẁ:"w",ẃ:"w",ŵ:"w",ẇ:"w",ẅ:"w",ẘ:"w",ẉ:"w",ⱳ:"w","ⓧ":"x",:"x",ẋ:"x",ẍ:"x","ⓨ":"y",:"y",ỳ:"y",ý:"y",ŷ:"y",ỹ:"y",ȳ:"y",ẏ:"y",ÿ:"y",ỷ:"y",ẙ:"y",ỵ:"y",ƴ:"y",ɏ:"y",ỿ:"y","ⓩ":"z",:"z",ź:"z",ẑ:"z",ż:"z",ž:"z",ẓ:"z",ẕ:"z",ƶ:"z",ȥ:"z",ɀ:"z",ⱬ:"z",ꝣ:"z",Ά:"Α",Έ:"Ε",Ή:"Η",Ί:"Ι",Ϊ:"Ι",Ό:"Ο",Ύ:"Υ",Ϋ:"Υ",Ώ:"Ω",ά:"α",έ:"ε",ή:"η",ί:"ι",ϊ:"ι",ΐ:"ι",ό:"ο",ύ:"υ",ϋ:"υ",ΰ:"υ",ώ:"ω",ς:"σ","":"'"}})),t.define("select2/data/base",["../utils"],(function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var i=t.id+"-result-";return i+=e.generateChars(4),null!=n.id?i+="-"+n.id.toString():i+="-"+e.generateChars(4),i},t})),t.define("select2/data/select",["./base","../utils","jquery"],(function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,e),i.prototype.current=function(e){var t=this;e(Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),(function(e){return t.item(n(e))})))},i.prototype.select=function(e){var t=this;if(e.selected=!0,null!=e.element&&"option"===e.element.tagName.toLowerCase())return e.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current((function(n){var i=[];(e=[e]).push.apply(e,n);for(var r=0;r<e.length;r++){var o=e[r].id;-1===i.indexOf(o)&&i.push(o)}t.$element.val(i),t.$element.trigger("input").trigger("change")}));else{var n=e.id;this.$element.val(n),this.$element.trigger("input").trigger("change")}},i.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple")){if(e.selected=!1,null!=e.element&&"option"===e.element.tagName.toLowerCase())return e.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current((function(n){for(var i=[],r=0;r<n.length;r++){var o=n[r].id;o!==e.id&&-1===i.indexOf(o)&&i.push(o)}t.$element.val(i),t.$element.trigger("input").trigger("change")}))}},i.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",(function(e){n.select(e.data)})),e.on("unselect",(function(e){n.unselect(e.data)}))},i.prototype.destroy=function(){this.$element.find("*").each((function(){t.RemoveData(this)}))},i.prototype.query=function(e,t){var i=[],r=this;this.$element.children().each((function(){if("option"===this.tagName.toLowerCase()||"optgroup"===this.tagName.toLowerCase()){var t=n(this),o=r.item(t),s=r.matches(e,o);null!==s&&i.push(s)}})),t({results:i})},i.prototype.addOptions=function(e){this.$element.append(e)},i.prototype.option=function(e){var i;e.children?(i=document.createElement("optgroup")).label=e.text:void 0!==(i=document.createElement("option")).textContent?i.textContent=e.text:i.innerText=e.text,void 0!==e.id&&(i.value=e.id),e.disabled&&(i.disabled=!0),e.selected&&(i.selected=!0),e.title&&(i.title=e.title);var r=this._normalizeItem(e);return r.element=i,t.StoreData(i,"data",r),n(i)},i.prototype.item=function(e){var i={};if(null!=(i=t.GetData(e[0],"data")))return i;var r=e[0];if("option"===r.tagName.toLowerCase())i={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if("optgroup"===r.tagName.toLowerCase()){i={text:e.prop("label"),children:[],title:e.prop("title")};for(var o=e.children("option"),s=[],a=0;a<o.length;a++){var l=n(o[a]),c=this.item(l);s.push(c)}i.children=s}return(i=this._normalizeItem(i)).element=e[0],t.StoreData(e[0],"data",i),i},i.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});var t={selected:!1,disabled:!1};return null!=(e=n.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},t,e)},i.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},i})),t.define("select2/data/array",["./select","../utils","jquery"],(function(e,t,n){function i(e,t){this._dataToConvert=t.get("data")||[],i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype.bind=function(e,t){i.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},i.prototype.select=function(e){var t=this.$element.find("option").filter((function(t,n){return n.value==e.id.toString()}));0===t.length&&(t=this.option(e),this.addOptions(t)),i.__super__.select.call(this,e)},i.prototype.convertToOptions=function(e){var t=this,i=this.$element.find("option"),r=i.map((function(){return t.item(n(this)).id})).get(),o=[];function s(e){return function(){return n(this).val()==e.id}}for(var a=0;a<e.length;a++){var l=this._normalizeItem(e[a]);if(r.indexOf(l.id)>=0){var c=i.filter(s(l)),p=this.item(c),u=n.extend(!0,{},l,p),d=this.option(u);c.replaceWith(d)}else{var h=this.option(l);if(l.children){var f=this.convertToOptions(l.children);h.append(f)}o.push(h)}}return o},i})),t.define("select2/data/ajax",["./array","../utils","jquery"],(function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var r=n.ajax(e);return r.then(t),r.fail(i),r}};return n.extend({},t,e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(e,t){var i=this;null!=this._request&&("function"==typeof this._request.abort&&this._request.abort(),this._request=null);var r=n.extend({type:"GET"},this.ajaxOptions);function o(){var n=r.transport(r,(function(n){var r=i.processResults(n,e);i.options.get("debug")&&window.console&&console.error&&(r&&r.results&&Array.isArray(r.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(r)}),(function(){(!("status"in n)||0!==n.status&&"0"!==n.status)&&i.trigger("results:message",{message:"errorLoading"})}));i._request=n}"function"==typeof r.url&&(r.url=r.url.call(this.$element,e)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(o,this.ajaxOptions.delay)):o()},i})),t.define("select2/data/tags",["jquery"],(function(e){function t(e,t,n){var i=n.get("tags"),r=n.get("createTag");void 0!==r&&(this.createTag=r);var o=n.get("insertTag");if(void 0!==o&&(this.insertTag=o),e.call(this,t,n),Array.isArray(i))for(var s=0;s<i.length;s++){var a=i[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return t.prototype.query=function(e,t,n){var i=this;function r(e,o){for(var s=e.results,a=0;a<s.length;a++){var l=s[a],c=null!=l.children&&!r({results:l.children},!0);if((l.text||"").toUpperCase()===(t.term||"").toUpperCase()||c)return!o&&(e.data=s,void n(e))}if(o)return!0;var p=i.createTag(t);if(null!=p){var u=i.option(p);u.attr("data-select2-tag","true"),i.addOptions([u]),i.insertTag(s,p)}e.results=s,n(e)}this._removeOldTags(),null!=t.term&&null==t.page?e.call(this,t,r):e.call(this,t,n)},t.prototype.createTag=function(e,t){if(null==t.term)return null;var n=t.term.trim();return""===n?null:{id:n,text:n}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){this.$element.find("option[data-select2-tag]").each((function(){this.selected||e(this).remove()}))},t})),t.define("select2/data/tokenizer",["jquery"],(function(e){function t(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(t,n,i){var r=this;function o(t){var n=r._normalizeItem(t);if(!r.$element.find("option").filter((function(){return e(this).val()===n.id})).length){var i=r.option(n);i.attr("data-select2-tag",!0),r._removeOldTags(),r.addOptions([i])}s(n)}function s(e){r.trigger("select",{data:e})}n.term=n.term||"";var a=this.tokenizer(n,this.options,o);a.term!==n.term&&(this.$search.length&&(this.$search.val(a.term),this.$search.trigger("focus")),n.term=a.term),t.call(this,n,i)},t.prototype.tokenizer=function(t,n,i,r){for(var o=i.get("tokenSeparators")||[],s=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<s.length;){var c=s[a];if(-1!==o.indexOf(c)){var p=s.substr(0,a),u=l(e.extend({},n,{term:p}));null!=u?(r(u),s=s.substr(a+1)||"",a=0):a++}else a++}return{term:s}},t})),t.define("select2/data/minimumInputLength",[],(function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e})),t.define("select2/data/maximumInputLength",[],(function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e})),t.define("select2/data/maximumSelectionLength",[],(function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",(function(){i._checkIfMaximumSelected()}))},e.prototype.query=function(e,t,n){var i=this;this._checkIfMaximumSelected((function(){e.call(i,t,n)}))},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current((function(e){var i=null!=e?e.length:0;n.maximumSelectionLength>0&&i>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t&&t()}))},e})),t.define("select2/dropdown",["jquery","./utils"],(function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n})),t.define("select2/dropdown/search",["jquery"],(function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this),i=this.options.get("translations").get("search"),r=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=r,this.$search=r.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",i()),n.prepend(r),n},t.prototype.bind=function(t,n,i){var r=this,o=n.id+"-results";t.call(this,n,i),this.$search.on("keydown",(function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()})),this.$search.on("input",(function(t){e(this).off("keyup")})),this.$search.on("keyup input",(function(e){r.handleSearch(e)})),n.on("open",(function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",o),r.$search.trigger("focus"),window.setTimeout((function(){r.$search.trigger("focus")}),0)})),n.on("close",(function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")})),n.on("focus",(function(){n.isOpen()||r.$search.trigger("focus")})),n.on("results:all",(function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer[0].classList.remove("select2-search--hide"):r.$searchContainer[0].classList.add("select2-search--hide"))})),n.on("results:focus",(function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}))},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t})),t.define("select2/dropdown/hidePlaceholder",[],(function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;i>=0;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e})),t.define("select2/dropdown/infiniteScroll",["jquery"],(function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",(function(e){i.lastParams=e,i.loading=!0})),t.on("query:append",(function(e){i.lastParams=e,i.loading=!0})),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},t.prototype.loadMoreIfNeeded=function(){var t=e.contains(document.documentElement,this.$loadingMore[0]);!this.loading&&t&&this.$results.offset().top+this.$results.outerHeight(!1)+50>=this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)&&this.loadMore()},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t})),t.define("select2/dropdown/attachBody",["jquery","../utils"],(function(e,t){function n(t,n,i){this.$dropdownParent=e(i.get("dropdownParent")||document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",(function(){i._showDropdown(),i._attachPositioningHandler(t),i._bindContainerResultHandlers(t)})),t.on("close",(function(){i._hideDropdown(),i._detachPositioningHandler(t)})),this.$dropdownContainer.on("mousedown",(function(e){e.stopPropagation()}))},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t[0].classList.remove("select2"),t[0].classList.add("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>"),i=t.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("results:append",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("results:message",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("select",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("unselect",(function(){n._positionDropdown(),n._resizeDropdown()})),this._containerResultsHandlersBound=!0}},n.prototype._attachPositioningHandler=function(n,i){var r=this,o="scroll.select2."+i.id,s="resize.select2."+i.id,a="orientationchange.select2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each((function(){t.StoreData(this,"select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})})),l.on(o,(function(n){var i=t.GetData(this,"select2-scroll-position");e(this).scrollTop(i.y)})),e(window).on(o+" "+s+" "+a,(function(e){r._positionDropdown(),r._resizeDropdown()}))},n.prototype._detachPositioningHandler=function(n,i){var r="scroll.select2."+i.id,o="resize.select2."+i.id,s="orientationchange.select2."+i.id;this.$container.parents().filter(t.hasScroll).off(r),e(window).off(r+" "+o+" "+s)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown[0].classList.contains("select2-dropdown--above"),i=this.$dropdown[0].classList.contains("select2-dropdown--below"),r=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=o.top,s.bottom=o.top+s.height;var a={height:this.$dropdown.outerHeight(!1)},l={top:t.scrollTop(),bottom:t.scrollTop()+t.height()},c=l.top<o.top-a.height,p=l.bottom>o.bottom+a.height,u={left:o.left,top:s.bottom},d=this.$dropdownParent;"static"===d.css("position")&&(d=d.offsetParent());var h={top:0,left:0};(e.contains(document.body,d[0])||d[0].isConnected)&&(h=d.offset()),u.top-=h.top,u.left-=h.left,n||i||(r="below"),p||!c||n?!c&&p&&n&&(r="below"):r="above",("above"==r||n&&"below"!==r)&&(u.top=s.top-h.top-a.height),null!=r&&(this.$dropdown[0].classList.remove("select2-dropdown--below"),this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+r),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+r)),this.$dropdownContainer.css(u)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n})),t.define("select2/dropdown/minimumResultsForSearch",[],(function(){function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}function t(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return t.prototype.showSearch=function(t,n){return!(e(n.data.results)<this.minimumResultsForSearch)&&t.call(this,n)},t})),t.define("select2/dropdown/selectOnClose",["../utils"],(function(e){function t(){}return t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",(function(e){i._handleSelectOnClose(e)}))},t.prototype._handleSelectOnClose=function(t,n){if(n&&null!=n.originalSelect2Event){var i=n.originalSelect2Event;if("select"===i._type||"unselect"===i._type)return}var r=this.getHighlightedResults();if(!(r.length<1)){var o=e.GetData(r[0],"data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},t})),t.define("select2/dropdown/closeOnSelect",[],(function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",(function(e){i._selectTriggered(e)})),t.on("unselect",(function(e){i._selectTriggered(e)}))},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e})),t.define("select2/dropdown/dropdownCss",["../utils"],(function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this),i=this.options.get("dropdownCssClass")||"";return-1!==i.indexOf(":all:")&&(i=i.replace(":all:",""),e.copyNonInternalCssClasses(n[0],this.$element[0])),n.addClass(i),n},t})),t.define("select2/dropdown/tagsSearchHighlight",["../utils"],(function(e){function t(){}return t.prototype.highlightFirstItem=function(t){var n=this.$results.find(".select2-results__option--selectable:not(.select2-results__option--selected)");if(n.length>0){var i=n.first(),r=e.GetData(i[0],"data").element;if(r&&r.getAttribute&&"true"===r.getAttribute("data-select2-tag"))return void i.trigger("mouseenter")}t.call(this)},t})),t.define("select2/i18n/en",[],(function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}})),t.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./dropdown/dropdownCss","./dropdown/tagsSearchHighlight","./i18n/en"],(function(e,t,n,i,r,o,s,a,l,c,p,u,d,h,f,m,g,y,v,b,x,w,_,E,O,P,k,S,C,T,A){function M(){this.reset()}return M.prototype.apply=function(p){if(null==(p=e.extend(!0,{},this.defaults,p)).dataAdapter&&(null!=p.ajax?p.dataAdapter=f:null!=p.data?p.dataAdapter=h:p.dataAdapter=d,p.minimumInputLength>0&&(p.dataAdapter=c.Decorate(p.dataAdapter,y)),p.maximumInputLength>0&&(p.dataAdapter=c.Decorate(p.dataAdapter,v)),p.maximumSelectionLength>0&&(p.dataAdapter=c.Decorate(p.dataAdapter,b)),p.tags&&(p.dataAdapter=c.Decorate(p.dataAdapter,m)),null==p.tokenSeparators&&null==p.tokenizer||(p.dataAdapter=c.Decorate(p.dataAdapter,g))),null==p.resultsAdapter&&(p.resultsAdapter=t,null!=p.ajax&&(p.resultsAdapter=c.Decorate(p.resultsAdapter,E)),null!=p.placeholder&&(p.resultsAdapter=c.Decorate(p.resultsAdapter,_)),p.selectOnClose&&(p.resultsAdapter=c.Decorate(p.resultsAdapter,k)),p.tags&&(p.resultsAdapter=c.Decorate(p.resultsAdapter,T))),null==p.dropdownAdapter){if(p.multiple)p.dropdownAdapter=x;else{var u=c.Decorate(x,w);p.dropdownAdapter=u}0!==p.minimumResultsForSearch&&(p.dropdownAdapter=c.Decorate(p.dropdownAdapter,P)),p.closeOnSelect&&(p.dropdownAdapter=c.Decorate(p.dropdownAdapter,S)),null!=p.dropdownCssClass&&(p.dropdownAdapter=c.Decorate(p.dropdownAdapter,C)),p.dropdownAdapter=c.Decorate(p.dropdownAdapter,O)}null==p.selectionAdapter&&(p.multiple?p.selectionAdapter=i:p.selectionAdapter=n,null!=p.placeholder&&(p.selectionAdapter=c.Decorate(p.selectionAdapter,r)),p.allowClear&&(p.selectionAdapter=c.Decorate(p.selectionAdapter,o)),p.multiple&&(p.selectionAdapter=c.Decorate(p.selectionAdapter,s)),null!=p.selectionCssClass&&(p.selectionAdapter=c.Decorate(p.selectionAdapter,a)),p.selectionAdapter=c.Decorate(p.selectionAdapter,l)),p.language=this._resolveLanguage(p.language),p.language.push("en");for(var A=[],M=0;M<p.language.length;M++){var D=p.language[M];-1===A.indexOf(D)&&A.push(D)}return p.language=A,p.translations=this._processTranslations(p.language,p.debug),p},M.prototype.reset=function(){function t(e){function t(e){return u[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function n(i,r){if(null==i.term||""===i.term.trim())return r;if(r.children&&r.children.length>0){for(var o=e.extend(!0,{},r),s=r.children.length-1;s>=0;s--)null==n(i,r.children[s])&&o.children.splice(s,1);return o.children.length>0?o:n(i,o)}var a=t(r.text).toUpperCase(),l=t(i.term).toUpperCase();return a.indexOf(l)>-1?r:null}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:{},matcher:n,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},M.prototype.applyFromElement=function(e,t){var n=e.language,i=this.defaults.language,r=t.prop("lang"),o=t.closest("[lang]").prop("lang"),s=Array.prototype.concat.call(this._resolveLanguage(r),this._resolveLanguage(n),this._resolveLanguage(i),this._resolveLanguage(o));return e.language=s,e},M.prototype._resolveLanguage=function(t){if(!t)return[];if(e.isEmptyObject(t))return[];if(e.isPlainObject(t))return[t];var n;n=Array.isArray(t)?t:[t];for(var i=[],r=0;r<n.length;r++)if(i.push(n[r]),"string"==typeof n[r]&&n[r].indexOf("-")>0){var o=n[r].split("-")[0];i.push(o)}return i},M.prototype._processTranslations=function(t,n){for(var i=new p,r=0;r<t.length;r++){var o=new p,s=t[r];if("string"==typeof s)try{o=p.loadPath(s)}catch(e){try{s=this.defaults.amdLanguageBase+s,o=p.loadPath(s)}catch(e){n&&window.console&&console.warn&&console.warn('Select2: The language file for "'+s+'" could not be automatically loaded. A fallback will be used instead.')}}else o=e.isPlainObject(s)?new p(s):s;i.extend(o)}return i},M.prototype.set=function(t,n){var i={};i[e.camelCase(t)]=n;var r=c._convertData(i);e.extend(!0,this.defaults,r)},new M})),t.define("select2/options",["jquery","./defaults","./utils"],(function(e,t,n){function i(e,n){this.options=e,null!=n&&this.fromElement(n),null!=n&&(this.options=t.applyFromElement(this.options,n)),this.options=t.apply(this.options)}return i.prototype.fromElement=function(t){var i=["select2"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.autocomplete&&t.prop("autocomplete")&&(this.options.autocomplete=t.prop("autocomplete")),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),n.GetData(t[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),n.StoreData(t[0],"data",n.GetData(t[0],"select2Tags")),n.StoreData(t[0],"tags",!0)),n.GetData(t[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),t.attr("ajax--url",n.GetData(t[0],"ajaxUrl")),n.StoreData(t[0],"ajax-Url",n.GetData(t[0],"ajaxUrl")));var r={};function o(e,t){return t.toUpperCase()}for(var s=0;s<t[0].attributes.length;s++){var a=t[0].attributes[s].name,l="data-";if(a.substr(0,l.length)==l){var c=a.substring(l.length),p=n.GetData(t[0],c);r[c.replace(/-([a-z])/g,o)]=p}}e.fn.jquery&&"1."==e.fn.jquery.substr(0,2)&&t[0].dataset&&(r=e.extend(!0,{},t[0].dataset,r));var u=e.extend(!0,{},n.GetData(t[0]),r);for(var d in u=n._convertData(u))i.indexOf(d)>-1||(e.isPlainObject(this.options[d])?e.extend(this.options[d],u[d]):this.options[d]=u[d]);return this},i.prototype.get=function(e){return this.options[e]},i.prototype.set=function(e,t){this.options[e]=t},i})),t.define("select2/core",["jquery","./options","./utils","./keys"],(function(e,t,n,i){var r=function(e,i){null!=n.GetData(e[0],"select2")&&n.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),i=i||{},this.options=new t(i,e),r.__super__.constructor.call(this);var o=e.attr("tabindex")||0;n.StoreData(e[0],"old-tabindex",o),e.attr("tabindex","-1");var s=this.options.get("dataAdapter");this.dataAdapter=new s(e,this.options);var a=this.render();this._placeContainer(a);var l=this.options.get("selectionAdapter");this.selection=new l(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var c=this.options.get("dropdownAdapter");this.dropdown=new c(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var p=this.options.get("resultsAdapter");this.results=new p(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var u=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current((function(e){u.trigger("selection:update",{data:e})})),e[0].classList.add("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),n.StoreData(e[0],"select2",this),e.data("select2",this)};return n.Extend(r,n.Observable),r.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},r.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},r.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"==t){var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(n);if(null!==c&&c.length>=1)return c[1]}return null}return"computedstyle"==t?window.getComputedStyle(e[0]).width:t},r.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},r.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2",(function(){e.dataAdapter.current((function(t){e.trigger("selection:update",{data:t})}))})),this.$element.on("focus.select2",(function(t){e.trigger("focus",t)})),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this._observer=new window.MutationObserver((function(t){e._syncA(),e._syncS(t)})),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})},r.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",(function(t,n){e.trigger(t,n)}))},r.prototype._registerSelectionEvents=function(){var e=this,t=["toggle","focus"];this.selection.on("toggle",(function(){e.toggleDropdown()})),this.selection.on("focus",(function(t){e.focus(t)})),this.selection.on("*",(function(n,i){-1===t.indexOf(n)&&e.trigger(n,i)}))},r.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",(function(t,n){e.trigger(t,n)}))},r.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",(function(t,n){e.trigger(t,n)}))},r.prototype._registerEvents=function(){var e=this;this.on("open",(function(){e.$container[0].classList.add("select2-container--open")})),this.on("close",(function(){e.$container[0].classList.remove("select2-container--open")})),this.on("enable",(function(){e.$container[0].classList.remove("select2-container--disabled")})),this.on("disable",(function(){e.$container[0].classList.add("select2-container--disabled")})),this.on("blur",(function(){e.$container[0].classList.remove("select2-container--focus")})),this.on("query",(function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,(function(n){e.trigger("results:all",{data:n,query:t})}))})),this.on("query:append",(function(t){this.dataAdapter.query(t,(function(n){e.trigger("results:append",{data:n,query:t})}))})),this.on("keypress",(function(t){var n=t.which;e.isOpen()?n===i.ESC||n===i.UP&&t.altKey?(e.close(t),t.preventDefault()):n===i.ENTER||n===i.TAB?(e.trigger("results:select",{}),t.preventDefault()):n===i.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===i.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===i.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&t.altKey)&&(e.open(),t.preventDefault())}))},r.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},r.prototype._isChangeMutation=function(e){var t=this;if(e.addedNodes&&e.addedNodes.length>0){for(var n=0;n<e.addedNodes.length;n++)if(e.addedNodes[n].selected)return!0}else{if(e.removedNodes&&e.removedNodes.length>0)return!0;if(Array.isArray(e))return e.some((function(e){return t._isChangeMutation(e)}))}return!1},r.prototype._syncSubtree=function(e){var t=this._isChangeMutation(e),n=this;t&&this.dataAdapter.current((function(e){n.trigger("selection:update",{data:e})}))},r.prototype.trigger=function(e,t){var n=r.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in i){var o=i[e],s={prevented:!1,name:e,args:t};if(n.call(this,o,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},r.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},r.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},r.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")},r.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")},r.prototype.focus=function(e){this.hasFocus()||(this.$container[0].classList.add("select2-container--focus"),this.trigger("focus",{}))},r.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},r.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current((function(t){e=t})),e},r.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];Array.isArray(t)&&(t=t.map((function(e){return e.toString()}))),this.$element.val(t).trigger("input").trigger("change")},r.prototype.destroy=function(){n.RemoveData(this.$container[0]),this.$container.remove(),this._observer.disconnect(),this._observer=null,this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",n.GetData(this.$element[0],"old-tabindex")),this.$element[0].classList.remove("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),n.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},r.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container[0].classList.add("select2-container--"+this.options.get("theme")),n.StoreData(t[0],"element",this.$element),t},r})),t.define("jquery-mousewheel",["jquery"],(function(e){return e})),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],(function(e,t,n,i,r){if(null==e.fn.select2){var o=["open","close","destroy"];e.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each((function(){var i=e.extend(!0,{},t);new n(e(this),i)})),this;if("string"==typeof t){var i,s=Array.prototype.slice.call(arguments,1);return this.each((function(){var e=r.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),i=e[t].apply(e,s)})),o.indexOf(t)>-1?this:i}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=i),n})),{define:t.define,require:t.require}}(),n=t.require("jquery.select2");return e.fn.select2.amd=t,n})?i.apply(t,r):i)||(e.exports=o)},651:e=>{e.exports=function(e,t){for(var n=e.split("."),i=t.split("."),r=0;r<3;r++){var o=Number(n[r]),s=Number(i[r]);if(o>s)return 1;if(s>o)return-1;if(!isNaN(o)&&isNaN(s))return 1;if(isNaN(o)&&!isNaN(s))return-1}return 0}},942:(e,t)=>{var n;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=s(e,o(n)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)i.call(e,n)&&e[n]&&(t=s(t,n));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},603:(e,t)=>{"use strict";const n=Object.prototype.toString,i=Object.prototype.hasOwnProperty;function r(e){return void 0===e}function o(e){return void 0!==e}function s(e){return null==e}function a(e){return"[object Array]"===n.call(e)}function l(e){return"[object Object]"===n.call(e)}function c(e){const t=n.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function p(e){if(!a(e))throw new Error("must supply array")}function u(e,t){return!s(e)&&i.call(e,t)}function d(e,t){const n=_(t);let i;return h(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function h(e,t){let n,i;if(r(e))return;const o=a(e)?O:E;for(let r in e)if(u(e,r)&&(n=e[r],i=t(n,o(r)),!1===i))return n}function f(e,t,n){return h(e,(function(e,i){n=t(n,e,i)})),n}function m(e,t){return!!f(e,(function(e,n,i){return e&&t(n,i)}),!0)}function g(e,t){let n=[];return h(e,(function(e,i){n.push(t(e,i))})),n}function y(e){return e&&Object.keys(e)||[]}function v(e,t,n={}){return t=w(t),h(e,(function(e){let i=t(e)||"_",r=n[i];r||(r=n[i]=[]),r.push(e)})),n}function b(e,...t){e=w(e);let n={};return h(t,(t=>v(t,e,n))),g(n,(function(e,t){return e[0]}))}const x=b;function w(e){return c(e)?e:t=>t[e]}function _(e){return c(e)?e:t=>t===e}function E(e){return e}function O(e){return Number(e)}t.assign=function(e,...t){return Object.assign(e,...t)},t.bind=function(e,t){return e.bind(t)},t.debounce=function(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},t.ensureArray=p,t.every=m,t.filter=function(e,t){const n=_(t);let i=[];return h(e,(function(e,t){n(e,t)&&i.push(e)})),i},t.find=d,t.findIndex=function(e,t){const n=_(t);let i=a(e)?-1:void 0;return h(e,(function(e,t){if(n(e,t))return i=t,!1})),i},t.flatten=function(e){return Array.prototype.concat.apply([],e)},t.forEach=h,t.get=function(e,t,n){let i=e;return h(t,(function(e){if(s(i))return i=void 0,!1;i=i[e]})),r(i)?n:i},t.groupBy=v,t.has=u,t.isArray=a,t.isDefined=o,t.isFunction=c,t.isNil=s,t.isNumber=function(e){return"[object Number]"===n.call(e)},t.isObject=l,t.isString=function(e){return"[object String]"===n.call(e)},t.isUndefined=r,t.keys=y,t.map=g,t.matchPattern=function(e){return function(t){return m(e,(function(e,n){return t[n]===e}))}},t.merge=function e(t,...n){return n.length?(h(n,(function(n){n&&l(n)&&h(n,(function(n,i){if("__proto__"===i)return;let r=t[i];l(n)?(l(r)||(r={}),t[i]=e(r,n)):t[i]=n}))})),t):t},t.omit=function(e,t){let n={};return h(Object(e),(function(e,i){-1===t.indexOf(i)&&(n[i]=e)})),n},t.pick=function(e,t){let n={},i=Object(e);return h(t,(function(t){t in i&&(n[t]=e[t])})),n},t.reduce=f,t.set=function(e,t,n){let i=e;return h(t,(function(e,a){if("number"!=typeof e&&"string"!=typeof e)throw new Error("illegal key type: "+typeof e+". Key should be of type number or string.");if("constructor"===e)throw new Error("illegal key: constructor");if("__proto__"===e)throw new Error("illegal key: __proto__");let l=t[a+1],c=i[e];o(l)&&s(c)&&(c=i[e]=isNaN(+l)?{}:[]),r(l)?r(n)?delete i[e]:i[e]=n:i=c})),e},t.size=function(e){return y(e).length},t.some=function(e,t){return!!d(e,t)},t.sortBy=function(e,t){t=w(t);let n=[];return h(e,(function(e,i){let r=t(e,i),o={d:r,v:e};for(var s=0;s<n.length;s++){let{d:e}=n[s];if(r<e)return void n.splice(s,0,o)}n.push(o)})),g(n,(e=>e.v))},t.throttle=function(e,t){let n=!1;return function(...i){n||(e(...i),n=!0,setTimeout((()=>{n=!1}),t))}},t.unionBy=x,t.uniqueBy=b,t.values=function(e){return g(e,(e=>e))},t.without=function(e,t){if(r(e))return[];p(e);const n=_(t);return e.filter((function(e,t){return!n(e,t)}))}},198:e=>{"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=t,e=[],i.O=(t,n,r,o)=>{if(!n){var s=1/0;for(p=0;p<e.length;p++){for(var[n,r,o]=e[p],a=!0,l=0;l<n.length;l++)(!1&o||s>=o)&&Object.keys(i.O).every((e=>i.O[e](n[l])))?n.splice(l--,1):(a=!1,o<s&&(s=o));if(a){e.splice(p--,1);var c=r();void 0!==c&&(t=c)}}return t}o=o||0;for(var p=e.length;p>0&&e[p-1][2]>o;p--)e[p]=e[p-1];e[p]=[n,r,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={847:0,252:0,132:0};i.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[s,a,l]=n,c=0;if(s.some((t=>0!==e[t]))){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(l)var p=l(i)}for(t&&t(n);c<s.length;c++)o=s[c],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(p)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.O(void 0,[252,132],(()=>i(606))),i.O(void 0,[252,132],(()=>i(181))),i.O(void 0,[252,132],(()=>i(376)));var r=i.O(void 0,[252,132],(()=>i(889)));r=i.O(r)})();
//# sourceMappingURL=app.js.map