@witlink/workflow 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- (function(yt,K){typeof exports=="object"&&typeof module<"u"?K(exports,require("ant-design-vue/es"),require("vue"),require("pinia"),require("vue-i18n"),require("axios"),require("ant-design-vue"),require("@witlink/components")):typeof define=="function"&&define.amd?define(["exports","ant-design-vue/es","vue","pinia","vue-i18n","axios","ant-design-vue","@witlink/components"],K):(yt=typeof globalThis<"u"?globalThis:yt||self,K(yt["witlink-workflow"]={},yt.es,yt.Vue,yt.pinia,yt.vueI18n,yt.Axios,yt.antDesignVue,yt.components))})(this,function(yt,K,h,_p,an,l_,st,Lo){"use strict";let $o=an.createI18n({locale:"en_US",fallbackLocale:"en_US",legacy:!1,messages:{},silentTranslationWarn:!0});function u_(e){e&&($o=e)}function p_(e,t){const n=$o.global.t;if(n)return n(e,t)}function f_(e){return h.getCurrentScope()?(h.onScopeDispose(e),!0):!1}const d_=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const h_=Object.prototype.toString,m_=e=>h_.call(e)==="[object Object]",g_=()=>{};function v_(...e){if(e.length!==1)return h.toRef(...e);const t=e[0];return typeof t=="function"?h.readonly(h.customRef(()=>({get:t,set:g_}))):h.ref(t)}function y_(e,t){function n(...i){return new Promise((r,o)=>{Promise.resolve(e(()=>t.apply(this,i),{fn:t,thisArg:this,args:i})).then(r).catch(o)})}return n}const bp=e=>e();function __(e=bp,t={}){const{initialState:n="active"}=t,i=v_(n==="active");function r(){i.value=!1}function o(){i.value=!0}const a=(...s)=>{i.value&&e(...s)};return{isActive:h.readonly(i),pause:r,resume:o,eventFilter:a}}function ec(e){return Array.isArray(e)?e:[e]}function b_(e){return h.getCurrentInstance()}function E_(e,t,n={}){const{eventFilter:i=bp,...r}=n;return h.watch(e,y_(i,t),r)}function x_(e,t,n={}){const{eventFilter:i,initialState:r="active",...o}=n,{eventFilter:a,pause:s,resume:c,isActive:l}=__(i,{initialState:r});return{stop:E_(e,t,{...o,eventFilter:a}),pause:s,resume:c,isActive:l}}function w_(e,t=!0,n){b_()?h.onMounted(e,n):t?e():h.nextTick(e)}function S_(e,t,n){return h.watch(e,t,{...n,immediate:!0})}const tc=d_?window:void 0;function C_(e){var t;const n=h.toValue(e);return(t=n==null?void 0:n.$el)!=null?t:n}function Ep(...e){const t=[],n=()=>{t.forEach(s=>s()),t.length=0},i=(s,c,l,u)=>(s.addEventListener(c,l,u),()=>s.removeEventListener(c,l,u)),r=h.computed(()=>{const s=ec(h.toValue(e[0])).filter(c=>c!=null);return s.every(c=>typeof c!="string")?s:void 0}),o=S_(()=>{var s,c;return[(c=(s=r.value)==null?void 0:s.map(l=>C_(l)))!=null?c:[tc].filter(l=>l!=null),ec(h.toValue(r.value?e[1]:e[0])),ec(h.unref(r.value?e[2]:e[1])),h.toValue(r.value?e[3]:e[2])]},([s,c,l,u])=>{if(n(),!(s!=null&&s.length)||!(c!=null&&c.length)||!(l!=null&&l.length))return;const p=m_(u)?{...u}:u;t.push(...s.flatMap(f=>c.flatMap(d=>l.map(m=>i(f,d,m,p)))))},{flush:"post"}),a=()=>{o(),n()};return f_(n),a}const jo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Fo="__vueuse_ssr_handlers__",R_=T_();function T_(){return Fo in jo||(jo[Fo]=jo[Fo]||{}),jo[Fo]}function P_(e,t){return R_[e]||t}function A_(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const k_={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},xp="vueuse-storage";function wp(e,t,n,i={}){var r;const{flush:o="pre",deep:a=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,mergeDefaults:l=!1,shallow:u,window:p=tc,eventFilter:f,onError:d=L=>{console.error(L)},initOnMounted:m}=i,v=(u?h.shallowRef:h.ref)(typeof t=="function"?t():t),g=h.computed(()=>h.toValue(e));if(!n)try{n=P_("getDefaultStorage",()=>{var L;return(L=tc)==null?void 0:L.localStorage})()}catch(L){d(L)}if(!n)return v;const w=h.toValue(t),C=A_(w),x=(r=i.serializer)!=null?r:k_[C],{pause:E,resume:S}=x_(v,()=>N(v.value),{flush:o,deep:a,eventFilter:f});h.watch(g,()=>O(),{flush:o}),p&&s&&w_(()=>{n instanceof Storage?Ep(p,"storage",O,{passive:!0}):Ep(p,xp,I),m&&O()}),m||O();function R(L,B){if(p){const z={key:g.value,oldValue:L,newValue:B,storageArea:n};p.dispatchEvent(n instanceof Storage?new StorageEvent("storage",z):new CustomEvent(xp,{detail:z}))}}function N(L){try{const B=n.getItem(g.value);if(L==null)R(B,null),n.removeItem(g.value);else{const z=x.write(L);B!==z&&(n.setItem(g.value,z),R(B,z))}}catch(B){d(B)}}function P(L){const B=L?L.newValue:n.getItem(g.value);if(B==null)return c&&w!=null&&n.setItem(g.value,x.write(w)),w;if(!L&&l){const z=x.read(B);return typeof l=="function"?l(z,w):C==="object"&&!Array.isArray(z)?{...w,...z}:z}else return typeof B!="string"?B:x.read(B)}function O(L){if(!(L&&L.storageArea!==n)){if(L&&L.key==null){v.value=w;return}if(!(L&&L.key!==g.value)){E();try{(L==null?void 0:L.newValue)!==x.write(v.value)&&(v.value=P(L))}catch(B){d(B)}finally{L?h.nextTick(S):S()}}}}function I(L){O(L.detail)}return v}const Rr=new Map;function D_(e){const t=h.getCurrentScope();function n(s){var c;const l=Rr.get(e)||new Set;l.add(s),Rr.set(e,l);const u=()=>r(s);return(c=t==null?void 0:t.cleanups)==null||c.push(u),u}function i(s){function c(...l){r(c),s(...l)}return n(c)}function r(s){const c=Rr.get(e);c&&(c.delete(s),c.size||o())}function o(){Rr.delete(e)}function a(s,c){var l;(l=Rr.get(e))==null||l.forEach(u=>u(s,c))}return{on:n,once:i,off:r,emit:a,reset:o}}const nc=l_.create({baseURL:"/wfapi",timeout:3e4});function M_(e){const n=wp("Access-Token",{}).value;let i;return typeof n=="string"?i=n:n&&(i=n.value),i&&(e.headers={...e.headers,"Access-Token":i}),e}function N_(e){const t=e.data;if(!(t instanceof Blob)&&(!t||t.code===void 0))st.message.error(t+"");else if(!(t instanceof Blob)&&t.code<0){let n=p_("err."+t.code);n===`err.${t.code}`&&(n=t.message?t.message:"unknow error"),st.message.error(n)}return e}function O_(e){if(e.response){const t=e.response.data;e.response.status===403?st.message.error(t.message):e.response.status===401&&st.message.error("Authorization verification failed")}else st.message.error(e+"");return Promise.reject(e)}nc.interceptors.request.use(M_,e=>Promise.reject(e)),nc.interceptors.response.use(N_,O_);function _t(e){return nc(e).then(t=>t.data)}const Ct={getLangInfo:e=>_t({url:"/system/api/auth/lang-info",method:"get",params:e}),getBusTypeTree:e=>_t({url:"/workorder/api/flow/type/public-tree-root",method:"get",params:e}),getBusTypeTreeData:e=>_t({url:"/workorder/api/flow/type/public-tree-child",method:"get",params:e}),getBpmnList:e=>_t({url:"/workorder/api/flow/bpmn/search-list",method:"get",params:e}),switchBpmnStatus:e=>_t({url:"/workorder/api/flow/bpmn/switch",method:"post",params:e}),delBpmn:e=>_t({url:"/workorder/api/flow/bpmn/delete",method:"delete",params:e}),getBpmnDetail:e=>_t({url:"/workorder/api/flow/bpmn/detail-view",method:"get",params:e}),getBpmnXml:e=>_t({url:"/workorder/api/flow/bpmn/update-load",method:"get",params:e}),getLinkList:e=>_t({url:"/workorder/api/flow/link/public-search-list",method:"get",params:e}),getBranchTree:e=>_t({url:"/system/api/sys/branch/public-search-list-bpmn",method:"get",params:e}),getUserList:e=>_t({url:"/system/api/sys/user/public-search-list-bpmn",method:"get",params:e}),getRoleList:e=>_t({url:"/system/api/sys/role/public-search-list-bpmn",method:"get",params:e}),bpmnInsert:e=>_t({url:"/workorder/api/flow/bpmn/insert",method:"post",data:e}),bpmnUpdate:e=>_t({url:"/workorder/api/flow/bpmn/update",method:"post",data:e})},ic=_p.defineStore("wfApp",{state:()=>({lang:wp("locale",""),theme:{colorPrimary:"#165dff",colorInfo:"#165dff",borderRadius:4},localeMap:{}}),actions:{getLangInfo(e){const t=this.lang;t&&($o.global.locale.value=t,this.localeMap[t]||Ct.getLangInfo({isoCode:t}).then(n=>{if(n.code===0){const i=n.result.detail;this.localeMap[t]=i,$o.global.mergeLocaleMessage(t,i),e&&(this.setLang(""),setTimeout(()=>{this.setLang(t)}))}}))},setLang(e){this.lang=e},setTheme(e){e&&(this.theme=e)},setupLangWatcher(){this.getLangInfo(!0),h.watch(()=>this.lang,()=>this.getLangInfo(!0))}}}),I_=h.defineComponent({__name:"index",setup(e){const t="wf",n=ic();return(i,r)=>{const o=K.App,a=K.ConfigProvider;return h.openBlock(),h.createBlock(a,{prefixCls:h.unref(t),theme:{token:h.unref(n).theme}},{default:h.withCtx(()=>[h.createVNode(o,null,{default:h.withCtx(()=>[h.renderSlot(i.$slots,"default")]),_:3})]),_:3},8,["prefixCls","theme"])}}}),rc={};function B_(e,t={immediate:!0}){const n=an.useI18n(),{t:i}=n,r=h.ref({}),o=[].concat(e);function a(){const l=o.map(u=>{const p=rc[u];if(Lo.isPromise(p))return p;if(p)return Promise.resolve([u,p]);const f=_t({method:"get",url:"/system/api/sys/dictionary/public-dict-combo-ex",params:{tableType:u}}).then(d=>(rc[u]=d,[u,d]));return rc[u]=f,f});return Promise.all(l).then(u=>{u.forEach(p=>{const[f,d]=p;d&&d.code===0&&(r.value[f]=d.result)})})}h.watchEffect(()=>{const l=r.value;Object.keys(l).forEach(p=>{const f=l[p];for(const d in f){const m=`dct.${p}${d}`,v=i(m);f[d].text=v!==m?v:f[d].text}})}),t.immediate&&a();function s(l,u){const p=r.value[l];if(p&&u){const f=p[u];return f&&f.text?f.text:"-"}return"-"}function c(l){const u=r.value[l];return u?Object.keys(u).map(f=>({label:u[f].text,value:f})):[]}return[r,{fetchDict:a,toList:c,getDictLabel:s}]}const L_=h.defineComponent({__name:"index",props:{type:{type:String,default:""},value:[Number,String],style:{type:Object,default(){return{}}},dictClass:{type:String},showTooltip:{type:Boolean,default:!1}},setup(e){const t=e,[n]=B_(t.type,{immediate:!0}),i=h.ref();h.watchEffect(()=>{let o="-";const a=n.value[t.type];if(a&&!Lo.isNullOrUndef(t.value))if(Lo.isString(t.value))o=t.value.split(",").filter(c=>c).map(c=>{var l;return(l=a[c])==null?void 0:l.text}).join("、")||"-";else{const s=a[t.value];o=(s==null?void 0:s.text)||"-"}i.value=o});const r=h.computed(()=>{if(t.dictClass)return`${t.dictClass} status${t.value}`});return(o,a)=>{const s=K.Tooltip;return e.showTooltip?(h.openBlock(),h.createBlock(s,{key:0,placement:"topLeft",title:h.unref(i)},{default:h.withCtx(()=>[h.createElementVNode("span",{class:h.normalizeClass(h.unref(r)),style:h.normalizeStyle(e.style)},h.toDisplayString(h.unref(i)),7)]),_:1},8,["title"])):(h.openBlock(),h.createElementBlock("span",{key:1,class:h.normalizeClass(h.unref(r)),style:h.normalizeStyle(e.style)},h.toDisplayString(h.unref(i)),7))}}}),oc="el",$_="is-",di=(e,t,n,i,r)=>{let o=`${e}-${t}`;return n&&(o+=`-${n}`),i&&(o+=`__${i}`),r&&(o+=`--${r}`),o},j_=Symbol("namespaceContextKey"),F_=e=>{const t=h.getCurrentInstance()?h.inject(j_,h.ref(oc)):h.ref(oc);return h.computed(()=>h.unref(t)||oc)},Sp=(e,t)=>{const n=F_();return{namespace:n,b:(v="")=>di(n.value,e,v,"",""),e:v=>v?di(n.value,e,"",v,""):"",m:v=>v?di(n.value,e,"","",v):"",be:(v,g)=>v&&g?di(n.value,e,v,g,""):"",em:(v,g)=>v&&g?di(n.value,e,"",v,g):"",bm:(v,g)=>v&&g?di(n.value,e,v,"",g):"",bem:(v,g,w)=>v&&g&&w?di(n.value,e,v,g,w):"",is:(v,...g)=>{const w=g.length>=1?g[0]:!0;return v&&w?`${$_}${v}`:""},cssVar:v=>{const g={};for(const w in v)v[w]&&(g[`--${n.value}-${w}`]=v[w]);return g},cssVarName:v=>`--${n.value}-${v}`,cssVarBlock:v=>{const g={};for(const w in v)v[w]&&(g[`--${n.value}-${e}-${w}`]=v[w]);return g},cssVarBlockName:v=>`--${n.value}-${e}-${v}`}};/**
1
+ (function(yt,K){typeof exports=="object"&&typeof module<"u"?K(exports,require("ant-design-vue/es"),require("vue"),require("pinia"),require("vue-i18n"),require("axios"),require("ant-design-vue"),require("@witlink/components")):typeof define=="function"&&define.amd?define(["exports","ant-design-vue/es","vue","pinia","vue-i18n","axios","ant-design-vue","@witlink/components"],K):(yt=typeof globalThis<"u"?globalThis:yt||self,K(yt["witlink-workflow"]={},yt.es,yt.Vue,yt.pinia,yt.vueI18n,yt.Axios,yt.antDesignVue,yt.components))})(this,function(yt,K,h,_p,an,l_,st,Lo){"use strict";let $o=an.createI18n({locale:"en_US",fallbackLocale:"en_US",legacy:!1,messages:{},silentTranslationWarn:!0});function u_(e){e&&($o=e)}function p_(e,t){const n=$o.global.t;if(n)return n(e,t)}function f_(e){return h.getCurrentScope()?(h.onScopeDispose(e),!0):!1}const d_=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const h_=Object.prototype.toString,m_=e=>h_.call(e)==="[object Object]",g_=()=>{};function v_(...e){if(e.length!==1)return h.toRef(...e);const t=e[0];return typeof t=="function"?h.readonly(h.customRef(()=>({get:t,set:g_}))):h.ref(t)}function y_(e,t){function n(...i){return new Promise((r,o)=>{Promise.resolve(e(()=>t.apply(this,i),{fn:t,thisArg:this,args:i})).then(r).catch(o)})}return n}const bp=e=>e();function __(e=bp,t={}){const{initialState:n="active"}=t,i=v_(n==="active");function r(){i.value=!1}function o(){i.value=!0}const a=(...s)=>{i.value&&e(...s)};return{isActive:h.readonly(i),pause:r,resume:o,eventFilter:a}}function ec(e){return Array.isArray(e)?e:[e]}function b_(e){return h.getCurrentInstance()}function E_(e,t,n={}){const{eventFilter:i=bp,...r}=n;return h.watch(e,y_(i,t),r)}function x_(e,t,n={}){const{eventFilter:i,initialState:r="active",...o}=n,{eventFilter:a,pause:s,resume:c,isActive:l}=__(i,{initialState:r});return{stop:E_(e,t,{...o,eventFilter:a}),pause:s,resume:c,isActive:l}}function w_(e,t=!0,n){b_()?h.onMounted(e,n):t?e():h.nextTick(e)}function S_(e,t,n){return h.watch(e,t,{...n,immediate:!0})}const tc=d_?window:void 0;function C_(e){var t;const n=h.toValue(e);return(t=n==null?void 0:n.$el)!=null?t:n}function Ep(...e){const t=[],n=()=>{t.forEach(s=>s()),t.length=0},i=(s,c,l,u)=>(s.addEventListener(c,l,u),()=>s.removeEventListener(c,l,u)),r=h.computed(()=>{const s=ec(h.toValue(e[0])).filter(c=>c!=null);return s.every(c=>typeof c!="string")?s:void 0}),o=S_(()=>{var s,c;return[(c=(s=r.value)==null?void 0:s.map(l=>C_(l)))!=null?c:[tc].filter(l=>l!=null),ec(h.toValue(r.value?e[1]:e[0])),ec(h.unref(r.value?e[2]:e[1])),h.toValue(r.value?e[3]:e[2])]},([s,c,l,u])=>{if(n(),!(s!=null&&s.length)||!(c!=null&&c.length)||!(l!=null&&l.length))return;const p=m_(u)?{...u}:u;t.push(...s.flatMap(f=>c.flatMap(d=>l.map(m=>i(f,d,m,p)))))},{flush:"post"}),a=()=>{o(),n()};return f_(n),a}const jo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Fo="__vueuse_ssr_handlers__",R_=T_();function T_(){return Fo in jo||(jo[Fo]=jo[Fo]||{}),jo[Fo]}function P_(e,t){return R_[e]||t}function A_(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const k_={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},xp="vueuse-storage";function wp(e,t,n,i={}){var r;const{flush:o="pre",deep:a=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,mergeDefaults:l=!1,shallow:u,window:p=tc,eventFilter:f,onError:d=L=>{console.error(L)},initOnMounted:m}=i,v=(u?h.shallowRef:h.ref)(typeof t=="function"?t():t),g=h.computed(()=>h.toValue(e));if(!n)try{n=P_("getDefaultStorage",()=>{var L;return(L=tc)==null?void 0:L.localStorage})()}catch(L){d(L)}if(!n)return v;const w=h.toValue(t),C=A_(w),x=(r=i.serializer)!=null?r:k_[C],{pause:E,resume:S}=x_(v,()=>N(v.value),{flush:o,deep:a,eventFilter:f});h.watch(g,()=>O(),{flush:o}),p&&s&&w_(()=>{n instanceof Storage?Ep(p,"storage",O,{passive:!0}):Ep(p,xp,I),m&&O()}),m||O();function R(L,B){if(p){const z={key:g.value,oldValue:L,newValue:B,storageArea:n};p.dispatchEvent(n instanceof Storage?new StorageEvent("storage",z):new CustomEvent(xp,{detail:z}))}}function N(L){try{const B=n.getItem(g.value);if(L==null)R(B,null),n.removeItem(g.value);else{const z=x.write(L);B!==z&&(n.setItem(g.value,z),R(B,z))}}catch(B){d(B)}}function P(L){const B=L?L.newValue:n.getItem(g.value);if(B==null)return c&&w!=null&&n.setItem(g.value,x.write(w)),w;if(!L&&l){const z=x.read(B);return typeof l=="function"?l(z,w):C==="object"&&!Array.isArray(z)?{...w,...z}:z}else return typeof B!="string"?B:x.read(B)}function O(L){if(!(L&&L.storageArea!==n)){if(L&&L.key==null){v.value=w;return}if(!(L&&L.key!==g.value)){E();try{(L==null?void 0:L.newValue)!==x.write(v.value)&&(v.value=P(L))}catch(B){d(B)}finally{L?h.nextTick(S):S()}}}}function I(L){O(L.detail)}return v}const Rr=new Map;function D_(e){const t=h.getCurrentScope();function n(s){var c;const l=Rr.get(e)||new Set;l.add(s),Rr.set(e,l);const u=()=>r(s);return(c=t==null?void 0:t.cleanups)==null||c.push(u),u}function i(s){function c(...l){r(c),s(...l)}return n(c)}function r(s){const c=Rr.get(e);c&&(c.delete(s),c.size||o())}function o(){Rr.delete(e)}function a(s,c){var l;(l=Rr.get(e))==null||l.forEach(u=>u(s,c))}return{on:n,once:i,off:r,emit:a,reset:o}}const nc=l_.create({baseURL:"/cisapi",timeout:3e4});function M_(e){const n=wp("Access-Token",{}).value;let i;return typeof n=="string"?i=n:n&&(i=n.value),i&&(e.headers={...e.headers,"Access-Token":i}),e}function N_(e){const t=e.data;if(!(t instanceof Blob)&&(!t||t.code===void 0))st.message.error(t+"");else if(!(t instanceof Blob)&&t.code<0){let n=p_("err."+t.code);n===`err.${t.code}`&&(n=t.message?t.message:"unknow error"),st.message.error(n)}return e}function O_(e){if(e.response){const t=e.response.data;e.response.status===403?st.message.error(t.message):e.response.status===401&&st.message.error("Authorization verification failed")}else st.message.error(e+"");return Promise.reject(e)}nc.interceptors.request.use(M_,e=>Promise.reject(e)),nc.interceptors.response.use(N_,O_);function _t(e){return nc(e).then(t=>t.data)}const Ct={getLangInfo:e=>_t({url:"/system/api/auth/lang-info",method:"get",params:e}),getBusTypeTree:e=>_t({url:"/workorder/api/flow/type/public-tree-root",method:"get",params:e}),getBusTypeTreeData:e=>_t({url:"/workorder/api/flow/type/public-tree-child",method:"get",params:e}),getBpmnList:e=>_t({url:"/workorder/api/flow/bpmn/search-list",method:"get",params:e}),switchBpmnStatus:e=>_t({url:"/workorder/api/flow/bpmn/switch",method:"post",params:e}),delBpmn:e=>_t({url:"/workorder/api/flow/bpmn/delete",method:"delete",params:e}),getBpmnDetail:e=>_t({url:"/workorder/api/flow/bpmn/detail-view",method:"get",params:e}),getBpmnXml:e=>_t({url:"/workorder/api/flow/bpmn/update-load",method:"get",params:e}),getLinkList:e=>_t({url:"/workorder/api/flow/link/public-search-list",method:"get",params:e}),getBranchTree:e=>_t({url:"/system/api/sys/branch/public-search-list-bpmn",method:"get",params:e}),getUserList:e=>_t({url:"/system/api/sys/user/public-search-list-bpmn",method:"get",params:e}),getRoleList:e=>_t({url:"/system/api/sys/role/public-search-list-bpmn",method:"get",params:e}),bpmnInsert:e=>_t({url:"/workorder/api/flow/bpmn/insert",method:"post",data:e}),bpmnUpdate:e=>_t({url:"/workorder/api/flow/bpmn/update",method:"post",data:e})},ic=_p.defineStore("wfApp",{state:()=>({lang:wp("locale",""),theme:{colorPrimary:"#165dff",colorInfo:"#165dff",borderRadius:4},localeMap:{}}),actions:{getLangInfo(e){const t=this.lang;t&&($o.global.locale.value=t,this.localeMap[t]||Ct.getLangInfo({isoCode:t}).then(n=>{if(n.code===0){const i=n.result.detail;this.localeMap[t]=i,$o.global.mergeLocaleMessage(t,i),e&&(this.setLang(""),setTimeout(()=>{this.setLang(t)}))}}))},setLang(e){this.lang=e},setTheme(e){e&&(this.theme=e)},setupLangWatcher(){this.getLangInfo(!0),h.watch(()=>this.lang,()=>this.getLangInfo(!0))}}}),I_=h.defineComponent({__name:"index",setup(e){const t="wf",n=ic();return(i,r)=>{const o=K.App,a=K.ConfigProvider;return h.openBlock(),h.createBlock(a,{prefixCls:h.unref(t),theme:{token:h.unref(n).theme}},{default:h.withCtx(()=>[h.createVNode(o,null,{default:h.withCtx(()=>[h.renderSlot(i.$slots,"default")]),_:3})]),_:3},8,["prefixCls","theme"])}}}),rc={};function B_(e,t={immediate:!0}){const n=an.useI18n(),{t:i}=n,r=h.ref({}),o=[].concat(e);function a(){const l=o.map(u=>{const p=rc[u];if(Lo.isPromise(p))return p;if(p)return Promise.resolve([u,p]);const f=_t({method:"get",url:"/system/api/sys/dictionary/public-dict-combo-ex",params:{tableType:u}}).then(d=>(rc[u]=d,[u,d]));return rc[u]=f,f});return Promise.all(l).then(u=>{u.forEach(p=>{const[f,d]=p;d&&d.code===0&&(r.value[f]=d.result)})})}h.watchEffect(()=>{const l=r.value;Object.keys(l).forEach(p=>{const f=l[p];for(const d in f){const m=`dct.${p}${d}`,v=i(m);f[d].text=v!==m?v:f[d].text}})}),t.immediate&&a();function s(l,u){const p=r.value[l];if(p&&u){const f=p[u];return f&&f.text?f.text:"-"}return"-"}function c(l){const u=r.value[l];return u?Object.keys(u).map(f=>({label:u[f].text,value:f})):[]}return[r,{fetchDict:a,toList:c,getDictLabel:s}]}const L_=h.defineComponent({__name:"index",props:{type:{type:String,default:""},value:[Number,String],style:{type:Object,default(){return{}}},dictClass:{type:String},showTooltip:{type:Boolean,default:!1}},setup(e){const t=e,[n]=B_(t.type,{immediate:!0}),i=h.ref();h.watchEffect(()=>{let o="-";const a=n.value[t.type];if(a&&!Lo.isNullOrUndef(t.value))if(Lo.isString(t.value))o=t.value.split(",").filter(c=>c).map(c=>{var l;return(l=a[c])==null?void 0:l.text}).join("、")||"-";else{const s=a[t.value];o=(s==null?void 0:s.text)||"-"}i.value=o});const r=h.computed(()=>{if(t.dictClass)return`${t.dictClass} status${t.value}`});return(o,a)=>{const s=K.Tooltip;return e.showTooltip?(h.openBlock(),h.createBlock(s,{key:0,placement:"topLeft",title:h.unref(i)},{default:h.withCtx(()=>[h.createElementVNode("span",{class:h.normalizeClass(h.unref(r)),style:h.normalizeStyle(e.style)},h.toDisplayString(h.unref(i)),7)]),_:1},8,["title"])):(h.openBlock(),h.createElementBlock("span",{key:1,class:h.normalizeClass(h.unref(r)),style:h.normalizeStyle(e.style)},h.toDisplayString(h.unref(i)),7))}}}),oc="el",$_="is-",di=(e,t,n,i,r)=>{let o=`${e}-${t}`;return n&&(o+=`-${n}`),i&&(o+=`__${i}`),r&&(o+=`--${r}`),o},j_=Symbol("namespaceContextKey"),F_=e=>{const t=h.getCurrentInstance()?h.inject(j_,h.ref(oc)):h.ref(oc);return h.computed(()=>h.unref(t)||oc)},Sp=(e,t)=>{const n=F_();return{namespace:n,b:(v="")=>di(n.value,e,v,"",""),e:v=>v?di(n.value,e,"",v,""):"",m:v=>v?di(n.value,e,"","",v):"",be:(v,g)=>v&&g?di(n.value,e,v,g,""):"",em:(v,g)=>v&&g?di(n.value,e,"",v,g):"",bm:(v,g)=>v&&g?di(n.value,e,v,"",g):"",bem:(v,g,w)=>v&&g&&w?di(n.value,e,v,g,w):"",is:(v,...g)=>{const w=g.length>=1?g[0]:!0;return v&&w?`${$_}${v}`:""},cssVar:v=>{const g={};for(const w in v)v[w]&&(g[`--${n.value}-${w}`]=v[w]);return g},cssVarName:v=>`--${n.value}-${v}`,cssVarBlock:v=>{const g={};for(const w in v)v[w]&&(g[`--${n.value}-${e}-${w}`]=v[w]);return g},cssVarBlockName:v=>`--${n.value}-${e}-${v}`}};/**
2
2
  * @vue/shared v3.5.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
- **/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const H_=Object.prototype.hasOwnProperty,Cp=(e,t)=>H_.call(e,t),ac=e=>typeof e=="string",sc=e=>e!==null&&typeof e=="object";var V_=typeof global=="object"&&global&&global.Object===Object&&global,z_=typeof self=="object"&&self&&self.Object===Object&&self,cc=V_||z_||Function("return this")(),Ln=cc.Symbol,Rp=Object.prototype,W_=Rp.hasOwnProperty,U_=Rp.toString,Tr=Ln?Ln.toStringTag:void 0;function G_(e){var t=W_.call(e,Tr),n=e[Tr];try{e[Tr]=void 0;var i=!0}catch{}var r=U_.call(e);return i&&(t?e[Tr]=n:delete e[Tr]),r}var K_=Object.prototype,q_=K_.toString;function Y_(e){return q_.call(e)}var X_="[object Null]",Z_="[object Undefined]",Tp=Ln?Ln.toStringTag:void 0;function lc(e){return e==null?e===void 0?Z_:X_:Tp&&Tp in Object(e)?G_(e):Y_(e)}function uc(e){return e!=null&&typeof e=="object"}var J_="[object Symbol]";function pc(e){return typeof e=="symbol"||uc(e)&&lc(e)==J_}function Q_(e,t){for(var n=-1,i=e==null?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}var Pr=Array.isArray,Pp=Ln?Ln.prototype:void 0,Ap=Pp?Pp.toString:void 0;function kp(e){if(typeof e=="string")return e;if(Pr(e))return Q_(e,kp)+"";if(pc(e))return Ap?Ap.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Ho(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function eb(e){return e}var tb="[object AsyncFunction]",nb="[object Function]",ib="[object GeneratorFunction]",rb="[object Proxy]";function ob(e){if(!Ho(e))return!1;var t=lc(e);return t==nb||t==ib||t==tb||t==rb}var fc=cc["__core-js_shared__"],Dp=function(){var e=/[^.]+$/.exec(fc&&fc.keys&&fc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ab(e){return!!Dp&&Dp in e}var sb=Function.prototype,cb=sb.toString;function lb(e){if(e!=null){try{return cb.call(e)}catch{}try{return e+""}catch{}}return""}var ub=/[\\^$.*+?()[\]{}|]/g,pb=/^\[object .+?Constructor\]$/,fb=Function.prototype,db=Object.prototype,hb=fb.toString,mb=db.hasOwnProperty,gb=RegExp("^"+hb.call(mb).replace(ub,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vb(e){if(!Ho(e)||ab(e))return!1;var t=ob(e)?gb:pb;return t.test(lb(e))}function yb(e,t){return e==null?void 0:e[t]}function dc(e,t){var n=yb(e,t);return vb(n)?n:void 0}function _b(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)}var bb=800,Eb=16,xb=Date.now;function wb(e){var t=0,n=0;return function(){var i=xb(),r=Eb-(i-n);if(n=i,r>0){if(++t>=bb)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Sb(e){return function(){return e}}var Vo=function(){try{var e=dc(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Cb=Vo?function(e,t){return Vo(e,"toString",{configurable:!0,enumerable:!1,value:Sb(t),writable:!0})}:eb,Rb=wb(Cb),Tb=9007199254740991,Pb=/^(?:0|[1-9]\d*)$/;function Mp(e,t){var n=typeof e;return t=t??Tb,!!t&&(n=="number"||n!="symbol"&&Pb.test(e))&&e>-1&&e%1==0&&e<t}function Ab(e,t,n){t=="__proto__"&&Vo?Vo(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Np(e,t){return e===t||e!==e&&t!==t}var kb=Object.prototype,Db=kb.hasOwnProperty;function Mb(e,t,n){var i=e[t];(!(Db.call(e,t)&&Np(i,n))||n===void 0&&!(t in e))&&Ab(e,t,n)}var Op=Math.max;function Nb(e,t,n){return t=Op(t===void 0?e.length-1:t,0),function(){for(var i=arguments,r=-1,o=Op(i.length-t,0),a=Array(o);++r<o;)a[r]=i[t+r];r=-1;for(var s=Array(t+1);++r<t;)s[r]=i[r];return s[t]=n(a),_b(e,this,s)}}var Ob=9007199254740991;function Ib(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ob}var Bb="[object Arguments]";function Ip(e){return uc(e)&&lc(e)==Bb}var Bp=Object.prototype,Lb=Bp.hasOwnProperty,$b=Bp.propertyIsEnumerable,Lp=Ip(function(){return arguments}())?Ip:function(e){return uc(e)&&Lb.call(e,"callee")&&!$b.call(e,"callee")},jb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fb=/^\w*$/;function Hb(e,t){if(Pr(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||pc(e)?!0:Fb.test(e)||!jb.test(e)||t!=null&&e in Object(t)}var Ar=dc(Object,"create");function Vb(){this.__data__=Ar?Ar(null):{},this.size=0}function zb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Wb="__lodash_hash_undefined__",Ub=Object.prototype,Gb=Ub.hasOwnProperty;function Kb(e){var t=this.__data__;if(Ar){var n=t[e];return n===Wb?void 0:n}return Gb.call(t,e)?t[e]:void 0}var qb=Object.prototype,Yb=qb.hasOwnProperty;function Xb(e){var t=this.__data__;return Ar?t[e]!==void 0:Yb.call(t,e)}var Zb="__lodash_hash_undefined__";function Jb(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ar&&t===void 0?Zb:t,this}function hi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}hi.prototype.clear=Vb,hi.prototype.delete=zb,hi.prototype.get=Kb,hi.prototype.has=Xb,hi.prototype.set=Jb;function Qb(){this.__data__=[],this.size=0}function zo(e,t){for(var n=e.length;n--;)if(Np(e[n][0],t))return n;return-1}var eE=Array.prototype,tE=eE.splice;function nE(e){var t=this.__data__,n=zo(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():tE.call(t,n,1),--this.size,!0}function iE(e){var t=this.__data__,n=zo(t,e);return n<0?void 0:t[n][1]}function rE(e){return zo(this.__data__,e)>-1}function oE(e,t){var n=this.__data__,i=zo(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}function Hi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Hi.prototype.clear=Qb,Hi.prototype.delete=nE,Hi.prototype.get=iE,Hi.prototype.has=rE,Hi.prototype.set=oE;var aE=dc(cc,"Map");function sE(){this.size=0,this.__data__={hash:new hi,map:new(aE||Hi),string:new hi}}function cE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Wo(e,t){var n=e.__data__;return cE(t)?n[typeof t=="string"?"string":"hash"]:n.map}function lE(e){var t=Wo(this,e).delete(e);return this.size-=t?1:0,t}function uE(e){return Wo(this,e).get(e)}function pE(e){return Wo(this,e).has(e)}function fE(e,t){var n=Wo(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}function mi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}mi.prototype.clear=sE,mi.prototype.delete=lE,mi.prototype.get=uE,mi.prototype.has=pE,mi.prototype.set=fE;var dE="Expected a function";function hc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(dE);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var a=e.apply(this,i);return n.cache=o.set(r,a)||o,a};return n.cache=new(hc.Cache||mi),n}hc.Cache=mi;var hE=500;function mE(e){var t=hc(e,function(i){return n.size===hE&&n.clear(),i}),n=t.cache;return t}var gE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vE=/\\(\\)?/g,yE=mE(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(gE,function(n,i,r,o){t.push(r?o.replace(vE,"$1"):i||n)}),t});function _E(e){return e==null?"":kp(e)}function Uo(e,t){return Pr(e)?e:Hb(e,t)?[e]:yE(_E(e))}function mc(e){if(typeof e=="string"||pc(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function bE(e,t){t=Uo(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[mc(t[n++])];return n&&n==i?e:void 0}function EE(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}var $p=Ln?Ln.isConcatSpreadable:void 0;function xE(e){return Pr(e)||Lp(e)||!!($p&&e&&e[$p])}function wE(e,t,n,i,r){var o=-1,a=e.length;for(n||(n=xE),r||(r=[]);++o<a;){var s=e[o];n(s)?EE(r,s):r[r.length]=s}return r}function SE(e){var t=e==null?0:e.length;return t?wE(e):[]}function CE(e){return Rb(Nb(e,void 0,SE),e+"")}function RE(e,t){return e!=null&&t in Object(e)}function TE(e,t,n){t=Uo(t,e);for(var i=-1,r=t.length,o=!1;++i<r;){var a=mc(t[i]);if(!(o=e!=null&&n(e,a)))break;e=e[a]}return o||++i!=r?o:(r=e==null?0:e.length,!!r&&Ib(r)&&Mp(a,r)&&(Pr(e)||Lp(e)))}function PE(e,t){return e!=null&&TE(e,t,RE)}function AE(e){for(var t=-1,n=e==null?0:e.length,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i}function kE(e,t,n,i){if(!Ho(e))return e;t=Uo(t,e);for(var r=-1,o=t.length,a=o-1,s=e;s!=null&&++r<o;){var c=mc(t[r]),l=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(r!=a){var u=s[c];l=void 0,l===void 0&&(l=Ho(u)?u:Mp(t[r+1])?[]:{})}Mb(s,c,l),s=s[c]}return e}function DE(e,t,n){for(var i=-1,r=t.length,o={};++i<r;){var a=t[i],s=bE(e,a);n(s,a)&&kE(o,Uo(a,e),s)}return o}function ME(e,t){return DE(e,t,function(n,i){return PE(e,i)})}var NE=CE(function(e,t){return e==null?{}:ME(e,t)});const Vi=e=>typeof e=="number",OE=e=>ac(e)?!Number.isNaN(Number(e)):!1;var jp;const gc=typeof window<"u",IE=e=>typeof e=="string",BE=()=>{};gc&&((jp=window==null?void 0:window.navigator)!=null&&jp.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Fp(e){return typeof e=="function"?e():h.unref(e)}function LE(e){return e}function Hp(e){return h.getCurrentScope()?(h.onScopeDispose(e),!0):!1}function $E(e,t=!0){h.getCurrentInstance()?h.onMounted(e):t?e():h.nextTick(e)}function Vp(e){var t;const n=Fp(e);return(t=n==null?void 0:n.$el)!=null?t:n}const zp=gc?window:void 0;function vc(...e){let t,n,i,r;if(IE(e[0])||Array.isArray(e[0])?([n,i,r]=e,t=zp):[t,n,i,r]=e,!t)return BE;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const o=[],a=()=>{o.forEach(u=>u()),o.length=0},s=(u,p,f,d)=>(u.addEventListener(p,f,d),()=>u.removeEventListener(p,f,d)),c=h.watch(()=>[Vp(t),Fp(r)],([u,p])=>{a(),u&&o.push(...n.flatMap(f=>i.map(d=>s(u,f,d,p))))},{immediate:!0,flush:"post"}),l=()=>{c(),a()};return Hp(l),l}function jE(e,t=!1){const n=h.ref(),i=()=>n.value=!!e();return i(),$E(i,t),n}const Wp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Up="__vueuse_ssr_handlers__";Wp[Up]=Wp[Up]||{};var Gp=Object.getOwnPropertySymbols,FE=Object.prototype.hasOwnProperty,HE=Object.prototype.propertyIsEnumerable,VE=(e,t)=>{var n={};for(var i in e)FE.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&Gp)for(var i of Gp(e))t.indexOf(i)<0&&HE.call(e,i)&&(n[i]=e[i]);return n};function zE(e,t,n={}){const i=n,{window:r=zp}=i,o=VE(i,["window"]);let a;const s=jE(()=>r&&"ResizeObserver"in r),c=()=>{a&&(a.disconnect(),a=void 0)},l=h.watch(()=>Vp(e),p=>{c(),s.value&&r&&p&&(a=new ResizeObserver(t),a.observe(p,o))},{immediate:!0,flush:"post"}),u=()=>{c(),l()};return Hp(u),{isSupported:s,stop:u}}var Kp;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(Kp||(Kp={}));var WE=Object.defineProperty,qp=Object.getOwnPropertySymbols,UE=Object.prototype.hasOwnProperty,GE=Object.prototype.propertyIsEnumerable,Yp=(e,t,n)=>t in e?WE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KE=(e,t)=>{for(var n in t||(t={}))UE.call(t,n)&&Yp(e,n,t[n]);if(qp)for(var n of qp(t))GE.call(t,n)&&Yp(e,n,t[n]);return e};KE({linear:LE},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});class Xp extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function qE(e,t){throw new Xp(`[${e}] ${t}`)}function yc(e,t){if(process.env.NODE_ENV!=="production"){const n=ac(e)?new Xp(`[${e}] ${t}`):e;console.warn(n)}}const Zp="__epPropKey",YE=e=>e,XE=e=>sc(e)&&!!e[Zp],ZE=(e,t)=>{if(!sc(e)||XE(e))return e;const{values:n,required:i,default:r,type:o,validator:a}=e,c={type:o,required:!!i,validator:n||a?l=>{let u=!1,p=[];if(n&&(p=Array.from(n),Cp(e,"default")&&p.push(r),u||(u=p.includes(l))),a&&(u||(u=a(l))),!u&&p.length>0){const f=[...new Set(p)].map(d=>JSON.stringify(d)).join(", ");h.warn(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${f}], got value ${JSON.stringify(l)}.`)}return u}:void 0,[Zp]:!0};return Cp(e,"default")&&(c.default=r),c},Go=e=>AE(Object.entries(e).map(([t,n])=>[t,ZE(n,t)]));var _c=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n};const JE="utils/dom/style";function Jp(e,t="px"){if(!e)return"";if(Vi(e)||OE(e))return`${e}${t}`;if(ac(e))return e;yc(JE,"binding value must be a string or number")}const QE=(e,t)=>(e.install=n=>{for(const i of[e,...Object.values({})])n.component(i.name,i)},e),e0=Go({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),t0=e=>NE(e0,e),zi=4,n0={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},i0=({move:e,size:t,bar:n})=>({[n.size]:t,transform:`translate${n.axis}(${e}%)`}),bc=Symbol("scrollbarContextKey"),r0=Go({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),o0="Thumb";var Qp=_c(h.defineComponent({__name:"thumb",props:r0,setup(e){const t=e,n=h.inject(bc),i=Sp("scrollbar");n||qE(o0,"can not inject scrollbar context");const r=h.ref(),o=h.ref(),a=h.ref({}),s=h.ref(!1);let c=!1,l=!1,u=gc?document.onselectstart:null;const p=h.computed(()=>n0[t.vertical?"vertical":"horizontal"]),f=h.computed(()=>i0({size:t.size,move:t.move,bar:p.value})),d=h.computed(()=>r.value[p.value.offset]**2/n.wrapElement[p.value.scrollSize]/t.ratio/o.value[p.value.offset]),m=R=>{var N;if(R.stopPropagation(),R.ctrlKey||[1,2].includes(R.button))return;(N=window.getSelection())==null||N.removeAllRanges(),g(R);const P=R.currentTarget;P&&(a.value[p.value.axis]=P[p.value.offset]-(R[p.value.client]-P.getBoundingClientRect()[p.value.direction]))},v=R=>{if(!o.value||!r.value||!n.wrapElement)return;const N=Math.abs(R.target.getBoundingClientRect()[p.value.direction]-R[p.value.client]),P=o.value[p.value.offset]/2,O=(N-P)*100*d.value/r.value[p.value.offset];n.wrapElement[p.value.scroll]=O*n.wrapElement[p.value.scrollSize]/100},g=R=>{R.stopImmediatePropagation(),c=!0,document.addEventListener("mousemove",w),document.addEventListener("mouseup",C),u=document.onselectstart,document.onselectstart=()=>!1},w=R=>{if(!r.value||!o.value||c===!1)return;const N=a.value[p.value.axis];if(!N)return;const P=(r.value.getBoundingClientRect()[p.value.direction]-R[p.value.client])*-1,O=o.value[p.value.offset]-N,I=(P-O)*100*d.value/r.value[p.value.offset];n.wrapElement[p.value.scroll]=I*n.wrapElement[p.value.scrollSize]/100},C=()=>{c=!1,a.value[p.value.axis]=0,document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C),S(),l&&(s.value=!1)},x=()=>{l=!1,s.value=!!t.size},E=()=>{l=!0,s.value=c};h.onBeforeUnmount(()=>{S(),document.removeEventListener("mouseup",C)});const S=()=>{document.onselectstart!==u&&(document.onselectstart=u)};return vc(h.toRef(n,"scrollbarElement"),"mousemove",x),vc(h.toRef(n,"scrollbarElement"),"mouseleave",E),(R,N)=>(h.openBlock(),h.createBlock(h.Transition,{name:h.unref(i).b("fade"),persisted:""},{default:h.withCtx(()=>[h.withDirectives(h.createElementVNode("div",{ref_key:"instance",ref:r,class:h.normalizeClass([h.unref(i).e("bar"),h.unref(i).is(h.unref(p).key)]),onMousedown:v},[h.createElementVNode("div",{ref_key:"thumb",ref:o,class:h.normalizeClass(h.unref(i).e("thumb")),style:h.normalizeStyle(h.unref(f)),onMousedown:m},null,38)],34),[[h.vShow,R.always||s.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const a0=Go({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}});var s0=_c(h.defineComponent({__name:"bar",props:a0,setup(e,{expose:t}){const n=e,i=h.inject(bc),r=h.ref(0),o=h.ref(0),a=h.ref(""),s=h.ref(""),c=h.ref(1),l=h.ref(1);return t({handleScroll:f=>{if(f){const d=f.offsetHeight-zi,m=f.offsetWidth-zi;o.value=f.scrollTop*100/d*c.value,r.value=f.scrollLeft*100/m*l.value}},update:()=>{const f=i==null?void 0:i.wrapElement;if(!f)return;const d=f.offsetHeight-zi,m=f.offsetWidth-zi,v=d**2/f.scrollHeight,g=m**2/f.scrollWidth,w=Math.max(v,n.minSize),C=Math.max(g,n.minSize);c.value=v/(d-v)/(w/(d-w)),l.value=g/(m-g)/(C/(m-C)),s.value=w+zi<d?`${w}px`:"",a.value=C+zi<m?`${C}px`:""}}),(f,d)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createVNode(Qp,{move:r.value,ratio:l.value,size:a.value,always:f.always},null,8,["move","ratio","size","always"]),h.createVNode(Qp,{move:o.value,ratio:c.value,size:s.value,vertical:"",always:f.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const c0=Go({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:YE([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...t0(["ariaLabel","ariaOrientation"])}),l0={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(Vi)},Ec="ElScrollbar",u0=h.defineComponent({name:Ec}),p0=h.defineComponent({...u0,props:c0,emits:l0,setup(e,{expose:t,emit:n}){const i=e,r=Sp("scrollbar");let o,a,s=0,c=0;const l=h.ref(),u=h.ref(),p=h.ref(),f=h.ref(),d=h.computed(()=>{const S={};return i.height&&(S.height=Jp(i.height)),i.maxHeight&&(S.maxHeight=Jp(i.maxHeight)),[i.wrapStyle,S]}),m=h.computed(()=>[i.wrapClass,r.e("wrap"),{[r.em("wrap","hidden-default")]:!i.native}]),v=h.computed(()=>[r.e("view"),i.viewClass]),g=()=>{var S;u.value&&((S=f.value)==null||S.handleScroll(u.value),s=u.value.scrollTop,c=u.value.scrollLeft,n("scroll",{scrollTop:u.value.scrollTop,scrollLeft:u.value.scrollLeft}))};function w(S,R){sc(S)?u.value.scrollTo(S):Vi(S)&&Vi(R)&&u.value.scrollTo(S,R)}const C=S=>{if(!Vi(S)){yc(Ec,"value must be a number");return}u.value.scrollTop=S},x=S=>{if(!Vi(S)){yc(Ec,"value must be a number");return}u.value.scrollLeft=S},E=()=>{var S;(S=f.value)==null||S.update()};return h.watch(()=>i.noresize,S=>{S?(o==null||o(),a==null||a()):({stop:o}=zE(p,E),a=vc("resize",E))},{immediate:!0}),h.watch(()=>[i.maxHeight,i.height],()=>{i.native||h.nextTick(()=>{var S;E(),u.value&&((S=f.value)==null||S.handleScroll(u.value))})}),h.provide(bc,h.reactive({scrollbarElement:l,wrapElement:u})),h.onActivated(()=>{u.value&&(u.value.scrollTop=s,u.value.scrollLeft=c)}),h.onMounted(()=>{i.native||h.nextTick(()=>{E()})}),h.onUpdated(()=>E()),t({wrapRef:u,update:E,scrollTo:w,setScrollTop:C,setScrollLeft:x,handleScroll:g}),(S,R)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"scrollbarRef",ref:l,class:h.normalizeClass(h.unref(r).b())},[h.createElementVNode("div",{ref_key:"wrapRef",ref:u,class:h.normalizeClass(h.unref(m)),style:h.normalizeStyle(h.unref(d)),tabindex:S.tabindex,onScroll:g},[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(S.tag),{id:S.id,ref_key:"resizeRef",ref:p,class:h.normalizeClass(h.unref(v)),style:h.normalizeStyle(S.viewStyle),role:S.role,"aria-label":S.ariaLabel,"aria-orientation":S.ariaOrientation},{default:h.withCtx(()=>[h.renderSlot(S.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),S.native?h.createCommentVNode("v-if",!0):(h.openBlock(),h.createBlock(s0,{key:0,ref_key:"barRef",ref:f,always:S.always,"min-size":S.minSize},null,8,["always","min-size"]))],2))}});var f0=_c(p0,[["__file","scrollbar.vue"]]);const ef=QE(f0),Ko=Symbol("wf-bus"),d0={class:"wrapper"},h0={class:"content"},m0=["textContent"],g0=h.defineComponent({__name:"BpmnDetail",props:{data:{type:Object,required:!0}},setup(e){const t=e,n=h.ref("1"),i=h.ref(),r=h.ref();function o(){var l;if(!((l=t.data)!=null&&l.code))return;const s=n.value,c={code:t.data.code,type:s};Ct.getBpmnDetail(c).then(u=>{u.code===0&&(s==="1"?i.value="data:image/png;base64,"+u.result:r.value=u.result)})}function a(){o()}return h.onMounted(()=>{o()}),(s,c)=>{const l=K.RadioButton,u=K.RadioGroup,p=K.Image;return h.openBlock(),h.createElementBlock("div",d0,[h.createVNode(u,{value:h.unref(n),"onUpdate:value":c[0]||(c[0]=f=>h.isRef(n)?n.value=f:null),class:"flex-ec mr-sm mt-sm",onChange:a},{default:h.withCtx(()=>[h.createVNode(l,{value:"1"},{default:h.withCtx(()=>c[1]||(c[1]=[h.createTextVNode("png")])),_:1}),h.createVNode(l,{value:"0"},{default:h.withCtx(()=>c[2]||(c[2]=[h.createTextVNode("xml")])),_:1})]),_:1},8,["value"]),h.createElementVNode("div",h0,[h.unref(n)==="1"?(h.openBlock(),h.createBlock(p,{key:0,src:h.unref(i)},null,8,["src"])):(h.openBlock(),h.createElementBlock("span",{key:1,textContent:h.toDisplayString(h.unref(r))},null,8,m0))])])}}}),gi=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n},v0=gi(g0,[["__scopeId","data-v-248c7b10"]]),y0={class:"panel-left"},_0={class:"title"},b0={class:"search-box"},E0={key:2,class:"btns-action"},x0=gi(h.defineComponent({__name:"BusTypeList",setup(e){const{t}=an.useI18n(),n=h.ref(),i=h.ref([]),r=h.ref([]),o=h.ref([]);function a(){var R;o.value=[],i.value=[],r.value=[],(R=f.value)==null||R.reset(),s()}function s(R){const N={sync:!0};n.value&&Object.assign(N,{description:n.value}),Ct.getBusTypeTree(N).then(P=>{var O;if(P.code===0){const I=P.result||[];o.value=I,I.length&&(i.value=[I[0].key],(O=I[0].children)!=null&&O.length&&(r.value=[I[0].children[0].key],d()))}})}const c=h.inject(Ko);function l(R,N){N.selected&&N.node.dataRef.isLeaf&&(r.value=R,d())}const u=h.ref([{title:t("bpmn.version"),dataIndex:"version",width:100},{title:t("bpmn.description"),dataIndex:"description",width:250},{title:t("bpmn.used"),dataIndex:"used",width:130},{title:t("bpmn.status"),dataIndex:"status",width:130},{title:t("bpmn.action"),key:"action",width:200,fixed:"right"}]);function p(R){const N={type:r.value[0]};return Object.assign(N,R),Ct.getBpmnList(N)}const f=h.ref(),d=()=>{var R;(R=f.value)==null||R.refresh()},{message:m,modal:v}=st.App.useApp();function g(R,N){v.confirm({title:t("button._006_msg1"),content:t(N==="0"?"button._006_msg2":"button._006_msg3"),centered:!0,okButtonProps:{danger:!0},onOk:()=>{const P={code:R.code,status:N};Ct.switchBpmnStatus(P).then(O=>{O.code===0&&(d(),m.success(t("common.successTip")))})}})}function w(){c.emit("changeComp",{comp:"BpmnEditPage",opType:"1",type:r.value[0]})}function C(R){c.emit("changeComp",{comp:"BpmnEditPage",opType:"2",code:R.code})}function x(R){c.emit("changeComp",{comp:"BpmnEditPage",opType:"3",type:r.value[0],code:R.code})}function E(R){v.confirm({title:t("button._006_msg1"),content:t("button._004_msg2"),centered:!0,okButtonProps:{danger:!0},onOk:()=>{const N={code:R.code};Ct.delBpmn(N).then(P=>{P.code===0&&(d(),m.success(t("common.successTip")))})}})}function S(R){v.info({title:t("wo_list.btn_chart"),content:h.h(v0,{data:R}),centered:!0,footer:null,icon:null,closable:!0,maskClosable:!0,width:1e3,class:"modal-comp"})}return h.onMounted(()=>{a(),h.onActivated(()=>{var R;(R=f.value)==null||R.loadData()})}),(R,N)=>{const P=K.InputSearch,O=K.Tree,I=K.Empty,L=ef,B=K.Button,z=K.Space,q=L_,Je=K.Switch,Ce=h.resolveComponent("a-table-ex"),pe=h.resolveComponent("wl-splitter"),Qe=h.resolveDirective("permission");return h.openBlock(),h.createBlock(pe,{bordered:!1},{left:h.withCtx(()=>[h.createElementVNode("div",y0,[h.createElementVNode("div",_0,h.toDisplayString(R.$t("bpmn.list_title")),1),h.createElementVNode("div",b0,[h.createVNode(P,{value:h.unref(n),"onUpdate:value":N[0]||(N[0]=Ie=>h.isRef(n)?n.value=Ie:null),placeholder:R.$t("bpmn.type_placeholder"),onSearch:a},null,8,["value","placeholder"])]),h.createVNode(L,{class:"tree-wrapper"},{default:h.withCtx(()=>{var Ie;return[(Ie=h.unref(o))!=null&&Ie.length?(h.openBlock(),h.createBlock(O,{key:0,expandedKeys:h.unref(i),"onUpdate:expandedKeys":N[1]||(N[1]=be=>h.isRef(i)?i.value=be:null),selectedKeys:h.unref(r),"tree-data":h.unref(o),showLine:!0,onSelect:l},null,8,["expandedKeys","selectedKeys","tree-data"])):(h.openBlock(),h.createBlock(I,{key:1,imageStyle:{height:"64px"}}))]}),_:1})])]),right:h.withCtx(()=>[h.createVNode(z,{class:"ml-lg my-nm"},{default:h.withCtx(()=>[h.withDirectives((h.openBlock(),h.createBlock(B,{type:"primary",onClick:w},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R.$t("bpmn.add_workflow")),1)]),_:1})),[[Qe,"002"]])]),_:1}),h.createVNode(Ce,{ref_key:"tableEx",ref:f,class:"table-query bordered mx-lg",columns:h.unref(u),scroll:{x:1100},loadData:p},{bodyCell:h.withCtx(({column:Ie,record:be,text:ze})=>[Ie.dataIndex==="used"?(h.openBlock(),h.createBlock(q,{key:0,type:"BPMN_USED",value:ze},null,8,["value"])):h.createCommentVNode("",!0),Ie.dataIndex==="status"?(h.openBlock(),h.createBlock(Je,{key:1,checked:ze,checkedValue:"0",unCheckedValue:"1",disabled:!h.unref(Lo.hasPermission)("006"),onChange:j=>g(be,j)},null,8,["checked","disabled","onChange"])):h.createCommentVNode("",!0),Ie.key==="action"?(h.openBlock(),h.createElementBlock("div",E0,[h.withDirectives((h.openBlock(),h.createBlock(B,{type:"link",onClick:j=>C(be)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R.$t("common.btn_edit")),1)]),_:2},1032,["onClick"])),[[Qe,"003"]]),h.withDirectives((h.openBlock(),h.createBlock(B,{type:"link",onClick:j=>E(be)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R.$t("common.btn_del")),1)]),_:2},1032,["onClick"])),[[Qe,"004"]]),h.withDirectives((h.openBlock(),h.createBlock(B,{type:"link",onClick:j=>S(be)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R.$t("wo_my.btn_detail")),1)]),_:2},1032,["onClick"])),[[Qe,"005"]]),h.withDirectives((h.openBlock(),h.createBlock(B,{type:"link",onClick:j=>x(be)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R.$t("bpmn.btn_clone")),1)]),_:2},1032,["onClick"])),[[Qe,"002"]])])):h.createCommentVNode("",!0)]),_:1},8,["columns"])]),_:1})}}}),[["__scopeId","data-v-7d08e693"]]);function Y(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}function w0(e,t){return t={exports:{}},e(t,t.exports),t.exports}var S0=w0(function(e){var t=e.exports=function(n,i){if(i||(i=16),n===void 0&&(n=128),n<=0)return"0";for(var r=Math.log(Math.pow(2,n))/Math.log(i),o=2;r===1/0;o*=2)r=Math.log(Math.pow(2,n/o))/Math.log(i)*o;for(var a=r-Math.floor(r),s="",o=0;o<Math.floor(r);o++){var c=Math.floor(Math.random()*i).toString(i);s=c+s}if(a){var l=Math.pow(i,a),c=Math.floor(Math.random()*l).toString(i);s=c+s}var u=parseInt(s,i);return u!==1/0&&u>=Math.pow(2,n)?t(n,i):s};t.rack=function(n,i,r){var o=function(s){var c=0;do{if(c++>10)if(r)n+=r;else throw new Error("too many ID collisions, use more bits");var l=t(n,i)}while(Object.hasOwnProperty.call(a,l));return a[l]=s,l},a=o.hats={};return o.get=function(s){return o.hats[s]},o.set=function(s,c){return o.hats[s]=c,o},o.bits=n||128,o.base=i||16,o}});function sn(e){if(!(this instanceof sn))return new sn(e);e=e||[128,36,1],this._seed=e.length?S0.rack(e[0],e[1],e[2]):e}sn.prototype.next=function(e){return this._seed(e||!0)},sn.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n},sn.prototype.claim=function(e,t){this._seed.set(e,t||!0)},sn.prototype.assigned=function(e){return this._seed.get(e)||!1},sn.prototype.unclaim=function(e){delete this._seed.hats[e]},sn.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};function xc(e){return Array.prototype.concat.apply([],e)}const kr=Object.prototype.toString,C0=Object.prototype.hasOwnProperty;function vi(e){return e===void 0}function et(e){return e!==void 0}function Dr(e){return e==null}function oe(e){return kr.call(e)==="[object Array]"}function tt(e){return kr.call(e)==="[object Object]"}function ee(e){return kr.call(e)==="[object Number]"}function We(e){const t=kr.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function Rt(e){return kr.call(e)==="[object String]"}function R0(e){if(!oe(e))throw new Error("must supply array")}function bt(e,t){return!Dr(e)&&C0.call(e,t)}function _e(e,t){const n=Xo(t);let i;return A(e,function(r,o){if(n(r,o))return i=r,!1}),i}function tf(e,t){const n=Xo(t);let i=oe(e)?-1:void 0;return A(e,function(r,o){if(n(r,o))return i=o,!1}),i}function ce(e,t){const n=Xo(t);let i=[];return A(e,function(r,o){n(r,o)&&i.push(r)}),i}function A(e,t){let n,i;if(vi(e))return;const r=oe(e)?D0:k0;for(let o in e)if(bt(e,o)&&(n=e[o],i=t(n,r(o)),i===!1))return n}function T0(e,t){if(vi(e))return[];R0(e);const n=Xo(t);return e.filter(function(i,r){return!n(i,r)})}function Tt(e,t,n){return A(e,function(i,r){n=t(n,i,r)}),n}function yi(e,t){return!!Tt(e,function(n,i,r){return n&&t(i,r)},!0)}function $n(e,t){return!!_e(e,t)}function ct(e,t){let n=[];return A(e,function(i,r){n.push(t(i,r))}),n}function qo(e){return e&&Object.keys(e)||[]}function P0(e){return qo(e).length}function Yo(e){return ct(e,t=>t)}function Wi(e,t,n={}){return t=wc(t),A(e,function(i){let r=t(i)||"_",o=n[r];o||(o=n[r]=[]),o.push(i)}),n}function nf(e,...t){e=wc(e);let n={};return A(t,r=>Wi(r,e,n)),ct(n,function(r,o){return r[0]})}const A0=nf;function cn(e,t){t=wc(t);let n=[];return A(e,function(i,r){let o=t(i,r),a={d:o,v:i};for(var s=0;s<n.length;s++){let{d:c}=n[s];if(o<c){n.splice(s,0,a);return}}n.push(a)}),ct(n,i=>i.v)}function Zt(e){return function(t){return yi(e,function(n,i){return t[i]===n})}}function wc(e){return We(e)?e:t=>t[e]}function Xo(e){return We(e)?e:t=>t===e}function k0(e){return e}function D0(e){return Number(e)}function rf(e,t){let n,i,r,o;function a(p){let f=Date.now(),d=p?0:o+t-f;if(d>0)return s(d);e.apply(r,i),c()}function s(p){n=setTimeout(a,p)}function c(){n&&clearTimeout(n),n=o=i=r=void 0}function l(){n&&a(!0),c()}function u(...p){o=Date.now(),i=p,r=this,n||s(t)}return u.flush=l,u.cancel=c,u}function Et(e,t){return e.bind(t)}function D(e,...t){return Object.assign(e,...t)}function M0(e,t,n){let i=e;return A(t,function(r,o){if(typeof r!="number"&&typeof r!="string")throw new Error("illegal key type: "+typeof r+". Key should be of type number or string.");if(r==="constructor")throw new Error("illegal key: constructor");if(r==="__proto__")throw new Error("illegal key: __proto__");let a=t[o+1],s=i[r];et(a)&&Dr(s)&&(s=i[r]=isNaN(+a)?{}:[]),vi(a)?vi(n)?delete i[r]:i[r]=n:i=s}),e}function Jt(e,t){let n={},i=Object(e);return A(t,function(r){r in i&&(n[r]=e[r])}),n}function ln(e,t){let n={},i=Object(e);return A(i,function(r,o){t.indexOf(o)===-1&&(n[o]=r)}),n}function N0(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(i){if(i!=="default"&&!(i in e)){var r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(e,i,r.get?r:{enumerable:!0,get:function(){return n[i]}})}})}),Object.freeze(e)}const O0=Object.prototype.toString,I0=Object.prototype.hasOwnProperty;function B0(e){return e===void 0}function L0(e){return O0.call(e)==="[object Array]"}function $0(e,t){return I0.call(e,t)}function of(e,t){let n,i;if(B0(e))return;const r=L0(e)?F0:j0;for(let o in e)if($0(e,o)&&(n=e[o],i=t(n,r(o)),i===!1))return n}function j0(e){return e}function F0(e){return Number(e)}function lt(e,...t){const n=e.style;return of(t,function(i){i&&of(i,function(r,o){n[o]=r})}),e}function ut(e,t,n){return arguments.length==2?e.getAttribute(t):n===null?e.removeAttribute(t):(e.setAttribute(t,n),e)}const H0=Object.prototype.toString;function Ne(e){return new jn(e)}function jn(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}jn.prototype.add=function(e){return this.list.add(e),this},jn.prototype.remove=function(e){return H0.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},jn.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},jn.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},jn.prototype.array=function(){return Array.from(this.list)},jn.prototype.has=jn.prototype.contains=function(e){return this.list.contains(e)};function Zo(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Ui(e,t,n){var i=n?e:e.parentNode;return i&&typeof i.closest=="function"&&i.closest(t)||null}var Jo={},Qo,Sc,Cc;function af(){Qo=window.addEventListener?"addEventListener":"attachEvent",Sc=window.removeEventListener?"removeEventListener":"detachEvent",Cc=Qo!=="addEventListener"?"on":""}var V0=Jo.bind=function(e,t,n,i){return Qo||af(),e[Qo](Cc+t,n,i||!1),n},z0=Jo.unbind=function(e,t,n,i){return Sc||af(),e[Sc](Cc+t,n,i||!1),n},ae=N0({__proto__:null,bind:V0,unbind:z0,default:Jo},[Jo]),sf=["focus","blur"];function W0(e,t,n,i,r){return sf.indexOf(n)!==-1&&(r=!0),ae.bind(e,n,function(o){var a=o.target||o.srcElement;o.delegateTarget=Ui(a,t,!0),o.delegateTarget&&i.call(e,o)},r)}function U0(e,t,n,i){return sf.indexOf(t)!==-1&&(i=!0),ae.unbind(e,t,n,i)}var Pt={bind:W0,unbind:U0},G0=K0,cf=!1,ea;typeof document<"u"&&(ea=document.createElement("div"),ea.innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',cf=!ea.getElementsByTagName("link").length,ea=void 0);var Ue={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:cf?[1,"X<div>","</div>"]:[0,"",""]};Ue.td=Ue.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Ue.option=Ue.optgroup=[1,'<select multiple="multiple">',"</select>"],Ue.thead=Ue.tbody=Ue.colgroup=Ue.caption=Ue.tfoot=[1,"<table>","</table>"],Ue.polyline=Ue.ellipse=Ue.polygon=Ue.circle=Ue.text=Ue.line=Ue.path=Ue.rect=Ue.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function K0(e,t){if(typeof e!="string")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(i=="body"){var c=t.createElement("html");return c.innerHTML=e,c.removeChild(c.lastChild)}var r=Object.prototype.hasOwnProperty.call(Ue,i)?Ue[i]:Ue._default,o=r[0],a=r[1],s=r[2],c=t.createElement("div");for(c.innerHTML=a+e+s;o--;)c=c.lastChild;if(c.firstChild==c.lastChild)return c.removeChild(c.firstChild);for(var l=t.createDocumentFragment();c.firstChild;)l.appendChild(c.removeChild(c.firstChild));return l}var Te=G0;function lf(e,t){return e&&typeof e.matches=="function"&&e.matches(t)||!1}function xe(e,t){return t=t||document,t.querySelector(e)}function Rc(e,t){return t=t||document,t.querySelectorAll(e)}function un(e){e.parentNode&&e.parentNode.removeChild(e)}function q0(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function Y0(e,t){return t.appendChild(q0(e,t))}function ie(e,t){return Y0(t,e),e}var Tc=2,uf={"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":Tc,"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":Tc,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function X0(e,t){return uf[t]?e.style[t]:e.getAttributeNS(null,t)}function pf(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=uf[i];r?(r===Tc&&typeof n=="number"&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function Z0(e,t){var n=Object.keys(t),i,r;for(i=0,r;r=n[i];i++)pf(e,r,t[r])}function G(e,t,n){if(typeof t=="string")if(n!==void 0)pf(e,t,n);else return X0(e,t);else Z0(e,t);return e}const J0=Object.prototype.toString;function me(e){return new Fn(e)}function Fn(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}Fn.prototype.add=function(e){return this.list.add(e),this},Fn.prototype.remove=function(e){return J0.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},Fn.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},Fn.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Fn.prototype.array=function(){return Array.from(this.list)},Fn.prototype.has=Fn.prototype.contains=function(e){return this.list.contains(e)};function ta(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function ff(e){return e.cloneNode(!0)}var Pc={svg:"http://www.w3.org/2000/svg"},df='<svg xmlns="'+Pc.svg+'"';function Q0(e){var t=!1;e.substring(0,4)==="<svg"?e.indexOf(Pc.svg)===-1&&(e=df+e.substring(4)):(e=df+">"+e+"</svg>",t=!0);var n=ex(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function ex(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function X(e,t){var n;return e=e.trim(),e.charAt(0)==="<"?(n=Q0(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(Pc.svg,e),t&&G(n,t),n}var Ac=null;function hf(){return Ac===null&&(Ac=X("svg")),Ac}function mf(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}function tx(e,t,n,i,r,o){var a=hf().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return mf(a,e);case 6:return mf(a,{a:e,b:t,c:n,d:i,e:r,f:o})}}function Mr(e){return hf().createSVGTransform()}var gf=/([&<>]{1})/g,nx=/([&<>\n\r"]{1})/g,ix={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function kc(e,t){function n(i,r){return ix[r]||r}return e.replace(t,n)}function vf(e,t){var n,i,r,o,a;switch(e.nodeType){case 3:t.push(kc(e.textContent,gf));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(r=e.attributes,n=0,i=r.length;n<i;++n)o=r.item(n),t.push(" ",o.name,'="',kc(o.value,nx),'"');if(e.hasChildNodes()){for(t.push(">"),a=e.childNodes,n=0,i=a.length;n<i;++n)vf(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("<!--",kc(e.nodeValue,gf),"-->");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function rx(e){for(var t=e.firstChild,n=[];t;)vf(t,n),t=t.nextSibling;return n.join("")}function yf(e,t){return rx(e)}function Ge(e){var t=e.parentNode;return t&&t.removeChild(e),e}function ox(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function ax(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(ox(e,i))}function Nr(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),ax(n,t)),n.consolidate()}const sx=/^class[ {]/;function cx(e){return sx.test(e.toString())}function Dc(e){return Array.isArray(e)}function Mc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function na(...e){e.length===1&&Dc(e[0])&&(e=e[0]),e=[...e];const t=e.pop();return t.$inject=e,t}const lx=/constructor\s*[^(]*\(\s*([^)]*)\)/m,ux=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,px=/\/\*([^*]*)\*\//m;function fx(e){if(typeof e!="function")throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(cx(e)?lx:ux);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map(i=>{const r=i.match(px);return(r&&r[1]||i).trim()})||[]}function _f(e,t){const n=t||{get:function(x,E){if(i.push(x),E===!1)return null;throw s(`No provider for "${x}"!`)}},i=[],r=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(x){const E=i.join(" -> ");return i.length=0,new Error(E?`${x} (Resolving: ${E})`:x)};function c(x,E){if(!r[x]&&x.includes(".")){const S=x.split(".");let R=c(S.shift());for(;S.length;)R=R[S.shift()];return R}if(Mc(o,x))return o[x];if(Mc(r,x)){if(i.indexOf(x)!==-1)throw i.push(x),s("Cannot resolve circular dependency!");return i.push(x),o[x]=r[x][0](r[x][1]),i.pop(),o[x]}return n.get(x,E)}function l(x,E){if(typeof E>"u"&&(E={}),typeof x!="function")if(Dc(x))x=na(x.slice());else throw s(`Cannot invoke "${x}". Expected a function!`);const R=(x.$inject||fx(x)).map(N=>Mc(E,N)?E[N]:c(N));return{fn:x,dependencies:R}}function u(x){const{fn:E,dependencies:S}=l(x),R=Function.prototype.bind.call(E,null,...S);return new R}function p(x,E,S){const{fn:R,dependencies:N}=l(x,S);return R.apply(E,N)}function f(x){return na(E=>x.get(E))}function d(x,E){if(E&&E.length){const S=Object.create(null),R=Object.create(null),N=[],P=[],O=[];let I,L,B,z;for(let q in r)I=r[q],E.indexOf(q)!==-1&&(I[2]==="private"?(L=N.indexOf(I[3]),L===-1?(B=I[3].createChild([],E),z=f(B),N.push(I[3]),P.push(B),O.push(z),S[q]=[z,q,"private",B]):S[q]=[O[L],q,"private",P[L]]):S[q]=[I[2],I[1]],R[q]=!0),(I[2]==="factory"||I[2]==="type")&&I[1].$scope&&E.forEach(Je=>{I[1].$scope.indexOf(Je)!==-1&&(S[q]=[I[2],I[1]],R[Je]=!0)});E.forEach(q=>{if(!R[q])throw new Error('No provider for "'+q+'". Cannot use provider from the parent!')}),x.unshift(S)}return new _f(x,a)}const m={factory:p,type:u,value:function(x){return x}};function v(x,E){const S=x.__init__||[];return function(){S.forEach(R=>{typeof R=="string"?E.get(R):E.invoke(R)})}}function g(x){const E=x.__exports__;if(E){const S=x.__modules__,R=Object.keys(x).reduce((L,B)=>(B!=="__exports__"&&B!=="__modules__"&&B!=="__init__"&&B!=="__depends__"&&(L[B]=x[B]),L),Object.create(null)),N=(S||[]).concat(R),P=d(N),O=na(function(L){return P.get(L)});E.forEach(function(L){r[L]=[O,L,"private",P]});const I=(x.__init__||[]).slice();return I.unshift(function(){P.init()}),x=Object.assign({},x,{__init__:I}),v(x,P)}return Object.keys(x).forEach(function(S){if(S==="__init__"||S==="__depends__")return;const R=x[S];if(R[2]==="private"){r[S]=R;return}const N=R[0],P=R[1];r[S]=[m[N],dx(N,P),N]}),v(x,a)}function w(x,E){return x.indexOf(E)!==-1||(x=(E.__depends__||[]).reduce(w,x),x.indexOf(E)!==-1)?x:x.concat(E)}function C(x){const E=x.reduce(w,[]).map(g);let S=!1;return function(){S||(S=!0,E.forEach(R=>R()))}}this.get=c,this.invoke=p,this.instantiate=u,this.createChild=d,this.init=C(e)}function dx(e,t){return e!=="value"&&Dc(t)&&(t=na(t.slice())),t}var hx=1e3;function bn(e,t){var n=this;t=t||hx,e.on(["render.shape","render.connection"],t,function(i,r){var o=i.type,a=r.element,s=r.gfx,c=r.attrs;if(n.canRender(a))return o==="render.shape"?n.drawShape(s,a,c):n.drawConnection(s,a,c)}),e.on(["render.getShapePath","render.getConnectionPath"],t,function(i,r){if(n.canRender(r))return i.type==="render.getShapePath"?n.getShapePath(r):n.getConnectionPath(r)})}bn.prototype.canRender=function(e){},bn.prototype.drawShape=function(e,t){},bn.prototype.drawConnection=function(e,t){},bn.prototype.getShapePath=function(e){},bn.prototype.getConnectionPath=function(e){};function _i(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function mx(e){return["M",e.x,e.y]}function Nc(e){return["L",e.x,e.y]}function gx(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function vx(e,t){const n=e.length,i=[mx(e[0])];for(let r=1;r<n;r++){const o=e[r-1],a=e[r],s=e[r+1];if(!s||!t){i.push(Nc(a));continue}const c=Math.min(t,Oc(a.x-o.x,a.y-o.y),Oc(s.x-a.x,s.y-a.y));if(!c){i.push(Nc(a));continue}const l=ia(a,o,c),u=ia(a,o,c*.5),p=ia(a,s,c),f=ia(a,s,c*.5);i.push(Nc(l)),i.push(gx(u,f,p))}return i}function ia(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=Oc(i,r),a=n/o;return{x:e.x+i*a,y:e.y+r*a}}function Oc(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function ra(e,t,n){ee(t)&&(n=t,t=null),t||(t={});const i=X("path",t);return ee(n)&&(i.dataset.cornerRadius=String(n)),bf(i,e)}function bf(e,t){const n=parseInt(e.dataset.cornerRadius,10)||0;return G(e,{d:_i(vx(t,n))}),e}function oa(e){return ce(e,function(t){return!_e(e,function(n){return n!==t&&Ef(t,n)})})}function Ef(e,t){if(t){if(e===t)return t;if(e.parent)return Ef(e.parent,t)}}function xf(e,t,n){var i=!n||e.indexOf(t)===-1;return i&&e.push(t),i}function bi(e,t,n){n=n||0,oe(e)||(e=[e]),A(e,function(i,r){var o=t(i,r,n);oe(o)&&o.length&&bi(o,t,n+1)})}function yx(e,t,n){var i=[],r=[];return bi(e,function(o,a,s){xf(i,o,t);var c=o.children;if(c&&xf(r,c,t))return c}),i}function Or(e,t){return yx(e,!t)}function _x(e,t,n){vi(t)&&(t=!0),tt(t)&&(n=t,t=!0),n=n||{};var i=Ir(n.allShapes),r=Ir(n.allConnections),o=Ir(n.enclosedElements),a=Ir(n.enclosedConnections),s=Ir(n.topLevel,t&&Wi(e,function(u){return u.id}));function c(u){s[u.source.id]&&s[u.target.id]&&(s[u.id]=[u]),i[u.source.id]&&i[u.target.id]&&(a[u.id]=o[u.id]=u),r[u.id]=u}function l(u){if(o[u.id]=u,u.waypoints)a[u.id]=r[u.id]=u;else return i[u.id]=u,A(u.incoming,c),A(u.outgoing,c),u.children}return bi(e,l),{allShapes:i,allConnections:r,topLevel:s,enclosedConnections:a,enclosedElements:o}}function Ke(e,t){t=!!t,oe(e)||(e=[e]);var n,i,r,o;return A(e,function(a){var s=a;a.waypoints&&!t&&(s=Ke(a.waypoints,!0));var c=s.x,l=s.y,u=s.height||0,p=s.width||0;(c<n||n===void 0)&&(n=c),(l<i||i===void 0)&&(i=l),(c+p>r||r===void 0)&&(r=c+p),(l+u>o||o===void 0)&&(o=l+u)}),{x:n,y:i,height:o-i,width:r-n}}function wf(e,t){var n={};return A(e,function(i){var r=i;r.waypoints&&(r=Ke(r)),!ee(t.y)&&r.x>t.x&&(n[i.id]=i),!ee(t.x)&&r.y>t.y&&(n[i.id]=i),r.x>t.x&&r.y>t.y&&(ee(t.width)&&ee(t.height)&&r.width+r.x<t.width+t.x&&r.height+r.y<t.height+t.y||!ee(t.width)||!ee(t.height))&&(n[i.id]=i)}),n}function Sf(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function Cf(e){return!!(e&&e.isFrame)}function Ir(e,t){return D({},e||{},t||{})}var bx=1;function Hn(e,t){bn.call(this,e,bx),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})}Y(Hn,bn),Hn.prototype.canRender=function(){return!0},Hn.prototype.drawShape=function(t,n,i){var r=X("rect");return G(r,{x:0,y:0,width:n.width||0,height:n.height||0}),Cf(n)?G(r,D({},this.FRAME_STYLE,i||{})):G(r,D({},this.SHAPE_STYLE,i||{})),ie(t,r),r},Hn.prototype.drawConnection=function(t,n,i){var r=ra(n.waypoints,D({},this.CONNECTION_STYLE,i||{}));return ie(t,r),r},Hn.prototype.getShapePath=function(t){var n=t.x,i=t.y,r=t.width,o=t.height,a=[["M",n,i],["l",r,0],["l",0,o],["l",-r,0],["z"]];return _i(a)},Hn.prototype.getConnectionPath=function(t){var n=t.waypoints,i,r,o=[];for(i=0;r=n[i];i++)r=r.original||r,o.push([i===0?"M":"L",r.x,r.y]);return _i(o)},Hn.$inject=["eventBus","styles"];function Ex(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(n,i,r){var o=this.style(i,r);return D(o,{class:n})},this.style=function(n,i){!oe(n)&&!i&&(i=n,n=[]);var r=Tt(n,function(o,a){return D(o,e[a]||{})},{});return i?D(r,i):r},this.computeStyle=function(n,i,r){return oe(i)||(r=i,i=[]),t.style(i||[],D({},r,n||{}))}}const xx={__init__:["defaultRenderer"],defaultRenderer:["type",Hn],styles:["type",Ex]};function Le(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return n!==-1&&e.splice(n,1),n}function qe(e,t,n){if(!(!e||!t)){typeof n!="number"&&(n=-1);var i=e.indexOf(t);if(i!==-1){if(i===n)return;if(n!==-1)e.splice(i,1);else return}n!==-1?e.splice(n,0,t):e.push(t)}}function Ic(e,t){return!e||!t?-1:e.indexOf(t)}function Br(e,t){return!e||!t?-1:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Bc(e,t,n,i){if(typeof i>"u"&&(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=Br(e,t);return Math.abs(r/o)<=i}var wx=2;function En(e,t){var n=Array.from(arguments).flat();const i={x:"v",y:"h"};for(const[r,o]of Object.entries(i))if(Sx(r,n))return o;return!1}function Sx(e,t){const n=t[0];return yi(t,function(i){return Math.abs(n[e]-i[e])<=wx})}function Rf(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 Lc(e,t){return{x:Math.round(e.x+(t.x-e.x)/2),y:Math.round(e.y+(t.y-e.y)/2)}}var Cx=/,?([a-z]),?/gi,Tf=parseFloat,$e=Math,Vn=$e.PI,pn=$e.min,fn=$e.max,Pf=$e.pow,zn=$e.abs,Rx=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/ig,Tx=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/ig,aa=Array.isArray||function(e){return e instanceof Array};function $c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Lr(e){if(typeof e=="function"||Object(e)!==e)return e;var t=new e.constructor;for(var n in e)$c(e,n)&&(t[n]=Lr(e[n]));return t}function Px(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}function Ax(e){function t(){var n=Array.prototype.slice.call(arguments,0),i=n.join("␀"),r=t.cache=t.cache||{},o=t.count=t.count||[];return $c(r,i)?(Px(o,i),r[i]):(o.length>=1e3&&delete r[o.shift()],o.push(i),r[i]=e(...arguments),r[i])}return t}function kx(e){if(!e)return null;var t=Gi(e);if(t.arr)return Lr(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 aa(e)&&aa(e[0])&&(i=Lr(e)),i.length||String(e).replace(Rx,function(r,o,a){var s=[],c=o.toLowerCase();for(a.replace(Tx,function(l,u){u&&s.push(+u)}),c=="m"&&s.length>2&&(i.push([o,...s.splice(0,2)]),c="l",o=o=="m"?"l":"L");s.length>=n[c]&&(i.push([o,...s.splice(0,n[c])]),!!n[c]););}),i.toString=Gi.toString,t.arr=Lr(i),i}function Gi(e){var t=Gi.ps=Gi.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout(function(){for(var n in t)$c(t,n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])}),t[e]}function jc(e,t,n,i){return arguments.length===1&&(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 Af(){return this.join(",").replace(Cx,"$1")}function sa(e){var t=Lr(e);return t.toString=Af,t}function kf(e,t,n,i,r,o,a,s,c){var l=1-c,u=Pf(l,3),p=Pf(l,2),f=c*c,d=f*c,m=u*e+p*3*c*n+l*3*c*c*r+d*a,v=u*t+p*3*c*i+l*3*c*c*o+d*s;return{x:ca(m),y:ca(v)}}function Df(e){var t=Ix(...e);return jc(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function Wn(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function Dx(e,t){return e=jc(e),t=jc(t),Wn(t,e.x,e.y)||Wn(t,e.x2,e.y)||Wn(t,e.x,e.y2)||Wn(t,e.x2,e.y2)||Wn(e,t.x,t.y)||Wn(e,t.x2,t.y)||Wn(e,t.x,t.y2)||Wn(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)}function Mf(e,t,n,i,r){var o=-3*t+9*n-9*i+3*r,a=e*o+6*t-12*n+6*i;return e*a-3*t+3*n}function Nf(e,t,n,i,r,o,a,s,c){c==null&&(c=1),c=c>1?1:c<0?0:c;for(var l=c/2,u=12,p=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,m=0;m<u;m++){var v=l*p[m]+l,g=Mf(v,e,n,r,a),w=Mf(v,t,i,o,s),C=g*g+w*w;d+=f[m]*$e.sqrt(C)}return l*d}function Mx(e,t,n,i,r,o,a,s){if(!(fn(e,n)<pn(r,a)||pn(e,n)>fn(r,a)||fn(t,i)<pn(o,s)||pn(t,i)>fn(o,s))){var c=(e*i-t*n)*(r-a)-(e-n)*(r*s-o*a),l=(e*i-t*n)*(o-s)-(t-i)*(r*s-o*a),u=(e-n)*(o-s)-(t-i)*(r-a);if(u){var p=ca(c/u),f=ca(l/u),d=+p.toFixed(2),m=+f.toFixed(2);if(!(d<+pn(e,n).toFixed(2)||d>+fn(e,n).toFixed(2)||d<+pn(r,a).toFixed(2)||d>+fn(r,a).toFixed(2)||m<+pn(t,i).toFixed(2)||m>+fn(t,i).toFixed(2)||m<+pn(o,s).toFixed(2)||m>+fn(o,s).toFixed(2)))return{x:p,y:f}}}}function ca(e){return Math.round(e*1e11)/1e11}function Nx(e,t,n){var i=Df(e),r=Df(t);if(!Dx(i,r))return[];for(var o=Nf(...e),a=Nf(...t),s=If(e)?1:~~(o/5)||1,c=If(t)?1:~~(a/5)||1,l=[],u=[],p={},f=[],d=0;d<s+1;d++){var m=kf(...e,d/s);l.push({x:m.x,y:m.y,t:d/s})}for(d=0;d<c+1;d++)m=kf(...t,d/c),u.push({x:m.x,y:m.y,t:d/c});for(d=0;d<s;d++)for(var v=0;v<c;v++){var g=l[d],w=l[d+1],C=u[v],x=u[v+1],E=zn(w.x-g.x)<.01?"y":"x",S=zn(x.x-C.x)<.01?"y":"x",R=Mx(g.x,g.y,w.x,w.y,C.x,C.y,x.x,x.y),N;if(R){if(N=R.x.toFixed(9)+"#"+R.y.toFixed(9),p[N])continue;p[N]=!0;var P=g.t+zn((R[E]-g[E])/(w[E]-g[E]))*(w.t-g.t),O=C.t+zn((R[S]-C[S])/(x[S]-C[S]))*(x.t-C.t);P>=0&&P<=1&&O>=0&&O<=1&&f.push({x:R.x,y:R.y,t1:P,t2:O})}}return f}function Of(e,t,n){e=$f(e),t=$f(t);for(var i,r,o,a,s,c,l,u,p,f,d=n?0:[],m=0,v=e.length;m<v;m++){var g=e[m];if(g[0]=="M")i=s=g[1],r=c=g[2];else{g[0]=="C"?(p=[i,r,...g.slice(1)],i=p[6],r=p[7]):(p=[i,r,i,r,s,c,s,c],i=s,r=c);for(var w=0,C=t.length;w<C;w++){var x=t[w];if(x[0]=="M")o=l=x[1],a=u=x[2];else{x[0]=="C"?(f=[o,a,...x.slice(1)],o=f[6],a=f[7]):(f=[o,a,o,a,l,u,l,u],o=l,a=u);var E=Nx(p,f);{for(var S=0,R=E.length;S<R;S++)E[S].segment1=m,E[S].segment2=w,E[S].bez1=p,E[S].bez2=f;d=d.concat(E)}}}}}return d}function Ox(e){var t=Gi(e);if(t.abs)return sa(t.abs);if((!aa(e)||!aa(e&&e[0]))&&(e=kx(e)),!e||!e.length)return[["M",0,0]];var n=[],i=0,r=0,o=0,a=0,s=0,c;e[0][0]=="M"&&(i=+e[0][1],r=+e[0][2],o=i,a=r,s++,n[0]=["M",i,r]);for(var l,u,p=s,f=e.length;p<f;p++){if(n.push(l=[]),u=e[p],c=u[0],c!=c.toUpperCase())switch(l[0]=c.toUpperCase(),l[0]){case"A":l[1]=u[1],l[2]=u[2],l[3]=u[3],l[4]=u[4],l[5]=u[5],l[6]=+u[6]+i,l[7]=+u[7]+r;break;case"V":l[1]=+u[1]+r;break;case"H":l[1]=+u[1]+i;break;case"M":o=+u[1]+i,a=+u[2]+r;default:for(var d=1,m=u.length;d<m;d++)l[d]=+u[d]+(d%2?i:r)}else for(var v=0,g=u.length;v<g;v++)l[v]=u[v];switch(c=c.toUpperCase(),l[0]){case"Z":i=+o,r=+a;break;case"H":i=l[1];break;case"V":r=l[1];break;case"M":o=l[l.length-2],a=l[l.length-1];default:i=l[l.length-2],r=l[l.length-1]}}return n.toString=Af,t.abs=sa(n),n}function If(e){return e[0]===e[2]&&e[1]===e[3]&&e[4]===e[6]&&e[5]===e[7]}function la(e,t,n,i){return[e,t,n,i,n,i]}function Bf(e,t,n,i,r,o){var a=.3333333333333333,s=2/3;return[a*e+s*n,a*t+s*i,a*r+s*n,a*o+s*i,r,o]}function Lf(e,t,n,i,r,o,a,s,c,l){var u=Vn*120/180,p=Vn/180*(+r||0),f=[],d,m=Ax(function(T,_,y){var k=T*$e.cos(y)-_*$e.sin(y),M=T*$e.sin(y)+_*$e.cos(y);return{x:k,y:M}});if(l)N=l[0],P=l[1],S=l[2],R=l[3];else{d=m(e,t,-p),e=d.x,t=d.y,d=m(s,c,-p),s=d.x,c=d.y;var v=(e-s)/2,g=(t-c)/2,w=v*v/(n*n)+g*g/(i*i);w>1&&(w=$e.sqrt(w),n=w*n,i=w*i);var C=n*n,x=i*i,E=(o==a?-1:1)*$e.sqrt(zn((C*x-C*g*g-x*v*v)/(C*g*g+x*v*v))),S=E*n*g/i+(e+s)/2,R=E*-i*v/n+(t+c)/2,N=$e.asin(((t-R)/i).toFixed(9)),P=$e.asin(((c-R)/i).toFixed(9));N=e<S?Vn-N:N,P=s<S?Vn-P:P,N<0&&(N=Vn*2+N),P<0&&(P=Vn*2+P),a&&N>P&&(N=N-Vn*2),!a&&P>N&&(P=P-Vn*2)}var O=P-N;if(zn(O)>u){var I=P,L=s,B=c;P=N+u*(a&&P>N?1:-1),s=S+n*$e.cos(P),c=R+i*$e.sin(P),f=Lf(s,c,n,i,r,0,a,L,B,[P,I,S,R])}O=P-N;var z=$e.cos(N),q=$e.sin(N),Je=$e.cos(P),Ce=$e.sin(P),pe=$e.tan(O/4),Qe=4/3*n*pe,Ie=4/3*i*pe,be=[e,t],ze=[e+Qe*q,t-Ie*z],j=[s+Qe*Ce,c-Ie*Je],V=[s,c];if(ze[0]=2*be[0]-ze[0],ze[1]=2*be[1]-ze[1],l)return[ze,j,V].concat(f);f=[ze,j,V].concat(f).join().split(",");for(var Z=[],he=0,St=f.length;he<St;he++)Z[he]=he%2?m(f[he-1],f[he],p).y:m(f[he],f[he+1],p).x;return Z}function Ix(e,t,n,i,r,o,a,s){for(var c=[],l=[[],[]],u,p,f,d,m,v,g,w,C=0;C<2;++C){if(C==0?(p=6*e-12*n+6*r,u=-3*e+9*n-9*r+3*a,f=3*n-3*e):(p=6*t-12*i+6*o,u=-3*t+9*i-9*o+3*s,f=3*i-3*t),zn(u)<1e-12){if(zn(p)<1e-12)continue;d=-f/p,0<d&&d<1&&c.push(d);continue}g=p*p-4*f*u,w=$e.sqrt(g),!(g<0)&&(m=(-p+w)/(2*u),0<m&&m<1&&c.push(m),v=(-p-w)/(2*u),0<v&&v<1&&c.push(v))}for(var x=c.length,E=x,S;x--;)d=c[x],S=1-d,l[0][x]=S*S*S*e+3*S*S*d*n+3*S*d*d*r+d*d*d*a,l[1][x]=S*S*S*t+3*S*S*d*i+3*S*d*d*o+d*d*d*s;return l[0][E]=e,l[1][E]=t,l[0][E+1]=a,l[1][E+1]=s,l[0].length=l[1].length=E+2,{x0:pn(...l[0]),y0:pn(...l[1]),x1:fn(...l[0]),y1:fn(...l[1])}}function $f(e){var t=Gi(e);if(t.curve)return sa(t.curve);for(var n=Ox(e),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},r=function(d,m,v){var g,w;if(!d)return["C",m.x,m.y,m.x,m.y,m.x,m.y];switch(!(d[0]in{T:1,Q:1})&&(m.qx=m.qy=null),d[0]){case"M":m.X=d[1],m.Y=d[2];break;case"A":d=["C",...Lf(m.x,m.y,...d.slice(1))];break;case"S":v=="C"||v=="S"?(g=m.x*2-m.bx,w=m.y*2-m.by):(g=m.x,w=m.y),d=["C",g,w,...d.slice(1)];break;case"T":v=="Q"||v=="T"?(m.qx=m.x*2-m.qx,m.qy=m.y*2-m.qy):(m.qx=m.x,m.qy=m.y),d=["C",...Bf(m.x,m.y,m.qx,m.qy,d[1],d[2])];break;case"Q":m.qx=d[1],m.qy=d[2],d=["C",...Bf(m.x,m.y,d[1],d[2],d[3],d[4])];break;case"L":d=["C",...la(m.x,m.y,d[1],d[2])];break;case"H":d=["C",...la(m.x,m.y,d[1],m.y)];break;case"V":d=["C",...la(m.x,m.y,m.x,d[1])];break;case"Z":d=["C",...la(m.x,m.y,m.X,m.Y)];break}return d},o=function(d,m){if(d[m].length>7){d[m].shift();for(var v=d[m];v.length;)a[m]="A",d.splice(m++,0,["C",...v.splice(0,6)]);d.splice(m,1),u=n.length}},a=[],s="",c="",l=0,u=n.length;l<u;l++){n[l]&&(s=n[l][0]),s!="C"&&(a[l]=s,l&&(c=a[l-1])),n[l]=r(n[l],i,c),a[l]!="A"&&s=="C"&&(a[l]="C"),o(n,l);var p=n[l],f=p.length;i.x=p[f-2],i.y=p[f-1],i.bx=Tf(p[f-4])||i.x,i.by=Tf(p[f-3])||i.y}return t.curve=sa(n),n}function we(e){return tt(e)&&bt(e,"waypoints")}function ge(e){return tt(e)&&bt(e,"labelTarget")}function jf(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 Q(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function ua(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function Bx(e){return xn({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function Lx(e){for(var t=e.waypoints,n=t.reduce(function(l,u,p){var f=t[p-1];if(f){var d=l[l.length-1],m=d&&d.endLength||0,v=Fx(f,u);l.push({start:f,end:u,startLength:m,endLength:m+v,length:v})}return l},[]),i=n.reduce(function(l,u){return l+u.length},0),r=i/2,o=0,a=n[o];a.endLength<r;)a=n[++o];var s=(r-a.startLength)/a.length,c={x:a.start.x+(a.end.x-a.start.x)*s,y:a.start.y+(a.end.y-a.start.y)*s};return c}function te(e){return we(e)?Lx(e):Bx(e)}function pt(e,t,n){n=n||0,tt(n)||(n={x:n,y:n});var i=Q(e),r=Q(t),o=i.bottom+n.y<=r.top,a=i.left-n.x>=r.right,s=i.top-n.y>=r.bottom,c=i.right+n.x<=r.left,l=o?"top":s?"bottom":null,u=c?"left":a?"right":null;return u&&l?l+"-"+u:u||l||"intersect"}function Fc(e,t,n){var i=$x(e,t);return i.length===1||i.length===2&&Br(i[0],i[1])<1?xn(i[0]):i.length>1?(i=cn(i,function(r){var o=Math.floor(r.t2*100)||1;return o=100-o,o=(o<10?"0":"")+o,r.segment2+"#"+o}),xn(i[n?0:i.length-1])):null}function $x(e,t){return Of(e,t)}function jx(e){e=e.slice();for(var t=0,n,i,r;e[t];)n=e[t],i=e[t-1],r=e[t+1],Br(n,r)===0||Bc(i,r,n)?e.splice(t,1):t++;return e}function Fx(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function pa(e,t){return Math.round(e*t)/t}function Ff(e){return ee(e)?e+"px":e}function Hx(e){for(;e.parent;)e=e.parent;return e}function Vx(e){e=D({},{width:"100%",height:"100%"},e);const t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),lt(n,{position:"relative",overflow:"hidden",width:Ff(e.width),height:Ff(e.height)}),t.appendChild(n),n}function Hf(e,t,n){const i=X("g");me(i).add(t);const r=n!==void 0?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]||null),i}const zx="base",Vf=0,Wx=1,Ux={shape:["x","y","width","height"],connection:["waypoints"]};function ne(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}ne.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],ne.prototype._init=function(e){const t=this._eventBus,n=this._container=Vx(e),i=this._svg=X("svg");G(i,{width:"100%",height:"100%"}),ut(i,"tabindex",0),e.autoFocus&&t.on("element.hover",()=>{this.restoreFocus()}),t.on("element.mousedown",500,o=>{this.focus()}),i.addEventListener("focusin",()=>{this._setFocused(!0)}),i.addEventListener("focusout",()=>{this._setFocused(!1)}),ie(n,i);const r=this._viewport=Hf(i,"viewport");e.deferUpdate&&(this._viewboxChanged=rf(Et(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)},ne.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},ne.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},ne.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{const n=Sf(t);n==="root"?this.removeRootElement(t):this._removeElement(t,n)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox},ne.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},ne.prototype.restoreFocus=function(){document.activeElement===document.body&&this.focus()},ne.prototype.isFocused=function(){return this._focused},ne.prototype.getDefaultLayer=function(){return this.getLayer(zx,Vf)},ne.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)),typeof t<"u"&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group},ne.prototype._getChildIndex=function(e){return Tt(this._layers,function(t,n){return n.visible&&e>=n.index&&t++,t},0)},ne.prototype._createLayer=function(e,t){typeof t>"u"&&(t=Wx);const n=this._getChildIndex(t);return{group:Hf(this._viewport,"layer-"+e,n),index:t,visible:!0}},ne.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},ne.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&&(Ge(n),t.visible=!1),n},ne.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],Ge(t.group))},ne.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},ne.prototype.findRoot=function(e){return typeof e=="string"&&(e=this._elementRegistry.get(e)),e?(this._findPlaneForRoot(Hx(e))||{}).rootElement:void 0},ne.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})},ne.prototype._findPlaneForRoot=function(e){return _e(this._planes,function(t){return t.rootElement===e})},ne.prototype.getContainer=function(){return this._container},ne.prototype._updateMarker=function(e,t,n){let i;e.id||(e=this._elementRegistry.get(e)),e.markers=e.markers||new Set,i=this._elementRegistry._elements[e.id],i&&(A([i.gfx,i.secondaryGfx],function(r){r&&(n?(e.markers.add(t),me(r).add(t)):(e.markers.delete(t),me(r).remove(t)))}),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},ne.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},ne.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},ne.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),e.markers?e.markers.has(t):!1},ne.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},ne.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},ne.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,Vf);return this.hideLayer(n),this._addRoot(e,i),this._planes.push({rootElement:e,layer:i}),e},ne.prototype.removeRootElement=function(e){if(typeof e=="string"&&(e=this._elementRegistry.get(e)),!!this._findPlaneForRoot(e))return this._removeRoot(e),this._removeLayer(e.layer),this._planes=this._planes.filter(function(n){return n.rootElement!==e}),this._rootElement===e&&(this._rootElement=null),e},ne.prototype.setRootElement=function(e){if(e===this._rootElement)return e;let t;if(!e)throw new Error("rootElement required");return t=this._findPlaneForRoot(e),t||(e=this.addRootElement(e)),this._setRoot(e),e},ne.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)},ne.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})},ne.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})},ne.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=Ux[e];if(!yi(n,function(r){return typeof t[r]<"u"}))throw new Error("must supply { "+n.join(", ")+" } with "+e)},ne.prototype._setParent=function(e,t,n){qe(t.children,e,n),e.parent=t},ne.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();const r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),r.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);const a=o.create(e,t,i);return this._elementRegistry.add(t,a),o.update(e,t,a),r.fire(e+".added",{element:t,gfx:a}),t},ne.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},ne.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},ne.prototype._removeElement=function(e,t){const n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(e=n.get(e.id||e),!!e)return r.fire(t+".remove",{element:e}),i.remove(e),Le(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},ne.prototype.removeShape=function(e){return this._removeElement(e,"shape")},ne.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},ne.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},ne.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},ne.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},ne.prototype.viewbox=function(e){if(e===void 0&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let i,r,o,a,s,c,l;if(e)this._changeViewbox(function(){s=Math.min(n.width/e.width,n.height/e.height);const u=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);Nr(t,u)});else return o=this._rootElement?this.getActiveLayer():null,i=o&&o.getBBox()||{},a=Nr(t),r=a?a.matrix:tx(),s=pa(r.a,1e3),c=pa(-r.e||0,1e3),l=pa(-r.f||0,1e3),e=this._cachedViewbox={x:c?c/s:0,y:l?l/s:0,width:n.width/s,height:n.height/s,scale:s,inner:{width:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:n},e;return e},ne.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox(function(){e=D({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),zf(t,n)}),{x:n.e,y:n.f}},ne.prototype.scrollToElement=function(e,t){let n=100;typeof e=="string"&&(e=this._elementRegistry.get(e));const i=this.findRoot(e);if(i!==this.getRootElement()&&this.setRootElement(i),i===e)return;t||(t={}),typeof t=="number"&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};const r=Ke(e),o=Q(r),a=this.viewbox(),s=this.zoom();let c,l;a.y+=t.top/s,a.x+=t.left/s,a.width-=(t.right+t.left)/s,a.height-=(t.bottom+t.top)/s;const u=Q(a);if(!(r.width<a.width&&r.height<a.height))c=r.x-a.x,l=r.y-a.y;else{const f=Math.max(0,o.right-u.right),d=Math.min(0,o.left-u.left),m=Math.max(0,o.bottom-u.bottom),v=Math.min(0,o.top-u.top);c=f||d,l=m||v}this.scroll({dx:-c*s,dy:-l*s})},ne.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if(e==="fit-viewport")return this._fitViewport(t);let n,i;return this._changeViewbox(function(){typeof t!="object"&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)}),pa(i.a,1e3)};function zf(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}ne.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},ne.prototype._setZoom=function(e,t){const n=this._svg,i=this._viewport,r=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,c,l,u;c=i.getCTM();const p=c.a;return t?(a=D(o,t),s=a.matrixTransform(c.inverse()),l=r.translate(s.x,s.y).scale(1/p*e).translate(-s.x,-s.y),u=c.multiply(l)):u=r.scale(e),zf(this._viewport,u),u},ne.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},ne.prototype.getAbsoluteBBox=function(e){const t=this.viewbox();let n;e.waypoints?n=this.getGraphics(e).getBBox():n=e;const i=n.x*t.scale-t.x*t.scale,r=n.y*t.scale-t.y*t.scale,o=n.width*t.scale,a=n.height*t.scale;return{x:i,y:r,width:o,height:a}},ne.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Ki="data-element-id";function Nt(e){this._elements={},this._eventBus=e}Nt.$inject=["eventBus"],Nt.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),G(t,Ki,i),n&&G(n,Ki,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},Nt.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(G(i.gfx,Ki,""),i.secondaryGfx&&G(i.secondaryGfx,Ki,""),delete t[n])},Nt.prototype.updateId=function(e,t){this._validateId(t),typeof e=="string"&&(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)},Nt.prototype.updateGraphics=function(e,t,n){var i=e.id||e,r=this._elements[i];return n?r.secondaryGfx=t:r.gfx=t,t&&G(t,Ki,i),t},Nt.prototype.get=function(e){var t;typeof e=="string"?t=e:t=e&&G(e,Ki);var n=this._elements[t];return n&&n.element},Nt.prototype.filter=function(e){var t=[];return this.forEach(function(n,i){e(n,i)&&t.push(n)}),t},Nt.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),i=0;i<n.length;i++){var r=n[i],o=t[r],a=o.element,s=o.gfx;if(e(a,s))return a}},Nt.prototype.getAll=function(){return this.filter(function(e){return e})},Nt.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)})},Nt.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},Nt.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 Gx(e,t,n,i){var r=n.inverse;return Object.defineProperty(e,"remove",{value:function(o){var a=this.indexOf(o);return a!==-1&&(this.splice(a,1),t.unset(o,r,i)),o}}),Object.defineProperty(e,"contains",{value:function(o){return this.indexOf(o)!==-1}}),Object.defineProperty(e,"add",{value:function(o,a){var s=this.indexOf(o);if(typeof a>"u"){if(s!==-1)return;a=this.length}s!==-1&&this.splice(s,1),this.splice(a,0,o),s===-1&&t.set(o,r,i)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}function Kx(e){return e.__refs_collection===!0}function qx(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function Wf(e,t,n){var i=Gx(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:i}),i.length&&i.forEach(function(r){e.set(r,t.inverse,n)})}function Yx(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(o){if(o!==r){var a=r;r=null,a&&e.unset(a,i,n),r=o,e.set(r,i,n)}}})}function Lt(e,t){if(!(this instanceof Lt))return new Lt(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Lt.prototype.bind=function(e,t){if(typeof t=="string"){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?Wf(this,t,e):Yx(this,t,e)},Lt.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return Kx(n)||Wf(this,t,e),n},Lt.prototype.ensureBound=function(e,t){qx(e,t)||this.bind(e,t)},Lt.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},Lt.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Hc=new Lt({name:"children",enumerable:!0,collection:!0},{name:"parent"}),Uf=new Lt({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Gf=new Lt({name:"attachers",collection:!0},{name:"host"}),Kf=new Lt({name:"outgoing",collection:!0},{name:"source"}),qf=new Lt({name:"incoming",collection:!0},{name:"target"});function qi(){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)}}),Hc.bind(this,"parent"),Uf.bind(this,"labels"),Kf.bind(this,"outgoing"),qf.bind(this,"incoming")}function $r(){qi.call(this),Hc.bind(this,"children"),Gf.bind(this,"host"),Gf.bind(this,"attachers")}Y($r,qi);function Yf(){qi.call(this),Hc.bind(this,"children")}Y(Yf,$r);function Xf(){$r.call(this),Uf.bind(this,"labelTarget")}Y(Xf,$r);function Zf(){qi.call(this),Kf.bind(this,"source"),qf.bind(this,"target")}Y(Zf,qi);var Xx={connection:Zf,shape:$r,label:Xf,root:Yf};function Zx(e,t){var n=Xx[e];if(!n)throw new Error("unknown type: <"+e+">");return D(new n,t)}function Jx(e){return e instanceof qi}function wn(){this._uid=12}wn.prototype.createRoot=function(e){return this.create("root",e)},wn.prototype.createLabel=function(e){return this.create("label",e)},wn.prototype.createShape=function(e){return this.create("shape",e)},wn.prototype.createConnection=function(e){return this.create("connection",e)},wn.prototype.create=function(e,t){return t=D({},t||{}),t.id||(t.id=e+"_"+this._uid++),Zx(e,t)};var fa="__fn",Jf=1e3,Qx=Array.prototype.slice;function At(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}At.prototype.on=function(e,t,n,i){if(e=oe(e)?e:[e],We(t)&&(i=n,n=t,t=Jf),!ee(t))throw new Error("priority must be a number");var r=n;i&&(r=Et(n,i),r[fa]=n[fa]||n);var o=this;e.forEach(function(a){o._addListener(a,{priority:t,callback:r,next:null})})},At.prototype.once=function(e,t,n,i){var r=this;if(We(t)&&(i=n,n=t,t=Jf),!ee(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var a=n.apply(i,arguments);return r.off(e,o),a}o[fa]=n,this.on(e,t,o)},At.prototype.off=function(e,t){e=oe(e)?e:[e];var n=this;e.forEach(function(i){n._removeListener(i,t)})},At.prototype.createEvent=function(e){var t=new jr;return t.init(e),t},At.prototype.fire=function(e,t){var n,i,r,o;if(o=Qx.call(arguments),typeof e=="object"&&(t=e,e=t.type),!e)throw new Error("no event type specified");if(i=this._listeners[e],!!i){t instanceof jr?n=t:n=this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{r=this._invokeListeners(n,o,i)}finally{e!==a&&(n.type=a)}return r===void 0&&n.defaultPrevented&&(r=!1),r}},At.prototype.handleError=function(e){return this.fire("error",{error:e})===!1},At.prototype._destroy=function(){this._listeners={}},At.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},At.prototype._invokeListener=function(e,t,n){var i;if(n.callback.__isTomb)return i;try{i=ew(n.callback,t),i!==void 0&&(e.returnValue=i,e.stopPropagation()),i===!1&&e.preventDefault()}catch(r){if(!this.handleError(r))throw console.error("unhandled error in event listener",r),r}return i},At.prototype._addListener=function(e,t){var n=this._getListeners(e),i;if(!n){this._setListeners(e,t);return}for(;n;){if(n.priority<t.priority){t.next=n,i?i.next=t:this._setListeners(e,t);return}i=n,n=n.next}i.next=t},At.prototype._getListeners=function(e){return this._listeners[e]},At.prototype._setListeners=function(e,t){this._listeners[e]=t},At.prototype._removeListener=function(e,t){var n=this._getListeners(e),i,r,o;if(!t){this._setListeners(e,null);return}for(;n;)i=n.next,o=n.callback,(o===t||o[fa]===t)&&(r?r.next=i:this._setListeners(e,i)),r=n,n=i};function jr(){}jr.prototype.stopPropagation=function(){this.cancelBubble=!0},jr.prototype.preventDefault=function(){this.defaultPrevented=!0},jr.prototype.init=function(e){D(this,e||{})};function ew(e,t){return e.apply(null,t)}function Ei(e){return e.childNodes[0]}function tw(e){return e.parentNode.childNodes[1]}function da(e,t,n,i,r){var o=Mr();o.setTranslate(t,n);var a=Mr();a.setRotate(i||0,0,0);var s=Mr();s.setScale(1,1),Nr(e,[o,a,s])}function ot(e,t,n){var i=Mr();i.setTranslate(t,n),Nr(e,i)}function Qf(e,t){var n=Mr();n.setRotate(t,0,0),Nr(e,n)}function Ot(e,t){this._eventBus=e,this._elementRegistry=t}Ot.$inject=["eventBus","elementRegistry"],Ot.prototype._getChildrenContainer=function(e){var t=this._elementRegistry.getGraphics(e),n;return e.parent?(n=tw(t),n||(n=X("g"),me(n).add("djs-children"),ie(t.parentNode,n))):n=t,n},Ot.prototype._clear=function(e){var t=Ei(e);return Zo(t),t},Ot.prototype._createContainer=function(e,t,n,i){var r=X("g");me(r).add("djs-group"),typeof n<"u"?ed(r,t,t.childNodes[n]):ie(t,r);var o=X("g");me(o).add("djs-element"),me(o).add("djs-"+e),i&&me(o).add("djs-frame"),ie(r,o);var a=X("g");return me(a).add("djs-visual"),ie(o,a),o},Ot.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,Cf(t))},Ot.prototype.updateContainments=function(e){var t=this,n=this._elementRegistry,i;i=Tt(e,function(r,o){return o.parent&&(r[o.parent.id]=o.parent),r},{}),A(i,function(r){var o=r.children;if(o){var a=t._getChildrenContainer(r);A(o.slice().reverse(),function(s){var c=n.getGraphics(s);ed(c.parentNode,a)})}})},Ot.prototype.drawShape=function(e,t,n={}){var i=this._eventBus;return i.fire("render.shape",{gfx:e,element:t,attrs:n})},Ot.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)},Ot.prototype.drawConnection=function(e,t,n={}){var i=this._eventBus;return i.fire("render.connection",{gfx:e,element:t,attrs:n})},Ot.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)},Ot.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if(e==="shape")this.drawShape(i,t),ot(n,t.x,t.y);else if(e==="connection")this.drawConnection(i,t);else throw new Error("unknown type: "+e);t.hidden?G(n,"display","none"):G(n,"display","block")}},Ot.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);Ge(t.parentNode)};function ed(e,t,n){var i=n||t.firstChild;e!==i&&t.insertBefore(e,i)}const nw={__depends__:[xx],__init__:["canvas"],canvas:["type",ne],elementRegistry:["type",Nt],elementFactory:["type",wn],eventBus:["type",At],graphicsFactory:["type",Ot]};function iw(e){var t=new _f(e);return t.init(),t}function rw(e){e=e||{};var t={config:["value",e]},n=[t,nw].concat(e.modules||[]);return iw(n)}function Un(e,t){this._injector=t||rw(e),this.get("eventBus").fire("diagram.init")}Un.prototype.get=function(e,t){return this._injector.get(e,t)},Un.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},Un.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},Un.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};function Vc(){}Vc.prototype.get=function(e){return this.$model.properties.get(this,e)},Vc.prototype.set=function(e,t){this.$model.properties.set(this,e,t)};function td(e,t){this.model=e,this.properties=t}td.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(Vc.prototype);A(e.properties,function(a){!a.isMany&&a.default!==void 0&&(i[a.name]=a.default)}),n.defineModel(i,t),n.defineDescriptor(i,e);var r=e.ns.name;function o(a){n.define(this,"$type",{value:r,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),A(a,Et(function(s,c){this.set(c,s)},this))}return o.prototype=i,o.hasType=i.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var ow={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},nd={String:function(e){return e},Boolean:function(e){return e==="true"},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function zc(e,t){var n=nd[e];return n?n(t):t}function Wc(e){return!!ow[e]}function id(e){return!!nd[e]}function ft(e,t){var n=e.split(/:/),i,r;if(n.length===1)i=e,r=t;else if(n.length===2)i=n[1],r=n[0];else throw new Error("expected <prefix:localName> or <localName>, got "+e);return e=(r?r+":":"")+i,{name:e,prefix:r,localName:i}}function It(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}It.prototype.build=function(){return Jt(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},It.prototype.addProperty=function(e,t,n){typeof t=="boolean"&&(n=t,t=void 0),this.addNamedProperty(e,n!==!1);var i=this.properties;t!==void 0?i.splice(t,0,e):i.push(e)},It.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,o=this.propertiesByName,a=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=r.indexOf(e);if(s===-1)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,a),o[i.name]=o[i.localName]=t},It.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=ft(r[0],i),a=ft(r[1],o.prefix).name,s=this.propertiesByName[a];if(s)this.replaceProperty(s,e,n);else throw new Error("refined property <"+a+"> not found");delete e.redefines},It.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},It.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},It.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},It.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},It.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},It.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")},It.prototype.hasProperty=function(e){return this.propertiesByName[e]},It.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(A(e.properties,Et(function(o){o=D({},o,{name:o.ns.localName,inherited:t}),Object.defineProperty(o,"definedBy",{value:e});var a=o.replaces,s=o.redefines;a||s?this.redefineProperty(o,a||s,a):(o.isBody&&this.setBodyProperty(o),o.isId&&this.setIdProperty(o),this.addProperty(o))},this)),i.push(e),n[r]=e)};function Gn(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,A(e,Et(this.registerPackage,this))}Gn.prototype.getPackage=function(e){return this.packageMap[e]},Gn.prototype.getPackages=function(){return this.packages},Gn.prototype.registerPackage=function(e){e=D({},e);var t=this.packageMap;rd(t,e,"prefix"),rd(t,e,"uri"),A(e.types,Et(function(n){this.registerType(n,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},Gn.prototype.registerType=function(e,t){e=D({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:D(e.meta||{})});var n=ft(e.name,t.prefix),i=n.name,r={};A(e.properties,Et(function(o){var a=ft(o.name,n.prefix),s=a.name;Wc(o.type)||(o.type=ft(o.type,a.prefix).name),D(o,{ns:a,name:s}),r[s]=o},this)),D(e,{ns:n,name:i,propertiesByName:r}),A(e.extends,Et(function(o){var a=ft(o,n.prefix),s=this.typeMap[a.name];s.traits=s.traits||[],s.traits.push(i)},this)),this.definePackage(e,t),this.typeMap[i]=e},Gn.prototype.mapTypes=function(e,t,n){var i=Wc(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(c,l){var u=ft(c,Wc(c)?"":e.prefix);r.mapTypes(u,t,l)}function a(c){return o(c,!0)}function s(c){return o(c,!1)}if(!i)throw new Error("unknown type <"+e.name+">");A(i.superClass,n?a:s),t(i,!n),A(i.traits,a)},Gn.prototype.getEffectiveDescriptor=function(e){var t=ft(e),n=new It(t);this.mapTypes(t,function(r,o){n.addTrait(r,o)});var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},Gn.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};function rd(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function xi(e){this.model=e}xi.prototype.set=function(e,t,n){if(!Rt(t)||!t.length)throw new TypeError("property name must be a non-empty string");var i=this.getProperty(e,t),r=i&&i.name;aw(n)?i?delete e[r]:delete e.$attrs[Uc(t)]:i?r in e?e[r]=n:od(e,i,n):e.$attrs[Uc(t)]=n},xi.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[Uc(t)];var i=n.name;return!e[i]&&n.isMany&&od(e,n,[]),e[i]},xi.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;n=D({},n,{get:function(){return i}}),delete n.value}Object.defineProperty(e,t,n)},xi.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},xi.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},xi.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(typeof r<"u"){const o=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(r)throw o;typeof console<"u"&&console.warn(o)}return null};function aw(e){return typeof e>"u"}function od(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function Uc(e){return e.replace(/^:/,"")}function $t(e,t={}){this.properties=new xi(this),this.factory=new td(this,this.properties),this.registry=new Gn(e,this.properties),this.typeCache={},this.config=t}$t.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},$t.prototype.getType=function(e){var t=this.typeCache,n=Rt(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},$t.prototype.createAny=function(e,t,n){var i=ft(e),r={$type:e,$instanceOf:function(a){return a===this.$type},get:function(a){return this[a]},set:function(a,s){M0(this,[a],s)}},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}),A(n,function(a,s){tt(a)&&a.value!==void 0?r[a.name]=a.value:r[s]=a}),r},$t.prototype.getPackage=function(e){return this.registry.getPackage(e)},$t.prototype.getPackages=function(){return this.registry.getPackages()},$t.prototype.getElementDescriptor=function(e){return e.$descriptor},$t.prototype.hasType=function(e,t){t===void 0&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return t in n.allTypesByName},$t.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},$t.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var ad=String.fromCharCode,sw=Object.prototype.hasOwnProperty,cw=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,Fr={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(Fr).forEach(function(e){Fr[e.toUpperCase()]=Fr[e]});function lw(e,t,n,i){return i?sw.call(Fr,i)?Fr[i]:"&"+i+";":ad(t||parseInt(n,16))}function wi(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(cw,lw):e}var sd="non-whitespace outside of root node";function Yi(e){return new Error(e)}function cd(e){return"missing namespace for prefix <"+e+">"}function ha(e){return{get:e,enumerable:!0}}function uw(e){var t={},n;for(n in e)t[n]=e[n];return t}function Gc(e){return e+"$uri"}function pw(e){var t={},n,i;for(n in e)i=e[n],t[i]=i,t[Gc(i)]=n;return t}function ld(){return{line:0,column:0}}function fw(e){throw e}function ud(e){if(!this)return new ud(e);var t=e&&e.proxy,n,i,r,o,a=fw,s,c,l,u,p=ld,f=!1,d=!1,m=null,v=!1,g;function w(E){E instanceof Error||(E=Yi(E)),m=E,a(E,p)}function C(E){s&&(E instanceof Error||(E=Yi(E)),s(E,p))}this.on=function(E,S){if(typeof S!="function")throw Yi("required args <name, cb>");switch(E){case"openTag":i=S;break;case"text":n=S;break;case"closeTag":r=S;break;case"error":a=S;break;case"warn":s=S;break;case"cdata":o=S;break;case"attention":u=S;break;case"question":l=S;break;case"comment":c=S;break;default:throw Yi("unsupported event: "+E)}return this},this.ns=function(E){if(typeof E>"u"&&(E={}),typeof E!="object")throw Yi("required args <nsMap={}>");var S={},R;for(R in E)S[R]=E[R];return d=!0,g=S,this},this.parse=function(E){if(typeof E!="string")throw Yi("required args <xml=string>");return m=null,x(E),p=ld,v=!1,m},this.stop=function(){v=!0};function x(E){var S=d?[]:null,R=d?pw(g):null,N,P=[],O=0,I=!1,L=!1,B=0,z=0,q,Je,Ce,pe,Qe,Ie,be,ze,j,V="",Z=0,he;function St(){if(he!==null)return he;var _,y,k,M=d&&R.xmlns,$=d&&f?[]:null,W=Z,J=V,de=J.length,Xe,Be,rt,Xt,Re,Bn={},Qs={},Bt,se,Ee;e:for(;W<de;W++)if(Bt=!1,se=J.charCodeAt(W),!(se===32||se<14&&se>8)){for((se<65||se>122||se>90&&se<97)&&se!==95&&se!==58&&(C("illegal first char attribute name"),Bt=!0),Ee=W+1;Ee<de;Ee++)if(se=J.charCodeAt(Ee),!(se>96&&se<123||se>64&&se<91||se>47&&se<59||se===46||se===45||se===95)){if(se===32||se<14&&se>8){C("missing attribute value"),W=Ee;continue e}if(se===61)break;C("illegal attribute name char"),Bt=!0}if(Re=J.substring(W,Ee),Re==="xmlns:xmlns"&&(C("illegal declaration of xmlns"),Bt=!0),se=J.charCodeAt(Ee+1),se===34)Ee=J.indexOf('"',W=Ee+2),Ee===-1&&(Ee=J.indexOf("'",W),Ee!==-1&&(C("attribute value quote missmatch"),Bt=!0));else if(se===39)Ee=J.indexOf("'",W=Ee+2),Ee===-1&&(Ee=J.indexOf('"',W),Ee!==-1&&(C("attribute value quote missmatch"),Bt=!0));else for(C("missing attribute value quotes"),Bt=!0,Ee=Ee+1;Ee<de&&(se=J.charCodeAt(Ee+1),!(se===32||se<14&&se>8));Ee++);for(Ee===-1&&(C("missing closing quotes"),Ee=de,Bt=!0),Bt||(rt=J.substring(W,Ee)),W=Ee;Ee+1<de&&(se=J.charCodeAt(Ee+1),!(se===32||se<14&&se>8));Ee++)W===Ee&&(C("illegal character after attribute end"),Bt=!0);if(W=Ee+1,Bt)continue e;if(Re in Qs){C("attribute <"+Re+"> already defined");continue}if(Qs[Re]=!0,!d){Bn[Re]=rt;continue}if(f){if(Be=Re==="xmlns"?"xmlns":Re.charCodeAt(0)===120&&Re.substr(0,6)==="xmlns:"?Re.substr(6):null,Be!==null){if(_=wi(rt),y=Gc(Be),Xt=g[_],!Xt){if(Be==="xmlns"||y in R&&R[y]!==_)do Xt="ns"+O++;while(typeof R[Xt]<"u");else Xt=Be;g[_]=Xt}R[Be]!==Xt&&(Xe||(R=uw(R),Xe=!0),R[Be]=Xt,Be==="xmlns"&&(R[Gc(Xt)]=_,M=Xt),R[y]=_),Bn[Re]=rt;continue}$.push(Re,rt);continue}if(se=Re.indexOf(":"),se===-1){Bn[Re]=rt;continue}if(!(k=R[Re.substring(0,se)])){C(cd(Re.substring(0,se)));continue}Re=M===k?Re.substr(se+1):k+Re.substr(se),Bn[Re]=rt}if(f)for(W=0,de=$.length;W<de;W++){if(Re=$[W++],rt=$[W],se=Re.indexOf(":"),se!==-1){if(!(k=R[Re.substring(0,se)])){C(cd(Re.substring(0,se)));continue}Re=M===k?Re.substr(se+1):k+Re.substr(se)}Bn[Re]=rt}return he=Bn}function T(){for(var _=/(\r\n|\r|\n)/g,y=0,k=0,M=0,$=z,W,J;B>=M&&(W=_.exec(E),!(!W||($=W[0].length+W.index,$>B)));)y+=1,M=$;return B==-1?(k=$,J=E.substring(z)):z===0?J=E.substring(z,B):(k=B-M,J=z==-1?E.substring(B):E.substring(B,z+1)),{data:J,line:y,column:k}}for(p=T,t&&(j=Object.create({},{name:ha(function(){return be}),originalName:ha(function(){return ze}),attrs:ha(St),ns:ha(function(){return R})}));z!==-1;){if(E.charCodeAt(z)===60?B=z:B=E.indexOf("<",z),B===-1){if(P.length)return w("unexpected end of file");if(z===0)return w("missing start tag");z<E.length&&E.substring(z).trim()&&C(sd);return}if(z!==B){if(P.length){if(n&&(n(E.substring(z,B),wi,p),v))return}else if(E.substring(z,B).trim()&&(C(sd),v))return}if(pe=E.charCodeAt(B+1),pe===33){if(Ce=E.charCodeAt(B+2),Ce===91&&E.substr(B+3,6)==="CDATA["){if(z=E.indexOf("]]>",B),z===-1)return w("unclosed cdata");if(o&&(o(E.substring(B+9,z),p),v))return;z+=3;continue}if(Ce===45&&E.charCodeAt(B+3)===45){if(z=E.indexOf("-->",B),z===-1)return w("unclosed comment");if(c&&(c(E.substring(B+4,z),wi,p),v))return;z+=3;continue}}if(pe===63){if(z=E.indexOf("?>",B),z===-1)return w("unclosed question");if(l&&(l(E.substring(B,z+2),p),v))return;z+=2;continue}for(q=B+1;;q++){if(Qe=E.charCodeAt(q),isNaN(Qe))return z=-1,w("unclosed tag");if(Qe===34)Ce=E.indexOf('"',q+1),q=Ce!==-1?Ce:q;else if(Qe===39)Ce=E.indexOf("'",q+1),q=Ce!==-1?Ce:q;else if(Qe===62){z=q;break}}if(pe===33){if(u&&(u(E.substring(B,z+1),wi,p),v))return;z+=1;continue}if(he={},pe===47){if(I=!1,L=!0,!P.length)return w("missing open tag");if(q=be=P.pop(),Ce=B+2+q.length,E.substring(B+2,Ce)!==q)return w("closing tag mismatch");for(;Ce<z;Ce++)if(pe=E.charCodeAt(Ce),!(pe===32||pe>8&&pe<14))return w("close tag")}else{if(E.charCodeAt(z-1)===47?(q=be=E.substring(B+1,z-1),I=!0,L=!0):(q=be=E.substring(B+1,z),I=!0,L=!1),!(pe>96&&pe<123||pe>64&&pe<91||pe===95||pe===58))return w("illegal first char nodeName");for(Ce=1,Je=q.length;Ce<Je;Ce++)if(pe=q.charCodeAt(Ce),!(pe>96&&pe<123||pe>64&&pe<91||pe>47&&pe<59||pe===45||pe===95||pe==46)){if(pe===32||pe<14&&pe>8){be=q.substring(0,Ce),he=null;break}return w("invalid nodeName")}L||P.push(be)}if(d){if(N=R,I&&(L||S.push(N),he===null&&(f=q.indexOf("xmlns",Ce)!==-1)&&(Z=Ce,V=q,St(),f=!1)),ze=be,pe=be.indexOf(":"),pe!==-1){if(Ie=R[be.substring(0,pe)],!Ie)return w("missing namespace on <"+ze+">");be=be.substr(pe+1)}else Ie=R.xmlns;Ie&&(be=Ie+":"+be)}if(I&&(Z=Ce,V=q,i&&(t?i(j,wi,L,p):i(be,St,wi,L,p),v)))return;if(L){if(r&&(r(t?j:be,wi,I,p),v))return;d&&(I?R=N:R=S.pop())}z+=1}}}function pd(e){return e.xml&&e.xml.tagAlias==="lowerCase"}var Kc={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},fd="property";function dd(e){return e.xml&&e.xml.serialize}function dw(e){const t=dd(e);return t!==fd&&(t||null)}function hw(e){return e.charAt(0).toUpperCase()+e.slice(1)}function hd(e,t){return pd(t)?e.prefix+":"+hw(e.localName):e.name}function mw(e,t){var n=e.name,i=e.localName,r=t&&t.xml&&t.xml.typePrefix;return r&&i.indexOf(r)===0?e.prefix+":"+i.slice(r.length):n}function gw(e,t,n){const i=ft(e,t.xmlns),r=`${t[i.prefix]||i.prefix}:${i.localName}`,o=ft(r);var a=n.getPackage(o.prefix);return mw(o,a)}function Kn(e){return new Error(e)}function Sn(e){return e.$descriptor}function vw(e){D(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t)},this.addElement=function(t){if(!t)throw Kn("expected element");var n=this.elementsById,i=Sn(t),r=i.idProperty,o;if(r&&(o=t.get(r.name),o)){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(o))throw new Error("illegal ID <"+o+">");if(n[o])throw Kn("duplicate ID <"+o+">");n[o]=t}},this.addWarning=function(t){this.warnings.push(t)}}function Hr(){}Hr.prototype.handleEnd=function(){},Hr.prototype.handleText=function(){},Hr.prototype.handleNode=function(){};function qc(){}qc.prototype=Object.create(Hr.prototype),qc.prototype.handleNode=function(){return this};function Xi(){}Xi.prototype=Object.create(Hr.prototype),Xi.prototype.handleText=function(e){this.body=(this.body||"")+e};function Vr(e,t){this.property=e,this.context=t}Vr.prototype=Object.create(Xi.prototype),Vr.prototype.handleNode=function(e){if(this.element)throw Kn("expected no sub nodes");return this.element=this.createReference(e),this},Vr.prototype.handleEnd=function(){this.element.id=this.body},Vr.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}};function Yc(e,t){this.element=t,this.propertyDesc=e}Yc.prototype=Object.create(Xi.prototype),Yc.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=zc(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)};function ma(){}ma.prototype=Object.create(Xi.prototype),ma.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};function gt(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}gt.prototype=Object.create(ma.prototype),gt.prototype.addReference=function(e){this.context.addReference(e)},gt.prototype.handleText=function(e){var t=this.element,n=Sn(t),i=n.bodyProperty;if(!i)throw Kn("unexpected body text <"+e+">");Xi.prototype.handleText.call(this,e)},gt.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Sn(t),i=n.bodyProperty;i&&e!==void 0&&(e=zc(i.type,e),t.set(i.name,e))},gt.prototype.createElement=function(e){var t=e.attributes,n=this.type,i=Sn(n),r=this.context,o=new n({}),a=this.model,s;return A(t,function(c,l){var u=i.propertiesByName[l],p;u&&u.isReference?u.isMany?(p=c.split(" "),A(p,function(f){r.addReference({element:o,property:u.ns.name,id:f})})):r.addReference({element:o,property:u.ns.name,id:c}):(u?c=zc(u.type,c):l==="xmlns"?l=":"+l:(s=ft(l,i.ns.prefix),a.getPackage(s.prefix)&&r.addWarning({message:"unknown attribute <"+l+">",element:o,property:l,value:c})),o.set(l,c))}),o},gt.prototype.getPropertyForNode=function(e){var t=e.name,n=ft(t),i=this.type,r=this.model,o=Sn(i),a=n.name,s=o.propertiesByName[a];if(s&&!s.isAttr){const l=dw(s);if(l){const u=e.attributes[l];if(u){const p=gw(u,e.ns,r),f=r.getType(p);return D({},s,{effectiveType:Sn(f).name})}}return s}var c=r.getPackage(n.prefix);if(c){const l=hd(n,c),u=r.getType(l);if(s=_e(o.properties,function(p){return!p.isVirtual&&!p.isReference&&!p.isAttribute&&u.hasType(p.type)}),s)return D({},s,{effectiveType:Sn(u).name})}else if(s=_e(o.properties,function(l){return!l.isReference&&!l.isAttribute&&l.type==="Element"}),s)return s;throw Kn("unrecognized element <"+n.name+">")},gt.prototype.toString=function(){return"ElementDescriptor["+Sn(this.type).name+"]"},gt.prototype.valueHandler=function(e,t){return new Yc(e,t)},gt.prototype.referenceHandler=function(e){return new Vr(e,this.context)},gt.prototype.handler=function(e){return e==="Element"?new Zi(this.model,e,this.context):new gt(this.model,e,this.context)},gt.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,n=t.effectiveType||t.type,id(n))return this.valueHandler(t,i);t.isReference?r=this.referenceHandler(t).handleNode(e):r=this.handler(n).handleNode(e);var o=r.element;return o!==void 0&&(t.isMany?i.get(t.name).push(o):i.set(t.name,o),t.isReference?(D(o,{element:i}),this.context.addReference(o)):o.$parent=i),r};function Xc(e,t,n){gt.call(this,e,t,n)}Xc.prototype=Object.create(gt.prototype),Xc.prototype.createElement=function(e){var t=e.name,n=ft(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),a=o&&hd(n,o)||t;if(!r.hasType(a))throw Kn("unexpected element <"+e.originalName+">");return gt.prototype.createElement.call(this,e)};function Zi(e,t,n){this.model=e,this.context=n}Zi.prototype=Object.create(ma.prototype),Zi.prototype.createElement=function(e){var t=e.name,n=ft(t),i=n.prefix,r=e.ns[i+"$uri"],o=e.attributes;return this.model.createAny(t,r,o)},Zi.prototype.handleChild=function(e){var t=new Zi(this.model,"Element",this.context).handleNode(e),n=this.element,i=t.element,r;return i!==void 0&&(r=n.$children=n.$children||[],r.push(i),i.$parent=n),t},Zi.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)};function Zc(e){e instanceof $t&&(e={model:e}),D(this,{lax:!1},e)}Zc.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof gt?(i=t,t={}):typeof t=="string"?(i=this.handler(t),t={}):typeof i=="string"&&(i=this.handler(i));var r=this.model,o=this.lax,a=new vw(D({},t,{rootHandler:i})),s=new ud({proxy:!0}),c=yw();i.context=a,c.push(i);function l(S,R,N){var P=R(),O=P.line,I=P.column,L=P.data;L.charAt(0)==="<"&&L.indexOf(" ")!==-1&&(L=L.slice(0,L.indexOf(" "))+">");var B="unparsable content "+(L?L+" ":"")+`detected
5
+ **/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const H_=Object.prototype.hasOwnProperty,Cp=(e,t)=>H_.call(e,t),ac=e=>typeof e=="string",sc=e=>e!==null&&typeof e=="object";var V_=typeof global=="object"&&global&&global.Object===Object&&global,z_=typeof self=="object"&&self&&self.Object===Object&&self,cc=V_||z_||Function("return this")(),Ln=cc.Symbol,Rp=Object.prototype,W_=Rp.hasOwnProperty,U_=Rp.toString,Tr=Ln?Ln.toStringTag:void 0;function G_(e){var t=W_.call(e,Tr),n=e[Tr];try{e[Tr]=void 0;var i=!0}catch{}var r=U_.call(e);return i&&(t?e[Tr]=n:delete e[Tr]),r}var K_=Object.prototype,q_=K_.toString;function Y_(e){return q_.call(e)}var X_="[object Null]",Z_="[object Undefined]",Tp=Ln?Ln.toStringTag:void 0;function lc(e){return e==null?e===void 0?Z_:X_:Tp&&Tp in Object(e)?G_(e):Y_(e)}function uc(e){return e!=null&&typeof e=="object"}var J_="[object Symbol]";function pc(e){return typeof e=="symbol"||uc(e)&&lc(e)==J_}function Q_(e,t){for(var n=-1,i=e==null?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}var Pr=Array.isArray,Pp=Ln?Ln.prototype:void 0,Ap=Pp?Pp.toString:void 0;function kp(e){if(typeof e=="string")return e;if(Pr(e))return Q_(e,kp)+"";if(pc(e))return Ap?Ap.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Ho(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function eb(e){return e}var tb="[object AsyncFunction]",nb="[object Function]",ib="[object GeneratorFunction]",rb="[object Proxy]";function ob(e){if(!Ho(e))return!1;var t=lc(e);return t==nb||t==ib||t==tb||t==rb}var fc=cc["__core-js_shared__"],Dp=function(){var e=/[^.]+$/.exec(fc&&fc.keys&&fc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ab(e){return!!Dp&&Dp in e}var sb=Function.prototype,cb=sb.toString;function lb(e){if(e!=null){try{return cb.call(e)}catch{}try{return e+""}catch{}}return""}var ub=/[\\^$.*+?()[\]{}|]/g,pb=/^\[object .+?Constructor\]$/,fb=Function.prototype,db=Object.prototype,hb=fb.toString,mb=db.hasOwnProperty,gb=RegExp("^"+hb.call(mb).replace(ub,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vb(e){if(!Ho(e)||ab(e))return!1;var t=ob(e)?gb:pb;return t.test(lb(e))}function yb(e,t){return e==null?void 0:e[t]}function dc(e,t){var n=yb(e,t);return vb(n)?n:void 0}function _b(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)}var bb=800,Eb=16,xb=Date.now;function wb(e){var t=0,n=0;return function(){var i=xb(),r=Eb-(i-n);if(n=i,r>0){if(++t>=bb)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Sb(e){return function(){return e}}var Vo=function(){try{var e=dc(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Cb=Vo?function(e,t){return Vo(e,"toString",{configurable:!0,enumerable:!1,value:Sb(t),writable:!0})}:eb,Rb=wb(Cb),Tb=9007199254740991,Pb=/^(?:0|[1-9]\d*)$/;function Mp(e,t){var n=typeof e;return t=t??Tb,!!t&&(n=="number"||n!="symbol"&&Pb.test(e))&&e>-1&&e%1==0&&e<t}function Ab(e,t,n){t=="__proto__"&&Vo?Vo(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Np(e,t){return e===t||e!==e&&t!==t}var kb=Object.prototype,Db=kb.hasOwnProperty;function Mb(e,t,n){var i=e[t];(!(Db.call(e,t)&&Np(i,n))||n===void 0&&!(t in e))&&Ab(e,t,n)}var Op=Math.max;function Nb(e,t,n){return t=Op(t===void 0?e.length-1:t,0),function(){for(var i=arguments,r=-1,o=Op(i.length-t,0),a=Array(o);++r<o;)a[r]=i[t+r];r=-1;for(var s=Array(t+1);++r<t;)s[r]=i[r];return s[t]=n(a),_b(e,this,s)}}var Ob=9007199254740991;function Ib(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ob}var Bb="[object Arguments]";function Ip(e){return uc(e)&&lc(e)==Bb}var Bp=Object.prototype,Lb=Bp.hasOwnProperty,$b=Bp.propertyIsEnumerable,Lp=Ip(function(){return arguments}())?Ip:function(e){return uc(e)&&Lb.call(e,"callee")&&!$b.call(e,"callee")},jb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fb=/^\w*$/;function Hb(e,t){if(Pr(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||pc(e)?!0:Fb.test(e)||!jb.test(e)||t!=null&&e in Object(t)}var Ar=dc(Object,"create");function Vb(){this.__data__=Ar?Ar(null):{},this.size=0}function zb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Wb="__lodash_hash_undefined__",Ub=Object.prototype,Gb=Ub.hasOwnProperty;function Kb(e){var t=this.__data__;if(Ar){var n=t[e];return n===Wb?void 0:n}return Gb.call(t,e)?t[e]:void 0}var qb=Object.prototype,Yb=qb.hasOwnProperty;function Xb(e){var t=this.__data__;return Ar?t[e]!==void 0:Yb.call(t,e)}var Zb="__lodash_hash_undefined__";function Jb(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ar&&t===void 0?Zb:t,this}function hi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}hi.prototype.clear=Vb,hi.prototype.delete=zb,hi.prototype.get=Kb,hi.prototype.has=Xb,hi.prototype.set=Jb;function Qb(){this.__data__=[],this.size=0}function zo(e,t){for(var n=e.length;n--;)if(Np(e[n][0],t))return n;return-1}var eE=Array.prototype,tE=eE.splice;function nE(e){var t=this.__data__,n=zo(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():tE.call(t,n,1),--this.size,!0}function iE(e){var t=this.__data__,n=zo(t,e);return n<0?void 0:t[n][1]}function rE(e){return zo(this.__data__,e)>-1}function oE(e,t){var n=this.__data__,i=zo(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}function Hi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Hi.prototype.clear=Qb,Hi.prototype.delete=nE,Hi.prototype.get=iE,Hi.prototype.has=rE,Hi.prototype.set=oE;var aE=dc(cc,"Map");function sE(){this.size=0,this.__data__={hash:new hi,map:new(aE||Hi),string:new hi}}function cE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Wo(e,t){var n=e.__data__;return cE(t)?n[typeof t=="string"?"string":"hash"]:n.map}function lE(e){var t=Wo(this,e).delete(e);return this.size-=t?1:0,t}function uE(e){return Wo(this,e).get(e)}function pE(e){return Wo(this,e).has(e)}function fE(e,t){var n=Wo(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}function mi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}mi.prototype.clear=sE,mi.prototype.delete=lE,mi.prototype.get=uE,mi.prototype.has=pE,mi.prototype.set=fE;var dE="Expected a function";function hc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(dE);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var a=e.apply(this,i);return n.cache=o.set(r,a)||o,a};return n.cache=new(hc.Cache||mi),n}hc.Cache=mi;var hE=500;function mE(e){var t=hc(e,function(i){return n.size===hE&&n.clear(),i}),n=t.cache;return t}var gE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vE=/\\(\\)?/g,yE=mE(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(gE,function(n,i,r,o){t.push(r?o.replace(vE,"$1"):i||n)}),t});function _E(e){return e==null?"":kp(e)}function Uo(e,t){return Pr(e)?e:Hb(e,t)?[e]:yE(_E(e))}function mc(e){if(typeof e=="string"||pc(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function bE(e,t){t=Uo(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[mc(t[n++])];return n&&n==i?e:void 0}function EE(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}var $p=Ln?Ln.isConcatSpreadable:void 0;function xE(e){return Pr(e)||Lp(e)||!!($p&&e&&e[$p])}function wE(e,t,n,i,r){var o=-1,a=e.length;for(n||(n=xE),r||(r=[]);++o<a;){var s=e[o];n(s)?EE(r,s):r[r.length]=s}return r}function SE(e){var t=e==null?0:e.length;return t?wE(e):[]}function CE(e){return Rb(Nb(e,void 0,SE),e+"")}function RE(e,t){return e!=null&&t in Object(e)}function TE(e,t,n){t=Uo(t,e);for(var i=-1,r=t.length,o=!1;++i<r;){var a=mc(t[i]);if(!(o=e!=null&&n(e,a)))break;e=e[a]}return o||++i!=r?o:(r=e==null?0:e.length,!!r&&Ib(r)&&Mp(a,r)&&(Pr(e)||Lp(e)))}function PE(e,t){return e!=null&&TE(e,t,RE)}function AE(e){for(var t=-1,n=e==null?0:e.length,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i}function kE(e,t,n,i){if(!Ho(e))return e;t=Uo(t,e);for(var r=-1,o=t.length,a=o-1,s=e;s!=null&&++r<o;){var c=mc(t[r]),l=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(r!=a){var u=s[c];l=void 0,l===void 0&&(l=Ho(u)?u:Mp(t[r+1])?[]:{})}Mb(s,c,l),s=s[c]}return e}function DE(e,t,n){for(var i=-1,r=t.length,o={};++i<r;){var a=t[i],s=bE(e,a);n(s,a)&&kE(o,Uo(a,e),s)}return o}function ME(e,t){return DE(e,t,function(n,i){return PE(e,i)})}var NE=CE(function(e,t){return e==null?{}:ME(e,t)});const Vi=e=>typeof e=="number",OE=e=>ac(e)?!Number.isNaN(Number(e)):!1;var jp;const gc=typeof window<"u",IE=e=>typeof e=="string",BE=()=>{};gc&&((jp=window==null?void 0:window.navigator)!=null&&jp.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Fp(e){return typeof e=="function"?e():h.unref(e)}function LE(e){return e}function Hp(e){return h.getCurrentScope()?(h.onScopeDispose(e),!0):!1}function $E(e,t=!0){h.getCurrentInstance()?h.onMounted(e):t?e():h.nextTick(e)}function Vp(e){var t;const n=Fp(e);return(t=n==null?void 0:n.$el)!=null?t:n}const zp=gc?window:void 0;function vc(...e){let t,n,i,r;if(IE(e[0])||Array.isArray(e[0])?([n,i,r]=e,t=zp):[t,n,i,r]=e,!t)return BE;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const o=[],a=()=>{o.forEach(u=>u()),o.length=0},s=(u,p,f,d)=>(u.addEventListener(p,f,d),()=>u.removeEventListener(p,f,d)),c=h.watch(()=>[Vp(t),Fp(r)],([u,p])=>{a(),u&&o.push(...n.flatMap(f=>i.map(d=>s(u,f,d,p))))},{immediate:!0,flush:"post"}),l=()=>{c(),a()};return Hp(l),l}function jE(e,t=!1){const n=h.ref(),i=()=>n.value=!!e();return i(),$E(i,t),n}const Wp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Up="__vueuse_ssr_handlers__";Wp[Up]=Wp[Up]||{};var Gp=Object.getOwnPropertySymbols,FE=Object.prototype.hasOwnProperty,HE=Object.prototype.propertyIsEnumerable,VE=(e,t)=>{var n={};for(var i in e)FE.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&Gp)for(var i of Gp(e))t.indexOf(i)<0&&HE.call(e,i)&&(n[i]=e[i]);return n};function zE(e,t,n={}){const i=n,{window:r=zp}=i,o=VE(i,["window"]);let a;const s=jE(()=>r&&"ResizeObserver"in r),c=()=>{a&&(a.disconnect(),a=void 0)},l=h.watch(()=>Vp(e),p=>{c(),s.value&&r&&p&&(a=new ResizeObserver(t),a.observe(p,o))},{immediate:!0,flush:"post"}),u=()=>{c(),l()};return Hp(u),{isSupported:s,stop:u}}var Kp;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(Kp||(Kp={}));var WE=Object.defineProperty,qp=Object.getOwnPropertySymbols,UE=Object.prototype.hasOwnProperty,GE=Object.prototype.propertyIsEnumerable,Yp=(e,t,n)=>t in e?WE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KE=(e,t)=>{for(var n in t||(t={}))UE.call(t,n)&&Yp(e,n,t[n]);if(qp)for(var n of qp(t))GE.call(t,n)&&Yp(e,n,t[n]);return e};KE({linear:LE},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});class Xp extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function qE(e,t){throw new Xp(`[${e}] ${t}`)}function yc(e,t){if(process.env.NODE_ENV!=="production"){const n=ac(e)?new Xp(`[${e}] ${t}`):e;console.warn(n)}}const Zp="__epPropKey",YE=e=>e,XE=e=>sc(e)&&!!e[Zp],ZE=(e,t)=>{if(!sc(e)||XE(e))return e;const{values:n,required:i,default:r,type:o,validator:a}=e,c={type:o,required:!!i,validator:n||a?l=>{let u=!1,p=[];if(n&&(p=Array.from(n),Cp(e,"default")&&p.push(r),u||(u=p.includes(l))),a&&(u||(u=a(l))),!u&&p.length>0){const f=[...new Set(p)].map(d=>JSON.stringify(d)).join(", ");h.warn(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${f}], got value ${JSON.stringify(l)}.`)}return u}:void 0,[Zp]:!0};return Cp(e,"default")&&(c.default=r),c},Go=e=>AE(Object.entries(e).map(([t,n])=>[t,ZE(n,t)]));var _c=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n};const JE="utils/dom/style";function Jp(e,t="px"){if(!e)return"";if(Vi(e)||OE(e))return`${e}${t}`;if(ac(e))return e;yc(JE,"binding value must be a string or number")}const QE=(e,t)=>(e.install=n=>{for(const i of[e,...Object.values({})])n.component(i.name,i)},e),e0=Go({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),t0=e=>NE(e0,e),zi=4,n0={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},i0=({move:e,size:t,bar:n})=>({[n.size]:t,transform:`translate${n.axis}(${e}%)`}),bc=Symbol("scrollbarContextKey"),r0=Go({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),o0="Thumb";var Qp=_c(h.defineComponent({__name:"thumb",props:r0,setup(e){const t=e,n=h.inject(bc),i=Sp("scrollbar");n||qE(o0,"can not inject scrollbar context");const r=h.ref(),o=h.ref(),a=h.ref({}),s=h.ref(!1);let c=!1,l=!1,u=gc?document.onselectstart:null;const p=h.computed(()=>n0[t.vertical?"vertical":"horizontal"]),f=h.computed(()=>i0({size:t.size,move:t.move,bar:p.value})),d=h.computed(()=>r.value[p.value.offset]**2/n.wrapElement[p.value.scrollSize]/t.ratio/o.value[p.value.offset]),m=R=>{var N;if(R.stopPropagation(),R.ctrlKey||[1,2].includes(R.button))return;(N=window.getSelection())==null||N.removeAllRanges(),g(R);const P=R.currentTarget;P&&(a.value[p.value.axis]=P[p.value.offset]-(R[p.value.client]-P.getBoundingClientRect()[p.value.direction]))},v=R=>{if(!o.value||!r.value||!n.wrapElement)return;const N=Math.abs(R.target.getBoundingClientRect()[p.value.direction]-R[p.value.client]),P=o.value[p.value.offset]/2,O=(N-P)*100*d.value/r.value[p.value.offset];n.wrapElement[p.value.scroll]=O*n.wrapElement[p.value.scrollSize]/100},g=R=>{R.stopImmediatePropagation(),c=!0,document.addEventListener("mousemove",w),document.addEventListener("mouseup",C),u=document.onselectstart,document.onselectstart=()=>!1},w=R=>{if(!r.value||!o.value||c===!1)return;const N=a.value[p.value.axis];if(!N)return;const P=(r.value.getBoundingClientRect()[p.value.direction]-R[p.value.client])*-1,O=o.value[p.value.offset]-N,I=(P-O)*100*d.value/r.value[p.value.offset];n.wrapElement[p.value.scroll]=I*n.wrapElement[p.value.scrollSize]/100},C=()=>{c=!1,a.value[p.value.axis]=0,document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C),S(),l&&(s.value=!1)},x=()=>{l=!1,s.value=!!t.size},E=()=>{l=!0,s.value=c};h.onBeforeUnmount(()=>{S(),document.removeEventListener("mouseup",C)});const S=()=>{document.onselectstart!==u&&(document.onselectstart=u)};return vc(h.toRef(n,"scrollbarElement"),"mousemove",x),vc(h.toRef(n,"scrollbarElement"),"mouseleave",E),(R,N)=>(h.openBlock(),h.createBlock(h.Transition,{name:h.unref(i).b("fade"),persisted:""},{default:h.withCtx(()=>[h.withDirectives(h.createElementVNode("div",{ref_key:"instance",ref:r,class:h.normalizeClass([h.unref(i).e("bar"),h.unref(i).is(h.unref(p).key)]),onMousedown:v},[h.createElementVNode("div",{ref_key:"thumb",ref:o,class:h.normalizeClass(h.unref(i).e("thumb")),style:h.normalizeStyle(h.unref(f)),onMousedown:m},null,38)],34),[[h.vShow,R.always||s.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const a0=Go({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}});var s0=_c(h.defineComponent({__name:"bar",props:a0,setup(e,{expose:t}){const n=e,i=h.inject(bc),r=h.ref(0),o=h.ref(0),a=h.ref(""),s=h.ref(""),c=h.ref(1),l=h.ref(1);return t({handleScroll:f=>{if(f){const d=f.offsetHeight-zi,m=f.offsetWidth-zi;o.value=f.scrollTop*100/d*c.value,r.value=f.scrollLeft*100/m*l.value}},update:()=>{const f=i==null?void 0:i.wrapElement;if(!f)return;const d=f.offsetHeight-zi,m=f.offsetWidth-zi,v=d**2/f.scrollHeight,g=m**2/f.scrollWidth,w=Math.max(v,n.minSize),C=Math.max(g,n.minSize);c.value=v/(d-v)/(w/(d-w)),l.value=g/(m-g)/(C/(m-C)),s.value=w+zi<d?`${w}px`:"",a.value=C+zi<m?`${C}px`:""}}),(f,d)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createVNode(Qp,{move:r.value,ratio:l.value,size:a.value,always:f.always},null,8,["move","ratio","size","always"]),h.createVNode(Qp,{move:o.value,ratio:c.value,size:s.value,vertical:"",always:f.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const c0=Go({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:YE([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...t0(["ariaLabel","ariaOrientation"])}),l0={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(Vi)},Ec="ElScrollbar",u0=h.defineComponent({name:Ec}),p0=h.defineComponent({...u0,props:c0,emits:l0,setup(e,{expose:t,emit:n}){const i=e,r=Sp("scrollbar");let o,a,s=0,c=0;const l=h.ref(),u=h.ref(),p=h.ref(),f=h.ref(),d=h.computed(()=>{const S={};return i.height&&(S.height=Jp(i.height)),i.maxHeight&&(S.maxHeight=Jp(i.maxHeight)),[i.wrapStyle,S]}),m=h.computed(()=>[i.wrapClass,r.e("wrap"),{[r.em("wrap","hidden-default")]:!i.native}]),v=h.computed(()=>[r.e("view"),i.viewClass]),g=()=>{var S;u.value&&((S=f.value)==null||S.handleScroll(u.value),s=u.value.scrollTop,c=u.value.scrollLeft,n("scroll",{scrollTop:u.value.scrollTop,scrollLeft:u.value.scrollLeft}))};function w(S,R){sc(S)?u.value.scrollTo(S):Vi(S)&&Vi(R)&&u.value.scrollTo(S,R)}const C=S=>{if(!Vi(S)){yc(Ec,"value must be a number");return}u.value.scrollTop=S},x=S=>{if(!Vi(S)){yc(Ec,"value must be a number");return}u.value.scrollLeft=S},E=()=>{var S;(S=f.value)==null||S.update()};return h.watch(()=>i.noresize,S=>{S?(o==null||o(),a==null||a()):({stop:o}=zE(p,E),a=vc("resize",E))},{immediate:!0}),h.watch(()=>[i.maxHeight,i.height],()=>{i.native||h.nextTick(()=>{var S;E(),u.value&&((S=f.value)==null||S.handleScroll(u.value))})}),h.provide(bc,h.reactive({scrollbarElement:l,wrapElement:u})),h.onActivated(()=>{u.value&&(u.value.scrollTop=s,u.value.scrollLeft=c)}),h.onMounted(()=>{i.native||h.nextTick(()=>{E()})}),h.onUpdated(()=>E()),t({wrapRef:u,update:E,scrollTo:w,setScrollTop:C,setScrollLeft:x,handleScroll:g}),(S,R)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"scrollbarRef",ref:l,class:h.normalizeClass(h.unref(r).b())},[h.createElementVNode("div",{ref_key:"wrapRef",ref:u,class:h.normalizeClass(h.unref(m)),style:h.normalizeStyle(h.unref(d)),tabindex:S.tabindex,onScroll:g},[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(S.tag),{id:S.id,ref_key:"resizeRef",ref:p,class:h.normalizeClass(h.unref(v)),style:h.normalizeStyle(S.viewStyle),role:S.role,"aria-label":S.ariaLabel,"aria-orientation":S.ariaOrientation},{default:h.withCtx(()=>[h.renderSlot(S.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),S.native?h.createCommentVNode("v-if",!0):(h.openBlock(),h.createBlock(s0,{key:0,ref_key:"barRef",ref:f,always:S.always,"min-size":S.minSize},null,8,["always","min-size"]))],2))}});var f0=_c(p0,[["__file","scrollbar.vue"]]);const ef=QE(f0),Ko=Symbol("wf-bus"),d0={class:"wrapper"},h0={class:"content"},m0=["textContent"],g0=h.defineComponent({__name:"BpmnDetail",props:{data:{type:Object,required:!0}},setup(e){const t=e,n=h.ref("1"),i=h.ref(),r=h.ref();function o(){var l;if(!((l=t.data)!=null&&l.code))return;const s=n.value,c={code:t.data.code,type:s};Ct.getBpmnDetail(c).then(u=>{u.code===0&&(s==="1"?i.value="data:image/png;base64,"+u.result:r.value=u.result)})}function a(){o()}return h.onMounted(()=>{o()}),(s,c)=>{const l=K.RadioButton,u=K.RadioGroup,p=K.Image;return h.openBlock(),h.createElementBlock("div",d0,[h.createVNode(u,{value:h.unref(n),"onUpdate:value":c[0]||(c[0]=f=>h.isRef(n)?n.value=f:null),class:"flex-ec mr-sm mt-sm",onChange:a},{default:h.withCtx(()=>[h.createVNode(l,{value:"1"},{default:h.withCtx(()=>c[1]||(c[1]=[h.createTextVNode("png")])),_:1}),h.createVNode(l,{value:"0"},{default:h.withCtx(()=>c[2]||(c[2]=[h.createTextVNode("xml")])),_:1})]),_:1},8,["value"]),h.createElementVNode("div",h0,[h.unref(n)==="1"?(h.openBlock(),h.createBlock(p,{key:0,src:h.unref(i)},null,8,["src"])):(h.openBlock(),h.createElementBlock("span",{key:1,textContent:h.toDisplayString(h.unref(r))},null,8,m0))])])}}}),gi=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n},v0=gi(g0,[["__scopeId","data-v-50587aab"]]),y0={class:"panel-left"},_0={class:"title"},b0={class:"search-box"},E0={key:2,class:"btns-action"},x0=gi(h.defineComponent({__name:"BusTypeList",setup(e){const{t}=an.useI18n(),n=h.ref(),i=h.ref([]),r=h.ref([]),o=h.ref([]);function a(){var R;o.value=[],i.value=[],r.value=[],(R=f.value)==null||R.reset(),s()}function s(R){const N={sync:!0};n.value&&Object.assign(N,{description:n.value}),Ct.getBusTypeTree(N).then(P=>{var O;if(P.code===0){const I=P.result||[];o.value=I,I.length&&(i.value=[I[0].key],(O=I[0].children)!=null&&O.length&&(r.value=[I[0].children[0].key],d()))}})}const c=h.inject(Ko);function l(R,N){N.selected&&N.node.dataRef.isLeaf&&(r.value=R,d())}const u=h.ref([{title:t("bpmn.version"),dataIndex:"version",width:100},{title:t("bpmn.description"),dataIndex:"description",width:250},{title:t("bpmn.used"),dataIndex:"used",width:130},{title:t("bpmn.status"),dataIndex:"status",width:130},{title:t("bpmn.action"),key:"action",width:200,fixed:"right"}]);function p(R){const N={type:r.value[0]};return Object.assign(N,R),Ct.getBpmnList(N)}const f=h.ref(),d=()=>{var R;(R=f.value)==null||R.refresh()},{message:m,modal:v}=st.App.useApp();function g(R,N){v.confirm({title:t("button._006_msg1"),content:t(N==="0"?"button._006_msg2":"button._006_msg3"),centered:!0,okButtonProps:{danger:!0},onOk:()=>{const P={code:R.code,status:N};Ct.switchBpmnStatus(P).then(O=>{O.code===0&&(d(),m.success(t("common.successTip")))})}})}function w(){c.emit("changeComp",{comp:"BpmnEditPage",opType:"1",type:r.value[0]})}function C(R){c.emit("changeComp",{comp:"BpmnEditPage",opType:"2",code:R.code})}function x(R){c.emit("changeComp",{comp:"BpmnEditPage",opType:"3",type:r.value[0],code:R.code})}function E(R){v.confirm({title:t("button._006_msg1"),content:t("button._004_msg2"),centered:!0,okButtonProps:{danger:!0},onOk:()=>{const N={code:R.code};Ct.delBpmn(N).then(P=>{P.code===0&&(d(),m.success(t("common.successTip")))})}})}function S(R){v.info({title:t("wo_list.btn_chart"),content:h.h(v0,{data:R}),centered:!0,footer:null,icon:null,closable:!0,maskClosable:!0,width:1e3,class:"modal-comp"})}return h.onMounted(()=>{a(),h.onActivated(()=>{var R;(R=f.value)==null||R.loadData()})}),(R,N)=>{const P=K.InputSearch,O=K.Tree,I=K.Empty,L=ef,B=K.Button,z=K.Space,q=L_,Je=K.Switch,Ce=h.resolveComponent("a-table-ex"),pe=h.resolveComponent("wl-splitter"),Qe=h.resolveDirective("permission");return h.openBlock(),h.createBlock(pe,{bordered:!1},{left:h.withCtx(()=>[h.createElementVNode("div",y0,[h.createElementVNode("div",_0,h.toDisplayString(R.$t("bpmn.list_title")),1),h.createElementVNode("div",b0,[h.createVNode(P,{value:h.unref(n),"onUpdate:value":N[0]||(N[0]=Ie=>h.isRef(n)?n.value=Ie:null),placeholder:R.$t("bpmn.type_placeholder"),onSearch:a},null,8,["value","placeholder"])]),h.createVNode(L,{class:"tree-wrapper"},{default:h.withCtx(()=>{var Ie;return[(Ie=h.unref(o))!=null&&Ie.length?(h.openBlock(),h.createBlock(O,{key:0,expandedKeys:h.unref(i),"onUpdate:expandedKeys":N[1]||(N[1]=be=>h.isRef(i)?i.value=be:null),selectedKeys:h.unref(r),"tree-data":h.unref(o),showLine:!0,onSelect:l},null,8,["expandedKeys","selectedKeys","tree-data"])):(h.openBlock(),h.createBlock(I,{key:1,imageStyle:{height:"64px"}}))]}),_:1})])]),right:h.withCtx(()=>[h.createVNode(z,{class:"ml-lg my-nm"},{default:h.withCtx(()=>[h.withDirectives((h.openBlock(),h.createBlock(B,{type:"primary",onClick:w},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R.$t("bpmn.add_workflow")),1)]),_:1})),[[Qe,"002"]])]),_:1}),h.createVNode(Ce,{ref_key:"tableEx",ref:f,class:"table-query bordered mx-lg",columns:h.unref(u),scroll:{x:1100},loadData:p},{bodyCell:h.withCtx(({column:Ie,record:be,text:ze})=>[Ie.dataIndex==="used"?(h.openBlock(),h.createBlock(q,{key:0,type:"BPMN_USED",value:ze},null,8,["value"])):h.createCommentVNode("",!0),Ie.dataIndex==="status"?(h.openBlock(),h.createBlock(Je,{key:1,checked:ze,checkedValue:"0",unCheckedValue:"1",disabled:!h.unref(Lo.hasPermission)("006"),onChange:j=>g(be,j)},null,8,["checked","disabled","onChange"])):h.createCommentVNode("",!0),Ie.key==="action"?(h.openBlock(),h.createElementBlock("div",E0,[h.withDirectives((h.openBlock(),h.createBlock(B,{type:"link",onClick:j=>C(be)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R.$t("common.btn_edit")),1)]),_:2},1032,["onClick"])),[[Qe,"003"]]),h.withDirectives((h.openBlock(),h.createBlock(B,{type:"link",onClick:j=>E(be)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R.$t("common.btn_del")),1)]),_:2},1032,["onClick"])),[[Qe,"004"]]),h.withDirectives((h.openBlock(),h.createBlock(B,{type:"link",onClick:j=>S(be)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R.$t("wo_my.btn_detail")),1)]),_:2},1032,["onClick"])),[[Qe,"005"]]),h.withDirectives((h.openBlock(),h.createBlock(B,{type:"link",onClick:j=>x(be)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R.$t("bpmn.btn_clone")),1)]),_:2},1032,["onClick"])),[[Qe,"002"]])])):h.createCommentVNode("",!0)]),_:1},8,["columns"])]),_:1})}}}),[["__scopeId","data-v-8fc11d7a"]]);function Y(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}function w0(e,t){return t={exports:{}},e(t,t.exports),t.exports}var S0=w0(function(e){var t=e.exports=function(n,i){if(i||(i=16),n===void 0&&(n=128),n<=0)return"0";for(var r=Math.log(Math.pow(2,n))/Math.log(i),o=2;r===1/0;o*=2)r=Math.log(Math.pow(2,n/o))/Math.log(i)*o;for(var a=r-Math.floor(r),s="",o=0;o<Math.floor(r);o++){var c=Math.floor(Math.random()*i).toString(i);s=c+s}if(a){var l=Math.pow(i,a),c=Math.floor(Math.random()*l).toString(i);s=c+s}var u=parseInt(s,i);return u!==1/0&&u>=Math.pow(2,n)?t(n,i):s};t.rack=function(n,i,r){var o=function(s){var c=0;do{if(c++>10)if(r)n+=r;else throw new Error("too many ID collisions, use more bits");var l=t(n,i)}while(Object.hasOwnProperty.call(a,l));return a[l]=s,l},a=o.hats={};return o.get=function(s){return o.hats[s]},o.set=function(s,c){return o.hats[s]=c,o},o.bits=n||128,o.base=i||16,o}});function sn(e){if(!(this instanceof sn))return new sn(e);e=e||[128,36,1],this._seed=e.length?S0.rack(e[0],e[1],e[2]):e}sn.prototype.next=function(e){return this._seed(e||!0)},sn.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n},sn.prototype.claim=function(e,t){this._seed.set(e,t||!0)},sn.prototype.assigned=function(e){return this._seed.get(e)||!1},sn.prototype.unclaim=function(e){delete this._seed.hats[e]},sn.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};function xc(e){return Array.prototype.concat.apply([],e)}const kr=Object.prototype.toString,C0=Object.prototype.hasOwnProperty;function vi(e){return e===void 0}function et(e){return e!==void 0}function Dr(e){return e==null}function oe(e){return kr.call(e)==="[object Array]"}function tt(e){return kr.call(e)==="[object Object]"}function ee(e){return kr.call(e)==="[object Number]"}function We(e){const t=kr.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function Rt(e){return kr.call(e)==="[object String]"}function R0(e){if(!oe(e))throw new Error("must supply array")}function bt(e,t){return!Dr(e)&&C0.call(e,t)}function _e(e,t){const n=Xo(t);let i;return A(e,function(r,o){if(n(r,o))return i=r,!1}),i}function tf(e,t){const n=Xo(t);let i=oe(e)?-1:void 0;return A(e,function(r,o){if(n(r,o))return i=o,!1}),i}function ce(e,t){const n=Xo(t);let i=[];return A(e,function(r,o){n(r,o)&&i.push(r)}),i}function A(e,t){let n,i;if(vi(e))return;const r=oe(e)?D0:k0;for(let o in e)if(bt(e,o)&&(n=e[o],i=t(n,r(o)),i===!1))return n}function T0(e,t){if(vi(e))return[];R0(e);const n=Xo(t);return e.filter(function(i,r){return!n(i,r)})}function Tt(e,t,n){return A(e,function(i,r){n=t(n,i,r)}),n}function yi(e,t){return!!Tt(e,function(n,i,r){return n&&t(i,r)},!0)}function $n(e,t){return!!_e(e,t)}function ct(e,t){let n=[];return A(e,function(i,r){n.push(t(i,r))}),n}function qo(e){return e&&Object.keys(e)||[]}function P0(e){return qo(e).length}function Yo(e){return ct(e,t=>t)}function Wi(e,t,n={}){return t=wc(t),A(e,function(i){let r=t(i)||"_",o=n[r];o||(o=n[r]=[]),o.push(i)}),n}function nf(e,...t){e=wc(e);let n={};return A(t,r=>Wi(r,e,n)),ct(n,function(r,o){return r[0]})}const A0=nf;function cn(e,t){t=wc(t);let n=[];return A(e,function(i,r){let o=t(i,r),a={d:o,v:i};for(var s=0;s<n.length;s++){let{d:c}=n[s];if(o<c){n.splice(s,0,a);return}}n.push(a)}),ct(n,i=>i.v)}function Zt(e){return function(t){return yi(e,function(n,i){return t[i]===n})}}function wc(e){return We(e)?e:t=>t[e]}function Xo(e){return We(e)?e:t=>t===e}function k0(e){return e}function D0(e){return Number(e)}function rf(e,t){let n,i,r,o;function a(p){let f=Date.now(),d=p?0:o+t-f;if(d>0)return s(d);e.apply(r,i),c()}function s(p){n=setTimeout(a,p)}function c(){n&&clearTimeout(n),n=o=i=r=void 0}function l(){n&&a(!0),c()}function u(...p){o=Date.now(),i=p,r=this,n||s(t)}return u.flush=l,u.cancel=c,u}function Et(e,t){return e.bind(t)}function D(e,...t){return Object.assign(e,...t)}function M0(e,t,n){let i=e;return A(t,function(r,o){if(typeof r!="number"&&typeof r!="string")throw new Error("illegal key type: "+typeof r+". Key should be of type number or string.");if(r==="constructor")throw new Error("illegal key: constructor");if(r==="__proto__")throw new Error("illegal key: __proto__");let a=t[o+1],s=i[r];et(a)&&Dr(s)&&(s=i[r]=isNaN(+a)?{}:[]),vi(a)?vi(n)?delete i[r]:i[r]=n:i=s}),e}function Jt(e,t){let n={},i=Object(e);return A(t,function(r){r in i&&(n[r]=e[r])}),n}function ln(e,t){let n={},i=Object(e);return A(i,function(r,o){t.indexOf(o)===-1&&(n[o]=r)}),n}function N0(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(i){if(i!=="default"&&!(i in e)){var r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(e,i,r.get?r:{enumerable:!0,get:function(){return n[i]}})}})}),Object.freeze(e)}const O0=Object.prototype.toString,I0=Object.prototype.hasOwnProperty;function B0(e){return e===void 0}function L0(e){return O0.call(e)==="[object Array]"}function $0(e,t){return I0.call(e,t)}function of(e,t){let n,i;if(B0(e))return;const r=L0(e)?F0:j0;for(let o in e)if($0(e,o)&&(n=e[o],i=t(n,r(o)),i===!1))return n}function j0(e){return e}function F0(e){return Number(e)}function lt(e,...t){const n=e.style;return of(t,function(i){i&&of(i,function(r,o){n[o]=r})}),e}function ut(e,t,n){return arguments.length==2?e.getAttribute(t):n===null?e.removeAttribute(t):(e.setAttribute(t,n),e)}const H0=Object.prototype.toString;function Ne(e){return new jn(e)}function jn(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}jn.prototype.add=function(e){return this.list.add(e),this},jn.prototype.remove=function(e){return H0.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},jn.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},jn.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},jn.prototype.array=function(){return Array.from(this.list)},jn.prototype.has=jn.prototype.contains=function(e){return this.list.contains(e)};function Zo(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Ui(e,t,n){var i=n?e:e.parentNode;return i&&typeof i.closest=="function"&&i.closest(t)||null}var Jo={},Qo,Sc,Cc;function af(){Qo=window.addEventListener?"addEventListener":"attachEvent",Sc=window.removeEventListener?"removeEventListener":"detachEvent",Cc=Qo!=="addEventListener"?"on":""}var V0=Jo.bind=function(e,t,n,i){return Qo||af(),e[Qo](Cc+t,n,i||!1),n},z0=Jo.unbind=function(e,t,n,i){return Sc||af(),e[Sc](Cc+t,n,i||!1),n},ae=N0({__proto__:null,bind:V0,unbind:z0,default:Jo},[Jo]),sf=["focus","blur"];function W0(e,t,n,i,r){return sf.indexOf(n)!==-1&&(r=!0),ae.bind(e,n,function(o){var a=o.target||o.srcElement;o.delegateTarget=Ui(a,t,!0),o.delegateTarget&&i.call(e,o)},r)}function U0(e,t,n,i){return sf.indexOf(t)!==-1&&(i=!0),ae.unbind(e,t,n,i)}var Pt={bind:W0,unbind:U0},G0=K0,cf=!1,ea;typeof document<"u"&&(ea=document.createElement("div"),ea.innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',cf=!ea.getElementsByTagName("link").length,ea=void 0);var Ue={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:cf?[1,"X<div>","</div>"]:[0,"",""]};Ue.td=Ue.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Ue.option=Ue.optgroup=[1,'<select multiple="multiple">',"</select>"],Ue.thead=Ue.tbody=Ue.colgroup=Ue.caption=Ue.tfoot=[1,"<table>","</table>"],Ue.polyline=Ue.ellipse=Ue.polygon=Ue.circle=Ue.text=Ue.line=Ue.path=Ue.rect=Ue.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function K0(e,t){if(typeof e!="string")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(i=="body"){var c=t.createElement("html");return c.innerHTML=e,c.removeChild(c.lastChild)}var r=Object.prototype.hasOwnProperty.call(Ue,i)?Ue[i]:Ue._default,o=r[0],a=r[1],s=r[2],c=t.createElement("div");for(c.innerHTML=a+e+s;o--;)c=c.lastChild;if(c.firstChild==c.lastChild)return c.removeChild(c.firstChild);for(var l=t.createDocumentFragment();c.firstChild;)l.appendChild(c.removeChild(c.firstChild));return l}var Te=G0;function lf(e,t){return e&&typeof e.matches=="function"&&e.matches(t)||!1}function xe(e,t){return t=t||document,t.querySelector(e)}function Rc(e,t){return t=t||document,t.querySelectorAll(e)}function un(e){e.parentNode&&e.parentNode.removeChild(e)}function q0(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function Y0(e,t){return t.appendChild(q0(e,t))}function ie(e,t){return Y0(t,e),e}var Tc=2,uf={"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":Tc,"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":Tc,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function X0(e,t){return uf[t]?e.style[t]:e.getAttributeNS(null,t)}function pf(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=uf[i];r?(r===Tc&&typeof n=="number"&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function Z0(e,t){var n=Object.keys(t),i,r;for(i=0,r;r=n[i];i++)pf(e,r,t[r])}function G(e,t,n){if(typeof t=="string")if(n!==void 0)pf(e,t,n);else return X0(e,t);else Z0(e,t);return e}const J0=Object.prototype.toString;function me(e){return new Fn(e)}function Fn(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}Fn.prototype.add=function(e){return this.list.add(e),this},Fn.prototype.remove=function(e){return J0.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},Fn.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},Fn.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Fn.prototype.array=function(){return Array.from(this.list)},Fn.prototype.has=Fn.prototype.contains=function(e){return this.list.contains(e)};function ta(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function ff(e){return e.cloneNode(!0)}var Pc={svg:"http://www.w3.org/2000/svg"},df='<svg xmlns="'+Pc.svg+'"';function Q0(e){var t=!1;e.substring(0,4)==="<svg"?e.indexOf(Pc.svg)===-1&&(e=df+e.substring(4)):(e=df+">"+e+"</svg>",t=!0);var n=ex(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function ex(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function X(e,t){var n;return e=e.trim(),e.charAt(0)==="<"?(n=Q0(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(Pc.svg,e),t&&G(n,t),n}var Ac=null;function hf(){return Ac===null&&(Ac=X("svg")),Ac}function mf(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}function tx(e,t,n,i,r,o){var a=hf().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return mf(a,e);case 6:return mf(a,{a:e,b:t,c:n,d:i,e:r,f:o})}}function Mr(e){return hf().createSVGTransform()}var gf=/([&<>]{1})/g,nx=/([&<>\n\r"]{1})/g,ix={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function kc(e,t){function n(i,r){return ix[r]||r}return e.replace(t,n)}function vf(e,t){var n,i,r,o,a;switch(e.nodeType){case 3:t.push(kc(e.textContent,gf));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(r=e.attributes,n=0,i=r.length;n<i;++n)o=r.item(n),t.push(" ",o.name,'="',kc(o.value,nx),'"');if(e.hasChildNodes()){for(t.push(">"),a=e.childNodes,n=0,i=a.length;n<i;++n)vf(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("<!--",kc(e.nodeValue,gf),"-->");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function rx(e){for(var t=e.firstChild,n=[];t;)vf(t,n),t=t.nextSibling;return n.join("")}function yf(e,t){return rx(e)}function Ge(e){var t=e.parentNode;return t&&t.removeChild(e),e}function ox(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function ax(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(ox(e,i))}function Nr(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),ax(n,t)),n.consolidate()}const sx=/^class[ {]/;function cx(e){return sx.test(e.toString())}function Dc(e){return Array.isArray(e)}function Mc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function na(...e){e.length===1&&Dc(e[0])&&(e=e[0]),e=[...e];const t=e.pop();return t.$inject=e,t}const lx=/constructor\s*[^(]*\(\s*([^)]*)\)/m,ux=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,px=/\/\*([^*]*)\*\//m;function fx(e){if(typeof e!="function")throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(cx(e)?lx:ux);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map(i=>{const r=i.match(px);return(r&&r[1]||i).trim()})||[]}function _f(e,t){const n=t||{get:function(x,E){if(i.push(x),E===!1)return null;throw s(`No provider for "${x}"!`)}},i=[],r=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(x){const E=i.join(" -> ");return i.length=0,new Error(E?`${x} (Resolving: ${E})`:x)};function c(x,E){if(!r[x]&&x.includes(".")){const S=x.split(".");let R=c(S.shift());for(;S.length;)R=R[S.shift()];return R}if(Mc(o,x))return o[x];if(Mc(r,x)){if(i.indexOf(x)!==-1)throw i.push(x),s("Cannot resolve circular dependency!");return i.push(x),o[x]=r[x][0](r[x][1]),i.pop(),o[x]}return n.get(x,E)}function l(x,E){if(typeof E>"u"&&(E={}),typeof x!="function")if(Dc(x))x=na(x.slice());else throw s(`Cannot invoke "${x}". Expected a function!`);const R=(x.$inject||fx(x)).map(N=>Mc(E,N)?E[N]:c(N));return{fn:x,dependencies:R}}function u(x){const{fn:E,dependencies:S}=l(x),R=Function.prototype.bind.call(E,null,...S);return new R}function p(x,E,S){const{fn:R,dependencies:N}=l(x,S);return R.apply(E,N)}function f(x){return na(E=>x.get(E))}function d(x,E){if(E&&E.length){const S=Object.create(null),R=Object.create(null),N=[],P=[],O=[];let I,L,B,z;for(let q in r)I=r[q],E.indexOf(q)!==-1&&(I[2]==="private"?(L=N.indexOf(I[3]),L===-1?(B=I[3].createChild([],E),z=f(B),N.push(I[3]),P.push(B),O.push(z),S[q]=[z,q,"private",B]):S[q]=[O[L],q,"private",P[L]]):S[q]=[I[2],I[1]],R[q]=!0),(I[2]==="factory"||I[2]==="type")&&I[1].$scope&&E.forEach(Je=>{I[1].$scope.indexOf(Je)!==-1&&(S[q]=[I[2],I[1]],R[Je]=!0)});E.forEach(q=>{if(!R[q])throw new Error('No provider for "'+q+'". Cannot use provider from the parent!')}),x.unshift(S)}return new _f(x,a)}const m={factory:p,type:u,value:function(x){return x}};function v(x,E){const S=x.__init__||[];return function(){S.forEach(R=>{typeof R=="string"?E.get(R):E.invoke(R)})}}function g(x){const E=x.__exports__;if(E){const S=x.__modules__,R=Object.keys(x).reduce((L,B)=>(B!=="__exports__"&&B!=="__modules__"&&B!=="__init__"&&B!=="__depends__"&&(L[B]=x[B]),L),Object.create(null)),N=(S||[]).concat(R),P=d(N),O=na(function(L){return P.get(L)});E.forEach(function(L){r[L]=[O,L,"private",P]});const I=(x.__init__||[]).slice();return I.unshift(function(){P.init()}),x=Object.assign({},x,{__init__:I}),v(x,P)}return Object.keys(x).forEach(function(S){if(S==="__init__"||S==="__depends__")return;const R=x[S];if(R[2]==="private"){r[S]=R;return}const N=R[0],P=R[1];r[S]=[m[N],dx(N,P),N]}),v(x,a)}function w(x,E){return x.indexOf(E)!==-1||(x=(E.__depends__||[]).reduce(w,x),x.indexOf(E)!==-1)?x:x.concat(E)}function C(x){const E=x.reduce(w,[]).map(g);let S=!1;return function(){S||(S=!0,E.forEach(R=>R()))}}this.get=c,this.invoke=p,this.instantiate=u,this.createChild=d,this.init=C(e)}function dx(e,t){return e!=="value"&&Dc(t)&&(t=na(t.slice())),t}var hx=1e3;function bn(e,t){var n=this;t=t||hx,e.on(["render.shape","render.connection"],t,function(i,r){var o=i.type,a=r.element,s=r.gfx,c=r.attrs;if(n.canRender(a))return o==="render.shape"?n.drawShape(s,a,c):n.drawConnection(s,a,c)}),e.on(["render.getShapePath","render.getConnectionPath"],t,function(i,r){if(n.canRender(r))return i.type==="render.getShapePath"?n.getShapePath(r):n.getConnectionPath(r)})}bn.prototype.canRender=function(e){},bn.prototype.drawShape=function(e,t){},bn.prototype.drawConnection=function(e,t){},bn.prototype.getShapePath=function(e){},bn.prototype.getConnectionPath=function(e){};function _i(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function mx(e){return["M",e.x,e.y]}function Nc(e){return["L",e.x,e.y]}function gx(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function vx(e,t){const n=e.length,i=[mx(e[0])];for(let r=1;r<n;r++){const o=e[r-1],a=e[r],s=e[r+1];if(!s||!t){i.push(Nc(a));continue}const c=Math.min(t,Oc(a.x-o.x,a.y-o.y),Oc(s.x-a.x,s.y-a.y));if(!c){i.push(Nc(a));continue}const l=ia(a,o,c),u=ia(a,o,c*.5),p=ia(a,s,c),f=ia(a,s,c*.5);i.push(Nc(l)),i.push(gx(u,f,p))}return i}function ia(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=Oc(i,r),a=n/o;return{x:e.x+i*a,y:e.y+r*a}}function Oc(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function ra(e,t,n){ee(t)&&(n=t,t=null),t||(t={});const i=X("path",t);return ee(n)&&(i.dataset.cornerRadius=String(n)),bf(i,e)}function bf(e,t){const n=parseInt(e.dataset.cornerRadius,10)||0;return G(e,{d:_i(vx(t,n))}),e}function oa(e){return ce(e,function(t){return!_e(e,function(n){return n!==t&&Ef(t,n)})})}function Ef(e,t){if(t){if(e===t)return t;if(e.parent)return Ef(e.parent,t)}}function xf(e,t,n){var i=!n||e.indexOf(t)===-1;return i&&e.push(t),i}function bi(e,t,n){n=n||0,oe(e)||(e=[e]),A(e,function(i,r){var o=t(i,r,n);oe(o)&&o.length&&bi(o,t,n+1)})}function yx(e,t,n){var i=[],r=[];return bi(e,function(o,a,s){xf(i,o,t);var c=o.children;if(c&&xf(r,c,t))return c}),i}function Or(e,t){return yx(e,!t)}function _x(e,t,n){vi(t)&&(t=!0),tt(t)&&(n=t,t=!0),n=n||{};var i=Ir(n.allShapes),r=Ir(n.allConnections),o=Ir(n.enclosedElements),a=Ir(n.enclosedConnections),s=Ir(n.topLevel,t&&Wi(e,function(u){return u.id}));function c(u){s[u.source.id]&&s[u.target.id]&&(s[u.id]=[u]),i[u.source.id]&&i[u.target.id]&&(a[u.id]=o[u.id]=u),r[u.id]=u}function l(u){if(o[u.id]=u,u.waypoints)a[u.id]=r[u.id]=u;else return i[u.id]=u,A(u.incoming,c),A(u.outgoing,c),u.children}return bi(e,l),{allShapes:i,allConnections:r,topLevel:s,enclosedConnections:a,enclosedElements:o}}function Ke(e,t){t=!!t,oe(e)||(e=[e]);var n,i,r,o;return A(e,function(a){var s=a;a.waypoints&&!t&&(s=Ke(a.waypoints,!0));var c=s.x,l=s.y,u=s.height||0,p=s.width||0;(c<n||n===void 0)&&(n=c),(l<i||i===void 0)&&(i=l),(c+p>r||r===void 0)&&(r=c+p),(l+u>o||o===void 0)&&(o=l+u)}),{x:n,y:i,height:o-i,width:r-n}}function wf(e,t){var n={};return A(e,function(i){var r=i;r.waypoints&&(r=Ke(r)),!ee(t.y)&&r.x>t.x&&(n[i.id]=i),!ee(t.x)&&r.y>t.y&&(n[i.id]=i),r.x>t.x&&r.y>t.y&&(ee(t.width)&&ee(t.height)&&r.width+r.x<t.width+t.x&&r.height+r.y<t.height+t.y||!ee(t.width)||!ee(t.height))&&(n[i.id]=i)}),n}function Sf(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function Cf(e){return!!(e&&e.isFrame)}function Ir(e,t){return D({},e||{},t||{})}var bx=1;function Hn(e,t){bn.call(this,e,bx),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})}Y(Hn,bn),Hn.prototype.canRender=function(){return!0},Hn.prototype.drawShape=function(t,n,i){var r=X("rect");return G(r,{x:0,y:0,width:n.width||0,height:n.height||0}),Cf(n)?G(r,D({},this.FRAME_STYLE,i||{})):G(r,D({},this.SHAPE_STYLE,i||{})),ie(t,r),r},Hn.prototype.drawConnection=function(t,n,i){var r=ra(n.waypoints,D({},this.CONNECTION_STYLE,i||{}));return ie(t,r),r},Hn.prototype.getShapePath=function(t){var n=t.x,i=t.y,r=t.width,o=t.height,a=[["M",n,i],["l",r,0],["l",0,o],["l",-r,0],["z"]];return _i(a)},Hn.prototype.getConnectionPath=function(t){var n=t.waypoints,i,r,o=[];for(i=0;r=n[i];i++)r=r.original||r,o.push([i===0?"M":"L",r.x,r.y]);return _i(o)},Hn.$inject=["eventBus","styles"];function Ex(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(n,i,r){var o=this.style(i,r);return D(o,{class:n})},this.style=function(n,i){!oe(n)&&!i&&(i=n,n=[]);var r=Tt(n,function(o,a){return D(o,e[a]||{})},{});return i?D(r,i):r},this.computeStyle=function(n,i,r){return oe(i)||(r=i,i=[]),t.style(i||[],D({},r,n||{}))}}const xx={__init__:["defaultRenderer"],defaultRenderer:["type",Hn],styles:["type",Ex]};function Le(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return n!==-1&&e.splice(n,1),n}function qe(e,t,n){if(!(!e||!t)){typeof n!="number"&&(n=-1);var i=e.indexOf(t);if(i!==-1){if(i===n)return;if(n!==-1)e.splice(i,1);else return}n!==-1?e.splice(n,0,t):e.push(t)}}function Ic(e,t){return!e||!t?-1:e.indexOf(t)}function Br(e,t){return!e||!t?-1:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Bc(e,t,n,i){if(typeof i>"u"&&(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=Br(e,t);return Math.abs(r/o)<=i}var wx=2;function En(e,t){var n=Array.from(arguments).flat();const i={x:"v",y:"h"};for(const[r,o]of Object.entries(i))if(Sx(r,n))return o;return!1}function Sx(e,t){const n=t[0];return yi(t,function(i){return Math.abs(n[e]-i[e])<=wx})}function Rf(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 Lc(e,t){return{x:Math.round(e.x+(t.x-e.x)/2),y:Math.round(e.y+(t.y-e.y)/2)}}var Cx=/,?([a-z]),?/gi,Tf=parseFloat,$e=Math,Vn=$e.PI,pn=$e.min,fn=$e.max,Pf=$e.pow,zn=$e.abs,Rx=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/ig,Tx=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/ig,aa=Array.isArray||function(e){return e instanceof Array};function $c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Lr(e){if(typeof e=="function"||Object(e)!==e)return e;var t=new e.constructor;for(var n in e)$c(e,n)&&(t[n]=Lr(e[n]));return t}function Px(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}function Ax(e){function t(){var n=Array.prototype.slice.call(arguments,0),i=n.join("␀"),r=t.cache=t.cache||{},o=t.count=t.count||[];return $c(r,i)?(Px(o,i),r[i]):(o.length>=1e3&&delete r[o.shift()],o.push(i),r[i]=e(...arguments),r[i])}return t}function kx(e){if(!e)return null;var t=Gi(e);if(t.arr)return Lr(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 aa(e)&&aa(e[0])&&(i=Lr(e)),i.length||String(e).replace(Rx,function(r,o,a){var s=[],c=o.toLowerCase();for(a.replace(Tx,function(l,u){u&&s.push(+u)}),c=="m"&&s.length>2&&(i.push([o,...s.splice(0,2)]),c="l",o=o=="m"?"l":"L");s.length>=n[c]&&(i.push([o,...s.splice(0,n[c])]),!!n[c]););}),i.toString=Gi.toString,t.arr=Lr(i),i}function Gi(e){var t=Gi.ps=Gi.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout(function(){for(var n in t)$c(t,n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])}),t[e]}function jc(e,t,n,i){return arguments.length===1&&(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 Af(){return this.join(",").replace(Cx,"$1")}function sa(e){var t=Lr(e);return t.toString=Af,t}function kf(e,t,n,i,r,o,a,s,c){var l=1-c,u=Pf(l,3),p=Pf(l,2),f=c*c,d=f*c,m=u*e+p*3*c*n+l*3*c*c*r+d*a,v=u*t+p*3*c*i+l*3*c*c*o+d*s;return{x:ca(m),y:ca(v)}}function Df(e){var t=Ix(...e);return jc(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function Wn(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function Dx(e,t){return e=jc(e),t=jc(t),Wn(t,e.x,e.y)||Wn(t,e.x2,e.y)||Wn(t,e.x,e.y2)||Wn(t,e.x2,e.y2)||Wn(e,t.x,t.y)||Wn(e,t.x2,t.y)||Wn(e,t.x,t.y2)||Wn(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)}function Mf(e,t,n,i,r){var o=-3*t+9*n-9*i+3*r,a=e*o+6*t-12*n+6*i;return e*a-3*t+3*n}function Nf(e,t,n,i,r,o,a,s,c){c==null&&(c=1),c=c>1?1:c<0?0:c;for(var l=c/2,u=12,p=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,m=0;m<u;m++){var v=l*p[m]+l,g=Mf(v,e,n,r,a),w=Mf(v,t,i,o,s),C=g*g+w*w;d+=f[m]*$e.sqrt(C)}return l*d}function Mx(e,t,n,i,r,o,a,s){if(!(fn(e,n)<pn(r,a)||pn(e,n)>fn(r,a)||fn(t,i)<pn(o,s)||pn(t,i)>fn(o,s))){var c=(e*i-t*n)*(r-a)-(e-n)*(r*s-o*a),l=(e*i-t*n)*(o-s)-(t-i)*(r*s-o*a),u=(e-n)*(o-s)-(t-i)*(r-a);if(u){var p=ca(c/u),f=ca(l/u),d=+p.toFixed(2),m=+f.toFixed(2);if(!(d<+pn(e,n).toFixed(2)||d>+fn(e,n).toFixed(2)||d<+pn(r,a).toFixed(2)||d>+fn(r,a).toFixed(2)||m<+pn(t,i).toFixed(2)||m>+fn(t,i).toFixed(2)||m<+pn(o,s).toFixed(2)||m>+fn(o,s).toFixed(2)))return{x:p,y:f}}}}function ca(e){return Math.round(e*1e11)/1e11}function Nx(e,t,n){var i=Df(e),r=Df(t);if(!Dx(i,r))return[];for(var o=Nf(...e),a=Nf(...t),s=If(e)?1:~~(o/5)||1,c=If(t)?1:~~(a/5)||1,l=[],u=[],p={},f=[],d=0;d<s+1;d++){var m=kf(...e,d/s);l.push({x:m.x,y:m.y,t:d/s})}for(d=0;d<c+1;d++)m=kf(...t,d/c),u.push({x:m.x,y:m.y,t:d/c});for(d=0;d<s;d++)for(var v=0;v<c;v++){var g=l[d],w=l[d+1],C=u[v],x=u[v+1],E=zn(w.x-g.x)<.01?"y":"x",S=zn(x.x-C.x)<.01?"y":"x",R=Mx(g.x,g.y,w.x,w.y,C.x,C.y,x.x,x.y),N;if(R){if(N=R.x.toFixed(9)+"#"+R.y.toFixed(9),p[N])continue;p[N]=!0;var P=g.t+zn((R[E]-g[E])/(w[E]-g[E]))*(w.t-g.t),O=C.t+zn((R[S]-C[S])/(x[S]-C[S]))*(x.t-C.t);P>=0&&P<=1&&O>=0&&O<=1&&f.push({x:R.x,y:R.y,t1:P,t2:O})}}return f}function Of(e,t,n){e=$f(e),t=$f(t);for(var i,r,o,a,s,c,l,u,p,f,d=n?0:[],m=0,v=e.length;m<v;m++){var g=e[m];if(g[0]=="M")i=s=g[1],r=c=g[2];else{g[0]=="C"?(p=[i,r,...g.slice(1)],i=p[6],r=p[7]):(p=[i,r,i,r,s,c,s,c],i=s,r=c);for(var w=0,C=t.length;w<C;w++){var x=t[w];if(x[0]=="M")o=l=x[1],a=u=x[2];else{x[0]=="C"?(f=[o,a,...x.slice(1)],o=f[6],a=f[7]):(f=[o,a,o,a,l,u,l,u],o=l,a=u);var E=Nx(p,f);{for(var S=0,R=E.length;S<R;S++)E[S].segment1=m,E[S].segment2=w,E[S].bez1=p,E[S].bez2=f;d=d.concat(E)}}}}}return d}function Ox(e){var t=Gi(e);if(t.abs)return sa(t.abs);if((!aa(e)||!aa(e&&e[0]))&&(e=kx(e)),!e||!e.length)return[["M",0,0]];var n=[],i=0,r=0,o=0,a=0,s=0,c;e[0][0]=="M"&&(i=+e[0][1],r=+e[0][2],o=i,a=r,s++,n[0]=["M",i,r]);for(var l,u,p=s,f=e.length;p<f;p++){if(n.push(l=[]),u=e[p],c=u[0],c!=c.toUpperCase())switch(l[0]=c.toUpperCase(),l[0]){case"A":l[1]=u[1],l[2]=u[2],l[3]=u[3],l[4]=u[4],l[5]=u[5],l[6]=+u[6]+i,l[7]=+u[7]+r;break;case"V":l[1]=+u[1]+r;break;case"H":l[1]=+u[1]+i;break;case"M":o=+u[1]+i,a=+u[2]+r;default:for(var d=1,m=u.length;d<m;d++)l[d]=+u[d]+(d%2?i:r)}else for(var v=0,g=u.length;v<g;v++)l[v]=u[v];switch(c=c.toUpperCase(),l[0]){case"Z":i=+o,r=+a;break;case"H":i=l[1];break;case"V":r=l[1];break;case"M":o=l[l.length-2],a=l[l.length-1];default:i=l[l.length-2],r=l[l.length-1]}}return n.toString=Af,t.abs=sa(n),n}function If(e){return e[0]===e[2]&&e[1]===e[3]&&e[4]===e[6]&&e[5]===e[7]}function la(e,t,n,i){return[e,t,n,i,n,i]}function Bf(e,t,n,i,r,o){var a=.3333333333333333,s=2/3;return[a*e+s*n,a*t+s*i,a*r+s*n,a*o+s*i,r,o]}function Lf(e,t,n,i,r,o,a,s,c,l){var u=Vn*120/180,p=Vn/180*(+r||0),f=[],d,m=Ax(function(T,_,y){var k=T*$e.cos(y)-_*$e.sin(y),M=T*$e.sin(y)+_*$e.cos(y);return{x:k,y:M}});if(l)N=l[0],P=l[1],S=l[2],R=l[3];else{d=m(e,t,-p),e=d.x,t=d.y,d=m(s,c,-p),s=d.x,c=d.y;var v=(e-s)/2,g=(t-c)/2,w=v*v/(n*n)+g*g/(i*i);w>1&&(w=$e.sqrt(w),n=w*n,i=w*i);var C=n*n,x=i*i,E=(o==a?-1:1)*$e.sqrt(zn((C*x-C*g*g-x*v*v)/(C*g*g+x*v*v))),S=E*n*g/i+(e+s)/2,R=E*-i*v/n+(t+c)/2,N=$e.asin(((t-R)/i).toFixed(9)),P=$e.asin(((c-R)/i).toFixed(9));N=e<S?Vn-N:N,P=s<S?Vn-P:P,N<0&&(N=Vn*2+N),P<0&&(P=Vn*2+P),a&&N>P&&(N=N-Vn*2),!a&&P>N&&(P=P-Vn*2)}var O=P-N;if(zn(O)>u){var I=P,L=s,B=c;P=N+u*(a&&P>N?1:-1),s=S+n*$e.cos(P),c=R+i*$e.sin(P),f=Lf(s,c,n,i,r,0,a,L,B,[P,I,S,R])}O=P-N;var z=$e.cos(N),q=$e.sin(N),Je=$e.cos(P),Ce=$e.sin(P),pe=$e.tan(O/4),Qe=4/3*n*pe,Ie=4/3*i*pe,be=[e,t],ze=[e+Qe*q,t-Ie*z],j=[s+Qe*Ce,c-Ie*Je],V=[s,c];if(ze[0]=2*be[0]-ze[0],ze[1]=2*be[1]-ze[1],l)return[ze,j,V].concat(f);f=[ze,j,V].concat(f).join().split(",");for(var Z=[],he=0,St=f.length;he<St;he++)Z[he]=he%2?m(f[he-1],f[he],p).y:m(f[he],f[he+1],p).x;return Z}function Ix(e,t,n,i,r,o,a,s){for(var c=[],l=[[],[]],u,p,f,d,m,v,g,w,C=0;C<2;++C){if(C==0?(p=6*e-12*n+6*r,u=-3*e+9*n-9*r+3*a,f=3*n-3*e):(p=6*t-12*i+6*o,u=-3*t+9*i-9*o+3*s,f=3*i-3*t),zn(u)<1e-12){if(zn(p)<1e-12)continue;d=-f/p,0<d&&d<1&&c.push(d);continue}g=p*p-4*f*u,w=$e.sqrt(g),!(g<0)&&(m=(-p+w)/(2*u),0<m&&m<1&&c.push(m),v=(-p-w)/(2*u),0<v&&v<1&&c.push(v))}for(var x=c.length,E=x,S;x--;)d=c[x],S=1-d,l[0][x]=S*S*S*e+3*S*S*d*n+3*S*d*d*r+d*d*d*a,l[1][x]=S*S*S*t+3*S*S*d*i+3*S*d*d*o+d*d*d*s;return l[0][E]=e,l[1][E]=t,l[0][E+1]=a,l[1][E+1]=s,l[0].length=l[1].length=E+2,{x0:pn(...l[0]),y0:pn(...l[1]),x1:fn(...l[0]),y1:fn(...l[1])}}function $f(e){var t=Gi(e);if(t.curve)return sa(t.curve);for(var n=Ox(e),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},r=function(d,m,v){var g,w;if(!d)return["C",m.x,m.y,m.x,m.y,m.x,m.y];switch(!(d[0]in{T:1,Q:1})&&(m.qx=m.qy=null),d[0]){case"M":m.X=d[1],m.Y=d[2];break;case"A":d=["C",...Lf(m.x,m.y,...d.slice(1))];break;case"S":v=="C"||v=="S"?(g=m.x*2-m.bx,w=m.y*2-m.by):(g=m.x,w=m.y),d=["C",g,w,...d.slice(1)];break;case"T":v=="Q"||v=="T"?(m.qx=m.x*2-m.qx,m.qy=m.y*2-m.qy):(m.qx=m.x,m.qy=m.y),d=["C",...Bf(m.x,m.y,m.qx,m.qy,d[1],d[2])];break;case"Q":m.qx=d[1],m.qy=d[2],d=["C",...Bf(m.x,m.y,d[1],d[2],d[3],d[4])];break;case"L":d=["C",...la(m.x,m.y,d[1],d[2])];break;case"H":d=["C",...la(m.x,m.y,d[1],m.y)];break;case"V":d=["C",...la(m.x,m.y,m.x,d[1])];break;case"Z":d=["C",...la(m.x,m.y,m.X,m.Y)];break}return d},o=function(d,m){if(d[m].length>7){d[m].shift();for(var v=d[m];v.length;)a[m]="A",d.splice(m++,0,["C",...v.splice(0,6)]);d.splice(m,1),u=n.length}},a=[],s="",c="",l=0,u=n.length;l<u;l++){n[l]&&(s=n[l][0]),s!="C"&&(a[l]=s,l&&(c=a[l-1])),n[l]=r(n[l],i,c),a[l]!="A"&&s=="C"&&(a[l]="C"),o(n,l);var p=n[l],f=p.length;i.x=p[f-2],i.y=p[f-1],i.bx=Tf(p[f-4])||i.x,i.by=Tf(p[f-3])||i.y}return t.curve=sa(n),n}function we(e){return tt(e)&&bt(e,"waypoints")}function ge(e){return tt(e)&&bt(e,"labelTarget")}function jf(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 Q(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function ua(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function Bx(e){return xn({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function Lx(e){for(var t=e.waypoints,n=t.reduce(function(l,u,p){var f=t[p-1];if(f){var d=l[l.length-1],m=d&&d.endLength||0,v=Fx(f,u);l.push({start:f,end:u,startLength:m,endLength:m+v,length:v})}return l},[]),i=n.reduce(function(l,u){return l+u.length},0),r=i/2,o=0,a=n[o];a.endLength<r;)a=n[++o];var s=(r-a.startLength)/a.length,c={x:a.start.x+(a.end.x-a.start.x)*s,y:a.start.y+(a.end.y-a.start.y)*s};return c}function te(e){return we(e)?Lx(e):Bx(e)}function pt(e,t,n){n=n||0,tt(n)||(n={x:n,y:n});var i=Q(e),r=Q(t),o=i.bottom+n.y<=r.top,a=i.left-n.x>=r.right,s=i.top-n.y>=r.bottom,c=i.right+n.x<=r.left,l=o?"top":s?"bottom":null,u=c?"left":a?"right":null;return u&&l?l+"-"+u:u||l||"intersect"}function Fc(e,t,n){var i=$x(e,t);return i.length===1||i.length===2&&Br(i[0],i[1])<1?xn(i[0]):i.length>1?(i=cn(i,function(r){var o=Math.floor(r.t2*100)||1;return o=100-o,o=(o<10?"0":"")+o,r.segment2+"#"+o}),xn(i[n?0:i.length-1])):null}function $x(e,t){return Of(e,t)}function jx(e){e=e.slice();for(var t=0,n,i,r;e[t];)n=e[t],i=e[t-1],r=e[t+1],Br(n,r)===0||Bc(i,r,n)?e.splice(t,1):t++;return e}function Fx(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function pa(e,t){return Math.round(e*t)/t}function Ff(e){return ee(e)?e+"px":e}function Hx(e){for(;e.parent;)e=e.parent;return e}function Vx(e){e=D({},{width:"100%",height:"100%"},e);const t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),lt(n,{position:"relative",overflow:"hidden",width:Ff(e.width),height:Ff(e.height)}),t.appendChild(n),n}function Hf(e,t,n){const i=X("g");me(i).add(t);const r=n!==void 0?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]||null),i}const zx="base",Vf=0,Wx=1,Ux={shape:["x","y","width","height"],connection:["waypoints"]};function ne(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}ne.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],ne.prototype._init=function(e){const t=this._eventBus,n=this._container=Vx(e),i=this._svg=X("svg");G(i,{width:"100%",height:"100%"}),ut(i,"tabindex",0),e.autoFocus&&t.on("element.hover",()=>{this.restoreFocus()}),t.on("element.mousedown",500,o=>{this.focus()}),i.addEventListener("focusin",()=>{this._setFocused(!0)}),i.addEventListener("focusout",()=>{this._setFocused(!1)}),ie(n,i);const r=this._viewport=Hf(i,"viewport");e.deferUpdate&&(this._viewboxChanged=rf(Et(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)},ne.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},ne.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},ne.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{const n=Sf(t);n==="root"?this.removeRootElement(t):this._removeElement(t,n)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox},ne.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},ne.prototype.restoreFocus=function(){document.activeElement===document.body&&this.focus()},ne.prototype.isFocused=function(){return this._focused},ne.prototype.getDefaultLayer=function(){return this.getLayer(zx,Vf)},ne.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)),typeof t<"u"&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group},ne.prototype._getChildIndex=function(e){return Tt(this._layers,function(t,n){return n.visible&&e>=n.index&&t++,t},0)},ne.prototype._createLayer=function(e,t){typeof t>"u"&&(t=Wx);const n=this._getChildIndex(t);return{group:Hf(this._viewport,"layer-"+e,n),index:t,visible:!0}},ne.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},ne.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&&(Ge(n),t.visible=!1),n},ne.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],Ge(t.group))},ne.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},ne.prototype.findRoot=function(e){return typeof e=="string"&&(e=this._elementRegistry.get(e)),e?(this._findPlaneForRoot(Hx(e))||{}).rootElement:void 0},ne.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})},ne.prototype._findPlaneForRoot=function(e){return _e(this._planes,function(t){return t.rootElement===e})},ne.prototype.getContainer=function(){return this._container},ne.prototype._updateMarker=function(e,t,n){let i;e.id||(e=this._elementRegistry.get(e)),e.markers=e.markers||new Set,i=this._elementRegistry._elements[e.id],i&&(A([i.gfx,i.secondaryGfx],function(r){r&&(n?(e.markers.add(t),me(r).add(t)):(e.markers.delete(t),me(r).remove(t)))}),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},ne.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},ne.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},ne.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),e.markers?e.markers.has(t):!1},ne.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},ne.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},ne.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,Vf);return this.hideLayer(n),this._addRoot(e,i),this._planes.push({rootElement:e,layer:i}),e},ne.prototype.removeRootElement=function(e){if(typeof e=="string"&&(e=this._elementRegistry.get(e)),!!this._findPlaneForRoot(e))return this._removeRoot(e),this._removeLayer(e.layer),this._planes=this._planes.filter(function(n){return n.rootElement!==e}),this._rootElement===e&&(this._rootElement=null),e},ne.prototype.setRootElement=function(e){if(e===this._rootElement)return e;let t;if(!e)throw new Error("rootElement required");return t=this._findPlaneForRoot(e),t||(e=this.addRootElement(e)),this._setRoot(e),e},ne.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)},ne.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})},ne.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})},ne.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=Ux[e];if(!yi(n,function(r){return typeof t[r]<"u"}))throw new Error("must supply { "+n.join(", ")+" } with "+e)},ne.prototype._setParent=function(e,t,n){qe(t.children,e,n),e.parent=t},ne.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();const r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),r.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);const a=o.create(e,t,i);return this._elementRegistry.add(t,a),o.update(e,t,a),r.fire(e+".added",{element:t,gfx:a}),t},ne.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},ne.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},ne.prototype._removeElement=function(e,t){const n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(e=n.get(e.id||e),!!e)return r.fire(t+".remove",{element:e}),i.remove(e),Le(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},ne.prototype.removeShape=function(e){return this._removeElement(e,"shape")},ne.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},ne.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},ne.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},ne.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},ne.prototype.viewbox=function(e){if(e===void 0&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let i,r,o,a,s,c,l;if(e)this._changeViewbox(function(){s=Math.min(n.width/e.width,n.height/e.height);const u=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);Nr(t,u)});else return o=this._rootElement?this.getActiveLayer():null,i=o&&o.getBBox()||{},a=Nr(t),r=a?a.matrix:tx(),s=pa(r.a,1e3),c=pa(-r.e||0,1e3),l=pa(-r.f||0,1e3),e=this._cachedViewbox={x:c?c/s:0,y:l?l/s:0,width:n.width/s,height:n.height/s,scale:s,inner:{width:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:n},e;return e},ne.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox(function(){e=D({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),zf(t,n)}),{x:n.e,y:n.f}},ne.prototype.scrollToElement=function(e,t){let n=100;typeof e=="string"&&(e=this._elementRegistry.get(e));const i=this.findRoot(e);if(i!==this.getRootElement()&&this.setRootElement(i),i===e)return;t||(t={}),typeof t=="number"&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};const r=Ke(e),o=Q(r),a=this.viewbox(),s=this.zoom();let c,l;a.y+=t.top/s,a.x+=t.left/s,a.width-=(t.right+t.left)/s,a.height-=(t.bottom+t.top)/s;const u=Q(a);if(!(r.width<a.width&&r.height<a.height))c=r.x-a.x,l=r.y-a.y;else{const f=Math.max(0,o.right-u.right),d=Math.min(0,o.left-u.left),m=Math.max(0,o.bottom-u.bottom),v=Math.min(0,o.top-u.top);c=f||d,l=m||v}this.scroll({dx:-c*s,dy:-l*s})},ne.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if(e==="fit-viewport")return this._fitViewport(t);let n,i;return this._changeViewbox(function(){typeof t!="object"&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)}),pa(i.a,1e3)};function zf(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}ne.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},ne.prototype._setZoom=function(e,t){const n=this._svg,i=this._viewport,r=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,c,l,u;c=i.getCTM();const p=c.a;return t?(a=D(o,t),s=a.matrixTransform(c.inverse()),l=r.translate(s.x,s.y).scale(1/p*e).translate(-s.x,-s.y),u=c.multiply(l)):u=r.scale(e),zf(this._viewport,u),u},ne.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},ne.prototype.getAbsoluteBBox=function(e){const t=this.viewbox();let n;e.waypoints?n=this.getGraphics(e).getBBox():n=e;const i=n.x*t.scale-t.x*t.scale,r=n.y*t.scale-t.y*t.scale,o=n.width*t.scale,a=n.height*t.scale;return{x:i,y:r,width:o,height:a}},ne.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Ki="data-element-id";function Nt(e){this._elements={},this._eventBus=e}Nt.$inject=["eventBus"],Nt.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),G(t,Ki,i),n&&G(n,Ki,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},Nt.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(G(i.gfx,Ki,""),i.secondaryGfx&&G(i.secondaryGfx,Ki,""),delete t[n])},Nt.prototype.updateId=function(e,t){this._validateId(t),typeof e=="string"&&(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)},Nt.prototype.updateGraphics=function(e,t,n){var i=e.id||e,r=this._elements[i];return n?r.secondaryGfx=t:r.gfx=t,t&&G(t,Ki,i),t},Nt.prototype.get=function(e){var t;typeof e=="string"?t=e:t=e&&G(e,Ki);var n=this._elements[t];return n&&n.element},Nt.prototype.filter=function(e){var t=[];return this.forEach(function(n,i){e(n,i)&&t.push(n)}),t},Nt.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),i=0;i<n.length;i++){var r=n[i],o=t[r],a=o.element,s=o.gfx;if(e(a,s))return a}},Nt.prototype.getAll=function(){return this.filter(function(e){return e})},Nt.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)})},Nt.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},Nt.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 Gx(e,t,n,i){var r=n.inverse;return Object.defineProperty(e,"remove",{value:function(o){var a=this.indexOf(o);return a!==-1&&(this.splice(a,1),t.unset(o,r,i)),o}}),Object.defineProperty(e,"contains",{value:function(o){return this.indexOf(o)!==-1}}),Object.defineProperty(e,"add",{value:function(o,a){var s=this.indexOf(o);if(typeof a>"u"){if(s!==-1)return;a=this.length}s!==-1&&this.splice(s,1),this.splice(a,0,o),s===-1&&t.set(o,r,i)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}function Kx(e){return e.__refs_collection===!0}function qx(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function Wf(e,t,n){var i=Gx(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:i}),i.length&&i.forEach(function(r){e.set(r,t.inverse,n)})}function Yx(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(o){if(o!==r){var a=r;r=null,a&&e.unset(a,i,n),r=o,e.set(r,i,n)}}})}function Lt(e,t){if(!(this instanceof Lt))return new Lt(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Lt.prototype.bind=function(e,t){if(typeof t=="string"){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?Wf(this,t,e):Yx(this,t,e)},Lt.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return Kx(n)||Wf(this,t,e),n},Lt.prototype.ensureBound=function(e,t){qx(e,t)||this.bind(e,t)},Lt.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},Lt.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Hc=new Lt({name:"children",enumerable:!0,collection:!0},{name:"parent"}),Uf=new Lt({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Gf=new Lt({name:"attachers",collection:!0},{name:"host"}),Kf=new Lt({name:"outgoing",collection:!0},{name:"source"}),qf=new Lt({name:"incoming",collection:!0},{name:"target"});function qi(){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)}}),Hc.bind(this,"parent"),Uf.bind(this,"labels"),Kf.bind(this,"outgoing"),qf.bind(this,"incoming")}function $r(){qi.call(this),Hc.bind(this,"children"),Gf.bind(this,"host"),Gf.bind(this,"attachers")}Y($r,qi);function Yf(){qi.call(this),Hc.bind(this,"children")}Y(Yf,$r);function Xf(){$r.call(this),Uf.bind(this,"labelTarget")}Y(Xf,$r);function Zf(){qi.call(this),Kf.bind(this,"source"),qf.bind(this,"target")}Y(Zf,qi);var Xx={connection:Zf,shape:$r,label:Xf,root:Yf};function Zx(e,t){var n=Xx[e];if(!n)throw new Error("unknown type: <"+e+">");return D(new n,t)}function Jx(e){return e instanceof qi}function wn(){this._uid=12}wn.prototype.createRoot=function(e){return this.create("root",e)},wn.prototype.createLabel=function(e){return this.create("label",e)},wn.prototype.createShape=function(e){return this.create("shape",e)},wn.prototype.createConnection=function(e){return this.create("connection",e)},wn.prototype.create=function(e,t){return t=D({},t||{}),t.id||(t.id=e+"_"+this._uid++),Zx(e,t)};var fa="__fn",Jf=1e3,Qx=Array.prototype.slice;function At(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}At.prototype.on=function(e,t,n,i){if(e=oe(e)?e:[e],We(t)&&(i=n,n=t,t=Jf),!ee(t))throw new Error("priority must be a number");var r=n;i&&(r=Et(n,i),r[fa]=n[fa]||n);var o=this;e.forEach(function(a){o._addListener(a,{priority:t,callback:r,next:null})})},At.prototype.once=function(e,t,n,i){var r=this;if(We(t)&&(i=n,n=t,t=Jf),!ee(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var a=n.apply(i,arguments);return r.off(e,o),a}o[fa]=n,this.on(e,t,o)},At.prototype.off=function(e,t){e=oe(e)?e:[e];var n=this;e.forEach(function(i){n._removeListener(i,t)})},At.prototype.createEvent=function(e){var t=new jr;return t.init(e),t},At.prototype.fire=function(e,t){var n,i,r,o;if(o=Qx.call(arguments),typeof e=="object"&&(t=e,e=t.type),!e)throw new Error("no event type specified");if(i=this._listeners[e],!!i){t instanceof jr?n=t:n=this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{r=this._invokeListeners(n,o,i)}finally{e!==a&&(n.type=a)}return r===void 0&&n.defaultPrevented&&(r=!1),r}},At.prototype.handleError=function(e){return this.fire("error",{error:e})===!1},At.prototype._destroy=function(){this._listeners={}},At.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},At.prototype._invokeListener=function(e,t,n){var i;if(n.callback.__isTomb)return i;try{i=ew(n.callback,t),i!==void 0&&(e.returnValue=i,e.stopPropagation()),i===!1&&e.preventDefault()}catch(r){if(!this.handleError(r))throw console.error("unhandled error in event listener",r),r}return i},At.prototype._addListener=function(e,t){var n=this._getListeners(e),i;if(!n){this._setListeners(e,t);return}for(;n;){if(n.priority<t.priority){t.next=n,i?i.next=t:this._setListeners(e,t);return}i=n,n=n.next}i.next=t},At.prototype._getListeners=function(e){return this._listeners[e]},At.prototype._setListeners=function(e,t){this._listeners[e]=t},At.prototype._removeListener=function(e,t){var n=this._getListeners(e),i,r,o;if(!t){this._setListeners(e,null);return}for(;n;)i=n.next,o=n.callback,(o===t||o[fa]===t)&&(r?r.next=i:this._setListeners(e,i)),r=n,n=i};function jr(){}jr.prototype.stopPropagation=function(){this.cancelBubble=!0},jr.prototype.preventDefault=function(){this.defaultPrevented=!0},jr.prototype.init=function(e){D(this,e||{})};function ew(e,t){return e.apply(null,t)}function Ei(e){return e.childNodes[0]}function tw(e){return e.parentNode.childNodes[1]}function da(e,t,n,i,r){var o=Mr();o.setTranslate(t,n);var a=Mr();a.setRotate(i||0,0,0);var s=Mr();s.setScale(1,1),Nr(e,[o,a,s])}function ot(e,t,n){var i=Mr();i.setTranslate(t,n),Nr(e,i)}function Qf(e,t){var n=Mr();n.setRotate(t,0,0),Nr(e,n)}function Ot(e,t){this._eventBus=e,this._elementRegistry=t}Ot.$inject=["eventBus","elementRegistry"],Ot.prototype._getChildrenContainer=function(e){var t=this._elementRegistry.getGraphics(e),n;return e.parent?(n=tw(t),n||(n=X("g"),me(n).add("djs-children"),ie(t.parentNode,n))):n=t,n},Ot.prototype._clear=function(e){var t=Ei(e);return Zo(t),t},Ot.prototype._createContainer=function(e,t,n,i){var r=X("g");me(r).add("djs-group"),typeof n<"u"?ed(r,t,t.childNodes[n]):ie(t,r);var o=X("g");me(o).add("djs-element"),me(o).add("djs-"+e),i&&me(o).add("djs-frame"),ie(r,o);var a=X("g");return me(a).add("djs-visual"),ie(o,a),o},Ot.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,Cf(t))},Ot.prototype.updateContainments=function(e){var t=this,n=this._elementRegistry,i;i=Tt(e,function(r,o){return o.parent&&(r[o.parent.id]=o.parent),r},{}),A(i,function(r){var o=r.children;if(o){var a=t._getChildrenContainer(r);A(o.slice().reverse(),function(s){var c=n.getGraphics(s);ed(c.parentNode,a)})}})},Ot.prototype.drawShape=function(e,t,n={}){var i=this._eventBus;return i.fire("render.shape",{gfx:e,element:t,attrs:n})},Ot.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)},Ot.prototype.drawConnection=function(e,t,n={}){var i=this._eventBus;return i.fire("render.connection",{gfx:e,element:t,attrs:n})},Ot.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)},Ot.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if(e==="shape")this.drawShape(i,t),ot(n,t.x,t.y);else if(e==="connection")this.drawConnection(i,t);else throw new Error("unknown type: "+e);t.hidden?G(n,"display","none"):G(n,"display","block")}},Ot.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);Ge(t.parentNode)};function ed(e,t,n){var i=n||t.firstChild;e!==i&&t.insertBefore(e,i)}const nw={__depends__:[xx],__init__:["canvas"],canvas:["type",ne],elementRegistry:["type",Nt],elementFactory:["type",wn],eventBus:["type",At],graphicsFactory:["type",Ot]};function iw(e){var t=new _f(e);return t.init(),t}function rw(e){e=e||{};var t={config:["value",e]},n=[t,nw].concat(e.modules||[]);return iw(n)}function Un(e,t){this._injector=t||rw(e),this.get("eventBus").fire("diagram.init")}Un.prototype.get=function(e,t){return this._injector.get(e,t)},Un.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},Un.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},Un.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};function Vc(){}Vc.prototype.get=function(e){return this.$model.properties.get(this,e)},Vc.prototype.set=function(e,t){this.$model.properties.set(this,e,t)};function td(e,t){this.model=e,this.properties=t}td.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(Vc.prototype);A(e.properties,function(a){!a.isMany&&a.default!==void 0&&(i[a.name]=a.default)}),n.defineModel(i,t),n.defineDescriptor(i,e);var r=e.ns.name;function o(a){n.define(this,"$type",{value:r,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),A(a,Et(function(s,c){this.set(c,s)},this))}return o.prototype=i,o.hasType=i.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var ow={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},nd={String:function(e){return e},Boolean:function(e){return e==="true"},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function zc(e,t){var n=nd[e];return n?n(t):t}function Wc(e){return!!ow[e]}function id(e){return!!nd[e]}function ft(e,t){var n=e.split(/:/),i,r;if(n.length===1)i=e,r=t;else if(n.length===2)i=n[1],r=n[0];else throw new Error("expected <prefix:localName> or <localName>, got "+e);return e=(r?r+":":"")+i,{name:e,prefix:r,localName:i}}function It(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}It.prototype.build=function(){return Jt(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},It.prototype.addProperty=function(e,t,n){typeof t=="boolean"&&(n=t,t=void 0),this.addNamedProperty(e,n!==!1);var i=this.properties;t!==void 0?i.splice(t,0,e):i.push(e)},It.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,o=this.propertiesByName,a=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=r.indexOf(e);if(s===-1)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,a),o[i.name]=o[i.localName]=t},It.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=ft(r[0],i),a=ft(r[1],o.prefix).name,s=this.propertiesByName[a];if(s)this.replaceProperty(s,e,n);else throw new Error("refined property <"+a+"> not found");delete e.redefines},It.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},It.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},It.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},It.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},It.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},It.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")},It.prototype.hasProperty=function(e){return this.propertiesByName[e]},It.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(A(e.properties,Et(function(o){o=D({},o,{name:o.ns.localName,inherited:t}),Object.defineProperty(o,"definedBy",{value:e});var a=o.replaces,s=o.redefines;a||s?this.redefineProperty(o,a||s,a):(o.isBody&&this.setBodyProperty(o),o.isId&&this.setIdProperty(o),this.addProperty(o))},this)),i.push(e),n[r]=e)};function Gn(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,A(e,Et(this.registerPackage,this))}Gn.prototype.getPackage=function(e){return this.packageMap[e]},Gn.prototype.getPackages=function(){return this.packages},Gn.prototype.registerPackage=function(e){e=D({},e);var t=this.packageMap;rd(t,e,"prefix"),rd(t,e,"uri"),A(e.types,Et(function(n){this.registerType(n,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},Gn.prototype.registerType=function(e,t){e=D({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:D(e.meta||{})});var n=ft(e.name,t.prefix),i=n.name,r={};A(e.properties,Et(function(o){var a=ft(o.name,n.prefix),s=a.name;Wc(o.type)||(o.type=ft(o.type,a.prefix).name),D(o,{ns:a,name:s}),r[s]=o},this)),D(e,{ns:n,name:i,propertiesByName:r}),A(e.extends,Et(function(o){var a=ft(o,n.prefix),s=this.typeMap[a.name];s.traits=s.traits||[],s.traits.push(i)},this)),this.definePackage(e,t),this.typeMap[i]=e},Gn.prototype.mapTypes=function(e,t,n){var i=Wc(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(c,l){var u=ft(c,Wc(c)?"":e.prefix);r.mapTypes(u,t,l)}function a(c){return o(c,!0)}function s(c){return o(c,!1)}if(!i)throw new Error("unknown type <"+e.name+">");A(i.superClass,n?a:s),t(i,!n),A(i.traits,a)},Gn.prototype.getEffectiveDescriptor=function(e){var t=ft(e),n=new It(t);this.mapTypes(t,function(r,o){n.addTrait(r,o)});var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},Gn.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};function rd(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function xi(e){this.model=e}xi.prototype.set=function(e,t,n){if(!Rt(t)||!t.length)throw new TypeError("property name must be a non-empty string");var i=this.getProperty(e,t),r=i&&i.name;aw(n)?i?delete e[r]:delete e.$attrs[Uc(t)]:i?r in e?e[r]=n:od(e,i,n):e.$attrs[Uc(t)]=n},xi.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[Uc(t)];var i=n.name;return!e[i]&&n.isMany&&od(e,n,[]),e[i]},xi.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;n=D({},n,{get:function(){return i}}),delete n.value}Object.defineProperty(e,t,n)},xi.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},xi.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},xi.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(typeof r<"u"){const o=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(r)throw o;typeof console<"u"&&console.warn(o)}return null};function aw(e){return typeof e>"u"}function od(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function Uc(e){return e.replace(/^:/,"")}function $t(e,t={}){this.properties=new xi(this),this.factory=new td(this,this.properties),this.registry=new Gn(e,this.properties),this.typeCache={},this.config=t}$t.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},$t.prototype.getType=function(e){var t=this.typeCache,n=Rt(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},$t.prototype.createAny=function(e,t,n){var i=ft(e),r={$type:e,$instanceOf:function(a){return a===this.$type},get:function(a){return this[a]},set:function(a,s){M0(this,[a],s)}},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}),A(n,function(a,s){tt(a)&&a.value!==void 0?r[a.name]=a.value:r[s]=a}),r},$t.prototype.getPackage=function(e){return this.registry.getPackage(e)},$t.prototype.getPackages=function(){return this.registry.getPackages()},$t.prototype.getElementDescriptor=function(e){return e.$descriptor},$t.prototype.hasType=function(e,t){t===void 0&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return t in n.allTypesByName},$t.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},$t.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var ad=String.fromCharCode,sw=Object.prototype.hasOwnProperty,cw=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,Fr={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(Fr).forEach(function(e){Fr[e.toUpperCase()]=Fr[e]});function lw(e,t,n,i){return i?sw.call(Fr,i)?Fr[i]:"&"+i+";":ad(t||parseInt(n,16))}function wi(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(cw,lw):e}var sd="non-whitespace outside of root node";function Yi(e){return new Error(e)}function cd(e){return"missing namespace for prefix <"+e+">"}function ha(e){return{get:e,enumerable:!0}}function uw(e){var t={},n;for(n in e)t[n]=e[n];return t}function Gc(e){return e+"$uri"}function pw(e){var t={},n,i;for(n in e)i=e[n],t[i]=i,t[Gc(i)]=n;return t}function ld(){return{line:0,column:0}}function fw(e){throw e}function ud(e){if(!this)return new ud(e);var t=e&&e.proxy,n,i,r,o,a=fw,s,c,l,u,p=ld,f=!1,d=!1,m=null,v=!1,g;function w(E){E instanceof Error||(E=Yi(E)),m=E,a(E,p)}function C(E){s&&(E instanceof Error||(E=Yi(E)),s(E,p))}this.on=function(E,S){if(typeof S!="function")throw Yi("required args <name, cb>");switch(E){case"openTag":i=S;break;case"text":n=S;break;case"closeTag":r=S;break;case"error":a=S;break;case"warn":s=S;break;case"cdata":o=S;break;case"attention":u=S;break;case"question":l=S;break;case"comment":c=S;break;default:throw Yi("unsupported event: "+E)}return this},this.ns=function(E){if(typeof E>"u"&&(E={}),typeof E!="object")throw Yi("required args <nsMap={}>");var S={},R;for(R in E)S[R]=E[R];return d=!0,g=S,this},this.parse=function(E){if(typeof E!="string")throw Yi("required args <xml=string>");return m=null,x(E),p=ld,v=!1,m},this.stop=function(){v=!0};function x(E){var S=d?[]:null,R=d?pw(g):null,N,P=[],O=0,I=!1,L=!1,B=0,z=0,q,Je,Ce,pe,Qe,Ie,be,ze,j,V="",Z=0,he;function St(){if(he!==null)return he;var _,y,k,M=d&&R.xmlns,$=d&&f?[]:null,W=Z,J=V,de=J.length,Xe,Be,rt,Xt,Re,Bn={},Qs={},Bt,se,Ee;e:for(;W<de;W++)if(Bt=!1,se=J.charCodeAt(W),!(se===32||se<14&&se>8)){for((se<65||se>122||se>90&&se<97)&&se!==95&&se!==58&&(C("illegal first char attribute name"),Bt=!0),Ee=W+1;Ee<de;Ee++)if(se=J.charCodeAt(Ee),!(se>96&&se<123||se>64&&se<91||se>47&&se<59||se===46||se===45||se===95)){if(se===32||se<14&&se>8){C("missing attribute value"),W=Ee;continue e}if(se===61)break;C("illegal attribute name char"),Bt=!0}if(Re=J.substring(W,Ee),Re==="xmlns:xmlns"&&(C("illegal declaration of xmlns"),Bt=!0),se=J.charCodeAt(Ee+1),se===34)Ee=J.indexOf('"',W=Ee+2),Ee===-1&&(Ee=J.indexOf("'",W),Ee!==-1&&(C("attribute value quote missmatch"),Bt=!0));else if(se===39)Ee=J.indexOf("'",W=Ee+2),Ee===-1&&(Ee=J.indexOf('"',W),Ee!==-1&&(C("attribute value quote missmatch"),Bt=!0));else for(C("missing attribute value quotes"),Bt=!0,Ee=Ee+1;Ee<de&&(se=J.charCodeAt(Ee+1),!(se===32||se<14&&se>8));Ee++);for(Ee===-1&&(C("missing closing quotes"),Ee=de,Bt=!0),Bt||(rt=J.substring(W,Ee)),W=Ee;Ee+1<de&&(se=J.charCodeAt(Ee+1),!(se===32||se<14&&se>8));Ee++)W===Ee&&(C("illegal character after attribute end"),Bt=!0);if(W=Ee+1,Bt)continue e;if(Re in Qs){C("attribute <"+Re+"> already defined");continue}if(Qs[Re]=!0,!d){Bn[Re]=rt;continue}if(f){if(Be=Re==="xmlns"?"xmlns":Re.charCodeAt(0)===120&&Re.substr(0,6)==="xmlns:"?Re.substr(6):null,Be!==null){if(_=wi(rt),y=Gc(Be),Xt=g[_],!Xt){if(Be==="xmlns"||y in R&&R[y]!==_)do Xt="ns"+O++;while(typeof R[Xt]<"u");else Xt=Be;g[_]=Xt}R[Be]!==Xt&&(Xe||(R=uw(R),Xe=!0),R[Be]=Xt,Be==="xmlns"&&(R[Gc(Xt)]=_,M=Xt),R[y]=_),Bn[Re]=rt;continue}$.push(Re,rt);continue}if(se=Re.indexOf(":"),se===-1){Bn[Re]=rt;continue}if(!(k=R[Re.substring(0,se)])){C(cd(Re.substring(0,se)));continue}Re=M===k?Re.substr(se+1):k+Re.substr(se),Bn[Re]=rt}if(f)for(W=0,de=$.length;W<de;W++){if(Re=$[W++],rt=$[W],se=Re.indexOf(":"),se!==-1){if(!(k=R[Re.substring(0,se)])){C(cd(Re.substring(0,se)));continue}Re=M===k?Re.substr(se+1):k+Re.substr(se)}Bn[Re]=rt}return he=Bn}function T(){for(var _=/(\r\n|\r|\n)/g,y=0,k=0,M=0,$=z,W,J;B>=M&&(W=_.exec(E),!(!W||($=W[0].length+W.index,$>B)));)y+=1,M=$;return B==-1?(k=$,J=E.substring(z)):z===0?J=E.substring(z,B):(k=B-M,J=z==-1?E.substring(B):E.substring(B,z+1)),{data:J,line:y,column:k}}for(p=T,t&&(j=Object.create({},{name:ha(function(){return be}),originalName:ha(function(){return ze}),attrs:ha(St),ns:ha(function(){return R})}));z!==-1;){if(E.charCodeAt(z)===60?B=z:B=E.indexOf("<",z),B===-1){if(P.length)return w("unexpected end of file");if(z===0)return w("missing start tag");z<E.length&&E.substring(z).trim()&&C(sd);return}if(z!==B){if(P.length){if(n&&(n(E.substring(z,B),wi,p),v))return}else if(E.substring(z,B).trim()&&(C(sd),v))return}if(pe=E.charCodeAt(B+1),pe===33){if(Ce=E.charCodeAt(B+2),Ce===91&&E.substr(B+3,6)==="CDATA["){if(z=E.indexOf("]]>",B),z===-1)return w("unclosed cdata");if(o&&(o(E.substring(B+9,z),p),v))return;z+=3;continue}if(Ce===45&&E.charCodeAt(B+3)===45){if(z=E.indexOf("-->",B),z===-1)return w("unclosed comment");if(c&&(c(E.substring(B+4,z),wi,p),v))return;z+=3;continue}}if(pe===63){if(z=E.indexOf("?>",B),z===-1)return w("unclosed question");if(l&&(l(E.substring(B,z+2),p),v))return;z+=2;continue}for(q=B+1;;q++){if(Qe=E.charCodeAt(q),isNaN(Qe))return z=-1,w("unclosed tag");if(Qe===34)Ce=E.indexOf('"',q+1),q=Ce!==-1?Ce:q;else if(Qe===39)Ce=E.indexOf("'",q+1),q=Ce!==-1?Ce:q;else if(Qe===62){z=q;break}}if(pe===33){if(u&&(u(E.substring(B,z+1),wi,p),v))return;z+=1;continue}if(he={},pe===47){if(I=!1,L=!0,!P.length)return w("missing open tag");if(q=be=P.pop(),Ce=B+2+q.length,E.substring(B+2,Ce)!==q)return w("closing tag mismatch");for(;Ce<z;Ce++)if(pe=E.charCodeAt(Ce),!(pe===32||pe>8&&pe<14))return w("close tag")}else{if(E.charCodeAt(z-1)===47?(q=be=E.substring(B+1,z-1),I=!0,L=!0):(q=be=E.substring(B+1,z),I=!0,L=!1),!(pe>96&&pe<123||pe>64&&pe<91||pe===95||pe===58))return w("illegal first char nodeName");for(Ce=1,Je=q.length;Ce<Je;Ce++)if(pe=q.charCodeAt(Ce),!(pe>96&&pe<123||pe>64&&pe<91||pe>47&&pe<59||pe===45||pe===95||pe==46)){if(pe===32||pe<14&&pe>8){be=q.substring(0,Ce),he=null;break}return w("invalid nodeName")}L||P.push(be)}if(d){if(N=R,I&&(L||S.push(N),he===null&&(f=q.indexOf("xmlns",Ce)!==-1)&&(Z=Ce,V=q,St(),f=!1)),ze=be,pe=be.indexOf(":"),pe!==-1){if(Ie=R[be.substring(0,pe)],!Ie)return w("missing namespace on <"+ze+">");be=be.substr(pe+1)}else Ie=R.xmlns;Ie&&(be=Ie+":"+be)}if(I&&(Z=Ce,V=q,i&&(t?i(j,wi,L,p):i(be,St,wi,L,p),v)))return;if(L){if(r&&(r(t?j:be,wi,I,p),v))return;d&&(I?R=N:R=S.pop())}z+=1}}}function pd(e){return e.xml&&e.xml.tagAlias==="lowerCase"}var Kc={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},fd="property";function dd(e){return e.xml&&e.xml.serialize}function dw(e){const t=dd(e);return t!==fd&&(t||null)}function hw(e){return e.charAt(0).toUpperCase()+e.slice(1)}function hd(e,t){return pd(t)?e.prefix+":"+hw(e.localName):e.name}function mw(e,t){var n=e.name,i=e.localName,r=t&&t.xml&&t.xml.typePrefix;return r&&i.indexOf(r)===0?e.prefix+":"+i.slice(r.length):n}function gw(e,t,n){const i=ft(e,t.xmlns),r=`${t[i.prefix]||i.prefix}:${i.localName}`,o=ft(r);var a=n.getPackage(o.prefix);return mw(o,a)}function Kn(e){return new Error(e)}function Sn(e){return e.$descriptor}function vw(e){D(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t)},this.addElement=function(t){if(!t)throw Kn("expected element");var n=this.elementsById,i=Sn(t),r=i.idProperty,o;if(r&&(o=t.get(r.name),o)){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(o))throw new Error("illegal ID <"+o+">");if(n[o])throw Kn("duplicate ID <"+o+">");n[o]=t}},this.addWarning=function(t){this.warnings.push(t)}}function Hr(){}Hr.prototype.handleEnd=function(){},Hr.prototype.handleText=function(){},Hr.prototype.handleNode=function(){};function qc(){}qc.prototype=Object.create(Hr.prototype),qc.prototype.handleNode=function(){return this};function Xi(){}Xi.prototype=Object.create(Hr.prototype),Xi.prototype.handleText=function(e){this.body=(this.body||"")+e};function Vr(e,t){this.property=e,this.context=t}Vr.prototype=Object.create(Xi.prototype),Vr.prototype.handleNode=function(e){if(this.element)throw Kn("expected no sub nodes");return this.element=this.createReference(e),this},Vr.prototype.handleEnd=function(){this.element.id=this.body},Vr.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}};function Yc(e,t){this.element=t,this.propertyDesc=e}Yc.prototype=Object.create(Xi.prototype),Yc.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=zc(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)};function ma(){}ma.prototype=Object.create(Xi.prototype),ma.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};function gt(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}gt.prototype=Object.create(ma.prototype),gt.prototype.addReference=function(e){this.context.addReference(e)},gt.prototype.handleText=function(e){var t=this.element,n=Sn(t),i=n.bodyProperty;if(!i)throw Kn("unexpected body text <"+e+">");Xi.prototype.handleText.call(this,e)},gt.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Sn(t),i=n.bodyProperty;i&&e!==void 0&&(e=zc(i.type,e),t.set(i.name,e))},gt.prototype.createElement=function(e){var t=e.attributes,n=this.type,i=Sn(n),r=this.context,o=new n({}),a=this.model,s;return A(t,function(c,l){var u=i.propertiesByName[l],p;u&&u.isReference?u.isMany?(p=c.split(" "),A(p,function(f){r.addReference({element:o,property:u.ns.name,id:f})})):r.addReference({element:o,property:u.ns.name,id:c}):(u?c=zc(u.type,c):l==="xmlns"?l=":"+l:(s=ft(l,i.ns.prefix),a.getPackage(s.prefix)&&r.addWarning({message:"unknown attribute <"+l+">",element:o,property:l,value:c})),o.set(l,c))}),o},gt.prototype.getPropertyForNode=function(e){var t=e.name,n=ft(t),i=this.type,r=this.model,o=Sn(i),a=n.name,s=o.propertiesByName[a];if(s&&!s.isAttr){const l=dw(s);if(l){const u=e.attributes[l];if(u){const p=gw(u,e.ns,r),f=r.getType(p);return D({},s,{effectiveType:Sn(f).name})}}return s}var c=r.getPackage(n.prefix);if(c){const l=hd(n,c),u=r.getType(l);if(s=_e(o.properties,function(p){return!p.isVirtual&&!p.isReference&&!p.isAttribute&&u.hasType(p.type)}),s)return D({},s,{effectiveType:Sn(u).name})}else if(s=_e(o.properties,function(l){return!l.isReference&&!l.isAttribute&&l.type==="Element"}),s)return s;throw Kn("unrecognized element <"+n.name+">")},gt.prototype.toString=function(){return"ElementDescriptor["+Sn(this.type).name+"]"},gt.prototype.valueHandler=function(e,t){return new Yc(e,t)},gt.prototype.referenceHandler=function(e){return new Vr(e,this.context)},gt.prototype.handler=function(e){return e==="Element"?new Zi(this.model,e,this.context):new gt(this.model,e,this.context)},gt.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,n=t.effectiveType||t.type,id(n))return this.valueHandler(t,i);t.isReference?r=this.referenceHandler(t).handleNode(e):r=this.handler(n).handleNode(e);var o=r.element;return o!==void 0&&(t.isMany?i.get(t.name).push(o):i.set(t.name,o),t.isReference?(D(o,{element:i}),this.context.addReference(o)):o.$parent=i),r};function Xc(e,t,n){gt.call(this,e,t,n)}Xc.prototype=Object.create(gt.prototype),Xc.prototype.createElement=function(e){var t=e.name,n=ft(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),a=o&&hd(n,o)||t;if(!r.hasType(a))throw Kn("unexpected element <"+e.originalName+">");return gt.prototype.createElement.call(this,e)};function Zi(e,t,n){this.model=e,this.context=n}Zi.prototype=Object.create(ma.prototype),Zi.prototype.createElement=function(e){var t=e.name,n=ft(t),i=n.prefix,r=e.ns[i+"$uri"],o=e.attributes;return this.model.createAny(t,r,o)},Zi.prototype.handleChild=function(e){var t=new Zi(this.model,"Element",this.context).handleNode(e),n=this.element,i=t.element,r;return i!==void 0&&(r=n.$children=n.$children||[],r.push(i),i.$parent=n),t},Zi.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)};function Zc(e){e instanceof $t&&(e={model:e}),D(this,{lax:!1},e)}Zc.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof gt?(i=t,t={}):typeof t=="string"?(i=this.handler(t),t={}):typeof i=="string"&&(i=this.handler(i));var r=this.model,o=this.lax,a=new vw(D({},t,{rootHandler:i})),s=new ud({proxy:!0}),c=yw();i.context=a,c.push(i);function l(S,R,N){var P=R(),O=P.line,I=P.column,L=P.data;L.charAt(0)==="<"&&L.indexOf(" ")!==-1&&(L=L.slice(0,L.indexOf(" "))+">");var B="unparsable content "+(L?L+" ":"")+`detected
6
6
  line: `+O+`
7
7
  column: `+I+`
8
8
  nested error: `+S.message;if(N)return a.addWarning({message:B,error:S}),!0;throw Kn(B)}function u(S,R){return l(S,R,!0)}function p(){var S=a.elementsById,R=a.references,N,P;for(N=0;P=R[N];N++){var O=P.element,I=S[P.id],L=Sn(O).propertiesByName[P.property];if(I||a.addWarning({message:"unresolved reference <"+P.id+">",element:P.element,property:P.property,value:P.id}),L.isMany){var B=O.get(L.name),z=B.indexOf(P);z===-1&&(z=B.length),I?B[z]=I:B.splice(z,1)}else O.set(L.name,I)}}function f(){c.pop().handleEnd()}var d=/^<\?xml /i,m=/ encoding="([^"]+)"/i,v=/^utf-8$/i;function g(S){if(d.test(S)){var R=m.exec(S),N=R&&R[1];!N||v.test(N)||a.addWarning({message:"unsupported document encoding <"+N+">, falling back to UTF-8"})}}function w(S,R){var N=c.peek();try{c.push(N.handleNode(S))}catch(P){l(P,R,o)&&c.push(new qc)}}function C(S,R){try{c.peek().handleText(S)}catch(N){u(N,R)}}function x(S,R){S.trim()&&C(S,R)}var E=r.getPackages().reduce(function(S,R){return S[R.uri]=R.prefix,S},Object.entries(Kc).reduce(function(S,[R,N]){return S[N]=R,S},r.config&&r.config.nsMap||{}));return s.ns(E).on("openTag",function(S,R,N,P){var O=S.attrs||{},I=Object.keys(O).reduce(function(B,z){var q=R(O[z]);return B[z]=q,B},{}),L={name:S.name,originalName:S.originalName,attributes:I,ns:S.ns};w(L,P)}).on("question",g).on("closeTag",f).on("cdata",C).on("text",function(S,R,N){x(R(S),N)}).on("error",l).on("warn",u),new Promise(function(S,R){var N;try{s.parse(e),p()}catch(B){N=B}var P=i.element;!N&&!P&&(N=Kn("failed to parse document as <"+i.type.$descriptor.name+">"));var O=a.warnings,I=a.references,L=a.elementsById;return N?(N.warnings=O,R(N)):S({rootElement:P,elementsById:L,references:I,warnings:O})})},Zc.prototype.handler=function(e){return new Xc(this.model,e)};function yw(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}var _w=`<?xml version="1.0" encoding="UTF-8"?>
@@ -237,4 +237,4 @@
237
237
  <input type="text" spellcheck="false" />
238
238
  </div>
239
239
  <div class="djs-search-results" />
240
- </div>`,re.RESULT_HTML='<div class="djs-search-result"></div>',re.RESULT_PRIMARY_HTML='<div class="djs-search-result-primary"></div>',re.RESULT_SECONDARY_HTML='<p class="djs-search-result-secondary"></p>';const t2={__depends__:[wa,Ra,en],searchPad:["type",re]};function yp(e,t,n,i){this._elementRegistry=e,this._canvas=n,this._search=i,t.registerProvider(this)}yp.$inject=["elementRegistry","searchPad","canvas","search"],yp.prototype.find=function(e){var t=this._canvas.getRootElements(),n=this._elementRegistry.filter(function(i){return!ge(i)&&!t.includes(i)});return this._search(n.map(i=>({element:i,label:Qt(i),id:i.id})),e,{keys:["label","id"]}).map(n2)};function n2(e){const{item:{element:t},tokens:n}=e;return{element:t,primaryTokens:n.label,secondaryTokens:n.id}}const i2={__depends__:[t2,Uh],__init__:["bpmnSearch"],bpmnSearch:["type",yp]},r2="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",o2="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",a2={width:36,height:50},s2={width:50,height:50};function a_(e,t,n){return X("path",{d:e,strokeWidth:2,transform:`translate(${t.x}, ${t.y})`,...n})}const Cr=5;function Js(e,t){this._styles=t,e.registerProvider(this)}Js.$inject=["outline","styles"],Js.prototype.getOutline=function(e){const t=this._styles.cls("djs-outline",["no-fill"]);var n;if(!ge(e))return b(e,"bpmn:Gateway")?(n=X("rect"),D(n.style,{"transform-box":"fill-box",transform:"rotate(45deg)","transform-origin":"center"}),G(n,D({x:2,y:2,rx:4,width:e.width-4,height:e.height-4},t))):le(e,["bpmn:Task","bpmn:SubProcess","bpmn:Group","bpmn:CallActivity"])?(n=X("rect"),G(n,D({x:-5,y:-5,rx:14,width:e.width+Cr*2,height:e.height+Cr*2},t))):b(e,"bpmn:EndEvent")?(n=X("circle"),G(n,D({cx:e.width/2,cy:e.height/2,r:e.width/2+Cr+1},t))):b(e,"bpmn:Event")?(n=X("circle"),G(n,D({cx:e.width/2,cy:e.height/2,r:e.width/2+Cr},t))):b(e,"bpmn:DataObjectReference")&&s_(e,"bpmn:DataObjectReference")?n=a_(r2,{x:-6,y:-6},t):b(e,"bpmn:DataStoreReference")&&s_(e,"bpmn:DataStoreReference")&&(n=a_(o2,{x:-6,y:-6},t)),n},Js.prototype.updateOutline=function(e,t){if(!ge(e))return le(e,["bpmn:SubProcess","bpmn:Group"])?(G(t,{width:e.width+Cr*2,height:e.height+Cr*2}),!0):!!le(e,["bpmn:Event","bpmn:Gateway","bpmn:DataStoreReference","bpmn:DataObjectReference"])};function s_(e,t){var n;return t==="bpmn:DataObjectReference"?n=a2:t==="bpmn:DataStoreReference"&&(n=s2),e.width===n.width&&e.height===n.height}const c2={__depends__:[My],__init__:["outlineProvider"],outlineProvider:["type",Js]};var l2='<?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>';function on(e){zr.call(this,e)}Y(on,zr),on.Viewer=Xn,on.NavigatedViewer=Zr,on.prototype.createDiagram=function(){return this.importXML(l2)},on.prototype._interactionModules=[Qd,ih,ah],on.prototype._modelingModules=[cR,Rl,DR,CR,ZR,Ll,iT,uD,tv,Es,hD,vD,MD,OD,ID,FD,JD,qv,oM,gM,RM,PM,Ry,QM,i2,c2],on.prototype._modules=[].concat(Xn.prototype._modules,on.prototype._interactionModules,on.prototype._modelingModules);const u2={name:"Camunda",uri:"http://camunda.org/schema/1.0/bpmn",prefix:"camunda",xml:{tagAlias:"lowerCase"},associations:[],types:JSON.parse('[{"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:[]},p2={class:"wrapper"},f2={class:"mt-xs"},d2={class:"flex-sc"},h2={class:"mt-xs"},m2=gi(h.defineComponent({__name:"RuleConfig",props:{jsonStr:{type:String,required:!0}},emits:["submit"],setup(e,{emit:t}){const{t:n}=an.useI18n(),i=e,r=t,o=h.ref({});function a(p){const f=p.replace(/(false|true|\d+)(?=")/g,"$1,");return JSON.parse(`{${f}}`)}function s(p){if(typeof p=="string"&&(p.trim().startsWith("{")||p.trim().startsWith("[")))try{return JSON.parse(p),!0}catch{return!1}return!1}function c(){i.jsonStr?s(i.jsonStr)?o.value=JSON.parse(i.jsonStr):o.value=a(i.jsonStr):o.value={revokeRule:!1,fallbackRule:!1,approverRemoveDuplicates:2,timeoutConfigSwitch:!1,timeoutPeriod:1,timeoutHandler:1}}function l(){st.Modal.destroyAll()}function u(){const p=o.value;if(p.timeoutConfigSwitch&&!p.timeoutPeriod){st.message.warning(n("bpmn.timeoutPeriodEmptyTip"));return}r("submit",o.value),st.Modal.destroyAll()}return h.onMounted(()=>{c()}),(p,f)=>{const d=K.Checkbox,m=K.FormItem,v=K.Radio,g=K.RadioGroup,w=K.InputNumber,C=K.Form,x=K.Button,E=K.Space;return h.openBlock(),h.createElementBlock("div",p2,[h.createVNode(C,{class:"my-nm","label-col":{span:6},"wrapper-col":{span:18},colon:!1,model:h.unref(o)},{default:h.withCtx(()=>[h.createVNode(m,{label:p.$t("bpmn.revertRule")},{default:h.withCtx(()=>[h.createVNode(d,{checked:h.unref(o).revokeRule,"onUpdate:checked":f[0]||(f[0]=S=>h.unref(o).revokeRule=S)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("bpmn.revertRuleTxt")),1)]),_:1},8,["checked"])]),_:1},8,["label"]),h.createVNode(m,{label:p.$t("bpmn.rollbackRule")},{default:h.withCtx(()=>[h.createVNode(d,{checked:h.unref(o).fallbackRule,"onUpdate:checked":f[1]||(f[1]=S=>h.unref(o).fallbackRule=S)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("bpmn.rollbackRuleTxt")),1)]),_:1},8,["checked"])]),_:1},8,["label"]),h.createVNode(m,{label:p.$t("bpmn.deduplicationApprovers")},{default:h.withCtx(()=>[h.createElementVNode("div",f2,h.toDisplayString(p.$t("bpmn.deduplicationApproversTxt")),1),h.createVNode(g,{value:h.unref(o).approverRemoveDuplicates,"onUpdate:value":f[2]||(f[2]=S=>h.unref(o).approverRemoveDuplicates=S)},{default:h.withCtx(()=>[h.createVNode(v,{value:0},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("bpmn.deduplicationRadio0")),1)]),_:1}),h.createVNode(v,{value:1},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("bpmn.deduplicationRadio1")),1)]),_:1}),h.createVNode(v,{value:2},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("bpmn.deduplicationRadio2")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),h.createVNode(m,{label:p.$t("bpmn.timeoutRule")},{default:h.withCtx(()=>[h.createVNode(d,{checked:h.unref(o).timeoutConfigSwitch,"onUpdate:checked":f[3]||(f[3]=S=>h.unref(o).timeoutConfigSwitch=S)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("bpmn.timeoutRuleTxt")),1)]),_:1},8,["checked"])]),_:1},8,["label"]),h.unref(o).timeoutConfigSwitch?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createVNode(m,{label:p.$t("wo_my.timeout")},{default:h.withCtx(()=>[h.createElementVNode("div",d2,[h.createTextVNode(h.toDisplayString(p.$t("bpmn.linkTimeoutTxt1"))+" ",1),h.createVNode(w,{class:"mx-xs",value:h.unref(o).timeoutPeriod,"onUpdate:value":f[4]||(f[4]=S=>h.unref(o).timeoutPeriod=S),min:1,max:1e4,precision:0},null,8,["value"]),h.createTextVNode(" "+h.toDisplayString(p.$t("bpmn.linkTimeoutTxt2")),1)])]),_:1},8,["label"]),h.createVNode(m,{label:p.$t("bpmn.timeoutHandle")},{default:h.withCtx(()=>[h.createElementVNode("div",h2,h.toDisplayString(p.$t("bpmn.timeoutHandleTxt")),1),h.createVNode(g,{value:h.unref(o).timeoutHandler,"onUpdate:value":f[5]||(f[5]=S=>h.unref(o).timeoutHandler=S)},{default:h.withCtx(()=>[h.createVNode(v,{value:0},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("bpmn.timeoutHandleRadio0")),1)]),_:1}),h.createVNode(v,{value:1},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("bpmn.timeoutHandleRadio1")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"])],64)):h.createCommentVNode("",!0)]),_:1},8,["model"]),h.createVNode(E,{class:"modal-btns"},{default:h.withCtx(()=>[h.createVNode(x,{onClick:l},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("common.btn_cancel1")),1)]),_:1}),h.createVNode(x,{type:"primary",onClick:u},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("common.btn_sure")),1)]),_:1})]),_:1})])}}}),[["__scopeId","data-v-bc38a637"]]),g2=h.defineComponent({__name:"Process",props:h.mergeModels({isEdit:{type:Boolean}},{formState:{},formStateModifiers:{}}),emits:["update:formState"],setup(e){const{modal:t}=st.App.useApp(),{t:n}=an.useI18n(),i=h.useModel(e,"formState"),r=h.ref(["1","2","3","4","5","6"]);function o(){t.info({title:n("ruleModel.title"),content:h.h(m2,{jsonStr:i.value.jobPriority,onSubmit:a=>{i.value.jobPriority=JSON.stringify(a)}}),centered:!0,icon:null,footer:null,closable:!0,maskClosable:!0,width:850,class:"modal-comp"})}return(a,s)=>{const c=K.Input,l=K.FormItem,u=K.Form,p=K.CollapsePanel,f=K.Collapse;return h.openBlock(),h.createBlock(f,{activeKey:h.unref(r),"onUpdate:activeKey":s[4]||(s[4]=d=>h.isRef(r)?r.value=d:null)},{default:h.withCtx(()=>[h.createVNode(p,{key:"1",header:a.$t("FLOW_CHART.General")},{default:h.withCtx(()=>[h.createVNode(u,{layout:"vertical",model:i.value},{default:h.withCtx(()=>[h.createVNode(l,{label:a.$t("FLOW_CHART.Id"),extra:a.$t("FLOW_CHART.idTip")},{default:h.withCtx(()=>[h.createVNode(c,{value:i.value.id,"onUpdate:value":s[0]||(s[0]=d=>i.value.id=d),placeholder:a.$t("common.plsEnter"),readonly:e.isEdit},null,8,["value","placeholder","readonly"])]),_:1},8,["label","extra"]),h.createVNode(l,{label:a.$t("FLOW_CHART.Name")},{default:h.withCtx(()=>[h.createVNode(c,{value:i.value.name,"onUpdate:value":s[1]||(s[1]=d=>i.value.name=d),placeholder:a.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(l,{label:a.$t("FLOW_CHART.Version Tag")},{default:h.withCtx(()=>[h.createVNode(c,{value:i.value.versionTag,"onUpdate:value":s[2]||(s[2]=d=>i.value.versionTag=d),disabled:""},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"]),h.createVNode(p,{key:"4",header:a.$t("FLOW_CHART.Job Configuration")},{default:h.withCtx(()=>[h.createVNode(u,{layout:"vertical",model:i.value},{default:h.withCtx(()=>[h.createVNode(l,{label:a.$t("FLOW_CHART.Job Priority")},{default:h.withCtx(()=>[h.createVNode(c,{value:i.value.jobPriority,"onUpdate:value":s[3]||(s[3]=d=>i.value.jobPriority=d),placeholder:a.$t("common.plsSelect"),readonly:"",onClick:o},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),v2={class:"modal-container"},c_=h.defineComponent({__name:"SelectLink",props:{id:{type:String}},emits:["submit"],setup(e,{emit:t}){const{t:n}=an.useI18n(),i=e,r=t,o=h.ref({}),a=h.ref([{title:n("link.id"),dataIndex:"id"},{title:n("link.description"),dataIndex:"description"},{title:n("link.due"),dataIndex:"due"},{title:n("link.variable"),dataIndex:"variable"}]),s=h.ref([]),c=h.ref();function l(g,w){s.value=g,c.value=w}h.watchEffect(()=>{i.id&&(s.value=[i.id])});function u(g){c.value=null;const w={...o.value};return Object.assign(w,g),Ct.getLinkList(w)}const p=h.ref(),f=()=>{p.value.refresh()},d=()=>{o.value={},f()};h.onMounted(()=>{d()});function m(){st.Modal.destroyAll()}function v(){var g;(g=c.value)!=null&&g.length&&r("submit",c.value[0]),st.Modal.destroyAll()}return(g,w)=>{const C=K.Input,x=K.FormItem,E=K.Button,S=K.Space,R=K.Form,N=h.resolveComponent("a-table-ex");return h.openBlock(),h.createElementBlock("div",v2,[h.createVNode(R,{class:"form-query mx-nm mt-nm",layout:"vertical",model:h.unref(o)},{default:h.withCtx(()=>[h.createVNode(x,{label:g.$t("link.id")},{default:h.withCtx(()=>[h.createVNode(C,{value:h.unref(o).id,"onUpdate:value":w[0]||(w[0]=P=>h.unref(o).id=P),placeholder:g.$t("common.plsEnter"),onKeydown:h.withKeys(f,["enter"])},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(x,{label:g.$t("link.description")},{default:h.withCtx(()=>[h.createVNode(C,{value:h.unref(o).description,"onUpdate:value":w[1]||(w[1]=P=>h.unref(o).description=P),placeholder:g.$t("common.plsEnter"),onKeydown:h.withKeys(f,["enter"])},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(x,{class:"form-btns"},{default:h.withCtx(()=>[h.createVNode(S,null,{default:h.withCtx(()=>[h.createVNode(E,{type:"primary",onClick:f},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(g.$t("common.btn_search")),1)]),_:1}),h.createVNode(E,{onClick:d},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(g.$t("common.btn_reset")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),h.createVNode(N,{ref_key:"tableEx",ref:p,class:"table-query bordered mx-nm",columns:h.unref(a),rowKey:"id","row-selection":{type:"radio",selectedRowKeys:h.unref(s),onChange:l},loadData:u},null,8,["columns","row-selection"]),h.createVNode(S,{class:"modal-btns"},{default:h.withCtx(()=>{var P;return[h.createVNode(E,{onClick:m},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(g.$t("common.btn_cancel1")),1)]),_:1}),h.createVNode(E,{type:"primary",disabled:!((P=h.unref(s))!=null&&P.length),onClick:v},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(g.$t("common.btn_sure")),1)]),_:1},8,["disabled"])]}),_:1})])}}}),y2={class:"modal-container"},_2=h.defineComponent({__name:"SelectUser",props:{userIds:{type:String||Array},branchId:{type:String},mode:{type:String,default:"default"}},emits:["submit"],setup(e,{emit:t}){const{t:n}=an.useI18n(),i=e,r=t,o=h.ref({}),a=h.ref([{title:n("user.user_name"),dataIndex:"userName"},{title:n("user.user_id"),dataIndex:"userCode"},{title:n("arrears.org"),dataIndex:"branchName"}]),s=h.ref([]),c=h.ref();function l(g,w){s.value=g,c.value=w}h.watchEffect(()=>{i.userIds&&(s.value=Array.isArray(i.userIds)?i.userIds:[i.userIds])});function u(g){c.value=null;const w={...o.value,branchId:i.branchId};return Object.assign(w,g),Ct.getUserList(w)}const p=h.ref(),f=()=>{p.value.refresh()},d=()=>{o.value={},f()};h.onMounted(()=>{d()});function m(){st.Modal.destroyAll()}function v(){var g;if((g=c.value)!=null&&g.length){const w=c.value;r("submit",i.mode==="multiple"?w:w[0])}st.Modal.destroyAll()}return(g,w)=>{const C=K.Input,x=K.FormItem,E=K.Button,S=K.Space,R=K.Form,N=h.resolveComponent("a-table-ex");return h.openBlock(),h.createElementBlock("div",y2,[h.createVNode(R,{class:"form-query mx-nm mt-nm",layout:"vertical",model:h.unref(o)},{default:h.withCtx(()=>[h.createVNode(x,{label:g.$t("user.key")},{default:h.withCtx(()=>[h.createVNode(C,{value:h.unref(o).userName,"onUpdate:value":w[0]||(w[0]=P=>h.unref(o).userName=P),placeholder:g.$t("common.plsEnter"),onKeydown:h.withKeys(f,["enter"])},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(x,{class:"form-btns"},{default:h.withCtx(()=>[h.createVNode(S,null,{default:h.withCtx(()=>[h.createVNode(E,{type:"primary",onClick:f},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(g.$t("common.btn_search")),1)]),_:1}),h.createVNode(E,{onClick:d},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(g.$t("common.btn_reset")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),h.createVNode(N,{ref_key:"tableEx",ref:p,class:"table-query bordered mx-nm",columns:h.unref(a),rowKey:"userId","row-selection":{type:e.mode==="multiple"?"checkbox":"radio",selectedRowKeys:h.unref(s),onChange:l},loadData:u},null,8,["columns","row-selection"]),h.createVNode(S,{class:"modal-btns"},{default:h.withCtx(()=>{var P;return[h.createVNode(E,{onClick:m},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(g.$t("common.btn_cancel1")),1)]),_:1}),h.createVNode(E,{type:"primary",disabled:!((P=h.unref(s))!=null&&P.length),onClick:v},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(g.$t("common.btn_sure")),1)]),_:1},8,["disabled"])]}),_:1})])}}}),b2=h.defineComponent({__name:"UserTask",props:{formState:{},formStateModifiers:{}},emits:["update:formState"],setup(e){const{modal:t}=st.App.useApp(),{t:n}=an.useI18n(),i=h.useModel(e,"formState"),r=h.ref(["1","2","3","4","5","6"]),o=h.ref([]),a=h.ref([]),s=h.ref([]),c=h.computed(()=>{const w=i.value.assignee;return w==null?void 0:w.startsWith("${")});function l(){const w="abcdefghijklmnopqrstuvwxyz";let C="";for(let x=0;x<2;x++)C+=w.charAt(Math.floor(Math.random()*w.length));for(let x=0;x<2;x++)C+=Math.floor(Math.random()*10);return C}function u(){t.info({title:n("link.select_link"),content:h.h(c_,{id:i.value.id,onSubmit:w=>{let C=w.id;C.endsWith("*")&&(C=C.substring(0,C.length-1)+l()),Object.assign(i.value,{id:C,name:w.description,assignee:"","camunda:assigneeName":"",priority:void 0,userArr:[],roleArr:[]}),w.variable&&(i.value.assignee=`\${${w.variable}}`)}}),centered:!0,icon:null,footer:null,closable:!0,maskClosable:!0,width:800,class:"modal-comp"})}function p(){t.info({title:n("user.select_user"),content:h.h(_2,{userIds:i.value.assignee,onSubmit:w=>{Object.assign(i.value,{assignee:w.userId,"camunda:assigneeName":w.userName})}}),centered:!0,icon:null,footer:null,closable:!0,maskClosable:!0,width:800,class:"modal-comp"})}function f(){Ct.getBranchTree().then(w=>{w.code===0&&(o.value=w.result||[])})}function d(){const w={pageNo:1,pageSize:1e3,branchId:i.value.priority||void 0};Ct.getUserList(w).then(C=>{var x,E;C.code===0&&(s.value=((E=(x=C.result)==null?void 0:x.data)==null?void 0:E.map(S=>({...S,label:S.userName,value:S.userId})))||[])})}function m(){const w={pageNo:1,pageSize:1e3,branchId:i.value.priority||void 0};Ct.getRoleList(w).then(C=>{var x,E;C.code===0&&(a.value=((E=(x=C.result)==null?void 0:x.data)==null?void 0:E.map(S=>({...S,label:S.roleName,value:S.roleId})))||[])})}function v(){Object.assign(i.value,{userArr:[],roleArr:[]}),d(),m()}function g(w){if(w!=null&&w.length){const C=s.value.find(x=>x.userId===w[0]);i.value.priority!==C.branchId&&(Object.assign(i.value,{priority:C.branchId,roleArr:[]}),d(),m())}}return h.onMounted(()=>{f(),d(),m()}),(w,C)=>{const x=K.Input,E=K.FormItem,S=K.TreeSelect,R=K.Select,N=K.Form,P=K.CollapsePanel,O=K.Radio,I=K.RadioGroup,L=K.Checkbox,B=K.CheckboxGroup,z=K.Collapse;return h.openBlock(),h.createBlock(z,{activeKey:h.unref(r),"onUpdate:activeKey":C[10]||(C[10]=q=>h.isRef(r)?r.value=q:null)},{default:h.withCtx(()=>[h.createVNode(P,{key:"1",header:w.$t("FLOW_CHART.General")},{default:h.withCtx(()=>[h.createVNode(N,{layout:"vertical",model:i.value},{default:h.withCtx(()=>[h.createVNode(E,{label:w.$t("FLOW_CHART.Id")},{default:h.withCtx(()=>[h.createVNode(x,{value:i.value.id,"onUpdate:value":C[0]||(C[0]=q=>i.value.id=q),placeholder:w.$t("common.plsEnter"),readonly:"",onClick:u},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(E,{label:w.$t("FLOW_CHART.Name")},{default:h.withCtx(()=>[h.createVNode(x,{value:i.value.name,"onUpdate:value":C[1]||(C[1]=q=>i.value.name=q),placeholder:w.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(E,{label:w.$t("FLOW_CHART.Assignee")},{default:h.withCtx(()=>[h.unref(c)?(h.openBlock(),h.createBlock(x,{key:0,value:i.value.assignee,"onUpdate:value":C[2]||(C[2]=q=>i.value.assignee=q),placeholder:w.$t("common.plsSelect"),disabled:""},null,8,["value","placeholder"])):(h.openBlock(),h.createBlock(x,{key:1,value:i.value["camunda:assigneeName"],"onUpdate:value":C[3]||(C[3]=q=>i.value["camunda:assigneeName"]=q),placeholder:w.$t("common.plsSelect"),readonly:"",onClick:p},null,8,["value","placeholder"]))]),_:1},8,["label"]),h.createVNode(E,{label:w.$t("FLOW_CHART.Priority")},{default:h.withCtx(()=>[h.createVNode(S,{value:i.value.priority,"onUpdate:value":C[4]||(C[4]=q=>i.value.priority=q),placeholder:w.$t("common.plsSelect"),"tree-data":h.unref(o),treeDefaultExpandAll:"",treeNodeFilterProp:"label","show-search":"","allow-clear":"",onChange:v},null,8,["value","placeholder","tree-data"])]),_:1},8,["label"]),h.createVNode(E,{label:w.$t("FLOW_CHART.Candidate Users")},{default:h.withCtx(()=>[h.createVNode(R,{value:i.value.userArr,"onUpdate:value":C[5]||(C[5]=q=>i.value.userArr=q),placeholder:w.$t("common.plsSelect"),mode:"multiple",maxTagCount:10,options:h.unref(s),optionFilterProp:"label",disabled:h.unref(c),onChange:g},null,8,["value","placeholder","options","disabled"])]),_:1},8,["label"]),h.createVNode(E,{label:w.$t("FLOW_CHART.Candidate Groups")},{default:h.withCtx(()=>[h.createVNode(R,{value:i.value.roleArr,"onUpdate:value":C[6]||(C[6]=q=>i.value.roleArr=q),placeholder:w.$t("common.plsSelect"),mode:"multiple",maxTagCount:10,options:h.unref(a),optionFilterProp:"label",disabled:h.unref(c)},null,8,["value","placeholder","options","disabled"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"]),h.createVNode(P,{key:"2",header:w.$t("FLOW_CHART.isAllowRollback")},{default:h.withCtx(()=>[h.createVNode(I,{value:i.value.rollback,"onUpdate:value":C[7]||(C[7]=q=>i.value.rollback=q)},{default:h.withCtx(()=>[h.createVNode(O,{value:"1"},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.$t("FLOW_CHART.yes")),1)]),_:1}),h.createVNode(O,{value:"0"},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.$t("FLOW_CHART.no")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["header"]),h.createVNode(P,{key:"3",header:w.$t("FLOW_CHART.Approval Mode")},{default:h.withCtx(()=>[h.createVNode(I,{value:i.value.approvalSign,"onUpdate:value":C[8]||(C[8]=q=>i.value.approvalSign=q)},{default:h.withCtx(()=>[h.createVNode(O,{value:"orSign"},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.$t("FLOW_CHART.Or Sign")),1)]),_:1}),h.createVNode(O,{value:"countersign"},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.$t("FLOW_CHART.countersign")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["header"]),h.createVNode(P,{key:"4",header:w.$t("FLOW_CHART.Approval Required")},{default:h.withCtx(()=>[h.createVNode(B,{value:i.value.approvalCheckbox,"onUpdate:value":C[9]||(C[9]=q=>i.value.approvalCheckbox=q)},{default:h.withCtx(()=>[h.createVNode(L,{value:"advice"},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.$t("FLOW_CHART.Comments Required")),1)]),_:1}),h.createVNode(L,{value:"attachment"},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.$t("FLOW_CHART.Attachment Required")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),E2=h.defineComponent({__name:"ExclusiveGateway",props:{formState:{},formStateModifiers:{}},emits:["update:formState"],setup(e){const t=h.useModel(e,"formState"),n=h.ref(["1","2","3","4","5","6"]);return(i,r)=>{const o=K.Input,a=K.FormItem,s=K.Form,c=K.CollapsePanel,l=K.Collapse;return h.openBlock(),h.createBlock(l,{activeKey:h.unref(n),"onUpdate:activeKey":r[2]||(r[2]=u=>h.isRef(n)?n.value=u:null)},{default:h.withCtx(()=>[h.createVNode(c,{key:"1",header:i.$t("FLOW_CHART.General")},{default:h.withCtx(()=>[h.createVNode(s,{layout:"vertical",model:t.value},{default:h.withCtx(()=>[h.createVNode(a,{label:i.$t("FLOW_CHART.Id")},{default:h.withCtx(()=>[h.createVNode(o,{value:t.value.id,"onUpdate:value":r[0]||(r[0]=u=>t.value.id=u),placeholder:i.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(a,{label:i.$t("FLOW_CHART.Name")},{default:h.withCtx(()=>[h.createVNode(o,{value:t.value.name,"onUpdate:value":r[1]||(r[1]=u=>t.value.name=u),placeholder:i.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),x2=h.defineComponent({__name:"SequenceFlow",props:{formState:{},formStateModifiers:{}},emits:["update:formState"],setup(e){const t=h.useModel(e,"formState"),n=h.ref(["1","2","3","4","5","6"]);return(i,r)=>{const o=K.Input,a=K.FormItem,s=K.SelectOption,c=K.Select,l=K.Form,u=K.CollapsePanel,p=K.Collapse;return h.openBlock(),h.createBlock(p,{activeKey:h.unref(n),"onUpdate:activeKey":r[4]||(r[4]=f=>h.isRef(n)?n.value=f:null)},{default:h.withCtx(()=>[h.createVNode(u,{key:"1",header:i.$t("FLOW_CHART.General")},{default:h.withCtx(()=>[h.createVNode(l,{layout:"vertical",model:t.value},{default:h.withCtx(()=>[h.createVNode(a,{label:i.$t("FLOW_CHART.Id")},{default:h.withCtx(()=>[h.createVNode(o,{value:t.value.id,"onUpdate:value":r[0]||(r[0]=f=>t.value.id=f),placeholder:i.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(a,{label:i.$t("FLOW_CHART.Name")},{default:h.withCtx(()=>[h.createVNode(o,{value:t.value.name,"onUpdate:value":r[1]||(r[1]=f=>t.value.name=f),placeholder:i.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(a,{label:i.$t("FLOW_CHART.Condition Type")},{default:h.withCtx(()=>[h.createVNode(c,{value:t.value.condType,"onUpdate:value":r[2]||(r[2]=f=>t.value.condType=f),placeholder:i.$t("common.plsSelect"),allowClear:""},{default:h.withCtx(()=>[h.createVNode(s,{value:"bpmn:FormalExpression"},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(i.$t("FLOW_CHART.Expression")),1)]),_:1})]),_:1},8,["value","placeholder"])]),_:1},8,["label"]),t.value.condType==="bpmn:FormalExpression"?(h.openBlock(),h.createBlock(a,{key:0,label:i.$t("FLOW_CHART.Expression")},{default:h.withCtx(()=>[h.createVNode(o,{value:t.value.condBody,"onUpdate:value":r[3]||(r[3]=f=>t.value.condBody=f),placeholder:i.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"])):h.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),w2=h.defineComponent({__name:"EndEvent",props:{formState:{},formStateModifiers:{}},emits:["update:formState"],setup(e){const{modal:t}=st.App.useApp(),{t:n}=an.useI18n(),i=h.useModel(e,"formState"),r=h.ref(["1","2","3","4","5","6"]);function o(){const s="abcdefghijklmnopqrstuvwxyz";let c="";for(let l=0;l<2;l++)c+=s.charAt(Math.floor(Math.random()*s.length));for(let l=0;l<2;l++)c+=Math.floor(Math.random()*10);return c}function a(){t.info({title:n("link.select_link"),content:h.h(c_,{id:i.value.id,onSubmit:s=>{let c=s.id;c.endsWith("*")&&(c=c.substring(0,c.length-1)+o()),Object.assign(i.value,{id:c,name:s.description})}}),centered:!0,icon:null,footer:null,closable:!0,maskClosable:!0,width:800,class:"modal-comp"})}return(s,c)=>{const l=K.Input,u=K.FormItem,p=K.Form,f=K.CollapsePanel,d=K.Collapse;return h.openBlock(),h.createBlock(d,{activeKey:h.unref(r),"onUpdate:activeKey":c[2]||(c[2]=m=>h.isRef(r)?r.value=m:null)},{default:h.withCtx(()=>[h.createVNode(f,{key:"1",header:s.$t("FLOW_CHART.General")},{default:h.withCtx(()=>[h.createVNode(p,{layout:"vertical",model:i.value},{default:h.withCtx(()=>[h.createVNode(u,{label:s.$t("FLOW_CHART.Id")},{default:h.withCtx(()=>[h.createVNode(l,{value:i.value.id,"onUpdate:value":c[0]||(c[0]=m=>i.value.id=m),placeholder:s.$t("common.plsEnter"),readonly:"",onClick:a},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(u,{label:s.$t("FLOW_CHART.Name")},{default:h.withCtx(()=>[h.createVNode(l,{value:i.value.name,"onUpdate:value":c[1]||(c[1]=m=>i.value.name=m),placeholder:s.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),S2=h.defineComponent({__name:"Other",props:{formState:{},formStateModifiers:{}},emits:["update:formState"],setup(e){const t=h.useModel(e,"formState"),n=h.ref(["1","2","3","4","5","6"]);return(i,r)=>{const o=K.Input,a=K.FormItem,s=K.Form,c=K.CollapsePanel,l=K.Collapse;return h.openBlock(),h.createBlock(l,{activeKey:h.unref(n),"onUpdate:activeKey":r[2]||(r[2]=u=>h.isRef(n)?n.value=u:null)},{default:h.withCtx(()=>[h.createVNode(c,{key:"1",header:i.$t("FLOW_CHART.General")},{default:h.withCtx(()=>[h.createVNode(s,{layout:"vertical",model:t.value},{default:h.withCtx(()=>[h.createVNode(a,{label:i.$t("FLOW_CHART.Id")},{default:h.withCtx(()=>[h.createVNode(o,{value:t.value.id,"onUpdate:value":r[0]||(r[0]=u=>t.value.id=u),placeholder:i.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(a,{label:i.$t("FLOW_CHART.Name")},{default:h.withCtx(()=>[h.createVNode(o,{value:t.value.name,"onUpdate:value":r[1]||(r[1]=u=>t.value.name=u),placeholder:i.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),C2={class:"properties-panel"},R2=gi(h.defineComponent({__name:"BpmnPropertiesPanel",props:{modeler:{type:on},isEdit:{type:Boolean}},setup(e){const t=e,n=h.ref(""),i=h.ref({});let r,o,a;h.watch(()=>t.modeler,()=>{t.modeler&&(r=t.modeler,s())}),h.watch(i,(u,p)=>{u===p&&l()},{deep:!0});function s(){o=r.get("modeling"),r.on("element.click",u=>{c(u.element)}),r.on("selection.changed",u=>{if(u.newSelection.length)c(u.newSelection[0]);else{const p=r.get("canvas").getRootElement();c(p)}})}function c(u){if(!(u!=null&&u.businessObject)||a===u)return;a=u;const p=u.businessObject,f=p.$type;n.value="",h.nextTick(()=>{n.value=f});const d={...p.$attrs};Object.keys(p).forEach(m=>{const v=p[m];typeof v=="string"&&(d[m]=v)}),f==="bpmn:UserTask"?(Object.assign(d,{rollback:d["camunda:rollback"]==="1"?"1":"0",approvalCheckbox:[]}),Object.assign(d,{approvalSign:d["camunda:countersign"]==="true"?"countersign":"orSign",approvalCheckbox:[]}),d["camunda:advice"]==="true"&&d.approvalCheckbox.push("advice"),d["camunda:attachment"]==="true"&&d.approvalCheckbox.push("attachment"),d.userArr=(d.candidateUsers||"").split(",").filter(m=>m),d.roleArr=(d.candidateGroups||"").split(",").filter(m=>m)):f==="bpmn:SequenceFlow"&&p.conditionExpression&&Object.assign(d,{condType:p.conditionExpression.$type,condBody:p.conditionExpression.body}),i.value=d}function l(){var m,v;const u=i.value;function p(g){return g?"true":"false"}const f={id:u.id,name:u.name},d=n.value;if(d==="bpmn:Process")u.jobPriority&&Object.assign(f,{"camunda:jobPriority":u.jobPriority});else if(d==="bpmn:UserTask")Object.assign(f,{"camunda:orSign":p(u.approvalSign==="orSign"),"camunda:rollback":u.rollback==="1"?"1":"0","camunda:countersign":p(u.approvalSign==="countersign"),"camunda:advice":p(u.approvalCheckbox.includes("advice")),"camunda:attachment":p(u.approvalCheckbox.includes("attachment")),"camunda:assignee":u.assignee||void 0,"camunda:assigneeName":u["camunda:assigneeName"]||void 0,"camunda:priority":u.priority||void 0,"camunda:candidateUsers":((m=u.userArr)==null?void 0:m.join())||void 0,"camunda:candidateGroups":((v=u.roleArr)==null?void 0:v.join())||void 0});else if(d==="bpmn:SequenceFlow")if(u.condType){const g=r.get("moddle").create("bpmn:FormalExpression",{body:u.condBody});f.conditionExpression=g}else f.conditionExpression=null;o.updateProperties(a,f)}return(u,p)=>{const f=ef;return h.openBlock(),h.createElementBlock("div",C2,[h.createVNode(f,null,{default:h.withCtx(()=>[h.unref(n)==="bpmn:Process"?(h.openBlock(),h.createBlock(g2,{key:0,formState:h.unref(i),"onUpdate:formState":p[0]||(p[0]=d=>h.isRef(i)?i.value=d:null),isEdit:e.isEdit},null,8,["formState","isEdit"])):h.unref(n)==="bpmn:UserTask"?(h.openBlock(),h.createBlock(b2,{key:1,formState:h.unref(i),"onUpdate:formState":p[1]||(p[1]=d=>h.isRef(i)?i.value=d:null)},null,8,["formState"])):h.unref(n)==="bpmn:ExclusiveGateway"?(h.openBlock(),h.createBlock(E2,{key:2,formState:h.unref(i),"onUpdate:formState":p[2]||(p[2]=d=>h.isRef(i)?i.value=d:null)},null,8,["formState"])):h.unref(n)==="bpmn:SequenceFlow"?(h.openBlock(),h.createBlock(x2,{key:3,formState:h.unref(i),"onUpdate:formState":p[3]||(p[3]=d=>h.isRef(i)?i.value=d:null)},null,8,["formState"])):h.unref(n)==="bpmn:EndEvent"?(h.openBlock(),h.createBlock(w2,{key:4,formState:h.unref(i),"onUpdate:formState":p[4]||(p[4]=d=>h.isRef(i)?i.value=d:null)},null,8,["formState"])):h.unref(n)?(h.openBlock(),h.createBlock(S2,{key:5,formState:h.unref(i),"onUpdate:formState":p[5]||(p[5]=d=>h.isRef(i)?i.value=d:null)},null,8,["formState"])):h.createCommentVNode("",!0)]),_:1})])}}}),[["__scopeId","data-v-886844b5"]]),T2={class:"wrapper"},P2=gi(h.defineComponent({__name:"index",props:{data:{type:Object,required:!0}},setup(e,{expose:t}){const n=e,i=h.shallowRef();function r(){i.value=new on({container:"#canvas",moddleExtensions:{camunda:u2}})}function o(){Ct.getBpmnXml({code:n.data.code}).then(s=>{var c;if(s.code===0){const l=s.result.text;(c=i.value)==null||c.importXML(l)}})}h.onMounted(()=>{var s;r(),n.data.code?o():(s=i.value)==null||s.createDiagram()});function a(){var s;return(s=i.value)==null?void 0:s.saveXML({format:!0})}return t({saveXML:a}),(s,c)=>(h.openBlock(),h.createElementBlock("div",T2,[c[0]||(c[0]=h.createElementVNode("div",{id:"canvas"},null,-1)),h.createVNode(R2,{modeler:h.unref(i),isEdit:e.data.opType==="2"},null,8,["modeler","isEdit"])]))}}),[["__scopeId","data-v-d49b9b2a"]]),A2={class:"icon",viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function k2(e,t){return h.openBlock(),h.createElementBlock("svg",A2,t[0]||(t[0]=[h.createElementVNode("path",{fill:"currentColor",d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281l360-281.1c3.8-3 6.1-7.7 6.1-12.6"},null,-1)]))}const D2=h.markRaw({name:"ant-design-left",render:k2}),M2={class:"container"},N2={class:"viewer-container"},O2=gi(h.defineComponent({__name:"BpmnEditPage",props:{data:{type:Object,required:!0}},setup(e){const{t}=an.useI18n(),n=e,i=h.computed(()=>{const c=n.data.opType||"1";if(c==="1")return t("bpmn.add_workflow");if(c==="2")return t("bpmn.edit_workflow");if(c==="3")return t("bpmn.clone_workflow")}),r=h.inject(Ko);function o(){r==null||r.emit("changeComp",{comp:"BusTypeList"})}const a=h.ref();function s(){var c;(c=a.value)==null||c.saveXML().then(({error:l,xml:u})=>{if(l){st.message.error(l);return}const p={type:n.data.type,text:u};((n.data.opType||"1")==="2"?Ct.bpmnUpdate(p):Ct.bpmnInsert(p)).then(m=>{m.code===0&&(r==null||r.emit("changeComp",{comp:"BusTypeList"}))})})}return(c,l)=>{const u=D2,p=K.Button,f=K.Space,d=K.PageHeader,m=P2;return h.openBlock(),h.createElementBlock("div",M2,[h.createVNode(d,{class:"page-header-sticky",title:h.unref(i),onBack:o},{backIcon:h.withCtx(()=>[h.createVNode(u)]),extra:h.withCtx(()=>[h.createVNode(f,null,{default:h.withCtx(()=>[h.createVNode(p,{type:"default",onClick:o},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(c.$t("common.btn_cancel")),1)]),_:1}),h.createVNode(p,{type:"primary",onClick:s},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(c.$t("common.btn_ok")),1)]),_:1})]),_:1})]),_:1},8,["title"]),h.createElementVNode("div",N2,[h.createVNode(m,{ref_key:"bpmnViewer",ref:a,data:e.data},null,8,["data"])])])}}}),[["__scopeId","data-v-e763e4dc"]]),I2={class:"wrapper"},B2=gi(h.defineComponent({components:{BusTypeList:x0,BpmnEditPage:O2},__name:"index",setup(e){const t=h.ref("BusTypeList"),n=h.ref(),i=D_(Ko);return h.provide(Ko,i),i.on((r,o)=>{r==="changeComp"&&(t.value=o.comp,n.value=o)}),(r,o)=>{const a=I_;return h.openBlock(),h.createBlock(a,null,{default:h.withCtx(()=>[h.createElementVNode("div",I2,[(h.openBlock(),h.createBlock(h.KeepAlive,{include:"BusTypeList"},[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(h.unref(t)),{data:h.unref(n)},null,8,["data"]))],1024))])]),_:1})}}}),[["__scopeId","data-v-82fb5b00"]]);_p.createPinia();function L2(e){ic().setLang(e)}function $2(e,t){const{i18n:n,pinia:i,theme:r}=t;u_(n);const o=ic();o.setTheme(r),o.setupLangWatcher()}const j2={install:$2};yt.WfManagePage=B2,yt.default=j2,yt.setWorkflowLang=L2,Object.defineProperties(yt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
240
+ </div>`,re.RESULT_HTML='<div class="djs-search-result"></div>',re.RESULT_PRIMARY_HTML='<div class="djs-search-result-primary"></div>',re.RESULT_SECONDARY_HTML='<p class="djs-search-result-secondary"></p>';const t2={__depends__:[wa,Ra,en],searchPad:["type",re]};function yp(e,t,n,i){this._elementRegistry=e,this._canvas=n,this._search=i,t.registerProvider(this)}yp.$inject=["elementRegistry","searchPad","canvas","search"],yp.prototype.find=function(e){var t=this._canvas.getRootElements(),n=this._elementRegistry.filter(function(i){return!ge(i)&&!t.includes(i)});return this._search(n.map(i=>({element:i,label:Qt(i),id:i.id})),e,{keys:["label","id"]}).map(n2)};function n2(e){const{item:{element:t},tokens:n}=e;return{element:t,primaryTokens:n.label,secondaryTokens:n.id}}const i2={__depends__:[t2,Uh],__init__:["bpmnSearch"],bpmnSearch:["type",yp]},r2="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",o2="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",a2={width:36,height:50},s2={width:50,height:50};function a_(e,t,n){return X("path",{d:e,strokeWidth:2,transform:`translate(${t.x}, ${t.y})`,...n})}const Cr=5;function Js(e,t){this._styles=t,e.registerProvider(this)}Js.$inject=["outline","styles"],Js.prototype.getOutline=function(e){const t=this._styles.cls("djs-outline",["no-fill"]);var n;if(!ge(e))return b(e,"bpmn:Gateway")?(n=X("rect"),D(n.style,{"transform-box":"fill-box",transform:"rotate(45deg)","transform-origin":"center"}),G(n,D({x:2,y:2,rx:4,width:e.width-4,height:e.height-4},t))):le(e,["bpmn:Task","bpmn:SubProcess","bpmn:Group","bpmn:CallActivity"])?(n=X("rect"),G(n,D({x:-5,y:-5,rx:14,width:e.width+Cr*2,height:e.height+Cr*2},t))):b(e,"bpmn:EndEvent")?(n=X("circle"),G(n,D({cx:e.width/2,cy:e.height/2,r:e.width/2+Cr+1},t))):b(e,"bpmn:Event")?(n=X("circle"),G(n,D({cx:e.width/2,cy:e.height/2,r:e.width/2+Cr},t))):b(e,"bpmn:DataObjectReference")&&s_(e,"bpmn:DataObjectReference")?n=a_(r2,{x:-6,y:-6},t):b(e,"bpmn:DataStoreReference")&&s_(e,"bpmn:DataStoreReference")&&(n=a_(o2,{x:-6,y:-6},t)),n},Js.prototype.updateOutline=function(e,t){if(!ge(e))return le(e,["bpmn:SubProcess","bpmn:Group"])?(G(t,{width:e.width+Cr*2,height:e.height+Cr*2}),!0):!!le(e,["bpmn:Event","bpmn:Gateway","bpmn:DataStoreReference","bpmn:DataObjectReference"])};function s_(e,t){var n;return t==="bpmn:DataObjectReference"?n=a2:t==="bpmn:DataStoreReference"&&(n=s2),e.width===n.width&&e.height===n.height}const c2={__depends__:[My],__init__:["outlineProvider"],outlineProvider:["type",Js]};var l2='<?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>';function on(e){zr.call(this,e)}Y(on,zr),on.Viewer=Xn,on.NavigatedViewer=Zr,on.prototype.createDiagram=function(){return this.importXML(l2)},on.prototype._interactionModules=[Qd,ih,ah],on.prototype._modelingModules=[cR,Rl,DR,CR,ZR,Ll,iT,uD,tv,Es,hD,vD,MD,OD,ID,FD,JD,qv,oM,gM,RM,PM,Ry,QM,i2,c2],on.prototype._modules=[].concat(Xn.prototype._modules,on.prototype._interactionModules,on.prototype._modelingModules);const u2={name:"Camunda",uri:"http://camunda.org/schema/1.0/bpmn",prefix:"camunda",xml:{tagAlias:"lowerCase"},associations:[],types:JSON.parse('[{"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:[]},p2={class:"wrapper"},f2={class:"mt-xs"},d2={class:"flex-sc"},h2={class:"mt-xs"},m2=gi(h.defineComponent({__name:"RuleConfig",props:{jsonStr:{type:String,required:!0}},emits:["submit"],setup(e,{emit:t}){const{t:n}=an.useI18n(),i=e,r=t,o=h.ref({});function a(p){const f=p.replace(/(false|true|\d+)(?=")/g,"$1,");return JSON.parse(`{${f}}`)}function s(p){if(typeof p=="string"&&(p.trim().startsWith("{")||p.trim().startsWith("[")))try{return JSON.parse(p),!0}catch{return!1}return!1}function c(){i.jsonStr?s(i.jsonStr)?o.value=JSON.parse(i.jsonStr):o.value=a(i.jsonStr):o.value={revokeRule:!1,fallbackRule:!1,approverRemoveDuplicates:2,timeoutConfigSwitch:!1,timeoutPeriod:1,timeoutHandler:1}}function l(){st.Modal.destroyAll()}function u(){const p=o.value;if(p.timeoutConfigSwitch&&!p.timeoutPeriod){st.message.warning(n("bpmn.timeoutPeriodEmptyTip"));return}r("submit",o.value),st.Modal.destroyAll()}return h.onMounted(()=>{c()}),(p,f)=>{const d=K.Checkbox,m=K.FormItem,v=K.Radio,g=K.RadioGroup,w=K.InputNumber,C=K.Form,x=K.Button,E=K.Space;return h.openBlock(),h.createElementBlock("div",p2,[h.createVNode(C,{class:"my-nm","label-col":{span:6},"wrapper-col":{span:18},colon:!1,model:h.unref(o)},{default:h.withCtx(()=>[h.createVNode(m,{label:p.$t("bpmn.revertRule")},{default:h.withCtx(()=>[h.createVNode(d,{checked:h.unref(o).revokeRule,"onUpdate:checked":f[0]||(f[0]=S=>h.unref(o).revokeRule=S)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("bpmn.revertRuleTxt")),1)]),_:1},8,["checked"])]),_:1},8,["label"]),h.createVNode(m,{label:p.$t("bpmn.rollbackRule")},{default:h.withCtx(()=>[h.createVNode(d,{checked:h.unref(o).fallbackRule,"onUpdate:checked":f[1]||(f[1]=S=>h.unref(o).fallbackRule=S)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("bpmn.rollbackRuleTxt")),1)]),_:1},8,["checked"])]),_:1},8,["label"]),h.createVNode(m,{label:p.$t("bpmn.deduplicationApprovers")},{default:h.withCtx(()=>[h.createElementVNode("div",f2,h.toDisplayString(p.$t("bpmn.deduplicationApproversTxt")),1),h.createVNode(g,{value:h.unref(o).approverRemoveDuplicates,"onUpdate:value":f[2]||(f[2]=S=>h.unref(o).approverRemoveDuplicates=S)},{default:h.withCtx(()=>[h.createVNode(v,{value:0},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("bpmn.deduplicationRadio0")),1)]),_:1}),h.createVNode(v,{value:1},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("bpmn.deduplicationRadio1")),1)]),_:1}),h.createVNode(v,{value:2},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("bpmn.deduplicationRadio2")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),h.createVNode(m,{label:p.$t("bpmn.timeoutRule")},{default:h.withCtx(()=>[h.createVNode(d,{checked:h.unref(o).timeoutConfigSwitch,"onUpdate:checked":f[3]||(f[3]=S=>h.unref(o).timeoutConfigSwitch=S)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("bpmn.timeoutRuleTxt")),1)]),_:1},8,["checked"])]),_:1},8,["label"]),h.unref(o).timeoutConfigSwitch?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createVNode(m,{label:p.$t("wo_my.timeout")},{default:h.withCtx(()=>[h.createElementVNode("div",d2,[h.createTextVNode(h.toDisplayString(p.$t("bpmn.linkTimeoutTxt1"))+" ",1),h.createVNode(w,{class:"mx-xs",value:h.unref(o).timeoutPeriod,"onUpdate:value":f[4]||(f[4]=S=>h.unref(o).timeoutPeriod=S),min:1,max:1e4,precision:0},null,8,["value"]),h.createTextVNode(" "+h.toDisplayString(p.$t("bpmn.linkTimeoutTxt2")),1)])]),_:1},8,["label"]),h.createVNode(m,{label:p.$t("bpmn.timeoutHandle")},{default:h.withCtx(()=>[h.createElementVNode("div",h2,h.toDisplayString(p.$t("bpmn.timeoutHandleTxt")),1),h.createVNode(g,{value:h.unref(o).timeoutHandler,"onUpdate:value":f[5]||(f[5]=S=>h.unref(o).timeoutHandler=S)},{default:h.withCtx(()=>[h.createVNode(v,{value:0},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("bpmn.timeoutHandleRadio0")),1)]),_:1}),h.createVNode(v,{value:1},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("bpmn.timeoutHandleRadio1")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"])],64)):h.createCommentVNode("",!0)]),_:1},8,["model"]),h.createVNode(E,{class:"modal-btns"},{default:h.withCtx(()=>[h.createVNode(x,{onClick:l},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("common.btn_cancel1")),1)]),_:1}),h.createVNode(x,{type:"primary",onClick:u},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(p.$t("common.btn_sure")),1)]),_:1})]),_:1})])}}}),[["__scopeId","data-v-cc50d8c3"]]),g2=h.defineComponent({__name:"Process",props:h.mergeModels({isEdit:{type:Boolean}},{formState:{},formStateModifiers:{}}),emits:["update:formState"],setup(e){const{modal:t}=st.App.useApp(),{t:n}=an.useI18n(),i=h.useModel(e,"formState"),r=h.ref(["1","2","3","4","5","6"]);function o(){t.info({title:n("ruleModel.title"),content:h.h(m2,{jsonStr:i.value.jobPriority,onSubmit:a=>{i.value.jobPriority=JSON.stringify(a)}}),centered:!0,icon:null,footer:null,closable:!0,maskClosable:!0,width:850,class:"modal-comp"})}return(a,s)=>{const c=K.Input,l=K.FormItem,u=K.Form,p=K.CollapsePanel,f=K.Collapse;return h.openBlock(),h.createBlock(f,{activeKey:h.unref(r),"onUpdate:activeKey":s[4]||(s[4]=d=>h.isRef(r)?r.value=d:null)},{default:h.withCtx(()=>[h.createVNode(p,{key:"1",header:a.$t("FLOW_CHART.General")},{default:h.withCtx(()=>[h.createVNode(u,{layout:"vertical",model:i.value},{default:h.withCtx(()=>[h.createVNode(l,{label:a.$t("FLOW_CHART.Id"),extra:a.$t("FLOW_CHART.idTip")},{default:h.withCtx(()=>[h.createVNode(c,{value:i.value.id,"onUpdate:value":s[0]||(s[0]=d=>i.value.id=d),placeholder:a.$t("common.plsEnter"),readonly:e.isEdit},null,8,["value","placeholder","readonly"])]),_:1},8,["label","extra"]),h.createVNode(l,{label:a.$t("FLOW_CHART.Name")},{default:h.withCtx(()=>[h.createVNode(c,{value:i.value.name,"onUpdate:value":s[1]||(s[1]=d=>i.value.name=d),placeholder:a.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(l,{label:a.$t("FLOW_CHART.Version Tag")},{default:h.withCtx(()=>[h.createVNode(c,{value:i.value.versionTag,"onUpdate:value":s[2]||(s[2]=d=>i.value.versionTag=d),disabled:""},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"]),h.createVNode(p,{key:"4",header:a.$t("FLOW_CHART.Job Configuration")},{default:h.withCtx(()=>[h.createVNode(u,{layout:"vertical",model:i.value},{default:h.withCtx(()=>[h.createVNode(l,{label:a.$t("FLOW_CHART.Job Priority")},{default:h.withCtx(()=>[h.createVNode(c,{value:i.value.jobPriority,"onUpdate:value":s[3]||(s[3]=d=>i.value.jobPriority=d),placeholder:a.$t("common.plsSelect"),readonly:"",onClick:o},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),v2={class:"modal-container"},c_=h.defineComponent({__name:"SelectLink",props:{id:{type:String}},emits:["submit"],setup(e,{emit:t}){const{t:n}=an.useI18n(),i=e,r=t,o=h.ref({}),a=h.ref([{title:n("link.id"),dataIndex:"id"},{title:n("link.description"),dataIndex:"description"},{title:n("link.due"),dataIndex:"due"},{title:n("link.variable"),dataIndex:"variable"}]),s=h.ref([]),c=h.ref();function l(g,w){s.value=g,c.value=w}h.watchEffect(()=>{i.id&&(s.value=[i.id])});function u(g){c.value=null;const w={...o.value};return Object.assign(w,g),Ct.getLinkList(w)}const p=h.ref(),f=()=>{p.value.refresh()},d=()=>{o.value={},f()};h.onMounted(()=>{d()});function m(){st.Modal.destroyAll()}function v(){var g;(g=c.value)!=null&&g.length&&r("submit",c.value[0]),st.Modal.destroyAll()}return(g,w)=>{const C=K.Input,x=K.FormItem,E=K.Button,S=K.Space,R=K.Form,N=h.resolveComponent("a-table-ex");return h.openBlock(),h.createElementBlock("div",v2,[h.createVNode(R,{class:"form-query mx-nm mt-nm",layout:"vertical",model:h.unref(o)},{default:h.withCtx(()=>[h.createVNode(x,{label:g.$t("link.id")},{default:h.withCtx(()=>[h.createVNode(C,{value:h.unref(o).id,"onUpdate:value":w[0]||(w[0]=P=>h.unref(o).id=P),placeholder:g.$t("common.plsEnter"),onKeydown:h.withKeys(f,["enter"])},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(x,{label:g.$t("link.description")},{default:h.withCtx(()=>[h.createVNode(C,{value:h.unref(o).description,"onUpdate:value":w[1]||(w[1]=P=>h.unref(o).description=P),placeholder:g.$t("common.plsEnter"),onKeydown:h.withKeys(f,["enter"])},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(x,{class:"form-btns"},{default:h.withCtx(()=>[h.createVNode(S,null,{default:h.withCtx(()=>[h.createVNode(E,{type:"primary",onClick:f},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(g.$t("common.btn_search")),1)]),_:1}),h.createVNode(E,{onClick:d},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(g.$t("common.btn_reset")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),h.createVNode(N,{ref_key:"tableEx",ref:p,class:"table-query bordered mx-nm",columns:h.unref(a),rowKey:"id","row-selection":{type:"radio",selectedRowKeys:h.unref(s),onChange:l},loadData:u},null,8,["columns","row-selection"]),h.createVNode(S,{class:"modal-btns"},{default:h.withCtx(()=>{var P;return[h.createVNode(E,{onClick:m},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(g.$t("common.btn_cancel1")),1)]),_:1}),h.createVNode(E,{type:"primary",disabled:!((P=h.unref(s))!=null&&P.length),onClick:v},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(g.$t("common.btn_sure")),1)]),_:1},8,["disabled"])]}),_:1})])}}}),y2={class:"modal-container"},_2=h.defineComponent({__name:"SelectUser",props:{userIds:{type:String||Array},branchId:{type:String},mode:{type:String,default:"default"}},emits:["submit"],setup(e,{emit:t}){const{t:n}=an.useI18n(),i=e,r=t,o=h.ref({}),a=h.ref([{title:n("user.user_name"),dataIndex:"userName"},{title:n("user.user_id"),dataIndex:"userCode"},{title:n("arrears.org"),dataIndex:"branchName"}]),s=h.ref([]),c=h.ref();function l(g,w){s.value=g,c.value=w}h.watchEffect(()=>{i.userIds&&(s.value=Array.isArray(i.userIds)?i.userIds:[i.userIds])});function u(g){c.value=null;const w={...o.value,branchId:i.branchId};return Object.assign(w,g),Ct.getUserList(w)}const p=h.ref(),f=()=>{p.value.refresh()},d=()=>{o.value={},f()};h.onMounted(()=>{d()});function m(){st.Modal.destroyAll()}function v(){var g;if((g=c.value)!=null&&g.length){const w=c.value;r("submit",i.mode==="multiple"?w:w[0])}st.Modal.destroyAll()}return(g,w)=>{const C=K.Input,x=K.FormItem,E=K.Button,S=K.Space,R=K.Form,N=h.resolveComponent("a-table-ex");return h.openBlock(),h.createElementBlock("div",y2,[h.createVNode(R,{class:"form-query mx-nm mt-nm",layout:"vertical",model:h.unref(o)},{default:h.withCtx(()=>[h.createVNode(x,{label:g.$t("user.key")},{default:h.withCtx(()=>[h.createVNode(C,{value:h.unref(o).userName,"onUpdate:value":w[0]||(w[0]=P=>h.unref(o).userName=P),placeholder:g.$t("common.plsEnter"),onKeydown:h.withKeys(f,["enter"])},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(x,{class:"form-btns"},{default:h.withCtx(()=>[h.createVNode(S,null,{default:h.withCtx(()=>[h.createVNode(E,{type:"primary",onClick:f},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(g.$t("common.btn_search")),1)]),_:1}),h.createVNode(E,{onClick:d},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(g.$t("common.btn_reset")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),h.createVNode(N,{ref_key:"tableEx",ref:p,class:"table-query bordered mx-nm",columns:h.unref(a),rowKey:"userId","row-selection":{type:e.mode==="multiple"?"checkbox":"radio",selectedRowKeys:h.unref(s),onChange:l},loadData:u},null,8,["columns","row-selection"]),h.createVNode(S,{class:"modal-btns"},{default:h.withCtx(()=>{var P;return[h.createVNode(E,{onClick:m},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(g.$t("common.btn_cancel1")),1)]),_:1}),h.createVNode(E,{type:"primary",disabled:!((P=h.unref(s))!=null&&P.length),onClick:v},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(g.$t("common.btn_sure")),1)]),_:1},8,["disabled"])]}),_:1})])}}}),b2=h.defineComponent({__name:"UserTask",props:{formState:{},formStateModifiers:{}},emits:["update:formState"],setup(e){const{modal:t}=st.App.useApp(),{t:n}=an.useI18n(),i=h.useModel(e,"formState"),r=h.ref(["1","2","3","4","5","6"]),o=h.ref([]),a=h.ref([]),s=h.ref([]),c=h.computed(()=>{const w=i.value.assignee;return w==null?void 0:w.startsWith("${")});function l(){const w="abcdefghijklmnopqrstuvwxyz";let C="";for(let x=0;x<2;x++)C+=w.charAt(Math.floor(Math.random()*w.length));for(let x=0;x<2;x++)C+=Math.floor(Math.random()*10);return C}function u(){t.info({title:n("link.select_link"),content:h.h(c_,{id:i.value.id,onSubmit:w=>{let C=w.id;C.endsWith("*")&&(C=C.substring(0,C.length-1)+l()),Object.assign(i.value,{id:C,name:w.description,assignee:"","camunda:assigneeName":"",priority:void 0,userArr:[],roleArr:[]}),w.variable&&(i.value.assignee=`\${${w.variable}}`)}}),centered:!0,icon:null,footer:null,closable:!0,maskClosable:!0,width:800,class:"modal-comp"})}function p(){t.info({title:n("user.select_user"),content:h.h(_2,{userIds:i.value.assignee,onSubmit:w=>{Object.assign(i.value,{assignee:w.userId,"camunda:assigneeName":w.userName})}}),centered:!0,icon:null,footer:null,closable:!0,maskClosable:!0,width:800,class:"modal-comp"})}function f(){Ct.getBranchTree().then(w=>{w.code===0&&(o.value=w.result||[])})}function d(){const w={pageNo:1,pageSize:1e3,branchId:i.value.priority||void 0};Ct.getUserList(w).then(C=>{var x,E;C.code===0&&(s.value=((E=(x=C.result)==null?void 0:x.data)==null?void 0:E.map(S=>({...S,label:S.userName,value:S.userId})))||[])})}function m(){const w={pageNo:1,pageSize:1e3,branchId:i.value.priority||void 0};Ct.getRoleList(w).then(C=>{var x,E;C.code===0&&(a.value=((E=(x=C.result)==null?void 0:x.data)==null?void 0:E.map(S=>({...S,label:S.roleName,value:S.roleId})))||[])})}function v(){Object.assign(i.value,{userArr:[],roleArr:[]}),d(),m()}function g(w){if(w!=null&&w.length){const C=s.value.find(x=>x.userId===w[0]);i.value.priority!==C.branchId&&(Object.assign(i.value,{priority:C.branchId,roleArr:[]}),d(),m())}}return h.onMounted(()=>{f(),d(),m()}),(w,C)=>{const x=K.Input,E=K.FormItem,S=K.TreeSelect,R=K.Select,N=K.Form,P=K.CollapsePanel,O=K.Radio,I=K.RadioGroup,L=K.Checkbox,B=K.CheckboxGroup,z=K.Collapse;return h.openBlock(),h.createBlock(z,{activeKey:h.unref(r),"onUpdate:activeKey":C[10]||(C[10]=q=>h.isRef(r)?r.value=q:null)},{default:h.withCtx(()=>[h.createVNode(P,{key:"1",header:w.$t("FLOW_CHART.General")},{default:h.withCtx(()=>[h.createVNode(N,{layout:"vertical",model:i.value},{default:h.withCtx(()=>[h.createVNode(E,{label:w.$t("FLOW_CHART.Id")},{default:h.withCtx(()=>[h.createVNode(x,{value:i.value.id,"onUpdate:value":C[0]||(C[0]=q=>i.value.id=q),placeholder:w.$t("common.plsEnter"),readonly:"",onClick:u},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(E,{label:w.$t("FLOW_CHART.Name")},{default:h.withCtx(()=>[h.createVNode(x,{value:i.value.name,"onUpdate:value":C[1]||(C[1]=q=>i.value.name=q),placeholder:w.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(E,{label:w.$t("FLOW_CHART.Assignee")},{default:h.withCtx(()=>[h.unref(c)?(h.openBlock(),h.createBlock(x,{key:0,value:i.value.assignee,"onUpdate:value":C[2]||(C[2]=q=>i.value.assignee=q),placeholder:w.$t("common.plsSelect"),disabled:""},null,8,["value","placeholder"])):(h.openBlock(),h.createBlock(x,{key:1,value:i.value["camunda:assigneeName"],"onUpdate:value":C[3]||(C[3]=q=>i.value["camunda:assigneeName"]=q),placeholder:w.$t("common.plsSelect"),readonly:"",onClick:p},null,8,["value","placeholder"]))]),_:1},8,["label"]),h.createVNode(E,{label:w.$t("FLOW_CHART.Priority")},{default:h.withCtx(()=>[h.createVNode(S,{value:i.value.priority,"onUpdate:value":C[4]||(C[4]=q=>i.value.priority=q),placeholder:w.$t("common.plsSelect"),"tree-data":h.unref(o),treeDefaultExpandAll:"",treeNodeFilterProp:"label","show-search":"","allow-clear":"",onChange:v},null,8,["value","placeholder","tree-data"])]),_:1},8,["label"]),h.createVNode(E,{label:w.$t("FLOW_CHART.Candidate Users")},{default:h.withCtx(()=>[h.createVNode(R,{value:i.value.userArr,"onUpdate:value":C[5]||(C[5]=q=>i.value.userArr=q),placeholder:w.$t("common.plsSelect"),mode:"multiple",maxTagCount:10,options:h.unref(s),optionFilterProp:"label",disabled:h.unref(c),onChange:g},null,8,["value","placeholder","options","disabled"])]),_:1},8,["label"]),h.createVNode(E,{label:w.$t("FLOW_CHART.Candidate Groups")},{default:h.withCtx(()=>[h.createVNode(R,{value:i.value.roleArr,"onUpdate:value":C[6]||(C[6]=q=>i.value.roleArr=q),placeholder:w.$t("common.plsSelect"),mode:"multiple",maxTagCount:10,options:h.unref(a),optionFilterProp:"label",disabled:h.unref(c)},null,8,["value","placeholder","options","disabled"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"]),h.createVNode(P,{key:"2",header:w.$t("FLOW_CHART.isAllowRollback")},{default:h.withCtx(()=>[h.createVNode(I,{value:i.value.rollback,"onUpdate:value":C[7]||(C[7]=q=>i.value.rollback=q)},{default:h.withCtx(()=>[h.createVNode(O,{value:"1"},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.$t("FLOW_CHART.yes")),1)]),_:1}),h.createVNode(O,{value:"0"},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.$t("FLOW_CHART.no")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["header"]),h.createVNode(P,{key:"3",header:w.$t("FLOW_CHART.Approval Mode")},{default:h.withCtx(()=>[h.createVNode(I,{value:i.value.approvalSign,"onUpdate:value":C[8]||(C[8]=q=>i.value.approvalSign=q)},{default:h.withCtx(()=>[h.createVNode(O,{value:"orSign"},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.$t("FLOW_CHART.Or Sign")),1)]),_:1}),h.createVNode(O,{value:"countersign"},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.$t("FLOW_CHART.countersign")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["header"]),h.createVNode(P,{key:"4",header:w.$t("FLOW_CHART.Approval Required")},{default:h.withCtx(()=>[h.createVNode(B,{value:i.value.approvalCheckbox,"onUpdate:value":C[9]||(C[9]=q=>i.value.approvalCheckbox=q)},{default:h.withCtx(()=>[h.createVNode(L,{value:"advice"},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.$t("FLOW_CHART.Comments Required")),1)]),_:1}),h.createVNode(L,{value:"attachment"},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.$t("FLOW_CHART.Attachment Required")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),E2=h.defineComponent({__name:"ExclusiveGateway",props:{formState:{},formStateModifiers:{}},emits:["update:formState"],setup(e){const t=h.useModel(e,"formState"),n=h.ref(["1","2","3","4","5","6"]);return(i,r)=>{const o=K.Input,a=K.FormItem,s=K.Form,c=K.CollapsePanel,l=K.Collapse;return h.openBlock(),h.createBlock(l,{activeKey:h.unref(n),"onUpdate:activeKey":r[2]||(r[2]=u=>h.isRef(n)?n.value=u:null)},{default:h.withCtx(()=>[h.createVNode(c,{key:"1",header:i.$t("FLOW_CHART.General")},{default:h.withCtx(()=>[h.createVNode(s,{layout:"vertical",model:t.value},{default:h.withCtx(()=>[h.createVNode(a,{label:i.$t("FLOW_CHART.Id")},{default:h.withCtx(()=>[h.createVNode(o,{value:t.value.id,"onUpdate:value":r[0]||(r[0]=u=>t.value.id=u),placeholder:i.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(a,{label:i.$t("FLOW_CHART.Name")},{default:h.withCtx(()=>[h.createVNode(o,{value:t.value.name,"onUpdate:value":r[1]||(r[1]=u=>t.value.name=u),placeholder:i.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),x2=h.defineComponent({__name:"SequenceFlow",props:{formState:{},formStateModifiers:{}},emits:["update:formState"],setup(e){const t=h.useModel(e,"formState"),n=h.ref(["1","2","3","4","5","6"]);return(i,r)=>{const o=K.Input,a=K.FormItem,s=K.SelectOption,c=K.Select,l=K.Form,u=K.CollapsePanel,p=K.Collapse;return h.openBlock(),h.createBlock(p,{activeKey:h.unref(n),"onUpdate:activeKey":r[4]||(r[4]=f=>h.isRef(n)?n.value=f:null)},{default:h.withCtx(()=>[h.createVNode(u,{key:"1",header:i.$t("FLOW_CHART.General")},{default:h.withCtx(()=>[h.createVNode(l,{layout:"vertical",model:t.value},{default:h.withCtx(()=>[h.createVNode(a,{label:i.$t("FLOW_CHART.Id")},{default:h.withCtx(()=>[h.createVNode(o,{value:t.value.id,"onUpdate:value":r[0]||(r[0]=f=>t.value.id=f),placeholder:i.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(a,{label:i.$t("FLOW_CHART.Name")},{default:h.withCtx(()=>[h.createVNode(o,{value:t.value.name,"onUpdate:value":r[1]||(r[1]=f=>t.value.name=f),placeholder:i.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(a,{label:i.$t("FLOW_CHART.Condition Type")},{default:h.withCtx(()=>[h.createVNode(c,{value:t.value.condType,"onUpdate:value":r[2]||(r[2]=f=>t.value.condType=f),placeholder:i.$t("common.plsSelect"),allowClear:""},{default:h.withCtx(()=>[h.createVNode(s,{value:"bpmn:FormalExpression"},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(i.$t("FLOW_CHART.Expression")),1)]),_:1})]),_:1},8,["value","placeholder"])]),_:1},8,["label"]),t.value.condType==="bpmn:FormalExpression"?(h.openBlock(),h.createBlock(a,{key:0,label:i.$t("FLOW_CHART.Expression")},{default:h.withCtx(()=>[h.createVNode(o,{value:t.value.condBody,"onUpdate:value":r[3]||(r[3]=f=>t.value.condBody=f),placeholder:i.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"])):h.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),w2=h.defineComponent({__name:"EndEvent",props:{formState:{},formStateModifiers:{}},emits:["update:formState"],setup(e){const{modal:t}=st.App.useApp(),{t:n}=an.useI18n(),i=h.useModel(e,"formState"),r=h.ref(["1","2","3","4","5","6"]);function o(){const s="abcdefghijklmnopqrstuvwxyz";let c="";for(let l=0;l<2;l++)c+=s.charAt(Math.floor(Math.random()*s.length));for(let l=0;l<2;l++)c+=Math.floor(Math.random()*10);return c}function a(){t.info({title:n("link.select_link"),content:h.h(c_,{id:i.value.id,onSubmit:s=>{let c=s.id;c.endsWith("*")&&(c=c.substring(0,c.length-1)+o()),Object.assign(i.value,{id:c,name:s.description})}}),centered:!0,icon:null,footer:null,closable:!0,maskClosable:!0,width:800,class:"modal-comp"})}return(s,c)=>{const l=K.Input,u=K.FormItem,p=K.Form,f=K.CollapsePanel,d=K.Collapse;return h.openBlock(),h.createBlock(d,{activeKey:h.unref(r),"onUpdate:activeKey":c[2]||(c[2]=m=>h.isRef(r)?r.value=m:null)},{default:h.withCtx(()=>[h.createVNode(f,{key:"1",header:s.$t("FLOW_CHART.General")},{default:h.withCtx(()=>[h.createVNode(p,{layout:"vertical",model:i.value},{default:h.withCtx(()=>[h.createVNode(u,{label:s.$t("FLOW_CHART.Id")},{default:h.withCtx(()=>[h.createVNode(l,{value:i.value.id,"onUpdate:value":c[0]||(c[0]=m=>i.value.id=m),placeholder:s.$t("common.plsEnter"),readonly:"",onClick:a},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(u,{label:s.$t("FLOW_CHART.Name")},{default:h.withCtx(()=>[h.createVNode(l,{value:i.value.name,"onUpdate:value":c[1]||(c[1]=m=>i.value.name=m),placeholder:s.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),S2=h.defineComponent({__name:"Other",props:{formState:{},formStateModifiers:{}},emits:["update:formState"],setup(e){const t=h.useModel(e,"formState"),n=h.ref(["1","2","3","4","5","6"]);return(i,r)=>{const o=K.Input,a=K.FormItem,s=K.Form,c=K.CollapsePanel,l=K.Collapse;return h.openBlock(),h.createBlock(l,{activeKey:h.unref(n),"onUpdate:activeKey":r[2]||(r[2]=u=>h.isRef(n)?n.value=u:null)},{default:h.withCtx(()=>[h.createVNode(c,{key:"1",header:i.$t("FLOW_CHART.General")},{default:h.withCtx(()=>[h.createVNode(s,{layout:"vertical",model:t.value},{default:h.withCtx(()=>[h.createVNode(a,{label:i.$t("FLOW_CHART.Id")},{default:h.withCtx(()=>[h.createVNode(o,{value:t.value.id,"onUpdate:value":r[0]||(r[0]=u=>t.value.id=u),placeholder:i.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),h.createVNode(a,{label:i.$t("FLOW_CHART.Name")},{default:h.withCtx(()=>[h.createVNode(o,{value:t.value.name,"onUpdate:value":r[1]||(r[1]=u=>t.value.name=u),placeholder:i.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),C2={class:"properties-panel"},R2=gi(h.defineComponent({__name:"BpmnPropertiesPanel",props:{modeler:{type:on},isEdit:{type:Boolean}},setup(e){const t=e,n=h.ref(""),i=h.ref({});let r,o,a;h.watch(()=>t.modeler,()=>{t.modeler&&(r=t.modeler,s())}),h.watch(i,(u,p)=>{u===p&&l()},{deep:!0});function s(){o=r.get("modeling"),r.on("element.click",u=>{c(u.element)}),r.on("selection.changed",u=>{if(u.newSelection.length)c(u.newSelection[0]);else{const p=r.get("canvas").getRootElement();c(p)}})}function c(u){if(!(u!=null&&u.businessObject)||a===u)return;a=u;const p=u.businessObject,f=p.$type;n.value="",h.nextTick(()=>{n.value=f});const d={...p.$attrs};Object.keys(p).forEach(m=>{const v=p[m];typeof v=="string"&&(d[m]=v)}),f==="bpmn:UserTask"?(Object.assign(d,{rollback:d["camunda:rollback"]==="1"?"1":"0",approvalCheckbox:[]}),Object.assign(d,{approvalSign:d["camunda:countersign"]==="true"?"countersign":"orSign",approvalCheckbox:[]}),d["camunda:advice"]==="true"&&d.approvalCheckbox.push("advice"),d["camunda:attachment"]==="true"&&d.approvalCheckbox.push("attachment"),d.userArr=(d.candidateUsers||"").split(",").filter(m=>m),d.roleArr=(d.candidateGroups||"").split(",").filter(m=>m)):f==="bpmn:SequenceFlow"&&p.conditionExpression&&Object.assign(d,{condType:p.conditionExpression.$type,condBody:p.conditionExpression.body}),i.value=d}function l(){var m,v;const u=i.value;function p(g){return g?"true":"false"}const f={id:u.id,name:u.name},d=n.value;if(d==="bpmn:Process")u.jobPriority&&Object.assign(f,{"camunda:jobPriority":u.jobPriority});else if(d==="bpmn:UserTask")Object.assign(f,{"camunda:orSign":p(u.approvalSign==="orSign"),"camunda:rollback":u.rollback==="1"?"1":"0","camunda:countersign":p(u.approvalSign==="countersign"),"camunda:advice":p(u.approvalCheckbox.includes("advice")),"camunda:attachment":p(u.approvalCheckbox.includes("attachment")),"camunda:assignee":u.assignee||void 0,"camunda:assigneeName":u["camunda:assigneeName"]||void 0,"camunda:priority":u.priority||void 0,"camunda:candidateUsers":((m=u.userArr)==null?void 0:m.join())||void 0,"camunda:candidateGroups":((v=u.roleArr)==null?void 0:v.join())||void 0});else if(d==="bpmn:SequenceFlow")if(u.condType){const g=r.get("moddle").create("bpmn:FormalExpression",{body:u.condBody});f.conditionExpression=g}else f.conditionExpression=null;o.updateProperties(a,f)}return(u,p)=>{const f=ef;return h.openBlock(),h.createElementBlock("div",C2,[h.createVNode(f,null,{default:h.withCtx(()=>[h.unref(n)==="bpmn:Process"?(h.openBlock(),h.createBlock(g2,{key:0,formState:h.unref(i),"onUpdate:formState":p[0]||(p[0]=d=>h.isRef(i)?i.value=d:null),isEdit:e.isEdit},null,8,["formState","isEdit"])):h.unref(n)==="bpmn:UserTask"?(h.openBlock(),h.createBlock(b2,{key:1,formState:h.unref(i),"onUpdate:formState":p[1]||(p[1]=d=>h.isRef(i)?i.value=d:null)},null,8,["formState"])):h.unref(n)==="bpmn:ExclusiveGateway"?(h.openBlock(),h.createBlock(E2,{key:2,formState:h.unref(i),"onUpdate:formState":p[2]||(p[2]=d=>h.isRef(i)?i.value=d:null)},null,8,["formState"])):h.unref(n)==="bpmn:SequenceFlow"?(h.openBlock(),h.createBlock(x2,{key:3,formState:h.unref(i),"onUpdate:formState":p[3]||(p[3]=d=>h.isRef(i)?i.value=d:null)},null,8,["formState"])):h.unref(n)==="bpmn:EndEvent"?(h.openBlock(),h.createBlock(w2,{key:4,formState:h.unref(i),"onUpdate:formState":p[4]||(p[4]=d=>h.isRef(i)?i.value=d:null)},null,8,["formState"])):h.unref(n)?(h.openBlock(),h.createBlock(S2,{key:5,formState:h.unref(i),"onUpdate:formState":p[5]||(p[5]=d=>h.isRef(i)?i.value=d:null)},null,8,["formState"])):h.createCommentVNode("",!0)]),_:1})])}}}),[["__scopeId","data-v-dd3ba2c8"]]),T2={class:"wrapper"},P2=gi(h.defineComponent({__name:"index",props:{data:{type:Object,required:!0}},setup(e,{expose:t}){const n=e,i=h.shallowRef();function r(){i.value=new on({container:"#canvas",moddleExtensions:{camunda:u2}})}function o(){Ct.getBpmnXml({code:n.data.code}).then(s=>{var c;if(s.code===0){const l=s.result.text;(c=i.value)==null||c.importXML(l)}})}h.onMounted(()=>{var s;r(),n.data.code?o():(s=i.value)==null||s.createDiagram()});function a(){var s;return(s=i.value)==null?void 0:s.saveXML({format:!0})}return t({saveXML:a}),(s,c)=>(h.openBlock(),h.createElementBlock("div",T2,[c[0]||(c[0]=h.createElementVNode("div",{id:"canvas"},null,-1)),h.createVNode(R2,{modeler:h.unref(i),isEdit:e.data.opType==="2"},null,8,["modeler","isEdit"])]))}}),[["__scopeId","data-v-42ed31bc"]]),A2={class:"icon",viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function k2(e,t){return h.openBlock(),h.createElementBlock("svg",A2,t[0]||(t[0]=[h.createElementVNode("path",{fill:"currentColor",d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281l360-281.1c3.8-3 6.1-7.7 6.1-12.6"},null,-1)]))}const D2=h.markRaw({name:"ant-design-left",render:k2}),M2={class:"container"},N2={class:"viewer-container"},O2=gi(h.defineComponent({__name:"BpmnEditPage",props:{data:{type:Object,required:!0}},setup(e){const{t}=an.useI18n(),n=e,i=h.computed(()=>{const c=n.data.opType||"1";if(c==="1")return t("bpmn.add_workflow");if(c==="2")return t("bpmn.edit_workflow");if(c==="3")return t("bpmn.clone_workflow")}),r=h.inject(Ko);function o(){r==null||r.emit("changeComp",{comp:"BusTypeList"})}const a=h.ref();function s(){var c;(c=a.value)==null||c.saveXML().then(({error:l,xml:u})=>{if(l){st.message.error(l);return}const p={type:n.data.type,text:u};((n.data.opType||"1")==="2"?Ct.bpmnUpdate(p):Ct.bpmnInsert(p)).then(m=>{m.code===0&&(r==null||r.emit("changeComp",{comp:"BusTypeList"}))})})}return(c,l)=>{const u=D2,p=K.Button,f=K.Space,d=K.PageHeader,m=P2;return h.openBlock(),h.createElementBlock("div",M2,[h.createVNode(d,{class:"page-header-sticky",title:h.unref(i),onBack:o},{backIcon:h.withCtx(()=>[h.createVNode(u)]),extra:h.withCtx(()=>[h.createVNode(f,null,{default:h.withCtx(()=>[h.createVNode(p,{type:"default",onClick:o},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(c.$t("common.btn_cancel")),1)]),_:1}),h.createVNode(p,{type:"primary",onClick:s},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(c.$t("common.btn_ok")),1)]),_:1})]),_:1})]),_:1},8,["title"]),h.createElementVNode("div",N2,[h.createVNode(m,{ref_key:"bpmnViewer",ref:a,data:e.data},null,8,["data"])])])}}}),[["__scopeId","data-v-f3f3967f"]]),I2={class:"wrapper"},B2=gi(h.defineComponent({components:{BusTypeList:x0,BpmnEditPage:O2},__name:"index",setup(e){const t=h.ref("BusTypeList"),n=h.ref(),i=D_(Ko);return h.provide(Ko,i),i.on((r,o)=>{r==="changeComp"&&(t.value=o.comp,n.value=o)}),(r,o)=>{const a=I_;return h.openBlock(),h.createBlock(a,null,{default:h.withCtx(()=>[h.createElementVNode("div",I2,[(h.openBlock(),h.createBlock(h.KeepAlive,{include:"BusTypeList"},[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(h.unref(t)),{data:h.unref(n)},null,8,["data"]))],1024))])]),_:1})}}}),[["__scopeId","data-v-2baac694"]]);_p.createPinia();function L2(e){ic().setLang(e)}function $2(e,t){const{i18n:n,pinia:i,theme:r}=t;u_(n);const o=ic();o.setTheme(r),o.setupLangWatcher()}const j2={install:$2};yt.WfManagePage=B2,yt.default=j2,yt.setWorkflowLang=L2,Object.defineProperties(yt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});